@ng-nest/ui 21.0.13 → 22.0.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 (204) hide show
  1. package/fesm2022/ng-nest-ui-affix.mjs +12 -12
  2. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  3. package/fesm2022/ng-nest-ui-alert.mjs +46 -34
  4. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  5. package/fesm2022/ng-nest-ui-anchor.mjs +43 -31
  6. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  7. package/fesm2022/ng-nest-ui-api.mjs +7 -7
  8. package/fesm2022/ng-nest-ui-attachments.mjs +74 -48
  9. package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
  10. package/fesm2022/ng-nest-ui-auto-complete.mjs +114 -70
  11. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  12. package/fesm2022/ng-nest-ui-avatar.mjs +47 -32
  13. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  14. package/fesm2022/ng-nest-ui-back-top.mjs +23 -18
  15. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  16. package/fesm2022/ng-nest-ui-badge.mjs +30 -23
  17. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  18. package/fesm2022/ng-nest-ui-base-form.mjs +75 -44
  19. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  20. package/fesm2022/ng-nest-ui-bubble.mjs +76 -48
  21. package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
  22. package/fesm2022/ng-nest-ui-button.mjs +53 -42
  23. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  24. package/fesm2022/ng-nest-ui-calendar.mjs +30 -20
  25. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  26. package/fesm2022/ng-nest-ui-card.mjs +21 -16
  27. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  28. package/fesm2022/ng-nest-ui-carousel.mjs +68 -46
  29. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  30. package/fesm2022/ng-nest-ui-cascade.mjs +121 -73
  31. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  32. package/fesm2022/ng-nest-ui-checkbox.mjs +54 -38
  33. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  34. package/fesm2022/ng-nest-ui-collapse.mjs +38 -30
  35. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  36. package/fesm2022/ng-nest-ui-color-picker.mjs +119 -72
  37. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  38. package/fesm2022/ng-nest-ui-color.mjs +22 -16
  39. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  40. package/fesm2022/ng-nest-ui-comment.mjs +23 -21
  41. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  42. package/fesm2022/ng-nest-ui-container.mjs +40 -37
  43. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  44. package/fesm2022/ng-nest-ui-contextmenu.mjs +71 -45
  45. package/fesm2022/ng-nest-ui-contextmenu.mjs.map +1 -1
  46. package/fesm2022/ng-nest-ui-core.mjs +24 -21
  47. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  48. package/fesm2022/ng-nest-ui-coversations.mjs +25 -18
  49. package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
  50. package/fesm2022/ng-nest-ui-crumb.mjs +15 -13
  51. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  52. package/fesm2022/ng-nest-ui-date-picker.mjs +425 -256
  53. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  54. package/fesm2022/ng-nest-ui-description.mjs +42 -31
  55. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  56. package/fesm2022/ng-nest-ui-dialog.mjs +106 -82
  57. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  58. package/fesm2022/ng-nest-ui-divider.mjs +24 -17
  59. package/fesm2022/ng-nest-ui-divider.mjs.map +1 -1
  60. package/fesm2022/ng-nest-ui-doc.mjs +7 -7
  61. package/fesm2022/ng-nest-ui-drag.mjs +10 -10
  62. package/fesm2022/ng-nest-ui-drawer.mjs +52 -43
  63. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  64. package/fesm2022/ng-nest-ui-dropdown.mjs +94 -58
  65. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  66. package/fesm2022/ng-nest-ui-empty.mjs +14 -12
  67. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  68. package/fesm2022/ng-nest-ui-examples.mjs +7 -7
  69. package/fesm2022/ng-nest-ui-find.mjs +111 -71
  70. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  71. package/fesm2022/ng-nest-ui-form.mjs +45 -33
  72. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  73. package/fesm2022/ng-nest-ui-highlight.mjs +26 -20
  74. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  75. package/fesm2022/ng-nest-ui-i18n.mjs +16 -15
  76. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  77. package/fesm2022/ng-nest-ui-icon.mjs +28 -21
  78. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  79. package/fesm2022/ng-nest-ui-image.mjs +57 -51
  80. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  81. package/fesm2022/ng-nest-ui-inner.mjs +11 -11
  82. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  83. package/fesm2022/ng-nest-ui-input-number.mjs +63 -42
  84. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  85. package/fesm2022/ng-nest-ui-input.mjs +130 -85
  86. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  87. package/fesm2022/ng-nest-ui-keyword.mjs +19 -15
  88. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  89. package/fesm2022/ng-nest-ui-layout.mjs +37 -31
  90. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  91. package/fesm2022/ng-nest-ui-link.mjs +23 -18
  92. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  93. package/fesm2022/ng-nest-ui-list.mjs +137 -89
  94. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  95. package/fesm2022/ng-nest-ui-loading.mjs +36 -25
  96. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  97. package/fesm2022/ng-nest-ui-menu.mjs +68 -45
  98. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  99. package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
  100. package/fesm2022/ng-nest-ui-message.mjs +10 -10
  101. package/fesm2022/ng-nest-ui-notification.mjs +10 -10
  102. package/fesm2022/ng-nest-ui-outlet.mjs +11 -9
  103. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  104. package/fesm2022/ng-nest-ui-page-header.mjs +20 -15
  105. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  106. package/fesm2022/ng-nest-ui-pagination.mjs +69 -48
  107. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  108. package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
  109. package/fesm2022/ng-nest-ui-popconfirm.mjs +40 -27
  110. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  111. package/fesm2022/ng-nest-ui-popover.mjs +57 -38
  112. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  113. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  114. package/fesm2022/ng-nest-ui-progress.mjs +60 -41
  115. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  116. package/fesm2022/ng-nest-ui-prompts.mjs +18 -15
  117. package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
  118. package/fesm2022/ng-nest-ui-radio.mjs +50 -35
  119. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  120. package/fesm2022/ng-nest-ui-rate.mjs +43 -29
  121. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  122. package/fesm2022/ng-nest-ui-resizable.mjs +18 -16
  123. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  124. package/fesm2022/ng-nest-ui-result.mjs +22 -16
  125. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  126. package/fesm2022/ng-nest-ui-ripple.mjs +14 -13
  127. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  128. package/fesm2022/ng-nest-ui-scrollable.mjs +41 -24
  129. package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
  130. package/fesm2022/ng-nest-ui-select.mjs +197 -118
  131. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  132. package/fesm2022/ng-nest-ui-sender.mjs +43 -31
  133. package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
  134. package/fesm2022/ng-nest-ui-skeleton.mjs +17 -15
  135. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  136. package/fesm2022/ng-nest-ui-slider-select.mjs +85 -53
  137. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  138. package/fesm2022/ng-nest-ui-slider.mjs +58 -37
  139. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  140. package/fesm2022/ng-nest-ui-splitter.mjs +32 -24
  141. package/fesm2022/ng-nest-ui-splitter.mjs.map +1 -1
  142. package/fesm2022/ng-nest-ui-statistic.mjs +44 -30
  143. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  144. package/fesm2022/ng-nest-ui-steps.mjs +30 -22
  145. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  146. package/fesm2022/ng-nest-ui-suggestion.mjs +23 -20
  147. package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
  148. package/fesm2022/ng-nest-ui-switch.mjs +35 -25
  149. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  150. package/fesm2022/ng-nest-ui-table-view.mjs +78 -69
  151. package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
  152. package/fesm2022/ng-nest-ui-table.mjs +320 -205
  153. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  154. package/fesm2022/ng-nest-ui-tabs.mjs +74 -56
  155. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  156. package/fesm2022/ng-nest-ui-tag.mjs +30 -23
  157. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  158. package/fesm2022/ng-nest-ui-text-retract.mjs +19 -15
  159. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  160. package/fesm2022/ng-nest-ui-textarea.mjs +69 -44
  161. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  162. package/fesm2022/ng-nest-ui-theme.mjs +34 -23
  163. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  164. package/fesm2022/ng-nest-ui-thought-chain.mjs +26 -19
  165. package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
  166. package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
  167. package/fesm2022/ng-nest-ui-time-picker.mjs +164 -96
  168. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  169. package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
  170. package/fesm2022/ng-nest-ui-timeline.mjs +26 -19
  171. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  172. package/fesm2022/ng-nest-ui-tooltip.mjs +53 -35
  173. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  174. package/fesm2022/ng-nest-ui-transfer.mjs +66 -40
  175. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  176. package/fesm2022/ng-nest-ui-tree-file.mjs +39 -28
  177. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  178. package/fesm2022/ng-nest-ui-tree-select.mjs +186 -111
  179. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  180. package/fesm2022/ng-nest-ui-tree.mjs +166 -105
  181. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  182. package/fesm2022/ng-nest-ui-typography.mjs +16 -13
  183. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  184. package/fesm2022/ng-nest-ui-upload.mjs +81 -53
  185. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  186. package/fesm2022/ng-nest-ui-watermark.mjs +45 -35
  187. package/fesm2022/ng-nest-ui-watermark.mjs.map +1 -1
  188. package/fesm2022/ng-nest-ui-welcome.mjs +22 -16
  189. package/fesm2022/ng-nest-ui-welcome.mjs.map +1 -1
  190. package/package.json +3 -2
  191. package/types/ng-nest-ui-base-form.d.ts +3 -3
  192. package/types/ng-nest-ui-carousel.d.ts +1 -1
  193. package/types/ng-nest-ui-container.d.ts +1 -1
  194. package/types/ng-nest-ui-core.d.ts +1 -1
  195. package/types/ng-nest-ui-dialog.d.ts +1 -1
  196. package/types/ng-nest-ui-drawer.d.ts +1 -1
  197. package/types/ng-nest-ui-form.d.ts +12 -12
  198. package/types/ng-nest-ui-layout.d.ts +1 -1
  199. package/types/ng-nest-ui-list.d.ts +1 -1
  200. package/types/ng-nest-ui-portal.d.ts +3 -3
  201. package/types/ng-nest-ui-table-view.d.ts +1 -1
  202. package/types/ng-nest-ui-table.d.ts +1 -1
  203. package/types/ng-nest-ui-tabs.d.ts +1 -1
  204. package/types/ng-nest-ui-tree.d.ts +1 -1
