cmat 0.0.111 → 0.0.112

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 (256) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +531 -536
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +150 -42
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +1120 -629
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +861 -441
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +580 -335
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +197 -105
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-color-picker.mjs +1762 -825
  16. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
  18. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  19. package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
  20. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  21. package/fesm2022/cmat-components-date-range.mjs +701 -456
  22. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  23. package/fesm2022/cmat-components-date-time-display.mjs +137 -30
  24. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  25. package/fesm2022/cmat-components-drawer.mjs +410 -258
  26. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  27. package/fesm2022/cmat-components-empty-state.mjs +201 -41
  28. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  29. package/fesm2022/cmat-components-file-preview.mjs +198 -35
  30. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  31. package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
  32. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  33. package/fesm2022/cmat-components-form-actions.mjs +102 -26
  34. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  35. package/fesm2022/cmat-components-fullscreen.mjs +167 -47
  36. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  37. package/fesm2022/cmat-components-highlight.mjs +203 -112
  38. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  39. package/fesm2022/cmat-components-image-viewer.mjs +489 -215
  40. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  41. package/fesm2022/cmat-components-inline-loading.mjs +117 -27
  42. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  43. package/fesm2022/cmat-components-json-editor.mjs +276 -230
  44. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  45. package/fesm2022/cmat-components-knob-input.mjs +615 -420
  46. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  47. package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
  48. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  49. package/fesm2022/cmat-components-masonry.mjs +120 -40
  50. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  51. package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
  52. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  53. package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
  54. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  55. package/fesm2022/cmat-components-navigation.mjs +3080 -1404
  56. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  57. package/fesm2022/cmat-components-opt-input.mjs +540 -466
  58. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  59. package/fesm2022/cmat-components-org-chart.mjs +528 -125
  60. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  61. package/fesm2022/cmat-components-page-header.mjs +141 -32
  62. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  63. package/fesm2022/cmat-components-pagination.mjs +866 -534
  64. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  65. package/fesm2022/cmat-components-password-strength.mjs +873 -434
  66. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  67. package/fesm2022/cmat-components-popover.mjs +1012 -731
  68. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  69. package/fesm2022/cmat-components-progress-bar.mjs +98 -35
  70. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  71. package/fesm2022/cmat-components-qrcode.mjs +463 -287
  72. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  73. package/fesm2022/cmat-components-rating.mjs +377 -203
  74. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  75. package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
  76. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  77. package/fesm2022/cmat-components-select-search.mjs +926 -496
  78. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  79. package/fesm2022/cmat-components-select-table.mjs +1280 -842
  80. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  81. package/fesm2022/cmat-components-select-tree.mjs +998 -690
  82. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  83. package/fesm2022/cmat-components-skeleton.mjs +143 -57
  84. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  85. package/fesm2022/cmat-components-speed-dial.mjs +457 -303
  86. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  87. package/fesm2022/cmat-components-status-tag.mjs +136 -44
  88. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  89. package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
  90. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +464 -168
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +346 -262
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +372 -112
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +904 -410
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
  102. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
  104. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
  106. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-autofocus.mjs +43 -25
  108. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
  110. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-debounce.mjs +162 -76
  112. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-digit-only.mjs +457 -356
  114. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  115. package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
  116. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  117. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
  118. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  119. package/fesm2022/cmat-lib-mock-api.mjs +207 -195
  120. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-bytes.mjs +50 -30
  122. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-date-format.mjs +41 -25
  124. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
  126. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-group-by.mjs +50 -38
  128. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-keys.mjs +44 -31
  130. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  131. package/fesm2022/cmat-pipes-secure.mjs +60 -49
  132. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  133. package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
  134. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  135. package/fesm2022/cmat-reports.mjs +2751 -0
  136. package/fesm2022/cmat-reports.mjs.map +1 -0
  137. package/fesm2022/cmat-services-alert.mjs +249 -277
  138. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  139. package/fesm2022/cmat-services-config.mjs +110 -81
  140. package/fesm2022/cmat-services-config.mjs.map +1 -1
  141. package/fesm2022/cmat-services-confirmation.mjs +184 -73
  142. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  143. package/fesm2022/cmat-services-data.mjs +136 -125
  144. package/fesm2022/cmat-services-data.mjs.map +1 -1
  145. package/fesm2022/cmat-services-export-as.mjs +165 -183
  146. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  147. package/fesm2022/cmat-services-loading.mjs +116 -95
  148. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  149. package/fesm2022/cmat-services-local-storage.mjs +75 -66
  150. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  151. package/fesm2022/cmat-services-media-watcher.mjs +69 -64
  152. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  153. package/fesm2022/cmat-services-platform.mjs +48 -45
  154. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  155. package/fesm2022/cmat-services-print.mjs +984 -1109
  156. package/fesm2022/cmat-services-print.mjs.map +1 -1
  157. package/fesm2022/cmat-services-splash-screen.mjs +53 -38
  158. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  159. package/fesm2022/cmat-services-title.mjs +57 -47
  160. package/fesm2022/cmat-services-title.mjs.map +1 -1
  161. package/fesm2022/cmat-services-translation.mjs +79 -68
  162. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  163. package/fesm2022/cmat-services-utils.mjs +424 -517
  164. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  165. package/fesm2022/cmat-validators.mjs +23 -33
  166. package/fesm2022/cmat-validators.mjs.map +1 -1
  167. package/fesm2022/cmat-version.mjs +12 -16
  168. package/fesm2022/cmat-version.mjs.map +1 -1
  169. package/fesm2022/cmat.mjs +39805 -22511
  170. package/fesm2022/cmat.mjs.map +1 -1
  171. package/package.json +5 -1
  172. package/types/cmat-components-adapter.d.ts +145 -156
  173. package/types/cmat-components-breadcrumb.d.ts +108 -86
  174. package/types/cmat-components-card.d.ts +34 -18
  175. package/types/cmat-components-carousel.d.ts +251 -134
  176. package/types/cmat-components-cascade.d.ts +158 -117
  177. package/types/cmat-components-chip-input.d.ts +105 -71
  178. package/types/cmat-components-code-editor.d.ts +59 -34
  179. package/types/cmat-components-color-picker.d.ts +378 -236
  180. package/types/cmat-components-custom-formly.d.ts +776 -814
  181. package/types/cmat-components-data-picker.d.ts +502 -360
  182. package/types/cmat-components-date-range.d.ts +106 -77
  183. package/types/cmat-components-date-time-display.d.ts +36 -13
  184. package/types/cmat-components-drawer.d.ts +91 -61
  185. package/types/cmat-components-empty-state.d.ts +47 -17
  186. package/types/cmat-components-file-preview.d.ts +42 -14
  187. package/types/cmat-components-filter-toolbar.d.ts +57 -25
  188. package/types/cmat-components-form-actions.d.ts +18 -10
  189. package/types/cmat-components-fullscreen.d.ts +21 -13
  190. package/types/cmat-components-highlight.d.ts +33 -26
  191. package/types/cmat-components-image-viewer.d.ts +119 -58
  192. package/types/cmat-components-inline-loading.d.ts +24 -11
  193. package/types/cmat-components-json-editor.d.ts +39 -28
  194. package/types/cmat-components-knob-input.d.ts +172 -101
  195. package/types/cmat-components-loading-overlay.d.ts +8 -11
  196. package/types/cmat-components-masonry.d.ts +27 -14
  197. package/types/cmat-components-material-color-picker.d.ts +56 -42
  198. package/types/cmat-components-material-datetimepicker.d.ts +817 -454
  199. package/types/cmat-components-navigation.d.ts +295 -221
  200. package/types/cmat-components-opt-input.d.ts +111 -90
  201. package/types/cmat-components-org-chart.d.ts +53 -35
  202. package/types/cmat-components-page-header.d.ts +37 -14
  203. package/types/cmat-components-pagination.d.ts +144 -107
  204. package/types/cmat-components-password-strength.d.ts +197 -86
  205. package/types/cmat-components-popover.d.ts +264 -166
  206. package/types/cmat-components-progress-bar.d.ts +17 -14
  207. package/types/cmat-components-qrcode.d.ts +111 -42
  208. package/types/cmat-components-rating.d.ts +105 -59
  209. package/types/cmat-components-rich-text-editor.d.ts +39 -16
  210. package/types/cmat-components-select-search.d.ts +195 -99
  211. package/types/cmat-components-select-table.d.ts +241 -142
  212. package/types/cmat-components-select-tree.d.ts +185 -118
  213. package/types/cmat-components-skeleton.d.ts +55 -32
  214. package/types/cmat-components-speed-dial.d.ts +86 -61
  215. package/types/cmat-components-status-tag.d.ts +42 -24
  216. package/types/cmat-components-table-toolbar.d.ts +30 -12
  217. package/types/cmat-components-timeline.d.ts +83 -51
  218. package/types/cmat-components-toast.d.ts +84 -85
  219. package/types/cmat-components-transfer-picker.d.ts +228 -181
  220. package/types/cmat-components-treetable.d.ts +63 -39
  221. package/types/cmat-components-upload.d.ts +205 -106
  222. package/types/cmat-components-x6-angular-shape.d.ts +29 -37
  223. package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
  224. package/types/cmat-directives-arrow-cursor.d.ts +55 -35
  225. package/types/cmat-directives-autofocus.d.ts +8 -11
  226. package/types/cmat-directives-data-exporter.d.ts +71 -40
  227. package/types/cmat-directives-debounce.d.ts +31 -28
  228. package/types/cmat-directives-digit-only.d.ts +90 -53
  229. package/types/cmat-directives-equal-validator.d.ts +11 -14
  230. package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
  231. package/types/cmat-lib-mock-api.d.ts +46 -55
  232. package/types/cmat-pipes-bytes.d.ts +7 -10
  233. package/types/cmat-pipes-date-format.d.ts +7 -10
  234. package/types/cmat-pipes-find-by-key.d.ts +8 -12
  235. package/types/cmat-pipes-group-by.d.ts +11 -15
  236. package/types/cmat-pipes-keys.d.ts +10 -13
  237. package/types/cmat-pipes-secure.d.ts +14 -17
  238. package/types/cmat-pipes-uppercase.d.ts +7 -10
  239. package/types/cmat-reports.d.ts +1131 -0
  240. package/types/cmat-services-alert.d.ts +80 -87
  241. package/types/cmat-services-config.d.ts +37 -43
  242. package/types/cmat-services-confirmation.d.ts +31 -37
  243. package/types/cmat-services-data.d.ts +18 -21
  244. package/types/cmat-services-export-as.d.ts +28 -33
  245. package/types/cmat-services-loading.d.ts +27 -31
  246. package/types/cmat-services-local-storage.d.ts +17 -21
  247. package/types/cmat-services-media-watcher.d.ts +14 -18
  248. package/types/cmat-services-platform.d.ts +8 -11
  249. package/types/cmat-services-print.d.ts +97 -102
  250. package/types/cmat-services-splash-screen.d.ts +11 -14
  251. package/types/cmat-services-title.d.ts +9 -12
  252. package/types/cmat-services-translation.d.ts +19 -22
  253. package/types/cmat-services-utils.d.ts +76 -80
  254. package/types/cmat-validators.d.ts +5 -8
  255. package/types/cmat-version.d.ts +8 -10
  256. package/types/cmat.d.ts +7551 -5204
@@ -1,288 +1,464 @@
1
- import * as i0 from '@angular/core';
2
- import { input, output, viewChild, inject, Renderer2, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { DomSanitizer } from '@angular/platform-browser';
4
- import { toDataURL, toCanvas, toString } from 'qrcode';
5
-
6
- class CmatQRCodeComponent {
7
- constructor() {
8
- this.allowEmptyString = input(false, /* @ts-ignore */
9
- ...(ngDevMode ? [{ debugName: "allowEmptyString" }] : /* istanbul ignore next */ []));
10
- this.cssClass = input('qrcode', /* @ts-ignore */
11
- ...(ngDevMode ? [{ debugName: "cssClass" }] : /* istanbul ignore next */ []));
12
- this.elementType = input('canvas', /* @ts-ignore */
13
- ...(ngDevMode ? [{ debugName: "elementType" }] : /* istanbul ignore next */ []));
14
- this.errorCorrectionLevel = input('M', /* @ts-ignore */
15
- ...(ngDevMode ? [{ debugName: "errorCorrectionLevel" }] : /* istanbul ignore next */ []));
16
- this.imageSrc = input(/* @ts-ignore */
17
- ...(ngDevMode ? [undefined, { debugName: "imageSrc" }] : /* istanbul ignore next */ []));
18
- this.imageHeight = input(/* @ts-ignore */
19
- ...(ngDevMode ? [undefined, { debugName: "imageHeight" }] : /* istanbul ignore next */ []));
20
- this.imageWidth = input(/* @ts-ignore */
21
- ...(ngDevMode ? [undefined, { debugName: "imageWidth" }] : /* istanbul ignore next */ []));
22
- this.margin = input(4, /* @ts-ignore */
23
- ...(ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []));
24
- this.qrdata = input('', /* @ts-ignore */
25
- ...(ngDevMode ? [{ debugName: "qrdata" }] : /* istanbul ignore next */ []));
26
- this.scale = input(4, /* @ts-ignore */
27
- ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
28
- this.width = input(10, /* @ts-ignore */
29
- ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
30
- this.alt = input(/* @ts-ignore */
31
- ...(ngDevMode ? [undefined, { debugName: "alt" }] : /* istanbul ignore next */ []));
32
- this.ariaLabel = input(/* @ts-ignore */
33
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
34
- this.title = input(/* @ts-ignore */
35
- ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
36
- this.qrCodeURL = output();
37
- this.qrcElement = viewChild.required('qrcElement', /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "qrcElement" }] : /* istanbul ignore next */ []));
39
- this.context = null;
40
- this._renderer = inject(Renderer2);
41
- this._sanitizer = inject(DomSanitizer);
42
- this._currentOperationId = 0;
43
- this._previousObjectUrl = null;
44
- // 监听输入变化并重新生成二维码
45
- effect(() => {
46
- // 读取所有 input signal,任何一项变化都会触发重新生成
47
- this.allowEmptyString();
48
- this.elementType();
49
- this.errorCorrectionLevel();
50
- this.imageSrc();
51
- this.imageHeight();
52
- this.imageWidth();
53
- this.margin();
54
- this.qrdata();
55
- this.scale();
56
- this.width();
57
- this.alt();
58
- this.ariaLabel();
59
- this.title();
60
- untracked(() => {
61
- this._createQRCode();
62
- });
63
- });
64
- }
65
- convertBase64ImageUrlToBlob(base64ImageUrl) {
66
- const parts = base64ImageUrl.split(';base64,');
67
- const imageType = parts[0].split(':')[1];
68
- const decodedData = atob(parts[1]);
69
- const uInt8Array = new Uint8Array(decodedData.length);
70
- for (let i = 0; i < decodedData.length; ++i) {
71
- uInt8Array[i] = decodedData.charCodeAt(i);
72
- }
73
- return new Blob([uInt8Array], { type: imageType });
74
- }
75
- emitQRCodeURL(element) {
76
- if (this._previousObjectUrl) {
77
- URL.revokeObjectURL(this._previousObjectUrl);
78
- this._previousObjectUrl = null;
79
- }
80
- const className = element.constructor.name;
81
- if (className === SVGSVGElement.name) {
82
- const svgHTML = element.outerHTML;
83
- const blob = new Blob([svgHTML], { type: 'image/svg+xml' });
84
- const urlSvg = URL.createObjectURL(blob);
85
- this._previousObjectUrl = urlSvg;
86
- const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlSvg);
87
- this.qrCodeURL.emit(urlSanitized);
88
- return;
89
- }
90
- let urlImage = '';
91
- if (className === HTMLCanvasElement.name) {
92
- urlImage = element.toDataURL('image/png');
93
- }
94
- if (className === HTMLImageElement.name) {
95
- urlImage = element.src;
96
- }
97
- const blobData = this.convertBase64ImageUrlToBlob(urlImage);
98
- const urlBlob = URL.createObjectURL(blobData);
99
- this._previousObjectUrl = urlBlob;
100
- const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlBlob);
101
- this.qrCodeURL.emit(urlSanitized);
102
- }
103
- _isValidQrCodeText(data) {
104
- if (this.allowEmptyString() === false) {
105
- return !(typeof data === 'undefined' ||
106
- data === '' ||
107
- data === 'null' ||
108
- data === null);
109
- }
110
- return !(typeof data === 'undefined');
111
- }
112
- _toDataURL(qrCodeConfig, qrData) {
113
- return new Promise((resolve, reject) => {
114
- toDataURL(qrData, qrCodeConfig, (err, url) => {
115
- if (err) {
116
- reject(err);
117
- }
118
- else {
119
- resolve(url);
120
- }
121
- });
122
- });
123
- }
124
- _toCanvas(canvas, qrCodeConfig, qrData) {
125
- return new Promise((resolve, reject) => {
126
- toCanvas(canvas, qrData, qrCodeConfig, (error) => {
127
- if (error) {
128
- reject(error);
129
- }
130
- else {
131
- resolve('success');
132
- }
133
- });
134
- });
135
- }
136
- _toSVG(qrCodeConfig, qrData) {
137
- return new Promise((resolve, reject) => {
138
- toString(qrData, qrCodeConfig, (err, url) => {
139
- if (err) {
140
- reject(err);
141
- }
142
- else {
143
- resolve(url);
144
- }
145
- });
146
- });
147
- }
148
- _renderElement(element) {
149
- const qrcEl = this.qrcElement();
150
- for (const node of Array.from(qrcEl.nativeElement.childNodes)) {
151
- this._renderer.removeChild(qrcEl.nativeElement, node);
152
- }
153
- this._renderer.appendChild(qrcEl.nativeElement, element);
154
- }
155
- _createQRCode() {
156
- const operationId = ++this._currentOperationId;
157
- try {
158
- let qrData = this.qrdata();
159
- if (!this._isValidQrCodeText(qrData)) {
160
- throw new Error('`qrdata` 配置为空,请设置 `allowEmptyString="true"` 来覆盖此特性。');
161
- }
162
- if (this._isValidQrCodeText(qrData) && qrData === '') {
163
- qrData = ' ';
164
- }
165
- const config = {
166
- errorCorrectionLevel: this.errorCorrectionLevel(),
167
- margin: this.margin(),
168
- scale: this.scale(),
169
- width: this.width(),
170
- };
171
- const centerImageSrc = this.imageSrc();
172
- const centerImageHeight = this.imageHeight() ?? 40;
173
- const centerImageWidth = this.imageWidth() ?? 40;
174
- switch (this.elementType()) {
175
- case 'canvas': {
176
- const canvasElement = this._renderer.createElement('canvas');
177
- this.context = canvasElement.getContext('2d');
178
- this._toCanvas(canvasElement, config, qrData)
179
- .then(() => {
180
- if (operationId !== this._currentOperationId) {
181
- return;
182
- }
183
- if (this.ariaLabel()) {
184
- this._renderer.setAttribute(canvasElement, 'aria-label', `${this.ariaLabel()}`);
185
- }
186
- if (this.title()) {
187
- this._renderer.setAttribute(canvasElement, 'title', `${this.title()}`);
188
- }
189
- if (centerImageSrc && this.context) {
190
- this._centerImage = new Image(centerImageWidth, centerImageHeight);
191
- if (centerImageSrc !== this._centerImage.src) {
192
- this._centerImage.crossOrigin = 'anonymous';
193
- this._centerImage.src = centerImageSrc;
194
- }
195
- if (centerImageHeight !== this._centerImage.height) {
196
- this._centerImage.height = centerImageHeight;
197
- }
198
- if (centerImageWidth !== this._centerImage.width) {
199
- this._centerImage.width = centerImageWidth;
200
- }
201
- const centerImage = this._centerImage;
202
- if (centerImage) {
203
- centerImage.onload = () => {
204
- if (operationId === this._currentOperationId) {
205
- this.context?.drawImage(centerImage, canvasElement.width / 2 - centerImageWidth / 2, canvasElement.height / 2 - centerImageHeight / 2, centerImageWidth, centerImageHeight);
206
- }
207
- };
208
- }
209
- }
210
- this._renderElement(canvasElement);
211
- this.emitQRCodeURL(canvasElement);
212
- })
213
- .catch((e) => {
214
- console.error('canvas error:', e);
215
- });
216
- break;
217
- }
218
- case 'svg': {
219
- const svgParentElement = this._renderer.createElement('div');
220
- this._toSVG(config, qrData)
221
- .then((svgString) => {
222
- if (operationId !== this._currentOperationId) {
223
- return;
224
- }
225
- this._renderer.setProperty(svgParentElement, 'innerHTML', svgString);
226
- const svgElement = svgParentElement.firstChild;
227
- this._renderer.setAttribute(svgElement, 'height', `${this.width()}`);
228
- this._renderer.setAttribute(svgElement, 'width', `${this.width()}`);
229
- this._renderElement(svgElement);
230
- this.emitQRCodeURL(svgElement);
231
- })
232
- .catch((e) => {
233
- console.error('svg error:', e);
234
- });
235
- break;
236
- }
237
- case 'url':
238
- case 'img':
239
- default: {
240
- const imgElement = this._renderer.createElement('img');
241
- this._toDataURL(config, qrData)
242
- .then((dataUrl) => {
243
- if (operationId !== this._currentOperationId) {
244
- return;
245
- }
246
- if (this.alt()) {
247
- imgElement.setAttribute('alt', this.alt());
248
- }
249
- if (this.ariaLabel()) {
250
- imgElement.setAttribute('aria-label', this.ariaLabel());
251
- }
252
- imgElement.setAttribute('src', dataUrl);
253
- if (this.title()) {
254
- imgElement.setAttribute('title', this.title());
255
- }
256
- this._renderElement(imgElement);
257
- this.emitQRCodeURL(imgElement);
258
- })
259
- .catch((e) => {
260
- console.error('img/url error:', e);
261
- });
262
- }
263
- }
264
- }
265
- catch (e) {
266
- console.error('生成QRCode错误:', e instanceof Error ? e.message : String(e));
267
- }
268
- }
269
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatQRCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.0", type: CmatQRCodeComponent, isStandalone: true, selector: "cmat-qrcode", inputs: { allowEmptyString: { classPropertyName: "allowEmptyString", publicName: "allowEmptyString", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, elementType: { classPropertyName: "elementType", publicName: "elementType", isSignal: true, isRequired: false, transformFunction: null }, errorCorrectionLevel: { classPropertyName: "errorCorrectionLevel", publicName: "errorCorrectionLevel", isSignal: true, isRequired: false, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, imageHeight: { classPropertyName: "imageHeight", publicName: "imageHeight", isSignal: true, isRequired: false, transformFunction: null }, imageWidth: { classPropertyName: "imageWidth", publicName: "imageWidth", isSignal: true, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: true, isRequired: false, transformFunction: null }, qrdata: { classPropertyName: "qrdata", publicName: "qrdata", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { qrCodeURL: "qrCodeURL" }, viewQueries: [{ propertyName: "qrcElement", first: true, predicate: ["qrcElement"], descendants: true, isSignal: true }], exportAs: ["cmatQRCode"], ngImport: i0, template: '<div #qrcElement [class]="cssClass()"></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
271
- }
272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatQRCodeComponent, decorators: [{
273
- type: Component,
274
- args: [{
275
- selector: 'cmat-qrcode',
276
- encapsulation: ViewEncapsulation.None,
277
- changeDetection: ChangeDetectionStrategy.OnPush,
278
- template: '<div #qrcElement [class]="cssClass()"></div>',
279
- exportAs: 'cmatQRCode',
280
- }]
281
- }], ctorParameters: () => [], propDecorators: { allowEmptyString: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmptyString", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], elementType: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementType", required: false }] }], errorCorrectionLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorCorrectionLevel", required: false }] }], imageSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSrc", required: false }] }], imageHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageHeight", required: false }] }], imageWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageWidth", required: false }] }], margin: [{ type: i0.Input, args: [{ isSignal: true, alias: "margin", required: false }] }], qrdata: [{ type: i0.Input, args: [{ isSignal: true, alias: "qrdata", required: false }] }], scale: [{ type: i0.Input, args: [{ isSignal: true, alias: "scale", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], qrCodeURL: [{ type: i0.Output, args: ["qrCodeURL"] }], qrcElement: [{ type: i0.ViewChild, args: ['qrcElement', { isSignal: true }] }] } });
282
-
283
- /**
284
- * Generated bundle index. Do not edit.
285
- */
286
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Renderer2, ViewEncapsulation, effect, inject, input, output, untracked, viewChild } from "@angular/core";
3
+ import { DomSanitizer } from "@angular/platform-browser";
4
+ import { toCanvas, toDataURL, toString } from "qrcode";
5
+ var CmatQRCodeComponent = class CmatQRCodeComponent {
6
+ constructor() {
7
+ this.allowEmptyString = input(false, ...ngDevMode ? [{ debugName: "allowEmptyString" }] : /* istanbul ignore next */ []);
8
+ this.cssClass = input("qrcode", ...ngDevMode ? [{ debugName: "cssClass" }] : /* istanbul ignore next */ []);
9
+ this.elementType = input("canvas", ...ngDevMode ? [{ debugName: "elementType" }] : /* istanbul ignore next */ []);
10
+ this.errorCorrectionLevel = input("M", ...ngDevMode ? [{ debugName: "errorCorrectionLevel" }] : /* istanbul ignore next */ []);
11
+ this.imageSrc = input(...ngDevMode ? [void 0, { debugName: "imageSrc" }] : /* istanbul ignore next */ []);
12
+ this.imageHeight = input(...ngDevMode ? [void 0, { debugName: "imageHeight" }] : /* istanbul ignore next */ []);
13
+ this.imageWidth = input(...ngDevMode ? [void 0, { debugName: "imageWidth" }] : /* istanbul ignore next */ []);
14
+ this.margin = input(4, ...ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []);
15
+ this.qrdata = input("", ...ngDevMode ? [{ debugName: "qrdata" }] : /* istanbul ignore next */ []);
16
+ this.scale = input(4, ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
17
+ this.width = input(10, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
18
+ this.alt = input(...ngDevMode ? [void 0, { debugName: "alt" }] : /* istanbul ignore next */ []);
19
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
20
+ this.title = input(...ngDevMode ? [void 0, { debugName: "title" }] : /* istanbul ignore next */ []);
21
+ this.qrCodeURL = output();
22
+ this.qrcElement = viewChild.required("qrcElement", ...ngDevMode ? [{ debugName: "qrcElement" }] : /* istanbul ignore next */ []);
23
+ this.context = null;
24
+ this._renderer = inject(Renderer2);
25
+ this._sanitizer = inject(DomSanitizer);
26
+ this._currentOperationId = 0;
27
+ this._previousObjectUrl = null;
28
+ effect(() => {
29
+ this.allowEmptyString();
30
+ this.elementType();
31
+ this.errorCorrectionLevel();
32
+ this.imageSrc();
33
+ this.imageHeight();
34
+ this.imageWidth();
35
+ this.margin();
36
+ this.qrdata();
37
+ this.scale();
38
+ this.width();
39
+ this.alt();
40
+ this.ariaLabel();
41
+ this.title();
42
+ untracked(() => {
43
+ this._createQRCode();
44
+ });
45
+ });
46
+ }
47
+ convertBase64ImageUrlToBlob(base64ImageUrl) {
48
+ const parts = base64ImageUrl.split(";base64,");
49
+ const imageType = parts[0].split(":")[1];
50
+ const decodedData = atob(parts[1]);
51
+ const uInt8Array = new Uint8Array(decodedData.length);
52
+ for (let i = 0; i < decodedData.length; ++i) uInt8Array[i] = decodedData.charCodeAt(i);
53
+ return new Blob([uInt8Array], { type: imageType });
54
+ }
55
+ emitQRCodeURL(element) {
56
+ if (this._previousObjectUrl) {
57
+ URL.revokeObjectURL(this._previousObjectUrl);
58
+ this._previousObjectUrl = null;
59
+ }
60
+ const className = element.constructor.name;
61
+ if (className === SVGSVGElement.name) {
62
+ const svgHTML = element.outerHTML;
63
+ const blob = new Blob([svgHTML], { type: "image/svg+xml" });
64
+ const urlSvg = URL.createObjectURL(blob);
65
+ this._previousObjectUrl = urlSvg;
66
+ const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlSvg);
67
+ this.qrCodeURL.emit(urlSanitized);
68
+ return;
69
+ }
70
+ let urlImage = "";
71
+ if (className === HTMLCanvasElement.name) urlImage = element.toDataURL("image/png");
72
+ if (className === HTMLImageElement.name) urlImage = element.src;
73
+ const blobData = this.convertBase64ImageUrlToBlob(urlImage);
74
+ const urlBlob = URL.createObjectURL(blobData);
75
+ this._previousObjectUrl = urlBlob;
76
+ const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlBlob);
77
+ this.qrCodeURL.emit(urlSanitized);
78
+ }
79
+ _isValidQrCodeText(data) {
80
+ if (this.allowEmptyString() === false) return !(typeof data === "undefined" || data === "" || data === "null" || data === null);
81
+ return !(typeof data === "undefined");
82
+ }
83
+ _toDataURL(qrCodeConfig, qrData) {
84
+ return new Promise((resolve, reject) => {
85
+ toDataURL(qrData, qrCodeConfig, (err, url) => {
86
+ if (err) reject(err);
87
+ else resolve(url);
88
+ });
89
+ });
90
+ }
91
+ _toCanvas(canvas, qrCodeConfig, qrData) {
92
+ return new Promise((resolve, reject) => {
93
+ toCanvas(canvas, qrData, qrCodeConfig, (error) => {
94
+ if (error) reject(error);
95
+ else resolve("success");
96
+ });
97
+ });
98
+ }
99
+ _toSVG(qrCodeConfig, qrData) {
100
+ return new Promise((resolve, reject) => {
101
+ toString(qrData, qrCodeConfig, (err, url) => {
102
+ if (err) reject(err);
103
+ else resolve(url);
104
+ });
105
+ });
106
+ }
107
+ _renderElement(element) {
108
+ const qrcEl = this.qrcElement();
109
+ for (const node of Array.from(qrcEl.nativeElement.childNodes)) this._renderer.removeChild(qrcEl.nativeElement, node);
110
+ this._renderer.appendChild(qrcEl.nativeElement, element);
111
+ }
112
+ _createQRCode() {
113
+ const operationId = ++this._currentOperationId;
114
+ try {
115
+ let qrData = this.qrdata();
116
+ if (!this._isValidQrCodeText(qrData)) throw new Error("`qrdata` 配置为空,请设置 `allowEmptyString=\"true\"` 来覆盖此特性。");
117
+ if (this._isValidQrCodeText(qrData) && qrData === "") qrData = " ";
118
+ const config = {
119
+ errorCorrectionLevel: this.errorCorrectionLevel(),
120
+ margin: this.margin(),
121
+ scale: this.scale(),
122
+ width: this.width()
123
+ };
124
+ const centerImageSrc = this.imageSrc();
125
+ const centerImageHeight = this.imageHeight() ?? 40;
126
+ const centerImageWidth = this.imageWidth() ?? 40;
127
+ switch (this.elementType()) {
128
+ case "canvas": {
129
+ const canvasElement = this._renderer.createElement("canvas");
130
+ this.context = canvasElement.getContext("2d");
131
+ this._toCanvas(canvasElement, config, qrData).then(() => {
132
+ if (operationId !== this._currentOperationId) return;
133
+ if (this.ariaLabel()) this._renderer.setAttribute(canvasElement, "aria-label", `${this.ariaLabel()}`);
134
+ if (this.title()) this._renderer.setAttribute(canvasElement, "title", `${this.title()}`);
135
+ if (centerImageSrc && this.context) {
136
+ this._centerImage = new Image(centerImageWidth, centerImageHeight);
137
+ if (centerImageSrc !== this._centerImage.src) {
138
+ this._centerImage.crossOrigin = "anonymous";
139
+ this._centerImage.src = centerImageSrc;
140
+ }
141
+ if (centerImageHeight !== this._centerImage.height) this._centerImage.height = centerImageHeight;
142
+ if (centerImageWidth !== this._centerImage.width) this._centerImage.width = centerImageWidth;
143
+ const centerImage = this._centerImage;
144
+ if (centerImage) centerImage.onload = () => {
145
+ if (operationId === this._currentOperationId) this.context?.drawImage(centerImage, canvasElement.width / 2 - centerImageWidth / 2, canvasElement.height / 2 - centerImageHeight / 2, centerImageWidth, centerImageHeight);
146
+ };
147
+ }
148
+ this._renderElement(canvasElement);
149
+ this.emitQRCodeURL(canvasElement);
150
+ }).catch((e) => {
151
+ console.error("canvas error:", e);
152
+ });
153
+ break;
154
+ }
155
+ case "svg": {
156
+ const svgParentElement = this._renderer.createElement("div");
157
+ this._toSVG(config, qrData).then((svgString) => {
158
+ if (operationId !== this._currentOperationId) return;
159
+ this._renderer.setProperty(svgParentElement, "innerHTML", svgString);
160
+ const svgElement = svgParentElement.firstChild;
161
+ this._renderer.setAttribute(svgElement, "height", `${this.width()}`);
162
+ this._renderer.setAttribute(svgElement, "width", `${this.width()}`);
163
+ this._renderElement(svgElement);
164
+ this.emitQRCodeURL(svgElement);
165
+ }).catch((e) => {
166
+ console.error("svg error:", e);
167
+ });
168
+ break;
169
+ }
170
+ default: {
171
+ const imgElement = this._renderer.createElement("img");
172
+ this._toDataURL(config, qrData).then((dataUrl) => {
173
+ if (operationId !== this._currentOperationId) return;
174
+ if (this.alt()) imgElement.setAttribute("alt", this.alt());
175
+ if (this.ariaLabel()) imgElement.setAttribute("aria-label", this.ariaLabel());
176
+ imgElement.setAttribute("src", dataUrl);
177
+ if (this.title()) imgElement.setAttribute("title", this.title());
178
+ this._renderElement(imgElement);
179
+ this.emitQRCodeURL(imgElement);
180
+ }).catch((e) => {
181
+ console.error("img/url error:", e);
182
+ });
183
+ }
184
+ }
185
+ } catch (e) {
186
+ console.error("生成QRCode错误:", e instanceof Error ? e.message : String(e));
187
+ }
188
+ }
189
+ static {
190
+ this.ɵfac = i0.ɵɵngDeclareFactory({
191
+ minVersion: "12.0.0",
192
+ version: "22.2.3",
193
+ ngImport: i0,
194
+ type: CmatQRCodeComponent,
195
+ deps: [],
196
+ target: i0.ɵɵFactoryTarget.Component
197
+ });
198
+ }
199
+ static {
200
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
201
+ minVersion: "17.2.0",
202
+ version: "22.2.3",
203
+ type: CmatQRCodeComponent,
204
+ isStandalone: true,
205
+ selector: "cmat-qrcode",
206
+ inputs: {
207
+ allowEmptyString: {
208
+ classPropertyName: "allowEmptyString",
209
+ publicName: "allowEmptyString",
210
+ isSignal: true,
211
+ isRequired: false,
212
+ transformFunction: null
213
+ },
214
+ cssClass: {
215
+ classPropertyName: "cssClass",
216
+ publicName: "cssClass",
217
+ isSignal: true,
218
+ isRequired: false,
219
+ transformFunction: null
220
+ },
221
+ elementType: {
222
+ classPropertyName: "elementType",
223
+ publicName: "elementType",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ },
228
+ errorCorrectionLevel: {
229
+ classPropertyName: "errorCorrectionLevel",
230
+ publicName: "errorCorrectionLevel",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ imageSrc: {
236
+ classPropertyName: "imageSrc",
237
+ publicName: "imageSrc",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ },
242
+ imageHeight: {
243
+ classPropertyName: "imageHeight",
244
+ publicName: "imageHeight",
245
+ isSignal: true,
246
+ isRequired: false,
247
+ transformFunction: null
248
+ },
249
+ imageWidth: {
250
+ classPropertyName: "imageWidth",
251
+ publicName: "imageWidth",
252
+ isSignal: true,
253
+ isRequired: false,
254
+ transformFunction: null
255
+ },
256
+ margin: {
257
+ classPropertyName: "margin",
258
+ publicName: "margin",
259
+ isSignal: true,
260
+ isRequired: false,
261
+ transformFunction: null
262
+ },
263
+ qrdata: {
264
+ classPropertyName: "qrdata",
265
+ publicName: "qrdata",
266
+ isSignal: true,
267
+ isRequired: false,
268
+ transformFunction: null
269
+ },
270
+ scale: {
271
+ classPropertyName: "scale",
272
+ publicName: "scale",
273
+ isSignal: true,
274
+ isRequired: false,
275
+ transformFunction: null
276
+ },
277
+ width: {
278
+ classPropertyName: "width",
279
+ publicName: "width",
280
+ isSignal: true,
281
+ isRequired: false,
282
+ transformFunction: null
283
+ },
284
+ alt: {
285
+ classPropertyName: "alt",
286
+ publicName: "alt",
287
+ isSignal: true,
288
+ isRequired: false,
289
+ transformFunction: null
290
+ },
291
+ ariaLabel: {
292
+ classPropertyName: "ariaLabel",
293
+ publicName: "ariaLabel",
294
+ isSignal: true,
295
+ isRequired: false,
296
+ transformFunction: null
297
+ },
298
+ title: {
299
+ classPropertyName: "title",
300
+ publicName: "title",
301
+ isSignal: true,
302
+ isRequired: false,
303
+ transformFunction: null
304
+ }
305
+ },
306
+ outputs: { qrCodeURL: "qrCodeURL" },
307
+ viewQueries: [{
308
+ propertyName: "qrcElement",
309
+ first: true,
310
+ predicate: ["qrcElement"],
311
+ descendants: true,
312
+ isSignal: true
313
+ }],
314
+ exportAs: ["cmatQRCode"],
315
+ ngImport: i0,
316
+ template: "<div #qrcElement [class]=\"cssClass()\"></div>",
317
+ isInline: true,
318
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
319
+ encapsulation: i0.ViewEncapsulation.None
320
+ });
321
+ }
322
+ };
323
+ i0.ɵɵngDeclareClassMetadata({
324
+ minVersion: "12.0.0",
325
+ version: "22.2.3",
326
+ ngImport: i0,
327
+ type: CmatQRCodeComponent,
328
+ decorators: [{
329
+ type: Component,
330
+ args: [{
331
+ selector: "cmat-qrcode",
332
+ encapsulation: ViewEncapsulation.None,
333
+ changeDetection: ChangeDetectionStrategy.OnPush,
334
+ template: "<div #qrcElement [class]=\"cssClass()\"></div>",
335
+ exportAs: "cmatQRCode"
336
+ }]
337
+ }],
338
+ ctorParameters: () => [],
339
+ propDecorators: {
340
+ allowEmptyString: [{
341
+ type: i0.Input,
342
+ args: [{
343
+ isSignal: true,
344
+ alias: "allowEmptyString",
345
+ required: false
346
+ }]
347
+ }],
348
+ cssClass: [{
349
+ type: i0.Input,
350
+ args: [{
351
+ isSignal: true,
352
+ alias: "cssClass",
353
+ required: false
354
+ }]
355
+ }],
356
+ elementType: [{
357
+ type: i0.Input,
358
+ args: [{
359
+ isSignal: true,
360
+ alias: "elementType",
361
+ required: false
362
+ }]
363
+ }],
364
+ errorCorrectionLevel: [{
365
+ type: i0.Input,
366
+ args: [{
367
+ isSignal: true,
368
+ alias: "errorCorrectionLevel",
369
+ required: false
370
+ }]
371
+ }],
372
+ imageSrc: [{
373
+ type: i0.Input,
374
+ args: [{
375
+ isSignal: true,
376
+ alias: "imageSrc",
377
+ required: false
378
+ }]
379
+ }],
380
+ imageHeight: [{
381
+ type: i0.Input,
382
+ args: [{
383
+ isSignal: true,
384
+ alias: "imageHeight",
385
+ required: false
386
+ }]
387
+ }],
388
+ imageWidth: [{
389
+ type: i0.Input,
390
+ args: [{
391
+ isSignal: true,
392
+ alias: "imageWidth",
393
+ required: false
394
+ }]
395
+ }],
396
+ margin: [{
397
+ type: i0.Input,
398
+ args: [{
399
+ isSignal: true,
400
+ alias: "margin",
401
+ required: false
402
+ }]
403
+ }],
404
+ qrdata: [{
405
+ type: i0.Input,
406
+ args: [{
407
+ isSignal: true,
408
+ alias: "qrdata",
409
+ required: false
410
+ }]
411
+ }],
412
+ scale: [{
413
+ type: i0.Input,
414
+ args: [{
415
+ isSignal: true,
416
+ alias: "scale",
417
+ required: false
418
+ }]
419
+ }],
420
+ width: [{
421
+ type: i0.Input,
422
+ args: [{
423
+ isSignal: true,
424
+ alias: "width",
425
+ required: false
426
+ }]
427
+ }],
428
+ alt: [{
429
+ type: i0.Input,
430
+ args: [{
431
+ isSignal: true,
432
+ alias: "alt",
433
+ required: false
434
+ }]
435
+ }],
436
+ ariaLabel: [{
437
+ type: i0.Input,
438
+ args: [{
439
+ isSignal: true,
440
+ alias: "ariaLabel",
441
+ required: false
442
+ }]
443
+ }],
444
+ title: [{
445
+ type: i0.Input,
446
+ args: [{
447
+ isSignal: true,
448
+ alias: "title",
449
+ required: false
450
+ }]
451
+ }],
452
+ qrCodeURL: [{
453
+ type: i0.Output,
454
+ args: ["qrCodeURL"]
455
+ }],
456
+ qrcElement: [{
457
+ type: i0.ViewChild,
458
+ args: ["qrcElement", { isSignal: true }]
459
+ }]
460
+ }
461
+ });
287
462
  export { CmatQRCodeComponent };
288
- //# sourceMappingURL=cmat-components-qrcode.mjs.map
463
+
464
+ //# sourceMappingURL=cmat-components-qrcode.mjs.map