hldesigner 0.0.1

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 (173) hide show
  1. package/FileSaver.min-b57403e6.js +103 -0
  2. package/_commonjsHelpers-e7ea1525.js +36 -0
  3. package/_plugin-vue_export-helper-dad06003.js +9 -0
  4. package/affix-widget-94198099.js +38 -0
  5. package/anchor-link-widget-919ac0ee.js +5 -0
  6. package/anchor-link-widget.vue_vue_type_script_setup_true_name_anchor-link-widget_lang-7df7e7c1.js +35 -0
  7. package/anchor-widget-77003871.js +57 -0
  8. package/auto-complete-widget-8d76ea70.js +74 -0
  9. package/avatar-widget-3cd63f01.js +38 -0
  10. package/backtop-widget-6fc3db98.js +38 -0
  11. package/badge-widget-f36a769c.js +44 -0
  12. package/baseImp-8c4be88e.js +11050 -0
  13. package/breadcrumb-widget-422a9d28.js +79 -0
  14. package/button-widget-918dde3f.js +48 -0
  15. package/cache-widget-a1637f5f.js +53 -0
  16. package/card-widget-2db8e9d4.js +112 -0
  17. package/carousel-widget-838cc8c9.js +75 -0
  18. package/cascader-widget-42482528.js +97 -0
  19. package/chart-widget-ac07a466.js +44285 -0
  20. package/checkbox-widget-ee1fcb0c.js +79 -0
  21. package/clipboard-fc4d858d.js +497 -0
  22. package/code-cf4fbc89.js +82 -0
  23. package/collapse-widget-1a93bdb5.js +89 -0
  24. package/color-picker-widget-e893711a.js +56 -0
  25. package/common-editor-76ac2e32.js +24 -0
  26. package/common-editor.vue_vue_type_script_setup_true_name_common-editor_lang-634a504e.js +25 -0
  27. package/configItem-6bfa74e0.js +113 -0
  28. package/cont-cell-widget-42f96421.js +8 -0
  29. package/cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-d3be593a.js +59 -0
  30. package/cont-widget-9dda9135.js +42 -0
  31. package/content-wrapper-20c559ac.js +14 -0
  32. package/content-wrapper.vue_vue_type_script_setup_true_lang-4a97c453.js +37 -0
  33. package/customClass-editor-9088a8cf.js +43 -0
  34. package/date-picker-range-widget-b9287f93.js +72 -0
  35. package/date-picker-widget-21595fd5.js +78 -0
  36. package/default-slot-widget-fc87ed0a.js +24 -0
  37. package/default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-0fb8e1cc.js +59 -0
  38. package/descriptions-widget-33a02f1a.js +83 -0
  39. package/designer.es.js +42 -0
  40. package/designer.style.css +11 -0
  41. package/designer.umd.js +161882 -0
  42. package/dialog-5e196819.js +124 -0
  43. package/dialog-widget-22714c34.js +33 -0
  44. package/divider-widget-adf656f2.js +38 -0
  45. package/drag-wrapper-f9fb1533.js +259 -0
  46. package/drawer-widget-404cb6db.js +33 -0
  47. package/dropdown-widget-a4a1e2f7.js +92 -0
  48. package/editor-wrapper-e6b30023.js +779 -0
  49. package/emitter-2b9b9409.js +53 -0
  50. package/empty-widget-c53b07dd.js +64 -0
  51. package/enum-type-255ade69.js +543 -0
  52. package/enum-type-287a50b6.js +2054 -0
  53. package/expression-ea95606e.js +2181 -0
  54. package/feedback-widget-c041b474.js +26 -0
  55. package/feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-efe168a5.js +82 -0
  56. package/field-base-5547436d.js +7 -0
  57. package/field-editor-3e1ce4f3.js +69 -0
  58. package/file-upload-widget-941b9493.js +98 -0
  59. package/form-item-wrapper-8039c512.js +113 -0
  60. package/form-widget-98a02c28.js +184 -0
  61. package/grid-col-widget-3ea371ea.js +8 -0
  62. package/grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f40c8e16.js +41 -0
  63. package/grid-widget-f0635d43.js +43 -0
  64. package/html-text-widget-c440e86d.js +50 -0
  65. package/icon-2bb9fa65.js +129 -0
  66. package/iframe-widget-37ef665f.js +77 -0
  67. package/image-widget-871d5987.js +64 -0
  68. package/import-config-1eb9a66b.js +13156 -0
  69. package/index-0a2f2997.js +225 -0
  70. package/index-12505eec.js +42 -0
  71. package/index-18720c06.js +138 -0
  72. package/index-188b745d.js +132 -0
  73. package/index-28f32a55.js +216 -0
  74. package/index-2936e7cf.js +3265 -0
  75. package/index-2d29f8d3.js +7233 -0
  76. package/index-3d5d5fac.js +23 -0
  77. package/index-50c3e002.js +227 -0
  78. package/index-6a276ef7.js +131 -0
  79. package/index-6d56f058.js +45 -0
  80. package/index-7b38fd82.js +330 -0
  81. package/index-7c2a8e33.js +17993 -0
  82. package/index-7fa591e3.js +4817 -0
  83. package/index-82f2c56a.js +135 -0
  84. package/index-8713c192.js +344 -0
  85. package/index-8d537d38.js +2393 -0
  86. package/index-9fd4a537.js +99 -0
  87. package/index-ad538d7e.js +832 -0
  88. package/index-c1b1f59f.js +88 -0
  89. package/index-d6fa09d6.js +39 -0
  90. package/index-db2305dc.js +117 -0
  91. package/index-ddd23411.js +4884 -0
  92. package/index-e795786b.js +119 -0
  93. package/index-f146282d.js +1356 -0
  94. package/index-f849ef29.js +216 -0
  95. package/index-ffbcbc43.js +65 -0
  96. package/input-number-widget-64f89b9d.js +66 -0
  97. package/input-widget-0fe7c3d7.js +71 -0
  98. package/install-designer-bed2e18a.js +4752 -0
  99. package/item-4be3cb5b.js +34 -0
  100. package/item-ddbdee11.js +24 -0
  101. package/itemDetail-b31192a5.js +43 -0
  102. package/label-wrapper-91b95fb0.js +12 -0
  103. package/label-wrapper.vue_vue_type_style_index_0_lang-0a7f6bdd.js +80 -0
  104. package/link-widget-0f2bb61c.js +56 -0
  105. package/ltable-col-widget-9f26b93d.js +8 -0
  106. package/ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-639ee976.js +256 -0
  107. package/ltable-widget-b78a72ee.js +69 -0
  108. package/menu-widget-15fdd710.js +96 -0
  109. package/model-widget-3f2b1368.js +122 -0
  110. package/multirow-e1e1205c.js +292 -0
  111. package/multirow-widget copy-671ebd9c.js +858 -0
  112. package/multirow-widget-d256cac6.js +694 -0
  113. package/name-editor-05685151.js +104 -0
  114. package/optionItem-0ac4a3ae.js +4667 -0
  115. package/package.json +13 -0
  116. package/pagination-widget-31a7301d.js +81 -0
  117. package/picture-upload-widget-46ea42a0.js +102 -0
  118. package/postcss-2c4d92ea.js +2285 -0
  119. package/progress-widget-fc1f9557.js +52 -0
  120. package/property-base-e63e2f28.js +78 -0
  121. package/propresult-8fdf23e2.js +22 -0
  122. package/radio-widget-fbc63c11.js +79 -0
  123. package/range-widget-b0882319.js +74 -0
  124. package/rate-widget-9719ca7d.js +56 -0
  125. package/reg-editor.vue_vue_type_script_setup_true_lang-56504fb0.js +61 -0
  126. package/result-widget-925a5426.js +67 -0
  127. package/rich-editor-widget-426f0b19.js +77 -0
  128. package/router-widget-209f0eb1.js +54 -0
  129. package/schemaData-ab87bd49.js +333 -0
  130. package/select-widget-0b560a2f.js +288 -0
  131. package/setView-de8aaf40.js +84 -0
  132. package/sfc-10e3d29c.js +2570 -0
  133. package/share-editor-27d43940.js +448 -0
  134. package/share-event-dd8ff2ba.js +26 -0
  135. package/share-field-451430de.js +690 -0
  136. package/share-file-124a4d83.js +121 -0
  137. package/size-editor-ea05760c.js +92 -0
  138. package/slider-widget-fb4efa96.js +62 -0
  139. package/slot-04a83a27.js +17 -0
  140. package/static-text-widget-2efdd909.js +51 -0
  141. package/steps-widget-6f283f21.js +91 -0
  142. package/subMenu-widget-77e295cb.js +16 -0
  143. package/subMenu-widget.vue_vue_type_script_setup_true_lang-b051a10e.js +69 -0
  144. package/switch-widget-f1120b6c.js +56 -0
  145. package/tab-pane-widget-99c21615.js +8 -0
  146. package/tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-bc962788.js +35 -0
  147. package/table-col-widget-d6d5d21f.js +23 -0
  148. package/table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-2efa4d60.js +80 -0
  149. package/table-widget-9b8d9798.js +163 -0
  150. package/tabs-widget-88393072.js +68 -0
  151. package/tag-widget-33c17c06.js +38 -0
  152. package/target-code-48e9d055.js +33 -0
  153. package/target-datasource-35dfcb1d.js +221 -0
  154. package/target-link-3ffd0149.js +126 -0
  155. package/target-saveForm-012b7de1.js +136 -0
  156. package/target-widget-3d7f6104.js +59 -0
  157. package/target-window-7556d301.js +54 -0
  158. package/template-c30585f4.js +251740 -0
  159. package/text-widget-8b5ece83.js +38 -0
  160. package/textarea-widget-e7c1d9ed.js +56 -0
  161. package/time-picker-range-widget-b8dfcc3b.js +58 -0
  162. package/time-picker-widget-73bde0a3.js +57 -0
  163. package/time-select-widget-08008b76.js +57 -0
  164. package/tmpl-widget-7d245d41.js +92 -0
  165. package/tooltip-wrapper-2922e49e.js +31 -0
  166. package/tree-select-widget-67231123.js +94 -0
  167. package/tree-widget-ab91165f.js +90 -0
  168. package/uuid-39f0308a.js +196 -0
  169. package/value-editor-27783d6c.js +89 -0
  170. package/vue3-sfc-loader-b70bdce4.js +34688 -0
  171. package/widget-base-4c2d6265.js +27 -0
  172. package/widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js +277 -0
  173. package/wrapper-widget-5702502d.js +78 -0
@@ -0,0 +1,79 @@
1
+ import { defineComponent as b, computed as l, resolveComponent as M, openBlock as s, createBlock as d, mergeProps as y, unref as e, withCtx as a, isRef as L, toHandlers as N, createElementBlock as P, Fragment as T, renderList as W, resolveDynamicComponent as A, normalizeStyle as H, createTextVNode as R, toDisplayString as U } from "vue";
2
+ import { I as $ } from "./field-base-5547436d.js";
3
+ import { c as q } from "./share-field-451430de.js";
4
+ import G from "./form-item-wrapper-8039c512.js";
5
+ import { w as J } from "./template-c30585f4.js";
6
+ import { c as f } from "./uuid-39f0308a.js";
7
+ import { D as Q } from "./enum-type-255ade69.js";
8
+ import "./widget-base-4c2d6265.js";
9
+ import "./enum-type-287a50b6.js";
10
+ import "./emitter-2b9b9409.js";
11
+ import "./icon-2bb9fa65.js";
12
+ import "./baseImp-8c4be88e.js";
13
+ import "./dialog-5e196819.js";
14
+ import "element-plus";
15
+ import "./_commonjsHelpers-e7ea1525.js";
16
+ import "./multirow-e1e1205c.js";
17
+ import "./index-f146282d.js";
18
+ import "./optionItem-0ac4a3ae.js";
19
+ import "./index-7fa591e3.js";
20
+ import "./slot-04a83a27.js";
21
+ import "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js";
22
+ import "./index-ffbcbc43.js";
23
+ import "./_plugin-vue_export-helper-dad06003.js";
24
+ import "./label-wrapper.vue_vue_type_style_index_0_lang-0a7f6bdd.js";
25
+ const X = b({ componentName: J.FieldWidget }), ze = /* @__PURE__ */ b({
26
+ ...X,
27
+ __name: "checkbox-widget",
28
+ props: { ...$ },
29
+ setup(_, { expose: k }) {
30
+ const g = _, { fieldEditor: v, fieldKey: x, fieldModel: i, rules: z, attrs: r, extendAttrs: p, events: S, optionItems: h, getCheckedItems: C, exposed: E, isError: F, errorMsg: I, fieldObj: V } = q(g), j = l(() => r.value.border), w = l(() => r.value.disabled), D = l(() => r.value.buttonStyle), n = l(() => p.value.displayStyle);
31
+ return k({ ...E, getCheckedItems: C }), (O, m) => {
32
+ const B = M("el-checkbox-group");
33
+ return s(), d(G, y(O.$props, {
34
+ propOptions: { fieldObj: e(V), rules: e(z), isError: e(F), errorMsg: e(I) }
35
+ }), {
36
+ default: a(({ data: t }) => [
37
+ (s(), d(B, y({
38
+ ref_key: "fieldEditor",
39
+ ref: v,
40
+ modelValue: e(i),
41
+ "onUpdate:modelValue": m[0] || (m[0] = (o) => L(i) ? i.value = o : null),
42
+ key: e(x)
43
+ }, e(r), N(e(S)), {
44
+ size: t.size,
45
+ class: t.injectClass,
46
+ style: { ...t.injectStyle, display: e(n) }
47
+ }), {
48
+ default: a(() => [
49
+ (s(!0), P(T, null, W(e(h), (o, K) => {
50
+ var c;
51
+ return s(), d(A(e(D) ? "el-checkbox-button" : "el-checkbox"), {
52
+ key: K,
53
+ size: t.size,
54
+ value: o == null ? void 0 : o[(c = e(p)) == null ? void 0 : c.valueKey],
55
+ disabled: e(w) || e(f)(o).disabled,
56
+ style: H({ display: e(n) === e(Q).inline ? "" : e(n) }),
57
+ border: e(j) || e(f)(o).border
58
+ }, {
59
+ default: a(() => {
60
+ var u;
61
+ return [
62
+ R(U(o == null ? void 0 : o[(u = e(p)) == null ? void 0 : u.labelKey]), 1)
63
+ ];
64
+ }),
65
+ _: 2
66
+ }, 1032, ["size", "value", "disabled", "style", "border"]);
67
+ }), 128))
68
+ ]),
69
+ _: 2
70
+ }, 1040, ["modelValue", "size", "class", "style"]))
71
+ ]),
72
+ _: 1
73
+ }, 16, ["propOptions"]);
74
+ };
75
+ }
76
+ });
77
+ export {
78
+ ze as default
79
+ };
@@ -0,0 +1,497 @@
1
+ import { a as B, c as J } from "./_commonjsHelpers-e7ea1525.js";
2
+ function K(S, L) {
3
+ for (var x = 0; x < L.length; x++) {
4
+ const _ = L[x];
5
+ if (typeof _ != "string" && !Array.isArray(_)) {
6
+ for (const h in _)
7
+ if (h !== "default" && !(h in S)) {
8
+ const c = Object.getOwnPropertyDescriptor(_, h);
9
+ c && Object.defineProperty(S, h, c.get ? c : {
10
+ enumerable: !0,
11
+ get: () => _[h]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var C = {}, Q = {
19
+ get exports() {
20
+ return C;
21
+ },
22
+ set exports(S) {
23
+ C = S;
24
+ }
25
+ };
26
+ /*!
27
+ * clipboard.js v2.0.11
28
+ * https://clipboardjs.com/
29
+ *
30
+ * Licensed MIT © Zeno Rocha
31
+ */
32
+ (function(S, L) {
33
+ (function(_, h) {
34
+ S.exports = h();
35
+ })(J, function() {
36
+ return function() {
37
+ var x = {
38
+ /***/
39
+ 686: function(c, f, t) {
40
+ t.d(f, {
41
+ default: function() {
42
+ return (
43
+ /* binding */
44
+ X
45
+ );
46
+ }
47
+ });
48
+ var a = t(279), s = /* @__PURE__ */ t.n(a), l = t(370), g = /* @__PURE__ */ t.n(l), y = t(817), m = /* @__PURE__ */ t.n(y);
49
+ function d(i) {
50
+ try {
51
+ return document.execCommand(i);
52
+ } catch {
53
+ return !1;
54
+ }
55
+ }
56
+ var v = function(n) {
57
+ var e = m()(n);
58
+ return d("cut"), e;
59
+ }, p = v;
60
+ function E(i) {
61
+ var n = document.documentElement.getAttribute("dir") === "rtl", e = document.createElement("textarea");
62
+ e.style.fontSize = "12pt", e.style.border = "0", e.style.padding = "0", e.style.margin = "0", e.style.position = "absolute", e.style[n ? "right" : "left"] = "-9999px";
63
+ var r = window.pageYOffset || document.documentElement.scrollTop;
64
+ return e.style.top = "".concat(r, "px"), e.setAttribute("readonly", ""), e.value = i, e;
65
+ }
66
+ var N = function(n, e) {
67
+ var r = E(n);
68
+ e.container.appendChild(r);
69
+ var o = m()(r);
70
+ return d("copy"), r.remove(), o;
71
+ }, M = function(n) {
72
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
73
+ container: document.body
74
+ }, r = "";
75
+ return typeof n == "string" ? r = N(n, e) : n instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(n == null ? void 0 : n.type) ? r = N(n.value, e) : (r = m()(n), d("copy")), r;
76
+ }, P = M;
77
+ function w(i) {
78
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? w = function(e) {
79
+ return typeof e;
80
+ } : w = function(e) {
81
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
82
+ }, w(i);
83
+ }
84
+ var D = function() {
85
+ var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = n.action, r = e === void 0 ? "copy" : e, o = n.container, u = n.target, b = n.text;
86
+ if (r !== "copy" && r !== "cut")
87
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
88
+ if (u !== void 0)
89
+ if (u && w(u) === "object" && u.nodeType === 1) {
90
+ if (r === "copy" && u.hasAttribute("disabled"))
91
+ throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
92
+ if (r === "cut" && (u.hasAttribute("readonly") || u.hasAttribute("disabled")))
93
+ throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
94
+ } else
95
+ throw new Error('Invalid "target" value, use a valid Element');
96
+ if (b)
97
+ return P(b, {
98
+ container: o
99
+ });
100
+ if (u)
101
+ return r === "cut" ? p(u) : P(u, {
102
+ container: o
103
+ });
104
+ }, F = D;
105
+ function T(i) {
106
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? T = function(e) {
107
+ return typeof e;
108
+ } : T = function(e) {
109
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
110
+ }, T(i);
111
+ }
112
+ function H(i, n) {
113
+ if (!(i instanceof n))
114
+ throw new TypeError("Cannot call a class as a function");
115
+ }
116
+ function R(i, n) {
117
+ for (var e = 0; e < n.length; e++) {
118
+ var r = n[e];
119
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(i, r.key, r);
120
+ }
121
+ }
122
+ function I(i, n, e) {
123
+ return n && R(i.prototype, n), e && R(i, e), i;
124
+ }
125
+ function z(i, n) {
126
+ if (typeof n != "function" && n !== null)
127
+ throw new TypeError("Super expression must either be null or a function");
128
+ i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && j(i, n);
129
+ }
130
+ function j(i, n) {
131
+ return j = Object.setPrototypeOf || function(r, o) {
132
+ return r.__proto__ = o, r;
133
+ }, j(i, n);
134
+ }
135
+ function U(i) {
136
+ var n = G();
137
+ return function() {
138
+ var r = A(i), o;
139
+ if (n) {
140
+ var u = A(this).constructor;
141
+ o = Reflect.construct(r, arguments, u);
142
+ } else
143
+ o = r.apply(this, arguments);
144
+ return Y(this, o);
145
+ };
146
+ }
147
+ function Y(i, n) {
148
+ return n && (T(n) === "object" || typeof n == "function") ? n : $(i);
149
+ }
150
+ function $(i) {
151
+ if (i === void 0)
152
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
153
+ return i;
154
+ }
155
+ function G() {
156
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
157
+ return !1;
158
+ if (typeof Proxy == "function")
159
+ return !0;
160
+ try {
161
+ return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
162
+ })), !0;
163
+ } catch {
164
+ return !1;
165
+ }
166
+ }
167
+ function A(i) {
168
+ return A = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
169
+ return e.__proto__ || Object.getPrototypeOf(e);
170
+ }, A(i);
171
+ }
172
+ function k(i, n) {
173
+ var e = "data-clipboard-".concat(i);
174
+ if (n.hasAttribute(e))
175
+ return n.getAttribute(e);
176
+ }
177
+ var V = /* @__PURE__ */ function(i) {
178
+ z(e, i);
179
+ var n = U(e);
180
+ function e(r, o) {
181
+ var u;
182
+ return H(this, e), u = n.call(this), u.resolveOptions(o), u.listenClick(r), u;
183
+ }
184
+ return I(e, [{
185
+ key: "resolveOptions",
186
+ value: function() {
187
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
188
+ this.action = typeof o.action == "function" ? o.action : this.defaultAction, this.target = typeof o.target == "function" ? o.target : this.defaultTarget, this.text = typeof o.text == "function" ? o.text : this.defaultText, this.container = T(o.container) === "object" ? o.container : document.body;
189
+ }
190
+ /**
191
+ * Adds a click event listener to the passed trigger.
192
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
193
+ */
194
+ }, {
195
+ key: "listenClick",
196
+ value: function(o) {
197
+ var u = this;
198
+ this.listener = g()(o, "click", function(b) {
199
+ return u.onClick(b);
200
+ });
201
+ }
202
+ /**
203
+ * Defines a new `ClipboardAction` on each click event.
204
+ * @param {Event} e
205
+ */
206
+ }, {
207
+ key: "onClick",
208
+ value: function(o) {
209
+ var u = o.delegateTarget || o.currentTarget, b = this.action(u) || "copy", O = F({
210
+ action: b,
211
+ container: this.container,
212
+ target: this.target(u),
213
+ text: this.text(u)
214
+ });
215
+ this.emit(O ? "success" : "error", {
216
+ action: b,
217
+ text: O,
218
+ trigger: u,
219
+ clearSelection: function() {
220
+ u && u.focus(), window.getSelection().removeAllRanges();
221
+ }
222
+ });
223
+ }
224
+ /**
225
+ * Default `action` lookup function.
226
+ * @param {Element} trigger
227
+ */
228
+ }, {
229
+ key: "defaultAction",
230
+ value: function(o) {
231
+ return k("action", o);
232
+ }
233
+ /**
234
+ * Default `target` lookup function.
235
+ * @param {Element} trigger
236
+ */
237
+ }, {
238
+ key: "defaultTarget",
239
+ value: function(o) {
240
+ var u = k("target", o);
241
+ if (u)
242
+ return document.querySelector(u);
243
+ }
244
+ /**
245
+ * Allow fire programmatically a copy action
246
+ * @param {String|HTMLElement} target
247
+ * @param {Object} options
248
+ * @returns Text copied.
249
+ */
250
+ }, {
251
+ key: "defaultText",
252
+ /**
253
+ * Default `text` lookup function.
254
+ * @param {Element} trigger
255
+ */
256
+ value: function(o) {
257
+ return k("text", o);
258
+ }
259
+ /**
260
+ * Destroy lifecycle.
261
+ */
262
+ }, {
263
+ key: "destroy",
264
+ value: function() {
265
+ this.listener.destroy();
266
+ }
267
+ }], [{
268
+ key: "copy",
269
+ value: function(o) {
270
+ var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
271
+ container: document.body
272
+ };
273
+ return P(o, u);
274
+ }
275
+ /**
276
+ * Allow fire programmatically a cut action
277
+ * @param {String|HTMLElement} target
278
+ * @returns Text cutted.
279
+ */
280
+ }, {
281
+ key: "cut",
282
+ value: function(o) {
283
+ return p(o);
284
+ }
285
+ /**
286
+ * Returns the support of the given action, or all actions if no action is
287
+ * given.
288
+ * @param {String} [action]
289
+ */
290
+ }, {
291
+ key: "isSupported",
292
+ value: function() {
293
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"], u = typeof o == "string" ? [o] : o, b = !!document.queryCommandSupported;
294
+ return u.forEach(function(O) {
295
+ b = b && !!document.queryCommandSupported(O);
296
+ }), b;
297
+ }
298
+ }]), e;
299
+ }(s()), X = V;
300
+ },
301
+ /***/
302
+ 828: function(c) {
303
+ var f = 9;
304
+ if (typeof Element < "u" && !Element.prototype.matches) {
305
+ var t = Element.prototype;
306
+ t.matches = t.matchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector || t.webkitMatchesSelector;
307
+ }
308
+ function a(s, l) {
309
+ for (; s && s.nodeType !== f; ) {
310
+ if (typeof s.matches == "function" && s.matches(l))
311
+ return s;
312
+ s = s.parentNode;
313
+ }
314
+ }
315
+ c.exports = a;
316
+ },
317
+ /***/
318
+ 438: function(c, f, t) {
319
+ var a = t(828);
320
+ function s(y, m, d, v, p) {
321
+ var E = g.apply(this, arguments);
322
+ return y.addEventListener(d, E, p), {
323
+ destroy: function() {
324
+ y.removeEventListener(d, E, p);
325
+ }
326
+ };
327
+ }
328
+ function l(y, m, d, v, p) {
329
+ return typeof y.addEventListener == "function" ? s.apply(null, arguments) : typeof d == "function" ? s.bind(null, document).apply(null, arguments) : (typeof y == "string" && (y = document.querySelectorAll(y)), Array.prototype.map.call(y, function(E) {
330
+ return s(E, m, d, v, p);
331
+ }));
332
+ }
333
+ function g(y, m, d, v) {
334
+ return function(p) {
335
+ p.delegateTarget = a(p.target, m), p.delegateTarget && v.call(y, p);
336
+ };
337
+ }
338
+ c.exports = l;
339
+ },
340
+ /***/
341
+ 879: function(c, f) {
342
+ f.node = function(t) {
343
+ return t !== void 0 && t instanceof HTMLElement && t.nodeType === 1;
344
+ }, f.nodeList = function(t) {
345
+ var a = Object.prototype.toString.call(t);
346
+ return t !== void 0 && (a === "[object NodeList]" || a === "[object HTMLCollection]") && "length" in t && (t.length === 0 || f.node(t[0]));
347
+ }, f.string = function(t) {
348
+ return typeof t == "string" || t instanceof String;
349
+ }, f.fn = function(t) {
350
+ var a = Object.prototype.toString.call(t);
351
+ return a === "[object Function]";
352
+ };
353
+ },
354
+ /***/
355
+ 370: function(c, f, t) {
356
+ var a = t(879), s = t(438);
357
+ function l(d, v, p) {
358
+ if (!d && !v && !p)
359
+ throw new Error("Missing required arguments");
360
+ if (!a.string(v))
361
+ throw new TypeError("Second argument must be a String");
362
+ if (!a.fn(p))
363
+ throw new TypeError("Third argument must be a Function");
364
+ if (a.node(d))
365
+ return g(d, v, p);
366
+ if (a.nodeList(d))
367
+ return y(d, v, p);
368
+ if (a.string(d))
369
+ return m(d, v, p);
370
+ throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
371
+ }
372
+ function g(d, v, p) {
373
+ return d.addEventListener(v, p), {
374
+ destroy: function() {
375
+ d.removeEventListener(v, p);
376
+ }
377
+ };
378
+ }
379
+ function y(d, v, p) {
380
+ return Array.prototype.forEach.call(d, function(E) {
381
+ E.addEventListener(v, p);
382
+ }), {
383
+ destroy: function() {
384
+ Array.prototype.forEach.call(d, function(E) {
385
+ E.removeEventListener(v, p);
386
+ });
387
+ }
388
+ };
389
+ }
390
+ function m(d, v, p) {
391
+ return s(document.body, d, v, p);
392
+ }
393
+ c.exports = l;
394
+ },
395
+ /***/
396
+ 817: function(c) {
397
+ function f(t) {
398
+ var a;
399
+ if (t.nodeName === "SELECT")
400
+ t.focus(), a = t.value;
401
+ else if (t.nodeName === "INPUT" || t.nodeName === "TEXTAREA") {
402
+ var s = t.hasAttribute("readonly");
403
+ s || t.setAttribute("readonly", ""), t.select(), t.setSelectionRange(0, t.value.length), s || t.removeAttribute("readonly"), a = t.value;
404
+ } else {
405
+ t.hasAttribute("contenteditable") && t.focus();
406
+ var l = window.getSelection(), g = document.createRange();
407
+ g.selectNodeContents(t), l.removeAllRanges(), l.addRange(g), a = l.toString();
408
+ }
409
+ return a;
410
+ }
411
+ c.exports = f;
412
+ },
413
+ /***/
414
+ 279: function(c) {
415
+ function f() {
416
+ }
417
+ f.prototype = {
418
+ on: function(t, a, s) {
419
+ var l = this.e || (this.e = {});
420
+ return (l[t] || (l[t] = [])).push({
421
+ fn: a,
422
+ ctx: s
423
+ }), this;
424
+ },
425
+ once: function(t, a, s) {
426
+ var l = this;
427
+ function g() {
428
+ l.off(t, g), a.apply(s, arguments);
429
+ }
430
+ return g._ = a, this.on(t, g, s);
431
+ },
432
+ emit: function(t) {
433
+ var a = [].slice.call(arguments, 1), s = ((this.e || (this.e = {}))[t] || []).slice(), l = 0, g = s.length;
434
+ for (l; l < g; l++)
435
+ s[l].fn.apply(s[l].ctx, a);
436
+ return this;
437
+ },
438
+ off: function(t, a) {
439
+ var s = this.e || (this.e = {}), l = s[t], g = [];
440
+ if (l && a)
441
+ for (var y = 0, m = l.length; y < m; y++)
442
+ l[y].fn !== a && l[y].fn._ !== a && g.push(l[y]);
443
+ return g.length ? s[t] = g : delete s[t], this;
444
+ }
445
+ }, c.exports = f, c.exports.TinyEmitter = f;
446
+ }
447
+ /******/
448
+ }, _ = {};
449
+ function h(c) {
450
+ if (_[c])
451
+ return _[c].exports;
452
+ var f = _[c] = {
453
+ /******/
454
+ // no module.id needed
455
+ /******/
456
+ // no module.loaded needed
457
+ /******/
458
+ exports: {}
459
+ /******/
460
+ };
461
+ return x[c](f, f.exports, h), f.exports;
462
+ }
463
+ return function() {
464
+ h.n = function(c) {
465
+ var f = c && c.__esModule ? (
466
+ /******/
467
+ function() {
468
+ return c.default;
469
+ }
470
+ ) : (
471
+ /******/
472
+ function() {
473
+ return c;
474
+ }
475
+ );
476
+ return h.d(f, { a: f }), f;
477
+ };
478
+ }(), function() {
479
+ h.d = function(c, f) {
480
+ for (var t in f)
481
+ h.o(f, t) && !h.o(c, t) && Object.defineProperty(c, t, { enumerable: !0, get: f[t] });
482
+ };
483
+ }(), function() {
484
+ h.o = function(c, f) {
485
+ return Object.prototype.hasOwnProperty.call(c, f);
486
+ };
487
+ }(), h(686);
488
+ }().default;
489
+ });
490
+ })(Q);
491
+ const W = /* @__PURE__ */ B(C), tt = /* @__PURE__ */ K({
492
+ __proto__: null,
493
+ default: W
494
+ }, [C]);
495
+ export {
496
+ tt as c
497
+ };
@@ -0,0 +1,82 @@
1
+ const o = function(e, r = "vue") {
2
+ let t = JSON.stringify(e);
3
+ return r === "html" ? `<!DOCTYPE html>
4
+ <html>
5
+ <head>
6
+ <meta charset="UTF-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
8
+ <title>VForm Demo</title>
9
+ <link rel="stylesheet" href="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/element-plus/2.0.4/index.min.css" />
10
+ <link rel="stylesheet" href="https://ks3-cn-beijing.ksyun.com/vform3/render.style.css?t=20220129">
11
+ <style type="text/css">
12
+ </style>
13
+ </head>
14
+ <body>
15
+
16
+ <div id="app">
17
+ <v-page-render :form-json="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef">
18
+ </v-page-render>
19
+ <el-button type="primary" @click="submitForm">Submit</el-button>
20
+ </div>
21
+
22
+ <script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/3.2.30/vue.global.min.js"><\/script>
23
+ <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/element-plus/2.0.4/index.full.min.js"><\/script>
24
+ <script src="https://ks3-cn-beijing.ksyun.com/vform3/render.umd.js?t=20220129"><\/script>
25
+ <script>
26
+ const { createApp } = Vue;
27
+ const app = createApp({
28
+ data() {
29
+ return {
30
+ formJson: ${t},
31
+ formData: {},
32
+ optionData: {}
33
+ }
34
+ },
35
+ methods: {
36
+ submitForm() {
37
+ this.$refs.vFormRef.getFormData().then( (formData) => {
38
+ // Form Validation OK
39
+ alert( JSON.stringify(formData) )
40
+ }).catch( function(error) {
41
+ // Form Validation Failed
42
+ alert(error)
43
+ })
44
+ }
45
+ }
46
+ });
47
+ app.use(ElementPlus)
48
+ app.use(VFormRender)
49
+ app.mount("#app");
50
+ <\/script>
51
+ </body>
52
+ </html>` : `<template>
53
+ <div>
54
+ <v-page-render :form-json="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef">
55
+ </v-page-render>
56
+ <el-button type="primary" @click="submitForm">Submit</el-button>
57
+ </div>
58
+ </template>
59
+
60
+ <script setup>
61
+ import { ref, reactive } from 'vue'
62
+ import { ElMessage } from 'element-plus'
63
+
64
+ const formJson = reactive(${t})
65
+ const formData = reactive({})
66
+ const optionData = reactive({})
67
+ const vFormRef = ref(null)
68
+
69
+ const submitForm = () => {
70
+ vFormRef.value.getFormData().then(formData => {
71
+ // Form Validation OK
72
+ alert( JSON.stringify(formData) )
73
+ }).catch(error => {
74
+ // Form Validation failed
75
+ ElMessage.error(error)
76
+ })
77
+ }
78
+ <\/script>`;
79
+ };
80
+ export {
81
+ o as generateCode
82
+ };