@ng-nest/ui 21.0.13 → 22.0.1

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 (205) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/ng-nest-ui-affix.mjs +12 -12
  3. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  4. package/fesm2022/ng-nest-ui-alert.mjs +46 -34
  5. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  6. package/fesm2022/ng-nest-ui-anchor.mjs +43 -31
  7. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  8. package/fesm2022/ng-nest-ui-api.mjs +7 -7
  9. package/fesm2022/ng-nest-ui-attachments.mjs +74 -48
  10. package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
  11. package/fesm2022/ng-nest-ui-auto-complete.mjs +114 -70
  12. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  13. package/fesm2022/ng-nest-ui-avatar.mjs +47 -32
  14. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  15. package/fesm2022/ng-nest-ui-back-top.mjs +23 -18
  16. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  17. package/fesm2022/ng-nest-ui-badge.mjs +30 -23
  18. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  19. package/fesm2022/ng-nest-ui-base-form.mjs +75 -44
  20. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  21. package/fesm2022/ng-nest-ui-bubble.mjs +76 -48
  22. package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
  23. package/fesm2022/ng-nest-ui-button.mjs +53 -42
  24. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  25. package/fesm2022/ng-nest-ui-calendar.mjs +30 -20
  26. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  27. package/fesm2022/ng-nest-ui-card.mjs +21 -16
  28. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  29. package/fesm2022/ng-nest-ui-carousel.mjs +68 -46
  30. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  31. package/fesm2022/ng-nest-ui-cascade.mjs +121 -73
  32. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  33. package/fesm2022/ng-nest-ui-checkbox.mjs +54 -38
  34. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  35. package/fesm2022/ng-nest-ui-collapse.mjs +38 -30
  36. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  37. package/fesm2022/ng-nest-ui-color-picker.mjs +119 -72
  38. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  39. package/fesm2022/ng-nest-ui-color.mjs +22 -16
  40. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  41. package/fesm2022/ng-nest-ui-comment.mjs +23 -21
  42. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  43. package/fesm2022/ng-nest-ui-container.mjs +40 -37
  44. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  45. package/fesm2022/ng-nest-ui-contextmenu.mjs +71 -45
  46. package/fesm2022/ng-nest-ui-contextmenu.mjs.map +1 -1
  47. package/fesm2022/ng-nest-ui-core.mjs +24 -21
  48. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  49. package/fesm2022/ng-nest-ui-coversations.mjs +25 -18
  50. package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
  51. package/fesm2022/ng-nest-ui-crumb.mjs +15 -13
  52. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  53. package/fesm2022/ng-nest-ui-date-picker.mjs +425 -256
  54. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  55. package/fesm2022/ng-nest-ui-description.mjs +42 -31
  56. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  57. package/fesm2022/ng-nest-ui-dialog.mjs +106 -82
  58. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  59. package/fesm2022/ng-nest-ui-divider.mjs +24 -17
  60. package/fesm2022/ng-nest-ui-divider.mjs.map +1 -1
  61. package/fesm2022/ng-nest-ui-doc.mjs +7 -7
  62. package/fesm2022/ng-nest-ui-drag.mjs +10 -10
  63. package/fesm2022/ng-nest-ui-drawer.mjs +52 -43
  64. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  65. package/fesm2022/ng-nest-ui-dropdown.mjs +94 -58
  66. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  67. package/fesm2022/ng-nest-ui-empty.mjs +14 -12
  68. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  69. package/fesm2022/ng-nest-ui-examples.mjs +7 -7
  70. package/fesm2022/ng-nest-ui-find.mjs +111 -71
  71. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  72. package/fesm2022/ng-nest-ui-form.mjs +45 -33
  73. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  74. package/fesm2022/ng-nest-ui-highlight.mjs +26 -20
  75. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  76. package/fesm2022/ng-nest-ui-i18n.mjs +16 -15
  77. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  78. package/fesm2022/ng-nest-ui-icon.mjs +28 -21
  79. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  80. package/fesm2022/ng-nest-ui-image.mjs +57 -51
  81. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  82. package/fesm2022/ng-nest-ui-inner.mjs +11 -11
  83. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  84. package/fesm2022/ng-nest-ui-input-number.mjs +63 -42
  85. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  86. package/fesm2022/ng-nest-ui-input.mjs +130 -85
  87. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  88. package/fesm2022/ng-nest-ui-keyword.mjs +19 -15
  89. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  90. package/fesm2022/ng-nest-ui-layout.mjs +37 -31
  91. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  92. package/fesm2022/ng-nest-ui-link.mjs +23 -18
  93. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  94. package/fesm2022/ng-nest-ui-list.mjs +137 -89
  95. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  96. package/fesm2022/ng-nest-ui-loading.mjs +36 -25
  97. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  98. package/fesm2022/ng-nest-ui-menu.mjs +68 -45
  99. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  100. package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
  101. package/fesm2022/ng-nest-ui-message.mjs +10 -10
  102. package/fesm2022/ng-nest-ui-notification.mjs +10 -10
  103. package/fesm2022/ng-nest-ui-outlet.mjs +11 -9
  104. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  105. package/fesm2022/ng-nest-ui-page-header.mjs +20 -15
  106. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  107. package/fesm2022/ng-nest-ui-pagination.mjs +69 -48
  108. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  109. package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
  110. package/fesm2022/ng-nest-ui-popconfirm.mjs +40 -27
  111. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  112. package/fesm2022/ng-nest-ui-popover.mjs +57 -38
  113. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  114. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  115. package/fesm2022/ng-nest-ui-progress.mjs +60 -41
  116. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  117. package/fesm2022/ng-nest-ui-prompts.mjs +18 -15
  118. package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
  119. package/fesm2022/ng-nest-ui-radio.mjs +50 -35
  120. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  121. package/fesm2022/ng-nest-ui-rate.mjs +43 -29
  122. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  123. package/fesm2022/ng-nest-ui-resizable.mjs +18 -16
  124. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  125. package/fesm2022/ng-nest-ui-result.mjs +22 -16
  126. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  127. package/fesm2022/ng-nest-ui-ripple.mjs +14 -13
  128. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  129. package/fesm2022/ng-nest-ui-scrollable.mjs +41 -24
  130. package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
  131. package/fesm2022/ng-nest-ui-select.mjs +197 -118
  132. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  133. package/fesm2022/ng-nest-ui-sender.mjs +43 -31
  134. package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
  135. package/fesm2022/ng-nest-ui-skeleton.mjs +17 -15
  136. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  137. package/fesm2022/ng-nest-ui-slider-select.mjs +85 -53
  138. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  139. package/fesm2022/ng-nest-ui-slider.mjs +58 -37
  140. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  141. package/fesm2022/ng-nest-ui-splitter.mjs +32 -24
  142. package/fesm2022/ng-nest-ui-splitter.mjs.map +1 -1
  143. package/fesm2022/ng-nest-ui-statistic.mjs +44 -30
  144. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  145. package/fesm2022/ng-nest-ui-steps.mjs +30 -22
  146. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  147. package/fesm2022/ng-nest-ui-suggestion.mjs +23 -20
  148. package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
  149. package/fesm2022/ng-nest-ui-switch.mjs +35 -25
  150. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  151. package/fesm2022/ng-nest-ui-table-view.mjs +78 -69
  152. package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
  153. package/fesm2022/ng-nest-ui-table.mjs +320 -205
  154. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  155. package/fesm2022/ng-nest-ui-tabs.mjs +74 -56
  156. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  157. package/fesm2022/ng-nest-ui-tag.mjs +30 -23
  158. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  159. package/fesm2022/ng-nest-ui-text-retract.mjs +19 -15
  160. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  161. package/fesm2022/ng-nest-ui-textarea.mjs +69 -44
  162. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  163. package/fesm2022/ng-nest-ui-theme.mjs +34 -23
  164. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  165. package/fesm2022/ng-nest-ui-thought-chain.mjs +26 -19
  166. package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
  167. package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
  168. package/fesm2022/ng-nest-ui-time-picker.mjs +164 -96
  169. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  170. package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
  171. package/fesm2022/ng-nest-ui-timeline.mjs +26 -19
  172. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  173. package/fesm2022/ng-nest-ui-tooltip.mjs +53 -35
  174. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  175. package/fesm2022/ng-nest-ui-transfer.mjs +66 -40
  176. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  177. package/fesm2022/ng-nest-ui-tree-file.mjs +39 -28
  178. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  179. package/fesm2022/ng-nest-ui-tree-select.mjs +186 -111
  180. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  181. package/fesm2022/ng-nest-ui-tree.mjs +166 -105
  182. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  183. package/fesm2022/ng-nest-ui-typography.mjs +16 -13
  184. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  185. package/fesm2022/ng-nest-ui-upload.mjs +81 -53
  186. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  187. package/fesm2022/ng-nest-ui-watermark.mjs +45 -35
  188. package/fesm2022/ng-nest-ui-watermark.mjs.map +1 -1
  189. package/fesm2022/ng-nest-ui-welcome.mjs +22 -16
  190. package/fesm2022/ng-nest-ui-welcome.mjs.map +1 -1
  191. package/package.json +7 -6
  192. package/types/ng-nest-ui-base-form.d.ts +3 -3
  193. package/types/ng-nest-ui-carousel.d.ts +1 -1
  194. package/types/ng-nest-ui-container.d.ts +1 -1
  195. package/types/ng-nest-ui-core.d.ts +1 -1
  196. package/types/ng-nest-ui-dialog.d.ts +1 -1
  197. package/types/ng-nest-ui-drawer.d.ts +1 -1
  198. package/types/ng-nest-ui-form.d.ts +12 -12
  199. package/types/ng-nest-ui-layout.d.ts +1 -1
  200. package/types/ng-nest-ui-list.d.ts +1 -1
  201. package/types/ng-nest-ui-portal.d.ts +3 -3
  202. package/types/ng-nest-ui-table-view.d.ts +1 -1
  203. package/types/ng-nest-ui-table.d.ts +1 -1
  204. package/types/ng-nest-ui-tabs.d.ts +1 -1
  205. package/types/ng-nest-ui-tree.d.ts +1 -1
@@ -37,37 +37,40 @@ class XThemeProperty extends XFormControlFunction(X_THEME_CONFIG_NAME) {
37
37
  * @zh_CN 参数前缀
38
38
  * @en_US Parameter prefix
39
39
  */
40
- this.prefix = input('--x-', ...(ngDevMode ? [{ debugName: "prefix" }] : []));
40
+ this.prefix = input('--x-', /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
41
42
  /**
42
43
  * @zh_CN 混合的颜色占比
43
44
  * @en_US Proportion of mixed colors
44
45
  */
45
- this.amounts = input(this.config?.amounts ?? XThemeAmounts, ...(ngDevMode ? [{ debugName: "amounts" }] : []));
46
+ this.amounts = input(this.config?.amounts ?? XThemeAmounts, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "amounts" }] : /* istanbul ignore next */ []));
46
48
  /**
47
49
  * @zh_CN 显示暗黑模式的设置
48
50
  * @en_US Show dark mode settings
49
51
  */
50
- this.showDark = input(false, { ...(ngDevMode ? { debugName: "showDark" } : {}), transform: XToBoolean });
52
+ this.showDark = input(false, { ...(ngDevMode ? { debugName: "showDark" } : /* istanbul ignore next */ {}), transform: XToBoolean });
51
53
  /**
52
54
  * @zh_CN 详细设置
53
55
  * @en_US Detailed settings
54
56
  */
55
- this.showDetail = input(false, { ...(ngDevMode ? { debugName: "showDetail" } : {}), transform: XToBoolean });
57
+ this.showDetail = input(false, { ...(ngDevMode ? { debugName: "showDetail" } : /* istanbul ignore next */ {}), transform: XToBoolean });
56
58
  /**
57
59
  * @zh_CN 暗黑模式
58
60
  * @en_US Dark mode
59
61
  */
60
- this.dark = model(false, ...(ngDevMode ? [{ debugName: "dark" }] : []));
62
+ this.dark = model(false, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "dark" }] : /* istanbul ignore next */ []));
61
64
  /**
62
65
  * @zh_CN 初始化默认值事件
63
66
  * @en_US Initialize default value event
64
67
  */
65
68
  this.defaultClick = output();
66
69
  }
67
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
68
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: XThemeProperty, isStandalone: true, selector: "x-theme-property", inputs: { prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, amounts: { classPropertyName: "amounts", publicName: "amounts", isSignal: true, isRequired: false, transformFunction: null }, showDark: { classPropertyName: "showDark", publicName: "showDark", isSignal: true, isRequired: false, transformFunction: null }, showDetail: { classPropertyName: "showDetail", publicName: "showDetail", isSignal: true, isRequired: false, transformFunction: null }, dark: { classPropertyName: "dark", publicName: "dark", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dark: "darkChange", defaultClick: "defaultClick" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
70
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
71
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XThemeProperty, isStandalone: true, selector: "x-theme-property", inputs: { prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, amounts: { classPropertyName: "amounts", publicName: "amounts", isSignal: true, isRequired: false, transformFunction: null }, showDark: { classPropertyName: "showDark", publicName: "showDark", isSignal: true, isRequired: false, transformFunction: null }, showDetail: { classPropertyName: "showDetail", publicName: "showDetail", isSignal: true, isRequired: false, transformFunction: null }, dark: { classPropertyName: "dark", publicName: "dark", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dark: "darkChange", defaultClick: "defaultClick" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
69
72
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeProperty, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeProperty, decorators: [{
71
74
  type: Component,
72
75
  args: [{ selector: `${XThemePrefix}-property`, template: '' }]
73
76
  }], propDecorators: { prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], amounts: [{ type: i0.Input, args: [{ isSignal: true, alias: "amounts", required: false }] }], showDark: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDark", required: false }] }], showDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDetail", required: false }] }], dark: [{ type: i0.Input, args: [{ isSignal: true, alias: "dark", required: false }] }, { type: i0.Output, args: ["darkChange"] }], defaultClick: [{ type: i0.Output, args: ["defaultClick"] }] } });
@@ -87,12 +90,18 @@ class XThemeComponent extends XThemeProperty {
87
90
  this.i18n = inject(XI18nService);
88
91
  this.configService = inject(XConfigService);
89
92
  this.themeService = this.configService.themeService;
90
- this.formGroup = signal(new UntypedFormGroup({}), ...(ngDevMode ? [{ debugName: "formGroup" }] : []));
91
- this.theme = signal({ colors: {} }, ...(ngDevMode ? [{ debugName: "theme" }] : []));
92
- this.width = signal('45rem', ...(ngDevMode ? [{ debugName: "width" }] : []));
93
- this.beforeColors = signal({}, ...(ngDevMode ? [{ debugName: "beforeColors" }] : []));
94
- this.currentColors = signal({}, ...(ngDevMode ? [{ debugName: "currentColors" }] : []));
95
- this.darkBeforeColors = signal({}, ...(ngDevMode ? [{ debugName: "darkBeforeColors" }] : []));
93
+ this.formGroup = signal(new UntypedFormGroup({}), /* @ts-ignore */
94
+ ...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
95
+ this.theme = signal({ colors: {} }, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
97
+ this.width = signal('45rem', /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
99
+ this.beforeColors = signal({}, /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "beforeColors" }] : /* istanbul ignore next */ []));
101
+ this.currentColors = signal({}, /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "currentColors" }] : /* istanbul ignore next */ []));
103
+ this.darkBeforeColors = signal({}, /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "darkBeforeColors" }] : /* istanbul ignore next */ []));
96
105
  this.controls = signal([
97
106
  { control: 'color-picker', id: 'primary', label: '主色', span: 5 },
98
107
  { control: 'color-picker', id: 'success', label: '成功', span: 5 },
@@ -102,8 +111,10 @@ class XThemeComponent extends XThemeProperty {
102
111
  { control: 'color-picker', id: 'background', label: '背景', span: 5 },
103
112
  { control: 'color-picker', id: 'border', label: '边框', span: 5 },
104
113
  { control: 'color-picker', id: 'text', label: '文字', span: 5 }
105
- ], ...(ngDevMode ? [{ debugName: "controls" }] : []));
106
- this.value = signal({}, ...(ngDevMode ? [{ debugName: "value" }] : []));
114
+ ], /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
116
+ this.value = signal({}, /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
107
118
  this.locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.theme)), { initialValue: zh_CN.theme });
108
119
  this.unSubject = new Subject();
109
120
  effect(() => this.setControlsLabel());
@@ -219,10 +230,10 @@ class XThemeComponent extends XThemeProperty {
219
230
  }
220
231
  this.formGroup().patchValue(colors);
221
232
  }
222
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
223
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: XThemeComponent, isStandalone: true, selector: "x-theme", providers: [XValueAccessor(XThemeComponent)], usesInheritance: true, ngImport: i0, template: "<div class=\"x-theme\">\r\n <x-row>\r\n @if (showDark()) {\r\n <x-col [style.width.rem]=\"8\">\r\n <x-switch\r\n direction=\"row\"\r\n [label]=\"locale().darkMode!\"\r\n [(ngModel)]=\"dark\"\r\n (ngModelChange)=\"darkChanges()\"\r\n ></x-switch>\r\n </x-col>\r\n }\r\n <x-col [style.width.rem]=\"8\">\r\n <x-button (click)=\"default()\">{{ locale().initDefault }}</x-button>\r\n </x-col>\r\n </x-row>\r\n <x-form [formGroup]=\"formGroup()\" [controls]=\"controls()\" [width]=\"width()\" span=\"2\" space=\"1\"></x-form>\r\n</div>\r\n", styles: [".x-theme{margin:0;padding:0}.x-theme{display:inline-block}.x-theme x-color-picker:not(:first-child){margin-left:.125rem}.x-theme-darken,.x-theme-default,.x-theme-gradual{display:flex}.x-theme-default x-color-picker{width:9.25rem}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: XSwitchComponent, selector: "x-switch" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XRowComponent, selector: "x-row" }, { kind: "component", type: XColComponent, selector: "x-col" }, { kind: "component", type: XFormComponent, selector: "x-form" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
233
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
234
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XThemeComponent, isStandalone: true, selector: "x-theme", providers: [XValueAccessor(XThemeComponent)], usesInheritance: true, ngImport: i0, template: "<div class=\"x-theme\">\r\n <x-row>\r\n @if (showDark()) {\r\n <x-col [style.width.rem]=\"8\">\r\n <x-switch\r\n direction=\"row\"\r\n [label]=\"locale().darkMode!\"\r\n [(ngModel)]=\"dark\"\r\n (ngModelChange)=\"darkChanges()\"\r\n ></x-switch>\r\n </x-col>\r\n }\r\n <x-col [style.width.rem]=\"8\">\r\n <x-button (click)=\"default()\">{{ locale().initDefault }}</x-button>\r\n </x-col>\r\n </x-row>\r\n <x-form [formGroup]=\"formGroup()\" [controls]=\"controls()\" [width]=\"width()\" span=\"2\" space=\"1\"></x-form>\r\n</div>\r\n", styles: [".x-theme{margin:0;padding:0}.x-theme{display:inline-block}.x-theme x-color-picker:not(:first-child){margin-left:.125rem}.x-theme-darken,.x-theme-default,.x-theme-gradual{display:flex}.x-theme-default x-color-picker{width:9.25rem}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: XSwitchComponent, selector: "x-switch" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XRowComponent, selector: "x-row" }, { kind: "component", type: XColComponent, selector: "x-col" }, { kind: "component", type: XFormComponent, selector: "x-form" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
224
235
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeComponent, decorators: [{
236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeComponent, decorators: [{
226
237
  type: Component,
227
238
  args: [{ selector: 'x-theme', imports: [
228
239
  FormsModule,
@@ -236,11 +247,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
236
247
  }], ctorParameters: () => [] });
237
248
 
238
249
  class XThemeModule {
239
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
240
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XThemeModule, imports: [XThemeComponent], exports: [XThemeComponent] }); }
241
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeModule, imports: [XThemeComponent] }); }
250
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
251
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XThemeModule, imports: [XThemeComponent], exports: [XThemeComponent] }); }
252
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeModule, imports: [XThemeComponent] }); }
242
253
  }
243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThemeModule, decorators: [{
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThemeModule, decorators: [{
244
255
  type: NgModule,
245
256
  args: [{
246
257
  exports: [XThemeComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-theme.mjs","sources":["../../../../lib/ng-nest/ui/theme/theme.property.ts","../../../../lib/ng-nest/ui/theme/theme.component.ts","../../../../lib/ng-nest/ui/theme/theme.component.html","../../../../lib/ng-nest/ui/theme/theme.module.ts","../../../../lib/ng-nest/ui/theme/ng-nest-ui-theme.ts"],"sourcesContent":["import { XColorsTheme, XBoolean, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, model, output } from '@angular/core';\r\nimport { XFormControlFunction } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Theme\r\n * @selector x-theme\r\n * @decorator component\r\n */\r\nexport const XThemePrefix = 'x-theme';\r\nconst X_THEME_CONFIG_NAME = 'theme';\r\n\r\n/**\r\n * @zh_CN 混合的颜色占比\r\n * @en_US Proportion of mixed colors\r\n */\r\nexport const XThemeAmounts = [\r\n -0.1, -0.2, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8, -0.9, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9\r\n];\r\n\r\n/**\r\n * Theme Property\r\n */\r\n@Component({ selector: `${XThemePrefix}-property`, template: '' })\r\nexport class XThemeProperty extends XFormControlFunction(X_THEME_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 参数前缀\r\n * @en_US Parameter prefix\r\n */\r\n readonly prefix = input<string>('--x-');\r\n /**\r\n * @zh_CN 混合的颜色占比\r\n * @en_US Proportion of mixed colors\r\n */\r\n readonly amounts = input<number[]>(this.config?.amounts ?? XThemeAmounts);\r\n /**\r\n * @zh_CN 显示暗黑模式的设置\r\n * @en_US Show dark mode settings\r\n */\r\n readonly showDark = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 详细设置\r\n * @en_US Detailed settings\r\n */\r\n readonly showDetail = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 暗黑模式\r\n * @en_US Dark mode\r\n */\r\n readonly dark = model(false);\r\n /**\r\n * @zh_CN 初始化默认值事件\r\n * @en_US Initialize default value event\r\n */\r\n readonly defaultClick = output<XColorsTheme>();\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n OnDestroy,\r\n inject,\r\n AfterViewInit,\r\n signal,\r\n effect\r\n} from '@angular/core';\r\nimport { XThemeProperty } from './theme.property';\r\nimport {\r\n XConfigService,\r\n XColorsTheme,\r\n XTheme,\r\n X_THEME_COLOR_KEYS,\r\n X_THEME_COLORS,\r\n X_THEME_DARK_COLORS\r\n} from '@ng-nest/ui/core';\r\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\r\nimport { XControl, XFormComponent } from '@ng-nest/ui/form';\r\nimport { debounceTime, takeUntil, map } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nTheme, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { XSwitchComponent } from '@ng-nest/ui/switch';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XColComponent, XRowComponent } from '@ng-nest/ui/layout';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: 'x-theme',\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n XSwitchComponent,\r\n XButtonComponent,\r\n XRowComponent,\r\n XColComponent,\r\n XFormComponent\r\n ],\r\n templateUrl: './theme.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XThemeComponent)]\r\n})\r\nexport class XThemeComponent extends XThemeProperty implements OnInit, AfterViewInit, OnDestroy {\r\n public i18n = inject(XI18nService);\r\n configService = inject(XConfigService);\r\n themeService = this.configService.themeService;\r\n\r\n formGroup = signal(new UntypedFormGroup({}));\r\n theme = signal<XTheme>({ colors: {} });\r\n width = signal('45rem');\r\n beforeColors = signal<XColorsTheme>({});\r\n currentColors = signal<XColorsTheme>({});\r\n darkBeforeColors = signal<XColorsTheme>({});\r\n controls = signal<XControl[]>([\r\n { control: 'color-picker', id: 'primary', label: '主色', span: 5 },\r\n { control: 'color-picker', id: 'success', label: '成功', span: 5 },\r\n { control: 'color-picker', id: 'warning', label: '警告', span: 5 },\r\n { control: 'color-picker', id: 'danger', label: '危险', span: 5 },\r\n { control: 'color-picker', id: 'info', label: '信息', span: 5 },\r\n { control: 'color-picker', id: 'background', label: '背景', span: 5 },\r\n { control: 'color-picker', id: 'border', label: '边框', span: 5 },\r\n { control: 'color-picker', id: 'text', label: '文字', span: 5 }\r\n ]);\r\n\r\n override value = signal<XColorsTheme>({});\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.theme as XI18nTheme)), { initialValue: zh_CN.theme });\r\n\r\n private unSubject = new Subject<void>();\r\n\r\n override writeValue(value: XColorsTheme) {\r\n this.value.set(value);\r\n if (this.value() && Object.keys(this.value()).length > 0) {\r\n this.theme.set({\r\n colors: this.themeService.getDefineColors(\r\n Object.assign({}, X_THEME_COLORS, this.value()),\r\n '',\r\n this.dark() as boolean\r\n )\r\n });\r\n this.formGroup().patchValue(this.theme().colors as XColorsTheme);\r\n }\r\n }\r\n\r\n constructor() {\r\n super();\r\n effect(() => this.setControlsLabel());\r\n effect(() => {\r\n if (this.dark()) {\r\n this.themeService.changed.next('dark');\r\n } else {\r\n this.themeService.changed.next('light');\r\n }\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.theme.set(this.configService.getTheme(true));\r\n this.setControls();\r\n this.setDefaultColors();\r\n this.controls.update((controls) => {\r\n controls.map((x: XControl) => {\r\n x.value = (this.theme().colors as XColorsTheme)[x.id];\r\n });\r\n return [...controls];\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.formGroup()\r\n .valueChanges.pipe(debounceTime(100), takeUntil(this.unSubject))\r\n .subscribe((x: XColorsTheme) => {\r\n this.beforeColors.set(this.currentColors());\r\n let changes = this.getChanges(x);\r\n if (this.isOneAndInColorKeys(changes)) {\r\n let [key, value] = Object.entries(changes)[0];\r\n let colors = !this.dark()\r\n ? this.themeService.setColorRoot(key, value, '')\r\n : this.themeService.setDarkColorRoot(key, value, '');\r\n Object.assign(x, colors);\r\n this.currentColors.set(x);\r\n this.formGroup().patchValue(x);\r\n } else {\r\n this.currentColors.set(x);\r\n this.value.set(x);\r\n this.configService.setTheme({ colors: x });\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n setControlsLabel() {\r\n Object.keys(this.locale()).forEach((x) => {\r\n let control = this.controls().find((y) => y.id === x);\r\n if (control) {\r\n control.label = (this.locale() as any)[x];\r\n control.change && control.change();\r\n }\r\n });\r\n }\r\n\r\n setDefaultColors() {\r\n this.beforeColors.set(this.theme().colors as XColorsTheme);\r\n this.currentColors.set(this.beforeColors());\r\n this.darkBeforeColors = this.beforeColors;\r\n }\r\n\r\n setControls() {\r\n [...this.controls()].forEach((control, index) => {\r\n let addControls: XControl[] = [];\r\n control.span = !this.showDetail() ? 6 : 5;\r\n this.width.set(!this.showDetail() ? '36rem' : '45rem');\r\n for (let amount of this.amounts()) {\r\n addControls.push({\r\n control: 'color-picker',\r\n id: `${control.id}${this.themeService.getSuffix(amount)}`,\r\n label: '',\r\n hidden: !this.showDetail\r\n });\r\n }\r\n this.controls.update((x) => {\r\n x.splice(index * this.amounts().length + index + 1, 0, ...addControls);\r\n return [...x];\r\n });\r\n });\r\n }\r\n\r\n default() {\r\n this.dark.set(false);\r\n let colors = this.themeService.getDefineColors(Object.assign({}, X_THEME_COLORS), '', this.dark());\r\n this.beforeColors.set(colors);\r\n this.currentColors.set(colors);\r\n this.formGroup().patchValue(colors);\r\n this.defaultClick.emit(colors);\r\n }\r\n\r\n isOneAndInColorKeys(colors: XColorsTheme) {\r\n const keys = Object.keys(colors);\r\n if (keys.length === 1 && X_THEME_COLOR_KEYS.includes(keys[0])) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getChanges(colors: XColorsTheme) {\r\n let result: XColorsTheme = {};\r\n for (let color in colors) {\r\n if (colors[color] !== this.beforeColors()[color]) {\r\n result[color] = colors[color];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n darkChanges() {\r\n let colors = this.darkBeforeColors();\r\n if (this.dark()) {\r\n this.beforeColors.set(this.formGroup().value);\r\n this.darkBeforeColors.set(this.formGroup().value);\r\n colors = this.themeService.getDefineColors(\r\n Object.assign({}, this.themeService.getColorsInProperty(X_THEME_COLORS), X_THEME_DARK_COLORS),\r\n '',\r\n this.dark()\r\n );\r\n }\r\n this.formGroup().patchValue(colors);\r\n }\r\n}\r\n","<div class=\"x-theme\">\r\n <x-row>\r\n @if (showDark()) {\r\n <x-col [style.width.rem]=\"8\">\r\n <x-switch\r\n direction=\"row\"\r\n [label]=\"locale().darkMode!\"\r\n [(ngModel)]=\"dark\"\r\n (ngModelChange)=\"darkChanges()\"\r\n ></x-switch>\r\n </x-col>\r\n }\r\n <x-col [style.width.rem]=\"8\">\r\n <x-button (click)=\"default()\">{{ locale().initDefault }}</x-button>\r\n </x-col>\r\n </x-row>\r\n <x-form [formGroup]=\"formGroup()\" [controls]=\"controls()\" [width]=\"width()\" span=\"2\" space=\"1\"></x-form>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XThemeComponent } from './theme.component';\r\n\r\n@NgModule({\r\n exports: [XThemeComponent],\r\n imports: [XThemeComponent]\r\n})\r\nexport class XThemeModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,YAAY,GAAG;AAC5B,MAAM,mBAAmB,GAAG,OAAO;AAEnC;;;AAGG;AACI,MAAM,aAAa,GAAG;AAC3B,IAAA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AAC,cAAc,CAAA,eAAA,CAAiB,CAAC,EAAA,QAAA,EAAA,umBAAA,EAAA,MAAA,EAAA,CAAA,yOAAA,CAAA,EAAA;;;MEvCjC,YAAY,CAAA;iIAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAZ,YAAY,EAAA,OAAA,EAAA,CAFb,eAAe,CAAA,EAAA,OAAA,EAAA,CADf,eAAe,CAAA,EAAA,CAAA,CAAA;AAGd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAFb,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAEd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-theme.mjs","sources":["../../../../lib/ng-nest/ui/theme/theme.property.ts","../../../../lib/ng-nest/ui/theme/theme.component.ts","../../../../lib/ng-nest/ui/theme/theme.component.html","../../../../lib/ng-nest/ui/theme/theme.module.ts","../../../../lib/ng-nest/ui/theme/ng-nest-ui-theme.ts"],"sourcesContent":["import { XColorsTheme, XBoolean, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, model, output } from '@angular/core';\r\nimport { XFormControlFunction } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Theme\r\n * @selector x-theme\r\n * @decorator component\r\n */\r\nexport const XThemePrefix = 'x-theme';\r\nconst X_THEME_CONFIG_NAME = 'theme';\r\n\r\n/**\r\n * @zh_CN 混合的颜色占比\r\n * @en_US Proportion of mixed colors\r\n */\r\nexport const XThemeAmounts = [\r\n -0.1, -0.2, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8, -0.9, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9\r\n];\r\n\r\n/**\r\n * Theme Property\r\n */\r\n@Component({ selector: `${XThemePrefix}-property`, template: '' })\r\nexport class XThemeProperty extends XFormControlFunction(X_THEME_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 参数前缀\r\n * @en_US Parameter prefix\r\n */\r\n readonly prefix = input<string>('--x-');\r\n /**\r\n * @zh_CN 混合的颜色占比\r\n * @en_US Proportion of mixed colors\r\n */\r\n readonly amounts = input<number[]>(this.config?.amounts ?? XThemeAmounts);\r\n /**\r\n * @zh_CN 显示暗黑模式的设置\r\n * @en_US Show dark mode settings\r\n */\r\n readonly showDark = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 详细设置\r\n * @en_US Detailed settings\r\n */\r\n readonly showDetail = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 暗黑模式\r\n * @en_US Dark mode\r\n */\r\n readonly dark = model(false);\r\n /**\r\n * @zh_CN 初始化默认值事件\r\n * @en_US Initialize default value event\r\n */\r\n readonly defaultClick = output<XColorsTheme>();\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n OnDestroy,\r\n inject,\r\n AfterViewInit,\r\n signal,\r\n effect\r\n} from '@angular/core';\r\nimport { XThemeProperty } from './theme.property';\r\nimport {\r\n XConfigService,\r\n XColorsTheme,\r\n XTheme,\r\n X_THEME_COLOR_KEYS,\r\n X_THEME_COLORS,\r\n X_THEME_DARK_COLORS\r\n} from '@ng-nest/ui/core';\r\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\r\nimport { XControl, XFormComponent } from '@ng-nest/ui/form';\r\nimport { debounceTime, takeUntil, map } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nTheme, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { XSwitchComponent } from '@ng-nest/ui/switch';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XColComponent, XRowComponent } from '@ng-nest/ui/layout';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: 'x-theme',\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n XSwitchComponent,\r\n XButtonComponent,\r\n XRowComponent,\r\n XColComponent,\r\n XFormComponent\r\n ],\r\n templateUrl: './theme.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XThemeComponent)]\r\n})\r\nexport class XThemeComponent extends XThemeProperty implements OnInit, AfterViewInit, OnDestroy {\r\n public i18n = inject(XI18nService);\r\n configService = inject(XConfigService);\r\n themeService = this.configService.themeService;\r\n\r\n formGroup = signal(new UntypedFormGroup({}));\r\n theme = signal<XTheme>({ colors: {} });\r\n width = signal('45rem');\r\n beforeColors = signal<XColorsTheme>({});\r\n currentColors = signal<XColorsTheme>({});\r\n darkBeforeColors = signal<XColorsTheme>({});\r\n controls = signal<XControl[]>([\r\n { control: 'color-picker', id: 'primary', label: '主色', span: 5 },\r\n { control: 'color-picker', id: 'success', label: '成功', span: 5 },\r\n { control: 'color-picker', id: 'warning', label: '警告', span: 5 },\r\n { control: 'color-picker', id: 'danger', label: '危险', span: 5 },\r\n { control: 'color-picker', id: 'info', label: '信息', span: 5 },\r\n { control: 'color-picker', id: 'background', label: '背景', span: 5 },\r\n { control: 'color-picker', id: 'border', label: '边框', span: 5 },\r\n { control: 'color-picker', id: 'text', label: '文字', span: 5 }\r\n ]);\r\n\r\n override value = signal<XColorsTheme>({});\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.theme as XI18nTheme)), { initialValue: zh_CN.theme });\r\n\r\n private unSubject = new Subject<void>();\r\n\r\n override writeValue(value: XColorsTheme) {\r\n this.value.set(value);\r\n if (this.value() && Object.keys(this.value()).length > 0) {\r\n this.theme.set({\r\n colors: this.themeService.getDefineColors(\r\n Object.assign({}, X_THEME_COLORS, this.value()),\r\n '',\r\n this.dark() as boolean\r\n )\r\n });\r\n this.formGroup().patchValue(this.theme().colors as XColorsTheme);\r\n }\r\n }\r\n\r\n constructor() {\r\n super();\r\n effect(() => this.setControlsLabel());\r\n effect(() => {\r\n if (this.dark()) {\r\n this.themeService.changed.next('dark');\r\n } else {\r\n this.themeService.changed.next('light');\r\n }\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.theme.set(this.configService.getTheme(true));\r\n this.setControls();\r\n this.setDefaultColors();\r\n this.controls.update((controls) => {\r\n controls.map((x: XControl) => {\r\n x.value = (this.theme().colors as XColorsTheme)[x.id];\r\n });\r\n return [...controls];\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.formGroup()\r\n .valueChanges.pipe(debounceTime(100), takeUntil(this.unSubject))\r\n .subscribe((x: XColorsTheme) => {\r\n this.beforeColors.set(this.currentColors());\r\n let changes = this.getChanges(x);\r\n if (this.isOneAndInColorKeys(changes)) {\r\n let [key, value] = Object.entries(changes)[0];\r\n let colors = !this.dark()\r\n ? this.themeService.setColorRoot(key, value, '')\r\n : this.themeService.setDarkColorRoot(key, value, '');\r\n Object.assign(x, colors);\r\n this.currentColors.set(x);\r\n this.formGroup().patchValue(x);\r\n } else {\r\n this.currentColors.set(x);\r\n this.value.set(x);\r\n this.configService.setTheme({ colors: x });\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n setControlsLabel() {\r\n Object.keys(this.locale()).forEach((x) => {\r\n let control = this.controls().find((y) => y.id === x);\r\n if (control) {\r\n control.label = (this.locale() as any)[x];\r\n control.change && control.change();\r\n }\r\n });\r\n }\r\n\r\n setDefaultColors() {\r\n this.beforeColors.set(this.theme().colors as XColorsTheme);\r\n this.currentColors.set(this.beforeColors());\r\n this.darkBeforeColors = this.beforeColors;\r\n }\r\n\r\n setControls() {\r\n [...this.controls()].forEach((control, index) => {\r\n let addControls: XControl[] = [];\r\n control.span = !this.showDetail() ? 6 : 5;\r\n this.width.set(!this.showDetail() ? '36rem' : '45rem');\r\n for (let amount of this.amounts()) {\r\n addControls.push({\r\n control: 'color-picker',\r\n id: `${control.id}${this.themeService.getSuffix(amount)}`,\r\n label: '',\r\n hidden: !this.showDetail\r\n });\r\n }\r\n this.controls.update((x) => {\r\n x.splice(index * this.amounts().length + index + 1, 0, ...addControls);\r\n return [...x];\r\n });\r\n });\r\n }\r\n\r\n default() {\r\n this.dark.set(false);\r\n let colors = this.themeService.getDefineColors(Object.assign({}, X_THEME_COLORS), '', this.dark());\r\n this.beforeColors.set(colors);\r\n this.currentColors.set(colors);\r\n this.formGroup().patchValue(colors);\r\n this.defaultClick.emit(colors);\r\n }\r\n\r\n isOneAndInColorKeys(colors: XColorsTheme) {\r\n const keys = Object.keys(colors);\r\n if (keys.length === 1 && X_THEME_COLOR_KEYS.includes(keys[0])) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getChanges(colors: XColorsTheme) {\r\n let result: XColorsTheme = {};\r\n for (let color in colors) {\r\n if (colors[color] !== this.beforeColors()[color]) {\r\n result[color] = colors[color];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n darkChanges() {\r\n let colors = this.darkBeforeColors();\r\n if (this.dark()) {\r\n this.beforeColors.set(this.formGroup().value);\r\n this.darkBeforeColors.set(this.formGroup().value);\r\n colors = this.themeService.getDefineColors(\r\n Object.assign({}, this.themeService.getColorsInProperty(X_THEME_COLORS), X_THEME_DARK_COLORS),\r\n '',\r\n this.dark()\r\n );\r\n }\r\n this.formGroup().patchValue(colors);\r\n }\r\n}\r\n","<div class=\"x-theme\">\r\n <x-row>\r\n @if (showDark()) {\r\n <x-col [style.width.rem]=\"8\">\r\n <x-switch\r\n direction=\"row\"\r\n [label]=\"locale().darkMode!\"\r\n [(ngModel)]=\"dark\"\r\n (ngModelChange)=\"darkChanges()\"\r\n ></x-switch>\r\n </x-col>\r\n }\r\n <x-col [style.width.rem]=\"8\">\r\n <x-button (click)=\"default()\">{{ locale().initDefault }}</x-button>\r\n </x-col>\r\n </x-row>\r\n <x-form [formGroup]=\"formGroup()\" [controls]=\"controls()\" [width]=\"width()\" span=\"2\" space=\"1\"></x-form>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XThemeComponent } from './theme.component';\r\n\r\n@NgModule({\r\n exports: [XThemeComponent],\r\n imports: [XThemeComponent]\r\n})\r\nexport class XThemeModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,YAAY,GAAG;AAC5B,MAAM,mBAAmB,GAAG,OAAO;AAEnC;;;AAGG;AACI,MAAM,aAAa,GAAG;AAC3B,IAAA,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;;AAGhG;;AAEG;MAEU,cAAe,SAAQ,oBAAoB,CAAC,mBAAmB,CAAC,CAAA;AAD7E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,MAAM;mFAAC;AACvC;;;AAGG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAW,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,aAAa;oFAAC;AACzE;;;AA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A,CAAA,CAAA;;2FAQL,eAAe,EAAA,UAAA,EAAA,CAAA;kBAjB3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,OAAA,EACV;wBACP,WAAW;wBACX,mBAAmB;wBACnB,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,aAAa;wBACb;qBACD,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,cAAc,CAAA,eAAA,CAAiB,CAAC,EAAA,QAAA,EAAA,umBAAA,EAAA,MAAA,EAAA,CAAA,yOAAA,CAAA,EAAA;;;MEvCjC,YAAY,CAAA;iIAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAZ,YAAY,EAAA,OAAA,EAAA,CAFb,eAAe,CAAA,EAAA,OAAA,EAAA,CADf,eAAe,CAAA,EAAA,CAAA,CAAA;AAGd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAFb,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAEd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;ACND;;AAEG;;;;"}
@@ -25,52 +25,59 @@ class XThoughtChainProperty extends XPropertyFunction(X_THOUGHT_CHAIN_CONFIG_NAM
25
25
  * @zh_CN 思维链节点数据
26
26
  * @en_US ThoughtChain items
27
27
  */
28
- this.data = model([], ...(ngDevMode ? [{ debugName: "data" }] : []));
28
+ this.data = model([], /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
29
30
  /**
30
31
  * @zh_CN 显示序号
31
32
  * @en_US Show number
32
33
  */
33
- this.showNumber = input(this.config?.showNumber ?? true, { ...(ngDevMode ? { debugName: "showNumber" } : {}), transform: XToBoolean });
34
+ this.showNumber = input(this.config?.showNumber ?? true, { ...(ngDevMode ? { debugName: "showNumber" } : /* istanbul ignore next */ {}), transform: XToBoolean });
34
35
  /**
35
36
  * @zh_CN 尺寸
36
37
  * @en_US Size
37
38
  */
38
- this.size = input(this.config?.size ?? 'medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
39
+ this.size = input(this.config?.size ?? 'medium', /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
39
41
  /**
40
42
  * @zh_CN 自定义内容模板
41
43
  * @en_US Content template
42
44
  */
43
- this.wrapper = input(...(ngDevMode ? [undefined, { debugName: "wrapper" }] : []));
45
+ this.wrapper = input(/* @ts-ignore */
46
+ ...(ngDevMode ? [undefined, { debugName: "wrapper" }] : /* istanbul ignore next */ []));
44
47
  /**
45
48
  * @zh_CN 自定义图标模板
46
49
  * @en_US Icon template
47
50
  */
48
- this.icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : []));
51
+ this.icon = input(/* @ts-ignore */
52
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
49
53
  /**
50
54
  * @zh_CN 节点标题右侧额外的内容模板
51
55
  * @en_US Node extra content
52
56
  */
53
- this.extra = input(...(ngDevMode ? [undefined, { debugName: "extra" }] : []));
57
+ this.extra = input(/* @ts-ignore */
58
+ ...(ngDevMode ? [undefined, { debugName: "extra" }] : /* istanbul ignore next */ []));
54
59
  /**
55
60
  * @zh_CN 节点详细内容模板
56
61
  * @en_US Node detail content
57
62
  */
58
- this.content = input(...(ngDevMode ? [undefined, { debugName: "content" }] : []));
63
+ this.content = input(/* @ts-ignore */
64
+ ...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
59
65
  /**
60
66
  * @zh_CN 详细内容是否可折叠
61
67
  * @en_US Collapsible detail content
62
68
  */
63
- this.collapsible = input(this.config?.collapsible ?? false, { ...(ngDevMode ? { debugName: "collapsible" } : {}), transform: XToBoolean });
69
+ this.collapsible = input(this.config?.collapsible ?? false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: XToBoolean });
64
70
  /**
65
71
  * @zh_CN loading 的类型样式
66
72
  * @en_US Loading type style
67
73
  */
68
- this.loadingType = input(this.config?.loadingType ?? 'circular', ...(ngDevMode ? [{ debugName: "loadingType" }] : []));
74
+ this.loadingType = input(this.config?.loadingType ?? 'circular', /* @ts-ignore */
75
+ ...(ngDevMode ? [{ debugName: "loadingType" }] : /* istanbul ignore next */ []));
69
76
  }
70
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
71
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: XThoughtChainProperty, isStandalone: true, selector: "x-thought-chain-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, showNumber: { classPropertyName: "showNumber", publicName: "showNumber", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, wrapper: { classPropertyName: "wrapper", publicName: "wrapper", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, extra: { classPropertyName: "extra", publicName: "extra", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, loadingType: { classPropertyName: "loadingType", publicName: "loadingType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
77
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
78
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XThoughtChainProperty, isStandalone: true, selector: "x-thought-chain-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, showNumber: { classPropertyName: "showNumber", publicName: "showNumber", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, wrapper: { classPropertyName: "wrapper", publicName: "wrapper", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, extra: { classPropertyName: "extra", publicName: "extra", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, loadingType: { classPropertyName: "loadingType", publicName: "loadingType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
72
79
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainProperty, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainProperty, decorators: [{
74
81
  type: Component,
75
82
  args: [{ selector: `${XThoughtChainPrefix}-property`, template: '' }]
76
83
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }, { type: i0.Output, args: ["dataChange"] }], showNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNumber", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], wrapper: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapper", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], extra: [{ type: i0.Input, args: [{ isSignal: true, alias: "extra", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], loadingType: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingType", required: false }] }] } });
@@ -92,20 +99,20 @@ class XThoughtChainComponent extends XThoughtChainProperty {
92
99
  removeNode(node) {
93
100
  this.data.update((x) => [...x.filter((y) => y.id !== node.id)]);
94
101
  }
95
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
96
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: XThoughtChainComponent, isStandalone: true, selector: "x-thought-chain", usesInheritance: true, ngImport: i0, template: "<div class=\"x-thought-chain\">\r\n <x-timeline\r\n [data]=\"data()\"\r\n [showNumber]=\"showNumber()\"\r\n [icon]=\"iconTpl\"\r\n [wrapper]=\"wrapper() ?? wrapperTpl\"\r\n [size]=\"size()\"\r\n ></x-timeline>\r\n\r\n <ng-template #iconTpl let-node=\"$node\" let-index=\"$index\">\r\n <div\r\n class=\"x-thought-chain-icon\"\r\n [class.x-thought-chain-success]=\"node.status === 'success'\"\r\n [class.x-thought-chain-error]=\"node.status === 'error'\"\r\n [class.x-thought-chain-pending]=\"node.status === 'pending'\"\r\n [style.backgroundColor]=\"node.color\"\r\n >\r\n @if (showNumber() && !node.icon && !node.loading && node.status !== 'pending') {\r\n {{ index + 1 }}\r\n }\r\n @if (node.icon && !node.loading && node.status !== 'pending') {\r\n <x-icon [type]=\"node.icon\"></x-icon>\r\n }\r\n @if (node.loading || node.status === 'pending') {\r\n <x-loading inline [x-loading]=\"true\" [size]=\"size()\" [type]=\"loadingType()\"></x-loading>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #wrapperTpl let-node=\"$node\" let-index=\"$index\">\r\n @if (collapsible()) {\r\n <x-collapse class=\"x-thought-chain-collapse\" ghost iconPosition=\"left\">\r\n <x-collapse-panel [label]=\"labelTpl\">\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n </x-collapse-panel>\r\n </x-collapse>\r\n } @else {\r\n <ng-container *xOutlet=\"labelTpl\"></ng-container>\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n }\r\n <ng-template #labelTpl>\r\n <div class=\"x-thought-chain-wrapper\">\r\n <div class=\"x-thought-chain-inner\">\r\n <div class=\"x-thought-chain-label\">{{ node.label }}</div>\r\n <div class=\"x-thought-chain-description\">{{ node.description }}</div>\r\n </div>\r\n <div class=\"x-thought-chain-extra\">\r\n <ng-container *xOutlet=\"extra(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #contentTpl>\r\n @if (node.content || content()) {\r\n @if (content()) {\r\n <div class=\"x-thought-chain-content\">\r\n <ng-container *xOutlet=\"content(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-thought-chain-content\" [innerHTML]=\"node.content\"></div>\r\n }\r\n }\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [".x-thought-chain{margin:0;padding:0}.x-thought-chain-wrapper{display:flex}.x-thought-chain-inner{flex:1;display:flex;flex-direction:column}.x-thought-chain-label{font-weight:600}.x-thought-chain-description{color:var(--x-text-400)}.x-thought-chain-content{position:relative;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-white)}.x-thought-chain-collapse .x-collapse-panel-header{padding:0;align-items:flex-start}.x-thought-chain-icon{width:100%;height:100%;border-radius:50%;display:flex;justify-content:center;align-items:center}.x-thought-chain-success{background-color:var(--x-success)}.x-thought-chain-error{background-color:var(--x-danger)}.x-thought-chain .x-timeline-big .x-thought-chain-label{line-height:calc(var(--x-height-big) - .5rem)}.x-thought-chain .x-timeline-big .x-thought-chain-content{line-height:calc(var(--x-height-big) - .75rem);padding:var(--x-padding-big)}.x-thought-chain .x-timeline-big .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-big) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-big .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-big) * .5) 0}.x-thought-chain .x-timeline-large .x-thought-chain-label{line-height:calc(var(--x-height-large) - .5rem)}.x-thought-chain .x-timeline-large .x-thought-chain-content{line-height:calc(var(--x-height-large) - .75rem);padding:var(--x-padding-large)}.x-thought-chain .x-timeline-large .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-large) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-large .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-large) * .5) 0}.x-thought-chain .x-timeline-medium .x-thought-chain-label{line-height:calc(var(--x-height-medium) - .5rem)}.x-thought-chain .x-timeline-medium .x-thought-chain-content{line-height:calc(var(--x-height-medium) - .75rem);padding:var(--x-padding-medium)}.x-thought-chain .x-timeline-medium .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-medium) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-medium .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-medium) * .5) 0}.x-thought-chain .x-timeline-small .x-thought-chain-label{line-height:calc(var(--x-height-small) - .5rem)}.x-thought-chain .x-timeline-small .x-thought-chain-content{line-height:calc(var(--x-height-small) - .75rem);padding:var(--x-padding-small)}.x-thought-chain .x-timeline-small .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-small) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-small .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-small) * .5) 0}.x-thought-chain .x-timeline-mini .x-thought-chain-label{line-height:calc(var(--x-height-mini) - .5rem)}.x-thought-chain .x-timeline-mini .x-thought-chain-content{line-height:calc(var(--x-height-mini) - .75rem);padding:var(--x-padding-mini)}.x-thought-chain .x-timeline-mini .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-mini) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-mini .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-mini) * .5) 0}\n"], dependencies: [{ kind: "component", type: XTimelineComponent, selector: "x-timeline" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XLoadingComponent, selector: "x-loading, [x-loading]" }, { kind: "ngmodule", type: XCollapseModule }, { kind: "component", type: i1.XCollapseComponent, selector: "x-collapse" }, { kind: "component", type: i1.XCollapsePanelComponent, selector: "x-collapse-panel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
102
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
103
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XThoughtChainComponent, isStandalone: true, selector: "x-thought-chain", usesInheritance: true, ngImport: i0, template: "<div class=\"x-thought-chain\">\r\n <x-timeline\r\n [data]=\"data()\"\r\n [showNumber]=\"showNumber()\"\r\n [icon]=\"iconTpl\"\r\n [wrapper]=\"wrapper() ?? wrapperTpl\"\r\n [size]=\"size()\"\r\n ></x-timeline>\r\n\r\n <ng-template #iconTpl let-node=\"$node\" let-index=\"$index\">\r\n <div\r\n class=\"x-thought-chain-icon\"\r\n [class.x-thought-chain-success]=\"node.status === 'success'\"\r\n [class.x-thought-chain-error]=\"node.status === 'error'\"\r\n [class.x-thought-chain-pending]=\"node.status === 'pending'\"\r\n [style.backgroundColor]=\"node.color\"\r\n >\r\n @if (showNumber() && !node.icon && !node.loading && node.status !== 'pending') {\r\n {{ index + 1 }}\r\n }\r\n @if (node.icon && !node.loading && node.status !== 'pending') {\r\n <x-icon [type]=\"node.icon\"></x-icon>\r\n }\r\n @if (node.loading || node.status === 'pending') {\r\n <x-loading inline [x-loading]=\"true\" [size]=\"size()\" [type]=\"loadingType()\"></x-loading>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #wrapperTpl let-node=\"$node\" let-index=\"$index\">\r\n @if (collapsible()) {\r\n <x-collapse class=\"x-thought-chain-collapse\" ghost iconPosition=\"left\">\r\n <x-collapse-panel [label]=\"labelTpl\">\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n </x-collapse-panel>\r\n </x-collapse>\r\n } @else {\r\n <ng-container *xOutlet=\"labelTpl\"></ng-container>\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n }\r\n <ng-template #labelTpl>\r\n <div class=\"x-thought-chain-wrapper\">\r\n <div class=\"x-thought-chain-inner\">\r\n <div class=\"x-thought-chain-label\">{{ node.label }}</div>\r\n <div class=\"x-thought-chain-description\">{{ node.description }}</div>\r\n </div>\r\n <div class=\"x-thought-chain-extra\">\r\n <ng-container *xOutlet=\"extra(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #contentTpl>\r\n @if (node.content || content()) {\r\n @if (content()) {\r\n <div class=\"x-thought-chain-content\">\r\n <ng-container *xOutlet=\"content(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-thought-chain-content\" [innerHTML]=\"node.content\"></div>\r\n }\r\n }\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [".x-thought-chain{margin:0;padding:0}.x-thought-chain-wrapper{display:flex}.x-thought-chain-inner{flex:1;display:flex;flex-direction:column}.x-thought-chain-label{font-weight:600}.x-thought-chain-description{color:var(--x-text-400)}.x-thought-chain-content{position:relative;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-white)}.x-thought-chain-collapse .x-collapse-panel-header{padding:0;align-items:flex-start}.x-thought-chain-icon{width:100%;height:100%;border-radius:50%;display:flex;justify-content:center;align-items:center}.x-thought-chain-success{background-color:var(--x-success)}.x-thought-chain-error{background-color:var(--x-danger)}.x-thought-chain .x-timeline-big .x-thought-chain-label{line-height:calc(var(--x-height-big) - .5rem)}.x-thought-chain .x-timeline-big .x-thought-chain-content{line-height:calc(var(--x-height-big) - .75rem);padding:var(--x-padding-big)}.x-thought-chain .x-timeline-big .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-big) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-big .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-big) * .5) 0}.x-thought-chain .x-timeline-large .x-thought-chain-label{line-height:calc(var(--x-height-large) - .5rem)}.x-thought-chain .x-timeline-large .x-thought-chain-content{line-height:calc(var(--x-height-large) - .75rem);padding:var(--x-padding-large)}.x-thought-chain .x-timeline-large .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-large) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-large .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-large) * .5) 0}.x-thought-chain .x-timeline-medium .x-thought-chain-label{line-height:calc(var(--x-height-medium) - .5rem)}.x-thought-chain .x-timeline-medium .x-thought-chain-content{line-height:calc(var(--x-height-medium) - .75rem);padding:var(--x-padding-medium)}.x-thought-chain .x-timeline-medium .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-medium) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-medium .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-medium) * .5) 0}.x-thought-chain .x-timeline-small .x-thought-chain-label{line-height:calc(var(--x-height-small) - .5rem)}.x-thought-chain .x-timeline-small .x-thought-chain-content{line-height:calc(var(--x-height-small) - .75rem);padding:var(--x-padding-small)}.x-thought-chain .x-timeline-small .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-small) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-small .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-small) * .5) 0}.x-thought-chain .x-timeline-mini .x-thought-chain-label{line-height:calc(var(--x-height-mini) - .5rem)}.x-thought-chain .x-timeline-mini .x-thought-chain-content{line-height:calc(var(--x-height-mini) - .75rem);padding:var(--x-padding-mini)}.x-thought-chain .x-timeline-mini .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-mini) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-mini .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-mini) * .5) 0}\n"], dependencies: [{ kind: "component", type: XTimelineComponent, selector: "x-timeline" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XLoadingComponent, selector: "x-loading, [x-loading]" }, { kind: "ngmodule", type: XCollapseModule }, { kind: "component", type: i1.XCollapseComponent, selector: "x-collapse" }, { kind: "component", type: i1.XCollapsePanelComponent, selector: "x-collapse-panel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
97
104
  }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainComponent, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainComponent, decorators: [{
99
106
  type: Component,
100
107
  args: [{ selector: 'x-thought-chain', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [XTimelineComponent, XOutletDirective, XIconComponent, XLoadingComponent, XCollapseModule], template: "<div class=\"x-thought-chain\">\r\n <x-timeline\r\n [data]=\"data()\"\r\n [showNumber]=\"showNumber()\"\r\n [icon]=\"iconTpl\"\r\n [wrapper]=\"wrapper() ?? wrapperTpl\"\r\n [size]=\"size()\"\r\n ></x-timeline>\r\n\r\n <ng-template #iconTpl let-node=\"$node\" let-index=\"$index\">\r\n <div\r\n class=\"x-thought-chain-icon\"\r\n [class.x-thought-chain-success]=\"node.status === 'success'\"\r\n [class.x-thought-chain-error]=\"node.status === 'error'\"\r\n [class.x-thought-chain-pending]=\"node.status === 'pending'\"\r\n [style.backgroundColor]=\"node.color\"\r\n >\r\n @if (showNumber() && !node.icon && !node.loading && node.status !== 'pending') {\r\n {{ index + 1 }}\r\n }\r\n @if (node.icon && !node.loading && node.status !== 'pending') {\r\n <x-icon [type]=\"node.icon\"></x-icon>\r\n }\r\n @if (node.loading || node.status === 'pending') {\r\n <x-loading inline [x-loading]=\"true\" [size]=\"size()\" [type]=\"loadingType()\"></x-loading>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #wrapperTpl let-node=\"$node\" let-index=\"$index\">\r\n @if (collapsible()) {\r\n <x-collapse class=\"x-thought-chain-collapse\" ghost iconPosition=\"left\">\r\n <x-collapse-panel [label]=\"labelTpl\">\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n </x-collapse-panel>\r\n </x-collapse>\r\n } @else {\r\n <ng-container *xOutlet=\"labelTpl\"></ng-container>\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n }\r\n <ng-template #labelTpl>\r\n <div class=\"x-thought-chain-wrapper\">\r\n <div class=\"x-thought-chain-inner\">\r\n <div class=\"x-thought-chain-label\">{{ node.label }}</div>\r\n <div class=\"x-thought-chain-description\">{{ node.description }}</div>\r\n </div>\r\n <div class=\"x-thought-chain-extra\">\r\n <ng-container *xOutlet=\"extra(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #contentTpl>\r\n @if (node.content || content()) {\r\n @if (content()) {\r\n <div class=\"x-thought-chain-content\">\r\n <ng-container *xOutlet=\"content(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-thought-chain-content\" [innerHTML]=\"node.content\"></div>\r\n }\r\n }\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [".x-thought-chain{margin:0;padding:0}.x-thought-chain-wrapper{display:flex}.x-thought-chain-inner{flex:1;display:flex;flex-direction:column}.x-thought-chain-label{font-weight:600}.x-thought-chain-description{color:var(--x-text-400)}.x-thought-chain-content{position:relative;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-white)}.x-thought-chain-collapse .x-collapse-panel-header{padding:0;align-items:flex-start}.x-thought-chain-icon{width:100%;height:100%;border-radius:50%;display:flex;justify-content:center;align-items:center}.x-thought-chain-success{background-color:var(--x-success)}.x-thought-chain-error{background-color:var(--x-danger)}.x-thought-chain .x-timeline-big .x-thought-chain-label{line-height:calc(var(--x-height-big) - .5rem)}.x-thought-chain .x-timeline-big .x-thought-chain-content{line-height:calc(var(--x-height-big) - .75rem);padding:var(--x-padding-big)}.x-thought-chain .x-timeline-big .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-big) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-big .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-big) * .5) 0}.x-thought-chain .x-timeline-large .x-thought-chain-label{line-height:calc(var(--x-height-large) - .5rem)}.x-thought-chain .x-timeline-large .x-thought-chain-content{line-height:calc(var(--x-height-large) - .75rem);padding:var(--x-padding-large)}.x-thought-chain .x-timeline-large .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-large) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-large .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-large) * .5) 0}.x-thought-chain .x-timeline-medium .x-thought-chain-label{line-height:calc(var(--x-height-medium) - .5rem)}.x-thought-chain .x-timeline-medium .x-thought-chain-content{line-height:calc(var(--x-height-medium) - .75rem);padding:var(--x-padding-medium)}.x-thought-chain .x-timeline-medium .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-medium) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-medium .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-medium) * .5) 0}.x-thought-chain .x-timeline-small .x-thought-chain-label{line-height:calc(var(--x-height-small) - .5rem)}.x-thought-chain .x-timeline-small .x-thought-chain-content{line-height:calc(var(--x-height-small) - .75rem);padding:var(--x-padding-small)}.x-thought-chain .x-timeline-small .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-small) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-small .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-small) * .5) 0}.x-thought-chain .x-timeline-mini .x-thought-chain-label{line-height:calc(var(--x-height-mini) - .5rem)}.x-thought-chain .x-timeline-mini .x-thought-chain-content{line-height:calc(var(--x-height-mini) - .75rem);padding:var(--x-padding-mini)}.x-thought-chain .x-timeline-mini .x-thought-chain-collapse .x-collapse-panel-header>.x-icon{height:calc(var(--x-height-mini) - .5rem);display:flex;align-items:center}.x-thought-chain .x-timeline-mini .x-thought-chain-collapse .x-collapse-panel-content{padding:calc(var(--x-padding-mini) * .5) 0}\n"] }]
