@shival99/z-ui 2.1.32 → 2.2.0

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.
Files changed (104) hide show
  1. package/fesm2022/shival99-z-ui-components-z-accordion.mjs +41 -25
  2. package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +176 -97
  4. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-avatar.mjs +71 -40
  6. package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +26 -15
  8. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-button-group.mjs +33 -21
  10. package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-button.mjs +32 -19
  12. package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +289 -172
  14. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  15. package/fesm2022/shival99-z-ui-components-z-card.mjs +34 -24
  16. package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-chat.mjs +85 -47
  18. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
  19. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +56 -31
  20. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
  21. package/fesm2022/shival99-z-ui-components-z-code.mjs +29 -16
  22. package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
  23. package/fesm2022/shival99-z-ui-components-z-command.mjs +34 -19
  24. package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +310 -88
  26. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +32 -18
  28. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-editor.mjs +118 -62
  30. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  31. package/fesm2022/shival99-z-ui-components-z-empty.mjs +31 -17
  32. package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
  33. package/fesm2022/shival99-z-ui-components-z-filter.mjs +81 -54
  34. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
  35. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +240 -132
  36. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  37. package/fesm2022/shival99-z-ui-components-z-icon.mjs +39 -21
  38. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
  39. package/fesm2022/shival99-z-ui-components-z-input.mjs +173 -95
  40. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
  41. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +88 -47
  42. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  43. package/fesm2022/shival99-z-ui-components-z-loading.mjs +31 -19
  44. package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
  45. package/fesm2022/shival99-z-ui-components-z-marquee.mjs +42 -23
  46. package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -1
  47. package/fesm2022/shival99-z-ui-components-z-media-player.mjs +87 -45
  48. package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
  49. package/fesm2022/shival99-z-ui-components-z-menu.mjs +126 -67
  50. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  51. package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +42 -23
  52. package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -1
  53. package/fesm2022/shival99-z-ui-components-z-modal.mjs +144 -80
  54. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  55. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +45 -24
  56. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
  57. package/fesm2022/shival99-z-ui-components-z-popover.mjs +90 -57
  58. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
  59. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +51 -29
  60. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
  61. package/fesm2022/shival99-z-ui-components-z-radio.mjs +36 -20
  62. package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
  63. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +27 -15
  64. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
  65. package/fesm2022/shival99-z-ui-components-z-select.mjs +239 -138
  66. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
  67. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +38 -21
  68. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
  69. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +42 -23
  70. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -1
  71. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +35 -19
  72. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
  73. package/fesm2022/shival99-z-ui-components-z-steps.mjs +55 -31
  74. package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
  75. package/fesm2022/shival99-z-ui-components-z-switch.mjs +60 -33
  76. package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
  77. package/fesm2022/shival99-z-ui-components-z-table.mjs +10875 -0
  78. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
  79. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +534 -0
  80. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
  81. package/fesm2022/shival99-z-ui-components-z-tags.mjs +72 -46
  82. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
  83. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +254 -0
  84. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
  85. package/fesm2022/shival99-z-ui-components-z-toast.mjs +53 -31
  86. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  87. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +133 -56
  88. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
  89. package/fesm2022/shival99-z-ui-components-z-upload.mjs +63 -36
  90. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
  91. package/fesm2022/shival99-z-ui-i18n.mjs +2 -0
  92. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
  93. package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
  94. package/fesm2022/shival99-z-ui-services.mjs +35 -31
  95. package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
  96. package/package.json +16 -16
  97. package/types/shival99-z-ui-components-z-autocomplete.d.ts +2 -2
  98. package/types/shival99-z-ui-components-z-card.d.ts +1 -2
  99. package/types/shival99-z-ui-components-z-drawer.d.ts +20 -2
  100. package/types/shival99-z-ui-components-z-gallery.d.ts +1 -2
  101. package/types/shival99-z-ui-components-z-select.d.ts +2 -2
  102. package/types/shival99-z-ui-components-z-table.d.ts +2293 -0
  103. package/types/shival99-z-ui-components-z-tabs.d.ts +92 -0
  104. package/types/shival99-z-ui-components-z-timeline.d.ts +71 -0
@@ -8,29 +8,44 @@ import { zTransform, zMergeClasses } from '@shival99/z-ui/utils';
8
8
  class ZShowMoreComponent {
9
9
  _destroyRef = inject(DestroyRef);
10
10
  // Inputs
11
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
12
- zMaxHeight = input(150, ...(ngDevMode ? [{ debugName: "zMaxHeight" }] : []));
13
- zShowMoreLabel = input(undefined, ...(ngDevMode ? [{ debugName: "zShowMoreLabel" }] : []));
14
- zShowLessLabel = input(undefined, ...(ngDevMode ? [{ debugName: "zShowLessLabel" }] : []));
15
- zShowLessButton = input(true, ...(ngDevMode ? [{ debugName: "zShowLessButton" }] : []));
16
- zButtonType = input('ghost-primary', ...(ngDevMode ? [{ debugName: "zButtonType" }] : []));
17
- zButtonSize = input('sm', ...(ngDevMode ? [{ debugName: "zButtonSize" }] : []));
18
- zWave = input(false, { ...(ngDevMode ? { debugName: "zWave" } : {}), transform: zTransform });
19
- zBlurHeight = input(64, ...(ngDevMode ? [{ debugName: "zBlurHeight" }] : []));
20
- zBlurColor = input(undefined, ...(ngDevMode ? [{ debugName: "zBlurColor" }] : []));
11
+ class = input('', /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
13
+ zMaxHeight = input(150, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "zMaxHeight" }] : /* istanbul ignore next */ []));
15
+ zShowMoreLabel = input(undefined, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "zShowMoreLabel" }] : /* istanbul ignore next */ []));
17
+ zShowLessLabel = input(undefined, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "zShowLessLabel" }] : /* istanbul ignore next */ []));
19
+ zShowLessButton = input(true, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "zShowLessButton" }] : /* istanbul ignore next */ []));
21
+ zButtonType = input('ghost-primary', /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "zButtonType" }] : /* istanbul ignore next */ []));
23
+ zButtonSize = input('sm', /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "zButtonSize" }] : /* istanbul ignore next */ []));
25
+ zWave = input(false, { ...(ngDevMode ? { debugName: "zWave" } : /* istanbul ignore next */ {}), transform: zTransform });
26
+ zBlurHeight = input(64, /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "zBlurHeight" }] : /* istanbul ignore next */ []));
28
+ zBlurColor = input(undefined, /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "zBlurColor" }] : /* istanbul ignore next */ []));
21
30
  // Outputs
22
31
  zExpandChange = output();
23
32
  // Queries
24
- _contentContainer = viewChild('contentContainer', ...(ngDevMode ? [{ debugName: "_contentContainer" }] : []));
25
- _contentInner = viewChild('contentInner', ...(ngDevMode ? [{ debugName: "_contentInner" }] : []));
33
+ _contentContainer = viewChild('contentContainer', /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "_contentContainer" }] : /* istanbul ignore next */ []));
35
+ _contentInner = viewChild('contentInner', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "_contentInner" }] : /* istanbul ignore next */ []));
26
37
  // State
27
- _isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : []));
28
- _isOverflowing = signal(false, ...(ngDevMode ? [{ debugName: "_isOverflowing" }] : []));
29
- _scrollHeight = signal(0, ...(ngDevMode ? [{ debugName: "_scrollHeight" }] : []));
38
+ _isExpanded = signal(false, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
40
+ _isOverflowing = signal(false, /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "_isOverflowing" }] : /* istanbul ignore next */ []));
42
+ _scrollHeight = signal(0, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "_scrollHeight" }] : /* istanbul ignore next */ []));
30
44
  // Readonly bindings for template
31
45
  isExpanded = this._isExpanded.asReadonly();
32
46
  isOverflowing = this._isOverflowing.asReadonly();