@@ -23,7 +23,8 @@ class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {
23
23
  * @zh_CN SVG 图标根路径地址,可以通过全局只配置一次,所有图标资源在 github 上的 ng-nest-icon 中
24
24
  * @en_US The root address of the SVG icon can be configured only once globally. All icon resources are in ng-nest-icon on github
25
25
  */
26
- this.href = input(this.config?.href ?? 'https://ngnest.com/static/icons/', ...(ngDevMode ? [{ debugName: "href" }] : []));
26
+ this.href = input(this.config?.href ?? 'https://ngnest.com/static/icons/', /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
27
28
  /**
28
29
  * @zh_CN 图标类型
29
30
  * @en_US Icon type
@@ -36,7 +37,8 @@ class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {
36
37
  * ```
37
38
  *
38
39
  */
39
- this.type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
40
+ this.type = input(/* @ts-ignore */
41
+ ...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
40
42
  /**
41
43
  * @zh_CN 图标颜色
42
44
  * @en_US Icon color
@@ -47,7 +49,8 @@ class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {
47
49
  * ```
48
50
  *
49
51
  */
50
- this.color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
52
+ this.color = input(/* @ts-ignore */
53
+ ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
51
54
  /**
52
55
  * @zh_CN loading效果(图标一直旋转)
53
56
  * @en_US Loading effect (icon keeps rotating)
@@ -58,12 +61,12 @@ class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {
58
61
  * ```
59
62
  *
60
63
  */
61
- this.spin = input(false, { ...(ngDevMode ? { debugName: "spin" } : {}), transform: XToBoolean });
64
+ this.spin = input(false, { ...(ngDevMode ? { debugName: "spin" } : /* istanbul ignore next */ {}), transform: XToBoolean });
62
65
  }
63
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
64
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: XIconProperty, isStandalone: true, selector: "x-icon-property", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, spin: { classPropertyName: "spin", publicName: "spin", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
66
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
67
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XIconProperty, isStandalone: true, selector: "x-icon-property", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, spin: { classPropertyName: "spin", publicName: "spin", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
65
68
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconProperty, decorators: [{
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconProperty, decorators: [{
67
70
  type: Component,
68
71
  args: [{ selector: `${XIconPrefix}-property`, template: '' }]
69
72
  }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], spin: [{ type: i0.Input, args: [{ isSignal: true, alias: "spin", required: false }] }] } });
@@ -146,10 +149,10 @@ class XIconService {
146
149
  register(icon, url) {
147
150
  this.customIcon[icon] = url;
148
151
  }
149
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
150
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconService, providedIn: 'root' }); }
152
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
153
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconService, providedIn: 'root' }); }
151
154
  }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconService, decorators: [{
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconService, decorators: [{
153
156
  type: Injectable,
154
157
  args: [{ providedIn: 'root' }]
155
158
  }], ctorParameters: () => [] });
@@ -187,7 +190,8 @@ class XIconComponent extends XIconProperty {
187
190
  this.renderer = inject(Renderer2);
188
191
  this.cdr = inject(ChangeDetectorRef);
189
192
  this.iconService = inject(XIconService);
190
- this.beforeClass = signal('', ...(ngDevMode ? [{ debugName: "beforeClass" }] : []));
193
+ this.beforeClass = signal('', /* @ts-ignore */
194
+ ...(ngDevMode ? [{ debugName: "beforeClass" }] : /* istanbul ignore next */ []));
191
195
  this.hostClass = true;
192
196
  this.inSource = computed(() => {
193
197
  const type = this.type();
@@ -199,7 +203,8 @@ class XIconComponent extends XIconProperty {
199
203
  return false;
200
204
  const souceUrl = XSouceUrl[souce];
201
205
  return souceUrl ? true : false;
202
- }, ...(ngDevMode ? [{ debugName: "inSource" }] : []));
206
+ }, /* @ts-ignore */
207
+ ...(ngDevMode ? [{ debugName: "inSource" }] : /* istanbul ignore next */ []));
203
208
  this.sourceUrl = computed(() => {
204
209
  if (!this.inSource())
205
210
  return '';
@@ -211,10 +216,12 @@ class XIconComponent extends XIconProperty {
211
216
  XWarnIconTypeNotFound();
212
217
  }
213
218
  return `${souceUrl}${fileName}`;
214
- }, ...(ngDevMode ? [{ debugName: "sourceUrl" }] : []));
219
+ }, /* @ts-ignore */
220
+ ...(ngDevMode ? [{ debugName: "sourceUrl" }] : /* istanbul ignore next */ []));
215
221
  this.isCustom = computed(() => {
216
222
  return !this.inSource() && XHasIn(this.iconService.customIcon, this.type());
217
- }, ...(ngDevMode ? [{ debugName: "isCustom" }] : []));
223
+ }, /* @ts-ignore */
224
+ ...(ngDevMode ? [{ debugName: "isCustom" }] : /* istanbul ignore next */ []));
218
225
  effect(() => {
219
226
  if (this.isCustom()) {
220
227
  this.iconService.getSvg('', this.iconService.customIcon[this.type()], true).subscribe((x) => this.setSvgs(x));
@@ -307,10 +314,10 @@ class XIconComponent extends XIconProperty {
307
314
  svg.setAttribute(attribute, def);
308
315
  }
309
316
  }
310
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
311
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: XIconComponent, isStandalone: true, selector: "x-icon", host: { properties: { "class.x-icon": "this.hostClass", "class.x-icon-spin": "this.getSpin", "style.color": "this.getColor" } }, usesInheritance: true, ngImport: i0, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
317
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
318
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: XIconComponent, isStandalone: true, selector: "x-icon", host: { properties: { "class.x-icon": "this.hostClass", "class.x-icon-spin": "this.getSpin", "style.color": "this.getColor" } }, usesInheritance: true, ngImport: i0, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
312
319
  }
313
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconComponent, decorators: [{
320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconComponent, decorators: [{
314
321
  type: Component,
315
322
  args: [{ selector: `${XIconPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em}\n"] }]
316
323
  }], ctorParameters: () => [], propDecorators: { hostClass: [{
@@ -325,11 +332,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
325
332
  }] } });
326
333
 
327
334
  class XIconModule {
328
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
329
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XIconModule, imports: [XIconComponent], exports: [XIconComponent] }); }
330
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconModule }); }
335
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
336
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XIconModule, imports: [XIconComponent], exports: [XIconComponent] }); }
337
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconModule }); }
331
338
  }
332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XIconModule, decorators: [{
339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XIconModule, decorators: [{
333
340
  type: NgModule,
334
341
  args: [{
335
342
  exports: [XIconComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-icon.mjs","sources":["../../../../lib/ng-nest/ui/icon/icon.property.ts","../../../../lib/ng-nest/ui/icon/icon.service.ts","../../../../lib/ng-nest/ui/icon/icon.component.ts","../../../../lib/ng-nest/ui/icon/icon.component.html","../../../../lib/ng-nest/ui/icon/icon.module.ts","../../../../lib/ng-nest/ui/icon/ng-nest-ui-icon.ts"],"sourcesContent":["import { XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Icon\r\n * @selector x-icon\r\n * @decorator component\r\n */\r\nexport const XIconPrefix = 'x-icon';\r\nconst X_ICON_CONFIG_NAME = 'icon';\r\n\r\n/**\r\n * Icon Property\r\n */\r\n@Component({ selector: `${XIconPrefix}-property`, template: '' })\r\nexport class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {\r\n /**\r\n * @zh_CN SVG 图标根路径地址,可以通过全局只配置一次,所有图标资源在 github 上的 ng-nest-icon 中\r\n * @en_US The root address of the SVG icon can be configured only once globally. All icon resources are in ng-nest-icon on github\r\n */\r\n readonly href = input<string>(this.config?.href ?? 'https://ngnest.com/static/icons/');\r\n /**\r\n * @zh_CN 图标类型\r\n * @en_US Icon type\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon type=\"fto-activity\"></x-icon>\r\n * <x-icon type=\"fto-airplay\"></x-icon>\r\n * <x-icon type=\"fto-anchor\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly type = input<string>();\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon color=\"red\" type=\"fto-activity\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly color = input<string>();\r\n /**\r\n * @zh_CN loading效果(图标一直旋转)\r\n * @en_US Loading effect (icon keeps rotating)\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon spin=\"true\" type=\"fto-loader\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly spin = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标来源\r\n * @en_US Icon source\r\n */\r\nexport type XIconSource = 'ant-design' | 'eva' | 'feather' | 'font-awesome' | 'material-design';\r\n","import { Injectable, SecurityContext, inject } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, Subscriber } from 'rxjs';\r\nimport { XHasIn, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XIconPrefix } from './icon.property';\r\n\r\ntype Task<T> = {\r\n name: string;\r\n observable: Observable<T>;\r\n callback: Function;\r\n};\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XIconService {\r\n caches: { [property: string]: any } = {};\r\n queue: Task<any>[] = [];\r\n activeTaskXm: number = 0;\r\n isRunningTask = false;\r\n limit: number = 10;\r\n sanitizer = inject(DomSanitizer);\r\n http = inject(HttpClient, { optional: true })!;\r\n customIcon: { [property: string]: string } = {};\r\n\r\n constructor() {\r\n if (!this.http) {\r\n throw new Error(`${XIconPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n public addTask<T>(task: Task<T>) {\r\n this.queue.push(task);\r\n this.runTask();\r\n }\r\n\r\n private execute<T>(task: Task<T>) {\r\n this.isRunningTask = true;\r\n if (XHasIn(this.caches, task.name)) {\r\n task.callback(this.caches[task.name]);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n return;\r\n }\r\n return task.observable.subscribe({\r\n next: (result) => {\r\n this.caches[task.name] = result;\r\n task.callback(result);\r\n return result;\r\n },\r\n error: (error) => {\r\n console.error(error);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n },\r\n complete: () => {\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n }\r\n });\r\n }\r\n\r\n private runTask() {\r\n if (!this.isRunningTask && this.activeTaskXm < this.limit && this.queue.length > 0) {\r\n const task = this.queue.shift();\r\n this.activeTaskXm++;\r\n this.execute(task!);\r\n }\r\n }\r\n\r\n getSvg(root: string, icon: string, isCustom = false): Observable<string> {\r\n return new Observable((subscriber: Subscriber<string>) => {\r\n if (XIsEmpty(icon)) {\r\n subscriber.next('');\r\n subscriber.complete();\r\n return;\r\n }\r\n this.addTask({\r\n name: icon,\r\n observable: this.getSvgElement(root, icon, isCustom),\r\n callback: (svg: string) => {\r\n subscriber.next(svg);\r\n subscriber.complete();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getSvgElement(root: string, icon: string, isCustom = false): Observable<string> {\r\n const url = isCustom ? `${root}${icon}` : `${root}${icon}.svg`;\r\n const safeUrl = this.sanitizer.sanitize(SecurityContext.URL, url);\r\n return this.http.get(safeUrl as string, { responseType: 'text' });\r\n }\r\n\r\n register(icon: string, url: string) {\r\n this.customIcon[icon] = url;\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n Renderer2,\r\n HostBinding,\r\n inject,\r\n effect,\r\n computed,\r\n ChangeDetectorRef,\r\n signal\r\n} from '@angular/core';\r\nimport { XIconPrefix, XIconProperty } from './icon.property';\r\nimport { XIconService } from './icon.service';\r\nimport { XWarnIconTypeNotFound, XIsEmpty, XHasIn, XWarnSVGTagNotFound } from '@ng-nest/ui/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\n// 来源路径对应\r\nexport const XSouceUrl: { [property: string]: string } = {\r\n adf: `ant-design/fill/`,\r\n ado: `ant-design/outline/`,\r\n adt: `ant-design/twotone/`,\r\n eaf: `eva/fill/`,\r\n eao: `eva/outline/`,\r\n fto: `feather/`,\r\n fab: `font-awesome/brands/`,\r\n far: `font-awesome/regular/`,\r\n fas: `font-awesome/solid/`,\r\n mdf: `material-design/fill/`,\r\n mdo: `material-design/outline/`\r\n};\r\n\r\nexport const XViewBox = [\r\n // { souces: [\"adf\", \"ado\", \"adt\"], value: \"0 0 1024 1024\" },\r\n // { souces: [\"eaf\", \"eao\"], value: \"0 0 24 24\" },\r\n // { souces: [\"fto\"], value: \"0 0 24 24\" }\r\n];\r\n\r\n@Component({\r\n selector: `${XIconPrefix}`,\r\n templateUrl: './icon.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XIconComponent extends XIconProperty {\r\n private svgElement!: HTMLElement;\r\n private document = inject(DOCUMENT);\r\n private elementRef = inject(ElementRef);\r\n private renderer = inject(Renderer2);\r\n private cdr = inject(ChangeDetectorRef);\r\n private iconService = inject(XIconService);\r\n private beforeClass = signal('');\r\n\r\n @HostBinding('class.x-icon') hostClass = true;\r\n\r\n @HostBinding('class.x-icon-spin') get getSpin() {\r\n return this.spin();\r\n }\r\n\r\n @HostBinding('style.color') get getColor() {\r\n return this.color();\r\n }\r\n\r\n inSource = computed(() => {\r\n const type = this.type();\r\n if (typeof type === 'undefined' || type === '' || type === null) return false;\r\n const split = type.split('-');\r\n const souce = split.shift();\r\n if (typeof souce === 'undefined') return false;\r\n const souceUrl = XSouceUrl[souce];\r\n return souceUrl ? true : false;\r\n });\r\n\r\n sourceUrl = computed(() => {\r\n if (!this.inSource()) return '';\r\n const split = this.type()!.split('-');\r\n const souce = split.shift();\r\n const souceUrl = XSouceUrl[souce!];\r\n const fileName = split.join('-');\r\n if (!souceUrl || !fileName) {\r\n XWarnIconTypeNotFound();\r\n }\r\n return `${souceUrl}${fileName}`;\r\n });\r\n\r\n isCustom = computed(() => {\r\n return !this.inSource() && XHasIn(this.iconService.customIcon, this.type()!);\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n if (this.isCustom()) {\r\n this.iconService.getSvg('', this.iconService.customIcon[this.type()!], true).subscribe((x) => this.setSvgs(x));\r\n } else if (this.inSource()) {\r\n this.iconService.getSvg(this.href(), this.sourceUrl()).subscribe((x) => this.setSvgs(x));\r\n }\r\n });\r\n effect(() => {\r\n if (this.elementRef.nativeElement && this.type()) {\r\n if (this.beforeClass()) {\r\n this.renderer.removeClass(this.elementRef.nativeElement, this.beforeClass());\r\n }\r\n this.renderer.addClass(this.elementRef.nativeElement, this.type()!);\r\n this.beforeClass.set(this.type()!);\r\n }\r\n });\r\n }\r\n\r\n setSvgs(svg: string) {\r\n if (XIsEmpty(svg)) return;\r\n if (this.svgElement) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, this.svgElement);\r\n }\r\n if (this.isCustom()) {\r\n const parser = new DOMParser();\r\n const svgDoc = parser.parseFromString(svg, 'image/svg+xml');\r\n let firstChild = this.elementRef.nativeElement.firstChild;\r\n if (firstChild) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, firstChild);\r\n }\r\n this.svgElement = svgDoc.documentElement;\r\n } else if (this.inSource()) {\r\n this.svgElement = this.buildSvg(svg)!;\r\n }\r\n if (!this.svgElement) return;\r\n this.setAttributes(this.svgElement);\r\n this.renderer.appendChild(this.elementRef.nativeElement, this.svgElement);\r\n // TODO: use zoneless, renderer removeChild will not take effect immediately\r\n this.cdr.markForCheck();\r\n }\r\n\r\n buildSvg(svgStr: string): HTMLElement | undefined {\r\n const result = this.document.createElementNS('http://www.w3.org/2000/svg', 'svg') as any;\r\n const svg = this.createSvg(svgStr);\r\n if (!svg) return;\r\n svg.children.forEach((x) => {\r\n x.removeAttribute('class');\r\n if (x.tagName === 'rect') {\r\n x.setAttribute('fill', 'none');\r\n }\r\n result.appendChild(x);\r\n });\r\n this.setAttribute(result, svg.ele, 'viewBox');\r\n this.setAttribute(result, svg.ele, 'fill', 'currentColor');\r\n this.setAttribute(result, svg.ele, 'stroke');\r\n this.setAttribute(result, svg.ele, 'stroke-width');\r\n this.setAttribute(result, svg.ele, 'stroke-linecap');\r\n this.setAttribute(result, svg.ele, 'stroke-linejoin');\r\n if (!result) {\r\n XWarnSVGTagNotFound();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n createSvg(svgStr: string) {\r\n const div = this.document.createElement('div');\r\n div.innerHTML = svgStr;\r\n let svgEle = div.querySelector('svg') as SVGElement;\r\n if (!svgEle) return null;\r\n return {\r\n ele: svgEle,\r\n children: svgEle.querySelectorAll('path, polyline, polygon, circle, line, rect')\r\n };\r\n }\r\n\r\n setAttributes(svgEle: HTMLElement) {\r\n if (svgEle) {\r\n this.renderer.setAttribute(svgEle, 'width', '1em');\r\n this.renderer.setAttribute(svgEle, 'height', '1em');\r\n }\r\n }\r\n\r\n setAttribute(svg: SVGElement, svgEle: SVGElement, attribute: string, def?: string) {\r\n let attr = svgEle.getAttribute(attribute);\r\n if (attr) {\r\n svg.setAttribute(attribute, attr);\r\n } else if (def) {\r\n svg.setAttribute(attribute, def);\r\n }\r\n }\r\n}\r\n","\r\n","import { NgModule } from '@angular/core';\r\nimport { XIconComponent } from './icon.component';\r\n\r\n@NgModule({\r\n exports: [XIconComponent],\r\n imports: [XIconComponent]\r\n})\r\nexport class XIconModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAIA;;;;AAIG;AACI,MAAM,WAAW,GAAG;AAC3B,MAAM,kBAAkB,GAAG,MAAM;AAEjC;;AAEG;MAEU,aAAc,SAAQ,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;AADxE,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,kCAAkC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AACtF;;;;;;;;;;;AAWG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAC/B;;;;;;;;;AASG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAChC;;;;;;;;;AASG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,KAAK,iDAAI,SAAS,EAAE,UAAU,EAAA,CAAG;AAC3E,IAAA;iIAzCY,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAA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AAA;;sBAW9C,WAAW;uBAAC,cAAc;;sBAE1B,WAAW;uBAAC,mBAAmB;;sBAI/B,WAAW;uBAAC,aAAa;;;MEtDf,WAAW,CAAA;iIAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAX,WAAW,EAAA,OAAA,EAAA,CAFZ,cAAc,CAAA,EAAA,OAAA,EAAA,CADd,cAAc,CAAA,EAAA,CAAA,CAAA;kIAGb,WAAW,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-icon.mjs","sources":["../../../../lib/ng-nest/ui/icon/icon.property.ts","../../../../lib/ng-nest/ui/icon/icon.service.ts","../../../../lib/ng-nest/ui/icon/icon.component.ts","../../../../lib/ng-nest/ui/icon/icon.component.html","../../../../lib/ng-nest/ui/icon/icon.module.ts","../../../../lib/ng-nest/ui/icon/ng-nest-ui-icon.ts"],"sourcesContent":["import { XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Icon\r\n * @selector x-icon\r\n * @decorator component\r\n */\r\nexport const XIconPrefix = 'x-icon';\r\nconst X_ICON_CONFIG_NAME = 'icon';\r\n\r\n/**\r\n * Icon Property\r\n */\r\n@Component({ selector: `${XIconPrefix}-property`, template: '' })\r\nexport class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {\r\n /**\r\n * @zh_CN SVG 图标根路径地址,可以通过全局只配置一次,所有图标资源在 github 上的 ng-nest-icon 中\r\n * @en_US The root address of the SVG icon can be configured only once globally. All icon resources are in ng-nest-icon on github\r\n */\r\n readonly href = input<string>(this.config?.href ?? 'https://ngnest.com/static/icons/');\r\n /**\r\n * @zh_CN 图标类型\r\n * @en_US Icon type\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon type=\"fto-activity\"></x-icon>\r\n * <x-icon type=\"fto-airplay\"></x-icon>\r\n * <x-icon type=\"fto-anchor\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly type = input<string>();\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon color=\"red\" type=\"fto-activity\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly color = input<string>();\r\n /**\r\n * @zh_CN loading效果(图标一直旋转)\r\n * @en_US Loading effect (icon keeps rotating)\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon spin=\"true\" type=\"fto-loader\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly spin = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标来源\r\n * @en_US Icon source\r\n */\r\nexport type XIconSource = 'ant-design' | 'eva' | 'feather' | 'font-awesome' | 'material-design';\r\n","import { Injectable, SecurityContext, inject } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, Subscriber } from 'rxjs';\r\nimport { XHasIn, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XIconPrefix } from './icon.property';\r\n\r\ntype Task<T> = {\r\n name: string;\r\n observable: Observable<T>;\r\n callback: Function;\r\n};\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XIconService {\r\n caches: { [property: string]: any } = {};\r\n queue: Task<any>[] = [];\r\n activeTaskXm: number = 0;\r\n isRunningTask = false;\r\n limit: number = 10;\r\n sanitizer = inject(DomSanitizer);\r\n http = inject(HttpClient, { optional: true })!;\r\n customIcon: { [property: string]: string } = {};\r\n\r\n constructor() {\r\n if (!this.http) {\r\n throw new Error(`${XIconPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n public addTask<T>(task: Task<T>) {\r\n this.queue.push(task);\r\n this.runTask();\r\n }\r\n\r\n private execute<T>(task: Task<T>) {\r\n this.isRunningTask = true;\r\n if (XHasIn(this.caches, task.name)) {\r\n task.callback(this.caches[task.name]);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n return;\r\n }\r\n return task.observable.subscribe({\r\n next: (result) => {\r\n this.caches[task.name] = result;\r\n task.callback(result);\r\n return result;\r\n },\r\n error: (error) => {\r\n console.error(error);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n },\r\n complete: () => {\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n }\r\n });\r\n }\r\n\r\n private runTask() {\r\n if (!this.isRunningTask && this.activeTaskXm < this.limit && this.queue.length > 0) {\r\n const task = this.queue.shift();\r\n this.activeTaskXm++;\r\n this.execute(task!);\r\n }\r\n }\r\n\r\n getSvg(root: string, icon: string, isCustom = false): Observable<string> {\r\n return new Observable((subscriber: Subscriber<string>) => {\r\n if (XIsEmpty(icon)) {\r\n subscriber.next('');\r\n subscriber.complete();\r\n return;\r\n }\r\n this.addTask({\r\n name: icon,\r\n observable: this.getSvgElement(root, icon, isCustom),\r\n callback: (svg: string) => {\r\n subscriber.next(svg);\r\n subscriber.complete();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getSvgElement(root: string, icon: string, isCustom = false): Observable<string> {\r\n const url = isCustom ? `${root}${icon}` : `${root}${icon}.svg`;\r\n const safeUrl = this.sanitizer.sanitize(SecurityContext.URL, url);\r\n return this.http.get(safeUrl as string, { responseType: 'text' });\r\n }\r\n\r\n register(icon: string, url: string) {\r\n this.customIcon[icon] = url;\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n Renderer2,\r\n HostBinding,\r\n inject,\r\n effect,\r\n computed,\r\n ChangeDetectorRef,\r\n signal\r\n} from '@angular/core';\r\nimport { XIconPrefix, XIconProperty } from './icon.property';\r\nimport { XIconService } from './icon.service';\r\nimport { XWarnIconTypeNotFound, XIsEmpty, XHasIn, XWarnSVGTagNotFound } from '@ng-nest/ui/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\n// 来源路径对应\r\nexport const XSouceUrl: { [property: string]: string } = {\r\n adf: `ant-design/fill/`,\r\n ado: `ant-design/outline/`,\r\n adt: `ant-design/twotone/`,\r\n eaf: `eva/fill/`,\r\n eao: `eva/outline/`,\r\n fto: `feather/`,\r\n fab: `font-awesome/brands/`,\r\n far: `font-awesome/regular/`,\r\n fas: `font-awesome/solid/`,\r\n mdf: `material-design/fill/`,\r\n mdo: `material-design/outline/`\r\n};\r\n\r\nexport const XViewBox = [\r\n // { souces: [\"adf\", \"ado\", \"adt\"], value: \"0 0 1024 1024\" },\r\n // { souces: [\"eaf\", \"eao\"], value: \"0 0 24 24\" },\r\n // { souces: [\"fto\"], value: \"0 0 24 24\" }\r\n];\r\n\r\n@Component({\r\n selector: `${XIconPrefix}`,\r\n templateUrl: './icon.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XIconComponent extends XIconProperty {\r\n private svgElement!: HTMLElement;\r\n private document = inject(DOCUMENT);\r\n private elementRef = inject(ElementRef);\r\n private renderer = inject(Renderer2);\r\n private cdr = inject(ChangeDetectorRef);\r\n private iconService = inject(XIconService);\r\n private beforeClass = signal('');\r\n\r\n @HostBinding('class.x-icon') hostClass = true;\r\n\r\n @HostBinding('class.x-icon-spin') get getSpin() {\r\n return this.spin();\r\n }\r\n\r\n @HostBinding('style.color') get getColor() {\r\n return this.color();\r\n }\r\n\r\n inSource = computed(() => {\r\n const type = this.type();\r\n if (typeof type === 'undefined' || type === '' || type === null) return false;\r\n const split = type.split('-');\r\n const souce = split.shift();\r\n if (typeof souce === 'undefined') return false;\r\n const souceUrl = XSouceUrl[souce];\r\n return souceUrl ? true : false;\r\n });\r\n\r\n sourceUrl = computed(() => {\r\n if (!this.inSource()) return '';\r\n const split = this.type()!.split('-');\r\n const souce = split.shift();\r\n const souceUrl = XSouceUrl[souce!];\r\n const fileName = split.join('-');\r\n if (!souceUrl || !fileName) {\r\n XWarnIconTypeNotFound();\r\n }\r\n return `${souceUrl}${fileName}`;\r\n });\r\n\r\n isCustom = computed(() => {\r\n return !this.inSource() && XHasIn(this.iconService.customIcon, this.type()!);\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n if (this.isCustom()) {\r\n this.iconService.getSvg('', this.iconService.customIcon[this.type()!], true).subscribe((x) => this.setSvgs(x));\r\n } else if (this.inSource()) {\r\n this.iconService.getSvg(this.href(), this.sourceUrl()).subscribe((x) => this.setSvgs(x));\r\n }\r\n });\r\n effect(() => {\r\n if (this.elementRef.nativeElement && this.type()) {\r\n if (this.beforeClass()) {\r\n this.renderer.removeClass(this.elementRef.nativeElement, this.beforeClass());\r\n }\r\n this.renderer.addClass(this.elementRef.nativeElement, this.type()!);\r\n this.beforeClass.set(this.type()!);\r\n }\r\n });\r\n }\r\n\r\n setSvgs(svg: string) {\r\n if (XIsEmpty(svg)) return;\r\n if (this.svgElement) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, this.svgElement);\r\n }\r\n if (this.isCustom()) {\r\n const parser = new DOMParser();\r\n const svgDoc = parser.parseFromString(svg, 'image/svg+xml');\r\n let firstChild = this.elementRef.nativeElement.firstChild;\r\n if (firstChild) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, firstChild);\r\n }\r\n this.svgElement = svgDoc.documentElement;\r\n } else if (this.inSource()) {\r\n this.svgElement = this.buildSvg(svg)!;\r\n }\r\n if (!this.svgElement) return;\r\n this.setAttributes(this.svgElement);\r\n this.renderer.appendChild(this.elementRef.nativeElement, this.svgElement);\r\n // TODO: use zoneless, renderer removeChild will not take effect immediately\r\n this.cdr.markForCheck();\r\n }\r\n\r\n buildSvg(svgStr: string): HTMLElement | undefined {\r\n const result = this.document.createElementNS('http://www.w3.org/2000/svg', 'svg') as any;\r\n const svg = this.createSvg(svgStr);\r\n if (!svg) return;\r\n svg.children.forEach((x) => {\r\n x.removeAttribute('class');\r\n if (x.tagName === 'rect') {\r\n x.setAttribute('fill', 'none');\r\n }\r\n result.appendChild(x);\r\n });\r\n this.setAttribute(result, svg.ele, 'viewBox');\r\n this.setAttribute(result, svg.ele, 'fill', 'currentColor');\r\n this.setAttribute(result, svg.ele, 'stroke');\r\n this.setAttribute(result, svg.ele, 'stroke-width');\r\n this.setAttribute(result, svg.ele, 'stroke-linecap');\r\n this.setAttribute(result, svg.ele, 'stroke-linejoin');\r\n if (!result) {\r\n XWarnSVGTagNotFound();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n createSvg(svgStr: string) {\r\n const div = this.document.createElement('div');\r\n div.innerHTML = svgStr;\r\n let svgEle = div.querySelector('svg') as SVGElement;\r\n if (!svgEle) return null;\r\n return {\r\n ele: svgEle,\r\n children: svgEle.querySelectorAll('path, polyline, polygon, circle, line, rect')\r\n };\r\n }\r\n\r\n setAttributes(svgEle: HTMLElement) {\r\n if (svgEle) {\r\n this.renderer.setAttribute(svgEle, 'width', '1em');\r\n this.renderer.setAttribute(svgEle, 'height', '1em');\r\n }\r\n }\r\n\r\n setAttribute(svg: SVGElement, svgEle: SVGElement, attribute: string, def?: string) {\r\n let attr = svgEle.getAttribute(attribute);\r\n if (attr) {\r\n svg.setAttribute(attribute, attr);\r\n } else if (def) {\r\n svg.setAttribute(attribute, def);\r\n }\r\n }\r\n}\r\n","\r\n","import { NgModule } from '@angular/core';\r\nimport { XIconComponent } from './icon.component';\r\n\r\n@NgModule({\r\n exports: [XIconComponent],\r\n imports: [XIconComponent]\r\n})\r\nexport class XIconModule {}\r\n","/**\n * Generated bundle index.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iBAAA;;;ACND;;AAEG;;;;"}
@@ -38,7 +38,8 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
38
38
  * ```
39
39
  *
40
40
  */
41
- this.src = input(...(ngDevMode ? [undefined, { debugName: "src" }] : []));
41
+ this.src = input(/* @ts-ignore */
42
+ ...(ngDevMode ? [undefined, { debugName: "src" }] : /* istanbul ignore next */ []));
42
43
  /**
43
44
  * @zh_CN 图片宽度
44
45
  * @en_US Picture width
@@ -53,7 +54,7 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
53
54
  * ```
54
55
  *
55
56
  */
56
- this.width = input('', { ...(ngDevMode ? { debugName: "width" } : {}), transform: XToCssPixelValue });
57
+ this.width = input('', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
57
58
  /**
58
59
  * @zh_CN 图片高度
59
60
  * @en_US Picture height
@@ -68,7 +69,7 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
68
69
  * ```
69
70
  *
70
71
  */
71
- this.height = input('', { ...(ngDevMode ? { debugName: "height" } : {}), transform: XToCssPixelValue });
72
+ this.height = input('', { ...(ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
72
73
  /**
73
74
  * @zh_CN 图像描述
74
75
  * @en_US Image description
@@ -84,7 +85,8 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
84
85
  * ```
85
86
  *
86
87
  */
87
- this.alt = input(...(ngDevMode ? [undefined, { debugName: "alt" }] : []));
88
+ this.alt = input(/* @ts-ignore */
89
+ ...(ngDevMode ? [undefined, { debugName: "alt" }] : /* istanbul ignore next */ []));
88
90
  /**
89
91
  * @zh_CN 加载失败显示的地址
90
92
  * @en_US Load fault tolerance address
@@ -100,7 +102,8 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
100
102
  * ```
101
103
  *
102
104
  */
103
- this.fallback = input(...(ngDevMode ? [undefined, { debugName: "fallback" }] : []));
105
+ this.fallback = input(/* @ts-ignore */
106
+ ...(ngDevMode ? [undefined, { debugName: "fallback" }] : /* istanbul ignore next */ []));
104
107
  /**
105
108
  * @zh_CN 预览文字
106
109
  * @en_US Preview text
@@ -117,17 +120,20 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
117
120
  * ```
118
121
  *
119
122
  */
120
- this.previewText = input(this.config?.previewText, ...(ngDevMode ? [{ debugName: "previewText" }] : []));
123
+ this.previewText = input(this.config?.previewText, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "previewText" }] : /* istanbul ignore next */ []));
121
125
  /**
122
126
  * @zh_CN 渐进加载显示的图片地址
123
127
  * @en_US Progressive loading image addresses
124
128
  */
125
- this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
129
+ this.placeholder = input(/* @ts-ignore */
130
+ ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
126
131
  /**
127
132
  * @zh_CN 自定义预览操作
128
133
  * @en_US Custom preview operation
129
134
  */
130
- this.previewTpl = input(...(ngDevMode ? [undefined, { debugName: "previewTpl" }] : []));
135
+ this.previewTpl = input(/* @ts-ignore */
136
+ ...(ngDevMode ? [undefined, { debugName: "previewTpl" }] : /* istanbul ignore next */ []));
131
137
  /**
132
138
  * @zh_CN 图片加载错误
133
139
  * @en_US Picture load failed
@@ -173,10 +179,10 @@ class XImageProperty extends XPropertyFunction(X_IMAGE_CONFIG_NAME) {
173
179
  */
174
180
  this.load = output();
175
181
  }
176
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
177
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: XImageProperty, isStandalone: true, selector: "x-image-property", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, previewText: { classPropertyName: "previewText", publicName: "previewText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, previewTpl: { classPropertyName: "previewTpl", publicName: "previewTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { error: "error", load: "load" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
182
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
183
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XImageProperty, isStandalone: true, selector: "x-image-property", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, previewText: { classPropertyName: "previewText", publicName: "previewText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, previewTpl: { classPropertyName: "previewTpl", publicName: "previewTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { error: "error", load: "load" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
178
184
  }
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageProperty, decorators: [{
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageProperty, decorators: [{
180
186
  type: Component,
181
187
  args: [{ selector: `${XImagePrefix}-property`, template: '' }]
182
188
  }], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }], previewText: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewText", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], previewTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewTpl", required: false }] }], error: [{ type: i0.Output, args: ["error"] }], load: [{ type: i0.Output, args: ["load"] }] } });
@@ -190,10 +196,10 @@ const XImagePreviewPrefix = 'x-image-preview';
190
196
  * Image Preview Property
191
197
  */
192
198
  class XImagePreviewProperty extends XProperty {
193
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImagePreviewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
194
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: XImagePreviewProperty, isStandalone: true, selector: "x-image-preview-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
199
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImagePreviewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
200
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: XImagePreviewProperty, isStandalone: true, selector: "x-image-preview-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
195
201
  }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImagePreviewProperty, decorators: [{
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImagePreviewProperty, decorators: [{
197
203
  type: Component,
198
204
  args: [{ selector: `${XImagePreviewPrefix}-property`, template: '' }]
199
205
  }] });
@@ -211,22 +217,30 @@ class XImagePreviewComponent extends XImagePreviewProperty {
211
217
  x: 1,
212
218
  y: 1,
213
219
  z: 1
214
- }, ...(ngDevMode ? [{ debugName: "imgScale3d" }] : []));
215
- this.rotate = signal(0, ...(ngDevMode ? [{ debugName: "rotate" }] : []));
220
+ }, /* @ts-ignore */
221
+ ...(ngDevMode ? [{ debugName: "imgScale3d" }] : /* istanbul ignore next */ []));
222
+ this.rotate = signal(0, /* @ts-ignore */
223
+ ...(ngDevMode ? [{ debugName: "rotate" }] : /* istanbul ignore next */ []));
216
224
  this.position = signal({
217
225
  x: 0,
218
226
  y: 0
219
- }, ...(ngDevMode ? [{ debugName: "position" }] : []));
220
- this.activated = signal(undefined, ...(ngDevMode ? [{ debugName: "activated" }] : []));
221
- this.total = signal(1, ...(ngDevMode ? [{ debugName: "total" }] : []));
222
- this.current = signal(1, ...(ngDevMode ? [{ debugName: "current" }] : []));
227
+ }, /* @ts-ignore */
228
+ ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
229
+ this.activated = signal(undefined, /* @ts-ignore */
230
+ ...(ngDevMode ? [{ debugName: "activated" }] : /* istanbul ignore next */ []));
231
+ this.total = signal(1, /* @ts-ignore */
232
+ ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
233
+ this.current = signal(1, /* @ts-ignore */
234
+ ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
223
235
  this.document = inject(DOCUMENT);
224
236
  this.wrapperTransform = computed(() => {
225
237
  return `translate3d(${this.position().x}px, ${this.position().y}px, 0)`;
226
- }, ...(ngDevMode ? [{ debugName: "wrapperTransform" }] : []));
238
+ }, /* @ts-ignore */
239
+ ...(ngDevMode ? [{ debugName: "wrapperTransform" }] : /* istanbul ignore next */ []));
227
240
  this.imgTransform = computed(() => {
228
241
  return `scale3d(${this.imgScale3d().x}, ${this.imgScale3d().y}, ${this.imgScale3d().z}) rotate(${this.rotate()}deg)`;
229
- }, ...(ngDevMode ? [{ debugName: "imgTransform" }] : []));
242
+ }, /* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "imgTransform" }] : /* istanbul ignore next */ []));
230
244
  this.imageRef = viewChild.required('imageRef');
231
245
  this.data = inject(X_DIALOG_DATA);
232
246
  }
@@ -276,11 +290,9 @@ class XImagePreviewComponent extends XImagePreviewProperty {
276
290
  const currentScale = this.imgScale3d().x;
277
291
  let newScale;
278
292
  if (zoom > 0) {
279
- // �Ŵ�ʹ��ָ�����������������ֵ
280
293
  newScale = Math.min(currentScale * 1.2, 5);
281
294
  }
282
295
  else {
283
- // ��С��ʹ��ָ�����٣���������Сֵ
284
296
  newScale = Math.max(currentScale / 1.2, 0.1);
285
297
  }
286
298
  if (newScale !== currentScale) {
@@ -289,7 +301,6 @@ class XImagePreviewComponent extends XImagePreviewProperty {
289
301
  item.y = newScale;
290
302
  return { ...item };
291
303
  });
292
- // ���ź����¼���λ�ã���ֹͼƬ�����߽�
293
304
  setTimeout(() => this.adjustPosition(), 0);
294
305
  }
295
306
  }
@@ -306,32 +317,25 @@ class XImagePreviewComponent extends XImagePreviewProperty {
306
317
  const img = this.imageRef().nativeElement;
307
318
  const scale = this.imgScale3d().x;
308
319
  const rotation = this.rotate() % 360;
309
- // ��ȡͼƬ��ԭʼ�ߴ�
310
320
  const imgWidth = img.naturalWidth || img.offsetWidth;
311
321
  const imgHeight = img.naturalHeight || img.offsetHeight;
312
- // �������ź�ijߴ�
313
322
  let scaledWidth = imgWidth * scale;
314
323
  let scaledHeight = imgHeight * scale;
315
- // ���ͼƬ��ת��90�Ȼ�270�ȣ���������
316
324
  const isRotated = Math.abs(rotation) === 90 || Math.abs(rotation) === 270;
317
325
  if (isRotated) {
318
326
  [scaledWidth, scaledHeight] = [scaledHeight, scaledWidth];
319
327
  }
320
- // ��ȡ�����ߴ�
321
328
  const containerWidth = this.document.documentElement.clientWidth;
322
329
  const containerHeight = this.document.documentElement.clientHeight;
323
- // ��ȡ��ǰͼƬ��λ��
324
330
  const rect = img.getBoundingClientRect();
325
331
  const currentX = this.position().x;
326
332
  const currentY = this.position().y;
327
- // ����ͼƬ���ĵ�������������ĵ�ƫ��
328
333
  const imgCenterX = rect.left + rect.width / 2;
329
334
  const imgCenterY = rect.top + rect.height / 2;
330
335
  const containerCenterX = containerWidth / 2;
331
336
  const containerCenterY = containerHeight / 2;
332
337
  let newX = currentX;
333
338
  let newY = currentY;
334
- // ���ͼƬ��������������ק��Χ
335
339
  if (scaledWidth > containerWidth) {
336
340
  const maxOffsetX = (scaledWidth - containerWidth) / 2;
337
341
  const offsetX = imgCenterX - containerCenterX;
@@ -343,7 +347,6 @@ class XImagePreviewComponent extends XImagePreviewProperty {
343
347
  }
344
348
  }
345
349
  else {
346
- // ���ͼƬ������С��������ʾ
347
350
  newX = 0;
348
351
  }
349
352
  if (scaledHeight > containerHeight) {
@@ -357,15 +360,14 @@ class XImagePreviewComponent extends XImagePreviewProperty {
357
360
  }
358
361
  }
359
362
  else {
360
- // ���ͼƬ������С��������ʾ
361
363
  newY = 0;
362
364
  }
363
365
  this.position.set({ x: newX, y: newY });
364
366
  }
365
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImagePreviewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
366
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: XImagePreviewComponent, isStandalone: true, selector: "x-image-preview", viewQueries: [{ propertyName: "imageRef", first: true, predicate: ["imageRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"x-image-preview\">\r\n <div class=\"x-image-preview-header\">\r\n <div class=\"x-image-preview-header-left\">\r\n @if (total() != 1) {\r\n <span class=\"x-image-preview-current\">{{ current() }} / {{ total() }}</span>\r\n }\r\n </div>\r\n <div class=\"x-image-preview-header-center\">\r\n <x-icon type=\"fto-corner-up-left\" (click)=\"onRotate(-90)\"></x-icon>\r\n <x-icon type=\"fto-corner-up-right\" (click)=\"onRotate(90)\"></x-icon>\r\n <x-icon\r\n type=\"fto-zoom-out\"\r\n [class.x-image-preview-disabled]=\"imgScale3d().x <= 0.1\"\r\n (click)=\"imgScale3d().x > 0.1 && onScale(-1)\"\r\n ></x-icon>\r\n <x-icon type=\"fto-zoom-in\" [class.x-image-preview-disabled]=\"imgScale3d().x >= 5\" (click)=\"imgScale3d().x < 5 && onScale(1)\"></x-icon>\r\n </div>\r\n <div class=\"x-image-preview-header-right\">\r\n <x-icon type=\"fto-x\" x-dialog-close></x-icon>\r\n </div>\r\n </div>\r\n <div\r\n class=\"x-image-preview-wrapper\"\r\n cdkDrag\r\n [style.transform]=\"wrapperTransform()\"\r\n [cdkDragFreeDragPosition]=\"position()\"\r\n (cdkDragReleased)=\"onDragReleased()\"\r\n (wheel)=\"onWheel($event)\"\r\n >\r\n <img\r\n #imageRef\r\n [src]=\"activated()?.src!\"\r\n [attr.alt]=\"activated()?.alt!\"\r\n cdkDragHandle\r\n [style.transform]=\"imgTransform()\"\r\n />\r\n </div>\r\n @if (data && data.length > 1) {\r\n <div\r\n [class.x-image-preview-disabled]=\"current() === 1\"\r\n class=\"x-image-preview-left\"\r\n (click)=\"current() > 1 && onCurrentChange(-1)\"\r\n >\r\n <x-icon type=\"fto-chevron-left\"></x-icon>\r\n </div>\r\n <div\r\n [class.x-image-preview-disabled]=\"current() === total()\"\r\n class=\"x-image-preview-right\"\r\n (click)=\"current() != total() && onCurrentChange(1)\"\r\n >\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </div>\r\n }\r\n</div>\r\n", styles: ["x-image-preview{display:block;width:100%;height:100%}.x-image-preview{margin:0;padding:0}.x-image-preview{width:100%;height:100%}.x-image-preview-header{display:flex;align-items:center;justify-content:center;background-color:#0003;color:#fff;position:absolute;width:100%;z-index:1;height:2.75rem}.x-image-preview-header x-icon{font-size:1.25rem;padding:.75rem;cursor:pointer;transition:background-color var(--x-animation-duration-base)}.x-image-preview-header x-icon:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-header x-icon.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-header-center{position:absolute}.x-image-preview-header-right{position:absolute;right:0}.x-image-preview-header-left{position:absolute;left:0}.x-image-preview-current{padding:.75rem}.x-image-preview-wrapper{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--x-animation-duration-base) ease-out 0s;overflow:hidden}.x-image-preview-wrapper>img{max-width:100%;max-height:100%;vertical-align:middle;cursor:grab;transition:transform var(--x-animation-duration-base) ease-out 0s;-webkit-user-select:none;user-select:none}.x-image-preview-wrapper>img:active{cursor:grabbing}.x-image-preview-left,.x-image-preview-right{position:absolute;top:50%;z-index:1;display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin-top:-1.375rem;color:#fff;background-color:#0003;border-radius:50%;transition:background-color var(--x-animation-duration-base);cursor:pointer;font-size:1.25rem}.x-image-preview-left:hover:not(.x-image-preview-disabled),.x-image-preview-right:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-left.x-image-preview-disabled,.x-image-preview-right.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-left{left:1rem}.x-image-preview-right{right:1rem}.x-image-preview-portal .x-dialog-portal{background:transparent;box-shadow:none;padding:0}\n"], dependencies: [{ kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: XDialogCloseDirective, selector: "[x-dialog-close]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
367
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImagePreviewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
368
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XImagePreviewComponent, isStandalone: true, selector: "x-image-preview", viewQueries: [{ propertyName: "imageRef", first: true, predicate: ["imageRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"x-image-preview\">\r\n <div class=\"x-image-preview-header\">\r\n <div class=\"x-image-preview-header-left\">\r\n @if (total() != 1) {\r\n <span class=\"x-image-preview-current\">{{ current() }} / {{ total() }}</span>\r\n }\r\n </div>\r\n <div class=\"x-image-preview-header-center\">\r\n <x-icon type=\"fto-corner-up-left\" (click)=\"onRotate(-90)\"></x-icon>\r\n <x-icon type=\"fto-corner-up-right\" (click)=\"onRotate(90)\"></x-icon>\r\n <x-icon\r\n type=\"fto-zoom-out\"\r\n [class.x-image-preview-disabled]=\"imgScale3d().x <= 0.1\"\r\n (click)=\"imgScale3d().x > 0.1 && onScale(-1)\"\r\n ></x-icon>\r\n <x-icon type=\"fto-zoom-in\" [class.x-image-preview-disabled]=\"imgScale3d().x >= 5\" (click)=\"imgScale3d().x < 5 && onScale(1)\"></x-icon>\r\n </div>\r\n <div class=\"x-image-preview-header-right\">\r\n <x-icon type=\"fto-x\" x-dialog-close></x-icon>\r\n </div>\r\n </div>\r\n <div\r\n class=\"x-image-preview-wrapper\"\r\n cdkDrag\r\n [style.transform]=\"wrapperTransform()\"\r\n [cdkDragFreeDragPosition]=\"position()\"\r\n (cdkDragReleased)=\"onDragReleased()\"\r\n (wheel)=\"onWheel($event)\"\r\n >\r\n <img\r\n #imageRef\r\n [src]=\"activated()?.src!\"\r\n [attr.alt]=\"activated()?.alt!\"\r\n cdkDragHandle\r\n [style.transform]=\"imgTransform()\"\r\n />\r\n </div>\r\n @if (data && data.length > 1) {\r\n <div\r\n [class.x-image-preview-disabled]=\"current() === 1\"\r\n class=\"x-image-preview-left\"\r\n (click)=\"current() > 1 && onCurrentChange(-1)\"\r\n >\r\n <x-icon type=\"fto-chevron-left\"></x-icon>\r\n </div>\r\n <div\r\n [class.x-image-preview-disabled]=\"current() === total()\"\r\n class=\"x-image-preview-right\"\r\n (click)=\"current() != total() && onCurrentChange(1)\"\r\n >\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </div>\r\n }\r\n</div>\r\n", styles: ["x-image-preview{display:block;width:100%;height:100%}.x-image-preview{margin:0;padding:0}.x-image-preview{width:100%;height:100%}.x-image-preview-header{display:flex;align-items:center;justify-content:center;background-color:#0003;color:#fff;position:absolute;width:100%;z-index:1;height:2.75rem}.x-image-preview-header x-icon{font-size:1.25rem;padding:.75rem;cursor:pointer;transition:background-color var(--x-animation-duration-base)}.x-image-preview-header x-icon:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-header x-icon.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-header-center{position:absolute}.x-image-preview-header-right{position:absolute;right:0}.x-image-preview-header-left{position:absolute;left:0}.x-image-preview-current{padding:.75rem}.x-image-preview-wrapper{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--x-animation-duration-base) ease-out 0s;overflow:hidden}.x-image-preview-wrapper>img{max-width:100%;max-height:100%;vertical-align:middle;cursor:grab;transition:transform var(--x-animation-duration-base) ease-out 0s;-webkit-user-select:none;user-select:none}.x-image-preview-wrapper>img:active{cursor:grabbing}.x-image-preview-left,.x-image-preview-right{position:absolute;top:50%;z-index:1;display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin-top:-1.375rem;color:#fff;background-color:#0003;border-radius:50%;transition:background-color var(--x-animation-duration-base);cursor:pointer;font-size:1.25rem}.x-image-preview-left:hover:not(.x-image-preview-disabled),.x-image-preview-right:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-left.x-image-preview-disabled,.x-image-preview-right.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-left{left:1rem}.x-image-preview-right{right:1rem}.x-image-preview-portal .x-dialog-portal{background:transparent;box-shadow:none;padding:0}\n"], dependencies: [{ kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: XDialogCloseDirective, selector: "[x-dialog-close]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
367
369
  }
368
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImagePreviewComponent, decorators: [{
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImagePreviewComponent, decorators: [{
369
371
  type: Component,
370
372
  args: [{ selector: `${XImagePreviewPrefix}`, imports: [XIconComponent, DragDropModule, XDialogCloseDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-image-preview\">\r\n <div class=\"x-image-preview-header\">\r\n <div class=\"x-image-preview-header-left\">\r\n @if (total() != 1) {\r\n <span class=\"x-image-preview-current\">{{ current() }} / {{ total() }}</span>\r\n }\r\n </div>\r\n <div class=\"x-image-preview-header-center\">\r\n <x-icon type=\"fto-corner-up-left\" (click)=\"onRotate(-90)\"></x-icon>\r\n <x-icon type=\"fto-corner-up-right\" (click)=\"onRotate(90)\"></x-icon>\r\n <x-icon\r\n type=\"fto-zoom-out\"\r\n [class.x-image-preview-disabled]=\"imgScale3d().x <= 0.1\"\r\n (click)=\"imgScale3d().x > 0.1 && onScale(-1)\"\r\n ></x-icon>\r\n <x-icon type=\"fto-zoom-in\" [class.x-image-preview-disabled]=\"imgScale3d().x >= 5\" (click)=\"imgScale3d().x < 5 && onScale(1)\"></x-icon>\r\n </div>\r\n <div class=\"x-image-preview-header-right\">\r\n <x-icon type=\"fto-x\" x-dialog-close></x-icon>\r\n </div>\r\n </div>\r\n <div\r\n class=\"x-image-preview-wrapper\"\r\n cdkDrag\r\n [style.transform]=\"wrapperTransform()\"\r\n [cdkDragFreeDragPosition]=\"position()\"\r\n (cdkDragReleased)=\"onDragReleased()\"\r\n (wheel)=\"onWheel($event)\"\r\n >\r\n <img\r\n #imageRef\r\n [src]=\"activated()?.src!\"\r\n [attr.alt]=\"activated()?.alt!\"\r\n cdkDragHandle\r\n [style.transform]=\"imgTransform()\"\r\n />\r\n </div>\r\n @if (data && data.length > 1) {\r\n <div\r\n [class.x-image-preview-disabled]=\"current() === 1\"\r\n class=\"x-image-preview-left\"\r\n (click)=\"current() > 1 && onCurrentChange(-1)\"\r\n >\r\n <x-icon type=\"fto-chevron-left\"></x-icon>\r\n </div>\r\n <div\r\n [class.x-image-preview-disabled]=\"current() === total()\"\r\n class=\"x-image-preview-right\"\r\n (click)=\"current() != total() && onCurrentChange(1)\"\r\n >\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </div>\r\n }\r\n</div>\r\n", styles: ["x-image-preview{display:block;width:100%;height:100%}.x-image-preview{margin:0;padding:0}.x-image-preview{width:100%;height:100%}.x-image-preview-header{display:flex;align-items:center;justify-content:center;background-color:#0003;color:#fff;position:absolute;width:100%;z-index:1;height:2.75rem}.x-image-preview-header x-icon{font-size:1.25rem;padding:.75rem;cursor:pointer;transition:background-color var(--x-animation-duration-base)}.x-image-preview-header x-icon:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-header x-icon.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-header-center{position:absolute}.x-image-preview-header-right{position:absolute;right:0}.x-image-preview-header-left{position:absolute;left:0}.x-image-preview-current{padding:.75rem}.x-image-preview-wrapper{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--x-animation-duration-base) ease-out 0s;overflow:hidden}.x-image-preview-wrapper>img{max-width:100%;max-height:100%;vertical-align:middle;cursor:grab;transition:transform var(--x-animation-duration-base) ease-out 0s;-webkit-user-select:none;user-select:none}.x-image-preview-wrapper>img:active{cursor:grabbing}.x-image-preview-left,.x-image-preview-right{position:absolute;top:50%;z-index:1;display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin-top:-1.375rem;color:#fff;background-color:#0003;border-radius:50%;transition:background-color var(--x-animation-duration-base);cursor:pointer;font-size:1.25rem}.x-image-preview-left:hover:not(.x-image-preview-disabled),.x-image-preview-right:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-left.x-image-preview-disabled,.x-image-preview-right.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-left{left:1rem}.x-image-preview-right{right:1rem}.x-image-preview-portal .x-dialog-portal{background:transparent;box-shadow:none;padding:0}\n"] }]
371
373
  }], propDecorators: { imageRef: [{ type: i0.ViewChild, args: ['imageRef', { isSignal: true }] }] } });
@@ -379,12 +381,15 @@ class XImageComponent extends XImageProperty {
379
381
  this.i18n = inject(XI18nService);
380
382
  this.group = inject(X_IMAGE_GROUP_CONTEXT, { optional: true });
381
383
  this.configService = inject(XConfigService);
382
- this.isError = signal(false, ...(ngDevMode ? [{ debugName: "isError" }] : []));
383
- this.isLoaded = signal(false, ...(ngDevMode ? [{ debugName: "isLoaded" }] : []));
384
+ this.isError = signal(false, /* @ts-ignore */
385
+ ...(ngDevMode ? [{ debugName: "isError" }] : /* istanbul ignore next */ []));
386
+ this.isLoaded = signal(false, /* @ts-ignore */
387
+ ...(ngDevMode ? [{ debugName: "isLoaded" }] : /* istanbul ignore next */ []));
384
388
  this.locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.image)), { initialValue: zh_CN.image });
385
389
  this.previewTextSignal = computed(() => {
386
390
  return this.previewText() || this.locale().previewText;
387
- }, ...(ngDevMode ? [{ debugName: "previewTextSignal" }] : []));
391
+ }, /* @ts-ignore */
392
+ ...(ngDevMode ? [{ debugName: "previewTextSignal" }] : /* istanbul ignore next */ []));
388
393
  effect(() => {
389
394
  this.src();
390
395
  this.isLoaded.set(false);
@@ -426,17 +431,18 @@ class XImageComponent extends XImageProperty {
426
431
  this.isError.set(false);
427
432
  this.load.emit(event);
428
433
  }
429
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
430
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: XImageComponent, isStandalone: true, selector: "x-image", usesInheritance: true, ngImport: i0, template: "<div class=\"x-image\">\r\n <img\r\n [hidden]=\"(placeholder() && !isLoaded()) || isError()\"\r\n class=\"x-image-img\"\r\n [src]=\"src()\"\r\n [style.width]=\"width()\"\r\n [style.height]=\"height()\"\r\n [attr.alt]=\"alt()\"\r\n (error)=\"onError($event)\"\r\n (load)=\"onLoad($event)\"\r\n />\r\n @if (placeholder() && !isLoaded()) {\r\n <img class=\"x-image-img\" [src]=\"placeholder()\" [style.width]=\"width()\" [style.height]=\"height()\" />\r\n }\r\n @if (isError() && fallback()) {\r\n <img class=\"x-image-img x-image-fallback\" [src]=\"fallback()\" [style.width]=\"width()\" [style.height]=\"height()\" />\r\n }\r\n @if (isError() && !fallback()) {\r\n <div class=\"x-image-error-icon\" [style.width]=\"width()\" [style.height]=\"height()\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n </div>\r\n }\r\n @if (previewTpl()) {\r\n <div class=\"x-image-overlay\">\r\n <ng-container *xOutlet=\"previewTpl(); context: { $image: this }\"> </ng-container>\r\n </div>\r\n } @else {\r\n @if (!isError()) {\r\n <div class=\"x-image-overlay\" (click)=\"onPreview()\">\r\n <div class=\"x-image-text\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n <span>{{ previewTextSignal() }}</span>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["x-image{display:inline-block}.x-image{margin:0;padding:0}.x-image{position:relative;display:inline-block}.x-image-img{max-width:100%;max-height:100%;vertical-align:middle;border-radius:var(--x-border-radius)}.x-image-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;cursor:pointer;opacity:0;transition:opacity var(--x-animation-duration-base);border-radius:var(--x-border-radius)}.x-image-overlay:hover{opacity:1}.x-image-text>span{margin-left:.25rem}.x-image-error{display:none}.x-image-error-icon{font-size:2rem}\n"], dependencies: [{ kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
434
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
435
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XImageComponent, isStandalone: true, selector: "x-image", usesInheritance: true, ngImport: i0, template: "<div class=\"x-image\">\r\n <img\r\n [hidden]=\"(placeholder() && !isLoaded()) || isError()\"\r\n class=\"x-image-img\"\r\n [src]=\"src()\"\r\n [style.width]=\"width()\"\r\n [style.height]=\"height()\"\r\n [attr.alt]=\"alt()\"\r\n (error)=\"onError($event)\"\r\n (load)=\"onLoad($event)\"\r\n />\r\n @if (placeholder() && !isLoaded()) {\r\n <img class=\"x-image-img\" [src]=\"placeholder()\" [style.width]=\"width()\" [style.height]=\"height()\" />\r\n }\r\n @if (isError() && fallback()) {\r\n <img class=\"x-image-img x-image-fallback\" [src]=\"fallback()\" [style.width]=\"width()\" [style.height]=\"height()\" />\r\n }\r\n @if (isError() && !fallback()) {\r\n <div class=\"x-image-error-icon\" [style.width]=\"width()\" [style.height]=\"height()\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n </div>\r\n }\r\n @if (previewTpl()) {\r\n <div class=\"x-image-overlay\">\r\n <ng-container *xOutlet=\"previewTpl(); context: { $image: this }\"> </ng-container>\r\n </div>\r\n } @else {\r\n @if (!isError()) {\r\n <div class=\"x-image-overlay\" (click)=\"onPreview()\">\r\n <div class=\"x-image-text\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n <span>{{ previewTextSignal() }}</span>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["x-image{display:inline-block}.x-image{margin:0;padding:0}.x-image{position:relative;display:inline-block}.x-image-img{max-width:100%;max-height:100%;vertical-align:middle;border-radius:var(--x-border-radius)}.x-image-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;cursor:pointer;opacity:0;transition:opacity var(--x-animation-duration-base);border-radius:var(--x-border-radius)}.x-image-overlay:hover{opacity:1}.x-image-text>span{margin-left:.25rem}.x-image-error{display:none}.x-image-error-icon{font-size:2rem}\n"], dependencies: [{ kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
431
436
  }
432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageComponent, decorators: [{
437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageComponent, decorators: [{
433
438
  type: Component,
434
439
  args: [{ selector: `${XImagePrefix}`, imports: [XIconComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-image\">\r\n <img\r\n [hidden]=\"(placeholder() && !isLoaded()) || isError()\"\r\n class=\"x-image-img\"\r\n [src]=\"src()\"\r\n [style.width]=\"width()\"\r\n [style.height]=\"height()\"\r\n [attr.alt]=\"alt()\"\r\n (error)=\"onError($event)\"\r\n (load)=\"onLoad($event)\"\r\n />\r\n @if (placeholder() && !isLoaded()) {\r\n <img class=\"x-image-img\" [src]=\"placeholder()\" [style.width]=\"width()\" [style.height]=\"height()\" />\r\n }\r\n @if (isError() && fallback()) {\r\n <img class=\"x-image-img x-image-fallback\" [src]=\"fallback()\" [style.width]=\"width()\" [style.height]=\"height()\" />\r\n }\r\n @if (isError() && !fallback()) {\r\n <div class=\"x-image-error-icon\" [style.width]=\"width()\" [style.height]=\"height()\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n </div>\r\n }\r\n @if (previewTpl()) {\r\n <div class=\"x-image-overlay\">\r\n <ng-container *xOutlet=\"previewTpl(); context: { $image: this }\"> </ng-container>\r\n </div>\r\n } @else {\r\n @if (!isError()) {\r\n <div class=\"x-image-overlay\" (click)=\"onPreview()\">\r\n <div class=\"x-image-text\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n <span>{{ previewTextSignal() }}</span>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["x-image{display:inline-block}.x-image{margin:0;padding:0}.x-image{position:relative;display:inline-block}.x-image-img{max-width:100%;max-height:100%;vertical-align:middle;border-radius:var(--x-border-radius)}.x-image-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;cursor:pointer;opacity:0;transition:opacity var(--x-animation-duration-base);border-radius:var(--x-border-radius)}.x-image-overlay:hover{opacity:1}.x-image-text>span{margin-left:.25rem}.x-image-error{display:none}.x-image-error-icon{font-size:2rem}\n"] }]
435
440
  }], ctorParameters: () => [] });
436
441
 
437
442
  class XImageGroupComponent {
438
443
  constructor() {
439
- this.images = signal([], ...(ngDevMode ? [{ debugName: "images" }] : []));
444
+ this.images = signal([], /* @ts-ignore */
445
+ ...(ngDevMode ? [{ debugName: "images" }] : /* istanbul ignore next */ []));
440
446
  }
441
447
  addImage(image) {
442
448
  this.images.update((x) => {
@@ -450,15 +456,15 @@ class XImageGroupComponent {
450
456
  return [...x];
451
457
  });
452
458
  }
453
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
454
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: XImageGroupComponent, isStandalone: true, selector: "x-image-group", providers: [
459
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
460
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: XImageGroupComponent, isStandalone: true, selector: "x-image-group", providers: [
455
461
  {
456
462
  provide: X_IMAGE_GROUP_CONTEXT,
457
463
  useExisting: XImageGroupComponent
458
464
  }
459
465
  ], ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: ["x-image-group{display:inline-flex;flex-wrap:wrap}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
460
466
  }
461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageGroupComponent, decorators: [{
467
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageGroupComponent, decorators: [{
462
468
  type: Component,
463
469
  args: [{ selector: `${XImageGroupPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
464
470
  {
@@ -469,11 +475,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
469
475
  }] });
470
476
 
471
477
  class XImageModule {
472
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
473
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XImageModule, imports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent], exports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent] }); }
474
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageModule, imports: [XImageComponent, XImagePreviewComponent] }); }
478
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
479
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XImageModule, imports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent], exports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent] }); }
480
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageModule, imports: [XImageComponent, XImagePreviewComponent] }); }
475
481
  }
476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XImageModule, decorators: [{
482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XImageModule, decorators: [{
477
483
  type: NgModule,
478
484
  args: [{
479
485
  exports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent],