ngx-tethys 20.0.1 → 20.0.2

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 (239) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/action/index.d.ts +3 -3
  3. package/affix/index.d.ts +1 -1
  4. package/alert/index.d.ts +3 -3
  5. package/anchor/index.d.ts +3 -3
  6. package/arrow-switcher/index.d.ts +6 -6
  7. package/autocomplete/index.d.ts +7 -7
  8. package/avatar/index.d.ts +9 -9
  9. package/back-top/index.d.ts +3 -3
  10. package/badge/index.d.ts +6 -6
  11. package/breadcrumb/index.d.ts +7 -7
  12. package/button/index.d.ts +19 -19
  13. package/calendar/index.d.ts +8 -8
  14. package/card/index.d.ts +6 -6
  15. package/carousel/index.d.ts +4 -4
  16. package/cascader/index.d.ts +24 -24
  17. package/collapse/index.d.ts +4 -4
  18. package/color-picker/index.d.ts +16 -16
  19. package/comment/index.d.ts +3 -3
  20. package/copy/index.d.ts +2 -2
  21. package/core/index.d.ts +22 -22
  22. package/date-picker/index.d.ts +111 -111
  23. package/date-range/index.d.ts +5 -5
  24. package/dialog/index.d.ts +18 -18
  25. package/divider/index.d.ts +3 -3
  26. package/drag-drop/index.d.ts +7 -7
  27. package/dropdown/index.d.ts +10 -10
  28. package/empty/index.d.ts +12 -12
  29. package/fesm2022/ngx-tethys-action.mjs +14 -12
  30. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  31. package/fesm2022/ngx-tethys-affix.mjs +7 -7
  32. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-alert.mjs +10 -10
  34. package/fesm2022/ngx-tethys-anchor.mjs +11 -11
  35. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  36. package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
  37. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys-autocomplete.mjs +19 -18
  39. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  40. package/fesm2022/ngx-tethys-avatar.mjs +23 -22
  41. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-back-top.mjs +7 -7
  43. package/fesm2022/ngx-tethys-badge.mjs +7 -7
  44. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
  46. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-button.mjs +16 -16
  48. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-calendar.mjs +16 -16
  50. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-card.mjs +13 -13
  52. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-carousel.mjs +15 -15
  54. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-cascader.mjs +41 -34
  56. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
  58. package/fesm2022/ngx-tethys-collapse.mjs +10 -10
  59. package/fesm2022/ngx-tethys-color-picker.mjs +65 -57
  60. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-comment.mjs +13 -13
  62. package/fesm2022/ngx-tethys-copy.mjs +10 -10
  63. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  64. package/fesm2022/ngx-tethys-core.mjs +30 -25
  65. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  66. package/fesm2022/ngx-tethys-date-picker.mjs +184 -174
  67. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  68. package/fesm2022/ngx-tethys-date-range.mjs +16 -16
  69. package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
  70. package/fesm2022/ngx-tethys-dialog.mjs +24 -24
  71. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  72. package/fesm2022/ngx-tethys-divider.mjs +7 -7
  73. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  74. package/fesm2022/ngx-tethys-dot.mjs +7 -7
  75. package/fesm2022/ngx-tethys-drag-drop.mjs +24 -24
  76. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-dropdown.mjs +48 -47
  78. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-empty.mjs +13 -13
  80. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-flexible-text.mjs +7 -7
  82. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-form.mjs +64 -61
  84. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-fullscreen.mjs +18 -15
  86. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-grid.mjs +34 -33
  88. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-guider.mjs +25 -24
  90. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-i18n.mjs +3 -3
  92. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-icon.mjs +15 -13
  94. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-image.mjs +31 -29
  96. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-input-number.mjs +17 -10
  98. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-input.mjs +28 -27
  100. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-layout.mjs +63 -63
  102. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-list.mjs +21 -18
  104. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-loading.mjs +7 -7
  106. package/fesm2022/ngx-tethys-mention.mjs +35 -31
  107. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  108. package/fesm2022/ngx-tethys-menu.mjs +26 -26
  109. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  110. package/fesm2022/ngx-tethys-message.mjs +24 -24
  111. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  112. package/fesm2022/ngx-tethys-nav.mjs +27 -27
  113. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  114. package/fesm2022/ngx-tethys-notify.mjs +20 -20
  115. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  116. package/fesm2022/ngx-tethys-pagination.mjs +18 -18
  117. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  118. package/fesm2022/ngx-tethys-popover.mjs +22 -21
  119. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  120. package/fesm2022/ngx-tethys-progress.mjs +17 -17
  121. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  122. package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
  123. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  124. package/fesm2022/ngx-tethys-property.mjs +12 -11
  125. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  126. package/fesm2022/ngx-tethys-radio.mjs +17 -17
  127. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-rate.mjs +12 -12
  129. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-resizable.mjs +21 -18
  131. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  132. package/fesm2022/ngx-tethys-result.mjs +11 -11
  133. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  134. package/fesm2022/ngx-tethys-segment.mjs +19 -16
  135. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-select.mjs +60 -38
  137. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  138. package/fesm2022/ngx-tethys-shared.mjs +82 -79
  139. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  140. package/fesm2022/ngx-tethys-skeleton.mjs +32 -32
  141. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  142. package/fesm2022/ngx-tethys-slide.mjs +37 -36
  143. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  144. package/fesm2022/ngx-tethys-slider.mjs +11 -11
  145. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  146. package/fesm2022/ngx-tethys-space.mjs +10 -10
  147. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  148. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-stepper.mjs +22 -22
  150. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-strength.mjs +7 -7
  152. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  154. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-table.mjs +28 -28
  156. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-tabs.mjs +13 -13
  158. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-tag.mjs +11 -11
  160. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-testing.mjs +1 -1
  162. package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys-time-picker.mjs +22 -22
  164. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  165. package/fesm2022/ngx-tethys-timeline.mjs +14 -14
  166. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  167. package/fesm2022/ngx-tethys-tooltip.mjs +19 -16
  168. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  169. package/fesm2022/ngx-tethys-transfer.mjs +15 -15
  170. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  171. package/fesm2022/ngx-tethys-tree-select.mjs +17 -17
  172. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  173. package/fesm2022/ngx-tethys-tree.mjs +50 -43
  174. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  175. package/fesm2022/ngx-tethys-typography.mjs +16 -16
  176. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys-upload.mjs +26 -25
  178. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  179. package/fesm2022/ngx-tethys-util.mjs +11 -5
  180. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  181. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  182. package/fesm2022/ngx-tethys-watermark.mjs +18 -15
  183. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  184. package/fesm2022/ngx-tethys.mjs +1 -1
  185. package/fesm2022/ngx-tethys.mjs.map +1 -1
  186. package/flexible-text/index.d.ts +5 -5
  187. package/form/index.d.ts +26 -22
  188. package/fullscreen/index.d.ts +4 -4
  189. package/grid/index.d.ts +12 -12
  190. package/guider/index.d.ts +10 -10
  191. package/i18n/index.d.ts +1 -1
  192. package/icon/index.d.ts +3 -3
  193. package/image/index.d.ts +12 -12
  194. package/input/index.d.ts +22 -22
  195. package/input-number/index.d.ts +4 -4
  196. package/layout/index.d.ts +16 -16
  197. package/list/index.d.ts +16 -15
  198. package/mention/index.d.ts +4 -4
  199. package/menu/index.d.ts +7 -7
  200. package/message/index.d.ts +5 -5
  201. package/nav/index.d.ts +12 -12
  202. package/notify/index.d.ts +1 -1
  203. package/package.json +1 -1
  204. package/pagination/index.d.ts +21 -17
  205. package/popover/index.d.ts +8 -8
  206. package/progress/index.d.ts +18 -18
  207. package/property/index.d.ts +6 -6
  208. package/property-operation/index.d.ts +3 -3
  209. package/radio/index.d.ts +6 -6
  210. package/rate/index.d.ts +5 -5
  211. package/resizable/index.d.ts +2 -2
  212. package/result/index.d.ts +8 -8
  213. package/schematics/testing/test-workspace.js +1 -0
  214. package/schematics/version.d.ts +1 -1
  215. package/schematics/version.js +1 -1
  216. package/segment/index.d.ts +9 -9
  217. package/select/index.d.ts +21 -21
  218. package/shared/index.d.ts +29 -29
  219. package/skeleton/index.d.ts +52 -52
  220. package/slide/index.d.ts +5 -5
  221. package/slider/index.d.ts +6 -6
  222. package/space/index.d.ts +1 -1
  223. package/statistic/index.d.ts +18 -18
  224. package/stepper/index.d.ts +8 -8
  225. package/switch/index.d.ts +2 -2
  226. package/table/index.d.ts +24 -24
  227. package/tabs/index.d.ts +6 -6
  228. package/testing/index.d.ts +1 -1
  229. package/time-picker/index.d.ts +21 -21
  230. package/timeline/index.d.ts +8 -8
  231. package/tooltip/index.d.ts +12 -12
  232. package/transfer/index.d.ts +16 -16
  233. package/tree/index.d.ts +28 -28
  234. package/tree-select/index.d.ts +13 -13
  235. package/typography/index.d.ts +3 -3
  236. package/upload/index.d.ts +4 -4
  237. package/util/index.d.ts +17 -7
  238. package/vote/index.d.ts +2 -2
  239. package/watermark/index.d.ts +2 -2
@@ -92,6 +92,7 @@ class ThyIconRegistry {
92
92
  }
93
93
  toSvgElement(element) {
94
94
  const svg = this.svgElementFromString('<svg></svg>');
95
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
95
96
  for (let i = 0; i < element.childNodes.length; i++) {
96
97
  if (element.childNodes[i].nodeType === this.document.ELEMENT_NODE) {
97
98
  svg.appendChild(element.childNodes[i].cloneNode(true));
@@ -231,7 +232,7 @@ class ThyIconRegistry {
231
232
  return this;
232
233
  }
233
234
  buildIconKey(namespace, name) {
234
- return namespace + ':' + name;
235
+ return `${namespace}:${name}`;
235
236
  }
236
237
  splitIconName(iconName) {
237
238
  if (!iconName) {
@@ -339,10 +340,10 @@ class ThyIconRegistry {
339
340
  setIconMode(mode) {
340
341
  this.internalIconMode = mode;
341
342
  }
342
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
343
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIconRegistry, providedIn: 'root' }); }
343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
344
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIconRegistry, providedIn: 'root' }); }
344
345
  }
345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIconRegistry, decorators: [{
346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIconRegistry, decorators: [{
346
347
  type: Injectable,
347
348
  args: [{
348
349
  providedIn: 'root'
@@ -433,6 +434,7 @@ class ThyIcon {
433
434
  // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/
434
435
  // Do this before inserting the element into the DOM, in order to avoid a style recalculation.
435
436
  const styleTags = svg.querySelectorAll('style');
437
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
436
438
  for (let i = 0; i < styleTags.length; i++) {
437
439
  styleTags[i].textContent += ' ';
438
440
  }
@@ -496,10 +498,10 @@ class ThyIcon {
496
498
  const styleElements = svg.querySelectorAll('style');
497
499
  styleElements.forEach((n) => {
498
500
  if (n.style.cssText.includes('url')) {
499
- n.style.fill = n.style.fill.replace('url("', 'url("' + location.pathname);
501
+ n.style.fill = n.style.fill.replace('url("', `url("${location.pathname}`);
500
502
  }
501
503
  if (n.style.cssText.includes('clip-path')) {
502
- n.style.clipPath = n.style.clipPath.replace('url("', 'url("' + location.pathname);
504
+ n.style.clipPath = n.style.clipPath.replace('url("', `url("${location.pathname}`);
503
505
  }
504
506
  });
505
507
  }
@@ -507,10 +509,10 @@ class ThyIcon {
507
509
  const titleElement = svg.querySelector('title');
508
510
  titleElement && titleElement.remove();
509
511
  }
510
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
511
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.14", type: ThyIcon, isStandalone: true, selector: "thy-icon, [thy-icon]", inputs: { thyIconType: { classPropertyName: "thyIconType", publicName: "thyIconType", isSignal: true, isRequired: false, transformFunction: null }, thyTwotoneColor: { classPropertyName: "thyTwotoneColor", publicName: "thyTwotoneColor", isSignal: true, isRequired: false, transformFunction: null }, thyIconName: { classPropertyName: "thyIconName", publicName: "thyIconName", isSignal: true, isRequired: true, transformFunction: null }, thyIconRotate: { classPropertyName: "thyIconRotate", publicName: "thyIconRotate", isSignal: true, isRequired: false, transformFunction: null }, thyIconSet: { classPropertyName: "thyIconSet", publicName: "thyIconSet", isSignal: true, isRequired: false, transformFunction: null }, thyIconLegging: { classPropertyName: "thyIconLegging", publicName: "thyIconLegging", isSignal: true, isRequired: false, transformFunction: null }, thyIconLinearGradient: { classPropertyName: "thyIconLinearGradient", publicName: "thyIconLinearGradient", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-icon-legging": "thyIconLegging()" }, classAttribute: "thy-icon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
512
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
513
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: ThyIcon, isStandalone: true, selector: "thy-icon, [thy-icon]", inputs: { thyIconType: { classPropertyName: "thyIconType", publicName: "thyIconType", isSignal: true, isRequired: false, transformFunction: null }, thyTwotoneColor: { classPropertyName: "thyTwotoneColor", publicName: "thyTwotoneColor", isSignal: true, isRequired: false, transformFunction: null }, thyIconName: { classPropertyName: "thyIconName", publicName: "thyIconName", isSignal: true, isRequired: true, transformFunction: null }, thyIconRotate: { classPropertyName: "thyIconRotate", publicName: "thyIconRotate", isSignal: true, isRequired: false, transformFunction: null }, thyIconSet: { classPropertyName: "thyIconSet", publicName: "thyIconSet", isSignal: true, isRequired: false, transformFunction: null }, thyIconLegging: { classPropertyName: "thyIconLegging", publicName: "thyIconLegging", isSignal: true, isRequired: false, transformFunction: null }, thyIconLinearGradient: { classPropertyName: "thyIconLinearGradient", publicName: "thyIconLinearGradient", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-icon-legging": "thyIconLegging()" }, classAttribute: "thy-icon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
512
514
  }
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIcon, decorators: [{
515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIcon, decorators: [{
514
516
  type: Component,
515
517
  args: [{
516
518
  selector: 'thy-icon, [thy-icon]',
@@ -525,11 +527,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
525
527
  }], ctorParameters: () => [], propDecorators: { thyIconType: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIconType", required: false }] }], thyTwotoneColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTwotoneColor", required: false }] }], thyIconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIconName", required: true }] }], thyIconRotate: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIconRotate", required: false }] }], thyIconSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIconSet", required: false }] }], thyIconLegging: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIconLegging", required: false }] }], thyIconLinearGradient: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIconLinearGradient", required: false }] }] } });
526
528
 
527
529
  class ThyIconModule {
528
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
529
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThyIconModule, imports: [ThyIcon, CommonModule, FormsModule], exports: [ThyIcon] }); }
530
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIconModule, imports: [CommonModule, FormsModule] }); }
530
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
531
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyIconModule, imports: [ThyIcon, CommonModule, FormsModule], exports: [ThyIcon] }); }
532
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIconModule, imports: [CommonModule, FormsModule] }); }
531
533
  }