101
108
  }] });
102
109
 
103
110
  class XThoughtChainModule {
104
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
105
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainModule, imports: [XThoughtChainComponent], exports: [XThoughtChainComponent] }); }
106
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainModule, imports: [XThoughtChainComponent] }); }
111
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
112
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainModule, imports: [XThoughtChainComponent], exports: [XThoughtChainComponent] }); }
113
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainModule, imports: [XThoughtChainComponent] }); }
107
114
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XThoughtChainModule, decorators: [{
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XThoughtChainModule, decorators: [{
109
116
  type: NgModule,
110
117
  args: [{
111
118
  exports: [XThoughtChainComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-thought-chain.mjs","sources":["../../../../lib/ng-nest/ui/thought-chain/thought-chain.property.ts","../../../../lib/ng-nest/ui/thought-chain/thought-chain.component.ts","../../../../lib/ng-nest/ui/thought-chain/thought-chain.component.html","../../../../lib/ng-nest/ui/thought-chain/thought-chain.module.ts","../../../../lib/ng-nest/ui/thought-chain/ng-nest-ui-thought-chain.ts"],"sourcesContent":["import { Component, input, model } from '@angular/core';\r\nimport { XPropertyFunction, XBoolean, XToBoolean, XSize, XTemplate } from '@ng-nest/ui/core';\r\nimport { XTimelineNode } from '@ng-nest/ui/timeline';\r\nimport type { XLoadingType } from '@ng-nest/ui/loading';\r\n\r\n/**\r\n * ThoughtChain\r\n * @selector x-thought-chain\r\n * @decorator component\r\n */\r\nexport const XThoughtChainPrefix = 'x-thought-chain';\r\nconst X_THOUGHT_CHAIN_CONFIG_NAME = 'thoughtChain';\r\n\r\n/**\r\n * ThoughtChain Property\r\n */\r\n@Component({ selector: `${XThoughtChainPrefix}-property`, template: '' })\r\nexport class XThoughtChainProperty extends XPropertyFunction(X_THOUGHT_CHAIN_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 思维链节点数据\r\n * @en_US ThoughtChain items\r\n */\r\n readonly data = model<XThoughtChainNode[]>([]);\r\n /**\r\n * @zh_CN 显示序号\r\n * @en_US Show number\r\n */\r\n readonly showNumber = input<boolean, XBoolean>(this.config?.showNumber ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n readonly size = input<XSize>(this.config?.size ?? 'medium');\r\n /**\r\n * @zh_CN 自定义内容模板\r\n * @en_US Content template\r\n */\r\n readonly wrapper = input<XTemplate>();\r\n /**\r\n * @zh_CN 自定义图标模板\r\n * @en_US Icon template\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 节点标题右侧额外的内容模板\r\n * @en_US Node extra content\r\n */\r\n readonly extra = input<XTemplate>();\r\n /**\r\n * @zh_CN 节点详细内容模板\r\n * @en_US Node detail content\r\n */\r\n readonly content = input<XTemplate>();\r\n /**\r\n * @zh_CN 详细内容是否可折叠\r\n * @en_US Collapsible detail content\r\n */\r\n readonly collapsible = input<boolean, XBoolean>(this.config?.collapsible ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN loading 的类型样式\r\n * @en_US Loading type style\r\n */\r\n readonly loadingType = input<XLoadingType>(this.config?.loadingType ?? 'circular');\r\n}\r\n\r\n/**\r\n * @zh_CN 思维链节点\r\n * @en_US Thought chain node\r\n */\r\nexport interface XThoughtChainNode extends XTimelineNode {\r\n /**\r\n * @zh_CN 节点描述\r\n * @en_US Node description\r\n */\r\n description?: string;\r\n /**\r\n * @zh_CN 节点状态\r\n * @en_US Node status\r\n */\r\n status?: XThoughtChainNodeStatus;\r\n}\r\n\r\n/**\r\n * @zh_CN 节点状态\r\n * @en_US Node status\r\n */\r\nexport type XThoughtChainNodeStatus = 'success' | 'error' | 'pending';\r\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, ViewEncapsulation } from '@angular/core';\r\nimport { XThoughtChainNode, XThoughtChainProperty } from './thought-chain.property';\r\nimport { XTimelineComponent } from '@ng-nest/ui/timeline';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XLoadingComponent } from '@ng-nest/ui/loading';\r\nimport { XCollapseModule } from '@ng-nest/ui/collapse';\r\n\r\n@Component({\r\n selector: 'x-thought-chain',\r\n templateUrl: './thought-chain.component.html',\r\n styleUrls: ['./thought-chain.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [XTimelineComponent, XOutletDirective, XIconComponent, XLoadingComponent, XCollapseModule]\r\n})\r\nexport class XThoughtChainComponent extends XThoughtChainProperty {\r\n cdr = inject(ChangeDetectorRef);\r\n addNode(node: XThoughtChainNode) {\r\n this.data.update((x) => [...x, node]);\r\n }\r\n\r\n updateNode(node: XThoughtChainNode) {\r\n const nd = this.data().find((x) => x.id === node.id);\r\n if (nd) Object.assign(nd, node);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n removeNode(node: XThoughtChainNode) {\r\n this.data.update((x) => [...x.filter((y) => y.id !== node.id)]);\r\n }\r\n}\r\n","<div class=\"x-thought-chain\">\r\n <x-timeline\r\n [data]=\"data()\"\r\n [showNumber]=\"showNumber()\"\r\n [icon]=\"iconTpl\"\r\n [wrapper]=\"wrapper() ?? wrapperTpl\"\r\n [size]=\"size()\"\r\n ></x-timeline>\r\n\r\n <ng-template #iconTpl let-node=\"$node\" let-index=\"$index\">\r\n <div\r\n class=\"x-thought-chain-icon\"\r\n [class.x-thought-chain-success]=\"node.status === 'success'\"\r\n [class.x-thought-chain-error]=\"node.status === 'error'\"\r\n [class.x-thought-chain-pending]=\"node.status === 'pending'\"\r\n [style.backgroundColor]=\"node.color\"\r\n >\r\n @if (showNumber() && !node.icon && !node.loading && node.status !== 'pending') {\r\n {{ index + 1 }}\r\n }\r\n @if (node.icon && !node.loading && node.status !== 'pending') {\r\n <x-icon [type]=\"node.icon\"></x-icon>\r\n }\r\n @if (node.loading || node.status === 'pending') {\r\n <x-loading inline [x-loading]=\"true\" [size]=\"size()\" [type]=\"loadingType()\"></x-loading>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #wrapperTpl let-node=\"$node\" let-index=\"$index\">\r\n @if (collapsible()) {\r\n <x-collapse class=\"x-thought-chain-collapse\" ghost iconPosition=\"left\">\r\n <x-collapse-panel [label]=\"labelTpl\">\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n </x-collapse-panel>\r\n </x-collapse>\r\n } @else {\r\n <ng-container *xOutlet=\"labelTpl\"></ng-container>\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n }\r\n <ng-template #labelTpl>\r\n <div class=\"x-thought-chain-wrapper\">\r\n <div class=\"x-thought-chain-inner\">\r\n <div class=\"x-thought-chain-label\">{{ node.label }}</div>\r\n <div class=\"x-thought-chain-description\">{{ node.description }}</div>\r\n </div>\r\n <div class=\"x-thought-chain-extra\">\r\n <ng-container *xOutlet=\"extra(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #contentTpl>\r\n @if (node.content || content()) {\r\n @if (content()) {\r\n <div class=\"x-thought-chain-content\">\r\n <ng-container *xOutlet=\"content(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-thought-chain-content\" [innerHTML]=\"node.content\"></div>\r\n }\r\n }\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XThoughtChainComponent } from './thought-chain.component';\r\n\r\n@NgModule({\r\n exports: [XThoughtChainComponent],\r\n imports: [XThoughtChainComponent]\r\n})\r\nexport class XThoughtChainModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,mBAAmB,GAAG;AACnC,MAAM,2BAA2B,GAAG,cAAc;AAElD;;AAEG;MAEU,qBAAsB,SAAQ,iBAAiB,CAAC,2BAA2B,CAAC,CAAA;AADzF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAsB,EAAE,gDAAC;AAC9C;;;AAGG;AACM,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,UAAU,IAAI,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,YAAA,EAAA,GAAA,EAAA,CAAA,EAAI,SAAS,EAAE,UAAU,GAAG;AAC1G;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,QAAQ,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAC3D;;;AAGG;QACM,IAAA,CAAA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mBAAmB,CAAA;iIAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAnB,mBAAmB,EAAA,OAAA,EAAA,CAFpB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CADtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGrB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAFpB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAErB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB;AACjC,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-thought-chain.mjs","sources":["../../../../lib/ng-nest/ui/thought-chain/thought-chain.property.ts","../../../../lib/ng-nest/ui/thought-chain/thought-chain.component.ts","../../../../lib/ng-nest/ui/thought-chain/thought-chain.component.html","../../../../lib/ng-nest/ui/thought-chain/thought-chain.module.ts","../../../../lib/ng-nest/ui/thought-chain/ng-nest-ui-thought-chain.ts"],"sourcesContent":["import { Component, input, model } from '@angular/core';\r\nimport { XPropertyFunction, XBoolean, XToBoolean, XSize, XTemplate } from '@ng-nest/ui/core';\r\nimport { XTimelineNode } from '@ng-nest/ui/timeline';\r\nimport type { XLoadingType } from '@ng-nest/ui/loading';\r\n\r\n/**\r\n * ThoughtChain\r\n * @selector x-thought-chain\r\n * @decorator component\r\n */\r\nexport const XThoughtChainPrefix = 'x-thought-chain';\r\nconst X_THOUGHT_CHAIN_CONFIG_NAME = 'thoughtChain';\r\n\r\n/**\r\n * ThoughtChain Property\r\n */\r\n@Component({ selector: `${XThoughtChainPrefix}-property`, template: '' })\r\nexport class XThoughtChainProperty extends XPropertyFunction(X_THOUGHT_CHAIN_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 思维链节点数据\r\n * @en_US ThoughtChain items\r\n */\r\n readonly data = model<XThoughtChainNode[]>([]);\r\n /**\r\n * @zh_CN 显示序号\r\n * @en_US Show number\r\n */\r\n readonly showNumber = input<boolean, XBoolean>(this.config?.showNumber ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n readonly size = input<XSize>(this.config?.size ?? 'medium');\r\n /**\r\n * @zh_CN 自定义内容模板\r\n * @en_US Content template\r\n */\r\n readonly wrapper = input<XTemplate>();\r\n /**\r\n * @zh_CN 自定义图标模板\r\n * @en_US Icon template\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 节点标题右侧额外的内容模板\r\n * @en_US Node extra content\r\n */\r\n readonly extra = input<XTemplate>();\r\n /**\r\n * @zh_CN 节点详细内容模板\r\n * @en_US Node detail content\r\n */\r\n readonly content = input<XTemplate>();\r\n /**\r\n * @zh_CN 详细内容是否可折叠\r\n * @en_US Collapsible detail content\r\n */\r\n readonly collapsible = input<boolean, XBoolean>(this.config?.collapsible ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN loading 的类型样式\r\n * @en_US Loading type style\r\n */\r\n readonly loadingType = input<XLoadingType>(this.config?.loadingType ?? 'circular');\r\n}\r\n\r\n/**\r\n * @zh_CN 思维链节点\r\n * @en_US Thought chain node\r\n */\r\nexport interface XThoughtChainNode extends XTimelineNode {\r\n /**\r\n * @zh_CN 节点描述\r\n * @en_US Node description\r\n */\r\n description?: string;\r\n /**\r\n * @zh_CN 节点状态\r\n * @en_US Node status\r\n */\r\n status?: XThoughtChainNodeStatus;\r\n}\r\n\r\n/**\r\n * @zh_CN 节点状态\r\n * @en_US Node status\r\n */\r\nexport type XThoughtChainNodeStatus = 'success' | 'error' | 'pending';\r\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, ViewEncapsulation } from '@angular/core';\r\nimport { XThoughtChainNode, XThoughtChainProperty } from './thought-chain.property';\r\nimport { XTimelineComponent } from '@ng-nest/ui/timeline';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XLoadingComponent } from '@ng-nest/ui/loading';\r\nimport { XCollapseModule } from '@ng-nest/ui/collapse';\r\n\r\n@Component({\r\n selector: 'x-thought-chain',\r\n templateUrl: './thought-chain.component.html',\r\n styleUrls: ['./thought-chain.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [XTimelineComponent, XOutletDirective, XIconComponent, XLoadingComponent, XCollapseModule]\r\n})\r\nexport class XThoughtChainComponent extends XThoughtChainProperty {\r\n cdr = inject(ChangeDetectorRef);\r\n addNode(node: XThoughtChainNode) {\r\n this.data.update((x) => [...x, node]);\r\n }\r\n\r\n updateNode(node: XThoughtChainNode) {\r\n const nd = this.data().find((x) => x.id === node.id);\r\n if (nd) Object.assign(nd, node);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n removeNode(node: XThoughtChainNode) {\r\n this.data.update((x) => [...x.filter((y) => y.id !== node.id)]);\r\n }\r\n}\r\n","<div class=\"x-thought-chain\">\r\n <x-timeline\r\n [data]=\"data()\"\r\n [showNumber]=\"showNumber()\"\r\n [icon]=\"iconTpl\"\r\n [wrapper]=\"wrapper() ?? wrapperTpl\"\r\n [size]=\"size()\"\r\n ></x-timeline>\r\n\r\n <ng-template #iconTpl let-node=\"$node\" let-index=\"$index\">\r\n <div\r\n class=\"x-thought-chain-icon\"\r\n [class.x-thought-chain-success]=\"node.status === 'success'\"\r\n [class.x-thought-chain-error]=\"node.status === 'error'\"\r\n [class.x-thought-chain-pending]=\"node.status === 'pending'\"\r\n [style.backgroundColor]=\"node.color\"\r\n >\r\n @if (showNumber() && !node.icon && !node.loading && node.status !== 'pending') {\r\n {{ index + 1 }}\r\n }\r\n @if (node.icon && !node.loading && node.status !== 'pending') {\r\n <x-icon [type]=\"node.icon\"></x-icon>\r\n }\r\n @if (node.loading || node.status === 'pending') {\r\n <x-loading inline [x-loading]=\"true\" [size]=\"size()\" [type]=\"loadingType()\"></x-loading>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #wrapperTpl let-node=\"$node\" let-index=\"$index\">\r\n @if (collapsible()) {\r\n <x-collapse class=\"x-thought-chain-collapse\" ghost iconPosition=\"left\">\r\n <x-collapse-panel [label]=\"labelTpl\">\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n </x-collapse-panel>\r\n </x-collapse>\r\n } @else {\r\n <ng-container *xOutlet=\"labelTpl\"></ng-container>\r\n <ng-container *xOutlet=\"contentTpl\"></ng-container>\r\n }\r\n <ng-template #labelTpl>\r\n <div class=\"x-thought-chain-wrapper\">\r\n <div class=\"x-thought-chain-inner\">\r\n <div class=\"x-thought-chain-label\">{{ node.label }}</div>\r\n <div class=\"x-thought-chain-description\">{{ node.description }}</div>\r\n </div>\r\n <div class=\"x-thought-chain-extra\">\r\n <ng-container *xOutlet=\"extra(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #contentTpl>\r\n @if (node.content || content()) {\r\n @if (content()) {\r\n <div class=\"x-thought-chain-content\">\r\n <ng-container *xOutlet=\"content(); context: { $node: node, $index: index }\"></ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-thought-chain-content\" [innerHTML]=\"node.content\"></div>\r\n }\r\n }\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XThoughtChainComponent } from './thought-chain.component';\r\n\r\n@NgModule({\r\n exports: [XThoughtChainComponent],\r\n imports: [XThoughtChainComponent]\r\n})\r\nexport class XThoughtChainModule {}\r\n","/**\n * Generated bundle index.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EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,oiFAAA,EAAA,MAAA,EAAA,CAAA,m3GAAA,CAAA,EAAA;;;MEPxF,mBAAmB,CAAA;iIAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAnB,mBAAmB,EAAA,OAAA,EAAA,CAFpB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CADtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGrB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAFpB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAErB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB;AACjC,iBAAA;;;ACND;;AAEG;;;;"}
@@ -67,20 +67,20 @@ class XTimeAgoPipe extends DatePipe {
67
67
  result = this.localeI18n()?.just;
68
68
  return result;
69
69
  }
70
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
71
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoPipe, isStandalone: true, name: "xTimeAgo" }); }
70
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
71
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoPipe, isStandalone: true, name: "xTimeAgo" }); }
72
72
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoPipe, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoPipe, decorators: [{
74
74
  type: Pipe,
75
75
  args: [{ name: `${XTimeAgoPrefix}` }]
76
76
  }] });
77
77
 
78
78
  class XTimeAgoModule {
79
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
80
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoModule, imports: [XTimeAgoPipe], exports: [XTimeAgoPipe] }); }
81
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoModule }); }
79
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
80
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoModule, imports: [XTimeAgoPipe], exports: [XTimeAgoPipe] }); }
81
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoModule }); }
82
82
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XTimeAgoModule, decorators: [{
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTimeAgoModule, decorators: [{
84
84
  type: NgModule,
85
85
  args: [{
86
86
  exports: [XTimeAgoPipe],