@gct-paas/excel 0.1.5 → 0.1.7

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 (170) hide show
  1. package/dist/{document-sub-table-action-DTmf8djY.js → Scrollbar-B7JBEV1a.js} +101 -30
  2. package/dist/{VueVideoPlayer-ZLD8hL4k.js → VueVideoPlayer-DaQz5GJ-.js} +2 -2
  3. package/dist/{agg-design-CeJqg8FA.js → agg-design-DQ-BW6Wp.js} +1 -1
  4. package/dist/{agg-props-CGmbXrHl.js → agg-props-pP0E3mbR.js} +1 -1
  5. package/dist/{agg-style-BX2t2CGh.js → agg-style-CPNDZOrv.js} +1 -1
  6. package/dist/{align-editor-DPdYAGLc.js → align-editor-DUCeImpf.js} +1 -1
  7. package/dist/{attach-fields-editor-O4OIRRpB.js → attach-fields-editor-CdtnInv8.js} +2 -2
  8. package/dist/{barcode-design-DURI5-Q5.js → barcode-design-D_FwFBHn.js} +3 -2
  9. package/dist/base/index.es.js +851 -79
  10. package/dist/{base-font-editor-DuDr0oh2.js → base-font-editor-BxXZUYlm.js} +2 -2
  11. package/dist/{boolean-design-oQ9w0jT6.js → boolean-design-CJ54p6GD.js} +3 -2
  12. package/dist/{boolean-props-TVey_bO1.js → boolean-props-CqnHYhfU.js} +3 -3
  13. package/dist/{boolean-style-ahVosL-1.js → boolean-style-BISfAKQN.js} +5 -4
  14. package/dist/{cell-upload-bBdpI6ua.js → cell-upload-BhvgDxZZ.js} +2 -2
  15. package/dist/{date-format-editor-uNiiJFmw.js → date-format-editor-BfpAkGaH.js} +2 -2
  16. package/dist/{date-time-design-CuMNyFsU.js → date-time-design-iHzRcZ2Z.js} +1 -1
  17. package/dist/{date-time-props-ufCr6G2X.js → date-time-props-DKu8RxHo.js} +4 -3
  18. package/dist/{date-time-style-DLxfllnf.js → date-time-style-BuceVhbM.js} +1 -1
  19. package/dist/{decimal-design-D6FK5-3M.js → decimal-design-qNDqq7oV.js} +1 -1
  20. package/dist/{decimal-display-mode-CbMnQBVa.js → decimal-display-mode-CRE2lUH0.js} +3 -2
  21. package/dist/{decimal-props-D7eRAxEu.js → decimal-props-DlZ1tbs4.js} +5 -4
  22. package/dist/{decimal-style-CIOLsYek.js → decimal-style-pShvLMIT.js} +1 -1
  23. package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-Dt1QVHQ6.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-DjWHIcsL.js} +3 -2
  24. package/dist/{diagonal-design-Doz_EKCn.js → diagonal-design-Cds1_VOU.js} +2 -2
  25. package/dist/{double-design-CgvwQhau.js → double-design-KpjZVekY.js} +1 -1
  26. package/dist/{double-props-Do3bWECB.js → double-props-CLDo0OMF.js} +4 -4
  27. package/dist/{double-style--msZlxPG.js → double-style-Dk4bWTOC.js} +1 -1
  28. package/dist/{edit.utils-CXmmCnxE-BdPovZCI.js → edit.utils-CXmmCnxE-DmboFGWY.js} +1 -1
  29. package/dist/{enum-design-BdHT6RDE.js → enum-design-DWBVKgpn.js} +2 -2
  30. package/dist/{enum-props-D5XXv3x-.js → enum-props-BMqvi-h7.js} +4 -4
  31. package/dist/{enum-style-DhrY3Nb3.js → enum-style-Dg8FVDC8.js} +2 -2
  32. package/dist/{document-quick-fillin.vue_vue_type_style_index_0_scoped_a18386ab_lang-D66iEl9_.js → error-group-panel.vue_vue_type_style_index_0_scoped_b94cd584_lang-_YqKZ9BJ.js} +2049 -280
  33. package/dist/excel.css +1789 -596
  34. package/dist/{exceljs.min-Q7cd3slm.js → exceljs.min-D8o4bQuo.js} +2 -2
  35. package/dist/{expression-design-jkeo9bkU.js → expression-design-C2wvd8JA.js} +1 -1
  36. package/dist/{expression-props-D7Zk2Lj6.js → expression-props-DCxZKIhB.js} +1 -1
  37. package/dist/{expression-style-eJ70zjw3.js → expression-style-BHrUq0q6.js} +1 -1
  38. package/dist/{file-design-mp0bI-tQ.js → file-design-CAIp6Sxw.js} +1 -1
  39. package/dist/{file-props-DfENXSNT.js → file-props-RSS1kA9M.js} +2 -2
  40. package/dist/{file-style-C2uWZfTL.js → file-style-C_egOJZs.js} +1 -1
  41. package/dist/{font-editor-BgjVz_IS.js → font-editor-bSMMIfN6.js} +3 -3
  42. package/dist/{form-annotation-controller-NcH3tnGJ.js → form-annotation-controller-BW5Z5Km-.js} +3 -2
  43. package/dist/{image-design-CRtBjNLy.js → image-design-9zFKEj7j.js} +2 -2
  44. package/dist/{image-design-DSbpGyCq.js → image-design-D43cm8v9.js} +2 -2
  45. package/dist/{image-props-DaF9EaTG.js → image-props-BhAoKssZ.js} +1 -1
  46. package/dist/{image-style-ChKqwGjs.js → image-style-CWSi-cNF.js} +1 -1
  47. package/dist/{index-DfJnS3jv.js → index-3-nPfz8f.js} +2 -1
  48. package/dist/{index-DP-fe4OH.js → index-B0826EbX.js} +2 -1
  49. package/dist/{index-7tuEFT4g.js → index-B5OinRVD.js} +3 -2
  50. package/dist/{index-DM8guHf_.js → index-B8Ishhy1.js} +3 -3
  51. package/dist/{index-CKWk_Iax.js → index-BR6tPbJL.js} +2 -1
  52. package/dist/{index-BLZe6LV2.js → index-C5UcOth6.js} +2 -1
  53. package/dist/{index-D_W1JQG3.js → index-CSfsaSES.js} +2 -1
  54. package/dist/{index-GMmRcX1e.js → index-CXO7yNtU.js} +3 -2
  55. package/dist/{index-DBg_HS_0.js → index-CYx4a6ZF.js} +3 -2
  56. package/dist/{index-C-R-S828.js → index-CZTQaArc.js} +2 -1
  57. package/dist/{index-BIBsEVp6.js → index-Ce5aQSOG.js} +2 -1
  58. package/dist/{index-CpFGw3N1.js → index-Cf66ceay.js} +2 -1
  59. package/dist/{index-DjrJwtC-.js → index-Cg_oo-85.js} +3 -2
  60. package/dist/{index-3W4ojOsw.js → index-CiJDBVfG.js} +2 -1
  61. package/dist/{index-I4RvYVZ5.js → index-CisiQ6o8.js} +2 -1
  62. package/dist/{index-DbGPzmbp.js → index-D0oKqTXq.js} +3 -2
  63. package/dist/{index-uZMZ5Sw0.js → index-DC7jXgI1.js} +2 -1
  64. package/dist/{index-BQlGsxLp.js → index-DCUzC9E1.js} +2 -1
  65. package/dist/{index-CiCyHGDi.js → index-DDsAwVgc.js} +2 -1
  66. package/dist/{index-0fm9o8n6.js → index-DOLGt-oq.js} +2 -1
  67. package/dist/{index-BlD4K4x9.js → index-DPic0PAg.js} +2 -1
  68. package/dist/{index-Bp_dDukK.js → index-DUwxlUsk.js} +2 -1
  69. package/dist/{index-CnSZi6Rb.js → index-DdHFG9gu.js} +2 -1
  70. package/dist/{index-CLfbQ9Km.js → index-DoHv-Wat.js} +2 -1
  71. package/dist/{index-924ospJT.js → index-DuyXOtQd.js} +3763 -3216
  72. package/dist/{index-CrsYNoBp.js → index-DxpaKPpt.js} +2 -1
  73. package/dist/{index-qQN-nVT9.js → index-EgjSgxmn.js} +2 -1
  74. package/dist/{index-Cejm_o4O.js → index-G8p5DlES.js} +2 -1
  75. package/dist/{index-B5sCWlDl.js → index-Wc8s0XWz.js} +2 -1
  76. package/dist/{index-Czp4LZY9.js → index-n-nmT24v.js} +2 -1
  77. package/dist/{index-BomC1N9j.js → index-v2uwFW0w.js} +2 -1
  78. package/dist/{index-DSzP8X8O.js → index-v5VaTR1M.js} +2 -1
  79. package/dist/{index-j478qavG.js → index-wT1_RQsk.js} +2 -1
  80. package/dist/index.es.js +11 -9
  81. package/dist/{integer-design-D9JByLVX.js → integer-design-CZY_GaX4.js} +1 -1
  82. package/dist/{integer-props-DxpV-NTy.js → integer-props-CiWN81iV.js} +5 -4
  83. package/dist/{integer-style-BDLAdzGV.js → integer-style-CmDVOU3z.js} +1 -1
  84. package/dist/{mb-render-JL1sDSy6.js → mb-render-DH3wjHF6.js} +1 -1
  85. package/dist/{number-input-ex-3TUi3vyu.js → number-input-ex-DBP6bH2g.js} +1 -1
  86. package/dist/{org-props-0IzW6XsJ.js → org-props-BbognFne.js} +3 -2
  87. package/dist/{org-style-DdpRlrHO.js → org-style-CKcKh--d.js} +1 -1
  88. package/dist/{pagination-design-v9j51aeB.js → pagination-design-CGQoxT1c.js} +3 -2
  89. package/dist/paper-widget-design-C2R1vq4x.js +4 -0
  90. package/dist/{qrcode-design-CmeowsPt.js → qrcode-design-nmvc6IKq.js} +1 -1
  91. package/dist/{ref-autofill-editor--L_WtK7J.js → ref-autofill-editor-BuwJ25wY.js} +2 -2
  92. package/dist/{ref-props-jxfaWPha.js → ref-props-GcDi5wEa.js} +3 -3
  93. package/dist/{ref-style-CaMOimNG.js → ref-style-CiNfw28x.js} +1 -1
  94. package/dist/{revo-grid.entry-DNrCIdcu.js → revo-grid.entry-0NNTZ0B8.js} +1 -1
  95. package/dist/{revogr-attribution_7.entry-g7DReToZ.js → revogr-attribution_7.entry-CoBqkZ5n.js} +3 -3
  96. package/dist/{revogr-clipboard_3.entry-vJotBpPb.js → revogr-clipboard_3.entry-CAhzTbEf.js} +2 -2
  97. package/dist/{revogr-data_4.entry-CoP8SHrP.js → revogr-data_4.entry-CFMX1h_E.js} +2 -2
  98. package/dist/{revogr-filter-panel.entry-Cl_ZKbCr.js → revogr-filter-panel.entry-D-iVwIOe.js} +1 -1
  99. package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-DWza8j-a.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-BVkJaE6C.js} +3 -2
  100. package/dist/{serialnumber-design-DCbPl9zc.js → serialnumber-design-Bh-HXqce.js} +1 -1
  101. package/dist/shared/index.es.js +28 -28
  102. package/dist/signature-DDUs5vB9.js +9 -0
  103. package/dist/{signature-design-DJ59c5xR.js → signature-design-dZn3EpuN.js} +1 -1
  104. package/dist/{signature-props-CfLmfzHT.js → signature-props-_279L5dA.js} +3 -3
  105. package/dist/{signature-style-dr1T4Dfx.js → signature-style-BjgT1D8c.js} +1 -1
  106. package/dist/{single-field-drop-BpgydSeT.js → single-field-drop-HJs82PTz.js} +2 -2
  107. package/dist/{size-editor-BSZoEseb.js → size-editor-DqrqaJWc.js} +1 -1
  108. package/dist/src/index.d.ts +1 -0
  109. package/dist/src/nocode-base/src/components/ebr-wiki-layout.vue.d.ts +34 -0
  110. package/dist/src/nocode-base/src/components/edhr-new-wiki-tree.vue.d.ts +46 -0
  111. package/dist/src/nocode-base/src/components/error-group-panel.vue.d.ts +7 -0
  112. package/dist/src/nocode-base/src/components/index.d.ts +4 -1
  113. package/dist/src/nocode-mobile-render/src/integration/form-ins/change-form-ins-popup.vue.d.ts +2 -2
  114. package/dist/src/nocode-mobile-render/src/integration/mobile-edhr-fill-modal.vue.d.ts +67 -1
  115. package/dist/src/nocode-mobile-render/src/integration/mobile-edhr-menu.vue.d.ts +4 -4
  116. package/dist/src/online-form/src/components/version-diff/comps/change-version-modal.vue.d.ts +14 -0
  117. package/dist/src/online-form/src/components/version-diff/comps/user-avatar.vue.d.ts +5 -0
  118. package/dist/src/online-form/src/components/version-diff/comps/version-list-modal.vue.d.ts +6 -0
  119. package/dist/src/online-form/src/components/version-diff/field-diff/attrs/index.d.ts +2 -0
  120. package/dist/src/online-form/src/components/version-diff/field-diff/field-diff-card.vue.d.ts +5 -0
  121. package/dist/src/online-form/src/components/version-diff/field-diff/field-diff-list.vue.d.ts +10 -0
  122. package/dist/src/online-form/src/components/version-diff/field-diff/field-diff-tabs.vue.d.ts +10 -0
  123. package/dist/src/online-form/src/components/version-diff/iframe/preview-iframe.vue.d.ts +17 -0
  124. package/dist/src/online-form/src/components/version-diff/iframe/preview-router.vue.d.ts +39 -0
  125. package/dist/src/online-form/src/components/version-diff/iframe/util.d.ts +1 -0
  126. package/dist/src/online-form/src/components/version-diff/index/diff.d.ts +4 -0
  127. package/dist/src/online-form/src/components/version-diff/index/types.d.ts +79 -0
  128. package/dist/src/online-form/src/components/version-diff/index/use-version-diff.d.ts +17 -0
  129. package/dist/src/online-form/src/components/version-diff/index/version-diff-index.vue.d.ts +73 -0
  130. package/dist/src/online-form/src/components/version-diff/index.d.ts +7 -0
  131. package/dist/src/online-form/src/components/version-diff/sheet/diff-sheet.vue.d.ts +22 -0
  132. package/dist/src/online-form/src/components/version-diff/sheet/type.d.ts +1 -0
  133. package/dist/src/online-form/src/components/version-diff/sheet/use-diff-sheet.d.ts +14 -0
  134. package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/field-tree-select.vue.d.ts +2 -2
  135. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/add-builtin-param/add-builtin-param-select.vue.d.ts +2 -2
  136. package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/form-field-tree-select.vue.d.ts +2 -2
  137. package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/material-rdo-select.vue.d.ts +2 -2
  138. package/dist/src/shared/components/Timeline/index.d.ts +3 -0
  139. package/dist/src/shared/components/Timeline/timeline.vue.d.ts +28 -0
  140. package/dist/src/shared/components/Timeline/type.d.ts +7 -0
  141. package/dist/src/shared/components/rdo-tree-select/rdo-tree-select.vue.d.ts +2 -2
  142. package/dist/src/shared/components/version-select/version-select.vue.d.ts +2 -2
  143. package/dist/{text-design-GhDOCEKW.js → text-design-BDWhD2sy.js} +3 -2
  144. package/dist/{text-design-B1cCBOad.js → text-design-BaXlEfHf.js} +2 -2
  145. package/dist/{text-props-C87CNZwJ.js → text-props-BAQWLAYY.js} +4 -4
  146. package/dist/{text-style-lLe-3Jf4.js → text-style-BpCU0KMs.js} +1 -1
  147. package/dist/{throttle-Cpk1LoGk-BjiiSDKG.js → throttle-Cpk1LoGk-Cuw2Gnao.js} +1 -1
  148. package/dist/{timediff-design-OvKUg4IL.js → timediff-design-CJnQ__0R.js} +2 -1
  149. package/dist/{trace-design-DGwi2jEJ.js → trace-design-C6D8PxA2.js} +2 -2
  150. package/dist/{trace-props-BatGqfOz.js → trace-props-BIqLaT63.js} +5 -5
  151. package/dist/{trace-style-DJIQyozK.js → trace-style-Dukw7NV9.js} +1 -1
  152. package/dist/{user-props-CwnMl96x.js → user-props-DBYsHkOT.js} +3 -2
  153. package/dist/{user-style-C8ZQPaes.js → user-style-BuDaimJL.js} +1 -1
  154. package/dist/{value-editor.vue_vue_type_style_index_0_lang-f3d5bm3X.js → value-editor.vue_vue_type_style_index_0_lang-CDf0_29c.js} +3 -2
  155. package/dist/{version-select-D6Jjs5hL.js → version-select-1agZAO_o.js} +1 -2
  156. package/dist/web-render/index.es.js +36 -37
  157. package/dist/{widget-barcode-B0QQXeUU.js → widget-barcode-DFhW7uOh.js} +5 -4
  158. package/dist/{widget-diagonal-DYSwEOPP.js → widget-diagonal-qNoAh0-Z.js} +3 -3
  159. package/dist/{widget-image-F3Kxsxt8.js → widget-image-DrviL5SX.js} +5 -5
  160. package/dist/{widget-line-BAXnpy9r.js → widget-line-DGdSOlvg.js} +3 -2
  161. package/dist/{widget-pagination-Z8i0xx7v.js → widget-pagination-CPG8FDLZ.js} +6 -5
  162. package/dist/{widget-power-hn2k4-Ug.js → widget-power-Drk4rLyc.js} +3 -3
  163. package/dist/{widget-qrcode-fftrW5Nj.js → widget-qrcode-DOVzlS-t.js} +4 -3
  164. package/dist/{widget-rangelimit-BDivDS-G.js → widget-rangelimit-Dn1QB6xI.js} +3 -3
  165. package/dist/{widget-serialnumber-1QCmac2g.js → widget-serialnumber-ByGCzq5B.js} +1 -1
  166. package/dist/{widget-text-B51VrEKQ.js → widget-text-BUUOZTKg.js} +5 -5
  167. package/dist/{widget-timediff-DpN47Ghj.js → widget-timediff-BviY2xd0.js} +3 -2
  168. package/package.json +1 -1
  169. package/dist/AntdIcon-C3RMq2zm.js +0 -1040
  170. package/dist/paper-widget-design-fyF-x54_.js +0 -4
