chore(payment): NHN KCP와 NICE 결제 플러그인 개발 브랜치 분리

정식 develop에서는 기본 번들 정책에 따라 제거된 결제 플러그인을 별도 개발 브랜치에서 계속 유지보수할 수 있도록 복원한다.
This commit is contained in:
thisgun committed 2026-07-02 20:03:22 +09:00
1 parent 49b21e788c
commit 657f546efc
651 files changed
+49118 -20476

No files matched your search

@@ -4,20 +4,6 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.1] - 2026-07-08
### Added
- 관리자 사이드바 하단에 "사이트 보기" 링크를 추가했습니다 — 클릭하면 사용자 사이트 홈이 새 탭으로 열립니다.
### Changed
- 첨부파일을 허용 개수보다 많이 선택했을 때의 안내 문구를 "이미지는 최대 N장까지…"에서 "최대 N개까지 첨부할 수 있습니다"로 바꿔, 이미지뿐 아니라 문서 등 일반 파일을 올리는 화면에서도 자연스럽게 표시되도록 했습니다.
### Fixed
- 모바일에서 관리자 메뉴를 열면 메뉴 상단 일부가 상단 헤더에 가려 잘려 보이던 문제를 수정했습니다 — 이제 메뉴가 헤더 아래에서 시작해 첫 항목까지 온전히 보입니다.
## [1.0.0] - 2026-07-01
### Added
@@ -2,7 +2,7 @@
* @file admin-base-header-lang-currency.test.tsx
* @description 관리자 헤더 언어·통화 선택기 패리티 회귀 테스트
*
* 배경(검수 지적):
* 배경(PO 검수 지적):
* - 관리자 데스크톱 언어 버튼이 globe 아이콘만 표시하고 현재 선택 언어를 안 보여줌(유저는 코드 표시).
* → LanguageSelector 에 showCode 도입, _admin_base 가 showCode:true 로 사용.
* - 관리자 모바일 헤더에 언어·통화 버튼이 둘 다 없음(데스크톱에만 존재).
@@ -144,7 +144,7 @@ describe('환경설정 > 본인인증 정책 모달 회귀 테스트 (옵션 K)'
* disabled 미부여(편집 가능). 안내 문구도 "키·시점·위치만 변경 불가" 로 정합.
*
* 배경: 과거 purpose/applies_to 까지 잠겼던 것은 "선언형 readonly" 원칙의 과확장이었으며,
* 인증 목적은 어떤 정책이든 운영자가 자유 부여 가능해야 한다.
* 인증 목적은 어떤 정책이든 운영자가 자유 부여 가능해야 한다(PO).
*/
const LOCK_PREDICATE = "!_global.identity_policy_form_modal?.isNew && _global.identity_policy_form_modal?.form?.source_type !== 'admin'";
@@ -1 +1 @@
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Pretendard", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-greeLine truncated
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Pretendard", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-greeLine truncated
@@ -279,5 +279,5 @@ self.addEventListener('message', async (e) => {
* Released under the MIT License
*/class dN{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,s){const o=n.listeners[s],i=n.duration;o.forEach(a=>a({chart:e,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Zp.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const o=r.items;let i=o.length-1,a=!1,l;for(;i>=0;--i)l=o[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(o[i]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,r,e,"progress")),o.length||(r.running=!1,this._notify(s,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yn=new dN;const x0="transparent",uN={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=t0(t||x0),s=r.valid&&t0(e||x0);return s&&s.valid?s.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class fN{constructor(e,n,r,s){const o=n[r];s=ia([e.to,s,o,e.from]);const i=ia([e.from,o,s]);this._active=!0,this._fn=e.fn||uN[e.type||typeof i],this._easing=ho[e.easing]||ho.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=i,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],o=r-this._start,i=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=ia([e.to,n,s,e.from]),this._from=ia([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,s=this._prop,o=this._from,i=this._loop,a=this._to;let l;if(this._active=o!==a&&(i||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class w0{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Ze(e))return;const n=Object.keys(vt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!Ze(o))return;const i={};for(const a of n)i[a]=o[a];(_t(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,i)})})}_animateOptions(e,n){const r=n.options,s=gN(e,r);if(!s)return[];const o=this._createAnimations(s,r);return r.$shared&&hN(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,s=[],o=e.$animations||(e.$animations={}),i=Object.keys(n),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const d=n[c];let u=o[c];const f=r.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){e[c]=d;continue}o[c]=u=new fN(f,e,c,d),s.push(u)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Yn.add(this._chart,r),!0}}function hN(t,e){const n=[],r=Object.keys(e);for(let s=0;s<r.length;s++){const o=t[r[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function gN(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function k0(t,e){const n=t&&t.options||{},r=n.reverse,s=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:r?o:s,end:r?s:o}}function pN(t,e,n){if(n===!1)return!1;const r=k0(t,n),s=k0(e,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function mN(t){let e,n,r,s;return Ze(t)?(e=t.top,n=t.right,r=t.bottom,s=t.left):e=n=r=s=t,{top:e,right:n,bottom:r,left:s,disabled:t===!1}}function C0(t,e){const n=[],r=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=r.length;s<o;++s)n.push(r[s].indLine truncated
`)>-1?t.split(`
`):t}function l5(t,e){const{element:n,datasetIndex:r,index:s}=e,o=t.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:t,label:i,parsed:o.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function fm(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:i,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),d=Ut(e.footerFont),u=o.length,f=s.length,g=r.length,m=gn(e.padding);let p=m.height,y=0,b=r.reduce((E,k)=>E+k.before.length+k.lines.length+k.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*E+(b-g)*l.lineHeight+(b-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let S=0;const x=function(E){y=Math.max(y,n.measureText(E).width+S)};return n.save(),n.font=c.string,at(t.title,x),n.font=l.string,at(t.beforeBody.concat(t.afterBody),x),S=e.displayColors?i+2+e.boxPadding:0,at(r,E=>{at(E.before,x),at(E.lines,x),at(E.after,x)}),S=0,n.font=d.string,at(t.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function c5(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function d5(t,e,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&s+o+i>e.width||t==="right"&&s-o-i<0)return!0}function u5(t,e,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),d5(c,t,e,n)&&(c="center"),c}function hm(t,e,n){const r=n.yAlign||e.yAlign||c5(t,n);return{xAlign:n.xAlign||e.xAlign||u5(t,e,n,r),yAlign:r}}function f5(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function h5(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function gm(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=t,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=cs(i);let m=f5(e,a);const p=h5(e,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:Zt(m,0,r.width-e.width),y:Zt(p,0,r.height-e.height)}}function wa(t,e,n){const r=gn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function pm(t){return Vn([],Xn(t))}function g5(t,e,n){return ds(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function mm(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const bm={beforeTitle:Wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Wn,beforeBody:Wn,beforeLabel:Wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ct(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wn,afterBody:Wn,beforeFooter:Wn,footer:Wn,afterFooter:Wn};function Qt(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?bm[e].call(n,r):s}class hd extends Ar{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new w0(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=g5(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Qt(r,"beforeTitle",this,e),o=Qt(r,"title",this,e),i=Qt(r,"afterTitle",this,e);let a=[];return a=Vn(a,Xn(s)),a=Vn(a,Xn(o)),a=Vn(a,Xn(i)),a}getBeforeBody(e,n){return pm(Qt(n.call Line truncated
`):t}function l5(t,e){const{element:n,datasetIndex:r,index:s}=e,o=t.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:t,label:i,parsed:o.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function fm(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:i,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),d=Ut(e.footerFont),u=o.length,f=s.length,g=r.length,m=gn(e.padding);let p=m.height,y=0,b=r.reduce((E,k)=>E+k.before.length+k.lines.length+k.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*E+(b-g)*l.lineHeight+(b-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let S=0;const x=function(E){y=Math.max(y,n.measureText(E).width+S)};return n.save(),n.font=c.string,at(t.title,x),n.font=l.string,at(t.beforeBody.concat(t.afterBody),x),S=e.displayColors?i+2+e.boxPadding:0,at(r,E=>{at(E.before,x),at(E.lines,x),at(E.after,x)}),S=0,n.font=d.string,at(t.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function c5(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function d5(t,e,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&s+o+i>e.width||t==="right"&&s-o-i<0)return!0}function u5(t,e,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),d5(c,t,e,n)&&(c="center"),c}function hm(t,e,n){const r=n.yAlign||e.yAlign||c5(t,n);return{xAlign:n.xAlign||e.xAlign||u5(t,e,n,r),yAlign:r}}function f5(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function h5(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function gm(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=t,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=cs(i);let m=f5(e,a);const p=h5(e,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:Zt(m,0,r.width-e.width),y:Zt(p,0,r.height-e.height)}}function wa(t,e,n){const r=gn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function pm(t){return Vn([],Xn(t))}function g5(t,e,n){return ds(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function mm(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const bm={beforeTitle:Wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Wn,beforeBody:Wn,beforeLabel:Wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ct(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wn,afterBody:Wn,beforeFooter:Wn,footer:Wn,afterFooter:Wn};function Qt(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?bm[e].call(n,r):s}class hd extends Ar{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new w0(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=g5(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Qt(r,"beforeTitle",this,e),o=Qt(r,"title",this,e),i=Qt(r,"afterTitle",this,e);let a=[];return a=Vn(a,Xn(s)),a=Vn(a,Xn(o)),a=Vn(a,Xn(i)),a}getBeforeBody(e,n){return pm(Qt(n.call Line truncated
//# sourceMappingURL=components.iife.js.map
@@ -1 +1 @@
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/UnifiedIcon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/I.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/SectionHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.jsLine truncated
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/UnifiedIcon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/I.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/SectionHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.jsLine truncated
@@ -1,7 +1,6 @@
{
"sidebar": {
"no_accessible_menus": "No accessible menus",
"view_site": "View site"
"no_accessible_menus": "No accessible menus"
},
"profile_settings": "Profile Settings",
"logout": "Logout",
@@ -7,7 +7,7 @@
"deleting": "Deleting...",
"drop_or_click": "Drag and drop files or click to upload",
"upload_limit": "Max {{maxFiles}} files, {{maxSize}}MB each",
"upload_limit_exceeded": "You can attach up to {{max}} files.",
"upload_limit_exceeded": "You can upload up to {{max}} images.",
"attached_count": "{{count}}/{{max}} attached",
"max_size": "Max {{size}}MB",
"drag_to_reorder": "Drag to reorder",
@@ -1,7 +1,6 @@
{
"sidebar": {
"no_accessible_menus": "접근 가능한 메뉴가 없습니다",
"view_site": "사이트 보기"
"no_accessible_menus": "접근 가능한 메뉴가 없습니다"
},
"profile_settings": "프로필 설정",
"logout": "로그아웃",
@@ -7,7 +7,7 @@
"deleting": "삭제하는 중...",
"drop_or_click": "파일을 드래그하거나 클릭하여 업로드",
"upload_limit": "최대 {{maxFiles}}개, 개당 {{maxSize}}MB",
"upload_limit_exceeded": "최대 {{max}}개까지 첨부할 수 있습니다.",
"upload_limit_exceeded": "이미지는 최대 {{max}}장까지 업로드할 수 있습니다.",
"attached_count": "{{count}}/{{max}}개 첨부됨",
"max_size": "최대 {{size}}MB",
"drag_to_reorder": "드래그하여 순서 변경",
@@ -292,46 +292,6 @@
]
}
]
},
{
"id": "sidebar_footer",
"type": "basic",
"name": "Div",
"props": {
"className": "sidebar_footer"
},
"children": [
{
"id": "sidebar_view_site_link",
"type": "basic",
"name": "A",
"props": {
"href": "/",
"target": "_blank",
"rel": "noopener noreferrer",
"title": "$t:admin.sidebar.view_site",
"className": "sidebar_view_site_link"
},
"children": [
{
"type": "basic",
"name": "I",
"props": {
"className": "sidebar_view_site_icon fas fa-globe"
}
},
{
"id": "sidebar_view_site_label",
"type": "basic",
"name": "Span",
"props": {
"className": "sidebar_view_site_label"
},
"text": "$t:admin.sidebar.view_site"
}
]
}
]
}
]
},
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
{
"name": "sirsoft-admin_basic",
"version": "1.0.1",
"version": "1.0.0",
"description": "Gnuboard7 Basic Admin Template Components",
"type": "module",
"main": "dist/components.js",
@@ -1,97 +0,0 @@
/**
* @file sidebar-view-site-link.test.tsx
* @description 관리자 사이드바 하단 "사이트 보기" 링크 + 모바일 드로어 상단 잘림 수정 회귀 테스트 (이슈 #450)
*
* 검증 항목:
* 1. _admin_base.json 에 sidebar_footer > "사이트 보기" 링크 노드 존재
* 2. 링크는 A 태그, href="/", target="_blank", rel="noopener noreferrer"
* 3. 링크는 스크롤 메뉴(admin_sidebar_menu) 밖의 형제로 배치 (하단 고정)
* 4. 모바일 드로어(.left_sidebar_area_portable) 가 inset-y-0(top:0) 대신 헤더 아래(top:4rem)에서 시작
*/
import { describe, it, expect } from 'vitest';
import fs from 'fs';
import path from 'path';
import adminBase from '../../../layouts/_admin_base.json';
interface LayoutNode {
id?: string;
name?: string;
props?: Record<string, unknown>;
children?: LayoutNode[];
[key: string]: unknown;
}
function findById(node: LayoutNode | LayoutNode[] | undefined, id: string): LayoutNode | null {
if (!node) return null;
const nodes = Array.isArray(node) ? node : [node];
for (const n of nodes) {
if (n && typeof n === 'object') {
if (n.id === id) return n;
for (const key of Object.keys(n)) {
const child = (n as Record<string, unknown>)[key];
if (Array.isArray(child) || (child && typeof child === 'object')) {
const found = findById(child as LayoutNode | LayoutNode[], id);
if (found) return found;
}
}
}
}
return null;
}
describe('이슈 #450 — 관리자 사이드바 "사이트 보기" 링크', () => {
it('sidebar_footer 노드가 존재한다', () => {
const footer = findById(adminBase as LayoutNode, 'sidebar_footer');
expect(footer).not.toBeNull();
expect(footer?.name).toBe('Div');
});
it('사이트 보기 링크는 A 태그로 유저 홈(/)을 새 탭으로 연다', () => {
const link = findById(adminBase as LayoutNode, 'sidebar_view_site_link');
expect(link).not.toBeNull();
expect(link?.name).toBe('A');
expect(link?.props?.href).toBe('/');
expect(link?.props?.target).toBe('_blank');
expect(link?.props?.rel).toBe('noopener noreferrer');
});
it('노출 조건(if)이 없어 관리자 화면에서 항상 표시된다', () => {
const link = findById(adminBase as LayoutNode, 'sidebar_view_site_link');
expect(link?.if).toBeUndefined();
});
it('sidebar_footer 는 스크롤 메뉴(admin_sidebar_menu) 내부가 아닌 left_sidebar_area 의 직접 자식이다', () => {
const sidebarArea = findById(adminBase as LayoutNode, 'left_sidebar_area');
const childIds = (sidebarArea?.children ?? []).map((c) => c.id);
expect(childIds).toContain('sidebar_footer');
// 스크롤 메뉴 내부에 footer 가 중첩되지 않아야 함 (하단 고정 보장)
const menu = findById(adminBase as LayoutNode, 'admin_sidebar_menu');
const menuChildIds = (menu?.children ?? []).map((c) => c.id);
expect(menuChildIds).not.toContain('sidebar_footer');
});
});
describe('이슈 #450 — 모바일 드로어 상단 잘림 수정 (CSS)', () => {
const css = fs.readFileSync(
path.resolve(__dirname, '../../styles/layout/_admin_base.css'),
'utf8',
);
it('.left_sidebar_area_portable 는 inset-y-0(top:0)로 헤더를 덮지 않는다', () => {
const block = css.match(/\.left_sidebar_area_portable\s*\{[^}]*\}/s)?.[0] ?? '';
expect(block).not.toContain('inset-y-0');
});
it('.left_sidebar_area_portable 는 헤더 높이(4rem)만큼 내려 시작한다', () => {
const block = css.match(/\.left_sidebar_area_portable\s*\{[^}]*\}/s)?.[0] ?? '';
expect(block).toMatch(/top:\s*4rem/);
expect(block).toMatch(/bottom:\s*0/);
});
it('.sidebar_view_site_link 스타일이 정의되어 있다', () => {
expect(css).toContain('.sidebar_view_site_link');
expect(css).toContain('.sidebar_footer');
});
});
@@ -54,16 +54,9 @@
@apply w-0 overflow-hidden;
}
/*
* 모바일 드로어. 모바일 헤더(.mobile_header_portable, h-16=4rem, relative)가 일반 흐름
* 최상단에 있으므로, 드로어를 inset-y-0(top:0)로 두면 헤더 영역을 덮어 첫 메뉴 항목이
* 잘려 보인다(#450). top 을 헤더 높이(4rem)만큼 내려 드로어가 헤더 아래에서 시작하게 한다.
*/
.left_sidebar_area_portable {
@apply fixed left-0 z-50 w-64 transition-transform duration-300 flex flex-col bg-white;
@apply fixed inset-y-0 left-0 z-50 w-64 transition-transform duration-300 flex flex-col bg-white;
@apply dark:bg-gray-800;
top: 4rem;
bottom: 0;
transform: translateX(-100%);
}
@@ -113,38 +106,6 @@
@apply dark:text-gray-600;
}
/* ========================================
* 4-1. SIDEBAR FOOTER (사이트 보기 링크)
*
* 스크롤 메뉴(.admin_sidebar_menu) 밖의 형제로 사이드바 하단에 고정.
* 관리자 → 유저 사이트 진입 링크. 데스크톱 접힘 시 아이콘만 표시.
* ======================================== */
.sidebar_footer {
@apply flex-shrink-0 border-t border-gray-100 p-3;
@apply dark:border-gray-700;
}
.sidebar_view_site_link {
@apply flex items-center gap-2 h-9 px-3 rounded-lg no-underline;
@apply text-sm font-medium text-slate-600 transition-colors;
@apply hover:bg-slate-100 hover:text-slate-900;
@apply dark:text-slate-300 dark:hover:bg-slate-700 dark:hover:text-white;
}
.sidebar_view_site_icon {
@apply text-sm flex-shrink-0;
}
/*
* 데스크톱 접힘 상태: 라벨을 숨기고 아이콘만 중앙 정렬.
* (.left_sidebar_area_collapsed 는 w-0 overflow-hidden 이므로 접힘 시 자동으로
* footer 도 함께 잘리지만, 접힘 애니메이션 중 라벨 줄바꿈 방지를 위해 truncate 처리)
*/
.sidebar_view_site_label {
@apply truncate;
}
/* ========================================
* 5. RIGHT CONTENT WRAPPER + AREA
* ======================================== */
@@ -363,8 +363,6 @@
@@ -5,7 +5,7 @@
"ko": "Admin Basic",
"en": "Admin Basic"
},
"version": "1.0.1",
"version": "1.0.0",
"license": "MIT",
"description": {
"ko": "그누보드7 기본 관리자 템플릿",
@@ -4,22 +4,6 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.1] - 2026-07-08
### Added
- 관리자가 발행 전 페이지를 사용자 화면에서 미리 볼 때, 미발행 상태임을 알리는 안내 표시를 추가했습니다.
- 사용자 게시판 화면(목록·상세)에 관리자 진입 버튼을 추가했습니다 — 게시판 관리 권한이 있는 사용자에게만 "관리자 게시물 조회"·"게시판 관리" 버튼이 보이며, 클릭하면 새 탭으로 열립니다.
- 사용자 상품 상세 화면에 "관리자에서 수정" 버튼을 추가했습니다 — 상품 수정 권한이 있는 사용자에게만 보이며, 클릭하면 해당 상품의 관리자 수정 화면이 새 탭으로 열립니다.
### Changed
- 상품 상세 페이지 주소가 상품 번호 대신 상품코드 기준으로 바뀌었습니다 (상품 목록·최근 본 상품·검색·장바구니·주문내역 등 모든 상품 링크 포함). 기존 번호 기반 주소도 계속 동작합니다.
### Fixed
- 게시글 첨부파일을 허용 개수보다 많이 선택하면, 초과분이 아무 안내 없이 사라지지 않고 "최대 N개까지 첨부할 수 있습니다" 안내 메시지가 표시됩니다.
## [1.0.0] - 2026-07-01
### Added
@@ -9,7 +9,7 @@
* 트리에 유지된다(백엔드 CommentRepository 가 tombstone 부모를 조회 트리에 복구).
* - tombstone 안내는 deleted_at 만 게이트로 하며 content 존재에 의존하지 않는다
* (비권한자는 content 가 "삭제된 댓글입니다" 문구라도 안내는 보여야 함).
* - 원문은 블라인드와 동일하게 관리자(can_manage)만 토글 열람 (정책 확정 — 버튼 유지).
* - 원문은 블라인드와 동일하게 관리자(can_manage)만 토글 열람 (PO 확정 — 버튼 유지).
* - 자식 댓글 렌더는 부모의 삭제 상태와 독립적으로 동작한다.
*
* 회귀 배경: 과거 일반 조회에서 삭제 부모가 빠지며 자식까지 트리에서 누락 → 자식 동반 실종.
@@ -3,7 +3,7 @@
* @description 게시판 목록/검색 미리보기 비밀글·블라인드 차단 게이트 회귀 (이슈 #413-37)
*
* 검증 방식: 레이아웃 JSON 트리 직접 분석 (DOM 비의존).
* 정책(확정): 목록/검색 미리보기(content_preview)는 비밀글·블라인드 글에서
* 정책(PO 확정): 목록/검색 미리보기(content_preview)는 비밀글·블라인드 글에서
* 권한과 무관하게 빈 문자열로 차단된다. 백엔드(PostResource::toListArray ->
* getMaskedContentPreviewForList)가 빈 문자열을 응답하면, 미리보기 노드의 if 가
* content_preview 존재(truthy)에 의존하므로 자동으로 미렌더된다.
@@ -1,6 +1,6 @@
/**
* @file coupon-download-modal.test.tsx
* @description U10 — 쿠폰 다운로드 모달 무한스크롤 회귀 테스트 (MP10 §9, 재설계)
* @description U10 — 쿠폰 다운로드 모달 무한스크롤 회귀 테스트 (MP10 §9, PO 재설계)
*
* 검증 항목 (최종 무한스크롤 설계 기준):
* - last_page 기반 버튼식 페이지네이션 블록(이전/다음/카운터) 미렌더
@@ -1,111 +0,0 @@
/**
* @file page-attachment-download-handler.test.tsx
* @description 사용자 페이지 상세(page/show)의 첨부 다운로드가 토큰 동반 핸들러로 전환됐는지 회귀
* (별건: 관리자 상세 첨부 썸네일·다운로드 미노출 — 사용자 화면도 동일 표준으로 정렬).
*
* 검증 방식: 레이아웃 JSON 트리 직접 분석 (DOM 비의존).
*
* 결함: 다운로드가 <A href="{{att_item.download_url}}"> 브라우저 직접 링크였다.
* download_url 은 권한 게이트(미발행)를 가진 공개 라우트이며, <a> 네비게이션에는
* 토큰이 실리지 않아 권한 관리자의 미발행 첨부 다운로드가 404 로 막혔다.
*
* 수정: 다운로드 버튼을 downloadAttachment 핸들러(토큰 동반 fetch → blob)로 전환.
*
* @scenario surface=page_show
* @effects download_uses_handler_not_anchor
*/
import { describe, it, expect } from 'vitest';
import pageShow from '../../layouts/page/show.json';
type Node = Record<string, unknown> & { children?: unknown; actions?: unknown };
function collectNodes(node: unknown, predicate: (n: Node) => boolean): Node[] {
const result: Node[] = [];
const walk = (cur: unknown): void => {
if (Array.isArray(cur)) {
cur.forEach(walk);
return;
}
if (cur && typeof cur === 'object') {
const obj = cur as Node;
if (predicate(obj)) {
result.push(obj);
}
Object.values(obj).forEach(walk);
}
};
walk(node);
return result;
}
describe('별건 — 사용자 페이지 상세(page/show) 첨부 다운로드 핸들러 전환', () => {
it('첨부 다운로드는 download_url 을 가리키는 <A href> 직접 링크가 아니다', () => {
const anchors = collectNodes(
pageShow,
(n) =>
n.name === 'A' &&
typeof (n.props as Record<string, unknown> | undefined)?.href === 'string' &&
String((n.props as Record<string, unknown>).href).includes('download_url'),
);
expect(anchors.length).toBe(0);
});
it('첨부 다운로드는 downloadAttachment 핸들러 click 액션을 사용한다', () => {
const handlerActions = collectNodes(pageShow, (n) => {
const actions = (n.actions ?? []) as Array<Record<string, unknown>>;
return (
Array.isArray(actions) &&
actions.some((a) => a.type === 'click' && a.handler === 'downloadAttachment')
);
});
expect(handlerActions.length).toBeGreaterThan(0);
const node = handlerActions[0];
const actions = (node.actions ?? []) as Array<Record<string, unknown>>;
const clickAction = actions.find(
(a) => a.type === 'click' && a.handler === 'downloadAttachment',
);
const params = (clickAction?.params ?? {}) as Record<string, unknown>;
expect(params.url).toContain('download_url');
expect(params.filename).toContain('original_filename');
});
});
describe('별건 — 사용자 페이지 상세(page/show) 이미지 첨부 썸네일', () => {
it('이미지 첨부는 preview_url 을 src 로 하는 <Img> 썸네일을 렌더한다', () => {
const thumbs = collectNodes(pageShow, (n) => {
const props = (n.props ?? {}) as Record<string, unknown>;
return (
n.name === 'Img' &&
typeof props.src === 'string' &&
String(props.src).includes('att_item') &&
String(props.src).includes('preview_url')
);
});
expect(thumbs.length).toBeGreaterThan(0);
});
it('썸네일은 is_image 조건으로만 렌더된다 (일반 파일은 아이콘)', () => {
// preview_url <Img> 를 감싸는 노드는 is_image 참일 때만 렌더되어야 한다
const guarded = collectNodes(pageShow, (n) => {
const ifCond = typeof n.if === 'string' ? (n.if as string) : '';
const hasImgChild =
collectNodes(n.children, (c) => {
const props = (c.props ?? {}) as Record<string, unknown>;
return (
c.name === 'Img' &&
typeof props.src === 'string' &&
String(props.src).includes('preview_url')
);
}).length > 0;
return hasImgChild && ifCond.includes('att_item') && ifCond.includes('is_image');
});
expect(guarded.length).toBeGreaterThan(0);
});
});
@@ -1,79 +0,0 @@
/**
* @file page-show-preview-banner.test.tsx
* @description 미발행 페이지 관리자 미리보기 배너 (이슈 #424-15)
*
* 정책: 페이지 조회 권한 관리자가 사용자 화면에서 미발행 페이지를 미리볼 때,
* 상단에 "미발행 페이지 미리보기 중" 안내 배너를 노출한다. 백엔드(PublicPageResource)가
* 미발행+권한자 응답에만 is_preview=true 를 내려주므로, 배너의 if 는 그 값에 의존한다.
* 발행 페이지·게스트 응답은 is_preview=false → 배너 미노출.
*
* 검증 방식: 실제 page/show.json 레이아웃 트리 직접 분석 (DOM 비의존).
* - 배너 블록이 존재하고 if 가 page.data.is_preview 에 의존하는지 고정
* - 배너 문구가 다국어 키($t:user.page.preview_banner)로 렌더되는지 고정
*/
import { describe, it, expect } from 'vitest';
import pageShow from '../../layouts/page/show.json';
type Node = Record<string, unknown> & { children?: unknown };
/**
* 트리를 재귀 순회하며 조건을 만족하는 모든 노드를 수집한다.
*/
function collectNodes(node: unknown, predicate: (n: Node) => boolean): Node[] {
const result: Node[] = [];
const walk = (cur: unknown): void => {
if (Array.isArray(cur)) {
cur.forEach(walk);
return;
}
if (cur && typeof cur === 'object') {
const obj = cur as Node;
if (predicate(obj)) {
result.push(obj);
}
Object.values(obj).forEach(walk);
}
};
walk(node);
return result;
}
/**
* id 로 노드를 찾는다.
*/
function findById(root: unknown, id: string): Node | undefined {
return collectNodes(root, (n) => n.id === id)[0];
}
describe('이슈 #424-15 — 미발행 페이지 미리보기 배너 (page/show.json)', () => {
it('미리보기 배너 블록(page_preview_banner)이 존재한다', () => {
const banner = findById(pageShow, 'page_preview_banner');
expect(banner).toBeDefined();
});
it('배너의 if 가 page.data.is_preview 에 의존한다 (발행/게스트는 미노출)', () => {
const banner = findById(pageShow, 'page_preview_banner');
expect(typeof banner?.if).toBe('string');
expect(banner?.if as string).toContain('is_preview');
// 단일 바인딩 형태 {{...}} 여야 엔진이 식으로 평가 (if 표현식 규칙)
expect((banner?.if as string).trim()).toMatch(/^\{\{.*\}\}$/);
});
it('배너 문구가 다국어 키로 렌더된다 (하드코딩 금지)', () => {
const banner = findById(pageShow, 'page_preview_banner');
const spans = collectNodes(banner, (n) => n.name === 'Span' && typeof n.text === 'string');
const texts = spans.map((s) => s.text as string);
expect(texts).toContain('$t:user.page.preview_banner');
});
it('배너가 본문 카드(page_content_card) 내부, 제목 영역보다 앞에 위치한다', () => {
const card = findById(pageShow, 'page_content_card');
expect(card).toBeDefined();
const children = card?.children as Node[];
expect(Array.isArray(children)).toBe(true);
// 첫 자식이 미리보기 배너여야 함 (제목/발행일보다 위)
expect(children[0]?.id).toBe('page_preview_banner');
});
});
@@ -5,7 +5,7 @@
* 배경:
* - partial_cancelled 주문상태 제거 후, 일부 취소 사실은 파생 플래그 is_partially_cancelled 로 표시한다.
* - 목록(_list.json) 헤더 행은 flex justify-between [좌: 날짜/주문번호] vs [우: 상태 배지] 구조다.
* 보조 배지를 헤더 행의 3번째 형제로 넣으면 justify-between 이 3개를 분산시켜 레이아웃이 깨진다(검수 중 발견).
* 보조 배지를 헤더 행의 3번째 형제로 넣으면 justify-between 이 3개를 분산시켜 레이아웃이 깨진다(PO 발견).
* → 상태 배지와 보조 배지를 하나의 세로 묶음(flex-col items-end) Div 로 감싸 "결제완료" 아래에 배치한다.
*
* 회귀 차단:
@@ -8,7 +8,7 @@
* A2) checkoutData GET 이 country_code 를 서버에 전달하지 않아 서버가 KR 폴백
* A3) 배송국가 Select 변경 시 PUT /checkout(재계산) 호출이 없어 국가만 바뀌고 배송비 그대로
*
* 설계 원칙(확정): 주문서에서 선택한 배송국가가 SSoT.
* 설계 원칙(PO 확정): 주문서에서 선택한 배송국가가 SSoT.
* 헤더는 "기본값" 만 제공(_global.preferredShippingCountry), 진입 후엔 주문서 Select 가 우선.
* 우편번호는 국가 결정과 무관 — 도서산간/주별 세부 차등에만 관여.
*/
@@ -277,7 +277,7 @@ describe('guest_order_form.json — 비회원 조회 폼 ( 그룹 C)', () => {
expect(clear, 'clearGuestTokenOnEntry 누락 — 토큰 보유자에게는 자동 진입되어 폼 노출 안 됨, 다른 주문 조회 불가').toBeDefined();
});
it('onError 는 _local.lookupError boolean 플래그만 set 해야 한다 (toast 가 아닌 페이지 내 인라인 에러 박스로 통일 메시지 노출 — UX 결정 + 보안 정책 실패 사유 비노출)', () => {
it('onError 는 _local.lookupError boolean 플래그만 set 해야 한다 (toast 가 아닌 페이지 내 인라인 에러 박스로 통일 메시지 노출 — PO UX 결정 + 보안 정책 실패 사유 비노출)', () => {
const verifyCall = findNode(
guestFormJson,
(n) => n.handler === 'apiCall' && n.target?.endsWith('/guest/orders/verify')
@@ -314,7 +314,7 @@ describe('guest_order_form.json — 비회원 조회 폼 ( 그룹 C)', () => {
expect(resetAction, 'submit 시작 시 lookupError 초기화 누락 — 이전 실패 박스가 그대로 노출됨').toBeDefined();
});
it('회원 로그인 사용자가 실수로 진입한 경우 lifecycle.onMount 가 toast + /mypage/orders 로 navigate 해야 한다 (UX 결정 — 회원은 본 페이지에서 회원 주문 조회 불가)', () => {
it('회원 로그인 사용자가 실수로 진입한 경우 lifecycle.onMount 가 toast + /mypage/orders 로 navigate 해야 한다 (PO UX 결정 — 회원은 본 페이지에서 회원 주문 조회 불가)', () => {
const memberGuardBlock = findNode(
guestFormJson,
(n) => n.if === '{{_global?.currentUser?.uuid}}' && findNode(n, (m: any) => m.lifecycle?.onMount)
+11 -11
View File
@@ -1,14 +1,14 @@
var SirsoftBasic=(function(J,d,k,Jt){"use strict";function Mc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const T=Mc(k),Oc=()=>window.G7Core,Q=k.forwardRef(({children:e,variant:t="primary",size:r="md",className:n="",...o},a)=>{const s="inline-flex items-center justify-center",l=Oc()?.style?.mergeClasses?.(s,n)??`${s} ${n}`;return d.jsx("button",{ref:a,className:l,...o,children:e})});Q.displayName="Button";const W=k.forwardRef(({children:e,className:t="",...r},n)=>d.jsx("div",{ref:n,className:t,...r,children:e})),te=({children:e,className:t="",...r})=>d.jsx("span",{className:t,...r,children:e}),fn=({children:e,className:t="",...r})=>d.jsx("svg",{className:t,...r,children:e}),xt=k.forwardRef(({label:e,error:t,className:r="",onChange:n,onKeyPress:o,value:a,defaultValue:s,type:l="text",checked:g,defaultChecked:h,...c},i)=>{const u=l==="radio"||l==="checkbox",f=k.useRef(!1),p=k.useRef(null);k.useImperativeHandle(i,()=>p.current);const[m,w]=k.useState(a??s??"");k.useEffect(()=>{!u&&!f.current&&a!==void 0&&w(a)},[a,u]);const x=k.useCallback(()=>{f.current=!0},[]),A=k.useCallback(y=>{if(f.current=!1,n){const N=y.target.value;w(N);const M=new Event("change",{bubbles:!0});Object.defineProperty(M,"target",{writable:!1,value:{value:N}}),Object.defineProperty(M,"currentTarget",{writable:!1,value:{value:N}}),n(M)}},[n]),v=k.useCallback(y=>{const N=y.target.value;w(N),!f.current&&n&&n(y)},[n]),E=k.useCallback(y=>{f.current||o&&o(y)},[o]),{loadingactions:O,formdata:_,...I}=c;if(u)return d.jsx("input",{ref:p,type:l,className:r,onChange:n,checked:g,defaultChecked:h,value:a,...I});const C=a!==void 0?{value:m}:{defaultValue:s};return d.jsx("input",{ref:p,type:l,className:r,onChange:v,onKeyPress:E,onCompositionStart:x,onCompositionEnd:A,...C,...I})});xt.displayName="Input";const Ga=k.forwardRef(({accept:e,maxSize:t,onChange:r,onError:n,buttonText:o="Browse",placeholder:a="No file selected",className:s="",disabled:l,...g},h)=>{const c=k.useRef(null),i=h||c,[u,f]=k.useState(""),p={},m={};Object.entries(g).forEach(([v,E])=>{v.startsWith("data-editor-")||v==="id"||v==="onMouseMove"||v==="onMouseLeave"?p[v]=E:m[v]=E});const w=k.useCallback(()=>{!l&&i.current&&i.current.click()},[l,i]),x=k.useCallback(v=>{const E=v.target.files?.[0]||null;if(!E){f(""),r?.(null);return}if(t&&E.size>t*1024*1024){const O=`File size exceeds ${t}MB limit`;n?.(O),i.current&&(i.current.value=""),f("");return}f(E.name),r?.(E)},[t,r,n,i]),A=k.useCallback(v=>{v.stopPropagation(),i.current&&(i.current.value=""),f(""),r?.(null)},[r,i]);return d.jsxs(W,{className:`flex items-center gap-2 ${s}`,...p,children:[d.jsx(xt,{ref:i,type:"file",accept:e,onChange:x,disabled:l,className:"hidden",...m}),d.jsx(Q,{type:"button",onClick:w,disabled:l,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:o}),d.jsx(te,{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:u||a}),u&&!l&&d.jsx(Q,{type:"button",onClick:A,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:d.jsx(fn,{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Ga.displayName="FileInput";var Je=(e=>(e.User="fa-user",e.Users="fa-users",e.UserCircle="fa-user-circle",e.UserPlus="fa-user-plus",e.UserMinus="fa-user-minus",e.UserShield="fa-user-shield",e.Search="fa-search",e.Edit="fa-edit",e.Pencil="fa-pencil-alt",e.Trash="fa-trash",e.Save="fa-save",e.Plus="fa-plus",e.Minus="fa-minus",e.Check="fa-check",e.Times="fa-times",e.Download="fa-download",e.Upload="fa-upload",e.Copy="fa-copy",e.ExternalLink="fa-external-link-alt",e.Home="fa-home",e.ChevronLeft="fa-chevron-left",e.ChevronRight="fa-chevron-right",e.ChevronUp="fa-chevron-up",e.ChevronDown="fa-chevron-down",e.AngleLeft="fa-angle-left",e.AngleRight="fa-angle-right",e.AngleUp="fa-angle-up",e.AngleDown="fa-angle-down",e.ArrowUp="fa-arrow-up",e.ArrowDown="fa-arrow-down",e.ArrowLeft="fa-arrow-left",e.ArrowRight="fa-arrow-right",e.Bars="fa-bars",e.EllipsisVertical="fa-ellipsis-v",e.EllipsisHorizontal="fa-ellipsis-h",e.CheckCircle="fa-check-circle",e.TimesCircle="fa-times-circle",e.ExclamationCircle="fa-exclamation-circle",e.ExclamationTriangle="fa-exclamation-triangle",e.InfoCircle="fa-info-circle",e.QuestionCircle="fa-question-circle",e.XCircle="fa-times-circle",e.ShoppingCart="fa-shopping-cart",e.ShoppingBag="fa-shopping-bag",e.CreditCard="fa-credit-card",e.Tag="fa-tag"Line truncated
var SirsoftBasic=(function(J,d,k,Jt){"use strict";function Mc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const T=Mc(k),Oc=()=>window.G7Core,Q=k.forwardRef(({children:e,variant:t="primary",size:r="md",className:n="",...o},a)=>{const s="inline-flex items-center justify-center",l=Oc()?.style?.mergeClasses?.(s,n)??`${s} ${n}`;return d.jsx("button",{ref:a,className:l,...o,children:e})});Q.displayName="Button";const W=k.forwardRef(({children:e,className:t="",...r},n)=>d.jsx("div",{ref:n,className:t,...r,children:e})),te=({children:e,className:t="",...r})=>d.jsx("span",{className:t,...r,children:e}),fn=({children:e,className:t="",...r})=>d.jsx("svg",{className:t,...r,children:e}),xt=k.forwardRef(({label:e,error:t,className:r="",onChange:n,onKeyPress:o,value:a,defaultValue:s,type:l="text",checked:g,defaultChecked:h,...c},i)=>{const u=l==="radio"||l==="checkbox",f=k.useRef(!1),p=k.useRef(null);k.useImperativeHandle(i,()=>p.current);const[m,w]=k.useState(a??s??"");k.useEffect(()=>{!u&&!f.current&&a!==void 0&&w(a)},[a,u]);const x=k.useCallback(()=>{f.current=!0},[]),A=k.useCallback(y=>{if(f.current=!1,n){const N=y.target.value;w(N);const M=new Event("change",{bubbles:!0});Object.defineProperty(M,"target",{writable:!1,value:{value:N}}),Object.defineProperty(M,"currentTarget",{writable:!1,value:{value:N}}),n(M)}},[n]),v=k.useCallback(y=>{const N=y.target.value;w(N),!f.current&&n&&n(y)},[n]),E=k.useCallback(y=>{f.current||o&&o(y)},[o]),{loadingactions:O,formdata:_,...I}=c;if(u)return d.jsx("input",{ref:p,type:l,className:r,onChange:n,checked:g,defaultChecked:h,value:a,...I});const C=a!==void 0?{value:m}:{defaultValue:s};return d.jsx("input",{ref:p,type:l,className:r,onChange:v,onKeyPress:E,onCompositionStart:x,onCompositionEnd:A,...C,...I})});xt.displayName="Input";const Ga=k.forwardRef(({accept:e,maxSize:t,onChange:r,onError:n,buttonText:o="Browse",placeholder:a="No file selected",className:s="",disabled:l,...g},h)=>{const c=k.useRef(null),i=h||c,[u,f]=k.useState(""),p={},m={};Object.entries(g).forEach(([v,E])=>{v.startsWith("data-editor-")||v==="id"||v==="onMouseMove"||v==="onMouseLeave"?p[v]=E:m[v]=E});const w=k.useCallback(()=>{!l&&i.current&&i.current.click()},[l,i]),x=k.useCallback(v=>{const E=v.target.files?.[0]||null;if(!E){f(""),r?.(null);return}if(t&&E.size>t*1024*1024){const O=`File size exceeds ${t}MB limit`;n?.(O),i.current&&(i.current.value=""),f("");return}f(E.name),r?.(E)},[t,r,n,i]),A=k.useCallback(v=>{v.stopPropagation(),i.current&&(i.current.value=""),f(""),r?.(null)},[r,i]);return d.jsxs(W,{className:`flex items-center gap-2 ${s}`,...p,children:[d.jsx(xt,{ref:i,type:"file",accept:e,onChange:x,disabled:l,className:"hidden",...m}),d.jsx(Q,{type:"button",onClick:w,disabled:l,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:o}),d.jsx(te,{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:u||a}),u&&!l&&d.jsx(Q,{type:"button",onClick:A,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:d.jsx(fn,{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Ga.displayName="FileInput";var Je=(e=>(e.User="fa-user",e.Users="fa-users",e.UserCircle="fa-user-circle",e.UserPlus="fa-user-plus",e.UserMinus="fa-user-minus",e.UserShield="fa-user-shield",e.Search="fa-search",e.Edit="fa-edit",e.Pencil="fa-pencil-alt",e.Trash="fa-trash",e.Save="fa-save",e.Plus="fa-plus",e.Minus="fa-minus",e.Check="fa-check",e.Times="fa-times",e.Download="fa-download",e.Upload="fa-upload",e.Copy="fa-copy",e.ExternalLink="fa-external-link-alt",e.Home="fa-home",e.ChevronLeft="fa-chevron-left",e.ChevronRight="fa-chevron-right",e.ChevronUp="fa-chevron-up",e.ChevronDown="fa-chevron-down",e.AngleLeft="fa-angle-left",e.AngleRight="fa-angle-right",e.AngleUp="fa-angle-up",e.AngleDown="fa-angle-down",e.ArrowUp="fa-arrow-up",e.ArrowDown="fa-arrow-down",e.ArrowLeft="fa-arrow-left",e.ArrowRight="fa-arrow-right",e.Bars="fa-bars",e.EllipsisVertical="fa-ellipsis-v",e.EllipsisHorizontal="fa-ellipsis-h",e.CheckCircle="fa-check-circle",e.TimesCircle="fa-times-circle",e.ExclamationCircle="fa-exclamation-circle",e.ExclamationTriangle="fa-exclamation-triangle",e.InfoCircle="fa-info-circle",e.QuestionCircle="fa-question-circle",e.XCircle="fa-times-circle",e.ShoppingCart="fa-shopping-cart",e.ShoppingBag="fa-shopping-bag",e.CreditCard="fa-credit-card",e.Tag="fa-tag"Line truncated
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${g==="auto"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[d.jsx(de,{name:Je.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(te,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),g==="auto"&&d.jsx(de,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),d.jsxs(Q,{onClick:()=>f("light"),className:`
`,children:[d.jsx(ce,{name:Je.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(te,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),g==="auto"&&d.jsx(ce,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),d.jsxs(Q,{onClick:()=>f("light"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${g==="light"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[d.jsx(de,{name:Je.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(te,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),g==="light"&&d.jsx(de,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),d.jsxs(Q,{onClick:()=>f("dark"),className:`
`,children:[d.jsx(ce,{name:Je.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(te,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),g==="light"&&d.jsx(ce,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),d.jsxs(Q,{onClick:()=>f("dark"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${g==="dark"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[d.jsx(de,{name:Je.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(te,{className:"flex-1 text-left text-gray-900 dark:text-white",children:o}),g==="dark"&&d.jsx(de,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},qc=Object.freeze(Object.defineProperty({__proto__:null,ThemeToggle:hn,default:hn},Symbol.toStringTag,{value:"Module"})),Za={xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-16 h-16 text-xl","2xl":"w-24 h-24 text-2xl","3xl":"w-32 h-32 text-3xl","4xl":"w-40 h-40 text-4xl","5xl":"w-48 h-48 text-5xl"},Zc="rounded-full overflow-hidden flex-shrink-0 border border-gray-200 dark:border-gray-700",Qc="grayscale opacity-50",co={normal:"bg-gradient-to-br from-blue-500 to-purple-600",withdrawn:"bg-gray-300 dark:bg-gray-600",guest:"bg-gray-200 dark:bg-gray-700"},$r=({author:e,name:t,avatar:r,size:n="md",className:o="",text:a,isWithdrawn:s=!1,isGuest:l=!1,id:g,editorAttrs:h})=>{const c=r??e?.avatar,i=a??t??e?.name??"?",u=s||e?.status==="withdrawn",f=l||e?.is_guest||!1,p=k.useMemo(()=>[Za[n]||Za.md,Zc,u?Qc:"",o].filter(Boolean).join(" "),[n,u,o]),m=f?co.guest:u?co.withdrawn:co.normal,w=()=>f?d.jsx(W,{className:`w-full h-full flex items-center justify-center ${m}`,children:d.jsx(de,{name:"user",className:"text-gray-400 dark:text-gray-500"})}):u?d.jsx(W,{className:`w-full h-full flex items-center justify-center ${m}`,children:d.jsx(de,{name:"user",className:"text-gray-500 dark:text-gray-400"})}):d.jsx(W,{className:`w-full h-full flex items-center justify-center text-white font-semibold ${m}`,children:i.charAt(0).toUpperCase()});return d.jsx(W,{className:p,id:g,...h,children:c&&!f&&!u?d.jsx(Lt,{src:c,alt:i,className:"w-full h-full object-cover"}):w()})},Jc=Object.freeze(Object.defineProperty({__proto__:null,Avatar:$r},Symbol.toStringTag,{value:"Module"})),Rc=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log("[Comp:SlotContainer]",...e),warn:(...e)=>console.warn("[Comp:SlotContainer]",...e),error:(...e)=>console.error("[Comp:SlotContainer]",...e)};function Qa(e,t){return t&&e&&typeof e.id=="string"&&e.id.length>0?{...e,id:`${e.id}__${t}`}:e}const pn=({slotId:e,className:t="",emptyContent:r,style:n,id:o,children:a})=>{const[s,l]=k.useState([]),[,g]=k.useState({}),h=k.useCallback(()=>{const p=window.__slotContextValue;if(p)return p;const m=window.G7Core;return m&&m.getSlotContext?.()||null},[]),c=k.useCallback(()=>{const p=h();p&&p.isEnabled&&l(p.getSlotComponents(e))},[e,h]);k.useEffect(()=>{const p=h();return!p||!p.isEnabled?void 0:(c(),p.subscribeToSlot(e,()=>{c(),g({})}))},[e,h,c]);const i=k.useCallback(()=>{const p=window.G7Core;return p?p.getDynamicRenderer?.():null},[]);if(s.length===0)return r?d.jsx(W,{className:t,style:n,id:o,children:r}):a?d.jsx(W,{className:t,style:n,id:o,children:a}):null;const u=i(),f=window.G7Core;return!u||!f?(Rc.error("G7Core or DynamicRenderer not available"),null):d.jsxs(W,{className:t,style:n,id:o,children:[s.map(p=>{const{componentDef:m,dataContext:w,parentFormContext:x,getParentComponentContext:A,translationContext:v}=p,E=Qa(m,o);return d.jsx(u,{componentDef:E,dataContext:w,translationContext:v,registry:f.getComponentRegistry(),bindingEngine:f.getDataBindingEngine(),translationEngine:f.getTranslationEngine(),actionDispatcher:f.getActionDispatcher(),parentComponentContext:A?.(),parentFormContextProp:x,isRootRenderer:!1},E.id||`slot-${e}-${p.order}`)}),a]})},ed=Object.freeze(Object.defineProperty({__proto__:null,SlotContainer:pn,default:pn,scopeSlotChildDef:Qa},Symbol.toStringTag,{value:"Module"})),mn=({notifications:e=[],unreadCount:t=0,hasMore:r=!1,loading:n=!1,titleText:o="알림",emptyText:a="알림이 없습니다.",markAllReadText:s="모두 읽음",deleteAllText:l="모두 삭제",unreadOnlyText:g="안 읽은 알림만",unreadOnly:h=!1,onNotificationClick:c,onClose:i,onLoadMore:u,onMarkAllRead:f,onDeleteAll:p,onDelete:m,onUnreadOnlyToggle:w,dropdownAlign:x="right",className:A="",id:v,editorAttrs:E})=>{const[O,_]=k.useState(!1),I=k.useRef(null),C=k.useRef(null),y=k.useRef(null),N=k.useRef(null),M=k.useRef(new Set),P=k.useRef(u),D=k.useRef(r),L=k.useRef(n),$=k.useRef(e.length),S=k.useRef(-1);k.useEffect(()=>{P.current=u,D.current=r,L.current=n,$.current=e.length}),k.useEffect(()=>{if(!N.current||!y.current||!O)return;S.current=-1;const G=new IntersectionObserver(([Y])=>{Y.isIntersecting&&(L.current||!D.current||S.current!==$.current&&(S.current=$.current,P.current?.()))},{root:y.current,threshold:.1});return G.observe(N.current),()=>G.disconnect()},[O]),k.useEffect(()=>{if(!y.current||!O)return;const G=new IntersectionObserver(B=>{B.forEach(V=>{const j=V.target.getAttribute("data-notification-id"),H=V.target.getAttribute("data-unread")==="true";j&&H&&V.isIntersecting&&M.current.add(j)})},{root:y.current,threshold:.5});return y.current.querySelectorAll("[data-notification-id]").forEach(B=>G.observe(B)),()=>G.disconnect()},[O, Line truncated
`+wt),Ge&&bn([P,D,L],Qt=>{wt=Hr(wt,Qt," ")}),E&&Le?E.createHTML(wt):wt},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qe(ge),Me=!0},t.clearConfig=function(){Be=null,Me=!1},t.isValidAttribute=function(ge,z,Z){Be||qe({});const ce=Fe(ge),Ye=Fe(z);return _c(ce,Ye,Z)},t.addHook=function(ge,z){typeof z=="function"&&zr(M[ge],z)},t.removeHook=function(ge,z){if(z!==void 0){const Z=ud(M[ge],z);return Z===-1?void 0:fd(M[ge],Z,1)[0]}return os(M[ge])},t.removeHooks=function(ge){M[ge]=[]},t.removeAllHooks=function(){M=fs()},t}var hs=gs();const Ad=()=>{const e=()=>{const n=window.G7Core?.state?.get?.();return n&&n.preferredCurrency||"KRW"},[t,r]=k.useState(e);return k.useEffect(()=>{const n=window.G7Core?.state?.subscribe;if(r(e()),typeof n!="function")return;const o=n(a=>{r(a&&a.preferredCurrency||"KRW")});return typeof o=="function"?o:void 0},[]),t},Md=e=>{window.G7Core?.dispatch?.({handler:"navigate",params:{path:e}})},Od=e=>{const t=Math.round(e*2)/2;return[1,2,3,4,5].map(r=>t>=r?"full":t>=r-.5?"half":"empty")},ps=({product:e,onClick:t,shopBase:r="/shop",className:n="",id:o,editorAttrs:a})=>{const s=Ad(),l=A=>{const v=`multi_currency_${A}`,E=e[v];if(E&&E[s])return E[s].formatted;const O=`${A}_formatted`;return e[O]},g=e.name_localized??(typeof e.name=="string"?e.name:"")??"",h=l("selling_price"),c=l("list_price"),i=e.discount_rate&&e.discount_rate>0,u=e.sales_status&&e.sales_status!=="on_sale",f=e.labels??[],p=A=>hs.sanitize(A,{ALLOWED_TAGS:["mark"],ALLOWED_ATTR:[]}),m=e.name_highlighted,w=e.description_highlighted??e.short_description,x=()=>{if(t)t(e.id);else{const A=r==="/"?"":r,v=e.product_code??e.id;Md(`${A}/products/${v}`)}};return d.jsxs(Q,{onClick:x,className:`block w-full text-left group bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-shadow cursor-pointer ${n}`,id:o,...a,children:[d.jsxs(W,{className:"relative aspect-square overflow-hidden bg-gray-100 dark:bg-gray-700",children:[d.jsx(Lt,{src:e.thumbnail_url,alt:g,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200",loading:"lazy"}),u&&d.jsx(W,{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:d.jsx(te,{className:`text-lg font-bold ${e.sales_status==="sold_out"?"text-red-300":e.sales_status==="suspended"?"text-amber-300":"text-blue-300"}`,style:{textShadow:"0 1px 4px rgba(0,0,0,0.6)"},children:e.sales_status_label??e.sales_status})}),i&&e.sales_status!=="sold_out"&&e.sales_status!=="suspended"&&d.jsxs(te,{className:"absolute top-2 left-2 px-2 py-1 bg-red-500 text-white text-xs font-bold rounded",children:[e.discount_rate,"%"]}),f.length>0&&d.jsx(W,{className:"absolute bottom-2 right-2 flex gap-1 flex-wrap justify-end",children:f.map((A,v)=>d.jsx(te,{className:"text-xs text-white font-medium px-1.5 py-0.5 rounded",style:{backgroundColor:A.color||"#6b7280"},children:A.name},v))})]}),d.jsxs(W,{className:"p-4",children:[d.jsxs(W,{className:"flex items-center gap-1.5 flex-wrap",children:[e.primary_category&&d.jsx(te,{className:"inline-block text-xs font-medium text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30 px-2 py-0.5 rounded",children:e.primary_category}),e.brand_name&&d.jsx(te,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.brand_name})]}),m?d.jsx(W,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:p(m)}}):d.jsx(gn,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1",children:g}),w&&d.jsx(W,{className:"mt-1 text-sm text-gray-600 dark:text-gray-400 line-clamp-2 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:p(w)}}),d.jsxs(W,{className:"mt-1.5 flex items-center gap-1",children:[Od(e.rating_avg??0).map((A,v)=>d.jsxs(te,{className:`text-xs ${A==="empty"?"text-gray-300 dark:text-gray-600":"text-yellow-400"}`,children:[A==="full"&&d.jsx("i",{className:"fa-solid fa-star"}),A==="half"&&d.jsx("i",{className:"fa-solid fa-star-half-stroke"}),A==="empty"&&d.jsx("i",{className:"fa-regular fa-star"})]},v)),d.jsx(te,{className:"text-xs text-gray-600 dark:text-gray-400 ml-0.5",children:(e.rating_avg??0).toFixed(1)}),d.jsxs(te,{className:"text-xs text-gray-400 dark:text-gray-500",children:["(",e.review_count??0,")"]})]}),d.jsxs(W,{className:"mt-2 flex items-baseline gap-2",children:[d.jsx(te,{className:"font-bold text-gray-900 dark:text-white",children:h}),c&&i&&d.jsx(te,{className:"text-sm text-gray-500 dark:text-gray-400 line-through",children:c})]})]})]})},Id=Object.freeze(Object.defineProperty({__proto__:null,default:ps},Symbol.toStringTag,{value:"Module"})),ms="carousel",Wr="controller",Dd="navigation",Ld="no-scroll",wo="portal",Pd="root",bs="toolbar",Fd="counter",Kr="fullscreen",ys="slideshow",Vr="thumbnails",vs="zoom" Line truncated
`,children:[d.jsx(ce,{name:Je.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(te,{className:"flex-1 text-left text-gray-900 dark:text-white",children:o}),g==="dark"&&d.jsx(ce,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},qc=Object.freeze(Object.defineProperty({__proto__:null,ThemeToggle:hn,default:hn},Symbol.toStringTag,{value:"Module"})),Za={xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-16 h-16 text-xl","2xl":"w-24 h-24 text-2xl","3xl":"w-32 h-32 text-3xl","4xl":"w-40 h-40 text-4xl","5xl":"w-48 h-48 text-5xl"},Zc="rounded-full overflow-hidden flex-shrink-0 border border-gray-200 dark:border-gray-700",Qc="grayscale opacity-50",co={normal:"bg-gradient-to-br from-blue-500 to-purple-600",withdrawn:"bg-gray-300 dark:bg-gray-600",guest:"bg-gray-200 dark:bg-gray-700"},$r=({author:e,name:t,avatar:r,size:n="md",className:o="",text:a,isWithdrawn:s=!1,isGuest:l=!1,id:g,editorAttrs:h})=>{const c=r??e?.avatar,i=a??t??e?.name??"?",u=s||e?.status==="withdrawn",f=l||e?.is_guest||!1,p=k.useMemo(()=>[Za[n]||Za.md,Zc,u?Qc:"",o].filter(Boolean).join(" "),[n,u,o]),m=f?co.guest:u?co.withdrawn:co.normal,w=()=>f?d.jsx(W,{className:`w-full h-full flex items-center justify-center ${m}`,children:d.jsx(ce,{name:"user",className:"text-gray-400 dark:text-gray-500"})}):u?d.jsx(W,{className:`w-full h-full flex items-center justify-center ${m}`,children:d.jsx(ce,{name:"user",className:"text-gray-500 dark:text-gray-400"})}):d.jsx(W,{className:`w-full h-full flex items-center justify-center text-white font-semibold ${m}`,children:i.charAt(0).toUpperCase()});return d.jsx(W,{className:p,id:g,...h,children:c&&!f&&!u?d.jsx(Lt,{src:c,alt:i,className:"w-full h-full object-cover"}):w()})},Jc=Object.freeze(Object.defineProperty({__proto__:null,Avatar:$r},Symbol.toStringTag,{value:"Module"})),Rc=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log("[Comp:SlotContainer]",...e),warn:(...e)=>console.warn("[Comp:SlotContainer]",...e),error:(...e)=>console.error("[Comp:SlotContainer]",...e)};function Qa(e,t){return t&&e&&typeof e.id=="string"&&e.id.length>0?{...e,id:`${e.id}__${t}`}:e}const pn=({slotId:e,className:t="",emptyContent:r,style:n,id:o,children:a})=>{const[s,l]=k.useState([]),[,g]=k.useState({}),h=k.useCallback(()=>{const p=window.__slotContextValue;if(p)return p;const m=window.G7Core;return m&&m.getSlotContext?.()||null},[]),c=k.useCallback(()=>{const p=h();p&&p.isEnabled&&l(p.getSlotComponents(e))},[e,h]);k.useEffect(()=>{const p=h();return!p||!p.isEnabled?void 0:(c(),p.subscribeToSlot(e,()=>{c(),g({})}))},[e,h,c]);const i=k.useCallback(()=>{const p=window.G7Core;return p?p.getDynamicRenderer?.():null},[]);if(s.length===0)return r?d.jsx(W,{className:t,style:n,id:o,children:r}):a?d.jsx(W,{className:t,style:n,id:o,children:a}):null;const u=i(),f=window.G7Core;return!u||!f?(Rc.error("G7Core or DynamicRenderer not available"),null):d.jsxs(W,{className:t,style:n,id:o,children:[s.map(p=>{const{componentDef:m,dataContext:w,parentFormContext:x,getParentComponentContext:A,translationContext:v}=p,E=Qa(m,o);return d.jsx(u,{componentDef:E,dataContext:w,translationContext:v,registry:f.getComponentRegistry(),bindingEngine:f.getDataBindingEngine(),translationEngine:f.getTranslationEngine(),actionDispatcher:f.getActionDispatcher(),parentComponentContext:A?.(),parentFormContextProp:x,isRootRenderer:!1},E.id||`slot-${e}-${p.order}`)}),a]})},ed=Object.freeze(Object.defineProperty({__proto__:null,SlotContainer:pn,default:pn,scopeSlotChildDef:Qa},Symbol.toStringTag,{value:"Module"})),mn=({notifications:e=[],unreadCount:t=0,hasMore:r=!1,loading:n=!1,titleText:o="알림",emptyText:a="알림이 없습니다.",markAllReadText:s="모두 읽음",deleteAllText:l="모두 삭제",unreadOnlyText:g="안 읽은 알림만",unreadOnly:h=!1,onNotificationClick:c,onClose:i,onLoadMore:u,onMarkAllRead:f,onDeleteAll:p,onDelete:m,onUnreadOnlyToggle:w,dropdownAlign:x="right",className:A="",id:v,editorAttrs:E})=>{const[O,_]=k.useState(!1),I=k.useRef(null),C=k.useRef(null),y=k.useRef(null),N=k.useRef(null),M=k.useRef(new Set),P=k.useRef(u),D=k.useRef(r),L=k.useRef(n),$=k.useRef(e.length),S=k.useRef(-1);k.useEffect(()=>{P.current=u,D.current=r,L.current=n,$.current=e.length}),k.useEffect(()=>{if(!N.current||!y.current||!O)return;S.current=-1;const G=new IntersectionObserver(([Y])=>{Y.isIntersecting&&(L.current||!D.current||S.current!==$.current&&(S.current=$.current,P.current?.()))},{root:y.current,threshold:.1});return G.observe(N.current),()=>G.disconnect()},[O]),k.useEffect(()=>{if(!y.current||!O)return;const G=new IntersectionObserver(B=>{B.forEach(V=>{const j=V.target.getAttribute("data-notification-id"),H=V.target.getAttribute("data-unread")==="true";j&&H&&V.isIntersecting&&M.current.add(j)})},{root:y.current,threshold:.5});return y.current.querySelectorAll("[data-notification-id]").forEach(B=>G.observe(B)),()=>G.disconnect()},[O, Line truncated
`+wt),Ge&&bn([P,D,L],Qt=>{wt=Hr(wt,Qt," ")}),E&&Le?E.createHTML(wt):wt},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qe(ge),Me=!0},t.clearConfig=function(){Be=null,Me=!1},t.isValidAttribute=function(ge,z,Z){Be||qe({});const ie=Fe(ge),Ye=Fe(z);return _c(ie,Ye,Z)},t.addHook=function(ge,z){typeof z=="function"&&zr(M[ge],z)},t.removeHook=function(ge,z){if(z!==void 0){const Z=ud(M[ge],z);return Z===-1?void 0:fd(M[ge],Z,1)[0]}return os(M[ge])},t.removeHooks=function(ge){M[ge]=[]},t.removeAllHooks=function(){M=fs()},t}var hs=gs();const Ad=()=>{const e=()=>{const n=window.G7Core?.state?.get?.();return n&&n.preferredCurrency||"KRW"},[t,r]=k.useState(e);return k.useEffect(()=>{const n=window.G7Core?.state?.subscribe;if(r(e()),typeof n!="function")return;const o=n(a=>{r(a&&a.preferredCurrency||"KRW")});return typeof o=="function"?o:void 0},[]),t},Md=e=>{window.G7Core?.dispatch?.({handler:"navigate",params:{path:e}})},Od=e=>{const t=Math.round(e*2)/2;return[1,2,3,4,5].map(r=>t>=r?"full":t>=r-.5?"half":"empty")},ps=({product:e,onClick:t,shopBase:r="/shop",className:n="",id:o,editorAttrs:a})=>{const s=Ad(),l=A=>{const v=`multi_currency_${A}`,E=e[v];if(E&&E[s])return E[s].formatted;const O=`${A}_formatted`;return e[O]},g=e.name_localized??(typeof e.name=="string"?e.name:"")??"",h=l("selling_price"),c=l("list_price"),i=e.discount_rate&&e.discount_rate>0,u=e.sales_status&&e.sales_status!=="on_sale",f=e.labels??[],p=A=>hs.sanitize(A,{ALLOWED_TAGS:["mark"],ALLOWED_ATTR:[]}),m=e.name_highlighted,w=e.description_highlighted??e.short_description,x=()=>{t?t(e.id):Md(`${r==="/"?"":r}/products/${e.id}`)};return d.jsxs(Q,{onClick:x,className:`block w-full text-left group bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-shadow cursor-pointer ${n}`,id:o,...a,children:[d.jsxs(W,{className:"relative aspect-square overflow-hidden bg-gray-100 dark:bg-gray-700",children:[d.jsx(Lt,{src:e.thumbnail_url,alt:g,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200",loading:"lazy"}),u&&d.jsx(W,{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:d.jsx(te,{className:`text-lg font-bold ${e.sales_status==="sold_out"?"text-red-300":e.sales_status==="suspended"?"text-amber-300":"text-blue-300"}`,style:{textShadow:"0 1px 4px rgba(0,0,0,0.6)"},children:e.sales_status_label??e.sales_status})}),i&&e.sales_status!=="sold_out"&&e.sales_status!=="suspended"&&d.jsxs(te,{className:"absolute top-2 left-2 px-2 py-1 bg-red-500 text-white text-xs font-bold rounded",children:[e.discount_rate,"%"]}),f.length>0&&d.jsx(W,{className:"absolute bottom-2 right-2 flex gap-1 flex-wrap justify-end",children:f.map((A,v)=>d.jsx(te,{className:"text-xs text-white font-medium px-1.5 py-0.5 rounded",style:{backgroundColor:A.color||"#6b7280"},children:A.name},v))})]}),d.jsxs(W,{className:"p-4",children:[d.jsxs(W,{className:"flex items-center gap-1.5 flex-wrap",children:[e.primary_category&&d.jsx(te,{className:"inline-block text-xs font-medium text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30 px-2 py-0.5 rounded",children:e.primary_category}),e.brand_name&&d.jsx(te,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.brand_name})]}),m?d.jsx(W,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:p(m)}}):d.jsx(gn,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1",children:g}),w&&d.jsx(W,{className:"mt-1 text-sm text-gray-600 dark:text-gray-400 line-clamp-2 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:p(w)}}),d.jsxs(W,{className:"mt-1.5 flex items-center gap-1",children:[Od(e.rating_avg??0).map((A,v)=>d.jsxs(te,{className:`text-xs ${A==="empty"?"text-gray-300 dark:text-gray-600":"text-yellow-400"}`,children:[A==="full"&&d.jsx("i",{className:"fa-solid fa-star"}),A==="half"&&d.jsx("i",{className:"fa-solid fa-star-half-stroke"}),A==="empty"&&d.jsx("i",{className:"fa-regular fa-star"})]},v)),d.jsx(te,{className:"text-xs text-gray-600 dark:text-gray-400 ml-0.5",children:(e.rating_avg??0).toFixed(1)}),d.jsxs(te,{className:"text-xs text-gray-400 dark:text-gray-500",children:["(",e.review_count??0,")"]})]}),d.jsxs(W,{className:"mt-2 flex items-baseline gap-2",children:[d.jsx(te,{className:"font-bold text-gray-900 dark:text-white",children:h}),c&&i&&d.jsx(te,{className:"text-sm text-gray-500 dark:text-gray-400 line-through",children:c})]})]})]})},Id=Object.freeze(Object.defineProperty({__proto__:null,default:ps},Symbol.toStringTag,{value:"Module"})),ms="carousel",Wr="controller",Dd="navigation",Ld="no-scroll",wo="portal",Pd="root",bs="toolbar",Fd="counter",Kr="fullscreen",ys="slideshow",Vr="thumbnails",vs="zoom",vr="loading",xo="playing",Yr="error",X Line truncated
inline-flex items-center rounded-full border transition-colors
${g[o]}
${p?`${u.activeColor} border-transparent`:"border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}
@@ -39,7 +39,7 @@ var SirsoftBasic=(function(J,d,k,Jt){"use strict";function Mc(e){const t=Object.
[&_tr:hover]:bg-gray-50 dark:[&_tr:hover]:bg-gray-700/50
after:content-[''] after:block after:clear-both
${n}
`.trim().replace(/\s+/g," ");return d.jsx(W,{id:a,className:c,dangerouslySetInnerHTML:{__html:h},...s})},Wf=Object.freeze(Object.defineProperty({__proto__:null,HtmlContent:Yo},Symbol.toStringTag,{value:"Module"})),Xo=()=>window.G7Core,qo=(e,t)=>Xo()?.t?.(e,t)??e,Dl=({content:e="",onChange:t,isHtml:r=!1,onIsHtmlChange:n,rows:o=15,placeholder:a="",label:s,showHtmlModeToggle:l=!0,contentClassName:g="",purifyConfig:h,className:c="",name:i="content",htmlFieldName:u="content_mode",readOnly:f=!1,id:p,editorAttrs:m})=>{const[w,x]=k.useState(r),[A,v]=k.useState(e),[E,O]=k.useState(!1);k.useEffect(()=>{x(r)},[r]),k.useEffect(()=>{v(e)},[e]);const _=k.useCallback(y=>{const N=y.target.value;if(v(N),t){const M=Xo()?.createChangeEvent?.({value:N,name:i,type:"textarea"})??{target:{name:i,value:N}};t(M)}},[t,i]),I=k.useCallback(y=>{const N=y.target.checked;if(x(N),N||O(!1),n){const M=Xo()?.createChangeEvent?.({checked:N,name:u,type:"checkbox"})??{target:{name:u,checked:N}};n(M)}},[n,u]),C=k.useCallback(()=>{O(y=>!y)},[]);return d.jsxs(W,{className:`space-y-2 ${c}`,id:p,...m,children:[d.jsxs(W,{className:"flex items-center justify-between",children:[s&&d.jsx(yr,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:s}),d.jsxs(W,{className:"flex items-center gap-3",children:[w&&!f&&d.jsx(Q,{type:"button",onClick:C,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${E?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:qo(E?"common.preview_off":"common.preview")}),l&&d.jsxs(yr,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[d.jsx(xt,{type:"checkbox",name:u,checked:w,onChange:I,disabled:f,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),d.jsx(W,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:qo("common.html_mode")})]})]})]}),!E&&d.jsx(no,{name:i,value:A,onChange:_,placeholder:a,rows:o,readOnly:f,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${w?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`}),E&&d.jsx(W,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:d.jsx(Yo,{content:A,isHtml:!0,className:g||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:h})})]})},Kf=Object.freeze(Object.defineProperty({__proto__:null,HtmlEditor:Dl},Symbol.toStringTag,{value:"Module"})),Ll=e=>window.G7Core?.t?.(e)??e,Zo=({maxHeight:e=500,expandText:t,collapseText:r,className:n="",children:o,id:a,editorAttrs:s})=>{const[l,g]=k.useState(!1),[h,c]=k.useState(!1),i=k.useRef(null),u=k.useCallback(()=>{if(i.current){const w=i.current.scrollHeight;c(w>e)}},[e]);k.useEffect(()=>{u();const w=i.current;if(!w)return;const x=w.querySelectorAll("img");x.forEach(v=>{v.complete||v.addEventListener("load",u)});let A=null;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(u),A.observe(w)),()=>{x.forEach(v=>{v.removeEventListener("load",u)}),A?.disconnect()}},[u,o]);const f=()=>{g(w=>!w)},p=t||Ll("sirsoft-ecommerce.shop.product.expand_detail"),m=r||Ll("sirsoft-ecommerce.shop.product.collapse_detail");return d.jsxs(W,{className:n,id:a,...s,children:[d.jsxs(W,{className:"relative",children:[d.jsx(W,{ref:i,className:!l&&h?"overflow-hidden transition-[max-height] duration-300 ease-in-out":"transition-[max-height] duration-300 ease-in-out",style:!l&&h?{maxHeight:`${e}px`}:void 0,children:o}),!l&&h&&d.jsx(W,{className:"absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-white dark:from-gray-900 to-transparent pointer-events-none"})]}),h&&d.jsxs(Q,{type:"button",onClick:f,className:"flex items-center justify-center w-full py-3.5 bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer gap-1.5",children:[d.jsx(te,{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:l?m:p}),d.jsx(de,{name:l?"chevron-up":"chevron-down",size:"sm"})]})]})},Vf=Object.freeze(Object.defineProperty({__proto__:null,ExpandableContent:Zo,default:Zo},Symbol.toStringTag,{value:"Module"})),Yf=(e,t)=>window.G7Core?.t?.(e,t)??e Line truncated
`.trim().replace(/\s+/g," ");return d.jsx(W,{id:a,className:c,dangerouslySetInnerHTML:{__html:h},...s})},Wf=Object.freeze(Object.defineProperty({__proto__:null,HtmlContent:Yo},Symbol.toStringTag,{value:"Module"})),Xo=()=>window.G7Core,qo=(e,t)=>Xo()?.t?.(e,t)??e,Dl=({content:e="",onChange:t,isHtml:r=!1,onIsHtmlChange:n,rows:o=15,placeholder:a="",label:s,showHtmlModeToggle:l=!0,contentClassName:g="",purifyConfig:h,className:c="",name:i="content",htmlFieldName:u="content_mode",readOnly:f=!1,id:p,editorAttrs:m})=>{const[w,x]=k.useState(r),[A,v]=k.useState(e),[E,O]=k.useState(!1);k.useEffect(()=>{x(r)},[r]),k.useEffect(()=>{v(e)},[e]);const _=k.useCallback(y=>{const N=y.target.value;if(v(N),t){const M=Xo()?.createChangeEvent?.({value:N,name:i,type:"textarea"})??{target:{name:i,value:N}};t(M)}},[t,i]),I=k.useCallback(y=>{const N=y.target.checked;if(x(N),N||O(!1),n){const M=Xo()?.createChangeEvent?.({checked:N,name:u,type:"checkbox"})??{target:{name:u,checked:N}};n(M)}},[n,u]),C=k.useCallback(()=>{O(y=>!y)},[]);return d.jsxs(W,{className:`space-y-2 ${c}`,id:p,...m,children:[d.jsxs(W,{className:"flex items-center justify-between",children:[s&&d.jsx(yr,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:s}),d.jsxs(W,{className:"flex items-center gap-3",children:[w&&!f&&d.jsx(Q,{type:"button",onClick:C,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${E?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:qo(E?"common.preview_off":"common.preview")}),l&&d.jsxs(yr,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[d.jsx(xt,{type:"checkbox",name:u,checked:w,onChange:I,disabled:f,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),d.jsx(W,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:qo("common.html_mode")})]})]})]}),!E&&d.jsx(no,{name:i,value:A,onChange:_,placeholder:a,rows:o,readOnly:f,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${w?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`}),E&&d.jsx(W,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:d.jsx(Yo,{content:A,isHtml:!0,className:g||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:h})})]})},Kf=Object.freeze(Object.defineProperty({__proto__:null,HtmlEditor:Dl},Symbol.toStringTag,{value:"Module"})),Ll=e=>window.G7Core?.t?.(e)??e,Zo=({maxHeight:e=500,expandText:t,collapseText:r,className:n="",children:o,id:a,editorAttrs:s})=>{const[l,g]=k.useState(!1),[h,c]=k.useState(!1),i=k.useRef(null),u=k.useCallback(()=>{if(i.current){const w=i.current.scrollHeight;c(w>e)}},[e]);k.useEffect(()=>{u();const w=i.current;if(!w)return;const x=w.querySelectorAll("img");x.forEach(v=>{v.complete||v.addEventListener("load",u)});let A=null;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(u),A.observe(w)),()=>{x.forEach(v=>{v.removeEventListener("load",u)}),A?.disconnect()}},[u,o]);const f=()=>{g(w=>!w)},p=t||Ll("sirsoft-ecommerce.shop.product.expand_detail"),m=r||Ll("sirsoft-ecommerce.shop.product.collapse_detail");return d.jsxs(W,{className:n,id:a,...s,children:[d.jsxs(W,{className:"relative",children:[d.jsx(W,{ref:i,className:!l&&h?"overflow-hidden transition-[max-height] duration-300 ease-in-out":"transition-[max-height] duration-300 ease-in-out",style:!l&&h?{maxHeight:`${e}px`}:void 0,children:o}),!l&&h&&d.jsx(W,{className:"absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-white dark:from-gray-900 to-transparent pointer-events-none"})]}),h&&d.jsxs(Q,{type:"button",onClick:f,className:"flex items-center justify-center w-full py-3.5 bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer gap-1.5",children:[d.jsx(te,{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:l?m:p}),d.jsx(ce,{name:l?"chevron-up":"chevron-down",size:"sm"})]})]})},Vf=Object.freeze(Object.defineProperty({__proto__:null,ExpandableContent:Zo,default:Zo},Symbol.toStringTag,{value:"Module"})),Yf=(e,t)=>window.G7Core?.t?.(e,t)??e Line truncated
let scriptImported = false
self.addEventListener('message', async (e) => {
const { file, id, imageCompressionLibUrl, options } = e.data
@@ -58,20 +58,20 @@ self.addEventListener('message', async (e) => {
self.postMessage({ error: e.message + '\\n' + e.stack, id })
}
})
`;let ra;function og(e,t){return new Promise(((r,n)=>{ra||(ra=(function(s){const l=[];return l.push(s),URL.createObjectURL(new Blob(l))})(ng));const o=new Worker(ra);o.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)o.terminate();else if(s.data.progress===void 0){if(s.data.error)return n(new Error(s.data.error)),void o.terminate();r(s.data.file),o.terminate()}else t.onProgress(s.data.progress)})),o.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function ct(e,t){return new Promise((function(r,n){let o,a,s,l,g,h;if(o={...t},s=0,{onProgress:l}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,g=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=f=>{s=f,typeof l=="function"&&l(s)},!(e instanceof Blob||e instanceof rg))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(h=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!g||typeof Worker!="function"||h)return Xl(e,o).then(function(f){try{return a=f,u.call(this)}catch(p){return n(p)}}.bind(this),n);var c=function(){try{return u.call(this)}catch(f){return n(f)}}.bind(this),i=function(f){try{return Xl(e,o).then((function(p){try{return a=p,c()}catch(m){return n(m)}}),n)}catch(p){return n(p)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",og(e,o).then((function(f){try{return a=f,c()}catch{return i()}}),i)}catch{i()}function u(){try{a.name=e.name,a.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=Ul(e,a))}catch{}return r(a)}}))}ct.getDataUrlFromFile=Gl,ct.getFilefromDataUrl=ta,ct.loadImage=jl,ct.drawImageInCanvas=Wl,ct.drawFileInCanvas=Pn,ct.canvasToFile=Fn,ct.getExifOrientation=Kl,ct.handleMaxWidthOrHeight=Vl,ct.followExifOrientation=Yl,ct.cleanupCanvasMemory=Vt,ct.isAutoOrientationInBrowser=Nr,ct.approximateBelowMaximumCanvasSizeOfBrowser=Bl,ct.copyExifWithoutOrientation=Ul,ct.getBrowserName=fr,ct.version="2.0.2";const ag=window.G7Core,Un=e=>{const t=["B","KB","MB","GB"];let r=0,n=e;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(2)} ${t[r]}`},ql=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const r=Object.values(t.response.data.errors)[0];if(Array.isArray(r)&&r[0])return r[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Zl=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",Re=(e,t)=>ag?.t?.(e,t)??e,gr=window.G7Core;function Ql(e){const{attachmentableType:t,attachmentableId:r,collection:n,maxFiles:o,maxSize:a,maxConcurrentUploads:s,accept:l,imageCompression:g,roleIds:h,autoUpload:c,initialFiles:i,endpoints:u,onFilesChange:f,onUploadComplete:p,onUploadError:m,onRemove:w,onReorder:x,uploadTriggerEvent:A,confirmBeforeRemove:v,uploadParams:E}=e,[O,_]=k.useState(i),[I,C]=k.useState([]),[y,N]=k.useState(!1),M=k.useRef(null),P=k.useRef(0),D=k.useRef(new Set),L=k.useRef(new Map),[$,S]=k.useState(!1),[b,U]=k.useState(null),[F,G]=k.useState(!1),Y=k.useRef(!1),[B,V]=k.useState([]),j=k.useRef(i),[H,q]=k.useState(!1),[ue,ee]=k.useState(0),fe=k.useRef(0),[R,ke]=k.useState(new Map),me=k.useRef(new Map);k.useEffect(()=>{f?.(I)},[I,f]);const Ge=k.useMemo(()=>{const X=j.current;return X===i?X:X.length!==i.length?(j.current=i,i):X.length===0&&i.length===0?X:i.some((ie,le)=>ie.id!==X[le]?.id)?(j.current=i,i):X},[i]);k.useEffect(()=>{if(Y.current)return;const X=Ge.filter(le=>!D.current.has(le.id)&&(!le.hash||!D.current.has(le.hash))),se=new Set(X.map(le=>le.id)),ie=Array.from(L.current.values()).filter(le=>!se.has(le.id)&&!D.current.has(le.id));_([...X,...ie])},[Ge]);const De=k.useCallback(async X=>{const se={maxSizeMB:g?.maxSizeMB??1,maxWidthOrHeight:g?.maxWidthOrHeight??1920,useWebWorker:!0};return await ct(X,se)},[g]),ye=k.useCallback(async X=>{const se=O.length+I.length,ie=Math.max(0,o-se),le=Array.from(X).slice(0,ie);if(X.length>ie){const ne=Array.from(X).slice(ie),Te=Re("attachment.upload_limit_exceeded",{max:o});m?.(Te,ne[0]??X[0])}for(const ne of le){if(ne.size>a*1024*1024){m?.(`[${ne.name}] 파일 크기(${Un(ne.size)})가 최대 허용 크기(${a}MB)를 초과합니다.`,ne);continue}if(l){const ve="."+ne.name.split(".").pop()?.toLowerCase();if(!l.split(",").map($e=>$e.trim().toLowerCase()).some($e=>{if($e.includes("/")){if($e.endsWith("/*" Line truncated
`;let ra;function og(e,t){return new Promise(((r,n)=>{ra||(ra=(function(s){const l=[];return l.push(s),URL.createObjectURL(new Blob(l))})(ng));const o=new Worker(ra);o.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)o.terminate();else if(s.data.progress===void 0){if(s.data.error)return n(new Error(s.data.error)),void o.terminate();r(s.data.file),o.terminate()}else t.onProgress(s.data.progress)})),o.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function ct(e,t){return new Promise((function(r,n){let o,a,s,l,g,h;if(o={...t},s=0,{onProgress:l}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,g=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=f=>{s=f,typeof l=="function"&&l(s)},!(e instanceof Blob||e instanceof rg))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(h=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!g||typeof Worker!="function"||h)return Xl(e,o).then(function(f){try{return a=f,u.call(this)}catch(p){return n(p)}}.bind(this),n);var c=function(){try{return u.call(this)}catch(f){return n(f)}}.bind(this),i=function(f){try{return Xl(e,o).then((function(p){try{return a=p,c()}catch(m){return n(m)}}),n)}catch(p){return n(p)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",og(e,o).then((function(f){try{return a=f,c()}catch{return i()}}),i)}catch{i()}function u(){try{a.name=e.name,a.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=Ul(e,a))}catch{}return r(a)}}))}ct.getDataUrlFromFile=Gl,ct.getFilefromDataUrl=ta,ct.loadImage=jl,ct.drawImageInCanvas=Wl,ct.drawFileInCanvas=Pn,ct.canvasToFile=Fn,ct.getExifOrientation=Kl,ct.handleMaxWidthOrHeight=Vl,ct.followExifOrientation=Yl,ct.cleanupCanvasMemory=Vt,ct.isAutoOrientationInBrowser=Nr,ct.approximateBelowMaximumCanvasSizeOfBrowser=Bl,ct.copyExifWithoutOrientation=Ul,ct.getBrowserName=fr,ct.version="2.0.2";const ag=window.G7Core,Un=e=>{const t=["B","KB","MB","GB"];let r=0,n=e;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(2)} ${t[r]}`},ql=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const r=Object.values(t.response.data.errors)[0];if(Array.isArray(r)&&r[0])return r[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Zl=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",nt=(e,t)=>ag?.t?.(e,t)??e,gr=window.G7Core;function Ql(e){const{attachmentableType:t,attachmentableId:r,collection:n,maxFiles:o,maxSize:a,maxConcurrentUploads:s,accept:l,imageCompression:g,roleIds:h,autoUpload:c,initialFiles:i,endpoints:u,onFilesChange:f,onUploadComplete:p,onUploadError:m,onRemove:w,onReorder:x,uploadTriggerEvent:A,confirmBeforeRemove:v,uploadParams:E}=e,[O,_]=k.useState(i),[I,C]=k.useState([]),[y,N]=k.useState(!1),M=k.useRef(null),P=k.useRef(0),D=k.useRef(new Set),L=k.useRef(new Map),[$,S]=k.useState(!1),[b,U]=k.useState(null),[F,G]=k.useState(!1),Y=k.useRef(!1),[B,V]=k.useState([]),j=k.useRef(i),[H,q]=k.useState(!1),[ue,ee]=k.useState(0),fe=k.useRef(0),[R,ke]=k.useState(new Map),me=k.useRef(new Map);k.useEffect(()=>{f?.(I)},[I,f]);const Ge=k.useMemo(()=>{const X=j.current;return X===i?X:X.length!==i.length?(j.current=i,i):X.length===0&&i.length===0?X:i.some((de,le)=>de.id!==X[le]?.id)?(j.current=i,i):X},[i]);k.useEffect(()=>{if(Y.current)return;const X=Ge.filter(le=>!D.current.has(le.id)&&(!le.hash||!D.current.has(le.hash))),ae=new Set(X.map(le=>le.id)),de=Array.from(L.current.values()).filter(le=>!ae.has(le.id)&&!D.current.has(le.id));_([...X,...de])},[Ge]);const De=k.useCallback(async X=>{const ae={maxSizeMB:g?.maxSizeMB??1,maxWidthOrHeight:g?.maxWidthOrHeight??1920,useWebWorker:!0};return await ct(X,ae)},[g]),ye=k.useCallback(async X=>{const ae=O.length+I.length,de=o-ae,le=Array.from(X).slice(0,de);for(const se of le){if(se.size>a*1024*1024){m?.(`[${se.name}] 파일 크기(${Un(se.size)})가 최대 허용 크기(${a}MB)를 초과합니다.`,se);continue}if(l){const ve="."+se.name.split(".").pop()?.toLowerCase();if(!l.split(",").map($e=>$e.trim().toLowerCase()).some($e=>{if($e.includes("/")){if($e.endsWith("/*")){const je=$e.slice(0,-2);return se.type.toLowerCase().startsWith(je+"/")}return se.type.toLowerCase()===$e}return ve===$e})){m?.( Line truncated
relative border-2 border-dashed rounded-lg transition-colors
${e?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
`,onDragOver:h=>{h.preventDefault(),t&&n(!0)},onDragLeave:()=>n(!1),onDrop:h=>{h.preventDefault(),n(!1),t&&r(h.dataTransfer.files)},children:[d.jsx("input",{ref:o,type:"file",multiple:!0,accept:a,onChange:h=>h.target.files&&r(h.target.files),className:"hidden"}),!g&&d.jsxs(W,{className:"p-8 text-center cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",onClick:()=>o.current?.click(),children:[d.jsx(Ct,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),d.jsx(Dt,{className:"text-sm text-gray-600 dark:text-gray-400",children:Re("attachment.drop_or_click")}),d.jsxs(Dt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[Re("attachment.upload_limit",{maxFiles:s,maxSize:l}),a&&` (${a})`]})]}),g]});function sg(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return k.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const $n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ar(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function na(e){return"nodeType"in e}function yt(e){var t,r;return e?Ar(e)?e:na(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function oa(e){const{Document:t}=yt(e);return e instanceof t}function Qr(e){return Ar(e)?!1:e instanceof yt(e).HTMLElement}function Rl(e){return e instanceof yt(e).SVGElement}function Mr(e){return e?Ar(e)?e.document:na(e)?oa(e)?e:Qr(e)||Rl(e)?e.ownerDocument:document:document:document}const Yt=$n?k.useLayoutEffect:k.useEffect;function aa(e){const t=k.useRef(e);return Yt(()=>{t.current=e}),k.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function lg(){const e=k.useRef(null),t=k.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=k.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Jr(e,t){t===void 0&&(t=[e]);const r=k.useRef(e);return Yt(()=>{r.current!==e&&(r.current=e)},t),r}function Rr(e,t){const r=k.useRef();return k.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function zn(e){const t=aa(e),r=k.useRef(null),n=k.useCallback(o=>{o!==r.current&&t?.(o,r.current),r.current=o},[]);return[r,n]}function sa(e){const t=k.useRef();return k.useEffect(()=>{t.current=e},[e]),t.current}let la={};function en(e,t){return k.useMemo(()=>{if(t)return t;const r=la[e]==null?0:la[e]+1;return la[e]=r,e+"-"+r},[e,t])}function ei(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((a,s)=>{const l=Object.entries(s);for(const[g,h]of l){const c=a[g];c!=null&&(a[g]=c+e*h)}return a},{...t})}}const Or=ei(1),tn=ei(-1);function ig(e){return"clientX"in e&&"clientY"in e}function ia(e){if(!e)return!1;const{KeyboardEvent:t}=yt(e.target);return t&&e instanceof t}function cg(e){if(!e)return!1;const{TouchEvent:t}=yt(e.target);return t&&e instanceof t}function ca(e){if(cg(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return ig(e)?{x:e.clientX,y:e.clientY}:null}const rn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[rn.Translate.toString(e),rn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),ti="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function dg(e){return e.matches(ti)?e:e.querySelector(ti)}const ug={display:"none"};function fg(e){let{id:t,value:r}=e;return k.createElement("div",{id:t,style:ug},r)}function gg(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return k.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function hg(){const[e,t]=k.useState("");return{announce:k.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const ri=k.createContext(null);function pg(e){const t=k.useContext(ri);k.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function mg(){const[e]=k.useState(()=>new Set),t=k.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[k.useCallback(n=>{let{type:o,event:a}=n;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const bg={draggable:`
`,onDragOver:h=>{h.preventDefault(),t&&n(!0)},onDragLeave:()=>n(!1),onDrop:h=>{h.preventDefault(),n(!1),t&&r(h.dataTransfer.files)},children:[d.jsx("input",{ref:o,type:"file",multiple:!0,accept:a,onChange:h=>h.target.files&&r(h.target.files),className:"hidden"}),!g&&d.jsxs(W,{className:"p-8 text-center cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",onClick:()=>o.current?.click(),children:[d.jsx(Ct,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),d.jsx(Dt,{className:"text-sm text-gray-600 dark:text-gray-400",children:nt("attachment.drop_or_click")}),d.jsxs(Dt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[nt("attachment.upload_limit",{maxFiles:s,maxSize:l}),a&&` (${a})`]})]}),g]});function sg(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return k.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const $n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ar(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function na(e){return"nodeType"in e}function yt(e){var t,r;return e?Ar(e)?e:na(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function oa(e){const{Document:t}=yt(e);return e instanceof t}function Qr(e){return Ar(e)?!1:e instanceof yt(e).HTMLElement}function Rl(e){return e instanceof yt(e).SVGElement}function Mr(e){return e?Ar(e)?e.document:na(e)?oa(e)?e:Qr(e)||Rl(e)?e.ownerDocument:document:document:document}const Yt=$n?k.useLayoutEffect:k.useEffect;function aa(e){const t=k.useRef(e);return Yt(()=>{t.current=e}),k.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function lg(){const e=k.useRef(null),t=k.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=k.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Jr(e,t){t===void 0&&(t=[e]);const r=k.useRef(e);return Yt(()=>{r.current!==e&&(r.current=e)},t),r}function Rr(e,t){const r=k.useRef();return k.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function zn(e){const t=aa(e),r=k.useRef(null),n=k.useCallback(o=>{o!==r.current&&t?.(o,r.current),r.current=o},[]);return[r,n]}function sa(e){const t=k.useRef();return k.useEffect(()=>{t.current=e},[e]),t.current}let la={};function en(e,t){return k.useMemo(()=>{if(t)return t;const r=la[e]==null?0:la[e]+1;return la[e]=r,e+"-"+r},[e,t])}function ei(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((a,s)=>{const l=Object.entries(s);for(const[g,h]of l){const c=a[g];c!=null&&(a[g]=c+e*h)}return a},{...t})}}const Or=ei(1),tn=ei(-1);function ig(e){return"clientX"in e&&"clientY"in e}function ia(e){if(!e)return!1;const{KeyboardEvent:t}=yt(e.target);return t&&e instanceof t}function cg(e){if(!e)return!1;const{TouchEvent:t}=yt(e.target);return t&&e instanceof t}function ca(e){if(cg(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return ig(e)?{x:e.clientX,y:e.clientY}:null}const rn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[rn.Translate.toString(e),rn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),ti="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function dg(e){return e.matches(ti)?e:e.querySelector(ti)}const ug={display:"none"};function fg(e){let{id:t,value:r}=e;return k.createElement("div",{id:t,style:ug},r)}function gg(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return k.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function hg(){const[e,t]=k.useState("");return{announce:k.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const ri=k.createContext(null);function pg(e){const t=k.useContext(ri);k.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function mg(){const[e]=k.useState(()=>new Set),t=k.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[k.useCallback(n=>{let{type:o,event:a}=n;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const bg={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},yg={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vg(e){let{announcements:t=yg,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=bg}=e;const{announce:a,announcement:s}=hg(),l=en("DndLiveRegion"),[g,h]=k.useState(!1);if(k.useEffect(()=>{h(!0)},[]),pg(k.useMemo(()=>({onDragStart(i){let{active:u}=i;a(t.onDragStart({active:u}))},onDragMove(i){let{active:u,over:f}=i;t.onDragMove&&a(t.onDragMove({active:u,over:f}))},onDragOver(i){let{active:u,over:f}=i;a(t.onDragOver({active:u,over:f}))},onDragEnd(i){let{active:u,over:f}=i;a(t.onDragEnd({active:u,over:f}))},onDragCancel(i){let{active:u,over:f}=i;a(t.onDragCancel({active:u,over:f}))}}),[a,t])),!g)return null;const c=k.createElement(k.Fragment,null,k.createElement(fg,{id:n,value:o.draggable}),k.createElement(gg,{id:l,announcement:s}));return r?Jt.createPortal(c,r):c}var et;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(et||(et={}));function Hn(){}function ni(e,t){return k.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function wg(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return k.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Gt=Object.freeze({x:0,y:0});function oi(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ai(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function xg(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function si(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function li(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function ii(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const kg=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ii(t,t.left,t.top),a=[];for(const s of n){const{id:l}=s,g=r.get(l);if(g){const h=oi(ii(g),o);a.push({id:l,data:{droppableContainer:s,value:h}})}}return a.sort(ai)},Cg=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=si(t),a=[];for(const s of n){const{id:l}=s,g=r.get(l);if(g){const h=si(g),c=o.reduce((u,f,p)=>u+oi(h[p],f),0),i=Number((c/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:i}})}}return a.sort(ai)};function Sg(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-n,l=a-r;if(n<o&&r<a){const g=t.width*t.height,h=e.width*e.height,c=s*l,i=c/(g+h-c);return Number(i.toFixed(4))}return 0}const _g=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const a of n){const{id:s}=a,l=r.get(s);if(l){const g=Sg(l,t);g>0&&o.push({id:s,data:{droppableContainer:a,value:g}})}}return o.sort(xg)};function Eg(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function ci(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Gt}function Tg(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const Ng=Tg(1);function Ag(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Mg(e,t,r){const n=Ag(t);if(!n)return e;const{scaleX:o,scaleY:a,x:s,y:l}=n,g=e.left-s-(1-o)*parseFloat(r),h=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=o?e.width/o:e.width,i=a?e.height/a:e.height;return{width:c,height:i,top:h,right:g+c,bottom:h+i,left:g}}const Og={ignoreTransform:!1};function Ir(e,t){t===void 0&&(t=Og);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:c}=yt(e).getComputedStyle(e);h&&(r=Mg(r,h,c))}const{top:n,left:o,width:a,height:s,bottom:l,right:g}=r;return{top:n,left:o,width:a,height:s,bottom:l,right:g}}function di(e){return Ir(e,{ignoreTransform:!0})}function Ig(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Dg(e,t){return t===void 0&&(t=yt(e).getComputedStyle(e)),t.position==="fixed"}function Lg(e,t){t===void 0&&(t=yt(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","o Line truncated
`},yg={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vg(e){let{announcements:t=yg,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=bg}=e;const{announce:a,announcement:s}=hg(),l=en("DndLiveRegion"),[g,h]=k.useState(!1);if(k.useEffect(()=>{h(!0)},[]),pg(k.useMemo(()=>({onDragStart(i){let{active:u}=i;a(t.onDragStart({active:u}))},onDragMove(i){let{active:u,over:f}=i;t.onDragMove&&a(t.onDragMove({active:u,over:f}))},onDragOver(i){let{active:u,over:f}=i;a(t.onDragOver({active:u,over:f}))},onDragEnd(i){let{active:u,over:f}=i;a(t.onDragEnd({active:u,over:f}))},onDragCancel(i){let{active:u,over:f}=i;a(t.onDragCancel({active:u,over:f}))}}),[a,t])),!g)return null;const c=k.createElement(k.Fragment,null,k.createElement(fg,{id:n,value:o.draggable}),k.createElement(gg,{id:l,announcement:s}));return r?Jt.createPortal(c,r):c}var Re;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Re||(Re={}));function Hn(){}function ni(e,t){return k.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function wg(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return k.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Gt=Object.freeze({x:0,y:0});function oi(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ai(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function xg(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function si(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function li(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function ii(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const kg=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ii(t,t.left,t.top),a=[];for(const s of n){const{id:l}=s,g=r.get(l);if(g){const h=oi(ii(g),o);a.push({id:l,data:{droppableContainer:s,value:h}})}}return a.sort(ai)},Cg=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=si(t),a=[];for(const s of n){const{id:l}=s,g=r.get(l);if(g){const h=si(g),c=o.reduce((u,f,p)=>u+oi(h[p],f),0),i=Number((c/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:i}})}}return a.sort(ai)};function Sg(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-n,l=a-r;if(n<o&&r<a){const g=t.width*t.height,h=e.width*e.height,c=s*l,i=c/(g+h-c);return Number(i.toFixed(4))}return 0}const _g=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const a of n){const{id:s}=a,l=r.get(s);if(l){const g=Sg(l,t);g>0&&o.push({id:s,data:{droppableContainer:a,value:g}})}}return o.sort(xg)};function Eg(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function ci(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Gt}function Tg(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const Ng=Tg(1);function Ag(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Mg(e,t,r){const n=Ag(t);if(!n)return e;const{scaleX:o,scaleY:a,x:s,y:l}=n,g=e.left-s-(1-o)*parseFloat(r),h=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=o?e.width/o:e.width,i=a?e.height/a:e.height;return{width:c,height:i,top:h,right:g+c,bottom:h+i,left:g}}const Og={ignoreTransform:!1};function Ir(e,t){t===void 0&&(t=Og);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:c}=yt(e).getComputedStyle(e);h&&(r=Mg(r,h,c))}const{top:n,left:o,width:a,height:s,bottom:l,right:g}=r;return{top:n,left:o,width:a,height:s,bottom:l,right:g}}function di(e){return Ir(e,{ignoreTransform:!0})}function Ig(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Dg(e,t){return t===void 0&&(t=yt(e).getComputedStyle(e)),t.position==="fixed"}function Lg(e,t){t===void 0&&(t=yt(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","o Line truncated
flex items-center gap-3 p-4 rounded-lg border shadow-lg
min-w-[300px] max-w-md
transition-all duration-300
${o.bg}
${r?"opacity-100 translate-y-0":`opacity-0 ${s}`}
`,role:"alert",children:[d.jsx(de,{name:a,className:`w-5 h-5 flex-shrink-0 ${o.text}`}),d.jsx(te,{className:`flex-1 text-sm font-medium ${o.text}`,children:e.message}),d.jsx(Q,{onClick:n,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${o.text} focus:outline-none`,"aria-label":Yh("common.close"),children:d.jsx(de,{name:Je.Times,className:"w-4 h-4"})})]})},Qh=Object.freeze(Object.defineProperty({__proto__:null,Toast:xa,default:xa},Symbol.toStringTag,{value:"Module"})),Jh=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},ka=({className:e="",style:t})=>{const[r,n]=k.useState(!1);return k.useEffect(()=>{const o=window.G7Core?.TransitionManager;if(!o){Jh.warn("TransitionManager를 찾을 수 없습니다.");return}return n(o.getIsPending()),o.subscribe(s=>{n(s)})},[]),r?d.jsxs(W,{className:`fixed top-0 left-0 right-0 z-50 ${e}`,style:t,role:"progressbar","aria-label":"페이지 로딩 중",children:[d.jsx(W,{className:"h-1 bg-gradient-to-r from-blue-500 via-blue-600 to-blue-500 animate-pulse",children:d.jsx(W,{className:"h-full bg-blue-700 animate-[loading_1.5s_ease-in-out_infinite]",style:{width:"30%",animation:"loading 1.5s ease-in-out infinite"}})}),d.jsx("style",{children:`
`,role:"alert",children:[d.jsx(ce,{name:a,className:`w-5 h-5 flex-shrink-0 ${o.text}`}),d.jsx(te,{className:`flex-1 text-sm font-medium ${o.text}`,children:e.message}),d.jsx(Q,{onClick:n,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${o.text} focus:outline-none`,"aria-label":Yh("common.close"),children:d.jsx(ce,{name:Je.Times,className:"w-4 h-4"})})]})},Qh=Object.freeze(Object.defineProperty({__proto__:null,Toast:xa,default:xa},Symbol.toStringTag,{value:"Module"})),Jh=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},ka=({className:e="",style:t})=>{const[r,n]=k.useState(!1);return k.useEffect(()=>{const o=window.G7Core?.TransitionManager;if(!o){Jh.warn("TransitionManager를 찾을 수 없습니다.");return}return n(o.getIsPending()),o.subscribe(s=>{n(s)})},[]),r?d.jsxs(W,{className:`fixed top-0 left-0 right-0 z-50 ${e}`,style:t,role:"progressbar","aria-label":"페이지 로딩 중",children:[d.jsx(W,{className:"h-1 bg-gradient-to-r from-blue-500 via-blue-600 to-blue-500 animate-pulse",children:d.jsx(W,{className:"h-full bg-blue-700 animate-[loading_1.5s_ease-in-out_infinite]",style:{width:"30%",animation:"loading 1.5s ease-in-out infinite"}})}),d.jsx("style",{children:`
@keyframes loading {
0% {
transform: translateX(-100%);
@@ -83,5 +83,5 @@ self.addEventListener('message', async (e) => {
transform: translateX(-100%);
}
}
`})]}):null},Rh=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionIndicator:ka,default:ka},Symbol.toStringTag,{value:"Module"})),Vi=window.G7Core?.createLogger?.("Comp:PageTransitionBlur")??{log:(...e)=>console.log("[Comp:PageTransitionBlur]",...e),warn:(...e)=>console.warn("[Comp:PageTransitionBlur]",...e)},Ca=({className:e="",style:t})=>{const[r,n]=k.useState(!1);return k.useEffect(()=>{const o=window.G7Core?.TransitionManager;if(!o){Vi.warn("TransitionManager를 찾을 수 없습니다.");return}return n(o.getIsPending()),o.subscribe(s=>{Vi.log("isPending changed:",s),n(s)})},[]),r?d.jsx(W,{className:`fixed inset-0 z-40 bg-white/30 dark:bg-gray-900/30 backdrop-blur-sm transition-opacity duration-150 pointer-events-none ${e}`,style:t,role:"status","aria-label":"페이지 전환 중","data-testid":"page-transition-blur"}):null},e0=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionBlur:Ca,default:Ca},Symbol.toStringTag,{value:"Module"})),Yi={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Xi=new Set(["hidden","block","inline-block","inline","flex","inline-flex","grid","inline-grid","table","table-row","table-cell","contents","list-item","flow-root"]),t0=new Set(["Div","Flex","Grid","Section","Article","Nav","Aside","Main","Header","Footer","Fragment","Form","Container"]),r0=new Set(["H1","H2","H3","H4","H5","H6","P","Span","Label","A","Strong","Em","Small","Badge"]),n0=new Set(["Input","Textarea","Select","Checkbox","Radio","Toggle","DatePicker","TagInput","SearchBar"]),o0=new Set(["Img","Image","Avatar","AvatarUploader","ImageGallery","ProductImageViewer","FileUploader"]),qi={DataGrid:(e,t)=>d.jsxs("div",{className:"w-full border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-10 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${e}`,children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-24 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-20 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"})]})}),Array.from({length:t},(r,n)=>d.jsx("div",{className:`h-12 border-b border-gray-100 dark:border-gray-800 ${e}`,style:{animationDelay:`${n*75}ms`},children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 flex-1 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-100 dark:bg-gray-800 rounded"}),d.jsx("div",{className:"h-3 w-14 bg-gray-100 dark:bg-gray-800 rounded"})]})},n))]}),Pagination:e=>d.jsx("div",{className:"flex justify-center gap-1.5 py-3",children:Array.from({length:5},(t,r)=>d.jsx("div",{className:`w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),Tabs:e=>d.jsxs("div",{children:[d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2 mb-3",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),d.jsx("div",{className:`h-32 bg-gray-100 dark:bg-gray-800 rounded ${e}`})]}),TabNavigation:e=>d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),ProductCard:e=>d.jsxs("div",{className:"rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-48 w-full bg-gray-200 dark:bg-gray-700 ${e}`}),d.jsxs("div",{className:"p-3 space-y-2",children:[d.jsx("div",{className:`h-3.5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:`h-4 w-1/3 bg-gray-300 dark:bg-gray-600 rounded ${e}`})]})]}),UserInfo:e=>d.jsx("div",{className:`h-3 w-14 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),QuantitySelector:e=>d.jsx("div",{className:`h-9 w-28 bg-gray-100 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 ${e}`}),Header:e=>d.jsx("header",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:"flex items-center justify-between h-16",children:[d.jsxs("div",{className:"flex items-center gap-8",children:[d.jsx("div",{className:`h-8 w-24 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:"hidden lg:flex items-center gap-6",children:Array.from({length:4},(t,r)=>d.jsx("div",{className:`h-3.5 w-16 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))})]}),d.jsx("div",{className:"flex items-center gap-4",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-8 w-8 bg-gray-200 dark:bg-gray-700 rounded-full ${e}`},r))})]})})}),Footer:e=>d.jsx("footer",{className:"bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray- Line truncated
`})]}):null},Rh=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionIndicator:ka,default:ka},Symbol.toStringTag,{value:"Module"})),Vi=window.G7Core?.createLogger?.("Comp:PageTransitionBlur")??{log:(...e)=>console.log("[Comp:PageTransitionBlur]",...e),warn:(...e)=>console.warn("[Comp:PageTransitionBlur]",...e)},Ca=({className:e="",style:t})=>{const[r,n]=k.useState(!1);return k.useEffect(()=>{const o=window.G7Core?.TransitionManager;if(!o){Vi.warn("TransitionManager를 찾을 수 없습니다.");return}return n(o.getIsPending()),o.subscribe(s=>{Vi.log("isPending changed:",s),n(s)})},[]),r?d.jsx(W,{className:`fixed inset-0 z-40 bg-white/30 dark:bg-gray-900/30 backdrop-blur-sm transition-opacity duration-150 pointer-events-none ${e}`,style:t,role:"status","aria-label":"페이지 전환 중","data-testid":"page-transition-blur"}):null},e0=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionBlur:Ca,default:Ca},Symbol.toStringTag,{value:"Module"})),Yi={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Xi=new Set(["hidden","block","inline-block","inline","flex","inline-flex","grid","inline-grid","table","table-row","table-cell","contents","list-item","flow-root"]),t0=new Set(["Div","Flex","Grid","Section","Article","Nav","Aside","Main","Header","Footer","Fragment","Form","Container"]),r0=new Set(["H1","H2","H3","H4","H5","H6","P","Span","Label","A","Strong","Em","Small","Badge"]),n0=new Set(["Input","Textarea","Select","Checkbox","Radio","Toggle","DatePicker","TagInput","SearchBar"]),o0=new Set(["Img","Image","Avatar","AvatarUploader","ImageGallery","ProductImageViewer","FileUploader"]),qi={DataGrid:(e,t)=>d.jsxs("div",{className:"w-full border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-10 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${e}`,children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-24 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-20 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"})]})}),Array.from({length:t},(r,n)=>d.jsx("div",{className:`h-12 border-b border-gray-100 dark:border-gray-800 ${e}`,style:{animationDelay:`${n*75}ms`},children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 flex-1 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-100 dark:bg-gray-800 rounded"}),d.jsx("div",{className:"h-3 w-14 bg-gray-100 dark:bg-gray-800 rounded"})]})},n))]}),Pagination:e=>d.jsx("div",{className:"flex justify-center gap-1.5 py-3",children:Array.from({length:5},(t,r)=>d.jsx("div",{className:`w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),Tabs:e=>d.jsxs("div",{children:[d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2 mb-3",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),d.jsx("div",{className:`h-32 bg-gray-100 dark:bg-gray-800 rounded ${e}`})]}),TabNavigation:e=>d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),ProductCard:e=>d.jsxs("div",{className:"rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-48 w-full bg-gray-200 dark:bg-gray-700 ${e}`}),d.jsxs("div",{className:"p-3 space-y-2",children:[d.jsx("div",{className:`h-3.5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:`h-4 w-1/3 bg-gray-300 dark:bg-gray-600 rounded ${e}`})]})]}),UserInfo:e=>d.jsx("div",{className:`h-3 w-14 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),QuantitySelector:e=>d.jsx("div",{className:`h-9 w-28 bg-gray-100 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 ${e}`}),Header:e=>d.jsx("header",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:"flex items-center justify-between h-16",children:[d.jsxs("div",{className:"flex items-center gap-8",children:[d.jsx("div",{className:`h-8 w-24 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:"hidden lg:flex items-center gap-6",children:Array.from({length:4},(t,r)=>d.jsx("div",{className:`h-3.5 w-16 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))})]}),d.jsx("div",{className:"flex items-center gap-4",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-8 w-8 bg-gray-200 dark:bg-gray-700 rounded-full ${e}`},r))})]})})}),Footer:e=>d.jsx("footer",{className:"bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray- Line truncated
//# sourceMappingURL=components.iife.js.map
@@ -1 +1 @@
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/IconTypes.ts","../../src/components/basic/Icon.tsx","../../src/components/basic/PasswordInput.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/Header.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/Avatar.tsx","../../src/components/composite/SlotContainer.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/Header.tsx","../../src/components/basic/Footer.tsx","../../src/components/composite/Footer.tsx","../../src/components/composite/MobileNav.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/ProductCard.tsx","../../node_modules/yet-another-react-lightbox/dist/types.js","../../node_modules/yet-another-react-lightbox/dist/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/zoom/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/counter/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/slideshow/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/fullscreen/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/thumbnails/index.js","../../src/components/basic/I.tsx","../../src/components/composite/ImageGallery.tsx","../../src/components/composite/ProductImageViewer.tsx","../../src/components/composite/QuantitySelector.tsx","../../src/components/composite/PostReactions.tsx","../../src/components/composite/RichTextEditor.tsx","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/HtmlEditor.tsx","../../src/components/composite/ExpandableContent.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/FileUploader/FileUploaderContext.tsx","../../node_modules/browser-image-compression/dist/browser-image-compression.mjs","../../src/components/composite/FileUploader/utils.ts","../../src/components/composite/FileUploader/useFileUploader.ts","../../src/components/composite/FileUploader/FileDropZone.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/composite/FileUploader/SortableThumbnailItem.tsx","../../src/components/composite/FileUploader/FileList.tsx","../../src/components/composite/FileUploader/FileUploader.tsx","../../src/components/composite/SocialLoginButtons.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageTransitionBlur.tsx","../../src/components/composite/PageSkeleton.tsx","../../src/components/composite/PageLoading.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/AvatarUploader.tsx","../../src/components/composite/UserInfo.tsx","../../src/components/composite/TabNavigation.tsx","../../src/components/composite/index.ts","../../src/components/layout/Container.tsx","../../src/components/layout/Grid.tsx","../../src/components/layout/Flex.tsx","../../src/components/layout/SectionLayout.tsx","../../src/components/layout/ThreeColumnLayout.tsx","../../src/handlers/productOptions.ts","../../src/handlers/cartHandlers.ts","../../src/handlers/cartOptionChange.ts","../../src/handlers/storageHandlers.ts","../../src/handlers/getDisplayPrice.ts","../../src/handlers/formatCurrency.ts","../../src/handlers/loadPreferredCurrency.ts","../../src/handlers/setThemeHandler.ts","../../src/handlers/redirectToLoginWithReturn.ts","../../src/handlers/doLine truncated
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/IconTypes.ts","../../src/components/basic/Icon.tsx","../../src/components/basic/PasswordInput.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/Header.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/Avatar.tsx","../../src/components/composite/SlotContainer.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/Header.tsx","../../src/components/basic/Footer.tsx","../../src/components/composite/Footer.tsx","../../src/components/composite/MobileNav.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/ProductCard.tsx","../../node_modules/yet-another-react-lightbox/dist/types.js","../../node_modules/yet-another-react-lightbox/dist/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/zoom/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/counter/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/slideshow/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/fullscreen/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/thumbnails/index.js","../../src/components/basic/I.tsx","../../src/components/composite/ImageGallery.tsx","../../src/components/composite/ProductImageViewer.tsx","../../src/components/composite/QuantitySelector.tsx","../../src/components/composite/PostReactions.tsx","../../src/components/composite/RichTextEditor.tsx","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/HtmlEditor.tsx","../../src/components/composite/ExpandableContent.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/FileUploader/FileUploaderContext.tsx","../../node_modules/browser-image-compression/dist/browser-image-compression.mjs","../../src/components/composite/FileUploader/utils.ts","../../src/components/composite/FileUploader/useFileUploader.ts","../../src/components/composite/FileUploader/FileDropZone.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/composite/FileUploader/SortableThumbnailItem.tsx","../../src/components/composite/FileUploader/FileList.tsx","../../src/components/composite/FileUploader/FileUploader.tsx","../../src/components/composite/SocialLoginButtons.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageTransitionBlur.tsx","../../src/components/composite/PageSkeleton.tsx","../../src/components/composite/PageLoading.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/AvatarUploader.tsx","../../src/components/composite/UserInfo.tsx","../../src/components/composite/TabNavigation.tsx","../../src/components/composite/index.ts","../../src/components/layout/Container.tsx","../../src/components/layout/Grid.tsx","../../src/components/layout/Flex.tsx","../../src/components/layout/SectionLayout.tsx","../../src/components/layout/ThreeColumnLayout.tsx","../../src/handlers/productOptions.ts","../../src/handlers/cartHandlers.ts","../../src/handlers/cartOptionChange.ts","../../src/handlers/storageHandlers.ts","../../src/handlers/getDisplayPrice.ts","../../src/handlers/formatCurrency.ts","../../src/handlers/loadPreferredCurrency.ts","../../src/handlers/setThemeHandler.ts","../../src/handlers/redirectToLoginWithReturn.ts","../../src/handlers/doLine truncated
@@ -11,8 +11,6 @@ interface ProductLabel {
interface ProductCardProps {
product: {
id: number;
/** 상품코드 — 상세 페이지 링크 식별자 (product_code 기준 라우팅). 없으면 id 로 폴백 */
product_code?: string;
name?: string | Record<string, string>;
name_localized?: string;
thumbnail_url: string;
@@ -5,7 +5,7 @@
"description": "레이아웃 편집기 스펙 — Phase 3 (nesting + componentPalette 블록). controls/componentCapabilities/actionRecipes 등은 Phase 4/5 에서 추가.",
"styleSystem": "tailwind",
"darkMode": {
"comment": "Tailwind 다크는 조상.dark 클래스. 편집기 프리뷰는 관리자 admin 의 html.dark 조상과 독립적으로 라이트/다크를 보여줘야 하므로, 코어 CSS 서빙 API 가 편집기용 CSS 의.dark 셀렉터를 프리뷰 전용 마커(.g7le-preview-dark)로 치환해 서빙한다. 사용자 페이지 CSS 는 원본 그대로.",
"comment": "Tailwind 다크는 조상.dark 클래스. 편집기 프리뷰는 PO admin 의 html.dark 조상과 독립적으로 라이트/다크를 보여줘야 하므로, 코어 CSS 서빙 API 가 편집기용 CSS 의.dark 셀렉터를 프리뷰 전용 마커(.g7le-preview-dark)로 치환해 서빙한다. 사용자 페이지 CSS 는 원본 그대로.",
"strategy": "ancestor-class",
"ancestorSelector": ".dark",
"previewIsolation": {
@@ -5,7 +5,6 @@
"delete_confirm_message": "Are you sure you want to delete this file?",
"deleting": "Deleting...",
"attached_count": "{{count}}/{{max}} attached",
"upload_limit_exceeded": "You can attach up to {{max}} files.",
"max_size": "Max {{size}}MB",
"reorder_failed": "Failed to reorder files",
"drag_to_reorder": "Drag to reorder",
@@ -1,10 +1,6 @@
{
"loading_posts": "Loading posts...",
"view_board": "View Board",
"admin_links": {
"posts": "Admin posts",
"manage": "Board settings"
},
"no": "No.",
"title": "Title",
"author": "Author",
@@ -1,7 +1,6 @@
{
"title": "Shop",
"description": "Discover various products",
"admin_edit": "Edit in admin",
"shippability": {
"not_shippable": "This item cannot be shipped to the selected country.",
"not_shippable_short": "Not shippable",
@@ -51,8 +51,7 @@
"published_at": "Published",
"create_page": "Create Page",
"attachments": "Attachments",
"download": "Download",
"preview_banner": "Previewing an unpublished page"
"download": "Download"
},
"mypage": {
"page_title": "My Page",
@@ -5,7 +5,6 @@
"delete_confirm_message": "이 파일을 삭제하시겠습니까?",
"deleting": "삭제 중...",
"attached_count": "{{count}}/{{max}}개 첨부됨",
"upload_limit_exceeded": "최대 {{max}}개까지 첨부할 수 있습니다.",
"max_size": "최대 {{size}}MB",
"reorder_failed": "파일 순서 변경에 실패했습니다",
"drag_to_reorder": "드래그하여 순서 변경",
@@ -1,10 +1,6 @@
{
"loading_posts": "게시글을 불러오는 중입니다...",
"view_board": "게시판 보기",
"admin_links": {
"posts": "관리자 게시물 조회",
"manage": "게시판 관리"
},
"no": "번호",
"title": "제목",
"author": "작성자",
@@ -1,7 +1,6 @@
{
"title": "쇼핑",
"description": "다양한 상품을 만나보세요",
"admin_edit": "관리자에서 수정",
"shippability": {
"not_shippable": "선택하신 배송국가로는 배송할 수 없는 상품입니다.",
"not_shippable_short": "배송 불가",
@@ -51,8 +51,7 @@
"published_at": "발행일",
"create_page": "페이지 생성",
"attachments": "첨부파일",
"download": "다운로드",
"preview_banner": "미발행 페이지 미리보기 중입니다"
"download": "다운로드"
},
"mypage": {
"page_title": "마이페이지",
@@ -80,30 +80,6 @@
}
},
"children": [
{
"id": "page_preview_banner",
"type": "basic",
"name": "Div",
"if": "{{page?.data?.is_preview}}",
"props": {
"className": "flex items-center gap-2 mb-4 px-4 py-3 rounded-md bg-amber-100 dark:bg-amber-900/30 text-amber-800 dark:text-amber-400 text-sm"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "eye",
"className": "text-amber-600 dark:text-amber-400 text-sm"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:user.page.preview_banner"
}
]
},
{
"type": "basic",
"name": "Div",
@@ -276,32 +252,10 @@
},
"children": [
{
"comment": "이미지 썸네일 (이미지 파일인 경우) - preview_url 공개 서빙",
"type": "basic",
"name": "Div",
"if": "{{att_item.is_image}}",
"props": {
"className": "flex-shrink-0 w-10 h-10 rounded overflow-hidden bg-gray-100 dark:bg-gray-800"
},
"children": [
{
"type": "basic",
"name": "Img",
"props": {
"src": "{{att_item.preview_url}}",
"alt": "{{att_item.original_filename}}",
"className": "w-full h-full object-cover"
}
}
]
},
{
"comment": "파일 아이콘 (일반 파일인 경우)",
"type": "basic",
"name": "Icon",
"if": "{{!att_item.is_image}}",
"props": {
"name": "file",
"name": "{{att_item.is_image ? 'image' : 'file'}}",
"className": "text-gray-400 text-sm flex-shrink-0"
}
},
@@ -317,21 +271,11 @@
},
{
"type": "basic",
"name": "Button",
"name": "A",
"props": {
"type": "button",
"className": "flex items-center gap-1.5 px-3 py-1.5 text-sm text-blue-600 dark:text-blue-400 hover:underline flex-shrink-0 bg-transparent border-0 cursor-pointer"
"href": "{{att_item.download_url}}",
"className": "flex items-center gap-1.5 px-3 py-1.5 text-sm text-blue-600 dark:text-blue-400 hover:underline flex-shrink-0 no-underline"
},
"actions": [
{
"type": "click",
"handler": "downloadAttachment",
"params": {
"url": "{{att_item.download_url}}",
"filename": "{{att_item.original_filename}}"
}
}
],
"children": [
{
"type": "basic",
@@ -1,73 +0,0 @@
{
"meta": {
"is_partial": true,
"description": "게시판 관리자 진입 크로스링크 (관리자 게시물 조회 + 게시판 관리). can_access_admin 권한 보유자에게만 노출, 새 탭으로 이동."
},
"comment": "관리자 진입 링크 묶음 - 유저 게시판 화면에서 관리자 화면으로 이동 (권한 게이트)",
"type": "basic",
"name": "Div",
"if": "{{posts?.data?.abilities?.can_access_admin}}",
"props": {
"className": "inline-flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "A",
"props": {
"href": "/admin/board/{{route.slug}}",
"target": "_blank",
"rel": "noopener noreferrer",
"title": "$t:board.admin_links.posts",
"className": "inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-gray-600 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors no-underline"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "external-link",
"size": "sm"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "hidden sm:inline"
},
"text": "$t:board.admin_links.posts"
}
]
},
{
"type": "basic",
"name": "A",
"props": {
"href": "/admin/boards/{{route.slug}}/edit",
"target": "_blank",
"rel": "noopener noreferrer",
"title": "$t:board.admin_links.manage",
"className": "inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-gray-600 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors no-underline"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "settings",
"size": "sm"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "hidden sm:inline"
},
"text": "$t:board.admin_links.manage"
}
]
}
]
}
@@ -413,7 +413,7 @@
}
},
{
"comment": "신고 실패(409 중복/403/422) 시 모달을 닫는다 → 에러 토스트만 화면에 노출되어 '진행 불가'처럼 보이던 현상 해소 (이슈 #413-60 증상1, 설계 결정: 모달 닫고 토스트)",
"comment": "신고 실패(409 중복/403/422) 시 모달을 닫는다 → 에러 토스트만 화면에 노출되어 '진행 불가'처럼 보이던 현상 해소 (이슈 #413-60 증상1, PO 결정: 모달 닫고 토스트)",
"handler": "closeModal"
}
]
@@ -38,22 +38,8 @@
]
},
{
"comment": "상단 액션 (관리자 진입 링크 + 글쓰기 버튼)",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"comment": "관리자 진입 크로스링크 (권한 보유 시)",
"partial": "../../index/_admin_links.json"
},
{
"comment": "상단 글쓰기 버튼",
"partial": "../../index/_write_button.json"
}
]
"comment": "상단 글쓰기 버튼",
"partial": "../../index/_write_button.json"
}
]
},
@@ -11,75 +11,6 @@
"data_sources": "post"
},
"children": [
{
"comment": "관리자 진입 크로스링크 (게시판 관리 권한 보유 시) — 관리자 게시물 조회 + 게시판 관리, 새 탭",
"type": "basic",
"name": "Div",
"if": "{{post?.data?.abilities?.can_access_admin}}",
"props": {
"className": "flex items-center justify-end gap-2 mb-4"
},
"children": [
{
"type": "basic",
"name": "A",
"props": {
"href": "/admin/board/{{route.slug}}/post/{{post?.data?.id ?? route.id}}",
"target": "_blank",
"rel": "noopener noreferrer",
"title": "$t:board.admin_links.posts",
"className": "inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-gray-600 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors no-underline"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "external-link",
"size": "sm"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "hidden sm:inline"
},
"text": "$t:board.admin_links.posts"
}
]
},
{
"type": "basic",
"name": "A",
"props": {
"href": "/admin/boards/{{route.slug}}/edit",
"target": "_blank",
"rel": "noopener noreferrer",
"title": "$t:board.admin_links.manage",
"className": "inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-gray-600 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors no-underline"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "settings",
"size": "sm"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "hidden sm:inline"
},
"text": "$t:board.admin_links.manage"
}
]
}
]
},
{
"comment": "게시글 본문 카드",
"type": "basic",
@@ -38,22 +38,8 @@
]
},
{
"comment": "상단 액션 (관리자 진입 링크 + 글쓰기 버튼)",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"comment": "관리자 진입 크로스링크 (권한 보유 시)",
"partial": "../../index/_admin_links.json"
},
{
"comment": "상단 글쓰기 버튼",
"partial": "../../index/_write_button.json"
}
]
"comment": "상단 글쓰기 버튼",
"partial": "../../index/_write_button.json"
}
]
},
@@ -38,22 +38,8 @@
]
},
{
"comment": "상단 액션 (관리자 진입 링크 + 글쓰기 버튼)",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"comment": "관리자 진입 크로스링크 (권한 보유 시)",
"partial": "../../index/_admin_links.json"
},
{
"comment": "상단 글쓰기 버튼",
"partial": "../../index/_write_button.json"
}
]
"comment": "상단 글쓰기 버튼",
"partial": "../../index/_write_button.json"
}
]
},
@@ -184,7 +184,7 @@
{
"type": "click",
"handler": "navigate",
"params": { "path": "{{_global.shopBase}}/products/{{item.product_snapshot?.product_code ?? item.product_id}}" }
"params": { "path": "{{_global.shopBase}}/products/{{item.product_id}}" }
}
],
"children": [
@@ -223,7 +223,7 @@
{
"type": "click",
"handler": "navigate",
"params": { "path": "{{_global.shopBase}}/products/{{item.product_snapshot?.product_code ?? item.product_id}}" }
"params": { "path": "{{_global.shopBase}}/products/{{item.product_id}}" }
}
]
},
@@ -3,7 +3,7 @@
"type": "basic",
"name": "Button",
"props": { "className": "flex w-full text-left items-center gap-4 p-4 hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors cursor-pointer" },
"actions": [{ "type": "click", "handler": "navigate", "params": { "path": "{{_global.shopBase}}/products/{{product.product_code ?? product.id}}" } }],
"actions": [{ "type": "click", "handler": "navigate", "params": { "path": "{{_global.shopBase}}/products/{{product.id}}" } }],
"children": [
{
"comment": "썸네일",
@@ -35,7 +35,7 @@
"comment": "상품 이미지 (새 창으로 열기)",
"type": "basic",
"name": "A",
"props": { "href": "{{_global.shopBase}}/products/{{item.product?.product_code ?? item.product_id}}", "target": "_blank", "className": "flex-shrink-0" },
"props": { "href": "{{_global.shopBase}}/products/{{item.product_id}}", "target": "_blank", "className": "flex-shrink-0" },
"children": [
{
"type": "basic",
@@ -57,7 +57,7 @@
"comment": "상품명 (새 창으로 열기)",
"type": "basic",
"name": "A",
"props": { "href": "{{_global.shopBase}}/products/{{item.product?.product_code ?? item.product_id}}", "target": "_blank", "className": "block w-full text-left no-underline" },
"props": { "href": "{{_global.shopBase}}/products/{{item.product_id}}", "target": "_blank", "className": "block w-full text-left no-underline" },
"children": [
{ "type": "basic", "name": "H3", "props": { "className": "font-medium text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 truncate" }, "text": "{{item.product.name}}" }
]
@@ -304,7 +304,7 @@
{
"comment": "상품 옵션 정보 조회 후 모달 열기",
"handler": "apiCall",
"target": "/api/modules/sirsoft-ecommerce/products/{{item.product?.product_code ?? item.product_id}}",
"target": "/api/modules/sirsoft-ecommerce/products/{{item.product_id}}",
"auth_mode": "optional",
"onSuccess": [
{
@@ -62,7 +62,7 @@
"comment": "상품 이미지 (새 창으로 열기)",
"type": "basic",
"name": "A",
"props": { "href": "{{_global.shopBase}}/products/{{item.product?.product_code ?? item.product_id}}", "target": "_blank", "className": "flex-shrink-0" },
"props": { "href": "{{_global.shopBase}}/products/{{item.product_id}}", "target": "_blank", "className": "flex-shrink-0" },
"children": [
{
"type": "basic",
@@ -97,7 +97,7 @@
"comment": "상품명 (새 창으로 열기)",
"type": "basic",
"name": "A",
"props": { "href": "{{_global.shopBase}}/products/{{item.product?.product_code ?? item.product_id}}", "target": "_blank", "className": "block no-underline" },
"props": { "href": "{{_global.shopBase}}/products/{{item.product_id}}", "target": "_blank", "className": "block no-underline" },
"children": [
{
"type": "basic",
@@ -1,35 +0,0 @@
{
"meta": {
"is_partial": true,
"description": "유저 상품 상세에서 관리자 상품 수정 화면으로 이동하는 링크. 상품 수정 권한(can_update) 보유 시에만 노출, 새 탭."
},
"comment": "관리자 상품 수정 링크 (권한 게이트)",
"type": "basic",
"name": "A",
"if": "{{product.data?.abilities?.can_update}}",
"props": {
"href": "/admin/ecommerce/products/{{product.data?.product_code ?? route.product_code}}/edit",
"target": "_blank",
"rel": "noopener noreferrer",
"title": "$t:shop.admin_edit",
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-600 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors no-underline flex-shrink-0"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "pencil",
"size": "sm"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "hidden sm:inline"
},
"text": "$t:shop.admin_edit"
}
]
}
@@ -69,18 +69,6 @@
]
},
{
"comment": "우측 액션 그룹 (관리자 수정 링크 + 찜하기)",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 flex-shrink-0"
},
"children": [
{
"comment": "관리자 상품 수정 링크 (권한 게이트, 새 탭)",
"partial": "./_admin_edit_link.json"
},
{
"type": "basic",
"name": "Button",
"props": {
@@ -181,8 +169,6 @@
}
]
}
]
}
]
}
]
@@ -95,7 +95,7 @@
"props": { "className": "space-y-4" },
"children": [
{
"comment": "인라인 에러 박스 — 인증 실패 시 toast 대신 폼 상단에 통일 메시지 노출 (UX 결정). 실패 사유는 구분하지 않고 단일 boolean 플래그로 표시 (보안 정책).",
"comment": "인라인 에러 박스 — 인증 실패 시 toast 대신 폼 상단에 통일 메시지 노출 (PO UX 결정). 실패 사유는 구분하지 않고 단일 boolean 플래그로 표시 (보안 정책).",
"type": "basic",
"name": "Div",
"if": "{{_local.lookupError}}",
@@ -296,7 +296,7 @@
],
"onError": [
{
"comment": "보안 정책 — 실패 사유(주문 없음/비밀번호 오류/잠금)를 구분하지 않고 단일 boolean 플래그로 통일. 폼 상단 인라인 에러 박스가 lookupError 가 true 일 때 노출된다 (toast 대신 페이지 내 메시지 박스 — UX 결정).",
"comment": "보안 정책 — 실패 사유(주문 없음/비밀번호 오류/잠금)를 구분하지 않고 단일 boolean 플래그로 통일. 폼 상단 인라인 에러 박스가 lookupError 가 true 일 때 노출된다 (toast 대신 페이지 내 메시지 박스 — PO UX 결정).",
"handler": "setState",
"params": { "target": "local", "isSubmitting": false, "errors": "{{error.errors ?? null}}", "lookupError": true }
}
@@ -111,7 +111,7 @@
"id": "product",
"label_key": "$t:editor.data_source.product",
"type": "api",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.product_code}}",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.id}}",
"method": "GET",
"auto_fetch": true,
"auth_mode": "optional",
@@ -134,7 +134,7 @@
"id": "reviews",
"label_key": "$t:editor.data_source.reviews",
"type": "api",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.product_code}}/reviews",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.id}}/reviews",
"method": "GET",
"auto_fetch": true,
"auth_mode": "optional",
@@ -170,7 +170,7 @@
"id": "qna",
"label_key": "$t:editor.data_source.qna",
"type": "api",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.product_code}}/inquiries",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.id}}/inquiries",
"method": "GET",
"auto_fetch": true,
"auth_mode": "optional",
@@ -207,7 +207,7 @@
"id": "productDownloadableCoupons",
"label_key": "$t:editor.data_source.productDownloadableCoupons",
"type": "api",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.product_code}}/downloadable-coupons",
"endpoint": "/api/modules/sirsoft-ecommerce/products/{{route.id}}/downloadable-coupons",
"method": "GET",
"auto_fetch": true,
"auth_mode": "optional",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "sirsoft-basic",
"version": "1.0.1",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sirsoft-basic",
"version": "1.0.1",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@dnd-kit/core": "^6.3.1",
@@ -1,6 +1,6 @@
{
"name": "sirsoft-basic",
"version": "1.0.1",
"version": "1.0.0",
"description": "Gnuboard7 Basic User Template Components - Nexibase Style",
"type": "module",
"main": "dist/components.js",
+1 -1
View File
@@ -126,7 +126,7 @@
}
},
{
"path": "/{{_global.modules?.['sirsoft-ecommerce']?.basic_info?.no_route ? '' : (_global.modules?.['sirsoft-ecommerce']?.basic_info?.route_path ?? 'shop')}}/products/:product_code",
"path": "/{{_global.modules?.['sirsoft-ecommerce']?.basic_info?.no_route ? '' : (_global.modules?.['sirsoft-ecommerce']?.basic_info?.route_path ?? 'shop')}}/products/:id",
"layout": "shop/show",
"auth_required": false,
"meta": {
@@ -1,237 +0,0 @@
/**
* @file admin-cross-navigation.test.tsx
* @description 유저 화면 → 관리자 화면 크로스링크 노출 게이트 회귀 테스트 (이슈 #450)
*
* 검증 항목:
* 1. 게시판: can_access_admin = true → 관리자 진입 링크 2개(게시물 조회 + 게시판 관리) 렌더
* 2. 게시판: can_access_admin = false → 관리자 진입 링크 미렌더
* 3. 상품: can_update = true → 관리자 상품 수정 링크 렌더 + href 검증
* 4. 상품: can_update = false → 관리자 상품 수정 링크 미렌더
* 5. 게이트는 실제 파티셜 JSON(_admin_links.json / _admin_edit_link.json)의 if 표현식과 일치
*/
import React from 'react';
import { describe, it, expect, beforeEach } from 'vitest';
import { createLayoutTest, screen } from '@/core/template-engine/__tests__/utils/layoutTestUtils';
import { ComponentRegistry } from '@/core/template-engine/ComponentRegistry';
// 실제 파티셜 JSON — 게이트 표현식/href 회귀 고정
import adminLinks from '../../../layouts/partials/board/index/_admin_links.json';
import adminEditLink from '../../../layouts/partials/shop/detail/_admin_edit_link.json';
// ============================================================
// 테스트용 컴포넌트
// ============================================================
const TestDiv: React.FC<{ className?: string; children?: React.ReactNode; 'data-testid'?: string }> = ({
className,
children,
'data-testid': testId,
}) => (
<div className={className} data-testid={testId}>
{children}
</div>
);
const TestA: React.FC<{
href?: string;
target?: string;
rel?: string;
title?: string;
className?: string;
children?: React.ReactNode;
'data-testid'?: string;
}> = ({ href, target, rel, title, className, children, 'data-testid': testId }) => (
<a href={href} target={target} rel={rel} title={title} className={className} data-testid={testId}>
{children}
</a>
);
const TestSpan: React.FC<{ className?: string; children?: React.ReactNode; text?: string }> = ({
className,
children,
text,
}) => <span className={className}>{children || text}</span>;
const TestIcon: React.FC<{ name?: string }> = ({ name }) => <i data-icon={name} />;
function setupTestRegistry(): ComponentRegistry {
const registry = ComponentRegistry.getInstance();
const Fragment: React.FC<{ children?: React.ReactNode }> = ({ children }) => <>{children}</>;
(registry as unknown as { registry: Record<string, unknown> }).registry = {
Fragment: { component: Fragment, metadata: { name: 'Fragment', type: 'layout' } },
Div: { component: TestDiv, metadata: { name: 'Div', type: 'basic' } },
A: { component: TestA, metadata: { name: 'A', type: 'basic' } },
Span: { component: TestSpan, metadata: { name: 'Span', type: 'basic' } },
Icon: { component: TestIcon, metadata: { name: 'Icon', type: 'basic' } },
};
return registry;
}
// ============================================================
// 게시판 admin-links 게이트 (can_access_admin)
// ============================================================
const boardAdminLinksLayout = {
version: '1.0.0',
layout_name: 'board_admin_links_test',
data_sources: [
{
id: 'posts',
type: 'api',
endpoint: '/api/modules/sirsoft-board/boards/test/posts',
method: 'GET',
auto_fetch: true,
},
],
components: [
{
type: 'basic',
name: 'A',
if: '{{posts?.data?.abilities?.can_access_admin}}',
props: {
'data-testid': 'board-admin-posts-link',
href: '/admin/board/{{route.slug}}',
target: '_blank',
},
children: [{ type: 'basic', name: 'Span', text: 'Admin posts' }],
},
{
type: 'basic',
name: 'A',
if: '{{posts?.data?.abilities?.can_access_admin}}',
props: {
'data-testid': 'board-admin-manage-link',
href: '/admin/boards/{{route.slug}}/edit',
target: '_blank',
},
children: [{ type: 'basic', name: 'Span', text: 'Board settings' }],
},
],
};
// ============================================================
// 상품 admin edit 게이트 (can_update)
// ============================================================
const productAdminEditLayout = {
version: '1.0.0',
layout_name: 'product_admin_edit_test',
data_sources: [
{
id: 'product',
type: 'api',
endpoint: '/api/modules/sirsoft-ecommerce/products/1',
method: 'GET',
auto_fetch: true,
},
],
components: [
{
type: 'basic',
name: 'A',
if: '{{product.data?.abilities?.can_update}}',
props: {
'data-testid': 'product-admin-edit-link',
href: '/admin/ecommerce/products/{{product.data?.product_code ?? route.product_code}}/edit',
target: '_blank',
},
children: [{ type: 'basic', name: 'Span', text: 'Edit in admin' }],
},
],
};
// ============================================================
// 테스트
// ============================================================
describe('이슈 #450 — 유저→관리자 크로스링크 게이트', () => {
beforeEach(() => {
setupTestRegistry();
});
describe('게시판 관리자 진입 링크 (can_access_admin)', () => {
it('can_access_admin = true → 게시물 조회 + 게시판 관리 링크 2개 렌더', async () => {
const testUtils = createLayoutTest(boardAdminLinksLayout, { routeParams: { slug: 'free' } });
testUtils.mockApi('posts', {
response: { data: { abilities: { can_access_admin: true } } },
});
await testUtils.render();
expect(screen.getByTestId('board-admin-posts-link')).toBeInTheDocument();
expect(screen.getByTestId('board-admin-manage-link')).toBeInTheDocument();
// "게시판 관리" 는 해당 게시판의 개별 설정 화면(/admin/boards/:slug/edit)으로 이동
expect(screen.getByTestId('board-admin-manage-link').getAttribute('href')).toBe('/admin/boards/free/edit');
testUtils.cleanup();
});
it('can_access_admin = false → 관리자 진입 링크 미렌더', async () => {
const testUtils = createLayoutTest(boardAdminLinksLayout);
testUtils.mockApi('posts', {
response: { data: { abilities: { can_access_admin: false } } },
});
await testUtils.render();
expect(screen.queryByTestId('board-admin-posts-link')).not.toBeInTheDocument();
expect(screen.queryByTestId('board-admin-manage-link')).not.toBeInTheDocument();
testUtils.cleanup();
});
});
describe('상품 관리자 수정 링크 (can_update)', () => {
it('can_update = true → 관리자 상품 수정 링크 렌더', async () => {
const testUtils = createLayoutTest(productAdminEditLayout);
testUtils.mockApi('product', {
response: { data: { id: 42, product_code: 'KOWZBDA045RJQHDJ', abilities: { can_update: true } } },
});
await testUtils.render();
const link = screen.getByTestId('product-admin-edit-link');
expect(link).toBeInTheDocument();
// 관리자 편집 링크는 product_code 기준
expect(link.getAttribute('href')).toBe('/admin/ecommerce/products/KOWZBDA045RJQHDJ/edit');
expect(link.getAttribute('target')).toBe('_blank');
testUtils.cleanup();
});
it('can_update = false → 관리자 상품 수정 링크 미렌더', async () => {
const testUtils = createLayoutTest(productAdminEditLayout);
testUtils.mockApi('product', {
response: { data: { id: 42, product_code: 'KOWZBDA045RJQHDJ', abilities: { can_update: false } } },
});
await testUtils.render();
expect(screen.queryByTestId('product-admin-edit-link')).not.toBeInTheDocument();
testUtils.cleanup();
});
});
// ============================================================
// 실제 파티셜 JSON 게이트/속성 회귀 고정 (구조 분석)
// ============================================================
describe('파티셜 JSON 회귀 고정', () => {
it('_admin_links.json 은 can_access_admin 게이트를 사용한다', () => {
expect((adminLinks as { if?: string }).if).toBe('{{posts?.data?.abilities?.can_access_admin}}');
});
it('_admin_links.json 은 관리자 게시물 조회 + 게시판 관리 링크를 새 탭으로 연다', () => {
const dump = JSON.stringify(adminLinks);
expect(dump).toContain('/admin/board/{{route.slug}}');
// "게시판 관리" 는 개별 게시판 설정 화면(:slug/edit)으로 이동
expect(dump).toContain('/admin/boards/{{route.slug}}/edit');
expect(dump).toContain('"target":"_blank"');
});
it('_admin_edit_link.json 은 can_update 게이트 + 새 탭 + 상품 수정 경로를 사용한다', () => {
expect((adminEditLink as { if?: string }).if).toBe('{{product.data?.abilities?.can_update}}');
const dump = JSON.stringify(adminEditLink);
// 상품 관리자 편집 링크는 product_code 기준
expect(dump).toContain('/admin/ecommerce/products/{{product.data?.product_code ?? route.product_code}}/edit');
expect(dump).toContain('"target":"_blank"');
});
});
});
@@ -8,7 +8,7 @@
*
* 근본 원인 / 수정:
* - 증상2: onSuccess 에 post 데이터소스 refetch 누락 → refetchDataSource(post) 추가
* - 증상1: onError 에 closeModal 누락 → "모달 닫고 토스트"(설계 결정) 로 보강
* - 증상1: onError 에 closeModal 누락 → "모달 닫고 토스트"(PO 결정) 로 보강
*
* 신고 모달은 게시글/댓글 공용 1파일이므로 이 단언이 양쪽을 모두 커버한다.
*/
@@ -99,7 +99,7 @@ describe('신고 모달 제출 피드백 (이슈 #413-60)', () => {
expect(toast?.params?.type).toBe('error');
});
it('onError 에 closeModal 이 있어야 한다 (설계 결정: 실패 시 모달 닫고 토스트)', () => {
it('onError 에 closeModal 이 있어야 한다 (PO 결정: 실패 시 모달 닫고 토스트)', () => {
const close = onError.find((a) => a.handler === 'closeModal');
expect(close).toBeDefined();
});
@@ -207,17 +207,9 @@ export function useFileUploader(options: UseFileUploaderOptions): UseFileUploade
const handleFiles = useCallback(
async (selectedFiles: FileList) => {
const totalCount = existingFiles.length + pendingFiles.length;
const remainingSlots = Math.max(0, maxFiles - totalCount);
const remainingSlots = maxFiles - totalCount;
const filesToAdd = Array.from(selectedFiles).slice(0, remainingSlots);
// 개수 상한 초과분은 조용히 절단하지 않고 안내 (개수 초과 silent 무시 방지)
if (selectedFiles.length > remainingSlots) {
const overflow = Array.from(selectedFiles).slice(remainingSlots);
const message = t('attachment.upload_limit_exceeded', { max: maxFiles });
// 잘린 첫 파일을 대표로 콜백에 전달 (없으면 무시)
onUploadError?.(message, overflow[0] ?? selectedFiles[0]);
}
for (const file of filesToAdd) {
// 크기 검증
if (file.size > maxSize * 1024 * 1024) {
@@ -71,8 +71,6 @@ interface ProductLabel {
interface ProductCardProps {
product: {
id: number;
/** 상품코드 — 상세 페이지 링크 식별자 (product_code 기준 라우팅). 없으면 id 로 폴백 */
product_code?: string;
name?: string | Record<string, string>;
name_localized?: string;
thumbnail_url: string;
@@ -220,9 +218,7 @@ const ProductCard: React.FC<ProductCardProps> = ({
onClick(product.id);
} else {
const base = shopBase === '/' ? '' : shopBase;
// 상세 페이지는 product_code 기준 라우팅. code 미제공 시 id 로 폴백(하위호환).
const identifier = product.product_code ?? product.id;
navigate(`${base}/products/${identifier}`);
navigate(`${base}/products/${product.id}`);
}
};
@@ -1,135 +0,0 @@
/**
* FileUploader 개수 상한 초과 안내 테스트
*
* maxFiles 를 초과해 파일을 선택하면 초과분을 조용히 버리지 않고
* onUploadError 콜백으로 안내한다. (admin_basic 과 동일 동작 — 공통 문구)
*
* @vitest-environment jsdom
* @module composite/__tests__/FileUploaderLimit.test
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { act, renderHook } from '@testing-library/react';
import { useFileUploader } from '../FileUploader/useFileUploader';
import type { Attachment } from '../FileUploader/types';
// G7Core 모킹 (useFileUploader 가 모듈 스코프에서 window.G7Core 를 캐싱하므로
// 새 객체로 교체하지 않고 기존 객체에 프로퍼티를 직접 추가)
beforeEach(() => {
const listeners = new Map<string, Set<Function>>();
if (!(window as any).G7Core) {
(window as any).G7Core = {};
}
const g7 = (window as any).G7Core;
g7.componentEvent = {
on: vi.fn((event: string, callback: Function) => {
if (!listeners.has(event)) {
listeners.set(event, new Set());
}
listeners.get(event)!.add(callback);
return () => {
listeners.get(event)?.delete(callback);
};
}),
emit: vi.fn(),
};
g7.createLogger = vi.fn(() => ({
log: vi.fn(),
warn: vi.fn(),
error: vi.fn(),
}));
});
vi.mock('browser-image-compression', () => ({
default: vi.fn((file: File) => Promise.resolve(file)),
}));
URL.createObjectURL = vi.fn(() => 'blob:mock-url');
URL.revokeObjectURL = vi.fn();
describe('FileUploader - 개수 상한 초과 안내 (useFileUploader 훅)', () => {
const defaultEndpoints = {
upload: '/api/attachments',
delete: '/api/attachments/:id',
reorder: '/api/attachments/reorder',
};
const STABLE_EMPTY_FILES: Attachment[] = [];
const STABLE_EMPTY_ROLE_IDS: number[] = [];
function makeFileList(files: File[]): FileList {
return {
...files,
length: files.length,
item: (i: number) => files[i] ?? null,
} as unknown as FileList;
}
it('maxFiles 초과 시 onUploadError 로 안내하고 상한까지만 추가한다', async () => {
const onUploadError = vi.fn();
const { result } = renderHook(() =>
useFileUploader({
collection: 'test',
maxFiles: 2,
maxSize: 10,
maxConcurrentUploads: 3,
roleIds: STABLE_EMPTY_ROLE_IDS,
autoUpload: false,
initialFiles: STABLE_EMPTY_FILES,
confirmBeforeRemove: false,
onUploadError,
endpoints: defaultEndpoints,
})
);
// 상한(2)보다 많은 3개 선택
const files = [
new File(['1'], 'a.png', { type: 'image/png' }),
new File(['2'], 'b.png', { type: 'image/png' }),
new File(['3'], 'c.png', { type: 'image/png' }),
];
await act(async () => {
await result.current.handleFiles(makeFileList(files));
});
// 초과 안내 콜백 1회 (조용히 버리지 않음)
expect(onUploadError).toHaveBeenCalledTimes(1);
// 상한까지만 추가 (2개)
expect(result.current.pendingFiles).toHaveLength(2);
});
it('상한 이내로 선택하면 onUploadError 를 발화하지 않는다 (오발화 없음)', async () => {
const onUploadError = vi.fn();
const { result } = renderHook(() =>
useFileUploader({
collection: 'test',
maxFiles: 5,
maxSize: 10,
maxConcurrentUploads: 3,
roleIds: STABLE_EMPTY_ROLE_IDS,
autoUpload: false,
initialFiles: STABLE_EMPTY_FILES,
confirmBeforeRemove: false,
onUploadError,
endpoints: defaultEndpoints,
})
);
const files = [
new File(['1'], 'a.png', { type: 'image/png' }),
new File(['2'], 'b.png', { type: 'image/png' }),
];
await act(async () => {
await result.current.handleFiles(makeFileList(files));
});
expect(onUploadError).not.toHaveBeenCalled();
expect(result.current.pendingFiles).toHaveLength(2);
});
});
@@ -5,7 +5,7 @@
"ko": "Basic",
"en": "Basic"
},
"version": "1.0.1",
"version": "1.0.0",
"license": "MIT",
"description": {
"ko": "그누보드7 기본 사용자 템플릿",