532
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyIconModule, decorators: [{
534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyIconModule, decorators: [{
533
535
  type: NgModule,
534
536
  args: [{
535
537
  declarations: [],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-icon.mjs","sources":["../../../src/icon/config.ts","../../../src/icon/icon-registry.ts","../../../src/icon/icon.component.ts","../../../src/icon/icon.module.ts","../../../src/icon/ngx-tethys-icon.ts"],"sourcesContent":["let printErrorWhenNotFound = true;\n\nexport function setPrintErrorWhenIconNotFound(value: boolean) {\n printErrorWhenNotFound = value;\n}\n\nexport function getWhetherPrintErrorWhenIconNotFound() {\n return printErrorWhenNotFound;\n}\n","import { forkJoin, Observable, of, throwError } from 'rxjs';\nimport { catchError, finalize, map, share, tap } from 'rxjs/operators';\n\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { Injectable, SecurityContext, inject, DOCUMENT } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeResourceUrl } from '@angular/platform-browser';\nimport { isString } from 'ngx-tethys/util';\n\nclass SvgIconConfig {\n url: SafeResourceUrl | null;\n svgElement: SVGElement | null;\n\n constructor(data: SafeResourceUrl | SVGElement) {\n // Note that we can't use `instanceof SVGElement` here,\n // because it'll break during server-side rendering.\n if (data && !!(data as any).nodeName) {\n this.svgElement = data as SVGElement;\n } else {\n this.url = data as SafeResourceUrl;\n }\n }\n}\n\nexport type IconMode = 'font' | 'svg';\n\nexport type SvgResourceUrl = SafeResourceUrl | string;\n\nexport type SvgHtml = SafeHtml | string;\n\n/**\n * @order 20\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ThyIconRegistry {\n private sanitizer = inject(DomSanitizer);\n private httpClient = inject(HttpClient, { optional: false });\n private document = inject(DOCUMENT);\n\n private defaultFontSetClass = 'wt-icon';\n private internalIconMode: IconMode = 'svg';\n private svgIconConfigs = new Map<string, SvgIconConfig>();\n private svgIconSetConfigs = new Map<string, SvgIconConfig[]>();\n private inProgressUrlFetches = new Map<string, Observable<string>>();\n\n public get iconMode() {\n return this.internalIconMode;\n }\n\n private getIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n }\n\n private getIconFailedToSanitizeLiteralError(literal: SvgHtml): Error {\n return Error(\n `The literal provided to ThyIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`\n );\n }\n\n private internalAddSvgIconSet(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this.svgIconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this.svgIconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n\n private cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n }\n\n private fetchUrl(safeUrl: SafeResourceUrl | null): Observable<string> {\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !url) {\n throw new Error(\n `The URL provided to ThyIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`\n );\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this.inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n } else {\n // TODO(jelbourn): for some reason, the `finalize` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const req = this.httpClient.get(url, { responseType: 'text' }).pipe(\n finalize(() => this.inProgressUrlFetches.delete(url)),\n share()\n );\n\n this.inProgressUrlFetches.set(url, req);\n return req;\n }\n }\n\n private toSvgElement(element: Element): SVGElement {\n const svg = this.svgElementFromString('<svg></svg>');\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this.document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n private extractSvgIconFromIconSet(iconSet: SVGElement, iconName: string): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this.setSvgAttributes(iconElement as SVGElement);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this.setSvgAttributes(this.toSvgElement(iconElement));\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this.svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this.setSvgAttributes(svg);\n }\n\n private extractIconWithNameFromIconSetConfigs(iconName: string, iconSetConfigs: SvgIconConfig[]): SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n if (config.svgElement) {\n const foundIcon = this.extractSvgIconFromIconSet(config.svgElement, iconName);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n private svgElementFromString(str: string): SVGElement {\n const div = this.document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n private setSvgAttributes(svg: SVGElement): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '1em');\n svg.setAttribute('width', '1em');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n return svg;\n }\n\n private createSvgElementForSingleIcon(responseText: string): SVGElement {\n const svg = this.svgElementFromString(responseText);\n this.setSvgAttributes(svg);\n return svg;\n }\n\n private loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this.fetchUrl(config.url).pipe(map(svgText => this.createSvgElementForSingleIcon(svgText)));\n }\n\n private loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n // If the SVG for this icon set has already been parsed, do nothing.\n if (config.svgElement) {\n return of(config.svgElement);\n }\n\n return this.fetchUrl(config.url).pipe(\n map(svgText => {\n // It is possible that the icon set was parsed and cached by an earlier request, so parsing\n // only needs to occur if the cache is yet unset.\n if (!config.svgElement) {\n config.svgElement = this.svgElementFromString(svgText);\n }\n\n return config.svgElement;\n })\n );\n }\n\n private getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return of(this.cloneSvg(config.svgElement));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this.loadSvgIconFromConfig(config).pipe(\n tap(svg => (config.svgElement = svg)),\n map(svg => this.cloneSvg(svg))\n );\n }\n }\n\n private getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]): Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this.extractIconWithNameFromIconSetConfigs(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return of(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<SVGElement | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return this.loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse): Observable<SVGElement | null> => {\n const url = this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n console.error(`Loading icon set URL: ${url} failed: ${err.message}`);\n return of(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(\n map(() => {\n const foundIcon = this.extractIconWithNameFromIconSetConfigs(name, iconSetConfigs);\n\n if (!foundIcon) {\n throw this.getIconNameNotFoundError(name);\n }\n\n return foundIcon;\n })\n );\n }\n\n private internalAddSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this.svgIconConfigs.set(this.buildIconKey(namespace, iconName), config);\n return this;\n }\n\n public buildIconKey(namespace: string, name: string) {\n return namespace + ':' + name;\n }\n\n public splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1:\n return ['', parts[0]]; // Use default namespace.\n case 2:\n return <[string, string]>parts;\n default:\n throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n\n public addSvgIconSetInNamespace(namespace: string, url: SvgResourceUrl): this {\n url = isString(url) ? this.sanitizer.bypassSecurityTrustResourceUrl(url) : url;\n return this.internalAddSvgIconSet(namespace, new SvgIconConfig(url));\n }\n\n /**\n * 添加SVG图标集,添加到默认命名空间\n */\n public addSvgIconSet(url: SvgResourceUrl): this {\n return this.addSvgIconSetInNamespace('', url);\n }\n\n public addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml): this {\n const sanitizedLiteral = this.sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw this.getIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this.svgElementFromString(sanitizedLiteral);\n return this.internalAddSvgIconSet(namespace, new SvgIconConfig(svgElement));\n }\n\n public addSvgIconSetLiteral(literal: SafeHtml): this {\n return this.addSvgIconSetLiteralInNamespace('', literal);\n }\n\n /**\n * @description.en-us Registers an icon by URL in the specified namespace.\n * @description 添加单个SVG图标到指定的命名空间\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n public addSvgIconInNamespace(namespace: string, iconName: string, url: SvgResourceUrl): this {\n url = isString(url) ? this.sanitizer.bypassSecurityTrustResourceUrl(url) : url;\n return this.internalAddSvgIconConfig(namespace, iconName, new SvgIconConfig(url));\n }\n\n /**\n * @description.en-us Registers an icon by URL in the default namespace.\n * @description 添加单个SVG图标\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n public addSvgIcon(iconName: string, url: SvgResourceUrl): this {\n return this.addSvgIconInNamespace('', iconName, url);\n }\n\n /**\n * @description.en-us Registers an icon using an HTML string in the default namespace.\n * @description 添加单个SVG图标字符串,直接传入 SVG HTML 字符串\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n public addSvgIconLiteral(iconName: string, literal: SvgHtml): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal);\n }\n\n /**\n * @description.en-us Registers an icon using an HTML string in the specified namespace.\n * @description 添加单个SVG图标字符串到指定的命名空间,直接传入 SVG HTML 字符串\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n public addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SvgHtml): this {\n literal = isString(literal) ? this.sanitizer.bypassSecurityTrustHtml(literal) : literal;\n const sanitizedLiteral = this.sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw this.getIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this.createSvgElementForSingleIcon(sanitizedLiteral);\n return this.internalAddSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));\n }\n\n public getDefaultFontSetClass() {\n return this.defaultFontSetClass;\n }\n\n public getFontSetClassByAlias(fontSet: string) {\n return fontSet;\n }\n\n /**\n * 获取某个图标\n */\n public getSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = this.buildIconKey(namespace, name);\n const config = this.svgIconConfigs.get(key);\n\n if (config) {\n return this.getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this.svgIconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this.getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return throwError(this.getIconNameNotFoundError(key));\n }\n\n public setIconMode(mode: IconMode) {\n this.internalIconMode = mode;\n }\n}\n","import { take } from 'rxjs/operators';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Renderer2,\n ViewEncapsulation,\n numberAttribute,\n inject,\n input,\n effect\n} from '@angular/core';\n\nimport { getWhetherPrintErrorWhenIconNotFound } from './config';\nimport { ThyIconRegistry } from './icon-registry';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst iconSuffixMap = {\n fill: 'fill',\n twotone: 'tt'\n};\n\n/**\n * 图标组件\n * @name thy-icon,[thy-icon]\n * @order 10\n */\n@Component({\n selector: 'thy-icon, [thy-icon]',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'thy-icon',\n '[class.thy-icon-legging]': 'thyIconLegging()'\n }\n})\nexport class ThyIcon {\n private render = inject(Renderer2);\n private elementRef = inject(ElementRef);\n private iconRegistry = inject(ThyIconRegistry);\n\n /**\n * 图标的类型\n * @type outline | fill | twotone\n */\n readonly thyIconType = input<'outline' | 'fill' | 'twotone'>('outline');\n\n readonly thyTwotoneColor = input<string>();\n\n /**\n * 图标的名字\n */\n readonly thyIconName = input.required<string>();\n\n /**\n * 图标的旋转角度\n * @default 0\n */\n readonly thyIconRotate = input<number, unknown>(undefined, { transform: numberAttribute });\n\n readonly thyIconSet = input<string>();\n\n /**\n * 图标打底色,镂空的图标,会透过颜色来\n */\n readonly thyIconLegging = input(false, { transform: coerceBooleanProperty });\n\n readonly thyIconLinearGradient = input(false, { transform: coerceBooleanProperty });\n\n private hostRenderer = useHostRenderer();\n\n constructor() {\n effect(() => {\n this.updateClasses();\n });\n effect(() => {\n this.setStyleRotate();\n });\n }\n\n private updateClasses() {\n const [namespace, iconName] = this.iconRegistry.splitIconName(this.thyIconName());\n if (iconName) {\n if (this.iconRegistry.iconMode === 'svg') {\n this.iconRegistry\n .getSvgIcon(this.buildIconNameByType(iconName), namespace)\n .pipe(take(1))\n .subscribe(\n svg => {\n this.setSvgElement(svg);\n },\n (error: Error) => {\n if (getWhetherPrintErrorWhenIconNotFound()) {\n console.error(`Error retrieving icon: ${error.message}`);\n }\n }\n );\n this.hostRenderer.updateClass([`thy-icon${namespace ? `-${namespace}` : ``}-${this.buildIconNameByType(iconName)}`]);\n } else {\n const fontSetClass = this.thyIconSet()\n ? this.iconRegistry.getFontSetClassByAlias(this.thyIconSet())\n : this.iconRegistry.getDefaultFontSetClass();\n this.hostRenderer.updateClass([fontSetClass, `${fontSetClass}-${this.thyIconName()}`]);\n }\n }\n }\n\n private setStyleRotate() {\n if (this.thyIconRotate() !== undefined) {\n // 基于 effect 无法保证在 setSvgElement 之前执行,所以这里增加判断\n const svg = this.elementRef.nativeElement.querySelector('svg');\n if (!svg) {\n return;\n }\n this.render.setStyle(svg, 'transform', `rotate(${this.thyIconRotate()}deg)`);\n }\n }\n\n //#region svg element\n\n private setSvgElement(svg: SVGElement) {\n this.clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n if (this.thyIconType() === 'twotone') {\n const allPaths = svg.querySelectorAll('path');\n if (allPaths.length > 1) {\n allPaths.forEach((child, index: number) => {\n if (child.getAttribute('id').includes('secondary-color')) {\n child.setAttribute('fill', this.thyTwotoneColor());\n }\n });\n }\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n // if (this._location) {\n // const path = this._location.getPathname();\n // this._previousPath = path;\n // this._cacheChildrenWithExternalReferences(svg);\n // this._prependPathToReferences(path);\n // }\n if (this.thyIconLinearGradient()) {\n this.setBaseUrl(svg);\n this.clearTitleElement(svg);\n }\n\n this.elementRef.nativeElement.appendChild(svg);\n this.setStyleRotate();\n }\n\n private clearSvgElement() {\n const layoutElement: HTMLElement = this.elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n // if (this._elementsWithExternalReferences) {\n // this._elementsWithExternalReferences.clear();\n // }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n //#endregion\n\n private buildIconNameByType(iconName: string) {\n if (this.thyIconType() && ['fill', 'twotone'].indexOf(this.thyIconType()) >= 0) {\n const suffix = iconSuffixMap[this.thyIconType() as keyof typeof iconSuffixMap];\n return iconName.includes(`-${suffix}`) ? iconName : `${iconName}-${suffix}`;\n } else {\n return iconName;\n }\n }\n\n /**\n * Support Safari SVG LinearGradient.\n * @param svg\n */\n private setBaseUrl(svg: SVGElement) {\n const styleElements = svg.querySelectorAll('style');\n styleElements.forEach((n: HTMLElement) => {\n if (n.style.cssText.includes('url')) {\n n.style.fill = n.style.fill.replace('url(\"', 'url(\"' + location.pathname);\n }\n if (n.style.cssText.includes('clip-path')) {\n n.style.clipPath = n.style.clipPath.replace('url(\"', 'url(\"' + location.pathname);\n }\n });\n }\n\n private clearTitleElement(svg: SVGElement) {\n const titleElement = svg.querySelector('title');\n titleElement && titleElement.remove();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { ThyIcon } from './icon.component';\n\n@NgModule({\n declarations: [],\n exports: [ThyIcon],\n imports: [ThyIcon, CommonModule, FormsModule],\n providers: []\n})\nexport class ThyIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,IAAI,sBAAsB,GAAG,IAAI;AAE3B,SAAU,6BAA6B,CAAC,KAAc,EAAA;IACxD,sBAAsB,GAAG,KAAK;AAClC;SAEgB,oCAAoC,GAAA;AAChD,IAAA,OAAO,sBAAsB;AACjC;;ACAA,MAAM,aAAa,CAAA;AAIf,IAAA,WAAA,CAAY,IAAkC,EAAA;;;QAG1C,IAAI,IAAI,IAAI,CAAC,CAAE,IAAY,CAAC,QAAQ,EAAE;AAClC,YAAA,IAAI,CAAC,UAAU,GAAG,IAAkB;QACxC;aAAO;AACH,YAAA,IAAI,CAAC,GAAG,GAAG,IAAuB;QACtC;IACJ;AACH;AAQD;;AAEG;MAIU,eAAe,CAAA;AAH5B,IAAA,WAAA,GAAA;AAIY,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC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BAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,0BAA0B,EAAE;AAC/B;AACJ,iBAAA;;;MC3BY,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHZ,OAAO,EAAE,YAAY,EAAE,WAAW,aADlC,OAAO,CAAA,EAAA,CAAA,CAAA;gHAIR,aAAa,EAAA,OAAA,EAAA,CAHH,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;;4FAGnC,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,OAAO,CAAC;AAClB,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC;AAC7C,oBAAA,SAAS,EAAE;AACd,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-icon.mjs","sources":["../../../src/icon/config.ts","../../../src/icon/icon-registry.ts","../../../src/icon/icon.component.ts","../../../src/icon/icon.module.ts","../../../src/icon/ngx-tethys-icon.ts"],"sourcesContent":["let printErrorWhenNotFound = true;\n\nexport function setPrintErrorWhenIconNotFound(value: boolean) {\n printErrorWhenNotFound = value;\n}\n\nexport function getWhetherPrintErrorWhenIconNotFound() {\n return printErrorWhenNotFound;\n}\n","import { forkJoin, Observable, of, throwError } from 'rxjs';\nimport { catchError, finalize, map, share, tap } from 'rxjs/operators';\n\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { Injectable, SecurityContext, inject, DOCUMENT } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeResourceUrl } from '@angular/platform-browser';\nimport { isString } from 'ngx-tethys/util';\n\nclass SvgIconConfig {\n url!: SafeResourceUrl | null;\n svgElement!: SVGElement | null;\n\n constructor(data: SafeResourceUrl | SVGElement) {\n // Note that we can't use `instanceof SVGElement` here,\n // because it'll break during server-side rendering.\n if (data && !!(data as any).nodeName) {\n this.svgElement = data as SVGElement;\n } else {\n this.url = data as SafeResourceUrl;\n }\n }\n}\n\nexport type IconMode = 'font' | 'svg';\n\nexport type SvgResourceUrl = SafeResourceUrl | string;\n\nexport type SvgHtml = SafeHtml | string;\n\n/**\n * @order 20\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ThyIconRegistry {\n private sanitizer = inject(DomSanitizer);\n private httpClient = inject(HttpClient, { optional: false });\n private document = inject(DOCUMENT);\n\n private defaultFontSetClass = 'wt-icon';\n private internalIconMode: IconMode = 'svg';\n private svgIconConfigs = new Map<string, SvgIconConfig>();\n private svgIconSetConfigs = new Map<string, SvgIconConfig[]>();\n private inProgressUrlFetches = new Map<string, Observable<string>>();\n\n public get iconMode() {\n return this.internalIconMode;\n }\n\n private getIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n }\n\n private getIconFailedToSanitizeLiteralError(literal: SvgHtml): Error {\n return Error(\n `The literal provided to ThyIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`\n );\n }\n\n private internalAddSvgIconSet(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this.svgIconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this.svgIconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n\n private cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n }\n\n private fetchUrl(safeUrl: SafeResourceUrl | null): Observable<string> {\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl)!;\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !url) {\n throw new Error(\n `The URL provided to ThyIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`\n );\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this.inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n } else {\n // TODO(jelbourn): for some reason, the `finalize` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const req = this.httpClient.get(url, { responseType: 'text' }).pipe(\n finalize(() => this.inProgressUrlFetches.delete(url)),\n share()\n );\n\n this.inProgressUrlFetches.set(url, req);\n return req;\n }\n }\n\n private toSvgElement(element: Element): SVGElement {\n const svg = this.svgElementFromString('<svg></svg>');\n\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this.document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n private extractSvgIconFromIconSet(iconSet: SVGElement, iconName: string): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this.setSvgAttributes(iconElement as SVGElement);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this.setSvgAttributes(this.toSvgElement(iconElement));\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this.svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this.setSvgAttributes(svg);\n }\n\n private extractIconWithNameFromIconSetConfigs(iconName: string, iconSetConfigs: SvgIconConfig[]): SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n if (config.svgElement) {\n const foundIcon = this.extractSvgIconFromIconSet(config.svgElement, iconName);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n private svgElementFromString(str: string): SVGElement {\n const div = this.document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n private setSvgAttributes(svg: SVGElement): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '1em');\n svg.setAttribute('width', '1em');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n return svg;\n }\n\n private createSvgElementForSingleIcon(responseText: string): SVGElement {\n const svg = this.svgElementFromString(responseText);\n this.setSvgAttributes(svg);\n return svg;\n }\n\n private loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this.fetchUrl(config.url).pipe(map(svgText => this.createSvgElementForSingleIcon(svgText)));\n }\n\n private loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n // If the SVG for this icon set has already been parsed, do nothing.\n if (config.svgElement) {\n return of(config.svgElement);\n }\n\n return this.fetchUrl(config.url).pipe(\n map(svgText => {\n // It is possible that the icon set was parsed and cached by an earlier request, so parsing\n // only needs to occur if the cache is yet unset.\n if (!config.svgElement) {\n config.svgElement = this.svgElementFromString(svgText);\n }\n\n return config.svgElement;\n })\n );\n }\n\n private getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return of(this.cloneSvg(config.svgElement));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this.loadSvgIconFromConfig(config).pipe(\n tap(svg => (config.svgElement = svg)),\n map(svg => this.cloneSvg(svg))\n );\n }\n }\n\n private getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]): Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this.extractIconWithNameFromIconSetConfigs(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return of(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<SVGElement | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return this.loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse): Observable<SVGElement | null> => {\n const url = this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n console.error(`Loading icon set URL: ${url} failed: ${err.message}`);\n return of(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(\n map(() => {\n const foundIcon = this.extractIconWithNameFromIconSetConfigs(name, iconSetConfigs);\n\n if (!foundIcon) {\n throw this.getIconNameNotFoundError(name);\n }\n\n return foundIcon;\n })\n );\n }\n\n private internalAddSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this.svgIconConfigs.set(this.buildIconKey(namespace, iconName), config);\n return this;\n }\n\n public buildIconKey(namespace: string, name: string) {\n return `${namespace }:${ name}`;\n }\n\n public splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1:\n return ['', parts[0]]; // Use default namespace.\n case 2:\n return parts as [string, string];\n default:\n throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n\n public addSvgIconSetInNamespace(namespace: string, url: SvgResourceUrl): this {\n url = isString(url) ? this.sanitizer.bypassSecurityTrustResourceUrl(url) : url;\n return this.internalAddSvgIconSet(namespace, new SvgIconConfig(url));\n }\n\n /**\n * 添加SVG图标集,添加到默认命名空间\n */\n public addSvgIconSet(url: SvgResourceUrl): this {\n return this.addSvgIconSetInNamespace('', url);\n }\n\n public addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml): this {\n const sanitizedLiteral = this.sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw this.getIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this.svgElementFromString(sanitizedLiteral);\n return this.internalAddSvgIconSet(namespace, new SvgIconConfig(svgElement));\n }\n\n public addSvgIconSetLiteral(literal: SafeHtml): this {\n return this.addSvgIconSetLiteralInNamespace('', literal);\n }\n\n /**\n * @description.en-us Registers an icon by URL in the specified namespace.\n * @description 添加单个SVG图标到指定的命名空间\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n public addSvgIconInNamespace(namespace: string, iconName: string, url: SvgResourceUrl): this {\n url = isString(url) ? this.sanitizer.bypassSecurityTrustResourceUrl(url) : url;\n return this.internalAddSvgIconConfig(namespace, iconName, new SvgIconConfig(url));\n }\n\n /**\n * @description.en-us Registers an icon by URL in the default namespace.\n * @description 添加单个SVG图标\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n public addSvgIcon(iconName: string, url: SvgResourceUrl): this {\n return this.addSvgIconInNamespace('', iconName, url);\n }\n\n /**\n * @description.en-us Registers an icon using an HTML string in the default namespace.\n * @description 添加单个SVG图标字符串,直接传入 SVG HTML 字符串\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n public addSvgIconLiteral(iconName: string, literal: SvgHtml): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal);\n }\n\n /**\n * @description.en-us Registers an icon using an HTML string in the specified namespace.\n * @description 添加单个SVG图标字符串到指定的命名空间,直接传入 SVG HTML 字符串\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n public addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SvgHtml): this {\n literal = isString(literal) ? this.sanitizer.bypassSecurityTrustHtml(literal) : literal;\n const sanitizedLiteral = this.sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw this.getIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this.createSvgElementForSingleIcon(sanitizedLiteral);\n return this.internalAddSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));\n }\n\n public getDefaultFontSetClass() {\n return this.defaultFontSetClass;\n }\n\n public getFontSetClassByAlias(fontSet: string) {\n return fontSet;\n }\n\n /**\n * 获取某个图标\n */\n public getSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = this.buildIconKey(namespace, name);\n const config = this.svgIconConfigs.get(key);\n\n if (config) {\n return this.getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this.svgIconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this.getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return throwError(this.getIconNameNotFoundError(key));\n }\n\n public setIconMode(mode: IconMode) {\n this.internalIconMode = mode;\n }\n}\n","import { take } from 'rxjs/operators';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Renderer2,\n ViewEncapsulation,\n numberAttribute,\n inject,\n input,\n effect\n} from '@angular/core';\n\nimport { getWhetherPrintErrorWhenIconNotFound } from './config';\nimport { ThyIconRegistry } from './icon-registry';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst iconSuffixMap = {\n fill: 'fill',\n twotone: 'tt'\n};\n\n/**\n * 图标组件\n * @name thy-icon,[thy-icon]\n * @order 10\n */\n@Component({\n selector: 'thy-icon, [thy-icon]',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'thy-icon',\n '[class.thy-icon-legging]': 'thyIconLegging()'\n }\n})\nexport class ThyIcon {\n private render = inject(Renderer2);\n private elementRef = inject(ElementRef);\n private iconRegistry = inject(ThyIconRegistry);\n\n /**\n * 图标的类型\n * @type outline | fill | twotone\n */\n readonly thyIconType = input<'outline' | 'fill' | 'twotone'>('outline');\n\n readonly thyTwotoneColor = input<string>();\n\n /**\n * 图标的名字\n */\n readonly thyIconName = input.required<string>();\n\n /**\n * 图标的旋转角度\n * @default 0\n */\n readonly thyIconRotate = input<number, unknown>(undefined, { transform: numberAttribute });\n\n readonly thyIconSet = input<string>();\n\n /**\n * 图标打底色,镂空的图标,会透过颜色来\n */\n readonly thyIconLegging = input(false, { transform: coerceBooleanProperty });\n\n readonly thyIconLinearGradient = input(false, { transform: coerceBooleanProperty });\n\n private hostRenderer = useHostRenderer();\n\n constructor() {\n effect(() => {\n this.updateClasses();\n });\n effect(() => {\n this.setStyleRotate();\n });\n }\n\n private updateClasses() {\n const [namespace, iconName] = this.iconRegistry.splitIconName(this.thyIconName());\n if (iconName) {\n if (this.iconRegistry.iconMode === 'svg') {\n this.iconRegistry\n .getSvgIcon(this.buildIconNameByType(iconName), namespace)\n .pipe(take(1))\n .subscribe(\n svg => {\n this.setSvgElement(svg);\n },\n (error: Error) => {\n if (getWhetherPrintErrorWhenIconNotFound()) {\n console.error(`Error retrieving icon: ${error.message}`);\n }\n }\n );\n this.hostRenderer.updateClass([`thy-icon${namespace ? `-${namespace}` : ``}-${this.buildIconNameByType(iconName)}`]);\n } else {\n const fontSetClass = this.thyIconSet()\n ? this.iconRegistry.getFontSetClassByAlias(this.thyIconSet()!)\n : this.iconRegistry.getDefaultFontSetClass();\n this.hostRenderer.updateClass([fontSetClass, `${fontSetClass}-${this.thyIconName()}`]);\n }\n }\n }\n\n private setStyleRotate() {\n if (this.thyIconRotate() !== undefined) {\n // 基于 effect 无法保证在 setSvgElement 之前执行,所以这里增加判断\n const svg = this.elementRef.nativeElement.querySelector('svg');\n if (!svg) {\n return;\n }\n this.render.setStyle(svg, 'transform', `rotate(${this.thyIconRotate()}deg)`);\n }\n }\n\n //#region svg element\n\n private setSvgElement(svg: SVGElement) {\n this.clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n if (this.thyIconType() === 'twotone') {\n const allPaths = svg.querySelectorAll('path');\n if (allPaths.length > 1) {\n allPaths.forEach((child, index: number) => {\n if (child.getAttribute('id')!.includes('secondary-color')) {\n child.setAttribute('fill', this.thyTwotoneColor()!);\n }\n });\n }\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n // if (this._location) {\n // const path = this._location.getPathname();\n // this._previousPath = path;\n // this._cacheChildrenWithExternalReferences(svg);\n // this._prependPathToReferences(path);\n // }\n if (this.thyIconLinearGradient()) {\n this.setBaseUrl(svg);\n this.clearTitleElement(svg);\n }\n\n this.elementRef.nativeElement.appendChild(svg);\n this.setStyleRotate();\n }\n\n private clearSvgElement() {\n const layoutElement: HTMLElement = this.elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n // if (this._elementsWithExternalReferences) {\n // this._elementsWithExternalReferences.clear();\n // }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n //#endregion\n\n private buildIconNameByType(iconName: string) {\n if (this.thyIconType() && ['fill', 'twotone'].indexOf(this.thyIconType()) >= 0) {\n const suffix = iconSuffixMap[this.thyIconType() as keyof typeof iconSuffixMap];\n return iconName.includes(`-${suffix}`) ? iconName : `${iconName}-${suffix}`;\n } else {\n return iconName;\n }\n }\n\n /**\n * Support Safari SVG LinearGradient.\n * @param svg\n */\n private setBaseUrl(svg: SVGElement) {\n const styleElements = svg.querySelectorAll('style');\n styleElements.forEach((n: HTMLElement) => {\n if (n.style.cssText.includes('url')) {\n n.style.fill = n.style.fill.replace('url(\"', `url(\"${location.pathname}`);\n }\n if (n.style.cssText.includes('clip-path')) {\n n.style.clipPath = n.style.clipPath.replace('url(\"', `url(\"${location.pathname}`);\n }\n });\n }\n\n private clearTitleElement(svg: SVGElement) {\n const titleElement = svg.querySelector('title');\n titleElement && titleElement.remove();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { ThyIcon } from './icon.component';\n\n@NgModule({\n declarations: [],\n exports: [ThyIcon],\n imports: [ThyIcon, CommonModule, FormsModule],\n providers: []\n})\nexport class ThyIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,IAAI,sBAAsB,GAAG,IAAI;AAE3B,SAAU,6BAA6B,CAAC,KAAc,EAAA;IACxD,sBAAsB,GAAG,KAAK;AAClC;SAEgB,oCAAoC,GAAA;AAChD,IAAA,OAAO,sBAAsB;AACjC;;ACAA,MAAM,aAAa,CAAA;AAIf,IAAA,WAAA,CAAY,IAAkC,EAAA;;;QAG1C,IAAI,IAAI,IAAI,CAAC,CAAE,IAAY,CAAC,QAAQ,EAAE;AAClC,YAAA,IAAI,CAAC,UAAU,GAAG,IAAkB;QACxC;aAAO;AACH,YAAA,IAAI,CAAC,GAAG,GAAG,IAAuB;QACtC;IACJ;AACH;AAQD;;AAEG;MAIU,eAAe,CAAA;AAH5B,IAAA,WAAA,GAAA;AAIY,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;QAChC,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAE3B,IAAA,CAAA,mBAAmB,GAAG,SAAS;QAC/B,IAAA,CAAA,gBAAgB,GAAa,KAAK;AAClC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,GAAG,EAAyB;AACjD,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,GAAG,EAA2B;AACtD,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,GAAG,EAA8B;AAuXvE,IAAA;AArXG,IAAA,IAAW,QAAQ,GAAA;QACf,OAAO,IAAI,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,aADlC,OAAO,CAAA,EAAA,CAAA,CAAA;gHAIR,aAAa,EAAA,OAAA,EAAA,CAHH,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;;4FAGnC,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,OAAO,CAAC;AAClB,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC;AAC7C,oBAAA,SAAS,EAAE;AACd,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -39,15 +39,15 @@ class ThyImageGroup {
39
39
  removeImage(index) {
40
40
  this.images.splice(index, 1);
41
41
  }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: ThyImageGroup, isStandalone: true, selector: "thy-image-group, [thyImageGroup]", providers: [
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ThyImageGroup, isStandalone: true, selector: "thy-image-group, [thyImageGroup]", providers: [
44
44
  {
45
45
  provide: THY_IMAGE_GROUP_COMPONENT,
46
46
  useClass: ThyImageGroup
47
47
  }
48
48
  ], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageGroup, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageGroup, decorators: [{
51
51
  type: Component,
52
52
  args: [{
53
53
  selector: 'thy-image-group, [thyImageGroup]',
@@ -210,9 +210,9 @@ class ThyImagePreview {
210
210
  return image;
211
211
  }
212
212
  get previewImageOriginSrc() {
213
- let imageSrc = this.previewImage.origin?.src || this.previewImage.src;
213
+ const imageSrc = this.previewImage.origin?.src || this.previewImage.src;
214
214
  if (imageSrc.startsWith('./')) {
215
- return window.location.host + '/' + imageSrc.split('./')[1];
215
+ return `${window.location.host}/${imageSrc.split('./')[1]}`;
216
216
  }
217
217
  return imageSrc;
218
218
  }
@@ -268,7 +268,7 @@ class ThyImagePreview {
268
268
  this.cdr.detectChanges();
269
269
  }
270
270
  useCalculateZoomUpdate(isUpdateImageWrapper) {
271
- let img = new Image();
271
+ const img = new Image();
272
272
  img.src = this.previewImage.src;
273
273
  img.onload = () => {
274
274
  const { width: offsetWidth, height: offsetHeight } = getClientSize();
@@ -364,7 +364,7 @@ class ThyImagePreview {
364
364
  .subscribe(blob => {
365
365
  const urlCreator = window.URL || window.webkitURL;
366
366
  const objectURL = urlCreator.createObjectURL(blob);
367
- let a = document.createElement('a');
367
+ const a = document.createElement('a');
368
368
  a.download = image.name || 'default.png';
369
369
  a.href = objectURL;
370
370
  a.click();
@@ -471,10 +471,10 @@ class ThyImagePreview {
471
471
  updatePreviewImageWrapperTransform() {
472
472
  this.previewImageWrapperTransform = `translate3d(${this.position.x}px, ${this.position.y}px, 0)`;
473
473
  }
474
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImagePreview, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
475
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThyImagePreview, isStandalone: true, selector: "thy-image-preview", outputs: { downloadClicked: "downloadClicked" }, host: { properties: { "class.thy-image-preview-moving": "isDragging" }, classAttribute: "thy-image-preview-wrap" }, viewQueries: [{ propertyName: "imageRef", first: true, predicate: ["imgRef"], descendants: true }, { propertyName: "imagePreviewWrapper", first: true, predicate: ["imagePreviewWrapper"], descendants: true, static: true }], exportAs: ["thyImagePreview"], ngImport: i0, template: "<div class=\"thy-image-preview\" [class.thy-image-preview-fullscreen]=\"isFullScreen\">\n @if (!isFullScreen) {\n <div class=\"thy-image-preview-header pl-10 pr-8\">\n <div class=\"thy-image-preview-header-info\">\n <p class=\"thy-image-name text-truncate\" [thyTooltipDisabled]=\"previewImage?.name?.length < 32\" [thyTooltip]=\"previewImage?.name\">\n {{ previewImage?.name }}\n </p>\n <span class=\"thy-image-size\"> {{ previewImage?.size }}</span>\n </div>\n <a thyAction thyIcon=\"close\" [thyTooltip]=\"locale().exitPreview\" href=\"javascript:;\" (click)=\"thyDialog.close()\"></a>\n </div>\n }\n @if (isFullScreen) {\n <a\n class=\"thy-image-preview-exit-fullscreen\"\n thyAction\n thyIcon=\"close\"\n href=\"javascript:;\"\n (click)=\"thyFullscreen.exit()\"\n [thyTooltip]=\"locale().exitFullScreen\"></a>\n }\n <div\n class=\"thy-image-preview-img-wrapper\"\n #imagePreviewWrapper\n cdkDrag\n [class.thy-image-preview-inside]=\"isInsideScreen\"\n [style.transform]=\"previewImageWrapperTransform\"\n [cdkDragFreeDragPosition]=\"position\"\n (cdkDragReleased)=\"dragReleased()\">\n @for (image of images; track $index; let imageIndex = $index) {\n @if (previewIndex === imageIndex && isLoadingDone) {\n <img #imgRef class=\"thy-image-preview-img\" [src]=\"image.objectURL || image.src\" [style.transform]=\"previewImageTransform\" />\n }\n }\n <thy-loading [thyDone]=\"isLoadingDone\"></thy-loading>\n </div>\n\n @if (images.length > 1 && !isFullScreen) {\n <div\n class=\"thy-image-preview-switch-left\"\n [thyTooltipDisabled]=\"previewIndex <= 0\"\n [thyTooltip]=\"locale().prev\"\n [class.thy-image-preview-switch-left-disabled]=\"previewIndex <= 0\"\n (click)=\"prev()\">\n <thy-icon thyIconName=\"angle-left-bold\"></thy-icon>\n </div>\n <div\n class=\"thy-image-preview-switch-right\"\n [thyTooltip]=\"locale().next\"\n [thyTooltipDisabled]=\"previewIndex >= images.length - 1\"\n [class.thy-image-preview-switch-right-disabled]=\"previewIndex >= images.length - 1\"\n (click)=\"next()\">\n <thy-icon thyIconName=\"angle-right-bold\"> </thy-icon>\n </div>\n }\n @if (!isFullScreen) {\n <thy-actions thySize=\"xs\" class=\"thy-image-preview-operations py-3 px-4\">\n @for (option of previewOperations; track $index; let i = $index) {\n @if (!['original-scale', 'fit-screen', 'copyLink'].includes(option.type) || currentImageMode === option.type) {\n <a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"option.icon\"\n [thyTooltip]=\"option.name\"\n [thyTooltipOffset]=\"13\"\n (click)=\"option.action(previewImage)\"></a>\n }\n @if (option?.type === 'zoom-out') {\n <span class=\"mr-2\"> {{ (zoom * 100).toFixed(0) + '%' }} </span>\n }\n @if (option?.type === 'rotate-right') {\n <thy-divider class=\"ml-2\" [thyVertical]=\"true\"></thy-divider>\n }\n @if (option.type === 'copyLink') {\n <a\n href=\"javascript:;\"\n thyAction\n [thyCopyTips]=\"option.name\"\n [thyActionIcon]=\"option.icon\"\n [thyCopyTipsOffset]=\"13\"\n (thyCopy)=\"copyLink($event)\"\n [thyCopyContent]=\"previewImageOriginSrc\"\n [thyShowNotify]=\"false\"></a>\n }\n }\n <thy-divider [thyVertical]=\"true\"></thy-divider>\n <span class=\"thy-image-preview-operations-text\"> {{ previewIndex + 1 }} / {{ images.length }} </span>\n </thy-actions>\n }\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: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyCopyDirective, selector: "[thyCopy]", inputs: ["thyCopySuccessText", "thyCopyTips", "thyCopyTipsOffset", "thyCopyContent", "thyShowNotify"], outputs: ["thyCopy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
474
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImagePreview, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
475
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyImagePreview, isStandalone: true, selector: "thy-image-preview", outputs: { downloadClicked: "downloadClicked" }, host: { properties: { "class.thy-image-preview-moving": "isDragging" }, classAttribute: "thy-image-preview-wrap" }, viewQueries: [{ propertyName: "imageRef", first: true, predicate: ["imgRef"], descendants: true }, { propertyName: "imagePreviewWrapper", first: true, predicate: ["imagePreviewWrapper"], descendants: true, static: true }], exportAs: ["thyImagePreview"], ngImport: i0, template: "<div class=\"thy-image-preview\" [class.thy-image-preview-fullscreen]=\"isFullScreen\">\n @if (!isFullScreen) {\n <div class=\"thy-image-preview-header pl-10 pr-8\">\n <div class=\"thy-image-preview-header-info\">\n <p class=\"thy-image-name text-truncate\" [thyTooltipDisabled]=\"previewImage?.name?.length < 32\" [thyTooltip]=\"previewImage?.name\">\n {{ previewImage?.name }}\n </p>\n <span class=\"thy-image-size\"> {{ previewImage?.size }}</span>\n </div>\n <a thyAction thyIcon=\"close\" [thyTooltip]=\"locale().exitPreview\" href=\"javascript:;\" (click)=\"thyDialog.close()\"></a>\n </div>\n }\n @if (isFullScreen) {\n <a\n class=\"thy-image-preview-exit-fullscreen\"\n thyAction\n thyIcon=\"close\"\n href=\"javascript:;\"\n (click)=\"thyFullscreen.exit()\"\n [thyTooltip]=\"locale().exitFullScreen\"></a>\n }\n <div\n class=\"thy-image-preview-img-wrapper\"\n #imagePreviewWrapper\n cdkDrag\n [class.thy-image-preview-inside]=\"isInsideScreen\"\n [style.transform]=\"previewImageWrapperTransform\"\n [cdkDragFreeDragPosition]=\"position\"\n (cdkDragReleased)=\"dragReleased()\">\n @for (image of images; track $index; let imageIndex = $index) {\n @if (previewIndex === imageIndex && isLoadingDone) {\n <img #imgRef class=\"thy-image-preview-img\" [src]=\"image.objectURL || image.src\" [style.transform]=\"previewImageTransform\" />\n }\n }\n <thy-loading [thyDone]=\"isLoadingDone\"></thy-loading>\n </div>\n\n @if (images.length > 1 && !isFullScreen) {\n <div\n class=\"thy-image-preview-switch-left\"\n [thyTooltipDisabled]=\"previewIndex <= 0\"\n [thyTooltip]=\"locale().prev\"\n [class.thy-image-preview-switch-left-disabled]=\"previewIndex <= 0\"\n (click)=\"prev()\">\n <thy-icon thyIconName=\"angle-left-bold\"></thy-icon>\n </div>\n <div\n class=\"thy-image-preview-switch-right\"\n [thyTooltip]=\"locale().next\"\n [thyTooltipDisabled]=\"previewIndex >= images.length - 1\"\n [class.thy-image-preview-switch-right-disabled]=\"previewIndex >= images.length - 1\"\n (click)=\"next()\">\n <thy-icon thyIconName=\"angle-right-bold\"> </thy-icon>\n </div>\n }\n @if (!isFullScreen) {\n <thy-actions thySize=\"xs\" class=\"thy-image-preview-operations py-3 px-4\">\n @for (option of previewOperations; track $index; let i = $index) {\n @if (!['original-scale', 'fit-screen', 'copyLink'].includes(option.type) || currentImageMode === option.type) {\n <a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"option.icon\"\n [thyTooltip]=\"option.name\"\n [thyTooltipOffset]=\"13\"\n (click)=\"option.action(previewImage)\"></a>\n }\n @if (option?.type === 'zoom-out') {\n <span class=\"mr-2\"> {{ (zoom * 100).toFixed(0) + '%' }} </span>\n }\n @if (option?.type === 'rotate-right') {\n <thy-divider class=\"ml-2\" [thyVertical]=\"true\"></thy-divider>\n }\n @if (option.type === 'copyLink') {\n <a\n href=\"javascript:;\"\n thyAction\n [thyCopyTips]=\"option.name\"\n [thyActionIcon]=\"option.icon\"\n [thyCopyTipsOffset]=\"13\"\n (thyCopy)=\"copyLink($event)\"\n [thyCopyContent]=\"previewImageOriginSrc\"\n [thyShowNotify]=\"false\"></a>\n }\n }\n <thy-divider [thyVertical]=\"true\"></thy-divider>\n <span class=\"thy-image-preview-operations-text\"> {{ previewIndex + 1 }} / {{ images.length }} </span>\n </thy-actions>\n }\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: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyCopyDirective, selector: "[thyCopy]", inputs: ["thyCopySuccessText", "thyCopyTips", "thyCopyTipsOffset", "thyCopyContent", "thyShowNotify"], outputs: ["thyCopy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
476
476
  }
477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImagePreview, decorators: [{
477
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImagePreview, decorators: [{
478
478
  type: Component,
479
479
  args: [{ selector: 'thy-image-preview', exportAs: 'thyImagePreview', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
480
480
  class: 'thy-image-preview-wrap',
@@ -538,7 +538,8 @@ class ThyImageService {
538
538
  const dialogRef = this.thyDialog.open(ThyImagePreview, {
539
539
  initialState: {
540
540
  images,
541
- previewIndex: options?.startIndex >= 0 && options?.startIndex < images.length ? options.startIndex : 0,
541
+ // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
542
+ previewIndex: options?.startIndex >= 0 && options?.startIndex < images.length ? options?.startIndex : 0,
542
543
  previewConfig: config
543
544
  },
544
545
  backdropClass: 'thy-image-preview-backdrop',
@@ -562,10 +563,10 @@ class ThyImageService {
562
563
  this.ngUnsubscribe$.next();
563
564
  this.ngUnsubscribe$.complete();
564
565
  }
565
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
566
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageService }); }
566
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
567
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageService }); }
567
568
  }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageService, decorators: [{
569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageService, decorators: [{
569
570
  type: Injectable
570
571
  }], ctorParameters: () => [] });
571
572
 
@@ -589,11 +590,11 @@ class ThyImageDirective {
589
590
  /**
590
591
  * 预览图片地址
591
592
  */
592
- this.thyPreviewSrc = input(...(ngDevMode ? [undefined, { debugName: "thyPreviewSrc" }] : []));
593
+ this.thyPreviewSrc = input('', ...(ngDevMode ? [{ debugName: "thyPreviewSrc" }] : []));
593
594
  /**
594
595
  * 图片原图地址
595
596
  */
596
- this.thyOriginSrc = input(...(ngDevMode ? [undefined, { debugName: "thyOriginSrc" }] : []));
597
+ this.thyOriginSrc = input('', ...(ngDevMode ? [{ debugName: "thyOriginSrc" }] : []));
597
598
  /**
598
599
  * 图片附加信息,包含 { name: string, size?: string | number; }
599
600
  */
@@ -607,6 +608,7 @@ class ThyImageDirective {
607
608
  * 是否自动计算图片资源大小
608
609
  */
609
610
  this.thyResolveSize = input(false, ...(ngDevMode ? [{ debugName: "thyResolveSize", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
611
+ this.parentGroup = null;
610
612
  effect(() => {
611
613
  this.elementRef.nativeElement.src = this.thySrc();
612
614
  });
@@ -632,14 +634,14 @@ class ThyImageDirective {
632
634
  }
633
635
  addParentImage() {
634
636
  setTimeout(() => {
635
- const parentElement = this.parentGroup.element.nativeElement;
637
+ const parentElement = this.parentGroup?.element?.nativeElement;
636
638
  const images = parentElement.querySelectorAll('img[thyImage]');
637
639
  const index = Array.prototype.indexOf.call(images, this.elementRef.nativeElement);
638
640
  if (index >= 0) {
639
- this.parentGroup.addImage(this, index);
641
+ this.parentGroup?.addImage(this, index);
640
642
  }
641
643
  else {
642
- this.parentGroup.addImage(this, this.parentGroup.images.length);
644
+ this.parentGroup?.addImage(this, this.parentGroup?.images?.length);
643
645
  }
644
646
  });
645
647
  }
@@ -650,7 +652,7 @@ class ThyImageDirective {
650
652
  if (this.parentGroup) {
651
653
  const previewAbleImages = this.parentGroup.images.filter(e => e.previewable);
652
654
  const previewImages = previewAbleImages.map(e => ({
653
- src: e.thyPreviewSrc() || e.thySrc(),
655
+ src: (e.thyPreviewSrc() || e.thySrc()),
654
656
  ...e.thyImageMeta(),
655
657
  origin: {
656
658
  src: e.thyOriginSrc()
@@ -665,10 +667,10 @@ class ThyImageDirective {
665
667
  else {
666
668
  const previewImages = [
667
669
  {
668
- src: this.thyPreviewSrc() || this.thySrc(),
670
+ src: (this.thyPreviewSrc() || this.thySrc()),
669
671
  ...this.thyImageMeta(),
670
672
  origin: {
671
- src: this.thyOriginSrc()
673
+ src: (this.thyOriginSrc())
672
674
  }
673
675
  }
674
676
  ];
@@ -681,10 +683,10 @@ class ThyImageDirective {
681
683
  this.parentGroup.removeImage(index);
682
684
  }
683
685
  }
684
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
685
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.14", type: ThyImageDirective, isStandalone: true, selector: "img[thyImage]", inputs: { thySrc: { classPropertyName: "thySrc", publicName: "thySrc", isSignal: true, isRequired: false, transformFunction: null }, thyPreviewSrc: { classPropertyName: "thyPreviewSrc", publicName: "thyPreviewSrc", isSignal: true, isRequired: false, transformFunction: null }, thyOriginSrc: { classPropertyName: "thyOriginSrc", publicName: "thyOriginSrc", isSignal: true, isRequired: false, transformFunction: null }, thyImageMeta: { classPropertyName: "thyImageMeta", publicName: "thyImageMeta", isSignal: true, isRequired: false, transformFunction: null }, thyDisablePreview: { classPropertyName: "thyDisablePreview", publicName: "thyDisablePreview", isSignal: true, isRequired: false, transformFunction: null }, thyResolveSize: { classPropertyName: "thyResolveSize", publicName: "thyResolveSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onPreview($event)" }, properties: { "class.thy-image-disabled": "thyDisablePreview()" }, classAttribute: "thy-image" }, exportAs: ["thyImage"], ngImport: i0 }); }
686
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
687
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: ThyImageDirective, isStandalone: true, selector: "img[thyImage]", inputs: { thySrc: { classPropertyName: "thySrc", publicName: "thySrc", isSignal: true, isRequired: false, transformFunction: null }, thyPreviewSrc: { classPropertyName: "thyPreviewSrc", publicName: "thyPreviewSrc", isSignal: true, isRequired: false, transformFunction: null }, thyOriginSrc: { classPropertyName: "thyOriginSrc", publicName: "thyOriginSrc", isSignal: true, isRequired: false, transformFunction: null }, thyImageMeta: { classPropertyName: "thyImageMeta", publicName: "thyImageMeta", isSignal: true, isRequired: false, transformFunction: null }, thyDisablePreview: { classPropertyName: "thyDisablePreview", publicName: "thyDisablePreview", isSignal: true, isRequired: false, transformFunction: null }, thyResolveSize: { classPropertyName: "thyResolveSize", publicName: "thyResolveSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onPreview($event)" }, properties: { "class.thy-image-disabled": "thyDisablePreview()" }, classAttribute: "thy-image" }, exportAs: ["thyImage"], ngImport: i0 }); }
686
688
  }
687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageDirective, decorators: [{
689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageDirective, decorators: [{
688
690
  type: Directive,
689
691
  args: [{
690
692
  selector: 'img[thyImage]',
@@ -698,8 +700,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
698
700
  }], ctorParameters: () => [], propDecorators: { thySrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySrc", required: false }] }], thyPreviewSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPreviewSrc", required: false }] }], thyOriginSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOriginSrc", required: false }] }], thyImageMeta: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyImageMeta", required: false }] }], thyDisablePreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDisablePreview", required: false }] }], thyResolveSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyResolveSize", required: false }] }] } });
699
701
 
700
702
  class ThyImageModule {
701
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
702
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThyImageModule, imports: [CommonModule,
703
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
704
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyImageModule, imports: [CommonModule,
703
705
  PortalModule,
704
706
  DragDropModule,
705
707
  ThyIconModule,
@@ -712,7 +714,7 @@ class ThyImageModule {
712
714
  ThyImageDirective,
713
715
  ThyImageGroup,
714
716
  ThyImagePreview], exports: [ThyImageDirective, ThyImageGroup, ThyImagePreview] }); }
715
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageModule, providers: [ThyImageService, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER], imports: [CommonModule,
717
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageModule, providers: [ThyImageService, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER], imports: [CommonModule,
716
718
  PortalModule,
717
719
  DragDropModule,
718
720
  ThyIconModule,
@@ -724,7 +726,7 @@ class ThyImageModule {
724
726
  ThyActionModule,
725
727
  ThyImagePreview] }); }
726
728
  }
727
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyImageModule, decorators: [{
729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyImageModule, decorators: [{
728
730
  type: NgModule,
729
731
  args: [{
730
732
  exports: [ThyImageDirective, ThyImageGroup, ThyImagePreview],