33
- zClasses = computed(() => zMergeClasses('block w-full', this.class()), ...(ngDevMode ? [{ debugName: "zClasses" }] : []));
47
+ zClasses = computed(() => zMergeClasses('block w-full', this.class()), /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "zClasses" }] : /* istanbul ignore next */ []));
34
49
  computedMaxHeight = computed(() => {
35
50
  if (!this._isOverflowing()) {
36
51
  return 'none';
@@ -40,7 +55,8 @@ class ZShowMoreComponent {
40
55
  }
41
56
  const maxH = this.zMaxHeight();
42
57
  return typeof maxH === 'number' ? `${maxH}px` : maxH;
43
- }, ...(ngDevMode ? [{ debugName: "computedMaxHeight" }] : []));
58
+ }, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "computedMaxHeight" }] : /* istanbul ignore next */ []));
44
60
  // Tạo linear gradient mờ dần xuống nền (card/page)
45
61
  blurGradientStyle = computed(() => {
46
62
  const bg = this.zBlurColor() || 'var(--card, var(--background, #fff))';
@@ -48,7 +64,8 @@ class ZShowMoreComponent {
48
64
  'background-image': `linear-gradient(to top, ${bg} 0%, transparent 100%)`,
49
65
  height: `${this.zBlurHeight()}px`,
50
66
  };
51
- }, ...(ngDevMode ? [{ debugName: "blurGradientStyle" }] : []));
67
+ }, /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "blurGradientStyle" }] : /* istanbul ignore next */ []));
52
69
  constructor() {
53
70
  afterNextRender(() => {
54
71
  const innerEl = this._contentInner()?.nativeElement;
@@ -103,10 +120,10 @@ class ZShowMoreComponent {
103
120
  this._isExpanded.set(nextState);
104
121
  this.zExpandChange.emit(nextState);
105
122
  }
106
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZShowMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
107
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZShowMoreComponent, isStandalone: true, selector: "z-show-more", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zMaxHeight: { classPropertyName: "zMaxHeight", publicName: "zMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, zShowMoreLabel: { classPropertyName: "zShowMoreLabel", publicName: "zShowMoreLabel", isSignal: true, isRequired: false, transformFunction: null }, zShowLessLabel: { classPropertyName: "zShowLessLabel", publicName: "zShowLessLabel", isSignal: true, isRequired: false, transformFunction: null }, zShowLessButton: { classPropertyName: "zShowLessButton", publicName: "zShowLessButton", isSignal: true, isRequired: false, transformFunction: null }, zButtonType: { classPropertyName: "zButtonType", publicName: "zButtonType", isSignal: true, isRequired: false, transformFunction: null }, zButtonSize: { classPropertyName: "zButtonSize", publicName: "zButtonSize", isSignal: true, isRequired: false, transformFunction: null }, zWave: { classPropertyName: "zWave", publicName: "zWave", isSignal: true, isRequired: false, transformFunction: null }, zBlurHeight: { classPropertyName: "zBlurHeight", publicName: "zBlurHeight", isSignal: true, isRequired: false, transformFunction: null }, zBlurColor: { classPropertyName: "zBlurColor", publicName: "zBlurColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zExpandChange: "zExpandChange" }, host: { properties: { "class": "zClasses()" } }, viewQueries: [{ propertyName: "_contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }, { propertyName: "_contentInner", first: true, predicate: ["contentInner"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>\n </div>\n }\n</div>\n", styles: [".z-show-more-content{will-change:max-height}\n"], dependencies: [{ kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZShowMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZShowMoreComponent, isStandalone: true, selector: "z-show-more", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zMaxHeight: { classPropertyName: "zMaxHeight", publicName: "zMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, zShowMoreLabel: { classPropertyName: "zShowMoreLabel", publicName: "zShowMoreLabel", isSignal: true, isRequired: false, transformFunction: null }, zShowLessLabel: { classPropertyName: "zShowLessLabel", publicName: "zShowLessLabel", isSignal: true, isRequired: false, transformFunction: null }, zShowLessButton: { classPropertyName: "zShowLessButton", publicName: "zShowLessButton", isSignal: true, isRequired: false, transformFunction: null }, zButtonType: { classPropertyName: "zButtonType", publicName: "zButtonType", isSignal: true, isRequired: false, transformFunction: null }, zButtonSize: { classPropertyName: "zButtonSize", publicName: "zButtonSize", isSignal: true, isRequired: false, transformFunction: null }, zWave: { classPropertyName: "zWave", publicName: "zWave", isSignal: true, isRequired: false, transformFunction: null }, zBlurHeight: { classPropertyName: "zBlurHeight", publicName: "zBlurHeight", isSignal: true, isRequired: false, transformFunction: null }, zBlurColor: { classPropertyName: "zBlurColor", publicName: "zBlurColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zExpandChange: "zExpandChange" }, host: { properties: { "class": "zClasses()" } }, viewQueries: [{ propertyName: "_contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }, { propertyName: "_contentInner", first: true, predicate: ["contentInner"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>\n </div>\n }\n</div>\n", styles: [".z-show-more-content{will-change:max-height}\n"], dependencies: [{ kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
108
125
  }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZShowMoreComponent, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZShowMoreComponent, decorators: [{
110
127
  type: Component,
111
128
  args: [{ selector: 'z-show-more', imports: [ZButtonComponent, ZIconComponent, TranslatePipe], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
112
129
  '[class]': 'zClasses()',
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-components-z-show-more.mjs","sources":["../../../../libs/core-ui/components/z-show-more/z-show-more.component.ts","../../../../libs/core-ui/components/z-show-more/z-show-more.component.html","../../../../libs/core-ui/components/z-show-more/shival99-z-ui-components-z-show-more.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n signal,\n viewChild,\n afterNextRender,\n ViewEncapsulation,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent, type ZButtonVariants } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'z-show-more',\n imports: [ZButtonComponent, ZIconComponent, TranslatePipe],\n standalone: true,\n templateUrl: './z-show-more.component.html',\n styleUrl: './z-show-more.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n },\n})\nexport class ZShowMoreComponent {\n private readonly _destroyRef = inject(DestroyRef);\n\n // Inputs\n public readonly class = input<ClassValue>('');\n public readonly zMaxHeight = input<number | string>(150);\n public readonly zShowMoreLabel = input<string | undefined>(undefined);\n public readonly zShowLessLabel = input<string | undefined>(undefined);\n public readonly zShowLessButton = input<boolean>(true);\n public readonly zButtonType = input<ZButtonVariants['zType']>('ghost-primary');\n public readonly zButtonSize = input<ZButtonVariants['zSize']>('sm');\n public readonly zWave = input(false, { transform: zTransform });\n public readonly zBlurHeight = input<number>(64);\n public readonly zBlurColor = input<string | undefined>(undefined);\n\n // Outputs\n public readonly zExpandChange = output<boolean>();\n\n // Queries\n private readonly _contentContainer = viewChild<ElementRef<HTMLElement>>('contentContainer');\n private readonly _contentInner = viewChild<ElementRef<HTMLElement>>('contentInner');\n\n // State\n private readonly _isExpanded = signal(false);\n private readonly _isOverflowing = signal(false);\n private readonly _scrollHeight = signal(0);\n\n // Readonly bindings for template\n protected readonly isExpanded = this._isExpanded.asReadonly();\n protected readonly isOverflowing = this._isOverflowing.asReadonly();\n\n protected readonly zClasses = computed(() => zMergeClasses('block w-full', this.class()));\n\n protected readonly computedMaxHeight = computed(() => {\n if (!this._isOverflowing()) {\n return 'none';\n }\n if (this._isExpanded()) {\n return `${this._scrollHeight()}px`;\n }\n const maxH = this.zMaxHeight();\n return typeof maxH === 'number' ? `${maxH}px` : maxH;\n });\n\n // Tạo linear gradient mờ dần xuống nền (card/page)\n protected readonly blurGradientStyle = computed(() => {\n const bg = this.zBlurColor() || 'var(--card, var(--background, #fff))';\n return {\n 'background-image': `linear-gradient(to top, ${bg} 0%, transparent 100%)`,\n height: `${this.zBlurHeight()}px`,\n };\n });\n\n constructor() {\n afterNextRender(() => {\n const innerEl = this._contentInner()?.nativeElement;\n if (!innerEl) {\n return;\n }\n\n // Kiểm tra chiều cao nội dung thực tế so với chiều cao tối đa giới hạn\n const checkOverflow = () => {\n const { scrollHeight } = innerEl;\n this._scrollHeight.set(scrollHeight);\n\n const maxH = this.zMaxHeight();\n if (typeof maxH === 'number') {\n this._isOverflowing.set(scrollHeight > maxH);\n return;\n }\n\n // Nếu zMaxHeight là string (ví dụ: '100%', 'calc(100% - 40px)')\n const contentEl = this._contentContainer()?.nativeElement;\n if (!contentEl) {\n return;\n }\n\n // Tạm thời tắt transition để đo chiều cao chính xác mà không bị ảnh hưởng bởi chuyển động\n const originalTransition = contentEl.style.transition;\n const originalMaxHeight = contentEl.style.maxHeight;\n\n contentEl.style.transition = 'none';\n contentEl.style.maxHeight = maxH;\n\n // Force reflow để trình duyệt tính toán lại layout\n const collapsedClientHeight = contentEl.clientHeight;\n\n // Khôi phục lại trạng thái ban đầu\n contentEl.style.maxHeight = originalMaxHeight;\n // Force reflow để tránh giật lag khi phục hồi transition\n void contentEl.offsetHeight;\n contentEl.style.transition = originalTransition;\n\n // Nếu phần tử đang ẩn (display: none) thì bỏ qua\n if (collapsedClientHeight === 0 && contentEl.offsetWidth === 0) {\n return;\n }\n\n this._isOverflowing.set(scrollHeight > collapsedClientHeight);\n };\n\n checkOverflow();\n\n // Sử dụng ResizeObserver để lắng nghe thay đổi kích thước của phần tử nội dung bên trong\n const resizeObserver = new ResizeObserver(() => {\n checkOverflow();\n });\n\n resizeObserver.observe(innerEl);\n\n this._destroyRef.onDestroy(() => {\n resizeObserver.disconnect();\n });\n });\n }\n\n protected toggle(): void {\n const nextState = !this._isExpanded();\n this._isExpanded.set(nextState);\n this.zExpandChange.emit(nextState);\n }\n}\n","<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAgCa,kBAAkB,CAAA;AACZ,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;;AAGjC,IAAA,KAAK,GAAG,KAAK,CAAa,EAAE,iDAAC;AAC7B,IAAA,UAAU,GAAG,KAAK,CAAkB,GAAG,sDAAC;AACxC,IAAA,cAAc,GAAG,KAAK,CAAqB,SAAS,0DAAC;AACrD,IAAA,cAAc,GAAG,KAAK,CAAqB,SAAS,0DAAC;AACrD,IAAA,eAAe,GAAG,KAAK,CAAU,IAAI,2DAAC;AACtC,IAAA,WAAW,GAAG,KAAK,CAA2B,eAAe,uDAAC;AAC9D,IAAA,WAAW,GAAG,KAAK,CAA2B,IAAI,uDAAC;IACnD,KAAK,GAAG,KAAK,CAAC,KAAK,kDAAI,SAAS,EAAE,UAAU,EAAA,CAAG;AAC/C,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAC/B,IAAA,UAAU,GAAG,KAAK,CAAqB,SAAS,sDAAC;;IAGjD,aAAa,GAAG,MAAM,EAAW;;AAGhC,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BAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,kBAAkB,uEACtB,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpDpF;;AAEG;;;;"}
1
+ {"version":3,"file":"shival99-z-ui-components-z-show-more.mjs","sources":["../../../../libs/core-ui/components/z-show-more/z-show-more.component.ts","../../../../libs/core-ui/components/z-show-more/z-show-more.component.html","../../../../libs/core-ui/components/z-show-more/shival99-z-ui-components-z-show-more.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n signal,\n viewChild,\n afterNextRender,\n ViewEncapsulation,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent, type ZButtonVariants } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'z-show-more',\n imports: [ZButtonComponent, ZIconComponent, TranslatePipe],\n standalone: true,\n templateUrl: './z-show-more.component.html',\n styleUrl: './z-show-more.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n },\n})\nexport class ZShowMoreComponent {\n private readonly _destroyRef = inject(DestroyRef);\n\n // Inputs\n public readonly class = input<ClassValue>('');\n public readonly zMaxHeight = input<number | string>(150);\n public readonly zShowMoreLabel = input<string | undefined>(undefined);\n public readonly zShowLessLabel = input<string | undefined>(undefined);\n public readonly zShowLessButton = input<boolean>(true);\n public readonly zButtonType = input<ZButtonVariants['zType']>('ghost-primary');\n public readonly zButtonSize = input<ZButtonVariants['zSize']>('sm');\n public readonly zWave = input(false, { transform: zTransform });\n public readonly zBlurHeight = input<number>(64);\n public readonly zBlurColor = input<string | undefined>(undefined);\n\n // Outputs\n public readonly zExpandChange = output<boolean>();\n\n // Queries\n private readonly _contentContainer = viewChild<ElementRef<HTMLElement>>('contentContainer');\n private readonly _contentInner = viewChild<ElementRef<HTMLElement>>('contentInner');\n\n // State\n private readonly _isExpanded = signal(false);\n private readonly _isOverflowing = signal(false);\n private readonly _scrollHeight = signal(0);\n\n // Readonly bindings for template\n protected readonly isExpanded = this._isExpanded.asReadonly();\n protected readonly isOverflowing = this._isOverflowing.asReadonly();\n\n protected readonly zClasses = computed(() => zMergeClasses('block w-full', this.class()));\n\n protected readonly computedMaxHeight = computed(() => {\n if (!this._isOverflowing()) {\n return 'none';\n }\n if (this._isExpanded()) {\n return `${this._scrollHeight()}px`;\n }\n const maxH = this.zMaxHeight();\n return typeof maxH === 'number' ? `${maxH}px` : maxH;\n });\n\n // Tạo linear gradient mờ dần xuống nền (card/page)\n protected readonly blurGradientStyle = computed(() => {\n const bg = this.zBlurColor() || 'var(--card, var(--background, #fff))';\n return {\n 'background-image': `linear-gradient(to top, ${bg} 0%, transparent 100%)`,\n height: `${this.zBlurHeight()}px`,\n };\n });\n\n constructor() {\n afterNextRender(() => {\n const innerEl = this._contentInner()?.nativeElement;\n if (!innerEl) {\n return;\n }\n\n // Kiểm tra chiều cao nội dung thực tế so với chiều cao tối đa giới hạn\n const checkOverflow = () => {\n const { scrollHeight } = innerEl;\n this._scrollHeight.set(scrollHeight);\n\n const maxH = this.zMaxHeight();\n if (typeof maxH === 'number') {\n this._isOverflowing.set(scrollHeight > maxH);\n return;\n }\n\n // Nếu zMaxHeight là string (ví dụ: '100%', 'calc(100% - 40px)')\n const contentEl = this._contentContainer()?.nativeElement;\n if (!contentEl) {\n return;\n }\n\n // Tạm thời tắt transition để đo chiều cao chính xác mà không bị ảnh hưởng bởi chuyển động\n const originalTransition = contentEl.style.transition;\n const originalMaxHeight = contentEl.style.maxHeight;\n\n contentEl.style.transition = 'none';\n contentEl.style.maxHeight = maxH;\n\n // Force reflow để trình duyệt tính toán lại layout\n const collapsedClientHeight = contentEl.clientHeight;\n\n // Khôi phục lại trạng thái ban đầu\n contentEl.style.maxHeight = originalMaxHeight;\n // Force reflow để tránh giật lag khi phục hồi transition\n void contentEl.offsetHeight;\n contentEl.style.transition = originalTransition;\n\n // Nếu phần tử đang ẩn (display: none) thì bỏ qua\n if (collapsedClientHeight === 0 && contentEl.offsetWidth === 0) {\n return;\n }\n\n this._isOverflowing.set(scrollHeight > collapsedClientHeight);\n };\n\n checkOverflow();\n\n // Sử dụng ResizeObserver để lắng nghe thay đổi kích thước của phần tử nội dung bên trong\n const resizeObserver = new ResizeObserver(() => {\n checkOverflow();\n });\n\n resizeObserver.observe(innerEl);\n\n this._destroyRef.onDestroy(() => {\n resizeObserver.disconnect();\n });\n });\n }\n\n protected toggle(): void {\n const nextState = !this._isExpanded();\n this._isExpanded.set(nextState);\n this.zExpandChange.emit(nextState);\n }\n}\n","<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>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AA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,kBAAkB,uEACtB,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpDpF;;AAEG;;;;"}
@@ -5,36 +5,54 @@ import { zTransform, zMergeClasses } from '@shival99/z-ui/utils';
5
5
  import { SkeletonComponent } from 'boneyard-js/angular';
6
6
 
7
7
  class ZSkeletonAutoComponent {
8
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
9
- zLoading = input(false, { ...(ngDevMode ? { debugName: "zLoading" } : {}), transform: zTransform });
10
- zName = input('z-skeleton-auto', ...(ngDevMode ? [{ debugName: "zName" }] : []));
11
- zColor = input('#e0e0e0', ...(ngDevMode ? [{ debugName: "zColor" }] : []));
12
- zDarkColor = input('#374151', ...(ngDevMode ? [{ debugName: "zDarkColor" }] : []));
13
- zAnimate = input('shimmer', ...(ngDevMode ? [{ debugName: "zAnimate" }] : []));
14
- zWavePreset = input('legacy-strong', ...(ngDevMode ? [{ debugName: "zWavePreset" }] : []));
15
- zWaveDuration = input(1.5, ...(ngDevMode ? [{ debugName: "zWaveDuration" }] : []));
16
- zInitialBones = input(undefined, ...(ngDevMode ? [{ debugName: "zInitialBones" }] : []));
17
- zStagger = input(false, ...(ngDevMode ? [{ debugName: "zStagger" }] : []));
18
- zTransition = input(false, ...(ngDevMode ? [{ debugName: "zTransition" }] : []));
19
- zBoneClass = input('', ...(ngDevMode ? [{ debugName: "zBoneClass" }] : []));
20
- zFallbackRows = input(3, ...(ngDevMode ? [{ debugName: "zFallbackRows" }] : []));
21
- zFallbackGap = input(8, ...(ngDevMode ? [{ debugName: "zFallbackGap" }] : []));
22
- zFallbackRowHeight = input('12px', ...(ngDevMode ? [{ debugName: "zFallbackRowHeight" }] : []));
23
- zFallbackRadius = input('4px', ...(ngDevMode ? [{ debugName: "zFallbackRadius" }] : []));
24
- containerClass = computed(() => zMergeClasses('block w-full', this.class()), ...(ngDevMode ? [{ debugName: "containerClass" }] : []));
8
+ class = input('', /* @ts-ignore */
9
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
10
+ zLoading = input(false, { ...(ngDevMode ? { debugName: "zLoading" } : /* istanbul ignore next */ {}), transform: zTransform });
11
+ zName = input('z-skeleton-auto', /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "zName" }] : /* istanbul ignore next */ []));
13
+ zColor = input('#e0e0e0', /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "zColor" }] : /* istanbul ignore next */ []));
15
+ zDarkColor = input('#374151', /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "zDarkColor" }] : /* istanbul ignore next */ []));
17
+ zAnimate = input('shimmer', /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "zAnimate" }] : /* istanbul ignore next */ []));
19
+ zWavePreset = input('legacy-strong', /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "zWavePreset" }] : /* istanbul ignore next */ []));
21
+ zWaveDuration = input(1.5, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "zWaveDuration" }] : /* istanbul ignore next */ []));
23
+ zInitialBones = input(undefined, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "zInitialBones" }] : /* istanbul ignore next */ []));
25
+ zStagger = input(false, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "zStagger" }] : /* istanbul ignore next */ []));
27
+ zTransition = input(false, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "zTransition" }] : /* istanbul ignore next */ []));
29
+ zBoneClass = input('', /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "zBoneClass" }] : /* istanbul ignore next */ []));
31
+ zFallbackRows = input(3, /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "zFallbackRows" }] : /* istanbul ignore next */ []));
33
+ zFallbackGap = input(8, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "zFallbackGap" }] : /* istanbul ignore next */ []));
35
+ zFallbackRowHeight = input('12px', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "zFallbackRowHeight" }] : /* istanbul ignore next */ []));
37
+ zFallbackRadius = input('4px', /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "zFallbackRadius" }] : /* istanbul ignore next */ []));
39
+ containerClass = computed(() => zMergeClasses('block w-full', this.class()), /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
25
41
  effectiveAnimate = computed(() => {
26
42
  if (this.zWavePreset() === 'legacy-strong') {
27
43
  return false;
28
44
  }
29
45
  return this.zAnimate();
30
- }, ...(ngDevMode ? [{ debugName: "effectiveAnimate" }] : []));
46
+ }, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "effectiveAnimate" }] : /* istanbul ignore next */ []));
31
48
  waveDurationStyle = computed(() => {
32
49
  const seconds = this.zWaveDuration();
33
50
  if (seconds <= 0) {
34
51
  return '1.5s';
35
52
  }
36
53
  return `${seconds}s`;
37
- }, ...(ngDevMode ? [{ debugName: "waveDurationStyle" }] : []));
54
+ }, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "waveDurationStyle" }] : /* istanbul ignore next */ []));
38
56
  resolvedBoneClass = computed(() => {
39
57
  const presetClass = this.zWavePreset() === 'legacy-strong' ? 'z-skeleton-auto-bone-legacy' : '';
40
58
  const merged = zMergeClasses(presetClass, this.zBoneClass());
@@ -42,11 +60,12 @@ class ZSkeletonAutoComponent {
42
60
  return undefined;
43
61
  }
44
62
  return merged;
45
- }, ...(ngDevMode ? [{ debugName: "resolvedBoneClass" }] : []));
46
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSkeletonAutoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: ZSkeletonAutoComponent, isStandalone: true, selector: "z-skeleton-auto", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zName: { classPropertyName: "zName", publicName: "zName", isSignal: true, isRequired: false, transformFunction: null }, zColor: { classPropertyName: "zColor", publicName: "zColor", isSignal: true, isRequired: false, transformFunction: null }, zDarkColor: { classPropertyName: "zDarkColor", publicName: "zDarkColor", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zWavePreset: { classPropertyName: "zWavePreset", publicName: "zWavePreset", isSignal: true, isRequired: false, transformFunction: null }, zWaveDuration: { classPropertyName: "zWaveDuration", publicName: "zWaveDuration", isSignal: true, isRequired: false, transformFunction: null }, zInitialBones: { classPropertyName: "zInitialBones", publicName: "zInitialBones", isSignal: true, isRequired: false, transformFunction: null }, zStagger: { classPropertyName: "zStagger", publicName: "zStagger", isSignal: true, isRequired: false, transformFunction: null }, zTransition: { classPropertyName: "zTransition", publicName: "zTransition", isSignal: true, isRequired: false, transformFunction: null }, zBoneClass: { classPropertyName: "zBoneClass", publicName: "zBoneClass", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRows: { classPropertyName: "zFallbackRows", publicName: "zFallbackRows", isSignal: true, isRequired: false, transformFunction: null }, zFallbackGap: { classPropertyName: "zFallbackGap", publicName: "zFallbackGap", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRowHeight: { classPropertyName: "zFallbackRowHeight", publicName: "zFallbackRowHeight", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRadius: { classPropertyName: "zFallbackRadius", publicName: "zFallbackRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--z-skeleton-auto-wave-duration": "waveDurationStyle()" } }, ngImport: i0, template: "<boneyard-skeleton\n [loading]=\"zLoading()\"\n [name]=\"zName()\"\n [initialBones]=\"zInitialBones()\"\n [color]=\"zColor()\"\n [darkColor]=\"zDarkColor()\"\n [animate]=\"effectiveAnimate()\"\n [stagger]=\"zStagger()\"\n [transition]=\"zTransition()\"\n [boneClass]=\"resolvedBoneClass()\"\n [cssClass]=\"containerClass()\">\n <ng-content />\n\n <div fallback class=\"w-full\">\n <z-skeleton\n zType=\"text\"\n class=\"w-full\"\n [zRows]=\"zFallbackRows()\"\n [zGap]=\"zFallbackGap()\"\n [zHeight]=\"zFallbackRowHeight()\"\n [zRadius]=\"zFallbackRadius()\" />\n </div>\n</boneyard-skeleton>\n", styles: [":host{display:block}:host ::ng-deep .z-skeleton-auto-bone-legacy{position:relative;overflow:hidden}:host ::ng-deep .z-skeleton-auto-bone-legacy:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.42) 50%,transparent 100%);animation:z-skeleton-auto-legacy-wave var(--z-skeleton-auto-wave-duration, 1.5s) infinite}:host-context(.dark) ::ng-deep .z-skeleton-auto-bone-legacy:after{background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.24) 50%,transparent 100%)}@keyframes z-skeleton-auto-legacy-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "boneyard-skeleton", inputs: ["loading", "name", "initialBones", "color", "darkColor", "animate", "stagger", "transition", "boneClass", "cssClass", "snapshotConfig"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
63
+ }, /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "resolvedBoneClass" }] : /* istanbul ignore next */ []));
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZSkeletonAutoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: ZSkeletonAutoComponent, isStandalone: true, selector: "z-skeleton-auto", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zName: { classPropertyName: "zName", publicName: "zName", isSignal: true, isRequired: false, transformFunction: null }, zColor: { classPropertyName: "zColor", publicName: "zColor", isSignal: true, isRequired: false, transformFunction: null }, zDarkColor: { classPropertyName: "zDarkColor", publicName: "zDarkColor", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zWavePreset: { classPropertyName: "zWavePreset", publicName: "zWavePreset", isSignal: true, isRequired: false, transformFunction: null }, zWaveDuration: { classPropertyName: "zWaveDuration", publicName: "zWaveDuration", isSignal: true, isRequired: false, transformFunction: null }, zInitialBones: { classPropertyName: "zInitialBones", publicName: "zInitialBones", isSignal: true, isRequired: false, transformFunction: null }, zStagger: { classPropertyName: "zStagger", publicName: "zStagger", isSignal: true, isRequired: false, transformFunction: null }, zTransition: { classPropertyName: "zTransition", publicName: "zTransition", isSignal: true, isRequired: false, transformFunction: null }, zBoneClass: { classPropertyName: "zBoneClass", publicName: "zBoneClass", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRows: { classPropertyName: "zFallbackRows", publicName: "zFallbackRows", isSignal: true, isRequired: false, transformFunction: null }, zFallbackGap: { classPropertyName: "zFallbackGap", publicName: "zFallbackGap", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRowHeight: { classPropertyName: "zFallbackRowHeight", publicName: "zFallbackRowHeight", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRadius: { classPropertyName: "zFallbackRadius", publicName: "zFallbackRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--z-skeleton-auto-wave-duration": "waveDurationStyle()" } }, ngImport: i0, template: "<boneyard-skeleton\n [loading]=\"zLoading()\"\n [name]=\"zName()\"\n [initialBones]=\"zInitialBones()\"\n [color]=\"zColor()\"\n [darkColor]=\"zDarkColor()\"\n [animate]=\"effectiveAnimate()\"\n [stagger]=\"zStagger()\"\n [transition]=\"zTransition()\"\n [boneClass]=\"resolvedBoneClass()\"\n [cssClass]=\"containerClass()\">\n <ng-content />\n\n <div fallback class=\"w-full\">\n <z-skeleton\n zType=\"text\"\n class=\"w-full\"\n [zRows]=\"zFallbackRows()\"\n [zGap]=\"zFallbackGap()\"\n [zHeight]=\"zFallbackRowHeight()\"\n [zRadius]=\"zFallbackRadius()\" />\n </div>\n</boneyard-skeleton>\n", styles: [":host{display:block}:host ::ng-deep .z-skeleton-auto-bone-legacy{position:relative;overflow:hidden}:host ::ng-deep .z-skeleton-auto-bone-legacy:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.42) 50%,transparent 100%);animation:z-skeleton-auto-legacy-wave var(--z-skeleton-auto-wave-duration, 1.5s) infinite}:host-context(.dark) ::ng-deep .z-skeleton-auto-bone-legacy:after{background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.24) 50%,transparent 100%)}@keyframes z-skeleton-auto-legacy-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "boneyard-skeleton", inputs: ["loading", "name", "initialBones", "color", "darkColor", "animate", "stagger", "transition", "boneClass", "cssClass", "snapshotConfig", "select"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
48
67
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSkeletonAutoComponent, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZSkeletonAutoComponent, decorators: [{
50
69
  type: Component,
51
70
  args: [{ selector: 'z-skeleton-auto', imports: [SkeletonComponent, ZSkeletonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
52
71
  '[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-components-z-skeleton-auto.mjs","sources":["../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.ts","../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.html","../../../../libs/core-ui/components/z-skeleton-auto/shival99-z-ui-components-z-skeleton-auto.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport { SkeletonComponent as BoneyardSkeletonComponent } from 'boneyard-js/angular';\nimport type { ClassValue } from 'clsx';\nimport type { ZSkeletonAutoAnimate, ZSkeletonAutoBones } from './z-skeleton-auto.types';\n\n@Component({\n selector: 'z-skeleton-auto',\n imports: [BoneyardSkeletonComponent, ZSkeletonComponent],\n standalone: true,\n templateUrl: './z-skeleton-auto.component.html',\n styleUrl: './z-skeleton-auto.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',\n },\n})\nexport class ZSkeletonAutoComponent {\n public readonly class = input<ClassValue>('');\n public readonly zLoading = input(false, { transform: zTransform });\n public readonly zName = input<string>('z-skeleton-auto');\n\n public readonly zColor = input<string | undefined>('#e0e0e0');\n public readonly zDarkColor = input<string | undefined>('#374151');\n public readonly zAnimate = input<ZSkeletonAutoAnimate>('shimmer');\n public readonly zWavePreset = input<'boneyard' | 'legacy-strong'>('legacy-strong');\n public readonly zWaveDuration = input<number>(1.5);\n public readonly zInitialBones = input<ZSkeletonAutoBones | undefined>(undefined);\n public readonly zStagger = input<number | boolean>(false);\n public readonly zTransition = input<number | boolean>(false);\n public readonly zBoneClass = input<string>('');\n\n public readonly zFallbackRows = input<number>(3);\n public readonly zFallbackGap = input<number>(8);\n public readonly zFallbackRowHeight = input<string>('12px');\n public readonly zFallbackRadius = input<string>('4px');\n\n protected readonly containerClass = computed(() => zMergeClasses('block w-full', this.class()));\n protected readonly effectiveAnimate = computed<ZSkeletonAutoAnimate>(() => {\n if (this.zWavePreset() === 'legacy-strong') {\n return false;\n }\n\n return this.zAnimate();\n });\n\n protected readonly waveDurationStyle = computed(() => {\n const seconds = this.zWaveDuration();\n if (seconds <= 0) {\n return '1.5s';\n }\n\n return `${seconds}s`;\n });\n\n protected readonly resolvedBoneClass = computed(() => {\n const presetClass = this.zWavePreset() === 'legacy-strong' ? 'z-skeleton-auto-bone-legacy' : '';\n const merged = zMergeClasses(presetClass, this.zBoneClass());\n if (!merged) {\n return undefined;\n }\n\n return merged;\n });\n}\n","<boneyard-skeleton\n [loading]=\"zLoading()\"\n [name]=\"zName()\"\n [initialBones]=\"zInitialBones()\"\n [color]=\"zColor()\"\n [darkColor]=\"zDarkColor()\"\n [animate]=\"effectiveAnimate()\"\n [stagger]=\"zStagger()\"\n [transition]=\"zTransition()\"\n [boneClass]=\"resolvedBoneClass()\"\n [cssClass]=\"containerClass()\">\n <ng-content />\n\n <div fallback class=\"w-full\">\n <z-skeleton\n zType=\"text\"\n class=\"w-full\"\n [zRows]=\"zFallbackRows()\"\n [zGap]=\"zFallbackGap()\"\n [zHeight]=\"zFallbackRowHeight()\"\n [zRadius]=\"zFallbackRadius()\" />\n </div>\n</boneyard-skeleton>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BoneyardSkeletonComponent"],"mappings":";;;;;;MAkBa,sBAAsB,CAAA;AACjB,IAAA,KAAK,GAAG,KAAK,CAAa,EAAE,iDAAC;IAC7B,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,UAAU,EAAA,CAAG;AAClD,IAAA,KAAK,GAAG,KAAK,CAAS,iBAAiB,iDAAC;AAExC,IAAA,MAAM,GAAG,KAAK,CAAqB,SAAS,kDAAC;AAC7C,IAAA,UAAU,GAAG,KAAK,CAAqB,SAAS,sDAAC;AACjD,IAAA,QAAQ,GAAG,KAAK,CAAuB,SAAS,oDAAC;AACjD,IAAA,WAAW,GAAG,KAAK,CAA+B,eAAe,uDAAC;AAClE,IAAA,aAAa,GAAG,KAAK,CAAS,GAAG,yDAAC;AAClC,IAAA,aAAa,GAAG,KAAK,CAAiC,SAAS,yDAAC;AAChE,IAAA,QAAQ,GAAG,KAAK,CAAmB,KAAK,oDAAC;AACzC,IAAA,WAAW,GAAG,KAAK,CAAmB,KAAK,uDAAC;AAC5C,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,sDAAC;AAE9B,IAAA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AA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uCAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBnC,ioBAuBA,EAAA,MAAA,EAAA,CAAA,wnBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDdYA,iBAAyB,gNAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,OAAA,EAAA,MAAA,EAAA,WAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAS5C,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB,CAACA,iBAAyB,EAAE,kBAAkB,CAAC,EAAA,UAAA,EAC5C,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,yCAAyC,EAAE,qBAAqB;AACjE,qBAAA,EAAA,QAAA,EAAA,ioBAAA,EAAA,MAAA,EAAA,CAAA,wnBAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
1
+ {"version":3,"file":"shival99-z-ui-components-z-skeleton-auto.mjs","sources":["../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.ts","../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.html","../../../../libs/core-ui/components/z-skeleton-auto/shival99-z-ui-components-z-skeleton-auto.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport { SkeletonComponent as BoneyardSkeletonComponent } from 'boneyard-js/angular';\nimport type { ClassValue } from 'clsx';\nimport type { ZSkeletonAutoAnimate, ZSkeletonAutoBones } from './z-skeleton-auto.types';\n\n@Component({\n selector: 'z-skeleton-auto',\n imports: [BoneyardSkeletonComponent, ZSkeletonComponent],\n standalone: true,\n templateUrl: './z-skeleton-auto.component.html',\n styleUrl: './z-skeleton-auto.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',\n },\n})\nexport class ZSkeletonAutoComponent {\n public readonly class = input<ClassValue>('');\n public readonly zLoading = input(false, { transform: zTransform });\n public readonly zName = input<string>('z-skeleton-auto');\n\n public readonly zColor = input<string | undefined>('#e0e0e0');\n public readonly zDarkColor = input<string | undefined>('#374151');\n public readonly zAnimate = input<ZSkeletonAutoAnimate>('shimmer');\n public readonly zWavePreset = input<'boneyard' | 'legacy-strong'>('legacy-strong');\n public readonly zWaveDuration = input<number>(1.5);\n public readonly zInitialBones = input<ZSkeletonAutoBones | undefined>(undefined);\n public readonly zStagger = input<number | boolean>(false);\n public readonly zTransition = input<number | boolean>(false);\n public readonly zBoneClass = input<string>('');\n\n public readonly zFallbackRows = input<number>(3);\n public readonly zFallbackGap = input<number>(8);\n public readonly zFallbackRowHeight = input<string>('12px');\n public readonly zFallbackRadius = input<string>('4px');\n\n protected readonly containerClass = computed(() => zMergeClasses('block w-full', this.class()));\n protected readonly effectiveAnimate = computed<ZSkeletonAutoAnimate>(() => {\n if (this.zWavePreset() === 'legacy-strong') {\n return false;\n }\n\n return this.zAnimate();\n });\n\n protected readonly waveDurationStyle = computed(() => {\n const seconds = this.zWaveDuration();\n if (seconds <= 0) {\n return '1.5s';\n }\n\n return `${seconds}s`;\n });\n\n protected readonly resolvedBoneClass = computed(() => {\n const presetClass = this.zWavePreset() === 'legacy-strong' ? 'z-skeleton-auto-bone-legacy' : '';\n const merged = zMergeClasses(presetClass, this.zBoneClass());\n if (!merged) {\n return undefined;\n }\n\n return merged;\n });\n}\n","<boneyard-skeleton\n [loading]=\"zLoading()\"\n [name]=\"zName()\"\n [initialBones]=\"zInitialBones()\"\n [color]=\"zColor()\"\n [darkColor]=\"zDarkColor()\"\n [animate]=\"effectiveAnimate()\"\n [stagger]=\"zStagger()\"\n [transition]=\"zTransition()\"\n [boneClass]=\"resolvedBoneClass()\"\n [cssClass]=\"containerClass()\">\n <ng-content />\n\n <div fallback class=\"w-full\">\n <z-skeleton\n zType=\"text\"\n class=\"w-full\"\n [zRows]=\"zFallbackRows()\"\n [zGap]=\"zFallbackGap()\"\n [zHeight]=\"zFallbackRowHeight()\"\n [zRadius]=\"zFallbackRadius()\" />\n </div>\n</boneyard-skeleton>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BoneyardSkeletonComponent"],"mappings":";;;;;;MAkBa,sBAAsB,CAAA;IACjB,KAAK,GAAG,KAAK,CAAa,EAAE;8EAAC;IAC7B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,UAAU,EAAA,CAAG;IAClD,KAAK,GAAG,KAAK,CAAS,iBAAiB;8EAAC;IAExC,MAAM,GAAG,KAAK,CAAqB,SAAS;+EAAC;IAC7C,UAAU,GAAG,KAAK,CAAqB,SAAS;mFAAC;IACjD,QAAQ,GAAG,KAAK,CAAuB,SAAS;iFAAC;IACjD,WAAW,GAAG,KAAK,CAA+B,eAAe;oFAAC;IAClE,aAAa,GAAG,KAAK,CAAS,GAAG;sFAAC;IAClC,aAAa,GAAG,KAAK,CAAiC,SAAS;sFAAC;IAChE,QAAQ,GAAG,KAAK,CAAmB,KAAK;iFAAC;IACzC,WAAW,GAAG,KAAK,CAAmB,KAAK;oFAAC;IAC5C,UAAU,GAAG,KAAK,CAAS,EAAE;mFAAC;IAE9B,aAAa,GAAG,KAAK,CAAS,CAAC;sFAAC;IAChC,YAAY,GAAG,K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A,qBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBnC,ioBAuBA,EAAA,MAAA,EAAA,CAAA,wnBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDdYA,iBAAyB,0NAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,OAAA,EAAA,MAAA,EAAA,WAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAS5C,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB,CAACA,iBAAyB,EAAE,kBAAkB,CAAC,EAAA,UAAA,EAC5C,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,yCAAyC,EAAE,qBAAqB;AACjE,qBAAA,EAAA,QAAA,EAAA,ioBAAA,EAAA,MAAA,EAAA,CAAA,wnBAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
@@ -46,22 +46,33 @@ const zSkeletonVariants = cva('z-skeleton', {
46
46
 
47
47
  class ZSkeletonComponent {
48
48
  _elementRef = inject(ElementRef);
49
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
50
- zType = input('bar', ...(ngDevMode ? [{ debugName: "zType" }] : []));
51
- zSize = input('default', ...(ngDevMode ? [{ debugName: "zSize" }] : []));
52
- zWidth = input('100%', ...(ngDevMode ? [{ debugName: "zWidth" }] : []));
53
- zHeight = input(undefined, ...(ngDevMode ? [{ debugName: "zHeight" }] : []));
54
- zRows = input(1, ...(ngDevMode ? [{ debugName: "zRows" }] : []));
55
- zGap = input(8, ...(ngDevMode ? [{ debugName: "zGap" }] : []));
56
- zAnimated = input(true, ...(ngDevMode ? [{ debugName: "zAnimated" }] : []));
57
- zRadius = input('4px', ...(ngDevMode ? [{ debugName: "zRadius" }] : []));
58
- _calculatedRows = signal(1, ...(ngDevMode ? [{ debugName: "_calculatedRows" }] : []));
49
+ class = input('', /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
51
+ zType = input('bar', /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "zType" }] : /* istanbul ignore next */ []));
53
+ zSize = input('default', /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "zSize" }] : /* istanbul ignore next */ []));
55
+ zWidth = input('100%', /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "zWidth" }] : /* istanbul ignore next */ []));
57
+ zHeight = input(undefined, /* @ts-ignore */
58
+ ...(ngDevMode ? [{ debugName: "zHeight" }] : /* istanbul ignore next */ []));
59
+ zRows = input(1, /* @ts-ignore */
60
+ ...(ngDevMode ? [{ debugName: "zRows" }] : /* istanbul ignore next */ []));
61
+ zGap = input(8, /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "zGap" }] : /* istanbul ignore next */ []));
63
+ zAnimated = input(true, /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "zAnimated" }] : /* istanbul ignore next */ []));
65
+ zRadius = input('4px', /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "zRadius" }] : /* istanbul ignore next */ []));
67
+ _calculatedRows = signal(1, /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "_calculatedRows" }] : /* istanbul ignore next */ []));
59
69
  ngAfterViewInit() {
60
70
  if (this.zType() === 'bar') {
61
71
  this._calculateBarRows();
62
72
  }
63
73
  }
