@ng-nest/ui 17.0.12 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (923) hide show
  1. package/README.md +1 -1
  2. package/affix/affix.component.d.ts +0 -2
  3. package/affix/affix.property.d.ts +12 -7
  4. package/alert/alert.component.d.ts +12 -11
  5. package/alert/alert.property.d.ts +36 -35
  6. package/anchor/anchor.component.d.ts +15 -18
  7. package/anchor/anchor.property.d.ts +17 -8
  8. package/api/api.component.d.ts +2 -7
  9. package/auto-complete/auto-complete-portal.component.d.ts +20 -25
  10. package/auto-complete/auto-complete.component.d.ts +17 -34
  11. package/auto-complete/auto-complete.property.d.ts +282 -20
  12. package/avatar/avatar.component.d.ts +29 -19
  13. package/avatar/avatar.property.d.ts +78 -12
  14. package/back-top/back-top.component.d.ts +12 -17
  15. package/back-top/back-top.property.d.ts +12 -8
  16. package/badge/badge.component.d.ts +9 -16
  17. package/badge/badge.property.d.ts +95 -13
  18. package/base-form/base-form.component.d.ts +53 -26
  19. package/base-form/base-form.module.d.ts +1 -2
  20. package/base-form/base-form.property.d.ts +173 -45
  21. package/button/button.component.d.ts +16 -14
  22. package/button/button.property.d.ts +242 -100
  23. package/button/buttons.component.d.ts +8 -10
  24. package/calendar/calendar.component.d.ts +41 -27
  25. package/calendar/calendar.property.d.ts +69 -10
  26. package/card/card.component.d.ts +4 -6
  27. package/card/card.property.d.ts +50 -9
  28. package/carousel/carousel-panel.component.d.ts +15 -14
  29. package/carousel/carousel.component.d.ts +18 -19
  30. package/carousel/carousel.property.d.ts +168 -28
  31. package/cascade/cascade-portal.component.d.ts +28 -28
  32. package/cascade/cascade.component.d.ts +24 -30
  33. package/cascade/cascade.property.d.ts +292 -20
  34. package/checkbox/checkbox.component.d.ts +17 -17
  35. package/checkbox/checkbox.property.d.ts +274 -35
  36. package/collapse/collapse-panel.component.d.ts +5 -2
  37. package/collapse/collapse.component.d.ts +3 -7
  38. package/collapse/collapse.property.d.ts +113 -20
  39. package/color/color.component.d.ts +4 -9
  40. package/color/color.property.d.ts +36 -8
  41. package/color-picker/color-picker-portal.component.d.ts +40 -52
  42. package/color-picker/color-picker.component.d.ts +19 -28
  43. package/color-picker/color-picker.property.d.ts +260 -10
  44. package/comment/comment-reply.component.d.ts +1 -8
  45. package/comment/comment.component.d.ts +4 -14
  46. package/comment/comment.property.d.ts +21 -15
  47. package/container/aside.component.d.ts +3 -8
  48. package/container/container.component.d.ts +5 -9
  49. package/container/container.property.d.ts +33 -19
  50. package/container/footer.component.d.ts +2 -5
  51. package/container/header.component.d.ts +2 -5
  52. package/container/main.component.d.ts +2 -7
  53. package/core/animation/badge.d.ts +8 -0
  54. package/core/animation/connect.d.ts +8 -1
  55. package/core/animation/consts.d.ts +4 -0
  56. package/core/animation/drop.d.ts +4 -0
  57. package/core/animation/fade.d.ts +4 -0
  58. package/core/animation/move.d.ts +4 -0
  59. package/core/animation/opacity.d.ts +4 -0
  60. package/core/animation/slide.d.ts +4 -1
  61. package/core/config/config.d.ts +174 -108
  62. package/core/config/config.service.d.ts +5 -5
  63. package/core/config/index.d.ts +1 -0
  64. package/core/functions/chunk.d.ts +12 -1
  65. package/core/functions/clone-deep.d.ts +16 -0
  66. package/core/functions/convert.d.ts +77 -4
  67. package/core/functions/csspx.d.ts +5 -0
  68. package/core/functions/date.d.ts +59 -3
  69. package/core/functions/drop.d.ts +13 -1
  70. package/core/functions/flex.d.ts +4 -0
  71. package/core/functions/group-by.d.ts +5 -1
  72. package/core/functions/guid.d.ts +2 -1
  73. package/core/functions/has-in.d.ts +4 -0
  74. package/core/functions/order-by.d.ts +5 -1
  75. package/core/functions/parent-path.d.ts +8 -0
  76. package/core/functions/property.d.ts +12 -6
  77. package/core/functions/public-api.d.ts +1 -0
  78. package/core/functions/remove.d.ts +5 -1
  79. package/core/functions/resize.d.ts +13 -1
  80. package/core/interfaces/data.type.d.ts +172 -3
  81. package/core/interfaces/identify.type.d.ts +60 -0
  82. package/core/interfaces/layout.type.d.ts +88 -37
  83. package/core/interfaces/result-list.type.d.ts +91 -3
  84. package/core/services/http.service.d.ts +0 -22
  85. package/core/services/repository.service.d.ts +1 -1
  86. package/core/services/reuse-strategy.service.d.ts +0 -22
  87. package/core/services/storage.service.d.ts +0 -21
  88. package/core/theme/theme.d.ts +45 -1
  89. package/core/theme/theme.service.d.ts +46 -11
  90. package/core/util/animation.d.ts +1 -1
  91. package/core/util/camel-to-kebab.d.ts +13 -0
  92. package/core/util/check.d.ts +10 -2
  93. package/core/util/computed-style.d.ts +8 -0
  94. package/core/util/host.d.ts +3 -2
  95. package/core/util/html.d.ts +3 -2
  96. package/core/util/kebab-to-camel.d.ts +13 -0
  97. package/core/util/log.d.ts +10 -2
  98. package/core/util/option.d.ts +3 -4
  99. package/core/util/public-api.d.ts +2 -0
  100. package/crumb/crumb.component.d.ts +1 -10
  101. package/crumb/crumb.property.d.ts +12 -8
  102. package/date-picker/date-picker-portal.component.d.ts +80 -33
  103. package/date-picker/date-picker.component.d.ts +74 -32
  104. package/date-picker/date-picker.property.d.ts +662 -214
  105. package/date-picker/date-range-portal.component.d.ts +102 -49
  106. package/date-picker/date-range.component.d.ts +87 -43
  107. package/date-picker/picker-date.component.d.ts +63 -17
  108. package/date-picker/picker-month.component.d.ts +59 -13
  109. package/date-picker/picker-quarter.component.d.ts +61 -15
  110. package/date-picker/picker-year.component.d.ts +8 -11
  111. package/description/description-item.component.d.ts +1 -1
  112. package/description/description.component.d.ts +6 -10
  113. package/description/description.property.d.ts +135 -16
  114. package/dialog/dialog-portal.component.d.ts +4 -4
  115. package/dialog/dialog-portal.directives.d.ts +1 -1
  116. package/dialog/dialog.component.d.ts +30 -23
  117. package/dialog/dialog.property.d.ts +77 -134
  118. package/doc/doc.component.d.ts +2 -5
  119. package/drag/drag.directive.d.ts +1 -1
  120. package/drag/drag.property.d.ts +4 -5
  121. package/drawer/drawer-container.component.d.ts +1 -1
  122. package/drawer/drawer-portal.component.d.ts +1 -1
  123. package/drawer/drawer.component.d.ts +15 -14
  124. package/drawer/drawer.property.d.ts +26 -18
  125. package/dropdown/dropdown-portal.component.d.ts +36 -45
  126. package/dropdown/dropdown.component.d.ts +17 -21
  127. package/dropdown/dropdown.property.d.ts +24 -21
  128. package/empty/empty.component.d.ts +0 -7
  129. package/empty/empty.property.d.ts +27 -4
  130. package/esm2022/affix/affix.component.mjs +6 -11
  131. package/esm2022/affix/affix.module.mjs +5 -5
  132. package/esm2022/affix/affix.property.mjs +22 -20
  133. package/esm2022/alert/alert.component.mjs +39 -44
  134. package/esm2022/alert/alert.module.mjs +5 -5
  135. package/esm2022/alert/alert.property.mjs +102 -107
  136. package/esm2022/anchor/anchor-inner.component.mjs +4 -4
  137. package/esm2022/anchor/anchor.component.mjs +73 -95
  138. package/esm2022/anchor/anchor.module.mjs +5 -5
  139. package/esm2022/anchor/anchor.property.mjs +45 -35
  140. package/esm2022/api/api.component.mjs +11 -14
  141. package/esm2022/api/api.module.mjs +5 -5
  142. package/esm2022/auto-complete/auto-complete-portal.component.mjs +36 -47
  143. package/esm2022/auto-complete/auto-complete.component.mjs +122 -162
  144. package/esm2022/auto-complete/auto-complete.module.mjs +5 -5
  145. package/esm2022/auto-complete/auto-complete.property.mjs +142 -55
  146. package/esm2022/avatar/avatar-group.component.mjs +4 -4
  147. package/esm2022/avatar/avatar.component.mjs +75 -81
  148. package/esm2022/avatar/avatar.module.mjs +5 -5
  149. package/esm2022/avatar/avatar.property.mjs +116 -45
  150. package/esm2022/back-top/back-top.component.mjs +57 -73
  151. package/esm2022/back-top/back-top.module.mjs +5 -5
  152. package/esm2022/back-top/back-top.property.mjs +37 -29
  153. package/esm2022/badge/badge.component.mjs +51 -59
  154. package/esm2022/badge/badge.module.mjs +5 -5
  155. package/esm2022/badge/badge.property.mjs +111 -38
  156. package/esm2022/base-form/base-form.component.mjs +89 -81
  157. package/esm2022/base-form/base-form.module.mjs +7 -8
  158. package/esm2022/base-form/base-form.property.mjs +200 -89
  159. package/esm2022/button/button.component.mjs +50 -59
  160. package/esm2022/button/button.module.mjs +5 -5
  161. package/esm2022/button/button.property.mjs +293 -98
  162. package/esm2022/button/buttons.component.mjs +35 -21
  163. package/esm2022/calendar/calendar.component.mjs +56 -84
  164. package/esm2022/calendar/calendar.module.mjs +5 -5
  165. package/esm2022/calendar/calendar.property.mjs +78 -24
  166. package/esm2022/card/card.component.mjs +10 -14
  167. package/esm2022/card/card.module.mjs +5 -5
  168. package/esm2022/card/card.property.mjs +57 -22
  169. package/esm2022/carousel/carousel-panel.component.mjs +98 -76
  170. package/esm2022/carousel/carousel.component.mjs +55 -65
  171. package/esm2022/carousel/carousel.module.mjs +5 -5
  172. package/esm2022/carousel/carousel.property.mjs +215 -85
  173. package/esm2022/cascade/cascade-portal.component.mjs +77 -69
  174. package/esm2022/cascade/cascade.component.mjs +107 -135
  175. package/esm2022/cascade/cascade.module.mjs +5 -5
  176. package/esm2022/cascade/cascade.property.mjs +137 -48
  177. package/esm2022/checkbox/checkbox.component.mjs +68 -83
  178. package/esm2022/checkbox/checkbox.module.mjs +5 -5
  179. package/esm2022/checkbox/checkbox.property.mjs +136 -73
  180. package/esm2022/collapse/collapse-panel.component.mjs +31 -21
  181. package/esm2022/collapse/collapse.component.mjs +16 -21
  182. package/esm2022/collapse/collapse.module.mjs +5 -5
  183. package/esm2022/collapse/collapse.property.mjs +156 -66
  184. package/esm2022/color/color.component.mjs +25 -26
  185. package/esm2022/color/color.module.mjs +5 -5
  186. package/esm2022/color/color.property.mjs +47 -27
  187. package/esm2022/color-picker/color-picker-portal.component.mjs +120 -130
  188. package/esm2022/color-picker/color-picker.component.mjs +76 -117
  189. package/esm2022/color-picker/color-picker.module.mjs +5 -5
  190. package/esm2022/color-picker/color-picker.property.mjs +123 -27
  191. package/esm2022/comment/comment-reply.component.mjs +9 -24
  192. package/esm2022/comment/comment.component.mjs +11 -40
  193. package/esm2022/comment/comment.module.mjs +5 -5
  194. package/esm2022/comment/comment.property.mjs +27 -50
  195. package/esm2022/container/aside.component.mjs +12 -15
  196. package/esm2022/container/container.component.mjs +21 -24
  197. package/esm2022/container/container.module.mjs +5 -5
  198. package/esm2022/container/container.property.mjs +55 -51
  199. package/esm2022/container/footer.component.mjs +14 -16
  200. package/esm2022/container/header.component.mjs +14 -16
  201. package/esm2022/container/main.component.mjs +10 -13
  202. package/esm2022/core/animation/badge.mjs +17 -3
  203. package/esm2022/core/animation/connect.mjs +17 -99
  204. package/esm2022/core/animation/consts.mjs +5 -1
  205. package/esm2022/core/animation/drop.mjs +5 -1
  206. package/esm2022/core/animation/fade.mjs +13 -3
  207. package/esm2022/core/animation/move.mjs +5 -1
  208. package/esm2022/core/animation/opacity.mjs +5 -1
  209. package/esm2022/core/animation/slide.mjs +5 -23
  210. package/esm2022/core/config/config.mjs +1 -1
  211. package/esm2022/core/config/config.service.mjs +11 -59
  212. package/esm2022/core/config/index.mjs +2 -0
  213. package/esm2022/core/functions/chunk.mjs +12 -1
  214. package/esm2022/core/functions/clone-deep.mjs +17 -1
  215. package/esm2022/core/functions/convert.mjs +110 -13
  216. package/esm2022/core/functions/csspx.mjs +17 -0
  217. package/esm2022/core/functions/date.mjs +80 -4
  218. package/esm2022/core/functions/drop.mjs +13 -1
  219. package/esm2022/core/functions/flex.mjs +5 -1
  220. package/esm2022/core/functions/group-by.mjs +5 -1
  221. package/esm2022/core/functions/guid.mjs +3 -2
  222. package/esm2022/core/functions/has-in.mjs +5 -1
  223. package/esm2022/core/functions/order-by.mjs +5 -1
  224. package/esm2022/core/functions/parent-path.mjs +9 -1
  225. package/esm2022/core/functions/property.mjs +16 -8
  226. package/esm2022/core/functions/public-api.mjs +2 -1
  227. package/esm2022/core/functions/remove.mjs +5 -1
  228. package/esm2022/core/functions/resize.mjs +7 -5
  229. package/esm2022/core/interfaces/data.type.mjs +97 -8
  230. package/esm2022/core/interfaces/identify.type.mjs +5 -2
  231. package/esm2022/core/interfaces/layout.type.mjs +1 -1
  232. package/esm2022/core/interfaces/result-list.type.mjs +1 -1
  233. package/esm2022/core/services/http.service.mjs +4 -33
  234. package/esm2022/core/services/preloading-strategy.service.mjs +4 -6
  235. package/esm2022/core/services/repository.service.mjs +1 -1
  236. package/esm2022/core/services/reuse-strategy.service.mjs +1 -26
  237. package/esm2022/core/services/storage.service.mjs +4 -26
  238. package/esm2022/core/theme/theme.mjs +55 -11
  239. package/esm2022/core/theme/theme.service.mjs +92 -20
  240. package/esm2022/core/util/animation.mjs +2 -23
  241. package/esm2022/core/util/camel-to-kebab.mjs +16 -0
  242. package/esm2022/core/util/check.mjs +11 -3
  243. package/esm2022/core/util/computed-style.mjs +9 -1
  244. package/esm2022/core/util/host.mjs +4 -3
  245. package/esm2022/core/util/html.mjs +5 -4
  246. package/esm2022/core/util/kebab-to-camel.mjs +16 -0
  247. package/esm2022/core/util/log.mjs +11 -3
  248. package/esm2022/core/util/option.mjs +4 -5
  249. package/esm2022/core/util/public-api.mjs +3 -1
  250. package/esm2022/crumb/crumb.component.mjs +6 -29
  251. package/esm2022/crumb/crumb.module.mjs +5 -5
  252. package/esm2022/crumb/crumb.property.mjs +21 -26
  253. package/esm2022/date-picker/date-picker-portal.component.mjs +86 -102
  254. package/esm2022/date-picker/date-picker.component.mjs +157 -191
  255. package/esm2022/date-picker/date-picker.module.mjs +5 -5
  256. package/esm2022/date-picker/date-picker.property.mjs +440 -462
  257. package/esm2022/date-picker/date-quarter.pipe.mjs +4 -4
  258. package/esm2022/date-picker/date-range-portal.component.mjs +172 -186
  259. package/esm2022/date-picker/date-range.component.mjs +224 -266
  260. package/esm2022/date-picker/picker-date.component.mjs +150 -150
  261. package/esm2022/date-picker/picker-month.component.mjs +115 -118
  262. package/esm2022/date-picker/picker-quarter.component.mjs +120 -119
  263. package/esm2022/date-picker/picker-year.component.mjs +121 -108
  264. package/esm2022/description/description-item.component.mjs +12 -11
  265. package/esm2022/description/description.component.mjs +33 -48
  266. package/esm2022/description/description.module.mjs +5 -5
  267. package/esm2022/description/description.property.mjs +175 -52
  268. package/esm2022/dialog/dialog-container.component.mjs +4 -4
  269. package/esm2022/dialog/dialog-portal.component.mjs +14 -20
  270. package/esm2022/dialog/dialog-portal.directives.mjs +20 -20
  271. package/esm2022/dialog/dialog-ref.mjs +1 -1
  272. package/esm2022/dialog/dialog.component.mjs +117 -131
  273. package/esm2022/dialog/dialog.module.mjs +5 -5
  274. package/esm2022/dialog/dialog.property.mjs +149 -139
  275. package/esm2022/dialog/dialog.service.mjs +7 -7
  276. package/esm2022/doc/doc.component.mjs +11 -12
  277. package/esm2022/doc/doc.module.mjs +5 -5
  278. package/esm2022/drag/drag.directive.mjs +8 -21
  279. package/esm2022/drag/drag.module.mjs +5 -5
  280. package/esm2022/drag/drag.property.mjs +10 -16
  281. package/esm2022/drawer/drawer-container.component.mjs +9 -9
  282. package/esm2022/drawer/drawer-portal.component.mjs +11 -13
  283. package/esm2022/drawer/drawer-portal.directives.mjs +10 -10
  284. package/esm2022/drawer/drawer.component.mjs +40 -59
  285. package/esm2022/drawer/drawer.module.mjs +5 -5
  286. package/esm2022/drawer/drawer.property.mjs +47 -54
  287. package/esm2022/drawer/drawer.service.mjs +6 -6
  288. package/esm2022/dropdown/dropdown-portal.component.mjs +90 -91
  289. package/esm2022/dropdown/dropdown.component.mjs +75 -91
  290. package/esm2022/dropdown/dropdown.module.mjs +5 -5
  291. package/esm2022/dropdown/dropdown.property.mjs +62 -59
  292. package/esm2022/empty/empty.component.mjs +6 -26
  293. package/esm2022/empty/empty.module.mjs +5 -5
  294. package/esm2022/empty/empty.property.mjs +41 -20
  295. package/esm2022/examples/examples.component.mjs +11 -12
  296. package/esm2022/examples/examples.module.mjs +5 -5
  297. package/esm2022/find/find.component.mjs +188 -232
  298. package/esm2022/find/find.module.mjs +5 -5
  299. package/esm2022/find/find.property.mjs +234 -193
  300. package/esm2022/form/control.component.mjs +138 -116
  301. package/esm2022/form/form.component.mjs +28 -36
  302. package/esm2022/form/form.module.mjs +5 -5
  303. package/esm2022/form/form.property.mjs +57 -55
  304. package/esm2022/highlight/highlight.component.mjs +54 -59
  305. package/esm2022/highlight/highlight.module.mjs +5 -5
  306. package/esm2022/highlight/highlight.property.mjs +25 -21
  307. package/esm2022/highlight/highlight.service.mjs +17 -0
  308. package/esm2022/highlight/public-api.mjs +2 -1
  309. package/esm2022/i18n/i18n.directive.mjs +17 -31
  310. package/esm2022/i18n/i18n.module.mjs +5 -5
  311. package/esm2022/i18n/i18n.pipe.mjs +4 -4
  312. package/esm2022/i18n/i18n.property.mjs +2 -2
  313. package/esm2022/i18n/i18n.service.mjs +4 -4
  314. package/esm2022/i18n/languages/ar_EG.mjs +122 -77
  315. package/esm2022/i18n/languages/bg_BG.mjs +135 -87
  316. package/esm2022/i18n/languages/ca_ES.mjs +130 -82
  317. package/esm2022/i18n/languages/cs_CZ.mjs +127 -79
  318. package/esm2022/i18n/languages/da_DK.mjs +129 -81
  319. package/esm2022/i18n/languages/de_DE.mjs +125 -77
  320. package/esm2022/i18n/languages/el_GR.mjs +132 -84
  321. package/esm2022/i18n/languages/en_GB.mjs +5 -2
  322. package/esm2022/i18n/languages/en_US.mjs +5 -2
  323. package/esm2022/i18n/languages/es_ES.mjs +131 -83
  324. package/esm2022/i18n/languages/et_EE.mjs +130 -82
  325. package/esm2022/i18n/languages/fa_IR.mjs +109 -61
  326. package/esm2022/i18n/languages/fi_FI.mjs +134 -86
  327. package/esm2022/i18n/languages/fr_BE.mjs +128 -80
  328. package/esm2022/i18n/languages/fr_FR.mjs +127 -79
  329. package/esm2022/i18n/languages/he_IL.mjs +119 -74
  330. package/esm2022/i18n/languages/hi_IN.mjs +104 -56
  331. package/esm2022/i18n/languages/hr_HR.mjs +133 -85
  332. package/esm2022/i18n/languages/hu_HU.mjs +132 -84
  333. package/esm2022/i18n/languages/hy_AM.mjs +133 -85
  334. package/esm2022/i18n/languages/id_ID.mjs +119 -71
  335. package/esm2022/i18n/languages/is_IS.mjs +125 -77
  336. package/esm2022/i18n/languages/it_IT.mjs +127 -79
  337. package/esm2022/i18n/languages/ja_JP.mjs +95 -47
  338. package/esm2022/i18n/languages/ka_GE.mjs +106 -58
  339. package/esm2022/i18n/languages/kn_IN.mjs +110 -62
  340. package/esm2022/i18n/languages/ko_KR.mjs +126 -70
  341. package/esm2022/i18n/languages/ku_IQ.mjs +117 -85
  342. package/esm2022/i18n/languages/lv_LV.mjs +128 -72
  343. package/esm2022/i18n/languages/mn_MN.mjs +138 -82
  344. package/esm2022/i18n/languages/ms_MY.mjs +124 -68
  345. package/esm2022/i18n/languages/nb_NO.mjs +133 -77
  346. package/esm2022/i18n/languages/ne_NP.mjs +117 -61
  347. package/esm2022/i18n/languages/nl_BE.mjs +134 -78
  348. package/esm2022/i18n/languages/nl_NL.mjs +134 -78
  349. package/esm2022/i18n/languages/pl_PL.mjs +132 -76
  350. package/esm2022/i18n/languages/pt_BR.mjs +133 -77
  351. package/esm2022/i18n/languages/pt_PT.mjs +133 -77
  352. package/esm2022/i18n/languages/ro_RO.mjs +130 -74
  353. package/esm2022/i18n/languages/ru_RU.mjs +131 -75
  354. package/esm2022/i18n/languages/sk_SK.mjs +130 -83
  355. package/esm2022/i18n/languages/sl_SI.mjs +121 -73
  356. package/esm2022/i18n/languages/sr_RS.mjs +138 -90
  357. package/esm2022/i18n/languages/sv_SE.mjs +132 -84
  358. package/esm2022/i18n/languages/ta_IN.mjs +117 -61
  359. package/esm2022/i18n/languages/th_TH.mjs +99 -43
  360. package/esm2022/i18n/languages/tr_TR.mjs +126 -70
  361. package/esm2022/i18n/languages/uk_UA.mjs +124 -68
  362. package/esm2022/i18n/languages/vi_VN.mjs +133 -77
  363. package/esm2022/i18n/languages/zh_CN.mjs +5 -2
  364. package/esm2022/i18n/languages/zh_TW.mjs +5 -2
  365. package/esm2022/icon/icon.component.mjs +46 -77
  366. package/esm2022/icon/icon.module.mjs +5 -5
  367. package/esm2022/icon/icon.property.mjs +52 -30
  368. package/esm2022/icon/icon.service.mjs +15 -14
  369. package/esm2022/image/image-group.component.mjs +15 -15
  370. package/esm2022/image/image-preview.component.mjs +47 -46
  371. package/esm2022/image/image.component.mjs +34 -53
  372. package/esm2022/image/image.module.mjs +5 -5
  373. package/esm2022/image/image.property.mjs +152 -38
  374. package/esm2022/index.mjs +1 -3
  375. package/esm2022/inner/inner.component.mjs +15 -20
  376. package/esm2022/inner/inner.module.mjs +5 -5
  377. package/esm2022/inner/inner.property.mjs +17 -15
  378. package/esm2022/input/input-group.component.mjs +5 -7
  379. package/esm2022/input/input.component.mjs +130 -143
  380. package/esm2022/input/input.module.mjs +5 -5
  381. package/esm2022/input/input.property.mjs +205 -143
  382. package/esm2022/input-number/input-number.component.mjs +68 -86
  383. package/esm2022/input-number/input-number.module.mjs +5 -5
  384. package/esm2022/input-number/input-number.property.mjs +130 -60
  385. package/esm2022/keyword/keyword.directive.mjs +46 -54
  386. package/esm2022/keyword/keyword.module.mjs +5 -5
  387. package/esm2022/keyword/keyword.property.mjs +32 -28
  388. package/esm2022/layout/col.component.mjs +48 -51
  389. package/esm2022/layout/layout.module.mjs +5 -5
  390. package/esm2022/layout/layout.property.mjs +71 -63
  391. package/esm2022/layout/row.component.mjs +36 -27
  392. package/esm2022/link/link.component.mjs +18 -45
  393. package/esm2022/link/link.module.mjs +5 -5
  394. package/esm2022/link/link.property.mjs +101 -41
  395. package/esm2022/list/list-drop-group.directive.mjs +9 -18
  396. package/esm2022/list/list-option.component.mjs +16 -33
  397. package/esm2022/list/list.component.mjs +160 -164
  398. package/esm2022/list/list.module.mjs +5 -5
  399. package/esm2022/list/list.property.mjs +195 -188
  400. package/esm2022/loading/loading.component.mjs +44 -45
  401. package/esm2022/loading/loading.module.mjs +5 -5
  402. package/esm2022/loading/loading.property.mjs +50 -52
  403. package/esm2022/menu/menu-node.component.mjs +21 -21
  404. package/esm2022/menu/menu.component.mjs +57 -76
  405. package/esm2022/menu/menu.module.mjs +5 -5
  406. package/esm2022/menu/menu.property.mjs +56 -73
  407. package/esm2022/message/message.component.mjs +8 -8
  408. package/esm2022/message/message.module.mjs +5 -5
  409. package/esm2022/message/message.property.mjs +1 -1
  410. package/esm2022/message/message.service.mjs +7 -7
  411. package/esm2022/message-box/message-box.component.mjs +5 -5
  412. package/esm2022/message-box/message-box.module.mjs +5 -5
  413. package/esm2022/message-box/message-box.service.mjs +6 -6
  414. package/esm2022/notification/notification.component.mjs +8 -8
  415. package/esm2022/notification/notification.module.mjs +5 -5
  416. package/esm2022/notification/notification.property.mjs +1 -1
  417. package/esm2022/notification/notification.service.mjs +8 -8
  418. package/esm2022/outlet/outlet.directive.mjs +12 -14
  419. package/esm2022/outlet/outlet.module.mjs +5 -5
  420. package/esm2022/outlet/outlet.property.mjs +2 -2
  421. package/esm2022/page-header/page-header.component.mjs +12 -28
  422. package/esm2022/page-header/page-header.module.mjs +5 -5
  423. package/esm2022/page-header/page-header.property.mjs +31 -27
  424. package/esm2022/pagination/pagination.component.mjs +74 -100
  425. package/esm2022/pagination/pagination.module.mjs +5 -5
  426. package/esm2022/pagination/pagination.property.mjs +99 -136
  427. package/esm2022/pattern/pattern.component.mjs +12 -13
  428. package/esm2022/pattern/pattern.module.mjs +5 -5
  429. package/esm2022/pattern/pattern.property.mjs +2 -2
  430. package/esm2022/popconfirm/popconfirm.component.mjs +35 -47
  431. package/esm2022/popconfirm/popconfirm.module.mjs +5 -5
  432. package/esm2022/popconfirm/popconfirm.property.mjs +76 -62
  433. package/esm2022/popover/popover-portal.component.mjs +24 -75
  434. package/esm2022/popover/popover.directive.mjs +70 -86
  435. package/esm2022/popover/popover.module.mjs +5 -5
  436. package/esm2022/popover/popover.property.mjs +71 -58
  437. package/esm2022/portal/portal.module.mjs +5 -5
  438. package/esm2022/portal/portal.property.mjs +1 -1
  439. package/esm2022/portal/portal.service.mjs +4 -4
  440. package/esm2022/progress/progress.component.mjs +173 -167
  441. package/esm2022/progress/progress.module.mjs +5 -5
  442. package/esm2022/progress/progress.property.mjs +67 -71
  443. package/esm2022/radio/radio.component.mjs +45 -61
  444. package/esm2022/radio/radio.module.mjs +5 -5
  445. package/esm2022/radio/radio.property.mjs +139 -66
  446. package/esm2022/rate/rate.component.mjs +61 -79
  447. package/esm2022/rate/rate.module.mjs +5 -5
  448. package/esm2022/rate/rate.property.mjs +121 -29
  449. package/esm2022/resizable/resizable.directive.mjs +30 -45
  450. package/esm2022/resizable/resizable.module.mjs +5 -5
  451. package/esm2022/resizable/resizable.property.mjs +16 -46
  452. package/esm2022/result/result.component.mjs +13 -17
  453. package/esm2022/result/result.module.mjs +5 -5
  454. package/esm2022/result/result.property.mjs +25 -17
  455. package/esm2022/ripple/ripple.directive.mjs +38 -27
  456. package/esm2022/ripple/ripple.module.mjs +5 -5
  457. package/esm2022/ripple/ripple.property.mjs +27 -20
  458. package/esm2022/select/select-portal.component.mjs +52 -67
  459. package/esm2022/select/select.component.mjs +301 -289
  460. package/esm2022/select/select.module.mjs +5 -5
  461. package/esm2022/select/select.property.mjs +195 -102
  462. package/esm2022/skeleton/skeleton.component.mjs +12 -23
  463. package/esm2022/skeleton/skeleton.module.mjs +5 -5
  464. package/esm2022/skeleton/skeleton.property.mjs +31 -28
  465. package/esm2022/slider/slider.component.mjs +103 -149
  466. package/esm2022/slider/slider.module.mjs +5 -5
  467. package/esm2022/slider/slider.property.mjs +60 -79
  468. package/esm2022/slider-select/slider-select.component.mjs +201 -220
  469. package/esm2022/slider-select/slider-select.module.mjs +5 -5
  470. package/esm2022/slider-select/slider-select.property.mjs +143 -70
  471. package/esm2022/statistic/countdown.component.mjs +13 -16
  472. package/esm2022/statistic/statistic.component.mjs +23 -21
  473. package/esm2022/statistic/statistic.module.mjs +5 -5
  474. package/esm2022/statistic/statistic.property.mjs +68 -34
  475. package/esm2022/steps/steps.component.mjs +33 -63
  476. package/esm2022/steps/steps.module.mjs +5 -5
  477. package/esm2022/steps/steps.property.mjs +28 -39
  478. package/esm2022/switch/switch.component.mjs +22 -37
  479. package/esm2022/switch/switch.module.mjs +5 -5
  480. package/esm2022/switch/switch.property.mjs +122 -32
  481. package/esm2022/table/table-body.component.mjs +134 -139
  482. package/esm2022/table/table-foot.component.mjs +15 -18
  483. package/esm2022/table/table-head.component.mjs +60 -91
  484. package/esm2022/table/table.component.mjs +192 -222
  485. package/esm2022/table/table.module.mjs +5 -5
  486. package/esm2022/table/table.property.mjs +396 -341
  487. package/esm2022/tabs/tab-content.component.mjs +13 -16
  488. package/esm2022/tabs/tab-link.directive.mjs +7 -7
  489. package/esm2022/tabs/tab.component.mjs +9 -17
  490. package/esm2022/tabs/tabs.component.mjs +83 -135
  491. package/esm2022/tabs/tabs.module.mjs +5 -5
  492. package/esm2022/tabs/tabs.property.mjs +80 -91
  493. package/esm2022/tag/tag.component.mjs +19 -33
  494. package/esm2022/tag/tag.module.mjs +5 -5
  495. package/esm2022/tag/tag.property.mjs +44 -68
  496. package/esm2022/text-retract/text-retract.component.mjs +29 -46
  497. package/esm2022/text-retract/text-retract.module.mjs +5 -5
  498. package/esm2022/text-retract/text-retract.property.mjs +22 -18
  499. package/esm2022/textarea/textarea.component.mjs +49 -79
  500. package/esm2022/textarea/textarea.module.mjs +5 -5
  501. package/esm2022/textarea/textarea.property.mjs +124 -47
  502. package/esm2022/theme/theme.component.mjs +86 -81
  503. package/esm2022/theme/theme.module.mjs +5 -5
  504. package/esm2022/theme/theme.property.mjs +35 -46
  505. package/esm2022/time-ago/time-ago.module.mjs +5 -5
  506. package/esm2022/time-ago/time-ago.pipe.mjs +12 -11
  507. package/esm2022/time-ago/time-ago.property.mjs +2 -2
  508. package/esm2022/time-picker/time-picker-frame.component.mjs +173 -188
  509. package/esm2022/time-picker/time-picker-portal.component.mjs +35 -42
  510. package/esm2022/time-picker/time-picker.component.mjs +139 -170
  511. package/esm2022/time-picker/time-picker.module.mjs +5 -5
  512. package/esm2022/time-picker/time-picker.property.mjs +158 -70
  513. package/esm2022/time-range/time-range.module.mjs +5 -5
  514. package/esm2022/time-range/time-range.pipe.mjs +10 -10
  515. package/esm2022/time-range/time-range.property.mjs +2 -2
  516. package/esm2022/timeline/timeline.component.mjs +14 -38
  517. package/esm2022/timeline/timeline.module.mjs +5 -5
  518. package/esm2022/timeline/timeline.property.mjs +30 -30
  519. package/esm2022/tooltip/tooltip-portal.component.mjs +51 -65
  520. package/esm2022/tooltip/tooltip.directive.mjs +65 -62
  521. package/esm2022/tooltip/tooltip.module.mjs +5 -5
  522. package/esm2022/tooltip/tooltip.property.mjs +53 -47
  523. package/esm2022/transfer/transfer.component.mjs +225 -184
  524. package/esm2022/transfer/transfer.module.mjs +5 -5
  525. package/esm2022/transfer/transfer.property.mjs +84 -76
  526. package/esm2022/tree/tree-node.component.mjs +142 -132
  527. package/esm2022/tree/tree.component.mjs +236 -232
  528. package/esm2022/tree/tree.module.mjs +5 -5
  529. package/esm2022/tree/tree.property.mjs +228 -226
  530. package/esm2022/tree/tree.service.mjs +4 -4
  531. package/esm2022/tree-file/tree-file.component.mjs +34 -43
  532. package/esm2022/tree-file/tree-file.module.mjs +5 -5
  533. package/esm2022/tree-file/tree-file.property.mjs +45 -56
  534. package/esm2022/tree-select/tree-select-portal.component.mjs +45 -78
  535. package/esm2022/tree-select/tree-select.component.mjs +283 -296
  536. package/esm2022/tree-select/tree-select.module.mjs +5 -5
  537. package/esm2022/tree-select/tree-select.property.mjs +203 -125
  538. package/esm2022/typography/typography.component.mjs +13 -10
  539. package/esm2022/typography/typography.module.mjs +5 -5
  540. package/esm2022/typography/typography.property.mjs +12 -11
  541. package/esm2022/upload/upload-portal.component.mjs +54 -57
  542. package/esm2022/upload/upload.component.mjs +79 -98
  543. package/esm2022/upload/upload.module.mjs +5 -5
  544. package/esm2022/upload/upload.property.mjs +73 -68
  545. package/examples/examples.component.d.ts +2 -5
  546. package/fesm2022/ng-nest-ui-affix.mjs +30 -32
  547. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  548. package/fesm2022/ng-nest-ui-alert.mjs +142 -152
  549. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  550. package/fesm2022/ng-nest-ui-anchor.mjs +121 -133
  551. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  552. package/fesm2022/ng-nest-ui-api.mjs +14 -17
  553. package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
  554. package/fesm2022/ng-nest-ui-auto-complete.mjs +296 -260
  555. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  556. package/fesm2022/ng-nest-ui-avatar.mjs +195 -130
  557. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  558. package/fesm2022/ng-nest-ui-back-top.mjs +95 -103
  559. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  560. package/fesm2022/ng-nest-ui-badge.mjs +161 -96
  561. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  562. package/fesm2022/ng-nest-ui-base-form.mjs +286 -166
  563. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  564. package/fesm2022/ng-nest-ui-button.mjs +376 -175
  565. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  566. package/fesm2022/ng-nest-ui-calendar.mjs +134 -108
  567. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  568. package/fesm2022/ng-nest-ui-card.mjs +67 -36
  569. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  570. package/fesm2022/ng-nest-ui-carousel.mjs +365 -223
  571. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  572. package/fesm2022/ng-nest-ui-cascade.mjs +318 -249
  573. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  574. package/fesm2022/ng-nest-ui-checkbox.mjs +203 -155
  575. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  576. package/fesm2022/ng-nest-ui-collapse.mjs +202 -106
  577. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  578. package/fesm2022/ng-nest-ui-color-picker.mjs +316 -270
  579. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  580. package/fesm2022/ng-nest-ui-color.mjs +73 -54
  581. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  582. package/fesm2022/ng-nest-ui-comment.mjs +44 -108
  583. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  584. package/fesm2022/ng-nest-ui-container.mjs +119 -123
  585. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  586. package/fesm2022/ng-nest-ui-core.mjs +985 -664
  587. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  588. package/fesm2022/ng-nest-ui-crumb.mjs +28 -55
  589. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  590. package/fesm2022/ng-nest-ui-date-picker.mjs +1552 -1671
  591. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  592. package/fesm2022/ng-nest-ui-description.mjs +218 -109
  593. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  594. package/fesm2022/ng-nest-ui-dialog.mjs +307 -316
  595. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  596. package/fesm2022/ng-nest-ui-doc.mjs +14 -15
  597. package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
  598. package/fesm2022/ng-nest-ui-drag.mjs +20 -39
  599. package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
  600. package/fesm2022/ng-nest-ui-drawer.mjs +116 -145
  601. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  602. package/fesm2022/ng-nest-ui-dropdown.mjs +223 -238
  603. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  604. package/fesm2022/ng-nest-ui-empty.mjs +49 -46
  605. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  606. package/fesm2022/ng-nest-ui-examples.mjs +14 -15
  607. package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
  608. package/fesm2022/ng-nest-ui-find.mjs +422 -425
  609. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  610. package/fesm2022/ng-nest-ui-form.mjs +218 -203
  611. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  612. package/fesm2022/ng-nest-ui-highlight.mjs +93 -81
  613. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  614. package/fesm2022/ng-nest-ui-i18n.mjs +5892 -3516
  615. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  616. package/fesm2022/ng-nest-ui-icon.mjs +112 -120
  617. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  618. package/fesm2022/ng-nest-ui-image.mjs +244 -147
  619. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  620. package/fesm2022/ng-nest-ui-inner.mjs +33 -35
  621. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  622. package/fesm2022/ng-nest-ui-input-number.mjs +198 -146
  623. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  624. package/fesm2022/ng-nest-ui-input.mjs +340 -292
  625. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  626. package/fesm2022/ng-nest-ui-keyword.mjs +78 -82
  627. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  628. package/fesm2022/ng-nest-ui-layout.mjs +151 -140
  629. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  630. package/fesm2022/ng-nest-ui-link.mjs +119 -86
  631. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  632. package/fesm2022/ng-nest-ui-list.mjs +376 -400
  633. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  634. package/fesm2022/ng-nest-ui-loading.mjs +94 -97
  635. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  636. package/fesm2022/ng-nest-ui-menu.mjs +131 -167
  637. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  638. package/fesm2022/ng-nest-ui-message-box.mjs +13 -13
  639. package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
  640. package/fesm2022/ng-nest-ui-message.mjs +17 -17
  641. package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
  642. package/fesm2022/ng-nest-ui-notification.mjs +18 -18
  643. package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
  644. package/fesm2022/ng-nest-ui-outlet.mjs +16 -18
  645. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  646. package/fesm2022/ng-nest-ui-page-header.mjs +44 -55
  647. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  648. package/fesm2022/ng-nest-ui-pagination.mjs +173 -236
  649. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  650. package/fesm2022/ng-nest-ui-pattern.mjs +16 -17
  651. package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
  652. package/fesm2022/ng-nest-ui-popconfirm.mjs +110 -107
  653. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  654. package/fesm2022/ng-nest-ui-popover.mjs +163 -215
  655. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  656. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  657. package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
  658. package/fesm2022/ng-nest-ui-progress.mjs +240 -238
  659. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  660. package/fesm2022/ng-nest-ui-radio.mjs +184 -127
  661. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  662. package/fesm2022/ng-nest-ui-rate.mjs +182 -108
  663. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  664. package/fesm2022/ng-nest-ui-resizable.mjs +46 -91
  665. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  666. package/fesm2022/ng-nest-ui-result.mjs +38 -34
  667. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  668. package/fesm2022/ng-nest-ui-ripple.mjs +66 -48
  669. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  670. package/fesm2022/ng-nest-ui-select.mjs +547 -459
  671. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  672. package/fesm2022/ng-nest-ui-skeleton.mjs +44 -52
  673. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  674. package/fesm2022/ng-nest-ui-slider-select.mjs +344 -290
  675. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  676. package/fesm2022/ng-nest-ui-slider.mjs +163 -228
  677. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  678. package/fesm2022/ng-nest-ui-statistic.mjs +102 -68
  679. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  680. package/fesm2022/ng-nest-ui-steps.mjs +61 -102
  681. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  682. package/fesm2022/ng-nest-ui-switch.mjs +145 -69
  683. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  684. package/fesm2022/ng-nest-ui-table.mjs +784 -800
  685. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  686. package/fesm2022/ng-nest-ui-tabs.mjs +185 -259
  687. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  688. package/fesm2022/ng-nest-ui-tag.mjs +63 -101
  689. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  690. package/fesm2022/ng-nest-ui-text-retract.mjs +52 -64
  691. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  692. package/fesm2022/ng-nest-ui-textarea.mjs +173 -126
  693. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  694. package/fesm2022/ng-nest-ui-theme.mjs +123 -129
  695. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  696. package/fesm2022/ng-nest-ui-time-ago.mjs +16 -15
  697. package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
  698. package/fesm2022/ng-nest-ui-time-picker.mjs +498 -463
  699. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  700. package/fesm2022/ng-nest-ui-time-range.mjs +14 -14
  701. package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
  702. package/fesm2022/ng-nest-ui-timeline.mjs +44 -68
  703. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  704. package/fesm2022/ng-nest-ui-tooltip.mjs +168 -170
  705. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  706. package/fesm2022/ng-nest-ui-transfer.mjs +311 -262
  707. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  708. package/fesm2022/ng-nest-ui-tree-file.mjs +80 -99
  709. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  710. package/fesm2022/ng-nest-ui-tree-select.mjs +527 -495
  711. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  712. package/fesm2022/ng-nest-ui-tree.mjs +601 -587
  713. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  714. package/fesm2022/ng-nest-ui-typography.mjs +26 -22
  715. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  716. package/fesm2022/ng-nest-ui-upload.mjs +204 -220
  717. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  718. package/fesm2022/ng-nest-ui.mjs +0 -2
  719. package/fesm2022/ng-nest-ui.mjs.map +1 -1
  720. package/find/find.component.d.ts +30 -34
  721. package/find/find.property.d.ts +321 -108
  722. package/form/control.component.d.ts +37 -18
  723. package/form/form.component.d.ts +8 -10
  724. package/form/form.property.d.ts +111 -27
  725. package/highlight/highlight.component.d.ts +10 -17
  726. package/highlight/highlight.property.d.ts +40 -11
  727. package/highlight/highlight.service.d.ts +8 -0
  728. package/highlight/public-api.d.ts +1 -0
  729. package/i18n/i18n.directive.d.ts +6 -9
  730. package/i18n/i18n.property.d.ts +6 -2
  731. package/i18n/i18n.service.d.ts +2 -2
  732. package/i18n/languages/ar_EG.d.ts +56 -0
  733. package/i18n/languages/bg_BG.d.ts +56 -0
  734. package/i18n/languages/ca_ES.d.ts +56 -0
  735. package/i18n/languages/cs_CZ.d.ts +56 -0
  736. package/i18n/languages/da_DK.d.ts +56 -0
  737. package/i18n/languages/de_DE.d.ts +56 -0
  738. package/i18n/languages/el_GR.d.ts +56 -0
  739. package/i18n/languages/en_GB.d.ts +3 -0
  740. package/i18n/languages/en_US.d.ts +3 -0
  741. package/i18n/languages/es_ES.d.ts +56 -0
  742. package/i18n/languages/et_EE.d.ts +56 -0
  743. package/i18n/languages/fa_IR.d.ts +56 -0
  744. package/i18n/languages/fi_FI.d.ts +56 -0
  745. package/i18n/languages/fr_BE.d.ts +60 -4
  746. package/i18n/languages/fr_FR.d.ts +56 -0
  747. package/i18n/languages/he_IL.d.ts +56 -0
  748. package/i18n/languages/hi_IN.d.ts +56 -0
  749. package/i18n/languages/hr_HR.d.ts +56 -0
  750. package/i18n/languages/hu_HU.d.ts +56 -0
  751. package/i18n/languages/hy_AM.d.ts +56 -0
  752. package/i18n/languages/id_ID.d.ts +56 -0
  753. package/i18n/languages/is_IS.d.ts +56 -0
  754. package/i18n/languages/it_IT.d.ts +56 -0
  755. package/i18n/languages/ja_JP.d.ts +56 -0
  756. package/i18n/languages/ka_GE.d.ts +56 -0
  757. package/i18n/languages/kn_IN.d.ts +56 -0
  758. package/i18n/languages/ko_KR.d.ts +56 -0
  759. package/i18n/languages/ku_IQ.d.ts +32 -0
  760. package/i18n/languages/lv_LV.d.ts +56 -0
  761. package/i18n/languages/mn_MN.d.ts +56 -0
  762. package/i18n/languages/ms_MY.d.ts +56 -0
  763. package/i18n/languages/nb_NO.d.ts +56 -0
  764. package/i18n/languages/ne_NP.d.ts +56 -0
  765. package/i18n/languages/nl_BE.d.ts +56 -0
  766. package/i18n/languages/nl_NL.d.ts +56 -0
  767. package/i18n/languages/pl_PL.d.ts +56 -0
  768. package/i18n/languages/pt_BR.d.ts +56 -0
  769. package/i18n/languages/pt_PT.d.ts +56 -0
  770. package/i18n/languages/ro_RO.d.ts +56 -0
  771. package/i18n/languages/ru_RU.d.ts +56 -0
  772. package/i18n/languages/sk_SK.d.ts +56 -1
  773. package/i18n/languages/sl_SI.d.ts +56 -0
  774. package/i18n/languages/sr_RS.d.ts +56 -0
  775. package/i18n/languages/sv_SE.d.ts +56 -0
  776. package/i18n/languages/ta_IN.d.ts +56 -0
  777. package/i18n/languages/th_TH.d.ts +56 -0
  778. package/i18n/languages/tr_TR.d.ts +56 -0
  779. package/i18n/languages/uk_UA.d.ts +56 -0
  780. package/i18n/languages/vi_VN.d.ts +56 -0
  781. package/i18n/languages/zh_CN.d.ts +3 -0
  782. package/i18n/languages/zh_TW.d.ts +3 -0
  783. package/icon/icon.component.d.ts +8 -14
  784. package/icon/icon.property.d.ts +31 -13
  785. package/icon/icon.service.d.ts +1 -1
  786. package/image/image-group.component.d.ts +1 -3
  787. package/image/image-preview.component.d.ts +11 -13
  788. package/image/image.component.d.ts +10 -11
  789. package/image/image.property.d.ts +117 -16
  790. package/index.d.ts +0 -2
  791. package/inner/inner.component.d.ts +3 -10
  792. package/inner/inner.property.d.ts +8 -4
  793. package/input/input-group.component.d.ts +0 -2
  794. package/input/input.component.d.ts +32 -30
  795. package/input/input.property.d.ts +347 -65
  796. package/input-number/input-number.component.d.ts +14 -19
  797. package/input-number/input-number.property.d.ts +292 -26
  798. package/keyword/keyword.directive.d.ts +4 -12
  799. package/keyword/keyword.property.d.ts +11 -7
  800. package/layout/col.component.d.ts +8 -11
  801. package/layout/layout.property.d.ts +25 -18
  802. package/layout/row.component.d.ts +7 -8
  803. package/link/link.component.d.ts +7 -13
  804. package/link/link.property.d.ts +64 -11
  805. package/list/list-drop-group.directive.d.ts +3 -5
  806. package/list/list-option.component.d.ts +7 -9
  807. package/list/list.component.d.ts +35 -30
  808. package/list/list.property.d.ts +126 -61
  809. package/loading/loading.component.d.ts +12 -12
  810. package/loading/loading.property.d.ts +20 -11
  811. package/menu/menu-node.component.d.ts +11 -8
  812. package/menu/menu.component.d.ts +18 -19
  813. package/menu/menu.property.d.ts +23 -28
  814. package/message/message.property.d.ts +1 -1
  815. package/notification/notification.property.d.ts +1 -1
  816. package/outlet/outlet.directive.d.ts +4 -4
  817. package/outlet/outlet.property.d.ts +1 -1
  818. package/package.json +97 -103
  819. package/page-header/page-header.component.d.ts +4 -8
  820. package/page-header/page-header.property.d.ts +11 -8
  821. package/pagination/pagination.component.d.ts +15 -22
  822. package/pagination/pagination.property.d.ts +34 -66
  823. package/pattern/pattern.component.d.ts +2 -5
  824. package/pattern/pattern.property.d.ts +1 -1
  825. package/popconfirm/popconfirm.component.d.ts +12 -14
  826. package/popconfirm/popconfirm.property.d.ts +32 -19
  827. package/popover/popover-portal.component.d.ts +16 -33
  828. package/popover/popover.directive.d.ts +6 -12
  829. package/popover/popover.property.d.ts +31 -22
  830. package/portal/portal.property.d.ts +2 -2
  831. package/portal/portal.service.d.ts +2 -2
  832. package/progress/progress.component.d.ts +25 -30
  833. package/progress/progress.property.d.ts +29 -20
  834. package/radio/radio.component.d.ts +14 -15
  835. package/radio/radio.property.d.ts +271 -31
  836. package/rate/rate.component.d.ts +14 -17
  837. package/rate/rate.property.d.ts +259 -12
  838. package/resizable/resizable.directive.d.ts +5 -5
  839. package/resizable/resizable.property.d.ts +14 -14
  840. package/result/result.component.d.ts +5 -7
  841. package/result/result.property.d.ts +11 -7
  842. package/ripple/ripple.directive.d.ts +5 -4
  843. package/ripple/ripple.property.d.ts +14 -5
  844. package/select/select-portal.component.d.ts +39 -43
  845. package/select/select.component.d.ts +53 -56
  846. package/select/select.property.d.ts +317 -37
  847. package/skeleton/skeleton.component.d.ts +4 -8
  848. package/skeleton/skeleton.property.d.ts +17 -8
  849. package/slider/slider.component.d.ts +34 -31
  850. package/slider/slider.property.d.ts +26 -22
  851. package/slider-select/slider-select.component.d.ts +38 -38
  852. package/slider-select/slider-select.property.d.ts +302 -28
  853. package/statistic/countdown.component.d.ts +2 -5
  854. package/statistic/statistic.component.d.ts +3 -8
  855. package/statistic/statistic.property.d.ts +44 -13
  856. package/steps/steps.component.d.ts +6 -16
  857. package/steps/steps.property.d.ts +15 -10
  858. package/style/core/index.css +0 -38
  859. package/style/core/index.css.map +1 -1
  860. package/style/core/var.scss +0 -4
  861. package/style/mixins/compatibility.scss +0 -1
  862. package/style/mixins/form.scss +8 -2
  863. package/style/params/index.scss +0 -1
  864. package/style/params/primary.scss +7 -28
  865. package/switch/switch.component.d.ts +9 -10
  866. package/switch/switch.property.d.ts +265 -16
  867. package/table/table-body.component.d.ts +21 -20
  868. package/table/table-foot.component.d.ts +7 -5
  869. package/table/table-head.component.d.ts +17 -19
  870. package/table/table.component.d.ts +62 -50
  871. package/table/table.property.d.ts +180 -178
  872. package/tabs/tab-content.component.d.ts +6 -8
  873. package/tabs/tab.component.d.ts +3 -5
  874. package/tabs/tabs.component.d.ts +17 -24
  875. package/tabs/tabs.property.d.ts +28 -24
  876. package/tag/tag.component.d.ts +7 -8
  877. package/tag/tag.property.d.ts +19 -21
  878. package/text-retract/text-retract.component.d.ts +4 -14
  879. package/text-retract/text-retract.property.d.ts +9 -5
  880. package/textarea/textarea.component.d.ts +17 -20
  881. package/textarea/textarea.property.d.ts +266 -30
  882. package/theme/theme.component.d.ts +24 -13
  883. package/theme/theme.property.d.ts +67 -16
  884. package/time-ago/time-ago.pipe.d.ts +7 -3
  885. package/time-ago/time-ago.property.d.ts +1 -1
  886. package/time-picker/time-picker-frame.component.d.ts +52 -39
  887. package/time-picker/time-picker-portal.component.d.ts +29 -29
  888. package/time-picker/time-picker.component.d.ts +29 -30
  889. package/time-picker/time-picker.property.d.ts +314 -23
  890. package/time-range/time-range.property.d.ts +1 -1
  891. package/timeline/timeline.component.d.ts +5 -13
  892. package/timeline/timeline.property.d.ts +12 -8
  893. package/tooltip/tooltip-portal.component.d.ts +23 -29
  894. package/tooltip/tooltip.directive.d.ts +10 -9
  895. package/tooltip/tooltip.property.d.ts +18 -14
  896. package/transfer/transfer.component.d.ts +23 -20
  897. package/transfer/transfer.property.d.ts +81 -25
  898. package/tree/tree-node.component.d.ts +21 -21
  899. package/tree/tree.component.d.ts +29 -28
  900. package/tree/tree.property.d.ts +129 -79
  901. package/tree-file/tree-file.component.d.ts +7 -9
  902. package/tree-file/tree-file.property.d.ts +40 -16
  903. package/tree-select/tree-select-portal.component.d.ts +38 -49
  904. package/tree-select/tree-select.component.d.ts +50 -53
  905. package/tree-select/tree-select.property.d.ts +328 -39
  906. package/typography/typography.component.d.ts +1 -1
  907. package/typography/typography.property.d.ts +3 -3
  908. package/upload/upload-portal.component.d.ts +14 -14
  909. package/upload/upload.component.d.ts +18 -17
  910. package/upload/upload.property.d.ts +73 -24
  911. package/border/border.component.d.ts +0 -11
  912. package/border/border.module.d.ts +0 -7
  913. package/border/border.property.d.ts +0 -6
  914. package/border/index.d.ts +0 -5
  915. package/border/public-api.d.ts +0 -3
  916. package/esm2022/border/border.component.mjs +0 -21
  917. package/esm2022/border/border.module.mjs +0 -16
  918. package/esm2022/border/border.property.mjs +0 -7
  919. package/esm2022/border/ng-nest-ui-border.mjs +0 -5
  920. package/esm2022/border/public-api.mjs +0 -4
  921. package/fesm2022/ng-nest-ui-border.mjs +0 -47
  922. package/fesm2022/ng-nest-ui-border.mjs.map +0 -1
  923. package/style/params/colors.scss +0 -38
@@ -1,19 +1,18 @@
1
1
  import { trigger, transition, style, animate, state } from '@angular/animations';
2
- import { isObservable, Observable, of, throwError, Subject } from 'rxjs';
3
- import { coerceBooleanProperty, _isNumberValue } from '@angular/cdk/coercion';
4
- import { map, takeUntil, filter, mapTo } from 'rxjs/operators';
2
+ import { isObservable, Observable, BehaviorSubject, Subject, of, throwError } from 'rxjs';
3
+ import { coerceCssPixelValue } from '@angular/cdk/coercion';
4
+ import { map, takeUntil, filter } from 'rxjs/operators';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, InjectionToken, inject } from '@angular/core';
6
+ import { booleanAttribute, numberAttribute, InjectionToken, inject, Injectable } from '@angular/core';
7
+ import { DOCUMENT } from '@angular/common';
7
8
  import * as i1 from '@angular/common/http';
8
9
  import * as i1$1 from '@angular/cdk/platform';
9
- import { DOCUMENT } from '@angular/common';
10
10
 
11
11
  /**
12
- * Fill default values
13
- * @param option option
14
- * @param def default
12
+ * @zh_CN 填充默认值
13
+ * @en_US Fill default values
15
14
  */
16
- function fillDefault(option, def) {
15
+ function XFillDefault(option, def) {
17
16
  if (option && def) {
18
17
  for (const key in def) {
19
18
  if (typeof option[key] === 'undefined') {
@@ -24,9 +23,10 @@ function fillDefault(option, def) {
24
23
  }
25
24
 
26
25
  /**
27
- * 删除当前标签,保留内容
26
+ * @zh_CN 删除当前标签,保留内容
27
+ * @en_US Delete the current label and keep the content
28
28
  */
29
- function removeNgTag(nativeElement) {
29
+ function XRemoveNgTag(nativeElement) {
30
30
  const parentElement = nativeElement.parentElement;
31
31
  if (!parentElement || !parentElement.insertBefore)
32
32
  return;
@@ -36,18 +36,34 @@ function removeNgTag(nativeElement) {
36
36
  parentElement.removeChild(nativeElement);
37
37
  }
38
38
 
39
- function warnSVGTagNotFound() {
39
+ /**
40
+ * @zh_CN svg 标签不存在的警告信息
41
+ * @en_US Warning information that does not exist in SVG tags
42
+ */
43
+ function XWarnSVGTagNotFound() {
40
44
  console.warn(`<svg> tag not found.`);
41
45
  }
42
- function warnIconTypeNotFound() {
46
+ /**
47
+ * @zh_CN icon 不存在的警告信息
48
+ * @en_US Warning information that does not exist in icon
49
+ */
50
+ function XWarnIconTypeNotFound() {
43
51
  console.warn(`icon type not found.`);
44
52
  }
45
53
 
54
+ /**
55
+ * @zh_CN 获取元素的指定样式的计算值
56
+ * @en_US The calculation value of the specified style of the element
57
+ */
46
58
  function XComputedStyle(element, style) {
47
59
  let computed = XComputed(element);
48
60
  let value = computed[style];
49
61
  return value.replace(/px/g, '');
50
62
  }
63
+ /**
64
+ * @zh_CN 获取元素的计算样式
65
+ * @en_US Calculation style of obtaining elements
66
+ */
51
67
  function XComputed(element) {
52
68
  if (typeof getComputedStyle === 'function') {
53
69
  return getComputedStyle(element);
@@ -79,47 +95,71 @@ function getRequestAnimationFrame() {
79
95
  const prefix = availablePrefixes.filter((key) => `${key}RequestAnimationFrame` in window)[0];
80
96
  return prefix ? window[`${prefix}RequestAnimationFrame`] : requestAnimationFramePolyfill();
81
97
  }
82
- // export function cancelRequestAnimationFrame(id: number): any {
83
- // if (typeof window === "undefined") {
84
- // return null;
85
- // }
86
- // if (window.cancelAnimationFrame) {
87
- // return window.cancelAnimationFrame(id);
88
- // }
89
- // const prefix = availablePrefixes.filter(
90
- // key =>
91
- // `${key}CancelAnimationFrame` in window ||
92
- // `${key}CancelRequestAnimationFrame` in window
93
- // )[0];
94
- // return prefix
95
- // ? (
96
- // (window as any)[`${prefix}CancelAnimationFrame`] ||
97
- // (window as any)[`${prefix}CancelRequestAnimationFrame`]
98
- // )
99
- // // @ts-ignore
100
- // .call(this, id)
101
- // : clearTimeout(id);
102
- // }
103
- const reqAnimFrame = getRequestAnimationFrame();
98
+ const XRequestAnimationFrame = getRequestAnimationFrame();
104
99
 
105
100
  /**
106
- * 去除HTML标签
101
+ * @zh_CN 去除 HTML 标签
102
+ * @en_US Remove the html tag
107
103
  */
108
- function stripTags(text, ...usefulTags) {
109
- if (!text || typeof (text) !== 'string')
104
+ function XStripTags(text, ...usefulTags) {
105
+ if (!text || typeof text !== 'string')
110
106
  return text;
111
107
  return usefulTags.length > 0
112
108
  ? text.replace(new RegExp(`<(?!\/?(${usefulTags.join('|')})\s*\/?)[^>]+>`, 'g'), '')
113
109
  : text.replace(/<(?:.|\s)*?>/g, '');
114
110
  }
115
111
 
116
- function isNotNil(value) {
112
+ /**
113
+ * @zh_CN 判断值不为 null 或 undefined
114
+ * @en_US The judgment value is not null or undefined
115
+ */
116
+ function XIsNotNil(value) {
117
117
  return typeof value !== 'undefined' && value !== null;
118
118
  }
119
- function isNil(value) {
119
+ /**
120
+ * @zh_CN 判断值为 null 或 undefined
121
+ * @en_US The judgment value is null or undefined
122
+ */
123
+ function XIsNil(value) {
120
124
  return typeof value === 'undefined' || value === null;
121
125
  }
122
126
 
127
+ /**
128
+ * @zh_CN 该函数将字符串中的驼峰命名法转换为减号命名法
129
+ * - 采用正则表达式匹配字符串中每个连续的大小写字母边界
130
+ * - 将其替换为小写字母和连字符的组合
131
+ * - 最后将整个字符串转换为小写
132
+ * - 例如,`XCamelToKebab('helloWorld')` 将返回 `hello-world`
133
+ * @en_US This function converts string of hump nomenclature kebab nomenclature
134
+ * - Use regular expression match each successive lowercase letters in the string boundary
135
+ * - Replace it with a lower case letters and hyphens
136
+ * - Finally the whole string converted to lowercase
137
+ * - For example, `XCamelToKebab('helloWorld')` returns the `hello-world`
138
+ */
139
+ function XCamelToKebab(str) {
140
+ return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
141
+ }
142
+
143
+ /**
144
+ * @zh_CN 该函数将字符串中的减号命名法转换为驼峰命名法
145
+ * - 使用正则表达式匹配所有连字符后的字母 ( `(\w)` )
146
+ * - 用 `toUpperCase()` 将这些字母转换为大写
147
+ * - 替换原字符串中的连字符和小写字母为大写字母
148
+ * - 例如,`XKebabToCamel('hello-world')` 将返回 `helloWorld`
149
+ * @en_US This function converts string minus nomenclature of hump nomenclature
150
+ * - Use a regular expression match all the letter after a hyphen ( `(\w)` )
151
+ * - Use `toUpperCase()` converts these letters to uppercase
152
+ * - Replace the original string the hyphen and lowercase letters to uppercase
153
+ * - For example, `XKebabToCamel('hello-world')` returns `helloWorld`
154
+ */
155
+ function XKebabToCamel(str) {
156
+ return str.replace(/-(\w)/g, (_, char) => char.toUpperCase());
157
+ }
158
+
159
+ /**
160
+ * @zh_CN 动画执行时间
161
+ * @en_US Animation execution time
162
+ */
123
163
  var XDuration;
124
164
  (function (XDuration) {
125
165
  XDuration["Slow"] = "0.3s";
@@ -127,10 +167,20 @@ var XDuration;
127
167
  XDuration["Fast"] = "0.1s";
128
168
  })(XDuration || (XDuration = {}));
129
169
 
130
- // 进场动画
170
+ /**
171
+ * @zh_CN 进场动画
172
+ * @en_US Enter an animation
173
+ */
131
174
  const XDURATION_BASE_EASE_IN$1 = `${XDuration.Fast} ease-in`;
132
- // 移除动画
175
+ /**
176
+ * @zh_CN 移除动画
177
+ * @en_US Remove animation
178
+ */
133
179
  const XDURATION_BASE_EASE_OUT$1 = `${XDuration.Fast} ease-out`;
180
+ /**
181
+ * @zh_CN 淡入淡出动画
182
+ * @en_US Fade into the animation
183
+ */
134
184
  const XFadeAnimation = trigger('x-fade-animation', [
135
185
  transition(':enter', [
136
186
  style({ opacity: 0, transform: 'scale(0.8)' }),
@@ -139,6 +189,10 @@ const XFadeAnimation = trigger('x-fade-animation', [
139
189
  transition(':leave', [animate(`${XDURATION_BASE_EASE_OUT$1}`, style({ opacity: 0 }))])
140
190
  ]);
141
191
 
192
+ /**
193
+ * @zh_CN 抽屉动画
194
+ * @en_US Drawer animation
195
+ */
142
196
  const XSlideAnimation = trigger('x-slide-animation', [
143
197
  transition('void => right', [style({ transform: 'translate(100%,0)' }), animate(`${XDuration.Base} ease-in`)]),
144
198
  transition('right => void', [animate(`${XDuration.Base} ease-out`, style({ transform: 'translate(100%,0)' }))]),
@@ -149,29 +203,11 @@ const XSlideAnimation = trigger('x-slide-animation', [
149
203
  transition('void => bottom', [style({ transform: 'translate(0,100%)' }), animate(`${XDuration.Base} ease-in`)]),
150
204
  transition('bottom => void', [animate(`${XDuration.Base} ease-out`, style({ transform: 'translate(0,100%)' }))])
151
205
  ]);
152
- const XSliderAnimation = trigger('x-slider-animation', [
153
- transition('void => left, void => right', [
154
- style({
155
- width: 0,
156
- opacity: 0
157
- }),
158
- animate(`${XDuration.Base}`, style({
159
- width: '*',
160
- opacity: 1
161
- }))
162
- ]),
163
- transition('left => void, right => void', [
164
- style({
165
- width: '*',
166
- opacity: 1
167
- }),
168
- animate(`${XDuration.Base}`, style({
169
- width: 0,
170
- opacity: 0
171
- }))
172
- ])
173
- ]);
174
206
 
207
+ /**
208
+ * @zh_CN 放置动画
209
+ * @en_US Drop animation
210
+ */
175
211
  const XDropAnimation = trigger('x-drop-animation', [
176
212
  state('*', style({ opacity: 0, height: 0, border: 0, padding: 0, visibility: 'hidden' })),
177
213
  state('false', style({ opacity: 0, height: 0, border: 0, padding: 0, visibility: 'hidden' })),
@@ -179,6 +215,10 @@ const XDropAnimation = trigger('x-drop-animation', [
179
215
  transition('* => *', animate(`${XDuration.Base} ease-out`))
180
216
  ]);
181
217
 
218
+ /**
219
+ * @zh_CN 移入移出动画
220
+ * @en_US Move in the animation
221
+ */
182
222
  const XMoveAnimation = trigger('x-move-animation', [
183
223
  transition('void => top-start, void => top, void => top-end, void => center', [
184
224
  style({
@@ -352,121 +392,49 @@ const XMoveBoxAnimation = trigger('x-move-box-animation', [
352
392
  ])
353
393
  ]);
354
394
 
355
- // 进场动画
356
- // const XDURATION_SLOW_EASE_IN = `${XDuration.Slow} ease-in`;
395
+ /**
396
+ * @zh_CN 进场动画
397
+ * @en_US Enter an animation
398
+ */
357
399
  const XDURATION_BASE_EASE_IN = `${XDuration.Base} ease-in`;
358
400
  const XDURATION_FAST_EASE_IN = `${XDuration.Fast} ease-in`;
359
- // 移除动画
360
- // const XDURATION_SLOW_EASE_OUT = `${XDuration.Slow} ease-out`;
401
+ /**
402
+ * @zh_CN 移除动画
403
+ * @en_US Remove animation
404
+ */
361
405
  const XDURATION_BASE_EASE_OUT = `${XDuration.Base} ease-out`;
362
406
  const XDURATION_FAST_EASE_OUT = `${XDuration.Fast} ease-out`;
363
- const XConnectAnimation = trigger('x-connect-animation', [
364
- transition('void => top-start, void => top, void => top-end, void => center', [
365
- style({
366
- opacity: 0
367
- // transform: 'scaleY(0.8)',
368
- // transformOrigin: '0% 100%'
369
- }),
370
- animate(XDURATION_FAST_EASE_IN, style({
371
- opacity: 1
372
- // transform: 'scaleY(1)',
373
- // transformOrigin: '0% 100%'
374
- }))
375
- ]),
376
- transition('top-start => void, top => void, top-end => void, center => void', [
377
- style({
378
- opacity: 1
379
- // transform: 'scaleY(1)',
380
- // transformOrigin: '0% 100%'
381
- }),
382
- animate(XDURATION_FAST_EASE_OUT, style({
383
- opacity: 0
384
- // transform: 'scaleY(0.8)',
385
- // transformOrigin: '0% 100%'
386
- }))
387
- ]),
388
- transition('void => left', [
389
- style({
390
- transform: 'translateX(-30%)',
391
- opacity: 0
392
- }),
393
- animate(`${XDuration.Base}`, style({
394
- transform: 'translateX(0%)',
395
- opacity: 1
396
- }))
397
- ]),
398
- transition('left => void', [
399
- style({
400
- transform: 'translateX(0%)',
401
- opacity: 1,
402
- height: '*'
403
- }),
404
- animate(`${XDuration.Base}`, style({
405
- transform: 'translateX(-30%)',
406
- opacity: 0,
407
- height: 0
408
- }))
409
- ]),
410
- transition('void => right', [
411
- style({
412
- transform: 'translateX(30%)',
413
- opacity: 0
414
- }),
415
- animate(`${XDuration.Base}`, style({
416
- transform: 'translateX(0%)',
417
- opacity: 1
418
- }))
419
- ]),
420
- transition('right => void', [
421
- style({
422
- transform: 'translateX(0%)',
423
- opacity: 1,
424
- height: '*'
425
- }),
426
- animate(`${XDuration.Base}`, style({
427
- transform: 'translateX(30%)',
428
- opacity: 0,
429
- height: 0
430
- }))
431
- ]),
432
- transition('void => bottom-start, void => bottom, void => bottom-end', [
433
- style({
434
- opacity: 0
435
- // transform: 'scale(0)',
436
- // transformOrigin: '0% 0%'
437
- }),
438
- animate(XDURATION_FAST_EASE_IN, style({
439
- opacity: 1
440
- // transform: 'scale(1)',
441
- // transformOrigin: '30% 30%'
442
- }))
443
- ]),
444
- transition('bottom-start => void, bottom => void, bottom-end => void', [
445
- style({
446
- opacity: 1
447
- // transform: 'scale(1)',
448
- // transformOrigin: '30% 30%'
449
- }),
450
- animate(XDURATION_FAST_EASE_OUT, style({
451
- opacity: 0
452
- // transform: 'scale(0)',
453
- // transformOrigin: '0% 0%'
454
- }))
455
- ])
456
- ]);
407
+ /**
408
+ * @zh_CN 弹框连接时的动画,只处理 Y
409
+ * @en_US The animation when the bomb frame is connected, only the y-axis
410
+ */
457
411
  const XConnectBaseAnimation = trigger('x-connect-base-animation', [
458
412
  transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate(XDURATION_FAST_EASE_IN)]),
459
413
  transition(':leave', [animate(XDURATION_FAST_EASE_OUT, style({ opacity: 0 }))])
460
414
  ]);
415
+ /**
416
+ * @zh_CN 弹框连接时的动画,缩放
417
+ * @en_US The animation when the bomb frame is connected, zoomed in
418
+ */
461
419
  const XBaseAnimation = trigger('x-base-animation', [
462
420
  transition(':enter', [style({ opacity: 0, transform: 'scale(0.2)' }), animate(XDURATION_BASE_EASE_IN)]),
463
421
  transition(':leave', [animate(XDURATION_BASE_EASE_OUT, style({ opacity: 0, transform: 'scale(0.2)' }))])
464
422
  ]);
465
423
 
466
- // 进场动画
424
+ /**
425
+ * @zh_CN 进场动画
426
+ * @en_US Enter an animation
427
+ */
467
428
  const XDURATION_SLOW_EASE_IN = `${XDuration.Slow} ease-in`;
468
- // 移除动画
429
+ /**
430
+ * @zh_CN 移除动画
431
+ * @en_US Remove animation
432
+ */
469
433
  const XDURATION_SLOW_EASE_OUT = `${XDuration.Slow} ease-out`;
434
+ /**
435
+ * @zh_CN Badge 动画
436
+ * @en_US Badge animation
437
+ */
470
438
  const XBadgeAnimation = trigger('x-badge-animation', [
471
439
  transition(':enter', [
472
440
  style({ opacity: 0, transform: 'scale(0) translate(50%, -50%)' }),
@@ -483,6 +451,10 @@ const XBadgeAnimation = trigger('x-badge-animation', [
483
451
  }))
484
452
  ])
485
453
  ]);
454
+ /**
455
+ * @zh_CN Badge 独立存在时的动画
456
+ * @en_US The animation when Badge exists independently
457
+ */
486
458
  const XBadgeStandaloneAnimation = trigger('x-badge-standalone-animation', [
487
459
  transition(':enter', [
488
460
  style({ opacity: 0, transform: 'scale(0)' }),
@@ -500,6 +472,10 @@ const XBadgeStandaloneAnimation = trigger('x-badge-standalone-animation', [
500
472
  ])
501
473
  ]);
502
474
 
475
+ /**
476
+ * @zh_CN 透明度淡入淡出动画
477
+ * @en_US The transparency fades into the animation
478
+ */
503
479
  const XOpacityAnimation = trigger('x-opacity-animation', [
504
480
  state('*', style({ opacity: 0 })),
505
481
  state('false', style({ opacity: 0 })),
@@ -507,95 +483,205 @@ const XOpacityAnimation = trigger('x-opacity-animation', [
507
483
  transition('* => *', animate(`${XDuration.Slow} cubic-bezier(0.25, 0.8, 0.25, 1)`))
508
484
  ]);
509
485
 
510
- // 类型判断
511
- const XIsType = (type) => (object) => Object.prototype.toString.call(object) === `[object ${type}]`;
512
- // 值改变判断
513
- const XIsChange = (...changes) => {
486
+ /**
487
+ * @zh_CN 类型判断
488
+ * @en_US Type judgment
489
+ */
490
+ function XIsType(type) {
491
+ return (object) => Object.prototype.toString.call(object) === `[object ${type}]`;
492
+ }
493
+ /**
494
+ * @zh_CN 值改变判断
495
+ * @en_US Value change judgment
496
+ */
497
+ function XIsChange(...changes) {
514
498
  for (let change of changes) {
515
499
  if (change?.currentValue !== change?.previousValue)
516
500
  return true;
517
501
  }
518
502
  return false;
519
- };
503
+ }
520
504
  const IsString = XIsType('String');
521
505
  const IsArray = XIsType('Array');
522
506
  const IsNumber = XIsType('Number');
523
507
  const IsBoolean = XIsType('Boolean');
524
508
  const IsObject = XIsType('Object');
525
- const IsNull = XIsType('Null');
509
+ const IsNull = (value) => value === null;
526
510
  const IsFunction = XIsType('Function');
527
511
  const IsDate = XIsType('Date');
528
512
  const IsRegExp = XIsType('RegExp');
513
+ /**
514
+ * @zh_CN 判断给定的值是否为字符串类型
515
+ * @en_US Determine whether the given value is a string type
516
+ */
529
517
  function XIsString(value) {
530
518
  return IsString(value);
531
519
  }
520
+ /**
521
+ * @zh_CN 判断给定的值是否为数组类型
522
+ * @en_US Determine whether the given value is a array type
523
+ */
532
524
  function XIsArray(value) {
533
525
  return IsArray(value);
534
526
  }
527
+ /**
528
+ * @zh_CN 判断给定的值是否为数字类型
529
+ * @en_US Determine whether the given value is a number type
530
+ */
535
531
  function XIsNumber(value) {
536
532
  return IsNumber(value);
537
533
  }
534
+ /**
535
+ * @zh_CN 判断给定的值是否为布尔类型
536
+ * @en_US Determine whether the given value is a boolean type
537
+ */
538
538
  function XIsBoolean(value) {
539
539
  return IsBoolean(value);
540
540
  }
541
+ /**
542
+ * @zh_CN 判断给定的值是否为对象类型
543
+ * @en_US Determine whether the given value is a object type
544
+ */
541
545
  function XIsObject(value) {
542
546
  return IsObject(value);
543
547
  }
548
+ /**
549
+ * @zh_CN 判断给定的值是否为 null 类型
550
+ * @en_US Determine whether the given value is a null type
551
+ */
544
552
  function XIsNull(value) {
545
553
  return IsNull(value);
546
554
  }
555
+ /**
556
+ * @zh_CN 判断给定的值是否为函数类型
557
+ * @en_US Determine whether the given value is a function type
558
+ */
547
559
  function XIsFunction(value) {
548
560
  return IsFunction(value);
549
561
  }
562
+ /**
563
+ * @zh_CN 判断给定的值是否为日期类型
564
+ * @en_US Determine whether the given value is a date type
565
+ */
550
566
  function XIsDate(value) {
551
567
  return IsDate(value);
552
568
  }
569
+ /**
570
+ * @zh_CN 判断给定的值是否为正则表达式
571
+ * @en_US Determine whether the given value is a regular expression
572
+ */
553
573
  function XIsRegExp(value) {
554
574
  return IsRegExp(value);
555
575
  }
576
+ /**
577
+ * @zh_CN 判断给定的值是否为 undefined
578
+ * @en_US Determine whether the given value is undefined
579
+ */
556
580
  function XIsUndefined(value) {
557
581
  return typeof value === 'undefined';
558
582
  }
583
+ /**
584
+ * @zh_CN 判断给定的值是否为字符串、数字、布尔值或日期
585
+ * @en_US Determine whether the given value is a string, number, Boolean value or date
586
+ */
559
587
  function XIsValue(object) {
560
588
  return XIsString(object) || XIsNumber(object) || XIsBoolean(object) || XIsDate(object);
561
589
  }
590
+ /**
591
+ * @zh_CN 判断一个对象是否为空
592
+ * @en_US Determine whether an object is empty
593
+ */
562
594
  function XIsEmpty(object) {
563
- return XIsUndefined(object) || XIsNull(object) || object === '' || object.length === 0;
595
+ try {
596
+ return XIsUndefined(object) || XIsNull(object) || object === '' || object.length === 0;
597
+ }
598
+ catch (e) {
599
+ console.error(object, e);
600
+ }
601
+ return true;
564
602
  }
603
+ /**
604
+ * @zh_CN 判断给定的对象是否为非空数组
605
+ * @en_US Determine whether the given object is a non -empty array
606
+ */
565
607
  function XIsValueArray(object) {
566
608
  return XIsArray(object) && object.length > 0 && !XIsObject(object[0]);
567
609
  }
610
+ /**
611
+ * @zh_CN 判断给定的对象是否为非空对象数组
612
+ * @en_US Determine whether the given object is a non -empty object array
613
+ */
568
614
  function XIsObjectArray(object) {
569
615
  return XIsArray(object) && object.length > 0 && XIsObject(object[0]);
570
616
  }
617
+ /**
618
+ * @zh_CN 判断给定的对象是否为 Observable
619
+ * @en_US Determine whether the given object is observable
620
+ */
571
621
  function XIsObservable(object) {
572
622
  return isObservable(object);
573
623
  }
624
+ /**
625
+ * @zh_CN 判断给定的对象是否为 TemplateRef
626
+ * @en_US Determine whether the given object is TemplateRef
627
+ */
574
628
  function XIsTemplateRef(object) {
575
629
  if (!XIsEmpty(object) && object.elementRef)
576
630
  return true;
577
631
  else
578
632
  return false;
579
633
  }
634
+ /**
635
+ * @zh_CN 判断给定的对象是否为 XTemplateRef
636
+ * @en_US Determine whether the given object is XTemplateRef
637
+ */
580
638
  function XIsXTemplate(object) {
581
639
  return XIsString(object) || XIsNumber(object) || XIsDate(object) || XIsTemplateRef(object);
582
640
  }
641
+ /**
642
+ * @zh_CN 判断给定的对象是否为 InputSignal
643
+ * @en_US Determine whether a given object for InputSignal
644
+ */
645
+ function XIsInputSignal(object) {
646
+ return XIsFunction(object) && object.name === 'inputValueFn';
647
+ }
583
648
 
584
- // 标识对象
649
+ /**
650
+ * @zh_CN 标识对象
651
+ * @en_US Identify object
652
+ */
585
653
  class XIdentity {
586
654
  }
587
655
 
656
+ /**
657
+ * @zh_CN 转换 value 为 boolean 值
658
+ * @en_US Convert the value to boolean value
659
+ */
588
660
  function XToBoolean(value) {
589
- // if (XIsString(value)) {
590
- // return ['', 'true'].indexOf(String(value).trim()) !== -1;
591
- // } else {
592
- // return Boolean(value);
593
- // }
594
- return coerceBooleanProperty(value);
661
+ return booleanAttribute(value);
595
662
  }
596
- function XToNumber(value, fallbackValue = 0) {
597
- return _isNumberValue(value) ? Number(value) : fallbackValue;
663
+ /**
664
+ * @zh_CN 转换 value 为像素值
665
+ * @en_US Convert the value to pixels
666
+ */
667
+ function XToCssPixelValue(value) {
668
+ if (!XIsNumber(value) && /^\d+(\.\d+)?$/.test(value)) {
669
+ return coerceCssPixelValue(Number(value));
670
+ }
671
+ else {
672
+ return coerceCssPixelValue(value);
673
+ }
674
+ }
675
+ function XToString(value) {
676
+ return `${value}`;
598
677
  }
678
+ function XToNumber(value, fallbackValue) {
679
+ return numberAttribute(value, fallbackValue);
680
+ }
681
+ /**
682
+ * @zh_CN 转换 value 为指定的 list 数据 [{ label: any; id: any }, ....]
683
+ * @en_US Convert value as the specified list data [{ label: any; id: any }, ....]
684
+ */
599
685
  function XToDataConvert(value) {
600
686
  if (XIsArray(value)) {
601
687
  return value.map((x) => {
@@ -612,6 +698,30 @@ function XToDataConvert(value) {
612
698
  }
613
699
  return value;
614
700
  }
701
+ /**
702
+ * @zh_CN 转换 value 为指定的 list 数据 [{ label: any; id: any }, ....]
703
+ * @en_US Convert value as the specified list data [{ label: any; id: any }, ....]
704
+ */
705
+ function XToDataArray(value) {
706
+ if (XIsArray(value)) {
707
+ return value.map((x) => {
708
+ if (XIsValue(x)) {
709
+ return { label: x, id: x };
710
+ }
711
+ else if (XIsObject(x)) {
712
+ x.label = XIsUndefined(x.label) || XIsNull(x.label) ? x.id : x.label;
713
+ x.id = XIsUndefined(x.id) || XIsNull(x.id) ? x.label : x.id;
714
+ return x;
715
+ }
716
+ return x;
717
+ });
718
+ }
719
+ return [{ label: value, id: value }];
720
+ }
721
+ /**
722
+ * @zh_CN 根据 data 的类型获取实际的数据
723
+ * @en_US Obtain actual data based on the type of data
724
+ */
615
725
  function XSetData(data, unSubject, toConvert = true, funcParam = null) {
616
726
  return new Observable((x) => {
617
727
  const result = (res) => {
@@ -640,8 +750,12 @@ function XSetData(data, unSubject, toConvert = true, funcParam = null) {
640
750
  result((toConvert ? XToDataConvert(data) : data));
641
751
  }
642
752
  }
643
- });
753
+ }).pipe(takeUntil(unSubject));
644
754
  }
755
+ /**
756
+ * @zh_CN 根据 id、pid 获取子节点
757
+ * @en_US Obtain sub-nodes based on ID and PID
758
+ */
645
759
  function XGetChildren(nodes, node, level) {
646
760
  node.level = level;
647
761
  node.children = nodes.filter((y) => y.pid === node.id);
@@ -650,12 +764,20 @@ function XGetChildren(nodes, node, level) {
650
764
  node.children.map((y) => XGetChildren(nodes, y, level + 1));
651
765
  return node;
652
766
  }
767
+ /**
768
+ * @zh_CN 将对象键值对反转
769
+ * @en_US Reversal the key value of the object
770
+ */
653
771
  function XInvertKeyValues(obj) {
654
772
  return Object.keys(obj).reduce((nw, key) => {
655
773
  nw.set(obj[key], key);
656
774
  return nw;
657
775
  }, new Map());
658
776
  }
777
+ /**
778
+ * @zh_CN 设置样式名称为 false
779
+ * @en_US Set style name is false
780
+ */
659
781
  function XClearClass(...classMaps) {
660
782
  classMaps.forEach((classMap) => {
661
783
  for (const key in classMap) {
@@ -663,6 +785,23 @@ function XClearClass(...classMaps) {
663
785
  }
664
786
  });
665
787
  }
788
+ /**
789
+ * @zh_CN 设置样式名称为 false
790
+ * @en_US Set style name is false
791
+ */
792
+ function XClearClassSignal(...classMaps) {
793
+ classMaps.forEach((classMap) => {
794
+ const value = classMap();
795
+ for (const key in value) {
796
+ value[key] = false;
797
+ }
798
+ classMap.set(value);
799
+ });
800
+ }
801
+ /**
802
+ * @zh_CN 创建属性装饰器的工厂函数
803
+ * @en_US Factory functions that create attribute decorators
804
+ */
666
805
  function propDecoratorFactory(name, fallback) {
667
806
  function propDecorator(target, propName, originalDescriptor) {
668
807
  const privatePropName = `$$__${propName}`;
@@ -675,7 +814,9 @@ function propDecoratorFactory(name, fallback) {
675
814
  });
676
815
  return {
677
816
  get() {
678
- return originalDescriptor && originalDescriptor.get ? originalDescriptor.get.bind(this)() : this[privatePropName];
817
+ return originalDescriptor && originalDescriptor.get
818
+ ? originalDescriptor.get.bind(this)()
819
+ : this[privatePropName];
679
820
  },
680
821
  set(value) {
681
822
  if (originalDescriptor && originalDescriptor.set) {
@@ -687,19 +828,46 @@ function propDecoratorFactory(name, fallback) {
687
828
  }
688
829
  return propDecorator;
689
830
  }
831
+ /**
832
+ * @zh_CN 创建 XInputBoolean 属性装饰器
833
+ * @en_US Create XInputBoolean Properties
834
+ */
690
835
  function XInputBoolean() {
691
836
  return propDecoratorFactory('XInputBoolean', XToBoolean);
692
837
  }
838
+ /**
839
+ * @zh_CN 创建 XInputNumber 属性装饰器
840
+ * @en_US Create XInputNumber Properties
841
+ */
693
842
  function XInputNumber() {
694
843
  return propDecoratorFactory('XInputNumber', XToNumber);
695
844
  }
845
+ /**
846
+ * @zh_CN 创建 XInputNumber 属性装饰器
847
+ * @en_US Create XInputNumber Properties
848
+ */
849
+ function XInputCssPixelValue() {
850
+ return propDecoratorFactory('XInputCssPixelValue', XToCssPixelValue);
851
+ }
852
+ /**
853
+ * @zh_CN 创建 XDataConvert 属性装饰器
854
+ * @en_US Create XDataConvert Properties
855
+ */
696
856
  function XDataConvert() {
697
857
  return propDecoratorFactory('XDataConvert', XToDataConvert);
698
858
  }
859
+ /**
860
+ * @zh_CN 限制给定数值 value 的范围
861
+ * @en_US Limit the range of the given value value
862
+ */
699
863
  function XClamp(value, min, max) {
700
864
  return Math.max(min, Math.min(max, value));
701
865
  }
702
866
 
867
+ /**
868
+ * @zh_CN 转换 Date
869
+ * @en_US Convert to date
870
+ */
703
871
  function XToDate(date) {
704
872
  if (XIsDate(date) || XIsNumber(date)) {
705
873
  return new Date(date);
@@ -708,6 +876,10 @@ function XToDate(date) {
708
876
  return new Date(Date.parse(date));
709
877
  }
710
878
  }
879
+ /**
880
+ * @zh_CN 日期添加毫秒数,负数为减少
881
+ * @en_US Add milliseconds to the date, the negative number is reduced
882
+ */
711
883
  function XAddMilliseconds(date, amount) {
712
884
  let dt = XToDate(date);
713
885
  if (!isNaN(dt.valueOf()) && amount) {
@@ -717,15 +889,31 @@ function XAddMilliseconds(date, amount) {
717
889
  return date;
718
890
  }
719
891
  }
892
+ /**
893
+ * @zh_CN 日期添加秒数,负数为减少
894
+ * @en_US Date adds seconds, the negative number is reduced
895
+ */
720
896
  function XAddSeconds(date, amount) {
721
897
  return XAddMilliseconds(date, amount * 1000);
722
898
  }
899
+ /**
900
+ * @zh_CN 日期添加分钟数,负数为减少
901
+ * @en_US Date adds minutes, the negative number is reduced
902
+ */
723
903
  function XAddMinutes(date, amount) {
724
904
  return XAddMilliseconds(date, amount * 60000);
725
905
  }
726
- function XAddHours(date, amount) {
906
+ /**
907
+ * @zh_CN 日期添加小时数,负数为减少
908
+ * @en_US Date adds hours, the negative number is reduced
909
+ */
910
+ function XAddHours(date, amount) {
727
911
  return XAddMilliseconds(date, amount * 3600000);
728
912
  }
913
+ /**
914
+ * @zh_CN 日期添加天数,负数为减少
915
+ * @en_US Date adds days, the negative number is reduced
916
+ */
729
917
  function XAddDays(date, amount) {
730
918
  let dt = XToDate(date);
731
919
  if (!isNaN(dt.valueOf()) && amount) {
@@ -736,6 +924,10 @@ function XAddDays(date, amount) {
736
924
  return date;
737
925
  }
738
926
  }
927
+ /**
928
+ * @zh_CN 日期添加月数,负数为减少
929
+ * @en_US Date adds monthly number, negative number is reduced
930
+ */
739
931
  function XAddMonths(date, amount) {
740
932
  let dt = XToDate(date);
741
933
  if (!isNaN(dt.valueOf()) && amount) {
@@ -756,9 +948,17 @@ function XAddMonths(date, amount) {
756
948
  return date;
757
949
  }
758
950
  }
951
+ /**
952
+ * @zh_CN 日期添加年数,负数为减少
953
+ * @en_US The number of years of date, the negative number is reduced
954
+ */
759
955
  function XAddYears(date, amount) {
760
956
  return XAddMonths(date, amount * 12);
761
957
  }
958
+ /**
959
+ * @zh_CN 获取给定日期的 ISO 周数
960
+ * @en_US Get the number of ISO weeks of the given date
961
+ */
762
962
  function XDateWeek(date) {
763
963
  let dt = XToDate(date);
764
964
  if (!isNaN(dt.valueOf())) {
@@ -766,6 +966,10 @@ function XDateWeek(date) {
766
966
  }
767
967
  return;
768
968
  }
969
+ /**
970
+ * @zh_CN 获取指定日期的 ISO 周年份
971
+ * @en_US Get the ISO anniversary of the specified date
972
+ */
769
973
  function XDateWeekYear(date) {
770
974
  let dt = XToDate(date);
771
975
  if (!isNaN(dt.valueOf())) {
@@ -773,34 +977,58 @@ function XDateWeekYear(date) {
773
977
  }
774
978
  return;
775
979
  }
980
+ /**
981
+ * @zh_CN 获取指定日期的年份和周数
982
+ * @en_US Get the year and week of the specified date
983
+ */
776
984
  function XDateYearWeek(date) {
777
985
  let dt = XToDate(date);
778
986
  if (!isNaN(dt.valueOf())) {
779
987
  return `${getISOWeekYear(dt)}-${getISOWeek(dt)}`;
780
988
  }
781
- return;
989
+ return '';
782
990
  }
991
+ /**
992
+ * @zh_CN 获取指定日期的年份和季度
993
+ * @en_US Get the year and quarter of the specified date
994
+ */
783
995
  function XDateYearQuarter(date) {
784
996
  let dt = XToDate(date);
785
997
  if (!isNaN(dt.valueOf())) {
786
998
  return `${dt.getFullYear()}-${XDateQuarter(dt)}`;
787
999
  }
788
- return;
1000
+ return '';
789
1001
  }
1002
+ /**
1003
+ * @zh_CN 获取指定日期所属的季度
1004
+ * @en_US Get the season when the specified date belongs
1005
+ */
790
1006
  function XDateQuarter(date) {
791
1007
  let dt = XToDate(date);
792
1008
  if (!isNaN(dt.valueOf())) {
793
1009
  return `Q${Math.ceil((dt.getMonth() + 1) / 3)}`;
794
1010
  }
795
- return;
1011
+ return '';
796
1012
  }
1013
+ /**
1014
+ * @zh_CN 获取给定日期的 ISO 周数
1015
+ * @en_US Get the number of ISO weeks of the given date
1016
+ */
797
1017
  function getISOWeek(date) {
798
1018
  const diff = startOfISOWeek(date).getTime() - startOfISOWeekYear(date).getTime();
799
1019
  return Math.round(diff / 604800000) + 1;
800
1020
  }
1021
+ /**
1022
+ * @zh_CN 获取给定日期所在 ISO 周的开始日期
1023
+ * @en_US The start date of the ISO week where the given date is located
1024
+ */
801
1025
  function startOfISOWeek(date) {
802
1026
  return startOfWeek(date, { weekStartsOn: 1 });
803
1027
  }
1028
+ /**
1029
+ * @zh_CN 获取给定日期所在周的开始日期
1030
+ * @en_US The start date of the ISO week where the given date is located
1031
+ */
804
1032
  function startOfWeek(date, options) {
805
1033
  const weekStartsOn = options?.weekStartsOn || 0;
806
1034
  const day = date.getDay();
@@ -809,6 +1037,10 @@ function startOfWeek(date, options) {
809
1037
  date.setHours(0, 0, 0, 0);
810
1038
  return date;
811
1039
  }
1040
+ /**
1041
+ * @zh_CN 获取给定日期所在 ISO 周年的起始日期
1042
+ * @en_US The start date of the ISO anniversary where the given date is located
1043
+ */
812
1044
  function startOfISOWeekYear(date) {
813
1045
  const year = getISOWeekYear(date);
814
1046
  const fourthOfJanuary = constructFrom(date, 0);
@@ -817,6 +1049,10 @@ function startOfISOWeekYear(date) {
817
1049
  const result = startOfISOWeek(fourthOfJanuary);
818
1050
  return result;
819
1051
  }
1052
+ /**
1053
+ * @zh_CN 返回一个与传入的 date 参数类型相同的对象
1054
+ * @en_US Return to an object of the same type of Date parameter.
1055
+ */
820
1056
  function constructFrom(date, value) {
821
1057
  if (date instanceof Date) {
822
1058
  return new date.constructor(value);
@@ -825,6 +1061,10 @@ function constructFrom(date, value) {
825
1061
  return new Date(value);
826
1062
  }
827
1063
  }
1064
+ /**
1065
+ * @zh_CN 获取给定日期的 ISO 周年份
1066
+ * @en_US Obtain the ISO anniversary of the given date
1067
+ */
828
1068
  function getISOWeekYear(date) {
829
1069
  const year = date.getFullYear();
830
1070
  const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
@@ -846,6 +1086,10 @@ function getISOWeekYear(date) {
846
1086
  }
847
1087
  }
848
1088
 
1089
+ /**
1090
+ * @zh_CN 用于设置元素的 flex 样式
1091
+ * @en_US Flex style for setting elements
1092
+ */
849
1093
  function XSetFlex(ele, renderer, justify, align, direction) {
850
1094
  let result = [];
851
1095
  if (!XIsEmpty(justify)) {
@@ -866,6 +1110,18 @@ function XSetFlex(ele, renderer, justify, align, direction) {
866
1110
  return result;
867
1111
  }
868
1112
 
1113
+ /**
1114
+ * @zh_CN 通过参数 n 来截取数组
1115
+ * 如果 n 未定义或为 0,则返回与原数组相同的数组
1116
+ * 如果原数组长度小于 1 或小于等于 n 的绝对值,则返回一个空数组
1117
+ * 如果 n 大于 0,则截取从第 n 个元素开始到数组末尾的子数组
1118
+ * 如果 n 小于等于 0,则截取从第 0 个元素到倒数第 n 个元素
1119
+ * @en_US Send the array by parameter n
1120
+ * If n is not defined or 0, returns the same array as the original array
1121
+ * If the original array length is less than 1 or less than equal to N, return a empty array
1122
+ * If n is greater than 0, cut off the sub-array starting from the nn element to the end of the array
1123
+ * If n is less than or equal to 0, cut off from the 0th element to the countless nary element
1124
+ */
869
1125
  function XDrop(array, n) {
870
1126
  if (!n)
871
1127
  return [...array];
@@ -874,6 +1130,10 @@ function XDrop(array, n) {
874
1130
  return array.slice(n > 0 ? n : 0, n > 0 ? array.length : n);
875
1131
  }
876
1132
 
1133
+ /**
1134
+ * @zh_CN 从数组中移除满足条件的元素,并返回被移除的元素组成的数组
1135
+ * @en_US Remove elements that meet the conditions from the array and return the array of the removal element
1136
+ */
877
1137
  function XRemove(array, predicate) {
878
1138
  if (typeof predicate === 'undefined')
879
1139
  return [];
@@ -889,6 +1149,10 @@ function XRemove(array, predicate) {
889
1149
  return result;
890
1150
  }
891
1151
 
1152
+ /**
1153
+ * @zh_CN 根据指定元素来排序
1154
+ * @en_US Sort by specified elements
1155
+ */
892
1156
  function XOrderBy(collection, iteratees, orders) {
893
1157
  if (!iteratees)
894
1158
  return collection;
@@ -941,6 +1205,22 @@ function XOrderBy(collection, iteratees, orders) {
941
1205
  return collection;
942
1206
  }
943
1207
 
1208
+ /**
1209
+ * @zh_CN 该函数是一个深拷贝函数,用于克隆一个对象或数组
1210
+ * 它会递归地复制对象的所有属性,包括嵌套对象和数组,生成一个全新的独立副本。
1211
+ * 对于非对象和非数组类型的值,直接返回该值。
1212
+ * 函数接受一个参数 value,表示需要进行深拷贝的值。
1213
+ * 首先创建一个空的结果对象 result,如果 value 是数组,则 result 也是一个空数组。
1214
+ * 遍历 value 的所有属性,如果属性是对象,则递归调用 XCloneDeep 函数进行深拷贝,并将结果赋值给 result 对应的属性。
1215
+ * 最后返回 result,即深拷贝后的对象或数组。
1216
+ * @en_US This function is a deep copy function that is used for a cloning object or array
1217
+ * It will recover all the attributes of the object, including nested objects and array, and generate a new independent copy.
1218
+ * For non object and non -array type values, return that value directly.
1219
+ * The function accepts a parameter Value, indicating that the value of deep copy needs to be performed.
1220
+ * First create a empty result object Result. If Value is an array, Result is also an empty array.
1221
+ * It traverses all the attributes of Value. If the attribute is an object, the recursively calls the XCLONEDEEP function for deep copy, and assign the result to the corresponding attributes corresponding to Result.
1222
+ * Finally return to Result, that is, the object or array after the deep copy.
1223
+ */
944
1224
  function XCloneDeep(value) {
945
1225
  let result = Array.isArray(value) ? [] : {};
946
1226
  if (value && typeof value === 'object') {
@@ -953,10 +1233,25 @@ function XCloneDeep(value) {
953
1233
  return result;
954
1234
  }
955
1235
 
1236
+ /**
1237
+ * @zh_CN 判断一个对象是否包含指定的属性
1238
+ * @en_US Determine whether an object contains the specified attribute
1239
+ */
956
1240
  function XHasIn(object, key) {
957
1241
  return object != null && key in Object(object);
958
1242
  }
959
1243
 
1244
+ /**
1245
+ * @zh_CN 该函数用于将给定的数组拆分成多个小数组
1246
+ * 每个小数组的长度由函数的第二个参数指定,默认为 1。
1247
+ * 如果给定的数组为空或者小数组长度小于等于 0,则函数返回一个空数组。
1248
+ * 函数通过循环遍历给定的数组,并使用 slice 方法将数组拆分成小数组,然后将小数组添加到结果数组中,最后返回结果数组。
1249
+ * @en_US This function is used to split the given array into multiple decimal arrays
1250
+ * The length of each decimal array is specified by the second parameter of the function, and the default is 1.
1251
+ * If the given array is empty or the length of the decimal array is less than equal to 0, the function returns a empty array.
1252
+ * The function traverses the given array by circulating, and uses the Slice method to split the array into a decimal array,
1253
+ * then add the decimal array to the result array, and finally return the result array.
1254
+ */
960
1255
  function XChunk(array, size = 1) {
961
1256
  const len = array == null ? 0 : array.length;
962
1257
  if (!len || size < 1) {
@@ -972,7 +1267,8 @@ function XChunk(array, size = 1) {
972
1267
  }
973
1268
 
974
1269
  /**
975
- * 生成 GUID
1270
+ * @zh_CN 生成 GUID
1271
+ * @en_US GUID
976
1272
  */
977
1273
  function XGuid() {
978
1274
  let S4 = () => {
@@ -981,6 +1277,10 @@ function XGuid() {
981
1277
  return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4();
982
1278
  }
983
1279
 
1280
+ /**
1281
+ * @zh_CN 根据属性 name 来对数组分组
1282
+ * @en_US Based on the array according to the attribute name
1283
+ */
984
1284
  function XGroupBy(array, name) {
985
1285
  const groups = {};
986
1286
  array.forEach((obj) => {
@@ -991,7 +1291,11 @@ function XGroupBy(array, name) {
991
1291
  return Object.keys(groups).map((group) => groups[group]);
992
1292
  }
993
1293
 
994
- const XResize = (...element) => {
1294
+ /**
1295
+ * @zh_CN 这个函数的功能是创建一个Observable,用于监听多个元素的尺寸变化
1296
+ * @en_US The function of this function is to create an Observable to monitor the size changes of multiple elements.
1297
+ */
1298
+ function XResize(...element) {
995
1299
  return new Observable((x) => {
996
1300
  if (typeof ResizeObserver !== 'function') {
997
1301
  return;
@@ -1005,11 +1309,13 @@ const XResize = (...element) => {
1005
1309
  if (ele)
1006
1310
  resizeObserver.observe(ele);
1007
1311
  }
1008
- //XResize 取消订阅的时候自动销毁
1009
- //resizeObserver.disconnect();
1010
1312
  });
1011
- };
1313
+ }
1012
1314
 
1315
+ /**
1316
+ * @zh_CN 获取元素的父节点路径
1317
+ * @en_US The parent node of the element
1318
+ */
1013
1319
  function XParentPath(ele) {
1014
1320
  let path = [];
1015
1321
  let nowEle = ele;
@@ -1019,6 +1325,10 @@ function XParentPath(ele) {
1019
1325
  }
1020
1326
  return path;
1021
1327
  }
1328
+ /**
1329
+ * @zh_CN 获取元素的父元素路径
1330
+ * @en_US The parent element path of obtaining elements
1331
+ */
1022
1332
  function XParents(ele) {
1023
1333
  let res = [];
1024
1334
  let nowEle = ele;
@@ -1029,436 +1339,202 @@ function XParents(ele) {
1029
1339
  return res;
1030
1340
  }
1031
1341
 
1032
- /**
1033
- * 组件公共属性
1034
- */
1035
- class XProperty {
1036
- constructor() {
1037
- /**
1038
- * 样式映射属性
1039
- */
1040
- this.classMap = {};
1041
- }
1042
- }
1342
+ const X_CONFIG = new InjectionToken('x-config');
1043
1343
 
1044
- // @dynamic
1045
- class XReuseStrategyService {
1046
- // 存储的复用路由
1047
- static { this.storages = []; }
1048
- /**
1049
- * 表示对所有路由允许复用 如果你有路由不想利用可以在这加一些业务逻辑判断
1050
- */
1051
- shouldDetach(_route) {
1052
- return true;
1053
- }
1054
- /**
1055
- * 当路由离开时会触发。按path作为key存储路由快照&组件当前实例对象
1056
- */
1057
- store(route, handle) {
1058
- if (handle == null)
1059
- return;
1060
- if (XReuseStrategyService.waitDelete && this.getRouteUrl(route).indexOf(XReuseStrategyService.waitDelete) == 0) {
1061
- //如果待删除是当前路由则不存储快照
1062
- XReuseStrategyService.waitDelete = null;
1063
- return;
1064
- }
1065
- this.add(this.getRouteUrl(route), handle);
1066
- }
1067
- /**
1068
- * 若 path 在缓存中有的都认为允许还原路由
1069
- */
1070
- shouldAttach(route) {
1071
- return !!XReuseStrategyService.storages.find((x) => x.id == this.getRouteUrl(route));
1344
+ const X_THEME = new InjectionToken('xTheme');
1345
+ const X_THEME_PREFIX = '--x-';
1346
+ const X_THEME_MERGE = '#ffffff';
1347
+ const X_THEME_BLACK_MERGE = '#cccccc';
1348
+ const X_THEME_AMOUNTS = [
1349
+ 0, -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
1350
+ ];
1351
+ const X_THEME_BACKGROUNDS = [-0.2, -0.3, -0.4];
1352
+ const X_THEME_TEXTS = [
1353
+ [-0.5, 0],
1354
+ [-0.6, 0.2],
1355
+ [-0.7, 0.4]
1356
+ ];
1357
+ const X_THEME_BORDERS = [
1358
+ [-0.8, 0],
1359
+ [-0.9, 0.2]
1360
+ ];
1361
+ const X_THEME_EXCHANGES = [
1362
+ [-0.1, -0.1],
1363
+ [0.1, -0.1],
1364
+ [0.2, 0.2],
1365
+ [0.3, 0],
1366
+ [0.4, -0.4],
1367
+ [0.5, -0.2],
1368
+ [0.6, 0],
1369
+ [0.7, -0.4],
1370
+ [0.8, -0.4],
1371
+ [0.9, -0.2]
1372
+ ];
1373
+ const X_THEME_LIGHT_COLORS = {
1374
+ text: '#333333',
1375
+ border: '#efefef',
1376
+ background: '#ffffff'
1377
+ };
1378
+ const X_THEME_DARK_COLORS = {
1379
+ text: '#dddddd',
1380
+ border: '#252022',
1381
+ background: '#0f0f11'
1382
+ };
1383
+ const X_THEME_COLORS = {
1384
+ primary: '#3B82F6',
1385
+ success: '#67c23a',
1386
+ warning: '#e6a23c',
1387
+ danger: '#f56c6c',
1388
+ info: '#909399',
1389
+ ...X_THEME_LIGHT_COLORS
1390
+ };
1391
+ const X_THEME_VARS = {
1392
+ black: '#000000',
1393
+ white: '#ffffff',
1394
+ fontSize: '0.875rem',
1395
+ fontSizeMini: '0.75rem',
1396
+ fontSizeSmall: '0.875rem',
1397
+ fontSizeMedium: '1rem',
1398
+ fontSizeLarge: '1.25rem',
1399
+ fontSizeBig: '1.5rem',
1400
+ fontVariant: 'tabular-nums',
1401
+ fontFamily: '-appleSystem, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sansSerif',
1402
+ fontCodeFamily: 'SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace',
1403
+ lineHeight: '1.75rem',
1404
+ heightBig: '2.75rem',
1405
+ heightLarge: '2.5rem',
1406
+ heightMedium: '2.25rem',
1407
+ heightSmall: '2rem',
1408
+ heightMini: '1.75rem',
1409
+ paddingBig: '1.5rem',
1410
+ paddingLarge: '1.25rem',
1411
+ paddingMedium: '1rem',
1412
+ paddingSmall: '0.75rem',
1413
+ paddingMini: '0.5rem',
1414
+ borderStyle: 'solid',
1415
+ borderRadius: '0.75rem',
1416
+ borderSmallRadius: '0.5rem',
1417
+ borderWidth: '0.0625rem',
1418
+ borderDeepWidth: '0.125rem',
1419
+ boxShadow: '0 0.0625rem 0.25rem 0.0625rem rgba(0, 0, 0, 0.15)',
1420
+ boxShadowHover: '0 0.0625rem 0.25rem 0.0625rem rgba(0, 0, 0, 0.3)',
1421
+ boxShadowTop: '0 -0.0625rem 0.25rem rgba(0, 0, 0, 0.15)',
1422
+ boxShadowRight: '0.0625rem 0 0.25rem rgba(0, 0, 0, 0.15)',
1423
+ boxShadowBottom: '0 0.0625rem 0.25rem rgba(0, 0, 0, 0.15)',
1424
+ boxShadowLeft: '-0.0625rem 0 0.25rem rgba(0, 0, 0, 0.15)',
1425
+ animationDurationSlow: '0.3s',
1426
+ animationDurationBase: '0.2s',
1427
+ animationDurationFast: '0.1s'
1428
+ };
1429
+ const X_THEME_COLOR_KEYS = Object.keys(X_THEME_COLORS);
1430
+ const X_THEME_VARS_KEYS = Object.keys(X_THEME_VARS);
1431
+
1432
+ class XThemeService {
1433
+ constructor(factory) {
1434
+ this.factory = factory;
1435
+ this.colorsProp = {};
1436
+ this.varsProp = {};
1437
+ this.doc = inject(DOCUMENT);
1438
+ this.changed = new BehaviorSubject('light');
1439
+ this.renderer2 = this.factory.createRenderer(null, null);
1440
+ this.declaration = XComputed(this.doc.documentElement);
1072
1441
  }
1073
- /**
1074
- * 从缓存中获取快照,若无则返回nul
1075
- */
1076
- retrieve(route) {
1077
- if (!route.routeConfig) {
1078
- return {};
1079
- }
1080
- let stroage = XReuseStrategyService.storages.find((x) => x.id == this.getRouteUrl(route));
1081
- return stroage ? stroage.handle : {};
1442
+ setInitialTheme(theme) {
1443
+ this.setVars(theme?.vars);
1444
+ if (theme?.vars)
1445
+ Object.assign(X_THEME_VARS, theme.vars);
1446
+ this.setColors(theme?.colors);
1447
+ if (theme?.colors)
1448
+ Object.assign(X_THEME_COLORS, theme.colors);
1082
1449
  }
1083
- /**
1084
- * 进入路由触发,判断是否同一路由
1085
- * 解决不同的参数也会认为是同一个路由,导致会将之前的路由拿出来复用
1086
- */
1087
- shouldReuseRoute(future, curr) {
1088
- return future.routeConfig === curr.routeConfig && JSON.stringify(future.params) == JSON.stringify(curr.params);
1450
+ setTheme(theme) {
1451
+ this.setColors(theme?.colors);
1452
+ this.setVars(theme?.vars);
1453
+ this.setDark(theme?.dark);
1089
1454
  }
1090
- /**
1091
- * 解决不同的主路由会存在相同名称的子路由
1092
- */
1093
- getRouteUrl(route) {
1094
- let url = route.url.map((x) => x.path).join('_');
1095
- return url;
1455
+ getTheme(includesAll = false) {
1456
+ return {
1457
+ colors: this.getColors(includesAll),
1458
+ vars: this.getVars()
1459
+ };
1096
1460
  }
1097
- /**
1098
- * 删除复用的路由
1099
- */
1100
- static deleteRouteSnapshot(name) {
1101
- if (name) {
1102
- let id = name.replace(/\//g, '_');
1103
- XReuseStrategyService.storages.splice(XReuseStrategyService.storages.findIndex((x) => x.id.indexOf(id) === 0), 1);
1104
- XReuseStrategyService.waitDelete = id;
1105
- }
1106
- else {
1107
- XReuseStrategyService.storages = [];
1461
+ setColors(colors) {
1462
+ colors = this.getColorsTheme(colors);
1463
+ for (let key in colors) {
1464
+ Object.assign(this.colorsProp, this.setColorRoot(key, colors[key]));
1108
1465
  }
1466
+ this.createColorsStyle();
1109
1467
  }
1110
- add(id, handle) {
1111
- XReuseStrategyService.storages.splice(XReuseStrategyService.storages.findIndex((x) => x.id == id), 1);
1112
- XReuseStrategyService.storages = [...XReuseStrategyService.storages, { id: id, handle: handle }];
1113
- }
1114
- }
1115
-
1116
- // @dynamic
1117
- class XPreloadingStrategyService {
1118
- constructor() {
1119
- // 需要预加载的模块
1120
- this.preloadedModules = [];
1121
- }
1122
- preload(route, load) {
1123
- if (route.data && route.data['preload']) {
1124
- this.preloadedModules.push(route.path);
1125
- return load();
1468
+ setDark(dark) {
1469
+ const colors = this.getColors();
1470
+ if (dark === true) {
1471
+ Object.assign(colors, X_THEME_DARK_COLORS);
1472
+ this.setDarkColors(colors);
1473
+ this.changed.next('dark');
1126
1474
  }
1127
- else {
1128
- return of(null);
1475
+ else if (dark === false) {
1476
+ Object.assign(colors, X_THEME_LIGHT_COLORS);
1477
+ this.setColors(colors);
1478
+ this.changed.next('light');
1129
1479
  }
1480
+ return colors;
1130
1481
  }
1131
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XPreloadingStrategyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1132
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XPreloadingStrategyService, providedIn: 'root' }); }
1133
- }
1134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XPreloadingStrategyService, decorators: [{
1135
- type: Injectable,
1136
- args: [{ providedIn: 'root' }]
1137
- }] });
1138
-
1139
- // @dynamic
1140
- class XHttpService {
1141
- constructor(http) {
1142
- this.http = http;
1143
- this.api = '';
1482
+ setDarkColors(colors) {
1483
+ this.colorsProp = this.getDefineColors(colors, X_THEME_PREFIX, true);
1484
+ this.createColorsStyle();
1144
1485
  }
1145
- /**
1146
- * get请求
1147
- */
1148
- get(url, params) {
1149
- return this.request('GET', url, params);
1486
+ getColors(includes = false, prefix = X_THEME_PREFIX) {
1487
+ let result = {};
1488
+ const keys = includes ? Object.keys(this.colorsProp) : X_THEME_COLOR_KEYS.map((x) => `${prefix}${x}`);
1489
+ keys.forEach((x) => {
1490
+ result[x.replace(prefix, '')] = this.declaration.getPropertyValue(`${x}`).trim();
1491
+ });
1492
+ return result;
1150
1493
  }
1151
- /**
1152
- * get请求
1153
- */
1154
- post(url, params) {
1155
- return this.request('POST', url, params);
1494
+ getVars(prefix = X_THEME_PREFIX) {
1495
+ let result = {};
1496
+ const keys = Object.keys(this.varsProp);
1497
+ keys.forEach((x) => {
1498
+ result[XKebabToCamel(x.replace(prefix, ''))] = this.declaration.getPropertyValue(`${x}`).trim();
1499
+ });
1500
+ return result;
1156
1501
  }
1157
- /**
1158
- * put请求
1159
- */
1160
- put(url, params) {
1161
- return this.request('PUT', url, params);
1502
+ getColorsInProperty(colors, prefix = X_THEME_PREFIX) {
1503
+ let result = {};
1504
+ Object.keys(colors).forEach((x) => {
1505
+ result[x] = this.declaration.getPropertyValue(`${prefix}${x}`).trim();
1506
+ });
1507
+ return result;
1162
1508
  }
1163
- /**
1164
- * delete请求
1165
- */
1166
- delete(url, params) {
1167
- return this.request('DELETE', url, params);
1509
+ getColorsTheme(colors) {
1510
+ if (typeof colors === 'undefined')
1511
+ colors = X_THEME_COLORS;
1512
+ else
1513
+ colors = Object.assign({}, X_THEME_COLORS, colors);
1514
+ return colors;
1168
1515
  }
1169
- /**
1170
- * request通用请求
1171
- */
1172
- request(method, url, params, option) {
1173
- if (!option)
1174
- option = {};
1175
- let opt = {};
1176
- url = `${this.api}${url}`;
1177
- method = method.toUpperCase();
1178
- if (['POST', 'PUT', 'DELETE'].indexOf(method) > -1) {
1179
- opt = { body: params, observe: 'body', responseType: 'json' };
1516
+ setColorRoot(color, value, prefix = X_THEME_PREFIX) {
1517
+ let result = {};
1518
+ if (X_THEME_COLOR_KEYS.includes(color)) {
1519
+ for (let amount of X_THEME_AMOUNTS) {
1520
+ if (amount === 0) {
1521
+ result[`${prefix}${color}`] = value;
1522
+ }
1523
+ else {
1524
+ result[`${prefix}${color}${this.getSuffix(amount)}`] = XToHex(XMixColors(amount > 0 ? X_THEME_MERGE : X_THEME_BLACK_MERGE, value, Math.abs(amount)));
1525
+ }
1526
+ }
1180
1527
  }
1181
- else if (['GET'].indexOf(method) > -1) {
1182
- opt = { params: params };
1528
+ else {
1529
+ result[`${prefix}${color}`] = value;
1183
1530
  }
1184
- Object.assign(opt, option);
1185
- this.addHeader(opt);
1186
- return new Observable((x) => {
1187
- this.http.request(method, url, opt).subscribe((y) => {
1188
- x.next(y);
1189
- x.complete();
1190
- }, (y) => {
1191
- x.error(y);
1192
- x.complete();
1193
- this.handleError(y);
1194
- });
1195
- });
1531
+ return result;
1196
1532
  }
1197
- /**
1198
- * 错误处理
1199
- */
1200
- handleError(error) {
1201
- if (error.error) {
1202
- }
1203
- return throwError(error.error);
1204
- }
1205
- /**
1206
- * 添加头部信息
1207
- */
1208
- addHeader(_option) {
1209
- // let auth = this.setting.getSession("Auth");
1210
- // if (auth && auth["token"]) {
1211
- // option["headers"] = { Authorization: `Bearer ${auth["token"]}` };
1212
- // }
1213
- }
1214
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XHttpService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1215
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XHttpService, providedIn: 'root' }); }
1216
- }
1217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XHttpService, decorators: [{
1218
- type: Injectable,
1219
- args: [{ providedIn: 'root' }]
1220
- }], ctorParameters: () => [{ type: i1.HttpClient }] });
1221
-
1222
- // @dynamic
1223
- class XStorageService {
1224
- constructor(platform) {
1225
- this.platform = platform;
1226
- }
1227
- /**
1228
- * 获取本地值
1229
- */
1230
- getLocal(key) {
1231
- if (this.platform.isBrowser) {
1232
- let str = localStorage.getItem(key);
1233
- try {
1234
- return JSON.parse(localStorage.getItem(key) || 'null') || null;
1235
- }
1236
- catch (_e) {
1237
- return str;
1238
- }
1239
- }
1240
- else {
1241
- return null;
1242
- }
1243
- }
1244
- /**
1245
- * 设置本地值
1246
- */
1247
- setLocal(key, value) {
1248
- if (this.platform.isBrowser) {
1249
- if (XIsString(value)) {
1250
- localStorage.setItem(key, value);
1251
- }
1252
- else {
1253
- localStorage.setItem(key, JSON.stringify(value));
1254
- }
1255
- }
1256
- }
1257
- /**
1258
- * 获取当前会话的值
1259
- */
1260
- getSession(key) {
1261
- if (this.platform.isBrowser) {
1262
- let str = localStorage.getItem(key);
1263
- try {
1264
- return JSON.parse(sessionStorage.getItem(key) || 'null') || null;
1265
- }
1266
- catch (_e) {
1267
- return str;
1268
- }
1269
- }
1270
- else {
1271
- return null;
1272
- }
1273
- }
1274
- /**
1275
- * 设置当前会话值
1276
- */
1277
- setSession(key, value) {
1278
- if (this.platform.isBrowser) {
1279
- sessionStorage.setItem(key, JSON.stringify(value));
1280
- }
1281
- }
1282
- /**
1283
- * 移除本地值
1284
- */
1285
- removeLocal(key) {
1286
- if (this.platform.isBrowser) {
1287
- localStorage.removeItem(key);
1288
- }
1289
- }
1290
- /**
1291
- * 移除当前会话
1292
- */
1293
- removeSession(key) {
1294
- if (this.platform.isBrowser) {
1295
- sessionStorage.removeItem(key);
1296
- }
1297
- }
1298
- /**
1299
- * 生成guid
1300
- */
1301
- guid() {
1302
- let S4 = () => {
1303
- return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
1304
- };
1305
- return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4();
1306
- }
1307
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XStorageService, deps: [{ token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
1308
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XStorageService, providedIn: 'root' }); }
1309
- }
1310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XStorageService, decorators: [{
1311
- type: Injectable,
1312
- args: [{ providedIn: 'root' }]
1313
- }], ctorParameters: () => [{ type: i1$1.Platform }] });
1314
-
1315
- class XRepositoryAbstract {
1316
- }
1317
- class XRepositoryService extends XRepositoryAbstract {
1318
- constructor(http, input) {
1319
- super();
1320
- this.http = http;
1321
- this.input = input;
1322
- this.api = '';
1323
- this.api = typeof input.api !== 'undefined' ? input.api : '';
1324
- }
1325
- getList(index, size, query) {
1326
- index = index ? index : 1;
1327
- size = size ? size : 10;
1328
- return this.http.post(`${this.api}${this.input.controller.name}/${size}/${index}`, query);
1329
- }
1330
- get(id) {
1331
- return this.http.get(`${this.api}${this.input.controller.name}/${id}`);
1332
- }
1333
- post(entity) {
1334
- return this.http.post(`${this.api}${this.input.controller.name}`, entity);
1335
- }
1336
- put(entity) {
1337
- return this.http.put(`${this.api}${this.input.controller.name}`, entity);
1338
- }
1339
- delete(id) {
1340
- return this.http.delete(`${this.api}${this.input.controller.name}/${id}`);
1341
- }
1342
- }
1343
-
1344
- const X_CONFIG = new InjectionToken('x-config');
1345
-
1346
- const X_THEME = new InjectionToken('x-theme');
1347
- const X_THEME_PREFIX = '--x-';
1348
- const X_THEME_MERGE = '#ffffff';
1349
- const X_THEME_BLACK_MERGE = '#cccccc';
1350
- const X_THEME_AMOUNTS = [0, -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];
1351
- const X_THEME_BACKGROUNDS = [-0.2, -0.3, -0.4];
1352
- const X_THEME_TEXTS = [
1353
- [-0.5, 0],
1354
- [-0.6, 0.2],
1355
- [-0.7, 0.4]
1356
- ];
1357
- const X_THEME_BORDERS = [
1358
- [-0.8, 0],
1359
- [-0.9, 0.2]
1360
- ];
1361
- const X_THEME_EXCHANGES = [
1362
- [-0.1, -0.1],
1363
- [0.1, -0.1],
1364
- [0.2, 0.2],
1365
- [0.3, 0],
1366
- [0.4, -0.4],
1367
- [0.5, -0.2],
1368
- [0.6, 0],
1369
- [0.7, -0.4],
1370
- [0.8, -0.4],
1371
- [0.9, -0.2]
1372
- ];
1373
- const X_THEME_COLORS = {
1374
- primary: '#1976d2',
1375
- success: '#67c23a',
1376
- warning: '#e6a23c',
1377
- danger: '#f56c6c',
1378
- info: '#909399',
1379
- text: '#333333',
1380
- border: '#dddddd',
1381
- background: '#ffffff'
1382
- };
1383
- const X_THEME_DARK_COLORS = {
1384
- text: '#dddddd',
1385
- border: '#424242',
1386
- background: '#1e1e1f'
1387
- };
1388
- const X_THEME_COLOR_KEYS = Object.keys(X_THEME_COLORS);
1389
-
1390
- class XThemeService {
1391
- constructor(factory) {
1392
- this.factory = factory;
1393
- this.colorsProp = {};
1394
- this.doc = inject(DOCUMENT);
1395
- this.renderer2 = this.factory.createRenderer(null, null);
1396
- this.declaration = XComputed(this.doc.documentElement);
1397
- }
1398
- setInitialTheme(theme) {
1399
- this.setColors(theme?.colors);
1400
- if (theme?.colors)
1401
- Object.assign(X_THEME_COLORS, theme.colors);
1402
- }
1403
- setTheme(theme) {
1404
- this.setColors(theme?.colors);
1405
- }
1406
- getTheme(includesAll = false) {
1407
- return {
1408
- colors: this.getColors(includesAll)
1409
- };
1410
- }
1411
- setColors(colors) {
1412
- colors = this.getColorsTheme(colors);
1413
- for (let key in colors) {
1414
- Object.assign(this.colorsProp, this.setRoot(key, colors[key]));
1415
- }
1416
- this.createColorsStyle();
1417
- }
1418
- getColors(includes = false, prefix = X_THEME_PREFIX) {
1419
- let result = {};
1420
- const keys = includes ? Object.keys(this.colorsProp) : X_THEME_COLOR_KEYS.map((x) => `${prefix}${x}`);
1421
- keys.forEach((x) => {
1422
- result[x.replace(prefix, '')] = this.declaration.getPropertyValue(`${x}`).trim();
1423
- });
1424
- return result;
1425
- }
1426
- getColorsInProperty(colors, prefix = X_THEME_PREFIX) {
1427
- let result = {};
1428
- Object.keys(colors).forEach((x) => {
1429
- result[x] = this.declaration.getPropertyValue(`${prefix}${x}`).trim();
1430
- });
1431
- return result;
1432
- }
1433
- getColorsTheme(colors) {
1434
- if (typeof colors === 'undefined')
1435
- colors = X_THEME_COLORS;
1436
- else
1437
- colors = Object.assign({}, X_THEME_COLORS, colors);
1438
- return colors;
1439
- }
1440
- setRoot(color, value, prefix = X_THEME_PREFIX) {
1533
+ setDarkColorRoot(color, value, prefix = X_THEME_PREFIX) {
1441
1534
  let result = {};
1535
+ let allColors = this.setColorRoot(color, value, '');
1442
1536
  if (X_THEME_COLOR_KEYS.includes(color)) {
1443
- for (let amount of X_THEME_AMOUNTS) {
1444
- if (amount === 0) {
1445
- result[`${prefix}${color}`] = value;
1446
- }
1447
- else {
1448
- result[`${prefix}${color}${this.getSuffix(amount)}`] = toHex(mixColors(amount > 0 ? X_THEME_MERGE : X_THEME_BLACK_MERGE, value, Math.abs(amount)));
1449
- }
1450
- }
1451
- }
1452
- else {
1453
- result[`${prefix}${color}`] = value;
1454
- }
1455
- return result;
1456
- }
1457
- setDarkRoot(color, value, prefix = X_THEME_PREFIX) {
1458
- let result = {};
1459
- const allColors = this.setRoot(color, value, '');
1460
- if (X_THEME_COLOR_KEYS.includes(color) && !['background'].includes(color)) {
1461
- const allColors = this.setRoot(color, value, prefix);
1537
+ allColors = this.setColorRoot(color, value, prefix);
1462
1538
  X_THEME_EXCHANGES.forEach((x) => {
1463
1539
  if (x[1] >= -0.1) {
1464
1540
  const curr = this.getSuffix(x[0]);
@@ -1476,7 +1552,7 @@ class XThemeService {
1476
1552
  let result = {};
1477
1553
  colors = this.getColorsTheme(colors);
1478
1554
  for (let key in colors) {
1479
- Object.assign(result, this.setRoot(key, colors[key], prefix));
1555
+ Object.assign(result, this.setColorRoot(key, colors[key], prefix));
1480
1556
  }
1481
1557
  if (darken) {
1482
1558
  const colorsFunc = (nums, callback) => {
@@ -1519,6 +1595,21 @@ class XThemeService {
1519
1595
  }
1520
1596
  return '';
1521
1597
  }
1598
+ setVarRoot(va, value, prefix = X_THEME_PREFIX) {
1599
+ let result = {};
1600
+ result[`${prefix}${XCamelToKebab(va)}`] = value;
1601
+ return result;
1602
+ }
1603
+ setVars(vars) {
1604
+ if (typeof vars === 'undefined')
1605
+ vars = X_THEME_VARS;
1606
+ else
1607
+ vars = Object.assign({}, X_THEME_VARS, vars);
1608
+ for (let key in vars) {
1609
+ Object.assign(this.varsProp, this.setVarRoot(key, vars[key]));
1610
+ }
1611
+ this.createVarsStyle();
1612
+ }
1522
1613
  createColorsStyle() {
1523
1614
  if (this.colorsStyleEle)
1524
1615
  this.renderer2.removeChild(this.colorsStyleEle.parentNode, this.colorsStyleEle);
@@ -1530,18 +1621,32 @@ class XThemeService {
1530
1621
  this.renderer2.addClass(this.doc.documentElement, 'x-theme-colors');
1531
1622
  this.doc.documentElement.getElementsByTagName('head')[0].appendChild(this.colorsStyleEle);
1532
1623
  }
1533
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XThemeService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
1534
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XThemeService, providedIn: 'root' }); }
1624
+ createVarsStyle() {
1625
+ if (this.varsStyleEle)
1626
+ this.renderer2.removeChild(this.varsStyleEle.parentNode, this.varsStyleEle);
1627
+ const styles = Object.entries(this.varsProp)
1628
+ .map((x) => `${x[0]}: ${x[1]};`)
1629
+ .join('');
1630
+ this.varsStyleEle = this.renderer2.createElement('style');
1631
+ this.varsStyleEle.innerHTML = `:root{${styles}}`;
1632
+ this.doc.documentElement.getElementsByTagName('head')[0].appendChild(this.varsStyleEle);
1633
+ }
1634
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XThemeService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
1635
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XThemeService, providedIn: 'root' }); }
1535
1636
  }
1536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XThemeService, decorators: [{
1637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XThemeService, decorators: [{
1537
1638
  type: Injectable,
1538
1639
  args: [{
1539
1640
  providedIn: 'root'
1540
1641
  }]
1541
1642
  }], ctorParameters: () => [{ type: i0.RendererFactory2 }] });
1542
- function mixColors(color1, color2, weight) {
1543
- let rgb1 = toRgb(color1);
1544
- let rgb2 = toRgb(color2);
1643
+ /**
1644
+ * @zh_CN 根据权重混合2种颜色
1645
+ * @en_US Mix 2 colors according to heavy weights
1646
+ */
1647
+ function XMixColors(color1, color2, weight) {
1648
+ let rgb1 = XToRgb(color1);
1649
+ let rgb2 = XToRgb(color2);
1545
1650
  let weight1 = weight;
1546
1651
  let weight2 = 1 - weight;
1547
1652
  let result;
@@ -1555,10 +1660,18 @@ function mixColors(color1, color2, weight) {
1555
1660
  };
1556
1661
  return result;
1557
1662
  }
1558
- function toHex(rgb) {
1663
+ /**
1664
+ * @zh_CN RGB 颜色转换为 Hex
1665
+ * @en_US RGB color converts to hex
1666
+ */
1667
+ function XToHex(rgb) {
1559
1668
  return '#' + ((1 << 24) + (rgb.r << 16) + (rgb.g << 8) + rgb.b).toString(16).slice(1);
1560
1669
  }
1561
- function toRgb(hex) {
1670
+ /**
1671
+ * @zh_CN Hex 颜色转换为 RGB
1672
+ * @en_US Hex color converts to RGB
1673
+ */
1674
+ function XToRgb(hex) {
1562
1675
  if (hex.indexOf('#') == 0)
1563
1676
  hex = hex.slice(1);
1564
1677
  let num = parseInt(hex, 16);
@@ -1580,10 +1693,6 @@ function toRgb(hex) {
1580
1693
  return { r: r, g: g, b: b };
1581
1694
  }
1582
1695
 
1583
- // tslint:disable no-any
1584
- const isDefined = function (value) {
1585
- return value !== undefined;
1586
- };
1587
1696
  class XConfigService {
1588
1697
  constructor() {
1589
1698
  this.componentConfigUpdated$ = new Subject();
@@ -1596,7 +1705,7 @@ class XConfigService {
1596
1705
  return this.config?.components ? this.config.components[componentName] : undefined;
1597
1706
  }
1598
1707
  getConfigChangeEventForComponent(componentName) {
1599
- return this.componentConfigUpdated$.pipe(filter((n) => n === componentName), mapTo(undefined));
1708
+ return this.componentConfigUpdated$.pipe(filter((n) => n === componentName), map(() => undefined));
1600
1709
  }
1601
1710
  set(componentName, value) {
1602
1711
  if (this.config?.components) {
@@ -1607,21 +1716,11 @@ class XConfigService {
1607
1716
  this.componentConfigUpdated$.next(componentName);
1608
1717
  }
1609
1718
  }
1610
- setDarkTheme(theme) {
1611
- let colors = theme?.colors;
1612
- if (!colors)
1613
- colors = X_THEME_DARK_COLORS;
1614
- this.setTheme({
1615
- colors: this.themeService.getDefineColors(Object.assign({}, this.themeService.getColorsInProperty(X_THEME_COLORS), colors), '', true)
1616
- });
1719
+ setDarkTheme() {
1720
+ return this.themeService.setDark(true);
1617
1721
  }
1618
- setLightTheme(theme) {
1619
- let colors = theme?.colors;
1620
- if (!colors)
1621
- colors = X_THEME_COLORS;
1622
- this.setTheme({
1623
- colors: this.themeService.getDefineColors(Object.assign({}, this.themeService.getColorsInProperty(X_THEME_COLORS), colors), '', false)
1624
- });
1722
+ setLightTheme() {
1723
+ return this.themeService.setDark(false);
1625
1724
  }
1626
1725
  setTheme(theme) {
1627
1726
  this.themeService.setTheme(theme);
@@ -1632,53 +1731,275 @@ class XConfigService {
1632
1731
  getTheme(includesAll = false) {
1633
1732
  return this.themeService.getTheme(includesAll);
1634
1733
  }
1635
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1636
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XConfigService, providedIn: 'root' }); }
1734
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1735
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XConfigService, providedIn: 'root' }); }
1637
1736
  }
1638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: XConfigService, decorators: [{
1737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XConfigService, decorators: [{
1639
1738
  type: Injectable,
1640
1739
  args: [{
1641
1740
  providedIn: 'root'
1642
1741
  }]
1643
1742
  }], ctorParameters: () => [] });
1644
- // tslint:disable-next-line:typedef
1645
- function XWithConfig(componentName, innerDefaultValue) {
1646
- return function ConfigDecorator(target, propName, originalDescriptor) {
1647
- const privatePropName = `$$__assignedValue__${propName}`;
1648
- Object.defineProperty(target, privatePropName, {
1649
- configurable: true,
1650
- writable: true,
1651
- enumerable: false
1743
+
1744
+ /**
1745
+ * @zh_CN 组件公共属性
1746
+ * @en_US Component of public properties
1747
+ */
1748
+ class XProperty {
1749
+ }
1750
+ /**
1751
+ * @zh_CN 组件公共属性,通过函数返回,注入全局配置
1752
+ * @en_US Component of public properties, through the function returns, into the global configuration
1753
+ */
1754
+ function XPropertyFunction(configName) {
1755
+ return class XPropertyFun {
1756
+ constructor() {
1757
+ this.config = inject(XConfigService).getConfigForComponent(configName);
1758
+ }
1759
+ };
1760
+ }
1761
+
1762
+ /**
1763
+ * @zh_CN 转换 csspx 为像素宽度
1764
+ * @en_US Convert CSS PX to pixel width
1765
+ */
1766
+ function XToCssPx(csspx, fontSize) {
1767
+ if (csspx === '0')
1768
+ return 0;
1769
+ if (XIsNumber(csspx))
1770
+ return Number(csspx);
1771
+ else if (csspx.endsWith('rem'))
1772
+ return Number(csspx.replace(/rem/g, '')) * fontSize;
1773
+ else if (csspx.endsWith('px'))
1774
+ return Number(csspx.replace(/px/g, ''));
1775
+ return 0;
1776
+ }
1777
+
1778
+ class XReuseStrategyService {
1779
+ static { this.storages = []; }
1780
+ shouldDetach(_route) {
1781
+ return true;
1782
+ }
1783
+ store(route, handle) {
1784
+ if (handle == null)
1785
+ return;
1786
+ if (XReuseStrategyService.waitDelete && this.getRouteUrl(route).indexOf(XReuseStrategyService.waitDelete) == 0) {
1787
+ XReuseStrategyService.waitDelete = null;
1788
+ return;
1789
+ }
1790
+ this.add(this.getRouteUrl(route), handle);
1791
+ }
1792
+ shouldAttach(route) {
1793
+ return !!XReuseStrategyService.storages.find((x) => x.id == this.getRouteUrl(route));
1794
+ }
1795
+ retrieve(route) {
1796
+ if (!route.routeConfig) {
1797
+ return {};
1798
+ }
1799
+ let stroage = XReuseStrategyService.storages.find((x) => x.id == this.getRouteUrl(route));
1800
+ return stroage ? stroage.handle : {};
1801
+ }
1802
+ shouldReuseRoute(future, curr) {
1803
+ return future.routeConfig === curr.routeConfig && JSON.stringify(future.params) == JSON.stringify(curr.params);
1804
+ }
1805
+ getRouteUrl(route) {
1806
+ let url = route.url.map((x) => x.path).join('_');
1807
+ return url;
1808
+ }
1809
+ static deleteRouteSnapshot(name) {
1810
+ if (name) {
1811
+ let id = name.replace(/\//g, '_');
1812
+ XReuseStrategyService.storages.splice(XReuseStrategyService.storages.findIndex((x) => x.id.indexOf(id) === 0), 1);
1813
+ XReuseStrategyService.waitDelete = id;
1814
+ }
1815
+ else {
1816
+ XReuseStrategyService.storages = [];
1817
+ }
1818
+ }
1819
+ add(id, handle) {
1820
+ XReuseStrategyService.storages.splice(XReuseStrategyService.storages.findIndex((x) => x.id == id), 1);
1821
+ XReuseStrategyService.storages = [...XReuseStrategyService.storages, { id: id, handle: handle }];
1822
+ }
1823
+ }
1824
+
1825
+ class XPreloadingStrategyService {
1826
+ constructor() {
1827
+ this.preloadedModules = [];
1828
+ }
1829
+ preload(route, load) {
1830
+ if (route.data && route.data['preload']) {
1831
+ this.preloadedModules.push(route.path);
1832
+ return load();
1833
+ }
1834
+ else {
1835
+ return of(null);
1836
+ }
1837
+ }
1838
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XPreloadingStrategyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1839
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XPreloadingStrategyService, providedIn: 'root' }); }
1840
+ }
1841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XPreloadingStrategyService, decorators: [{
1842
+ type: Injectable,
1843
+ args: [{ providedIn: 'root' }]
1844
+ }] });
1845
+
1846
+ class XHttpService {
1847
+ constructor(http) {
1848
+ this.http = http;
1849
+ this.api = '';
1850
+ }
1851
+ get(url, params) {
1852
+ return this.request('GET', url, params);
1853
+ }
1854
+ post(url, params) {
1855
+ return this.request('POST', url, params);
1856
+ }
1857
+ put(url, params) {
1858
+ return this.request('PUT', url, params);
1859
+ }
1860
+ delete(url, params) {
1861
+ return this.request('DELETE', url, params);
1862
+ }
1863
+ request(method, url, params, option) {
1864
+ if (!option)
1865
+ option = {};
1866
+ let opt = {};
1867
+ url = `${this.api}${url}`;
1868
+ method = method.toUpperCase();
1869
+ if (['POST', 'PUT', 'DELETE'].indexOf(method) > -1) {
1870
+ opt = { body: params, observe: 'body', responseType: 'json' };
1871
+ }
1872
+ else if (['GET'].indexOf(method) > -1) {
1873
+ opt = { params: params };
1874
+ }
1875
+ Object.assign(opt, option);
1876
+ return new Observable((x) => {
1877
+ this.http.request(method, url, opt).subscribe((y) => {
1878
+ x.next(y);
1879
+ x.complete();
1880
+ }, (y) => {
1881
+ x.error(y);
1882
+ x.complete();
1883
+ this.handleError(y);
1884
+ });
1652
1885
  });
1653
- return {
1654
- get() {
1655
- const originalValue = originalDescriptor && originalDescriptor.get
1656
- ? originalDescriptor.get.bind(this)()
1657
- : this[privatePropName];
1658
- if (isDefined(originalValue)) {
1659
- return originalValue;
1660
- }
1661
- const componentConfig = this.configService?.getConfigForComponent(componentName) || {};
1662
- const configValue = componentConfig[propName];
1663
- return isDefined(configValue) ? configValue : innerDefaultValue;
1664
- },
1665
- set(value) {
1666
- if (originalDescriptor && originalDescriptor.set) {
1667
- originalDescriptor.set.bind(this)(value);
1668
- }
1669
- else {
1670
- this[privatePropName] = value;
1671
- }
1672
- },
1673
- configurable: true,
1674
- enumerable: true
1886
+ }
1887
+ handleError(error) {
1888
+ if (error.error) {
1889
+ }
1890
+ return throwError(error.error);
1891
+ }
1892
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XHttpService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1893
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XHttpService, providedIn: 'root' }); }
1894
+ }
1895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XHttpService, decorators: [{
1896
+ type: Injectable,
1897
+ args: [{ providedIn: 'root' }]
1898
+ }], ctorParameters: () => [{ type: i1.HttpClient }] });
1899
+
1900
+ class XStorageService {
1901
+ constructor(platform) {
1902
+ this.platform = platform;
1903
+ }
1904
+ getLocal(key) {
1905
+ if (this.platform.isBrowser) {
1906
+ let str = localStorage.getItem(key);
1907
+ try {
1908
+ return JSON.parse(localStorage.getItem(key) || 'null') || null;
1909
+ }
1910
+ catch (_e) {
1911
+ return str;
1912
+ }
1913
+ }
1914
+ else {
1915
+ return null;
1916
+ }
1917
+ }
1918
+ setLocal(key, value) {
1919
+ if (this.platform.isBrowser) {
1920
+ if (XIsString(value)) {
1921
+ localStorage.setItem(key, value);
1922
+ }
1923
+ else {
1924
+ localStorage.setItem(key, JSON.stringify(value));
1925
+ }
1926
+ }
1927
+ }
1928
+ getSession(key) {
1929
+ if (this.platform.isBrowser) {
1930
+ let str = localStorage.getItem(key);
1931
+ try {
1932
+ return JSON.parse(sessionStorage.getItem(key) || 'null') || null;
1933
+ }
1934
+ catch (_e) {
1935
+ return str;
1936
+ }
1937
+ }
1938
+ else {
1939
+ return null;
1940
+ }
1941
+ }
1942
+ setSession(key, value) {
1943
+ if (this.platform.isBrowser) {
1944
+ sessionStorage.setItem(key, JSON.stringify(value));
1945
+ }
1946
+ }
1947
+ removeLocal(key) {
1948
+ if (this.platform.isBrowser) {
1949
+ localStorage.removeItem(key);
1950
+ }
1951
+ }
1952
+ removeSession(key) {
1953
+ if (this.platform.isBrowser) {
1954
+ sessionStorage.removeItem(key);
1955
+ }
1956
+ }
1957
+ guid() {
1958
+ let S4 = () => {
1959
+ return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
1675
1960
  };
1676
- };
1961
+ return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4();
1962
+ }
1963
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XStorageService, deps: [{ token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
1964
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XStorageService, providedIn: 'root' }); }
1965
+ }
1966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XStorageService, decorators: [{
1967
+ type: Injectable,
1968
+ args: [{ providedIn: 'root' }]
1969
+ }], ctorParameters: () => [{ type: i1$1.Platform }] });
1970
+
1971
+ class XRepositoryAbstract {
1972
+ }
1973
+ class XRepositoryService extends XRepositoryAbstract {
1974
+ constructor(http, input) {
1975
+ super();
1976
+ this.http = http;
1977
+ this.input = input;
1978
+ this.api = '';
1979
+ this.api = typeof input.api !== 'undefined' ? input.api : '';
1980
+ }
1981
+ getList(index, size, query) {
1982
+ index = index ? index : 1;
1983
+ size = size ? size : 10;
1984
+ return this.http.post(`${this.api}${this.input.controller.name}/${size}/${index}`, query);
1985
+ }
1986
+ get(id) {
1987
+ return this.http.get(`${this.api}${this.input.controller.name}/${id}`);
1988
+ }
1989
+ post(entity) {
1990
+ return this.http.post(`${this.api}${this.input.controller.name}`, entity);
1991
+ }
1992
+ put(entity) {
1993
+ return this.http.put(`${this.api}${this.input.controller.name}`, entity);
1994
+ }
1995
+ delete(id) {
1996
+ return this.http.delete(`${this.api}${this.input.controller.name}/${id}`);
1997
+ }
1677
1998
  }
1678
1999
 
1679
2000
  /**
1680
2001
  * Generated bundle index. Do not edit.
1681
2002
  */
1682
2003
 
1683
- export { XAddDays, XAddHours, XAddMilliseconds, XAddMinutes, XAddMonths, XAddSeconds, XAddYears, XBadgeAnimation, XBadgeStandaloneAnimation, XBaseAnimation, XChunk, XClamp, XClearClass, XCloneDeep, XComputed, XComputedStyle, XConfigService, XConnectAnimation, XConnectBaseAnimation, XDataConvert, XDateQuarter, XDateWeek, XDateWeekYear, XDateYearQuarter, XDateYearWeek, XDrop, XDropAnimation, XDuration, XFadeAnimation, XGetChildren, XGroupBy, XGuid, XHasIn, XHttpService, XIdentity, XInputBoolean, XInputNumber, XInvertKeyValues, XIsArray, XIsBoolean, XIsChange, XIsDate, XIsEmpty, XIsFunction, XIsNull, XIsNumber, XIsObject, XIsObjectArray, XIsObservable, XIsRegExp, XIsString, XIsTemplateRef, XIsType, XIsUndefined, XIsValue, XIsValueArray, XIsXTemplate, XMoveAnimation, XMoveBoxAnimation, XOpacityAnimation, XOrderBy, XParentPath, XParents, XPreloadingStrategyService, XProperty, XRemove, XRepositoryAbstract, XRepositoryService, XResize, XReuseStrategyService, XSetData, XSetFlex, XSlideAnimation, XSliderAnimation, XStorageService, XThemeService, XToBoolean, XToDataConvert, XToDate, XWithConfig, X_CONFIG, X_THEME, X_THEME_AMOUNTS, X_THEME_BACKGROUNDS, X_THEME_BLACK_MERGE, X_THEME_BORDERS, X_THEME_COLORS, X_THEME_COLOR_KEYS, X_THEME_DARK_COLORS, X_THEME_EXCHANGES, X_THEME_MERGE, X_THEME_PREFIX, X_THEME_TEXTS, fillDefault, isNil, isNotNil, mixColors, removeNgTag, reqAnimFrame, stripTags, toHex, toRgb, warnIconTypeNotFound, warnSVGTagNotFound };
2004
+ export { XAddDays, XAddHours, XAddMilliseconds, XAddMinutes, XAddMonths, XAddSeconds, XAddYears, XBadgeAnimation, XBadgeStandaloneAnimation, XBaseAnimation, XCamelToKebab, XChunk, XClamp, XClearClass, XClearClassSignal, XCloneDeep, XComputed, XComputedStyle, XConfigService, XConnectBaseAnimation, XDataConvert, XDateQuarter, XDateWeek, XDateWeekYear, XDateYearQuarter, XDateYearWeek, XDrop, XDropAnimation, XDuration, XFadeAnimation, XFillDefault, XGetChildren, XGroupBy, XGuid, XHasIn, XHttpService, XIdentity, XInputBoolean, XInputCssPixelValue, XInputNumber, XInvertKeyValues, XIsArray, XIsBoolean, XIsChange, XIsDate, XIsEmpty, XIsFunction, XIsInputSignal, XIsNil, XIsNotNil, XIsNull, XIsNumber, XIsObject, XIsObjectArray, XIsObservable, XIsRegExp, XIsString, XIsTemplateRef, XIsType, XIsUndefined, XIsValue, XIsValueArray, XIsXTemplate, XKebabToCamel, XMixColors, XMoveAnimation, XMoveBoxAnimation, XOpacityAnimation, XOrderBy, XParentPath, XParents, XPreloadingStrategyService, XProperty, XPropertyFunction, XRemove, XRemoveNgTag, XRepositoryAbstract, XRepositoryService, XRequestAnimationFrame, XResize, XReuseStrategyService, XSetData, XSetFlex, XSlideAnimation, XStorageService, XStripTags, XThemeService, XToBoolean, XToCssPixelValue, XToCssPx, XToDataArray, XToDataConvert, XToDate, XToHex, XToNumber, XToRgb, XToString, XWarnIconTypeNotFound, XWarnSVGTagNotFound, X_CONFIG, X_THEME, X_THEME_AMOUNTS, X_THEME_BACKGROUNDS, X_THEME_BLACK_MERGE, X_THEME_BORDERS, X_THEME_COLORS, X_THEME_COLOR_KEYS, X_THEME_DARK_COLORS, X_THEME_EXCHANGES, X_THEME_LIGHT_COLORS, X_THEME_MERGE, X_THEME_PREFIX, X_THEME_TEXTS, X_THEME_VARS, X_THEME_VARS_KEYS };
1684
2005
  //# sourceMappingURL=ng-nest-ui-core.mjs.map