@@ -1,1040 +0,0 @@
1
- import { nextTick, h, createVNode } from "vue";
2
- var SignatureTypeEnum = /* @__PURE__ */ ((SignatureTypeEnum2) => {
3
- SignatureTypeEnum2["SIGNATURE_ONLY"] = "signature_only";
4
- SignatureTypeEnum2["SIGNATURE_DATE"] = "signature_date";
5
- SignatureTypeEnum2["SIGNATURE_DATETIME"] = "signature_datetime";
6
- return SignatureTypeEnum2;
7
- })(SignatureTypeEnum || {});
8
- function bound01(n, max) {
9
- if (isOnePointZero(n)) {
10
- n = "100%";
11
- }
12
- var isPercent = isPercentage(n);
13
- n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
14
- if (isPercent) {
15
- n = parseInt(String(n * max), 10) / 100;
16
- }
17
- if (Math.abs(n - max) < 1e-6) {
18
- return 1;
19
- }
20
- if (max === 360) {
21
- n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
22
- } else {
23
- n = n % max / parseFloat(String(max));
24
- }
25
- return n;
26
- }
27
- function isOnePointZero(n) {
28
- return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
29
- }
30
- function isPercentage(n) {
31
- return typeof n === "string" && n.indexOf("%") !== -1;
32
- }
33
- function boundAlpha(a) {
34
- a = parseFloat(a);
35
- if (isNaN(a) || a < 0 || a > 1) {
36
- a = 1;
37
- }
38
- return a;
39
- }
40
- function convertToPercentage(n) {
41
- if (n <= 1) {
42
- return "".concat(Number(n) * 100, "%");
43
- }
44
- return n;
45
- }
46
- function pad2(c) {
47
- return c.length === 1 ? "0" + c : String(c);
48
- }
49
- function rgbToRgb(r, g, b) {
50
- return {
51
- r: bound01(r, 255) * 255,
52
- g: bound01(g, 255) * 255,
53
- b: bound01(b, 255) * 255
54
- };
55
- }
56
- function hue2rgb(p, q, t) {
57
- if (t < 0) {
58
- t += 1;
59
- }
60
- if (t > 1) {
61
- t -= 1;
62
- }
63
- if (t < 1 / 6) {
64
- return p + (q - p) * (6 * t);
65
- }
66
- if (t < 1 / 2) {
67
- return q;
68
- }
69
- if (t < 2 / 3) {
70
- return p + (q - p) * (2 / 3 - t) * 6;
71
- }
72
- return p;
73
- }
74
- function hslToRgb(h2, s, l) {
75
- var r;
76
- var g;
77
- var b;
78
- h2 = bound01(h2, 360);
79
- s = bound01(s, 100);
80
- l = bound01(l, 100);
81
- if (s === 0) {
82
- g = l;
83
- b = l;
84
- r = l;
85
- } else {
86
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
87
- var p = 2 * l - q;
88
- r = hue2rgb(p, q, h2 + 1 / 3);
89
- g = hue2rgb(p, q, h2);
90
- b = hue2rgb(p, q, h2 - 1 / 3);
91
- }
92
- return { r: r * 255, g: g * 255, b: b * 255 };
93
- }
94
- function rgbToHsv(r, g, b) {
95
- r = bound01(r, 255);
96
- g = bound01(g, 255);
97
- b = bound01(b, 255);
98
- var max = Math.max(r, g, b);
99
- var min = Math.min(r, g, b);
100
- var h2 = 0;
101
- var v = max;
102
- var d = max - min;
103
- var s = max === 0 ? 0 : d / max;
104
- if (max === min) {
105
- h2 = 0;
106
- } else {
107
- switch (max) {
108
- case r:
109
- h2 = (g - b) / d + (g < b ? 6 : 0);
110
- break;
111
- case g:
112
- h2 = (b - r) / d + 2;
113
- break;
114
- case b:
115
- h2 = (r - g) / d + 4;
116
- break;
117
- }
118
- h2 /= 6;
119
- }
120
- return { h: h2, s, v };
121
- }
122
- function hsvToRgb(h2, s, v) {
123
- h2 = bound01(h2, 360) * 6;
124
- s = bound01(s, 100);
125
- v = bound01(v, 100);
126
- var i = Math.floor(h2);
127
- var f = h2 - i;
128
- var p = v * (1 - s);
129
- var q = v * (1 - f * s);
130
- var t = v * (1 - (1 - f) * s);
131
- var mod = i % 6;
132
- var r = [v, q, p, p, t, v][mod];
133
- var g = [t, v, v, q, p, p][mod];
134
- var b = [p, p, t, v, v, q][mod];
135
- return { r: r * 255, g: g * 255, b: b * 255 };
136
- }
137
- function rgbToHex(r, g, b, allow3Char) {
138
- var hex = [
139
- pad2(Math.round(r).toString(16)),
140
- pad2(Math.round(g).toString(16)),
141
- pad2(Math.round(b).toString(16))
142
- ];
143
- return hex.join("");
144
- }
145
- function convertHexToDecimal(h2) {
146
- return parseIntFromHex(h2) / 255;
147
- }
148
- function parseIntFromHex(val) {
149
- return parseInt(val, 16);
150
- }
151
- var names = {
152
- aliceblue: "#f0f8ff",
153
- antiquewhite: "#faebd7",
154
- aqua: "#00ffff",
155
- aquamarine: "#7fffd4",
156
- azure: "#f0ffff",
157
- beige: "#f5f5dc",
158
- bisque: "#ffe4c4",
159
- black: "#000000",
160
- blanchedalmond: "#ffebcd",
161
- blue: "#0000ff",
162
- blueviolet: "#8a2be2",
163
- brown: "#a52a2a",
164
- burlywood: "#deb887",
165
- cadetblue: "#5f9ea0",
166
- chartreuse: "#7fff00",
167
- chocolate: "#d2691e",
168
- coral: "#ff7f50",
169
- cornflowerblue: "#6495ed",
170
- cornsilk: "#fff8dc",
171
- crimson: "#dc143c",
172
- cyan: "#00ffff",
173
- darkblue: "#00008b",
174
- darkcyan: "#008b8b",
175
- darkgoldenrod: "#b8860b",
176
- darkgray: "#a9a9a9",
177
- darkgreen: "#006400",
178
- darkgrey: "#a9a9a9",
179
- darkkhaki: "#bdb76b",
180
- darkmagenta: "#8b008b",
181
- darkolivegreen: "#556b2f",
182
- darkorange: "#ff8c00",
183
- darkorchid: "#9932cc",
184
- darkred: "#8b0000",
185
- darksalmon: "#e9967a",
186
- darkseagreen: "#8fbc8f",
187
- darkslateblue: "#483d8b",
188
- darkslategray: "#2f4f4f",
189
- darkslategrey: "#2f4f4f",
190
- darkturquoise: "#00ced1",
191
- darkviolet: "#9400d3",
192
- deeppink: "#ff1493",
193
- deepskyblue: "#00bfff",
194
- dimgray: "#696969",
195
- dimgrey: "#696969",
196
- dodgerblue: "#1e90ff",
197
- firebrick: "#b22222",
198
- floralwhite: "#fffaf0",
199
- forestgreen: "#228b22",
200
- fuchsia: "#ff00ff",
201
- gainsboro: "#dcdcdc",
202
- ghostwhite: "#f8f8ff",
203
- goldenrod: "#daa520",
204
- gold: "#ffd700",
205
- gray: "#808080",
206
- green: "#008000",
207
- greenyellow: "#adff2f",
208
- grey: "#808080",
209
- honeydew: "#f0fff0",
210
- hotpink: "#ff69b4",
211
- indianred: "#cd5c5c",
212
- indigo: "#4b0082",
213
- ivory: "#fffff0",
214
- khaki: "#f0e68c",
215
- lavenderblush: "#fff0f5",
216
- lavender: "#e6e6fa",
217
- lawngreen: "#7cfc00",
218
- lemonchiffon: "#fffacd",
219
- lightblue: "#add8e6",
220
- lightcoral: "#f08080",
221
- lightcyan: "#e0ffff",
222
- lightgoldenrodyellow: "#fafad2",
223
- lightgray: "#d3d3d3",
224
- lightgreen: "#90ee90",
225
- lightgrey: "#d3d3d3",
226
- lightpink: "#ffb6c1",
227
- lightsalmon: "#ffa07a",
228
- lightseagreen: "#20b2aa",
229
- lightskyblue: "#87cefa",
230
- lightslategray: "#778899",
231
- lightslategrey: "#778899",
232
- lightsteelblue: "#b0c4de",
233
- lightyellow: "#ffffe0",
234
- lime: "#00ff00",
235
- limegreen: "#32cd32",
236
- linen: "#faf0e6",
237
- magenta: "#ff00ff",
238
- maroon: "#800000",
239
- mediumaquamarine: "#66cdaa",
240
- mediumblue: "#0000cd",
241
- mediumorchid: "#ba55d3",
242
- mediumpurple: "#9370db",
243
- mediumseagreen: "#3cb371",
244
- mediumslateblue: "#7b68ee",
245
- mediumspringgreen: "#00fa9a",
246
- mediumturquoise: "#48d1cc",
247
- mediumvioletred: "#c71585",
248
- midnightblue: "#191970",
249
- mintcream: "#f5fffa",
250
- mistyrose: "#ffe4e1",
251
- moccasin: "#ffe4b5",
252
- navajowhite: "#ffdead",
253
- navy: "#000080",
254
- oldlace: "#fdf5e6",
255
- olive: "#808000",
256
- olivedrab: "#6b8e23",
257
- orange: "#ffa500",
258
- orangered: "#ff4500",
259
- orchid: "#da70d6",
260
- palegoldenrod: "#eee8aa",
261
- palegreen: "#98fb98",
262
- paleturquoise: "#afeeee",
263
- palevioletred: "#db7093",
264
- papayawhip: "#ffefd5",
265
- peachpuff: "#ffdab9",
266
- peru: "#cd853f",
267
- pink: "#ffc0cb",
268
- plum: "#dda0dd",
269
- powderblue: "#b0e0e6",
270
- purple: "#800080",
271
- rebeccapurple: "#663399",
272
- red: "#ff0000",
273
- rosybrown: "#bc8f8f",
274
- royalblue: "#4169e1",
275
- saddlebrown: "#8b4513",
276
- salmon: "#fa8072",
277
- sandybrown: "#f4a460",
278
- seagreen: "#2e8b57",
279
- seashell: "#fff5ee",
280
- sienna: "#a0522d",
281
- silver: "#c0c0c0",
282
- skyblue: "#87ceeb",
283
- slateblue: "#6a5acd",
284
- slategray: "#708090",
285
- slategrey: "#708090",
286
- snow: "#fffafa",
287
- springgreen: "#00ff7f",
288
- steelblue: "#4682b4",
289
- tan: "#d2b48c",
290
- teal: "#008080",
291
- thistle: "#d8bfd8",
292
- tomato: "#ff6347",
293
- turquoise: "#40e0d0",
294
- violet: "#ee82ee",
295
- wheat: "#f5deb3",
296
- white: "#ffffff",
297
- whitesmoke: "#f5f5f5",
298
- yellow: "#ffff00",
299
- yellowgreen: "#9acd32"
300
- };
301
- function inputToRGB(color) {
302
- var rgb = { r: 0, g: 0, b: 0 };
303
- var a = 1;
304
- var s = null;
305
- var v = null;
306
- var l = null;
307
- var ok = false;
308
- var format = false;
309
- if (typeof color === "string") {
310
- color = stringInputToObject(color);
311
- }
312
- if (typeof color === "object") {
313
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
314
- rgb = rgbToRgb(color.r, color.g, color.b);
315
- ok = true;
316
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
317
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
318
- s = convertToPercentage(color.s);
319
- v = convertToPercentage(color.v);
320
- rgb = hsvToRgb(color.h, s, v);
321
- ok = true;
322
- format = "hsv";
323
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
324
- s = convertToPercentage(color.s);
325
- l = convertToPercentage(color.l);
326
- rgb = hslToRgb(color.h, s, l);
327
- ok = true;
328
- format = "hsl";
329
- }
330
- if (Object.prototype.hasOwnProperty.call(color, "a")) {
331
- a = color.a;
332
- }
333
- }
334
- a = boundAlpha(a);
335
- return {
336
- ok,
337
- format: color.format || format,
338
- r: Math.min(255, Math.max(rgb.r, 0)),
339
- g: Math.min(255, Math.max(rgb.g, 0)),
340
- b: Math.min(255, Math.max(rgb.b, 0)),
341
- a
342
- };
343
- }
344
- var CSS_INTEGER = "[-\\+]?\\d+%?";
345
- var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
346
- var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
347
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
348
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
349
- var matchers = {
350
- CSS_UNIT: new RegExp(CSS_UNIT),
351
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
352
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
353
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
354
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
355
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
356
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
357
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
358
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
359
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
360
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
361
- };
362
- function stringInputToObject(color) {
363
- color = color.trim().toLowerCase();
364
- if (color.length === 0) {
365
- return false;
366
- }
367
- var named = false;
368
- if (names[color]) {
369
- color = names[color];
370
- named = true;
371
- } else if (color === "transparent") {
372
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
373
- }
374
- var match = matchers.rgb.exec(color);
375
- if (match) {
376
- return { r: match[1], g: match[2], b: match[3] };
377
- }
378
- match = matchers.rgba.exec(color);
379
- if (match) {
380
- return { r: match[1], g: match[2], b: match[3], a: match[4] };
381
- }
382
- match = matchers.hsl.exec(color);
383
- if (match) {
384
- return { h: match[1], s: match[2], l: match[3] };
385
- }
386
- match = matchers.hsla.exec(color);
387
- if (match) {
388
- return { h: match[1], s: match[2], l: match[3], a: match[4] };
389
- }
390
- match = matchers.hsv.exec(color);
391
- if (match) {
392
- return { h: match[1], s: match[2], v: match[3] };
393
- }
394
- match = matchers.hsva.exec(color);
395
- if (match) {
396
- return { h: match[1], s: match[2], v: match[3], a: match[4] };
397
- }
398
- match = matchers.hex8.exec(color);
399
- if (match) {
400
- return {
401
- r: parseIntFromHex(match[1]),
402
- g: parseIntFromHex(match[2]),
403
- b: parseIntFromHex(match[3]),
404
- a: convertHexToDecimal(match[4]),
405
- format: named ? "name" : "hex8"
406
- };
407
- }
408
- match = matchers.hex6.exec(color);
409
- if (match) {
410
- return {
411
- r: parseIntFromHex(match[1]),
412
- g: parseIntFromHex(match[2]),
413
- b: parseIntFromHex(match[3]),
414
- format: named ? "name" : "hex"
415
- };
416
- }
417
- match = matchers.hex4.exec(color);
418
- if (match) {
419
- return {
420
- r: parseIntFromHex(match[1] + match[1]),
421
- g: parseIntFromHex(match[2] + match[2]),
422
- b: parseIntFromHex(match[3] + match[3]),
423
- a: convertHexToDecimal(match[4] + match[4]),
424
- format: named ? "name" : "hex8"
425
- };
426
- }
427
- match = matchers.hex3.exec(color);
428
- if (match) {
429
- return {
430
- r: parseIntFromHex(match[1] + match[1]),
431
- g: parseIntFromHex(match[2] + match[2]),
432
- b: parseIntFromHex(match[3] + match[3]),
433
- format: named ? "name" : "hex"
434
- };
435
- }
436
- return false;
437
- }
438
- function isValidCSSUnit(color) {
439
- return Boolean(matchers.CSS_UNIT.exec(String(color)));
440
- }
441
- var hueStep = 2;
442
- var saturationStep = 0.16;
443
- var saturationStep2 = 0.05;
444
- var brightnessStep1 = 0.05;
445
- var brightnessStep2 = 0.15;
446
- var lightColorCount = 5;
447
- var darkColorCount = 4;
448
- var darkColorMap = [{
449
- index: 7,
450
- opacity: 0.15
451
- }, {
452
- index: 6,
453
- opacity: 0.25
454
- }, {
455
- index: 5,
456
- opacity: 0.3
457
- }, {
458
- index: 5,
459
- opacity: 0.45
460
- }, {
461
- index: 5,
462
- opacity: 0.65
463
- }, {
464
- index: 5,
465
- opacity: 0.85
466
- }, {
467
- index: 4,
468
- opacity: 0.9
469
- }, {
470
- index: 3,
471
- opacity: 0.95
472
- }, {
473
- index: 2,
474
- opacity: 0.97
475
- }, {
476
- index: 1,
477
- opacity: 0.98
478
- }];
479
- function toHsv(_ref) {
480
- var r = _ref.r, g = _ref.g, b = _ref.b;
481
- var hsv = rgbToHsv(r, g, b);
482
- return {
483
- h: hsv.h * 360,
484
- s: hsv.s,
485
- v: hsv.v
486
- };
487
- }
488
- function toHex(_ref2) {
489
- var r = _ref2.r, g = _ref2.g, b = _ref2.b;
490
- return "#".concat(rgbToHex(r, g, b));
491
- }
492
- function mix(rgb1, rgb2, amount) {
493
- var p = amount / 100;
494
- var rgb = {
495
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
496
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
497
- b: (rgb2.b - rgb1.b) * p + rgb1.b
498
- };
499
- return rgb;
500
- }
501
- function getHue(hsv, i, light) {
502
- var hue;
503
- if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
504
- hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
505
- } else {
506
- hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
507
- }
508
- if (hue < 0) {
509
- hue += 360;
510
- } else if (hue >= 360) {
511
- hue -= 360;
512
- }
513
- return hue;
514
- }
515
- function getSaturation(hsv, i, light) {
516
- if (hsv.h === 0 && hsv.s === 0) {
517
- return hsv.s;
518
- }
519
- var saturation;
520
- if (light) {
521
- saturation = hsv.s - saturationStep * i;
522
- } else if (i === darkColorCount) {
523
- saturation = hsv.s + saturationStep;
524
- } else {
525
- saturation = hsv.s + saturationStep2 * i;
526
- }
527
- if (saturation > 1) {
528
- saturation = 1;
529
- }
530
- if (light && i === lightColorCount && saturation > 0.1) {
531
- saturation = 0.1;
532
- }
533
- if (saturation < 0.06) {
534
- saturation = 0.06;
535
- }
536
- return Number(saturation.toFixed(2));
537
- }
538
- function getValue(hsv, i, light) {
539
- var value;
540
- if (light) {
541
- value = hsv.v + brightnessStep1 * i;
542
- } else {
543
- value = hsv.v - brightnessStep2 * i;
544
- }
545
- if (value > 1) {
546
- value = 1;
547
- }
548
- return Number(value.toFixed(2));
549
- }
550
- function generate$1(color) {
551
- var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
552
- var patterns = [];
553
- var pColor = inputToRGB(color);
554
- for (var i = lightColorCount; i > 0; i -= 1) {
555
- var hsv = toHsv(pColor);
556
- var colorString = toHex(inputToRGB({
557
- h: getHue(hsv, i, true),
558
- s: getSaturation(hsv, i, true),
559
- v: getValue(hsv, i, true)
560
- }));
561
- patterns.push(colorString);
562
- }
563
- patterns.push(toHex(pColor));
564
- for (var _i = 1; _i <= darkColorCount; _i += 1) {
565
- var _hsv = toHsv(pColor);
566
- var _colorString = toHex(inputToRGB({
567
- h: getHue(_hsv, _i),
568
- s: getSaturation(_hsv, _i),
569
- v: getValue(_hsv, _i)
570
- }));
571
- patterns.push(_colorString);
572
- }
573
- if (opts.theme === "dark") {
574
- return darkColorMap.map(function(_ref3) {
575
- var index = _ref3.index, opacity = _ref3.opacity;
576
- var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index]), opacity * 100));
577
- return darkColorString;
578
- });
579
- }
580
- return patterns;
581
- }
582
- var presetPrimaryColors = {
583
- red: "#F5222D",
584
- volcano: "#FA541C",
585
- orange: "#FA8C16",
586
- gold: "#FAAD14",
587
- yellow: "#FADB14",
588
- lime: "#A0D911",
589
- green: "#52C41A",
590
- cyan: "#13C2C2",
591
- blue: "#1890FF",
592
- geekblue: "#2F54EB",
593
- purple: "#722ED1",
594
- magenta: "#EB2F96",
595
- grey: "#666666"
596
- };
597
- var presetPalettes = {};
598
- var presetDarkPalettes = {};
599
- Object.keys(presetPrimaryColors).forEach(function(key) {
600
- presetPalettes[key] = generate$1(presetPrimaryColors[key]);
601
- presetPalettes[key].primary = presetPalettes[key][5];
602
- presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
603
- theme: "dark",
604
- backgroundColor: "#141414"
605
- });
606
- presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
607
- });
608
- var containers = [];
609
- var styleElements = [];
610
- var usage = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
611
- function createStyleElement() {
612
- var styleElement = document.createElement("style");
613
- styleElement.setAttribute("type", "text/css");
614
- return styleElement;
615
- }
616
- function insertCss(css, options) {
617
- options = options || {};
618
- if (css === void 0) {
619
- throw new Error(usage);
620
- }
621
- var position = options.prepend === true ? "prepend" : "append";
622
- var container = options.container !== void 0 ? options.container : document.querySelector("head");
623
- var containerId = containers.indexOf(container);
624
- if (containerId === -1) {
625
- containerId = containers.push(container) - 1;
626
- styleElements[containerId] = {};
627
- }
628
- var styleElement;
629
- if (styleElements[containerId] !== void 0 && styleElements[containerId][position] !== void 0) {
630
- styleElement = styleElements[containerId][position];
631
- } else {
632
- styleElement = styleElements[containerId][position] = createStyleElement();
633
- if (position === "prepend") {
634
- container.insertBefore(styleElement, container.childNodes[0]);
635
- } else {
636
- container.appendChild(styleElement);
637
- }
638
- }
639
- if (css.charCodeAt(0) === 65279) {
640
- css = css.substr(1, css.length);
641
- }
642
- if (styleElement.styleSheet) {
643
- styleElement.styleSheet.cssText += css;
644
- } else {
645
- styleElement.textContent += css;
646
- }
647
- return styleElement;
648
- }
649
- function _objectSpread$2(target) {
650
- for (var i = 1; i < arguments.length; i++) {
651
- var source = arguments[i] != null ? Object(arguments[i]) : {};
652
- var ownKeys = Object.keys(source);
653
- if (typeof Object.getOwnPropertySymbols === "function") {
654
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
655
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
656
- }));
657
- }
658
- ownKeys.forEach(function(key) {
659
- _defineProperty$2(target, key, source[key]);
660
- });
661
- }
662
- return target;
663
- }
664
- function _defineProperty$2(obj, key, value) {
665
- if (key in obj) {
666
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
667
- } else {
668
- obj[key] = value;
669
- }
670
- return obj;
671
- }
672
- function warn(valid, message) {
673
- if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
674
- console.error("Warning: ".concat(message));
675
- }
676
- }
677
- function warning(valid, message) {
678
- warn(valid, "[@ant-design/icons-vue] ".concat(message));
679
- }
680
- function isIconDefinition(target) {
681
- return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
682
- }
683
- function generate(node, key, rootProps) {
684
- if (!rootProps) {
685
- return h(node.tag, _objectSpread$2({
686
- key
687
- }, node.attrs), (node.children || []).map(function(child, index) {
688
- return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
689
- }));
690
- }
691
- return h(node.tag, _objectSpread$2({
692
- key
693
- }, rootProps, node.attrs), (node.children || []).map(function(child, index) {
694
- return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
695
- }));
696
- }
697
- function getSecondaryColor(primaryColor) {
698
- return generate$1(primaryColor)[0];
699
- }
700
- function normalizeTwoToneColors(twoToneColor) {
701
- if (!twoToneColor) {
702
- return [];
703
- }
704
- return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
705
- }
706
- var svgBaseProps = {
707
- width: "1em",
708
- height: "1em",
709
- fill: "currentColor",
710
- "aria-hidden": "true",
711
- focusable: "false"
712
- };
713
- var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
714
- var cssInjectedFlag = false;
715
- var useInsertStyles = function useInsertStyles2() {
716
- var styleStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iconStyles;
717
- nextTick(function() {
718
- if (!cssInjectedFlag) {
719
- if (typeof window !== "undefined" && window.document && window.document.documentElement) {
720
- insertCss(styleStr, {
721
- prepend: true
722
- });
723
- }
724
- cssInjectedFlag = true;
725
- }
726
- });
727
- };
728
- var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
729
- function _objectWithoutProperties$1(source, excluded) {
730
- if (source == null) return {};
731
- var target = _objectWithoutPropertiesLoose$1(source, excluded);
732
- var key, i;
733
- if (Object.getOwnPropertySymbols) {
734
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
735
- for (i = 0; i < sourceSymbolKeys.length; i++) {
736
- key = sourceSymbolKeys[i];
737
- if (excluded.indexOf(key) >= 0) continue;
738
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
739
- target[key] = source[key];
740
- }
741
- }
742
- return target;
743
- }
744
- function _objectWithoutPropertiesLoose$1(source, excluded) {
745
- if (source == null) return {};
746
- var target = {};
747
- var sourceKeys = Object.keys(source);
748
- var key, i;
749
- for (i = 0; i < sourceKeys.length; i++) {
750
- key = sourceKeys[i];
751
- if (excluded.indexOf(key) >= 0) continue;
752
- target[key] = source[key];
753
- }
754
- return target;
755
- }
756
- function _objectSpread$1(target) {
757
- for (var i = 1; i < arguments.length; i++) {
758
- var source = arguments[i] != null ? Object(arguments[i]) : {};
759
- var ownKeys = Object.keys(source);
760
- if (typeof Object.getOwnPropertySymbols === "function") {
761
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
762
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
763
- }));
764
- }
765
- ownKeys.forEach(function(key) {
766
- _defineProperty$1(target, key, source[key]);
767
- });
768
- }
769
- return target;
770
- }
771
- function _defineProperty$1(obj, key, value) {
772
- if (key in obj) {
773
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
774
- } else {
775
- obj[key] = value;
776
- }
777
- return obj;
778
- }
779
- var twoToneColorPalette = {
780
- primaryColor: "#333",
781
- secondaryColor: "#E6E6E6",
782
- calculated: false
783
- };
784
- function setTwoToneColors(_ref) {
785
- var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor;
786
- twoToneColorPalette.primaryColor = primaryColor;
787
- twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
788
- twoToneColorPalette.calculated = !!secondaryColor;
789
- }
790
- function getTwoToneColors() {
791
- return _objectSpread$1({}, twoToneColorPalette);
792
- }
793
- var IconBase = function IconBase2(props, context) {
794
- var _props$context$attrs = _objectSpread$1({}, props, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
795
- var colors = twoToneColorPalette;
796
- if (primaryColor) {
797
- colors = {
798
- primaryColor,
799
- secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
800
- };
801
- }
802
- useInsertStyles();
803
- warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
804
- if (!isIconDefinition(icon)) {
805
- return null;
806
- }
807
- var target = icon;
808
- if (target && typeof target.icon === "function") {
809
- target = _objectSpread$1({}, target, {
810
- icon: target.icon(colors.primaryColor, colors.secondaryColor)
811
- });
812
- }
813
- return generate(target.icon, "svg-".concat(target.name), _objectSpread$1({}, restProps, {
814
- "data-icon": target.name,
815
- width: "1em",
816
- height: "1em",
817
- fill: "currentColor",
818
- "aria-hidden": "true"
819
- }));
820
- };
821
- IconBase.props = {
822
- icon: Object,
823
- primaryColor: String,
824
- secondaryColor: String,
825
- focusable: String
826
- };
827
- IconBase.inheritAttrs = false;
828
- IconBase.displayName = "IconBase";
829
- IconBase.getTwoToneColors = getTwoToneColors;
830
- IconBase.setTwoToneColors = setTwoToneColors;
831
- function _slicedToArray$1(arr, i) {
832
- return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
833
- }
834
- function _nonIterableRest$1() {
835
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
836
- }
837
- function _unsupportedIterableToArray$1(o, minLen) {
838
- if (!o) return;
839
- if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
840
- var n = Object.prototype.toString.call(o).slice(8, -1);
841
- if (n === "Object" && o.constructor) n = o.constructor.name;
842
- if (n === "Map" || n === "Set") return Array.from(o);
843
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
844
- }
845
- function _arrayLikeToArray$1(arr, len) {
846
- if (len == null || len > arr.length) len = arr.length;
847
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
848
- arr2[i] = arr[i];
849
- }
850
- return arr2;
851
- }
852
- function _iterableToArrayLimit$1(arr, i) {
853
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
854
- if (_i == null) return;
855
- var _arr = [];
856
- var _n = true;
857
- var _d = false;
858
- var _s, _e;
859
- try {
860
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
861
- _arr.push(_s.value);
862
- if (i && _arr.length === i) break;
863
- }
864
- } catch (err) {
865
- _d = true;
866
- _e = err;
867
- } finally {
868
- try {
869
- if (!_n && _i["return"] != null) _i["return"]();
870
- } finally {
871
- if (_d) throw _e;
872
- }
873
- }
874
- return _arr;
875
- }
876
- function _arrayWithHoles$1(arr) {
877
- if (Array.isArray(arr)) return arr;
878
- }
879
- function setTwoToneColor(twoToneColor) {
880
- var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
881
- return IconBase.setTwoToneColors({
882
- primaryColor,
883
- secondaryColor
884
- });
885
- }
886
- function getTwoToneColor() {
887
- var colors = IconBase.getTwoToneColors();
888
- if (!colors.calculated) {
889
- return colors.primaryColor;
890
- }
891
- return [colors.primaryColor, colors.secondaryColor];
892
- }
893
- var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
894
- function _slicedToArray(arr, i) {
895
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
896
- }
897
- function _nonIterableRest() {
898
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
899
- }
900
- function _unsupportedIterableToArray(o, minLen) {
901
- if (!o) return;
902
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
903
- var n = Object.prototype.toString.call(o).slice(8, -1);
904
- if (n === "Object" && o.constructor) n = o.constructor.name;
905
- if (n === "Map" || n === "Set") return Array.from(o);
906
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
907
- }
908
- function _arrayLikeToArray(arr, len) {
909
- if (len == null || len > arr.length) len = arr.length;
910
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
911
- arr2[i] = arr[i];
912
- }
913
- return arr2;
914
- }
915
- function _iterableToArrayLimit(arr, i) {
916
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
917
- if (_i == null) return;
918
- var _arr = [];
919
- var _n = true;
920
- var _d = false;
921
- var _s, _e;
922
- try {
923
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
924
- _arr.push(_s.value);
925
- if (i && _arr.length === i) break;
926
- }
927
- } catch (err) {
928
- _d = true;
929
- _e = err;
930
- } finally {
931
- try {
932
- if (!_n && _i["return"] != null) _i["return"]();
933
- } finally {
934
- if (_d) throw _e;
935
- }
936
- }
937
- return _arr;
938
- }
939
- function _arrayWithHoles(arr) {
940
- if (Array.isArray(arr)) return arr;
941
- }
942
- function _objectSpread(target) {
943
- for (var i = 1; i < arguments.length; i++) {
944
- var source = arguments[i] != null ? Object(arguments[i]) : {};
945
- var ownKeys = Object.keys(source);
946
- if (typeof Object.getOwnPropertySymbols === "function") {
947
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
948
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
949
- }));
950
- }
951
- ownKeys.forEach(function(key) {
952
- _defineProperty(target, key, source[key]);
953
- });
954
- }
955
- return target;
956
- }
957
- function _defineProperty(obj, key, value) {
958
- if (key in obj) {
959
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
960
- } else {
961
- obj[key] = value;
962
- }
963
- return obj;
964
- }
965
- function _objectWithoutProperties(source, excluded) {
966
- if (source == null) return {};
967
- var target = _objectWithoutPropertiesLoose(source, excluded);
968
- var key, i;
969
- if (Object.getOwnPropertySymbols) {
970
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
971
- for (i = 0; i < sourceSymbolKeys.length; i++) {
972
- key = sourceSymbolKeys[i];
973
- if (excluded.indexOf(key) >= 0) continue;
974
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
975
- target[key] = source[key];
976
- }
977
- }
978
- return target;
979
- }
980
- function _objectWithoutPropertiesLoose(source, excluded) {
981
- if (source == null) return {};
982
- var target = {};
983
- var sourceKeys = Object.keys(source);
984
- var key, i;
985
- for (i = 0; i < sourceKeys.length; i++) {
986
- key = sourceKeys[i];
987
- if (excluded.indexOf(key) >= 0) continue;
988
- target[key] = source[key];
989
- }
990
- return target;
991
- }
992
- setTwoToneColor("#1890ff");
993
- var Icon = function Icon2(props, context) {
994
- var _classObj;
995
- var _props$context$attrs = _objectSpread({}, props, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
996
- var classObj = (_classObj = {
997
- anticon: true
998
- }, _defineProperty(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty(_classObj, cls, cls), _classObj);
999
- var svgClassString = spin === "" || !!spin || icon.name === "loading" ? "anticon-spin" : "";
1000
- var iconTabIndex = tabindex;
1001
- if (iconTabIndex === void 0 && onClick) {
1002
- iconTabIndex = -1;
1003
- restProps.tabindex = iconTabIndex;
1004
- }
1005
- var svgStyle = rotate ? {
1006
- msTransform: "rotate(".concat(rotate, "deg)"),
1007
- transform: "rotate(".concat(rotate, "deg)")
1008
- } : void 0;
1009
- var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
1010
- return createVNode("span", _objectSpread({
1011
- "role": "img",
1012
- "aria-label": icon.name
1013
- }, restProps, {
1014
- "onClick": onClick,
1015
- "class": classObj
1016
- }), [createVNode(IconBase, {
1017
- "class": svgClassString,
1018
- "icon": icon,
1019
- "primaryColor": primaryColor,
1020
- "secondaryColor": secondaryColor,
1021
- "style": svgStyle
1022
- }, null)]);
1023
- };
1024
- Icon.props = {
1025
- spin: Boolean,
1026
- rotate: Number,
1027
- icon: Object,
1028
- twoToneColor: String
1029
- };
1030
- Icon.displayName = "AntdIcon";
1031
- Icon.inheritAttrs = false;
1032
- Icon.getTwoToneColor = getTwoToneColor;
1033
- Icon.setTwoToneColor = setTwoToneColor;
1034
- export {
1035
- Icon as I,
1036
- SignatureTypeEnum as S,
1037
- svgBaseProps as s,
1038
- useInsertStyles as u,
1039
- warning as w
1040
- };