64
- containerClass = computed(() => zMergeClasses(this.class()), ...(ngDevMode ? [{ debugName: "containerClass" }] : []));
74
+ containerClass = computed(() => zMergeClasses(this.class()), /* @ts-ignore */
75
+ ...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
65
76
  hostHeight = computed(() => {
66
77
  if (this.zType() !== 'text' || this.zRows() <= 1) {
67
78
  return this.zHeight();
@@ -69,15 +80,19 @@ class ZSkeletonComponent {
69
80
  const rowHeight = this.zHeight() ?? '1rem';
70
81
  const totalGap = (this.zRows() - 1) * this.zGap();
71
82
  return `calc(${rowHeight} * ${this.zRows()} + ${totalGap}px)`;
72
- }, ...(ngDevMode ? [{ debugName: "hostHeight" }] : []));
73
- skeletonClasses = computed(() => zSkeletonVariants({ type: this.zType(), size: this.zSize(), animated: this.zAnimated() }), ...(ngDevMode ? [{ debugName: "skeletonClasses" }] : []));
83
+ }, /* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "hostHeight" }] : /* istanbul ignore next */ []));
85
+ skeletonClasses = computed(() => zSkeletonVariants({ type: this.zType(), size: this.zSize(), animated: this.zAnimated() }), /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "skeletonClasses" }] : /* istanbul ignore next */ []));
74
87
  circleStyles = computed(() => {
75
88
  if (this.zHeight() || this.zWidth() !== '100%') {
76
89
  return { width: this.zWidth(), height: this.zHeight() || this.zWidth() };
77
90
  }
78
91
  return {};
79
- }, ...(ngDevMode ? [{ debugName: "circleStyles" }] : []));
80
- shouldShowMultipleRows = computed(() => (this.zType() === 'bar' || this.zType() === 'text') && this.zRows() > 1, ...(ngDevMode ? [{ debugName: "shouldShowMultipleRows" }] : []));
92
+ }, /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "circleStyles" }] : /* istanbul ignore next */ []));
94
+ shouldShowMultipleRows = computed(() => (this.zType() === 'bar' || this.zType() === 'text') && this.zRows() > 1, /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "shouldShowMultipleRows" }] : /* istanbul ignore next */ []));
81
96
  rowsArray = computed(() => {
82
97
  const type = this.zType();
83
98
  if (type !== 'bar' && type !== 'text') {
@@ -89,7 +104,8 @@ class ZSkeletonComponent {
89
104
  const height = this.zHeight();
90
105
  const rowHeight = height ?? `calc((100% - ${totalGapSpace}px) / ${rowCount})`;
91
106
  return Array.from({ length: rowCount }, (_, i) => ({ index: i, height: rowHeight }));
92
- }, ...(ngDevMode ? [{ debugName: "rowsArray" }] : []));
107
+ }, /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "rowsArray" }] : /* istanbul ignore next */ []));
93
109
  _calculateBarRows() {
94
110
  const { parentElement } = this._elementRef.nativeElement || {};
95
111
  if (!parentElement) {
@@ -102,10 +118,10 @@ class ZSkeletonComponent {
102
118
  }
103
119
  this._calculatedRows.set(1);
104
120
  }
105
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
106
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZSkeletonComponent, isStandalone: true, selector: "z-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zHeight: { classPropertyName: "zHeight", publicName: "zHeight", isSignal: true, isRequired: false, transformFunction: null }, zRows: { classPropertyName: "zRows", publicName: "zRows", isSignal: true, isRequired: false, transformFunction: null }, zGap: { classPropertyName: "zGap", publicName: "zGap", isSignal: true, isRequired: false, transformFunction: null }, zAnimated: { classPropertyName: "zAnimated", publicName: "zAnimated", isSignal: true, isRequired: false, transformFunction: null }, zRadius: { classPropertyName: "zRadius", publicName: "zRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width": "zWidth()", "style.height": "hostHeight()" }, classAttribute: "z-skeleton-host" }, ngImport: i0, template: "<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n", styles: [".z-skeleton-container{display:block;width:100%;height:100%}.z-skeleton{background-color:#e0e0e0;position:relative;overflow:hidden}:host-context(.dark) .z-skeleton{background-color:#374151}.z-skeleton-bar,.z-skeleton-text{width:100%;height:100%}.z-skeleton-row{width:100%}.z-skeleton-circle{border-radius:50%;aspect-ratio:1/1}.z-skeleton-circle-sm{width:2rem;height:2rem}.z-skeleton-circle-default{width:3rem;height:3rem}.z-skeleton-circle-lg{width:4rem;height:4rem}.z-skeleton-text{height:1rem;border-radius:.25rem}.z-skeleton-animated:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.4) 50%,transparent 100%);animation:z-skeleton-shimmer 1.5s infinite}@keyframes z-skeleton-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}:host{display:block;width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZSkeletonComponent, isStandalone: true, selector: "z-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zHeight: { classPropertyName: "zHeight", publicName: "zHeight", isSignal: true, isRequired: false, transformFunction: null }, zRows: { classPropertyName: "zRows", publicName: "zRows", isSignal: true, isRequired: false, transformFunction: null }, zGap: { classPropertyName: "zGap", publicName: "zGap", isSignal: true, isRequired: false, transformFunction: null }, zAnimated: { classPropertyName: "zAnimated", publicName: "zAnimated", isSignal: true, isRequired: false, transformFunction: null }, zRadius: { classPropertyName: "zRadius", publicName: "zRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width": "zWidth()", "style.height": "hostHeight()" }, classAttribute: "z-skeleton-host" }, ngImport: i0, template: "<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n", styles: [".z-skeleton-container{display:block;width:100%;height:100%}.z-skeleton{background-color:#e0e0e0;position:relative;overflow:hidden}:host-context(.dark) .z-skeleton{background-color:#374151}.z-skeleton-bar,.z-skeleton-text{width:100%;height:100%}.z-skeleton-row{width:100%}.z-skeleton-circle{border-radius:50%;aspect-ratio:1/1}.z-skeleton-circle-sm{width:2rem;height:2rem}.z-skeleton-circle-default{width:3rem;height:3rem}.z-skeleton-circle-lg{width:4rem;height:4rem}.z-skeleton-text{height:1rem;border-radius:.25rem}.z-skeleton-animated:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.4) 50%,transparent 100%);animation:z-skeleton-shimmer 1.5s infinite}@keyframes z-skeleton-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}:host{display:block;width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
107
123
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSkeletonComponent, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZSkeletonComponent, decorators: [{
109
125
  type: Component,
110
126
  args: [{ selector: 'z-skeleton', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
111
127
  class: 'z-skeleton-host',
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-components-z-skeleton.mjs","sources":["../../../../libs/core-ui/components/z-skeleton/z-skeleton.variants.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.html","../../../../libs/core-ui/components/z-skeleton/shival99-z-ui-components-z-skeleton.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zSkeletonVariants = cva('z-skeleton', {\n variants: {\n type: {\n bar: 'z-skeleton-bar',\n circle: 'z-skeleton-circle',\n text: 'z-skeleton-text',\n },\n size: {\n sm: '',\n default: '',\n lg: '',\n },\n animated: {\n true: 'z-skeleton-animated',\n false: '',\n },\n },\n compoundVariants: [\n {\n type: 'circle',\n size: 'sm',\n class: 'z-skeleton-circle-sm',\n },\n {\n type: 'circle',\n size: 'default',\n class: 'z-skeleton-circle-default',\n },\n {\n type: 'circle',\n size: 'lg',\n class: 'z-skeleton-circle-lg',\n },\n ],\n defaultVariants: {\n type: 'bar',\n size: 'default',\n animated: true,\n },\n});\n\nexport type ZSkeletonVariants = VariantProps<typeof zSkeletonVariants>;\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZSkeletonRowItem, ZSkeletonSize, ZSkeletonType } from './z-skeleton.types';\nimport { zSkeletonVariants } from './z-skeleton.variants';\n\n@Component({\n selector: 'z-skeleton',\n standalone: true,\n templateUrl: './z-skeleton.component.html',\n styleUrl: './z-skeleton.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'z-skeleton-host',\n '[style.width]': 'zWidth()',\n '[style.height]': 'hostHeight()',\n },\n})\nexport class ZSkeletonComponent implements AfterViewInit {\n private readonly _elementRef = inject(ElementRef);\n\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZSkeletonType>('bar');\n public readonly zSize = input<ZSkeletonSize>('default');\n public readonly zWidth = input<string>('100%');\n public readonly zHeight = input<string | undefined>(undefined);\n public readonly zRows = input<number>(1);\n public readonly zGap = input<number>(8);\n public readonly zAnimated = input<boolean>(true);\n public readonly zRadius = input<string>('4px');\n\n private readonly _calculatedRows = signal<number>(1);\n\n ngAfterViewInit(): void {\n if (this.zType() === 'bar') {\n this._calculateBarRows();\n }\n }\n\n protected readonly containerClass = computed(() => zMergeClasses(this.class()));\n protected readonly hostHeight = computed(() => {\n if (this.zType() !== 'text' || this.zRows() <= 1) {\n return this.zHeight();\n }\n\n const rowHeight = this.zHeight() ?? '1rem';\n const totalGap = (this.zRows() - 1) * this.zGap();\n\n return `calc(${rowHeight} * ${this.zRows()} + ${totalGap}px)`;\n });\n\n protected readonly skeletonClasses = computed(() =>\n zSkeletonVariants({ type: this.zType(), size: this.zSize(), animated: this.zAnimated() })\n );\n\n protected readonly circleStyles = computed(() => {\n if (this.zHeight() || this.zWidth() !== '100%') {\n return { width: this.zWidth(), height: this.zHeight() || this.zWidth() };\n }\n return {};\n });\n\n protected readonly shouldShowMultipleRows = computed(\n () => (this.zType() === 'bar' || this.zType() === 'text') && this.zRows() > 1\n );\n\n protected readonly rowsArray = computed<ZSkeletonRowItem[]>(() => {\n const type = this.zType();\n if (type !== 'bar' && type !== 'text') {\n return [{ index: 0, height: '0rem' }];\n }\n const rowCount = this.zRows() || this._calculatedRows();\n const gapBetweenRows = this.zGap();\n const totalGapSpace = (rowCount - 1) * gapBetweenRows;\n const height = this.zHeight();\n const rowHeight = height ?? `calc((100% - ${totalGapSpace}px) / ${rowCount})`;\n return Array.from({ length: rowCount }, (_, i) => ({ index: i, height: rowHeight }));\n });\n\n private _calculateBarRows(): void {\n const { parentElement } = this._elementRef.nativeElement || {};\n if (!parentElement) {\n return;\n }\n const rows = this.zRows();\n if (rows && rows > 0) {\n this._calculatedRows.set(rows);\n return;\n }\n this._calculatedRows.set(1);\n }\n}\n","<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n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components-z-skeleton.mjs","sources":["../../../../libs/core-ui/components/z-skeleton/z-skeleton.variants.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.html","../../../../libs/core-ui/components/z-skeleton/shival99-z-ui-components-z-skeleton.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zSkeletonVariants = cva('z-skeleton', {\n variants: {\n type: {\n bar: 'z-skeleton-bar',\n circle: 'z-skeleton-circle',\n text: 'z-skeleton-text',\n },\n size: {\n sm: '',\n default: '',\n lg: '',\n },\n animated: {\n true: 'z-skeleton-animated',\n false: '',\n },\n },\n compoundVariants: [\n {\n type: 'circle',\n size: 'sm',\n class: 'z-skeleton-circle-sm',\n },\n {\n type: 'circle',\n size: 'default',\n class: 'z-skeleton-circle-default',\n },\n {\n type: 'circle',\n size: 'lg',\n class: 'z-skeleton-circle-lg',\n },\n ],\n defaultVariants: {\n type: 'bar',\n size: 'default',\n animated: true,\n },\n});\n\nexport type ZSkeletonVariants = VariantProps<typeof zSkeletonVariants>;\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZSkeletonRowItem, ZSkeletonSize, ZSkeletonType } from './z-skeleton.types';\nimport { zSkeletonVariants } from './z-skeleton.variants';\n\n@Component({\n selector: 'z-skeleton',\n standalone: true,\n templateUrl: './z-skeleton.component.html',\n styleUrl: './z-skeleton.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'z-skeleton-host',\n '[style.width]': 'zWidth()',\n '[style.height]': 'hostHeight()',\n },\n})\nexport class ZSkeletonComponent implements AfterViewInit {\n private readonly _elementRef = inject(ElementRef);\n\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZSkeletonType>('bar');\n public readonly zSize = input<ZSkeletonSize>('default');\n public readonly zWidth = input<string>('100%');\n public readonly zHeight = input<string | undefined>(undefined);\n public readonly zRows = input<number>(1);\n public readonly zGap = input<number>(8);\n public readonly zAnimated = input<boolean>(true);\n public readonly zRadius = input<string>('4px');\n\n private readonly _calculatedRows = signal<number>(1);\n\n ngAfterViewInit(): void {\n if (this.zType() === 'bar') {\n this._calculateBarRows();\n }\n }\n\n protected readonly containerClass = computed(() => zMergeClasses(this.class()));\n protected readonly hostHeight = computed(() => {\n if (this.zType() !== 'text' || this.zRows() <= 1) {\n return this.zHeight();\n }\n\n const rowHeight = this.zHeight() ?? '1rem';\n const totalGap = (this.zRows() - 1) * this.zGap();\n\n return `calc(${rowHeight} * ${this.zRows()} + ${totalGap}px)`;\n });\n\n protected readonly skeletonClasses = computed(() =>\n zSkeletonVariants({ type: this.zType(), size: this.zSize(), animated: this.zAnimated() })\n );\n\n protected readonly circleStyles = computed(() => {\n if (this.zHeight() || this.zWidth() !== '100%') {\n return { width: this.zWidth(), height: this.zHeight() || this.zWidth() };\n }\n return {};\n });\n\n protected readonly shouldShowMultipleRows = computed(\n () => (this.zType() === 'bar' || this.zType() === 'text') && this.zRows() > 1\n );\n\n protected readonly rowsArray = computed<ZSkeletonRowItem[]>(() => {\n const type = this.zType();\n if (type !== 'bar' && type !== 'text') {\n return [{ index: 0, height: '0rem' }];\n }\n const rowCount = this.zRows() || this._calculatedRows();\n const gapBetweenRows = this.zGap();\n const totalGapSpace = (rowCount - 1) * gapBetweenRows;\n const height = this.zHeight();\n const rowHeight = height ?? `calc((100% - ${totalGapSpace}px) / ${rowCount})`;\n return Array.from({ length: rowCount }, (_, i) => ({ index: i, height: rowHeight }));\n });\n\n private _calculateBarRows(): void {\n const { parentElement } = this._elementRef.nativeElement || {};\n if (!parentElement) {\n return;\n }\n const rows = this.zRows();\n if (rows && rows > 0) {\n this._calculatedRows.set(rows);\n return;\n }\n this._calculatedRows.set(1);\n }\n}\n","<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,iBAAiB,GAAG,GAAG,CAAC,YAAY,EAAE;AACjD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAE,gBAAgB;AACrB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,IAAI,EAAE,iBAAiB;AACxB,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,EAAE,EAAE,EAAE;AACP,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,qBAAqB;AAC3B,YAAA,KAAK,EAAE,EAAE;AACV,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA;AACE,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,sBAAsB;AAC9B,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,2BAA2B;AACnC,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,QAAQ;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