ngx-tethys 19.0.13 → 19.1.0-next.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 (280) hide show
  1. package/CHANGELOG.md +29 -2
  2. package/action/action.component.d.ts +12 -20
  3. package/action/actions.component.d.ts +5 -7
  4. package/affix/affix.component.d.ts +7 -10
  5. package/alert/alert.component.d.ts +1 -1
  6. package/anchor/anchor-link.component.d.ts +8 -8
  7. package/anchor/anchor.component.d.ts +15 -21
  8. package/arrow-switcher/arrow-switcher.component.d.ts +15 -22
  9. package/autocomplete/autocomplete.component.d.ts +10 -17
  10. package/autocomplete/autocomplete.trigger.directive.d.ts +10 -18
  11. package/avatar/avatar-list/avatar-list.component.d.ts +8 -14
  12. package/avatar/avatar.component.d.ts +25 -39
  13. package/back-top/back-top.component.d.ts +9 -12
  14. package/badge/badge.component.d.ts +19 -59
  15. package/breadcrumb/breadcrumb.component.d.ts +15 -20
  16. package/button/button-icon.component.d.ts +3 -2
  17. package/button/button.component.d.ts +3 -2
  18. package/calendar/calendar-header.component.d.ts +9 -8
  19. package/calendar/calendar.component.d.ts +16 -16
  20. package/card/card.component.d.ts +5 -11
  21. package/card/content.component.d.ts +3 -8
  22. package/card/header.component.d.ts +7 -8
  23. package/carousel/carousel.component.d.ts +22 -27
  24. package/cascader/cascader-li.component.d.ts +13 -21
  25. package/cascader/cascader-search-option.component.d.ts +8 -16
  26. package/cascader/cascader.component.d.ts +58 -80
  27. package/checkbox/checkbox.component.d.ts +2 -5
  28. package/collapse/collapse-item.component.d.ts +12 -19
  29. package/collapse/collapse.component.d.ts +6 -12
  30. package/collapse/collapse.token.d.ts +3 -3
  31. package/color-picker/color-picker-custom-panel.component.d.ts +5 -5
  32. package/color-picker/color-picker-panel.component.d.ts +7 -11
  33. package/color-picker/color-picker.component.d.ts +19 -35
  34. package/color-picker/parts/alpha/alpha.component.d.ts +8 -8
  35. package/color-picker/parts/hue/hue.component.d.ts +6 -6
  36. package/color-picker/parts/indicator/indicator.component.d.ts +4 -3
  37. package/color-picker/parts/inputs/inputs.component.d.ts +9 -9
  38. package/color-picker/parts/saturation/saturation.component.d.ts +9 -9
  39. package/comment/comment.component.d.ts +4 -5
  40. package/copy/copy.directive.d.ts +8 -9
  41. package/date-picker/abstract-picker.component.d.ts +8 -7
  42. package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
  43. package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
  44. package/date-picker/picker.component.d.ts +2 -1
  45. package/date-range/date-range.component.d.ts +2 -2
  46. package/dialog/body/dialog-body.component.d.ts +2 -6
  47. package/dialog/confirm/confirm.component.d.ts +2 -2
  48. package/dialog/footer/dialog-footer.component.d.ts +6 -9
  49. package/dialog/header/dialog-header.component.d.ts +9 -11
  50. package/divider/divider.component.d.ts +12 -16
  51. package/dot/dot.component.d.ts +5 -13
  52. package/drag-drop/drag-handle.directive.d.ts +2 -1
  53. package/drag-drop/drag.directive.d.ts +2 -1
  54. package/drag-drop/drop-container.directive.d.ts +2 -1
  55. package/dropdown/dropdown-menu-item.directive.d.ts +3 -2
  56. package/dropdown/dropdown-menu.component.d.ts +2 -1
  57. package/dropdown/dropdown.directive.d.ts +2 -1
  58. package/empty/empty.component.d.ts +21 -27
  59. package/fesm2022/ngx-tethys-action.mjs +54 -91
  60. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-affix.mjs +29 -26
  62. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-anchor.mjs +91 -118
  64. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-arrow-switcher.mjs +51 -77
  66. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-autocomplete.mjs +69 -103
  68. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-avatar.mjs +117 -162
  70. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-back-top.mjs +33 -46
  72. package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys-badge.mjs +104 -208
  74. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  75. package/fesm2022/ngx-tethys-breadcrumb.mjs +66 -70
  76. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-calendar.mjs +85 -87
  78. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-card.mjs +72 -77
  80. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-carousel.mjs +82 -99
  82. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-cascader.mjs +313 -468
  84. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-checkbox.mjs +10 -17
  86. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-collapse.mjs +66 -71
  88. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-color-picker.mjs +187 -246
  90. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-comment.mjs +16 -10
  92. package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-copy.mjs +25 -28
  94. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-dialog.mjs +81 -82
  96. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-divider.mjs +49 -58
  98. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-dot.mjs +45 -68
  100. package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-empty.mjs +107 -95
  102. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-form.mjs +161 -200
  104. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-fullscreen.mjs +21 -23
  106. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  107. package/fesm2022/ngx-tethys-grid.mjs +160 -152
  108. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  109. package/fesm2022/ngx-tethys-i18n.mjs +25 -25
  110. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  111. package/fesm2022/ngx-tethys-input-number.mjs +101 -114
  112. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  113. package/fesm2022/ngx-tethys-input.mjs +268 -271
  114. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  115. package/fesm2022/ngx-tethys-list.mjs +1 -1
  116. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  117. package/fesm2022/ngx-tethys-loading.mjs +17 -35
  118. package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
  119. package/fesm2022/ngx-tethys-mention.mjs +52 -74
  120. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  121. package/fesm2022/ngx-tethys-menu.mjs +106 -179
  122. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  123. package/fesm2022/ngx-tethys-nav.mjs +169 -201
  124. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  125. package/fesm2022/ngx-tethys-pagination.mjs +230 -294
  126. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  127. package/fesm2022/ngx-tethys-popover.mjs +67 -70
  128. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  129. package/fesm2022/ngx-tethys-progress.mjs +196 -244
  130. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  131. package/fesm2022/ngx-tethys-property.mjs +102 -105
  132. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  133. package/fesm2022/ngx-tethys-radio.mjs +34 -38
  134. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  135. package/fesm2022/ngx-tethys-result.mjs +46 -28
  136. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  137. package/fesm2022/ngx-tethys-skeleton.mjs +339 -342
  138. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  139. package/fesm2022/ngx-tethys-slider.mjs +75 -108
  140. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  141. package/fesm2022/ngx-tethys-space.mjs +26 -46
  142. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  143. package/fesm2022/ngx-tethys-statistic.mjs +114 -151
  144. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  145. package/fesm2022/ngx-tethys-stepper.mjs +74 -107
  146. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  147. package/fesm2022/ngx-tethys-switch.mjs +80 -140
  148. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-table.mjs +1 -1
  150. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-tabs.mjs +69 -87
  152. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-tag.mjs +42 -64
  154. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-timeline.mjs +104 -129
  156. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-typography.mjs +36 -33
  158. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-upload.mjs +91 -130
  160. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  162. package/fesm2022/ngx-tethys-watermark.mjs +36 -40
  163. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  164. package/fesm2022/ngx-tethys.mjs +1 -1
  165. package/fesm2022/ngx-tethys.mjs.map +1 -1
  166. package/form/form-group-error/form-group-error.component.d.ts +2 -3
  167. package/form/form-group-label.directive.d.ts +2 -1
  168. package/form/form-group.component.d.ts +17 -24
  169. package/form/form-submit.directive.d.ts +2 -2
  170. package/form/form.directive.d.ts +6 -8
  171. package/form/from-group-footer/form-group-footer.component.d.ts +2 -2
  172. package/form/validator/confirm-validator.directive.d.ts +2 -2
  173. package/form/validator/unique-validator.directive.d.ts +2 -2
  174. package/fullscreen/fullscreen.component.d.ts +7 -7
  175. package/grid/flex.d.ts +14 -19
  176. package/grid/thy-col.directive.d.ts +6 -9
  177. package/grid/thy-grid-item.component.d.ts +3 -4
  178. package/grid/thy-grid.component.d.ts +11 -12
  179. package/grid/thy-row.directive.d.ts +12 -12
  180. package/icon/icon.component.d.ts +3 -2
  181. package/image/image.directive.d.ts +3 -2
  182. package/input/input-count.component.d.ts +4 -5
  183. package/input/input-group.component.d.ts +20 -20
  184. package/input/input-search.component.d.ts +15 -20
  185. package/input/input.component.d.ts +20 -21
  186. package/input/input.directive.d.ts +4 -6
  187. package/input-number/input-number.component.d.ts +21 -29
  188. package/layout/header.component.d.ts +4 -9
  189. package/layout/sidebar-header.component.d.ts +2 -1
  190. package/layout/sidebar.component.d.ts +8 -7
  191. package/list/list.component.d.ts +2 -1
  192. package/list/selection/selection-list.d.ts +4 -3
  193. package/loading/loading.component.d.ts +4 -10
  194. package/mention/mention.directive.d.ts +6 -7
  195. package/mention/suggestions/suggestions.component.d.ts +8 -9
  196. package/menu/group/menu-group.component.d.ts +16 -33
  197. package/menu/item/action/menu-item-action.component.d.ts +7 -8
  198. package/menu/item/icon/menu-item-icon.component.d.ts +2 -2
  199. package/menu/item/menu-item.component.d.ts +4 -4
  200. package/menu/item/name/menu-item-name.component.d.ts +2 -3
  201. package/menu/menu.component.d.ts +3 -7
  202. package/nav/icon-nav/icon-nav-link.directive.d.ts +3 -7
  203. package/nav/icon-nav/icon-nav.component.d.ts +3 -8
  204. package/nav/nav-ink-bar.directive.d.ts +4 -6
  205. package/nav/nav-item.directive.d.ts +7 -10
  206. package/nav/nav.component.d.ts +20 -48
  207. package/package.json +1 -1
  208. package/pagination/pagination.component.d.ts +48 -109
  209. package/popover/header/popover-header.component.d.ts +7 -6
  210. package/popover/popover.directive.d.ts +11 -18
  211. package/progress/progress-circle.component.d.ts +32 -21
  212. package/progress/progress-strip.component.d.ts +10 -14
  213. package/progress/progress.component.d.ts +15 -23
  214. package/property/examples/single/single.component.scss +6 -0
  215. package/property/properties.component.d.ts +6 -13
  216. package/property/property-item.component.d.ts +21 -26
  217. package/property/styles/properties.scss +124 -52
  218. package/property-operation/property-operation.component.d.ts +6 -5
  219. package/radio/button/radio-button.component.d.ts +2 -2
  220. package/radio/group/radio-group.component.d.ts +8 -7
  221. package/radio/radio.component.d.ts +2 -2
  222. package/radio/radio.token.d.ts +2 -2
  223. package/rate/rate-item.component.d.ts +2 -1
  224. package/rate/rate.component.d.ts +4 -3
  225. package/resizable/resizable.directive.d.ts +4 -9
  226. package/resizable/resize-handle.component.d.ts +2 -1
  227. package/resizable/resize-handles.component.d.ts +2 -1
  228. package/result/result.component.d.ts +9 -10
  229. package/schematics/version.d.ts +1 -1
  230. package/schematics/version.js +1 -1
  231. package/segment/segment-item.component.d.ts +2 -1
  232. package/segment/segment.component.d.ts +2 -1
  233. package/select/custom-select/custom-select.component.d.ts +11 -10
  234. package/select/native-select/native-select.component.d.ts +2 -1
  235. package/shared/base-form-check.component.d.ts +3 -2
  236. package/shared/directives/thy-autofocus.directive.d.ts +3 -2
  237. package/shared/directives/thy-scroll.directive.d.ts +2 -1
  238. package/shared/directives/thy-show.d.ts +2 -1
  239. package/shared/option/group/option-group.component.d.ts +2 -1
  240. package/shared/option/list-option/list-option.component.d.ts +2 -7
  241. package/shared/option/option.component.d.ts +2 -1
  242. package/shared/select/select-control/select-control.component.d.ts +7 -6
  243. package/skeleton/skeleton-circle.component.d.ts +16 -19
  244. package/skeleton/skeleton-rectangle.component.d.ts +20 -23
  245. package/skeleton/skeleton.component.d.ts +5 -6
  246. package/skeleton/stylized/bullet-list.component.d.ts +11 -13
  247. package/skeleton/stylized/list.component.d.ts +10 -12
  248. package/skeleton/stylized/paragraph.component.d.ts +12 -14
  249. package/slide/slide-body/slide-body-section.component.d.ts +2 -1
  250. package/slider/slider.component.d.ts +17 -24
  251. package/space/space.component.d.ts +8 -8
  252. package/statistic/statistic.component.d.ts +35 -40
  253. package/stepper/step-header.component.d.ts +6 -10
  254. package/stepper/step.component.d.ts +6 -6
  255. package/stepper/stepper.component.d.ts +15 -20
  256. package/switch/switch.component.d.ts +24 -35
  257. package/table/table-column.component.d.ts +6 -5
  258. package/table/table-skeleton.component.d.ts +3 -10
  259. package/table/table.component.d.ts +11 -10
  260. package/tabs/tab-content.component.d.ts +4 -4
  261. package/tabs/tab.component.d.ts +4 -5
  262. package/tabs/tabs.component.d.ts +13 -15
  263. package/tag/tag.component.d.ts +10 -16
  264. package/time-picker/time-picker-panel.component.d.ts +3 -2
  265. package/time-picker/time-picker.component.d.ts +6 -5
  266. package/timeline/timeline-item.component.d.ts +9 -13
  267. package/timeline/timeline.component.d.ts +13 -17
  268. package/tooltip/tooltip.directive.d.ts +3 -2
  269. package/tree/tree-node.component.d.ts +6 -15
  270. package/tree/tree.component.d.ts +8 -7
  271. package/tree-select/tree-select.component.d.ts +8 -7
  272. package/typography/bg-color.directive.d.ts +3 -3
  273. package/typography/text/text.component.d.ts +2 -2
  274. package/typography/text-color.directive.d.ts +3 -3
  275. package/upload/file-drop.directive.d.ts +9 -11
  276. package/upload/file-select-base.d.ts +6 -10
  277. package/upload/file-select.component.d.ts +10 -20
  278. package/util/helpers/helpers.d.ts +2 -1
  279. package/vote/vote.component.d.ts +4 -3
  280. package/watermark/watermark.directive.d.ts +7 -9
