@haloduck/ui 2.0.8 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2189,7 +2189,7 @@ class MapToAddressComponent {
2189
2189
  }
2190
2190
  }
2191
2191
  catch (error) {
2192
- this._loadError = 'Google Maps API를 로드할 수 없습니다.';
2192
+ this._loadError = 'Unable to load Google Maps API.';
2193
2193
  isDevMode() && console.error('Failed to load Google Maps API:', error);
2194
2194
  }
2195
2195
  }
@@ -2371,13 +2371,13 @@ class MapToAddressComponent {
2371
2371
  this.disabled = isDisabled;
2372
2372
  }
2373
2373
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: MapToAddressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2374
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: MapToAddressComponent, isStandalone: true, selector: "haloduck-map-to-address", inputs: { disabled: "disabled", language: "language", currentLngLat: "currentLngLat", currentAddress: "currentAddress" }, outputs: { locationChanged: "locationChanged" }, providers: [
2374
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: MapToAddressComponent, isStandalone: true, selector: "haloduck-map-to-address", inputs: { disabled: "disabled", language: "language", currentLngLat: "currentLngLat", currentAddress: "currentAddress" }, outputs: { locationChanged: "locationChanged" }, providers: [
2375
2375
  {
2376
2376
  provide: NG_VALUE_ACCESSOR,
2377
2377
  useExisting: MapToAddressComponent,
2378
2378
  multi: true,
2379
2379
  },
2380
- ], ngImport: i0, template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n <div\n *ngIf=\"!isGoogleLoaded && !loadError\"\n class=\"absolute inset-0 flex items-center justify-center bg-gray-100 z-10\"\n >\n <div class=\"text-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-2\"></div>\n <p class=\"text-gray-600 text-sm\">\uC9C0\uB3C4\uB97C \uB85C\uB529 \uC911\uC785\uB2C8\uB2E4...</p>\n </div>\n </div>\n\n <!-- \uC5D0\uB7EC \uC0C1\uD0DC -->\n <div\n *ngIf=\"loadError\"\n class=\"absolute inset-0 flex items-center justify-center bg-red-50 z-10\"\n >\n <div class=\"text-center p-4\">\n <div class=\"text-red-500 text-2xl mb-2\">\u26A0\uFE0F</div>\n <p class=\"text-red-700 text-sm font-medium\">{{ loadError }}</p>\n <p class=\"text-red-600 text-xs mt-1\">\uC778\uD130\uB137 \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uACE0 \uD398\uC774\uC9C0\uB97C \uC0C8\uB85C\uACE0\uCE68\uD574 \uC8FC\uC138\uC694.</p>\n </div>\n </div>\n\n <div id=\"map\" class=\"w-full h-full\"></div>\n</div>\n", styles: ["#map{border:1px solid #ccc;margin-bottom:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }] });
2380
+ ], ngImport: i0, template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n @if(!isGoogleLoaded && !loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-gray-100 z-10\">\n <div class=\"text-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-2\"></div>\n <p class=\"text-gray-600 text-sm\">\uC9C0\uB3C4\uB97C \uB85C\uB529 \uC911\uC785\uB2C8\uB2E4...</p>\n </div>\n </div>\n }\n\n <!-- \uC5D0\uB7EC \uC0C1\uD0DC -->\n @if(loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-red-50 z-10\">\n <div class=\"text-center p-4\">\n <div class=\"text-red-500 text-2xl mb-2\">\u26A0\uFE0F</div>\n <p class=\"text-red-700 text-sm font-medium\">{{ loadError }}</p>\n <p class=\"text-red-600 text-xs mt-1\">Please check your internet connection and refresh the page.</p>\n </div>\n </div>\n }\n\n <div id=\"map\"\n class=\"w-full h-full\"></div>\n</div>\n", styles: ["#map{border:1px solid #ccc;margin-bottom:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }] });
2381
2381
  }
2382
2382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: MapToAddressComponent, decorators: [{
2383
2383
  type: Component,
@@ -2387,7 +2387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
2387
2387
  useExisting: MapToAddressComponent,
2388
2388
  multi: true,
2389
2389
  },
2390
- ], template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n <div\n *ngIf=\"!isGoogleLoaded && !loadError\"\n class=\"absolute inset-0 flex items-center justify-center bg-gray-100 z-10\"\n >\n <div class=\"text-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-2\"></div>\n <p class=\"text-gray-600 text-sm\">\uC9C0\uB3C4\uB97C \uB85C\uB529 \uC911\uC785\uB2C8\uB2E4...</p>\n </div>\n </div>\n\n <!-- \uC5D0\uB7EC \uC0C1\uD0DC -->\n <div\n *ngIf=\"loadError\"\n class=\"absolute inset-0 flex items-center justify-center bg-red-50 z-10\"\n >\n <div class=\"text-center p-4\">\n <div class=\"text-red-500 text-2xl mb-2\">\u26A0\uFE0F</div>\n <p class=\"text-red-700 text-sm font-medium\">{{ loadError }}</p>\n <p class=\"text-red-600 text-xs mt-1\">\uC778\uD130\uB137 \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uACE0 \uD398\uC774\uC9C0\uB97C \uC0C8\uB85C\uACE0\uCE68\uD574 \uC8FC\uC138\uC694.</p>\n </div>\n </div>\n\n <div id=\"map\" class=\"w-full h-full\"></div>\n</div>\n", styles: ["#map{border:1px solid #ccc;margin-bottom:10px}\n"] }]
2390
+ ], template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n @if(!isGoogleLoaded && !loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-gray-100 z-10\">\n <div class=\"text-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-2\"></div>\n <p class=\"text-gray-600 text-sm\">\uC9C0\uB3C4\uB97C \uB85C\uB529 \uC911\uC785\uB2C8\uB2E4...</p>\n </div>\n </div>\n }\n\n <!-- \uC5D0\uB7EC \uC0C1\uD0DC -->\n @if(loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-red-50 z-10\">\n <div class=\"text-center p-4\">\n <div class=\"text-red-500 text-2xl mb-2\">\u26A0\uFE0F</div>\n <p class=\"text-red-700 text-sm font-medium\">{{ loadError }}</p>\n <p class=\"text-red-600 text-xs mt-1\">Please check your internet connection and refresh the page.</p>\n </div>\n </div>\n }\n\n <div id=\"map\"\n class=\"w-full h-full\"></div>\n</div>\n", styles: ["#map{border:1px solid #ccc;margin-bottom:10px}\n"] }]
2391
2391
  }], propDecorators: { disabled: [{
2392
2392
  type: Input
2393
2393
  }], language: [{
@@ -2784,6 +2784,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
2784
2784
  args: ['label']
2785
2785
  }] } });
2786
2786
 
2787
+ class TabsComponent {
2788
+ tabs = [];
2789
+ selectedIndex = 0;
2790
+ layout = 'vertical';
2791
+ labelWidth = '';
2792
+ selectedIndexChange = new EventEmitter();
2793
+ label;
2794
+ ngOnChanges(changes) {
2795
+ if (changes['tabs']) {
2796
+ this.ensureSelectedInRange();
2797
+ }
2798
+ if (changes['selectedIndex']) {
2799
+ this.ensureSelectedInRange();
2800
+ }
2801
+ }
2802
+ ngAfterViewInit() {
2803
+ // hide label if no content.
2804
+ if (this.label && this.label.nativeElement) {
2805
+ const hasContent = this.label.nativeElement.textContent?.trim();
2806
+ if (!hasContent) {
2807
+ this.label.nativeElement.style.display = 'none';
2808
+ }
2809
+ }
2810
+ }
2811
+ get current() {
2812
+ if (!this.tabs || this.tabs.length === 0)
2813
+ return null;
2814
+ const idx = Math.min(Math.max(this.selectedIndex, 0), this.tabs.length - 1);
2815
+ return this.tabs[idx];
2816
+ }
2817
+ select(index) {
2818
+ if (index < 0 || index >= this.tabs.length)
2819
+ return;
2820
+ this.selectedIndex = index;
2821
+ this.selectedIndexChange.emit(this.selectedIndex);
2822
+ }
2823
+ ensureSelectedInRange() {
2824
+ if (!this.tabs || this.tabs.length === 0) {
2825
+ this.selectedIndex = 0;
2826
+ return;
2827
+ }
2828
+ if (this.selectedIndex < 0)
2829
+ this.selectedIndex = 0;
2830
+ if (this.selectedIndex > this.tabs.length - 1)
2831
+ this.selectedIndex = this.tabs.length - 1;
2832
+ }
2833
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2834
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: TabsComponent, isStandalone: true, selector: "haloduck-tabs", inputs: { tabs: "tabs", selectedIndex: "selectedIndex", layout: "layout", labelWidth: "labelWidth" }, outputs: { selectedIndexChange: "selectedIndexChange" }, viewQueries: [{ propertyName: "label", first: true, predicate: ["label"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex gap-2 items-start w-full\" [ngClass]=\"{'flex-col': layout === 'vertical'}\">\n <label #label class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control {{ labelWidth }}\" [ngClass]=\"{'w-full': layout === 'vertical'}\">\n <ng-content select=\"[slot=label]\"></ng-content>\n </label>\n\n <div class=\"flex-1 w-full\">\n <div class=\"flex items-center gap-1 border-b border-light-inactive dark:border-dark-inactive text-sm/6\">\n @for (tab of tabs; track tab; let i = $index) {\n <button type=\"button\"\n class=\"px-3 py-2 rounded-t-md\"\n [ngClass]=\"{\n 'text-light-on-control dark:text-dark-on-control': i !== selectedIndex,\n 'text-light-primary dark:text-dark-primary border-b-2 border-light-primary dark:border-dark-primary': i === selectedIndex\n }\"\n (click)=\"select(i)\">\n {{ tab.label }}\n </button>\n }\n </div>\n\n <div class=\"mt-3\">\n @if (current) {\n <ng-container *ngComponentOutlet=\"current!.component; inputs: current!.inputs || {}\"></ng-container>\n }\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] });
2835
+ }
2836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: TabsComponent, decorators: [{
2837
+ type: Component,
2838
+ args: [{ selector: 'haloduck-tabs', imports: [CommonModule], template: "<div class=\"flex gap-2 items-start w-full\" [ngClass]=\"{'flex-col': layout === 'vertical'}\">\n <label #label class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control {{ labelWidth }}\" [ngClass]=\"{'w-full': layout === 'vertical'}\">\n <ng-content select=\"[slot=label]\"></ng-content>\n </label>\n\n <div class=\"flex-1 w-full\">\n <div class=\"flex items-center gap-1 border-b border-light-inactive dark:border-dark-inactive text-sm/6\">\n @for (tab of tabs; track tab; let i = $index) {\n <button type=\"button\"\n class=\"px-3 py-2 rounded-t-md\"\n [ngClass]=\"{\n 'text-light-on-control dark:text-dark-on-control': i !== selectedIndex,\n 'text-light-primary dark:text-dark-primary border-b-2 border-light-primary dark:border-dark-primary': i === selectedIndex\n }\"\n (click)=\"select(i)\">\n {{ tab.label }}\n </button>\n }\n </div>\n\n <div class=\"mt-3\">\n @if (current) {\n <ng-container *ngComponentOutlet=\"current!.component; inputs: current!.inputs || {}\"></ng-container>\n }\n </div>\n </div>\n</div>\n" }]
2839
+ }], propDecorators: { tabs: [{
2840
+ type: Input
2841
+ }], selectedIndex: [{
2842
+ type: Input
2843
+ }], layout: [{
2844
+ type: Input
2845
+ }], labelWidth: [{
2846
+ type: Input
2847
+ }], selectedIndexChange: [{
2848
+ type: Output
2849
+ }], label: [{
2850
+ type: ViewChild,
2851
+ args: ['label']
2852
+ }] } });
2853
+
2787
2854
  class BreadcrumbService {
2788
2855
  router;
2789
2856
  coreService = inject(CoreService);
@@ -2896,5 +2963,5 @@ const provideHaloduckTransloco = () => provideTranslocoScope({
2896
2963
  * Generated bundle index. Do not edit.
2897
2964
  */
2898
2965
 
2899
- export { AuthenticateComponent, BreadcrumbComponent, ButtonComponent, CalendarComponent, ConfirmDialogService, CopyButtonComponent, DatePickerComponent, DateRangeComponent, DialogService, DrawCanvasComponent, ERROR_NOT_ACCEPTABLE_FILE_TYPE, ERROR_OVER_COUNT, ERROR_OVER_SIZE, ERROR_UPLOAD, FileUploaderComponent, FlipComponent, ImageUploaderComponent, ImageViewerComponent, InputComponent, LanguageSelectorComponent, MapToAddressComponent, NotificationComponent, NotificationService, PictureNameComponent, SelectComponent, SelectDropdownComponent, SideMenuComponent, SideMenuItemComponent, StlViewerComponent, TableComponent, ToggleComponent, dateToString, provideHaloduckTransloco };
2966
+ export { AuthenticateComponent, BreadcrumbComponent, ButtonComponent, CalendarComponent, ConfirmDialogService, CopyButtonComponent, DatePickerComponent, DateRangeComponent, DialogService, DrawCanvasComponent, ERROR_NOT_ACCEPTABLE_FILE_TYPE, ERROR_OVER_COUNT, ERROR_OVER_SIZE, ERROR_UPLOAD, FileUploaderComponent, FlipComponent, ImageUploaderComponent, ImageViewerComponent, InputComponent, LanguageSelectorComponent, MapToAddressComponent, NotificationComponent, NotificationService, PictureNameComponent, SelectComponent, SelectDropdownComponent, SideMenuComponent, SideMenuItemComponent, StlViewerComponent, TableComponent, TabsComponent, ToggleComponent, dateToString, provideHaloduckTransloco };
2900
2967
  //# sourceMappingURL=haloduck-ui.mjs.map