@@ -1,6 +1,6 @@
1
1
  import { isString, isNumber } from 'ngx-tethys/util';
2
2
  import * as i0 from '@angular/core';
3
- import { numberAttribute, Input, ViewEncapsulation, Component, InjectionToken, inject, HostBinding, ViewChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
+ import { input, numberAttribute, computed, effect, ViewEncapsulation, Component, InjectionToken, inject, viewChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
4
4
  import { useHostRenderer } from '@tethys/cdk/dom';
5
5
  import { NgClass, NgStyle, NgTemplateOutlet, CommonModule } from '@angular/common';
6
6
  import { ThyTooltipDirective, ThyTooltipModule } from 'ngx-tethys/tooltip';
@@ -9,131 +9,114 @@ import { ThyTooltipDirective, ThyTooltipModule } from 'ngx-tethys/tooltip';
9
9
  * @private
10
10
  */
11
11
  class ThyProgressCircle {
12
- set thyType(type) {
13
- this.hostRenderer.updateClass(type ? [`progress-circle-${type}`] : []);
14
- }
15
- set thySize(size) {
16
- if (size) {
17
- if (isString(size)) {
18
- this.progressSize = `progress-circle-inner-${size}`;
19
- }
20
- else {
21
- this.width = size;
22
- }
23
- }
24
- }
25
12
  get strokeWidth() {
26
- return this.thyStrokeWidth || 6;
13
+ return this.thyStrokeWidth() || 6;
27
14
  }
28
15
  constructor() {
29
16
  this.hostRenderer = useHostRenderer();
30
- this.thyShape = 'strip';
31
- this.thyGapDegree = undefined;
32
- this.thyGapPosition = 'top';
33
- this.trailPathStyle = null;
34
- this.width = 112;
35
- }
36
- ngOnInit() {
37
- this.createCircleProgress();
38
- }
39
- ngOnChanges(changes) {
40
- const { thyGapDegree, thyValue, thyGapPosition } = changes;
41
- if (thyGapDegree || thyValue || thyGapPosition) {
42
- this.createCircleProgress();
43
- }
44
- }
45
- createCircleProgress() {
46
- let values = [];
47
- if (Array.isArray(this.thyValue)) {
48
- let totalValue = 0;
49
- values = this.thyValue.map((item, index) => {
50
- totalValue += item.value;
51
- const currentValue = +((totalValue / this.thyMax) * 100).toFixed(2);
52
- return { ...item, value: currentValue };
53
- });
54
- }
55
- else {
56
- values = [{ value: this.thyValue }];
57
- }
58
- const radius = 50 - this.strokeWidth / 2;
59
- const gapPosition = this.thyGapPosition || 'top';
60
- const len = Math.PI * 2 * radius;
61
- const gapDegree = this.thyGapDegree || 0;
62
- let beginPositionX = 0;
63
- let beginPositionY = -radius;
64
- let endPositionX = 0;
65
- let endPositionY = radius * -2;
66
- switch (gapPosition) {
67
- case 'left':
68
- beginPositionX = -radius;
69
- beginPositionY = 0;
70
- endPositionX = radius * 2;
71
- endPositionY = 0;
72
- break;
73
- case 'right':
74
- beginPositionX = radius;
75
- beginPositionY = 0;
76
- endPositionX = radius * -2;
77
- endPositionY = 0;
78
- break;
79
- case 'bottom':
80
- beginPositionY = radius;
81
- endPositionY = radius * 2;
82
- break;
83
- default:
84
- }
85
- this.pathString = `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`;
86
- this.trailPathStyle = {
87
- strokeDasharray: `${len - gapDegree}px ${len}px`,
88
- strokeDashoffset: `-${gapDegree / 2}px`,
89
- transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s'
90
- };
91
- this.progressCirclePath = values
92
- .map((item, index) => {
93
- return {
94
- stroke: null,
95
- value: +item.value,
96
- className: item.type ? `progress-circle-path-${item.type}` : null,
97
- strokePathStyle: {
98
- stroke: item?.color ? item?.color : null,
99
- transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s',
100
- strokeDasharray: `${((item.value || 0) / 100) * (len - gapDegree)}px ${len}px`,
101
- strokeDashoffset: `-${gapDegree / 2}px`
102
- }
17
+ this.thyType = input(undefined);
18
+ this.thySize = input(undefined);
19
+ this.thyValue = input(undefined);
20
+ this.thyMax = input(undefined, { transform: numberAttribute });
21
+ this.thyTips = input(undefined);
22
+ this.thyShape = input('strip');
23
+ this.thyGapDegree = input(undefined, { transform: numberAttribute });
24
+ this.thyGapPosition = input('top');
25
+ this.thyStrokeWidth = input(undefined, { transform: numberAttribute });
26
+ this.progressSize = computed(() => {
27
+ const size = this.thySize();
28
+ if (size && isString(size)) {
29
+ return `progress-circle-inner-${size}`;
30
+ }
31
+ return '';
32
+ });
33
+ this.width = computed(() => {
34
+ const size = this.thySize();
35
+ if (size && isNumber(size)) {
36
+ return size;
37
+ }
38
+ return 112;
39
+ });
40
+ this.circle = computed(() => {
41
+ let values = [];
42
+ const thyValue = this.thyValue();
43
+ if (Array.isArray(thyValue)) {
44
+ let totalValue = 0;
45
+ values = thyValue.map((item, index) => {
46
+ totalValue += item.value;
47
+ const currentValue = +((totalValue / this.thyMax()) * 100).toFixed(2);
48
+ return { ...item, value: currentValue };
49
+ });
50
+ }
51
+ else {
52
+ values = [{ value: thyValue }];
53
+ }
54
+ const radius = 50 - this.strokeWidth / 2;
55
+ const gapPosition = this.thyGapPosition() || 'top';
56
+ const len = Math.PI * 2 * radius;
57
+ const gapDegree = this.thyGapDegree() || 0;
58
+ let beginPositionX = 0;
59
+ let beginPositionY = -radius;
60
+ let endPositionX = 0;
61
+ let endPositionY = radius * -2;
62
+ switch (gapPosition) {
63
+ case 'left':
64
+ beginPositionX = -radius;
65
+ beginPositionY = 0;
66
+ endPositionX = radius * 2;
67
+ endPositionY = 0;
68
+ break;
69
+ case 'right':
70
+ beginPositionX = radius;
71
+ beginPositionY = 0;
72
+ endPositionX = radius * -2;
73
+ endPositionY = 0;
74
+ break;
75
+ case 'bottom':
76
+ beginPositionY = radius;
77
+ endPositionY = radius * 2;
78
+ break;
79
+ default:
80
+ }
81
+ const pathString = `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`;
82
+ const trailPathStyle = {
83
+ strokeDasharray: `${len - gapDegree}px ${len}px`,
84
+ strokeDashoffset: `-${gapDegree / 2}px`,
85
+ transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s'
103
86
  };
104
- })
105
- .reverse();
87
+ const progressCirclePath = values
88
+ .map((item, index) => {
89
+ return {
90
+ stroke: '',
91
+ value: +item.value,
92
+ className: item.type ? `progress-circle-path-${item.type}` : null,
93
+ strokePathStyle: {
94
+ stroke: item?.color ? item?.color : null,
95
+ transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s',
96
+ strokeDasharray: `${((item.value || 0) / 100) * (len - gapDegree)}px ${len}px`,
97
+ strokeDashoffset: `-${gapDegree / 2}px`
98
+ }
99
+ };
100
+ })
101
+ .reverse();
102
+ return { pathString, trailPathStyle, progressCirclePath };
103
+ });
104
+ effect(() => {
105
+ const type = this.thyType();
106
+ this.hostRenderer.updateClass(type ? [`progress-circle-${type}`] : []);
107
+ });
106
108
  }
109
+ ngOnInit() { }
110
+ ngOnChanges(changes) { }
107
111
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgressCircle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
108
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyProgressCircle, isStandalone: true, selector: "thy-progress-circle", inputs: { thyType: "thyType", thySize: "thySize", thyValue: "thyValue", thyMax: ["thyMax", "thyMax", numberAttribute], thyTips: "thyTips", thyShape: "thyShape", thyGapDegree: ["thyGapDegree", "thyGapDegree", numberAttribute], thyGapPosition: "thyGapPosition", thyStrokeWidth: ["thyStrokeWidth", "thyStrokeWidth", numberAttribute] }, host: { classAttribute: "progress-circle" }, usesOnChanges: true, ngImport: i0, template: "<div\n [thyTooltip]=\"thyTips\"\n [thyTooltipDisabled]=\"!thyTips\"\n [style.width.px]=\"width\"\n [style.height.px]=\"width\"\n [ngClass]=\"progressSize\"\n class=\"progress-circle-inner\">\n <svg class=\"progress-circle-svg\" viewBox=\"0 0 100 100\">\n <path\n class=\"progress-circle-trail\"\n fill-opacity=\"0\"\n [attr.d]=\"pathString\"\n [ngStyle]=\"trailPathStyle\"\n [attr.stroke-width]=\"strokeWidth\"></path>\n @for (p of progressCirclePath; track $index) {\n <path\n class=\"progress-circle-path\"\n [ngClass]=\"p.className\"\n fill-opacity=\"0\"\n [attr.d]=\"pathString\"\n [attr.stroke-linecap]=\"'round'\"\n [attr.stroke]=\"p.stroke\"\n [attr.stroke-width]=\"p.value ? strokeWidth : 0\"\n [ngStyle]=\"p.strokePathStyle\"></path>\n }\n </svg>\n <span class=\"progress-circle-content\">\n <ng-content></ng-content>\n </span>\n</div>\n", dependencies: [{ kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None }); }
112
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyProgressCircle, isStandalone: true, selector: "thy-progress-circle", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyValue: { classPropertyName: "thyValue", publicName: "thyValue", isSignal: true, isRequired: false, transformFunction: null }, thyMax: { classPropertyName: "thyMax", publicName: "thyMax", isSignal: true, isRequired: false, transformFunction: null }, thyTips: { classPropertyName: "thyTips", publicName: "thyTips", isSignal: true, isRequired: false, transformFunction: null }, thyShape: { classPropertyName: "thyShape", publicName: "thyShape", isSignal: true, isRequired: false, transformFunction: null }, thyGapDegree: { classPropertyName: "thyGapDegree", publicName: "thyGapDegree", isSignal: true, isRequired: false, transformFunction: null }, thyGapPosition: { classPropertyName: "thyGapPosition", publicName: "thyGapPosition", isSignal: true, isRequired: false, transformFunction: null }, thyStrokeWidth: { classPropertyName: "thyStrokeWidth", publicName: "thyStrokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "progress-circle" }, usesOnChanges: true, ngImport: i0, template: "@let tips = thyTips();\n@let circleAttr = circle();\n<div\n [thyTooltip]=\"tips\"\n [thyTooltipDisabled]=\"!tips\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"width()\"\n [ngClass]=\"progressSize()\"\n class=\"progress-circle-inner\">\n <svg class=\"progress-circle-svg\" viewBox=\"0 0 100 100\">\n <path\n class=\"progress-circle-trail\"\n fill-opacity=\"0\"\n [attr.d]=\"circleAttr.pathString\"\n [ngStyle]=\"circleAttr.trailPathStyle\"\n [attr.stroke-width]=\"strokeWidth\"></path>\n @for (p of circleAttr.progressCirclePath; track $index) {\n <path\n class=\"progress-circle-path\"\n [ngClass]=\"p.className\"\n fill-opacity=\"0\"\n [attr.d]=\"circleAttr.pathString\"\n [attr.stroke-linecap]=\"'round'\"\n [attr.stroke]=\"p.stroke\"\n [attr.stroke-width]=\"p.value ? strokeWidth : 0\"\n [ngStyle]=\"p.strokePathStyle\"></path>\n }\n </svg>\n <span class=\"progress-circle-content\">\n <ng-content></ng-content>\n </span>\n</div>\n", dependencies: [{ kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None }); }
109
113
  }
110
114
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgressCircle, decorators: [{
111
115
  type: Component,
112
116
  args: [{ selector: 'thy-progress-circle', encapsulation: ViewEncapsulation.None, host: {
113
117
  class: 'progress-circle'
114
- }, imports: [ThyTooltipDirective, NgClass, NgStyle], template: "<div\n [thyTooltip]=\"thyTips\"\n [thyTooltipDisabled]=\"!thyTips\"\n [style.width.px]=\"width\"\n [style.height.px]=\"width\"\n [ngClass]=\"progressSize\"\n class=\"progress-circle-inner\">\n <svg class=\"progress-circle-svg\" viewBox=\"0 0 100 100\">\n <path\n class=\"progress-circle-trail\"\n fill-opacity=\"0\"\n [attr.d]=\"pathString\"\n [ngStyle]=\"trailPathStyle\"\n [attr.stroke-width]=\"strokeWidth\"></path>\n @for (p of progressCirclePath; track $index) {\n <path\n class=\"progress-circle-path\"\n [ngClass]=\"p.className\"\n fill-opacity=\"0\"\n [attr.d]=\"pathString\"\n [attr.stroke-linecap]=\"'round'\"\n [attr.stroke]=\"p.stroke\"\n [attr.stroke-width]=\"p.value ? strokeWidth : 0\"\n [ngStyle]=\"p.strokePathStyle\"></path>\n }\n </svg>\n <span class=\"progress-circle-content\">\n <ng-content></ng-content>\n </span>\n</div>\n" }]
115
- }], ctorParameters: () => [], propDecorators: { thyType: [{
116
- type: Input
117
- }], thySize: [{
118
- type: Input
119
- }], thyValue: [{
120
- type: Input
121
- }], thyMax: [{
122
- type: Input,
123
- args: [{ transform: numberAttribute }]
124
- }], thyTips: [{
125
- type: Input
126
- }], thyShape: [{
127
- type: Input
128
- }], thyGapDegree: [{
129
- type: Input,
130
- args: [{ transform: numberAttribute }]
131
- }], thyGapPosition: [{
132
- type: Input
133
- }], thyStrokeWidth: [{
134
- type: Input,
135
- args: [{ transform: numberAttribute }]
136
- }] } });
118
+ }, imports: [ThyTooltipDirective, NgClass, NgStyle], template: "@let tips = thyTips();\n@let circleAttr = circle();\n<div\n [thyTooltip]=\"tips\"\n [thyTooltipDisabled]=\"!tips\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"width()\"\n [ngClass]=\"progressSize()\"\n class=\"progress-circle-inner\">\n <svg class=\"progress-circle-svg\" viewBox=\"0 0 100 100\">\n <path\n class=\"progress-circle-trail\"\n fill-opacity=\"0\"\n [attr.d]=\"circleAttr.pathString\"\n [ngStyle]=\"circleAttr.trailPathStyle\"\n [attr.stroke-width]=\"strokeWidth\"></path>\n @for (p of circleAttr.progressCirclePath; track $index) {\n <path\n class=\"progress-circle-path\"\n [ngClass]=\"p.className\"\n fill-opacity=\"0\"\n [attr.d]=\"circleAttr.pathString\"\n [attr.stroke-linecap]=\"'round'\"\n [attr.stroke]=\"p.stroke\"\n [attr.stroke-width]=\"p.value ? strokeWidth : 0\"\n [ngStyle]=\"p.strokePathStyle\"></path>\n }\n </svg>\n <span class=\"progress-circle-content\">\n <ng-content></ng-content>\n </span>\n</div>\n" }]
119
+ }], ctorParameters: () => [] });
137
120
 
138
121
  const THY_PROGRESS_COMPONENT = new InjectionToken('THY_PROGRESS_COMPONENT');
139
122
  /**
@@ -143,137 +126,134 @@ class ThyProgressStrip {
143
126
  constructor() {
144
127
  this.progress = inject(THY_PROGRESS_COMPONENT);
145
128
  this.hostRenderer = useHostRenderer();
146
- this.isProgressBar = true;
147
- this.percent = 0;
148
- }
149
- set thyType(type) {
150
- this.hostRenderer.updateClass(type ? [`progress-bar-${type}`] : []);
151
- }
152
- set thyValue(value) {
153
- if (!value && value !== 0) {
154
- return;
155
- }
156
- this.value = value;
157
- this.recalculatePercentage();
158
- }
159
- set thyColor(color) {
160
- this.color = color || '';
161
- }
162
- recalculatePercentage() {
163
- this.percent = +((this.value / this.progress.max) * 100).toFixed(2);
129
+ this.thyTips = input(undefined);
130
+ this.thyType = input();
131
+ this.thyValue = input(0, {
132
+ transform: numberAttribute
133
+ });
134
+ this.thyColor = input();
135
+ this.percent = computed(() => {
136
+ const value = this.thyValue();
137
+ if (!value && value !== 0) {
138
+ return 0;
139
+ }
140
+ return +((value / this.progress.max()) * 100).toFixed(2);
141
+ });
142
+ effect(() => {
143
+ const type = this.thyType();
144
+ this.hostRenderer.updateClass(type ? [`progress-bar-${type}`] : []);
145
+ });
164
146
  }
165
147
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgressStrip, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
166
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.8", type: ThyProgressStrip, isStandalone: true, selector: "thy-progress-bar", inputs: { thyTips: "thyTips", thyType: "thyType", thyValue: ["thyValue", "thyValue", numberAttribute], thyColor: "thyColor" }, host: { properties: { "class.progress-bar": "this.isProgressBar", "style.width.%": "this.percent" } }, ngImport: i0, template: "<div class=\"progress-bar-inner\" [ngStyle]=\"{ 'background-color': color }\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None }); }
148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyProgressStrip, isStandalone: true, selector: "thy-progress-bar", inputs: { thyTips: { classPropertyName: "thyTips", publicName: "thyTips", isSignal: true, isRequired: false, transformFunction: null }, thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thyValue: { classPropertyName: "thyValue", publicName: "thyValue", isSignal: true, isRequired: false, transformFunction: null }, thyColor: { classPropertyName: "thyColor", publicName: "thyColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width.%": "percent()" }, classAttribute: "progress-bar" }, ngImport: i0, template: "<div class=\"progress-bar-inner\" [ngStyle]=\"{ 'background-color': thyColor() }\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None }); }
167
149
  }
168
150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgressStrip, decorators: [{
169
151
  type: Component,
170
- args: [{ selector: 'thy-progress-bar', encapsulation: ViewEncapsulation.None, imports: [NgStyle], template: "<div class=\"progress-bar-inner\" [ngStyle]=\"{ 'background-color': color }\">\n <ng-content></ng-content>\n</div>\n" }]
171
- }], propDecorators: { isProgressBar: [{
172
- type: HostBinding,
173
- args: [`class.progress-bar`]
174
- }], percent: [{
175
- type: HostBinding,
176
- args: ['style.width.%']
177
- }], thyTips: [{
178
- type: Input
179
- }], thyType: [{
180
- type: Input
181
- }], thyValue: [{
182
- type: Input,
183
- args: [{ transform: numberAttribute }]
184
- }], thyColor: [{
185
- type: Input
186
- }] } });
152
+ args: [{ selector: 'thy-progress-bar', encapsulation: ViewEncapsulation.None, imports: [NgStyle], host: {
153
+ class: 'progress-bar',
154
+ '[style.width.%]': 'percent()'
155
+ }, template: "<div class=\"progress-bar-inner\" [ngStyle]=\"{ 'background-color': thyColor() }\">\n <ng-content></ng-content>\n</div>\n" }]
156
+ }], ctorParameters: () => [] });
187
157
 
188
158
  /**
189
159
  * 进度条组件
190
160
  * @name thy-progress
191
161
  */
192
162
  class ThyProgress {
193
- set barsQueryList(value) {
194
- this.bars = value.toArray();
195
- }
196
- /**
197
- * 进度条大小
198
- * @type xs | sm | md
199
- * @default md
200
- */
201
- set thySize(size) {
202
- this.size = size;
203
- this.hostRenderer.updateClass(size ? [`progress-${size}`] : []);
204
- }
205
- /**
206
- * 进度值,传入数字时显示百分比 = value / max * 100,当传入数组时显示多个 bar,stacked 模式的进度条
207
- * @type number | ThyProgressStackedValue[]
208
- */
209
- set thyValue(value) {
210
- // 自动求和计算 max
211
- if (Array.isArray(value)) {
212
- this.isStacked = true;
213
- this.value = [...value].filter(item => item.value !== 0);
214
- this.barsTotalValue = this.value.reduce((total, item) => {
215
- return total + item.value;
216
- }, 0);
217
- this.calculateMax();
218
- }
219
- else {
220
- this.value = value;
221
- }
222
- }
223
- /**
224
- * 最大值,主要计算百分比进度的分母使用,当 thyValue 传入数组时,自动累加数组中的 value 之和为 max
225
- */
226
- set thyMax(max) {
227
- this.settedMax = max;
228
- this.calculateMax();
229
- }
230
163
  constructor() {
231
- this.bars = [];
232
164
  this.hostRenderer = useHostRenderer();
233
- this.max = 100;
234
- this.isStacked = false;
165
+ this.barsTotalValue = computed(() => {
166
+ const value = this.thyValue();
167
+ if (Array.isArray(value)) {
168
+ return value.reduce((total, item) => {
169
+ return total + item.value;
170
+ }, 0);
171
+ }
172
+ return undefined;
173
+ });
174
+ this.max = computed(() => {
175
+ const setMax = this.thyMax();
176
+ const barsTotalValue = this.barsTotalValue();
177
+ let result = 100;
178
+ if (isNumber(setMax) && setMax > 0) {
179
+ result = setMax;
180
+ }
181
+ else if (isNumber(barsTotalValue)) {
182
+ result = barsTotalValue;
183
+ }
184
+ if (result < barsTotalValue) {
185
+ result = barsTotalValue;
186
+ }
187
+ return result;
188
+ });
189
+ this.isStacked = computed(() => {
190
+ return Array.isArray(this.thyValue());
191
+ });
192
+ this.bars = viewChildren(ThyProgressStrip);
235
193
  /**
236
194
  * 进度条类型: `primary` | `success` | `info` | `warning` | `danger`
237
195
  */
238
- this.thyType = 'primary';
196
+ this.thyType = input('primary');
197
+ /**
198
+ * 进度条大小
199
+ * @type xs | sm | md
200
+ * @default md
201
+ */
202
+ this.thySize = input('md');
203
+ /**
204
+ * 进度值,传入数字时显示百分比 = value / max * 100,当传入数组时显示多个 bar,stacked 模式的进度条
205
+ * @type number | ThyProgressStackedValue[]
206
+ */
207
+ this.thyValue = input(undefined, {
208
+ transform: (value) => {
209
+ if (Array.isArray(value)) {
210
+ return [...value].filter(item => item.value !== 0);
211
+ }
212
+ else {
213
+ return value;
214
+ }
215
+ }
216
+ });
217
+ /**
218
+ * 最大值,主要计算百分比进度的分母使用,当 thyValue 传入数组时,自动累加数组中的 value 之和为 max
219
+ */
220
+ this.thyMax = input(undefined, { transform: numberAttribute });
221
+ /**
222
+ * 鼠标移入进度条时显示的提示文案或者模板
223
+ */
224
+ this.thyTips = input(undefined);
239
225
  /**
240
226
  * 进度形状
241
227
  * @type strip | circle
242
228
  */
243
- this.thyShape = 'strip';
229
+ this.thyShape = input('strip');
244
230
  /**
245
231
  * 圆形进度条缺口角度,可取值 0 ~ 360
246
232
  */
247
- this.thyGapDegree = undefined;
233
+ this.thyGapDegree = input(undefined, { transform: numberAttribute });
248
234
  /**
249
235
  * 圆形进度条缺口位置
250
236
  * @type top | bottom | left | right
251
237
  */
252
- this.thyGapPosition = 'top';
238
+ this.thyGapPosition = input('top');
239
+ /**
240
+ * 圆形进度条线的宽度
241
+ */
242
+ this.thyStrokeWidth = input(undefined, { transform: numberAttribute });
243
+ effect(() => {
244
+ const size = this.thySize();
245
+ this.hostRenderer.updateClass(size ? [`progress-${size}`] : []);
246
+ });
253
247
  }
254
248
  ngOnInit() { }
255
249
  ngOnChanges(changes) { }
256
- calculateMax() {
257
- if (isNumber(this.settedMax) && this.settedMax > 0) {
258
- this.max = this.settedMax;
259
- }
260
- else {
261
- this.max = this.barsTotalValue;
262
- }
263
- if (this.max < this.barsTotalValue) {
264
- this.max = this.barsTotalValue;
265
- }
266
- this.bars.forEach(bar => {
267
- bar.recalculatePercentage();
268
- });
269
- }
270
250
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgress, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
271
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyProgress, isStandalone: true, selector: "thy-progress", inputs: { thyType: "thyType", thySize: "thySize", thyValue: "thyValue", thyMax: ["thyMax", "thyMax", numberAttribute], thyTips: "thyTips", thyShape: "thyShape", thyGapDegree: ["thyGapDegree", "thyGapDegree", numberAttribute], thyGapPosition: "thyGapPosition", thyStrokeWidth: ["thyStrokeWidth", "thyStrokeWidth", numberAttribute] }, host: { properties: { "class.thy-progress-strip": "thyShape === 'strip'", "class.thy-progress-circle": "thyShape === 'circle'", "attr.max": "this.max", "class.progress-stacked": "this.isStacked" }, classAttribute: "thy-progress progress" }, providers: [
251
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyProgress, isStandalone: true, selector: "thy-progress", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyValue: { classPropertyName: "thyValue", publicName: "thyValue", isSignal: true, isRequired: false, transformFunction: null }, thyMax: { classPropertyName: "thyMax", publicName: "thyMax", isSignal: true, isRequired: false, transformFunction: null }, thyTips: { classPropertyName: "thyTips", publicName: "thyTips", isSignal: true, isRequired: false, transformFunction: null }, thyShape: { classPropertyName: "thyShape", publicName: "thyShape", isSignal: true, isRequired: false, transformFunction: null }, thyGapDegree: { classPropertyName: "thyGapDegree", publicName: "thyGapDegree", isSignal: true, isRequired: false, transformFunction: null }, thyGapPosition: { classPropertyName: "thyGapPosition", publicName: "thyGapPosition", isSignal: true, isRequired: false, transformFunction: null }, thyStrokeWidth: { classPropertyName: "thyStrokeWidth", publicName: "thyStrokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-progress-strip": "thyShape() === 'strip'", "class.thy-progress-circle": "thyShape() === 'circle'", "class.progress-stacked": "isStacked()", "attr.max": "max()" }, classAttribute: "thy-progress progress" }, providers: [
272
252
  {
273
253
  provide: THY_PROGRESS_COMPONENT,
274
254
  useExisting: ThyProgress
275
255
  }
276
- ], viewQueries: [{ propertyName: "barsQueryList", predicate: ThyProgressStrip, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container>\n @if (thyShape === 'strip') {\n <div class=\"thy-progress-strip-outer\">\n @if (isStacked) {\n @for (item of value; track $index) {\n <thy-progress-bar\n [thyType]=\"item.type\"\n [ngClass]=\"{ 'cursor-pointer': item.tips || thyTips }\"\n [thyTooltip]=\"item.tips || thyTips\"\n [thyTooltipTemplateContext]=\"item\"\n [thyTooltipDisabled]=\"!thyTips && !item.tips\"\n [thyColor]=\"item.color\"\n [thyValue]=\"item.value\"\n >{{ item.label }}\n </thy-progress-bar>\n }\n } @else {\n @if (value) {\n <thy-progress-bar\n [thyType]=\"thyType\"\n [ngClass]=\"{ 'cursor-pointer': thyTips }\"\n [thyTooltip]=\"thyTips\"\n [thyTooltipTemplateContext]=\"value\"\n [thyTooltipDisabled]=\"!thyTips\"\n [thyValue]=\"value\">\n </thy-progress-bar>\n }\n }\n </div>\n @if (thyShape === 'strip') {\n <div class=\"thy-progress-strip-text\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n </div>\n }\n } @else {\n <thy-progress-circle\n [thyType]=\"thyType\"\n [thyTooltip]=\"thyTips\"\n [thyTooltipDisabled]=\"!thyTips\"\n [thyTooltipTemplateContext]=\"value\"\n [thyValue]=\"value\"\n [thySize]=\"size\"\n [thyMax]=\"max\"\n [thyGapDegree]=\"thyGapDegree\"\n [thyGapPosition]=\"thyGapPosition\"\n [thyStrokeWidth]=\"thyStrokeWidth\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template\n ></thy-progress-circle>\n }\n</ng-container>\n\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "component", type: ThyProgressStrip, selector: "thy-progress-bar", inputs: ["thyTips", "thyType", "thyValue", "thyColor"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyProgressCircle, selector: "thy-progress-circle", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
256
+ ], viewQueries: [{ propertyName: "bars", predicate: ThyProgressStrip, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container>\n @if (thyShape()=== 'strip') {\n <div class=\"thy-progress-strip-outer\">\n @if (isStacked()) {\n @for (item of thyValue(); track $index) {\n <thy-progress-bar\n [thyType]=\"item.type\"\n [ngClass]=\"{ 'cursor-pointer': item.tips || thyTips()}\"\n [thyTooltip]=\"item.tips || thyTips()\"\n [thyTooltipTemplateContext]=\"item\"\n [thyTooltipDisabled]=\"!thyTips() && !item.tips\"\n [thyColor]=\"item.color\"\n [thyValue]=\"item.value\"\n >{{ item.label }}\n </thy-progress-bar>\n }\n } @else {\n @let value = thyValue();\n @if (value) {\n <thy-progress-bar\n [thyType]=\"thyType()\"\n [ngClass]=\"{ 'cursor-pointer': thyTips()}\"\n [thyTooltip]=\"thyTips()\"\n [thyTooltipTemplateContext]=\"value\"\n [thyTooltipDisabled]=\"!thyTips()\"\n [thyValue]=\"value\">\n </thy-progress-bar>\n }\n }\n </div>\n @if (thyShape()=== 'strip') {\n <div class=\"thy-progress-strip-text\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n </div>\n }\n } @else {\n @let value = thyValue();\n <thy-progress-circle\n [thyType]=\"thyType()\"\n [thyTooltip]=\"thyTips()\"\n [thyTooltipDisabled]=\"!thyTips()\"\n [thyTooltipTemplateContext]=\"value\"\n [thyValue]=\"value\"\n [thySize]=\"thySize()\"\n [thyMax]=\"max()\"\n [thyGapDegree]=\"thyGapDegree()\"\n [thyGapPosition]=\"thyGapPosition()\"\n [thyStrokeWidth]=\"thyStrokeWidth()\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template\n ></thy-progress-circle>\n }\n</ng-container>\n\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "component", type: ThyProgressStrip, selector: "thy-progress-bar", inputs: ["thyTips", "thyType", "thyValue", "thyColor"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyProgressCircle, selector: "thy-progress-circle", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
277
257
  }
278
258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgress, decorators: [{
279
259
  type: Component,
@@ -284,40 +264,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
284
264
  }
285
265
  ], host: {
286
266
  class: `thy-progress progress`,
287
- '[class.thy-progress-strip]': `thyShape === 'strip'`,
288
- '[class.thy-progress-circle]': `thyShape === 'circle'`
289
- }, imports: [ThyProgressStrip, NgClass, ThyTooltipDirective, NgTemplateOutlet, ThyProgressCircle], template: "<ng-container>\n @if (thyShape === 'strip') {\n <div class=\"thy-progress-strip-outer\">\n @if (isStacked) {\n @for (item of value; track $index) {\n <thy-progress-bar\n [thyType]=\"item.type\"\n [ngClass]=\"{ 'cursor-pointer': item.tips || thyTips }\"\n [thyTooltip]=\"item.tips || thyTips\"\n [thyTooltipTemplateContext]=\"item\"\n [thyTooltipDisabled]=\"!thyTips && !item.tips\"\n [thyColor]=\"item.color\"\n [thyValue]=\"item.value\"\n >{{ item.label }}\n </thy-progress-bar>\n }\n } @else {\n @if (value) {\n <thy-progress-bar\n [thyType]=\"thyType\"\n [ngClass]=\"{ 'cursor-pointer': thyTips }\"\n [thyTooltip]=\"thyTips\"\n [thyTooltipTemplateContext]=\"value\"\n [thyTooltipDisabled]=\"!thyTips\"\n [thyValue]=\"value\">\n </thy-progress-bar>\n }\n }\n </div>\n @if (thyShape === 'strip') {\n <div class=\"thy-progress-strip-text\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n </div>\n }\n } @else {\n <thy-progress-circle\n [thyType]=\"thyType\"\n [thyTooltip]=\"thyTips\"\n [thyTooltipDisabled]=\"!thyTips\"\n [thyTooltipTemplateContext]=\"value\"\n [thyValue]=\"value\"\n [thySize]=\"size\"\n [thyMax]=\"max\"\n [thyGapDegree]=\"thyGapDegree\"\n [thyGapPosition]=\"thyGapPosition\"\n [thyStrokeWidth]=\"thyStrokeWidth\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template\n ></thy-progress-circle>\n }\n</ng-container>\n\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n" }]
290
- }], ctorParameters: () => [], propDecorators: { max: [{
291
- type: HostBinding,
292
- args: ['attr.max']
293
- }], isStacked: [{
294
- type: HostBinding,
295
- args: [`class.progress-stacked`]
296
- }], barsQueryList: [{
297
- type: ViewChildren,
298
- args: [ThyProgressStrip]
299
- }], thyType: [{
300
- type: Input
301
- }], thySize: [{
302
- type: Input
303
- }], thyValue: [{
304
- type: Input
305
- }], thyMax: [{
306
- type: Input,
307
- args: [{ transform: numberAttribute }]
308
- }], thyTips: [{
309
- type: Input
310
- }], thyShape: [{
311
- type: Input
312
- }], thyGapDegree: [{
313
- type: Input,
314
- args: [{ transform: numberAttribute }]
315
- }], thyGapPosition: [{
316
- type: Input
317
- }], thyStrokeWidth: [{
318
- type: Input,
319
- args: [{ transform: numberAttribute }]
320
- }] } });
267
+ '[class.thy-progress-strip]': `thyShape() === 'strip'`,
268
+ '[class.thy-progress-circle]': `thyShape() === 'circle'`,
269
+ '[class.progress-stacked]': 'isStacked()',
270
+ '[attr.max]': 'max()'
271
+ }, imports: [ThyProgressStrip, NgClass, ThyTooltipDirective, NgTemplateOutlet, ThyProgressCircle], template: "<ng-container>\n @if (thyShape()=== 'strip') {\n <div class=\"thy-progress-strip-outer\">\n @if (isStacked()) {\n @for (item of thyValue(); track $index) {\n <thy-progress-bar\n [thyType]=\"item.type\"\n [ngClass]=\"{ 'cursor-pointer': item.tips || thyTips()}\"\n [thyTooltip]=\"item.tips || thyTips()\"\n [thyTooltipTemplateContext]=\"item\"\n [thyTooltipDisabled]=\"!thyTips() && !item.tips\"\n [thyColor]=\"item.color\"\n [thyValue]=\"item.value\"\n >{{ item.label }}\n </thy-progress-bar>\n }\n } @else {\n @let value = thyValue();\n @if (value) {\n <thy-progress-bar\n [thyType]=\"thyType()\"\n [ngClass]=\"{ 'cursor-pointer': thyTips()}\"\n [thyTooltip]=\"thyTips()\"\n [thyTooltipTemplateContext]=\"value\"\n [thyTooltipDisabled]=\"!thyTips()\"\n [thyValue]=\"value\">\n </thy-progress-bar>\n }\n }\n </div>\n @if (thyShape()=== 'strip') {\n <div class=\"thy-progress-strip-text\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n </div>\n }\n } @else {\n @let value = thyValue();\n <thy-progress-circle\n [thyType]=\"thyType()\"\n [thyTooltip]=\"thyTips()\"\n [thyTooltipDisabled]=\"!thyTips()\"\n [thyTooltipTemplateContext]=\"value\"\n [thyValue]=\"value\"\n [thySize]=\"thySize()\"\n [thyMax]=\"max()\"\n [thyGapDegree]=\"thyGapDegree()\"\n [thyGapPosition]=\"thyGapPosition()\"\n [thyStrokeWidth]=\"thyStrokeWidth()\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template\n ></thy-progress-circle>\n }\n</ng-container>\n\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n" }]
272
+ }], ctorParameters: () => [] });
321
273
 
322
274
  class ThyProgressModule {
323
275
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyProgressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }