@farris/ui-vue 1.3.4 → 1.3.6
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.
- package/components/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +9 -7
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3096 -3069
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +296 -283
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +634 -619
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
|
@@ -1,32 +1,46 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (r, e, t) =>
|
|
4
|
-
import { defineComponent as T, ref as S, onMounted as C, watch as F, createVNode as k, withModifiers as K, createTextVNode as Be, computed as U, onBeforeMount as qe, withDirectives as X, vShow as Z, vModelText as Ye, inject as
|
|
5
|
-
import { isPlainObject as Ie, cloneDeep as
|
|
1
|
+
var rt = Object.defineProperty;
|
|
2
|
+
var it = (r, e, t) => e in r ? rt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var s = (r, e, t) => it(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as T, ref as S, onMounted as C, watch as F, createVNode as k, withModifiers as K, createTextVNode as Be, computed as U, onBeforeMount as qe, withDirectives as X, vShow as Z, vModelText as Ye, inject as st } from "vue";
|
|
5
|
+
import { isPlainObject as Ie, cloneDeep as Xe } from "lodash-es";
|
|
6
6
|
import { withInstall as at } from "../common/index.esm.js";
|
|
7
|
-
const
|
|
7
|
+
const Ge = {}, We = {};
|
|
8
8
|
function Re(r) {
|
|
9
|
-
const { properties: e, title: t, ignore: n } = r, i = n && Array.isArray(n), l = Object.keys(e).reduce((u, c) => ((!i || !n.find((g) => g === c)) && (u[c] = e[c].type === "object" && e[c].properties ? Re(e[c]) :
|
|
9
|
+
const { properties: e, title: t, ignore: n } = r, i = n && Array.isArray(n), l = Object.keys(e).reduce((u, c) => ((!i || !n.find((g) => g === c)) && (u[c] = e[c].type === "object" && e[c].properties ? Re(e[c]) : Xe(e[c].default)), u), {});
|
|
10
10
|
if (t && (!i || !n.find((u) => u === "id"))) {
|
|
11
11
|
const u = t.toLowerCase().replace(/-/g, "_");
|
|
12
12
|
l.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
13
13
|
}
|
|
14
14
|
return l;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const n =
|
|
16
|
+
function ot(r) {
|
|
17
|
+
const { properties: e, title: t, required: n } = r;
|
|
18
|
+
if (n && Array.isArray(n)) {
|
|
19
|
+
const i = n.reduce((l, u) => (l[u] = e[u].type === "object" && e[u].properties ? Re(e[u]) : Xe(e[u].default), l), {});
|
|
20
|
+
if (t && n.find((l) => l === "id")) {
|
|
21
|
+
const l = t.toLowerCase().replace(/-/g, "_");
|
|
22
|
+
i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
23
|
+
}
|
|
24
|
+
return i;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
type: t
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function ze(r, e = {}, t) {
|
|
31
|
+
const n = Ge[r];
|
|
18
32
|
if (n) {
|
|
19
|
-
let i =
|
|
20
|
-
const l =
|
|
21
|
-
return i = l ? l({ getSchemaByType:
|
|
33
|
+
let i = ot(n);
|
|
34
|
+
const l = We[r];
|
|
35
|
+
return i = l ? l({ getSchemaByType: ze }, i, e, t) : i, i;
|
|
22
36
|
}
|
|
23
37
|
return null;
|
|
24
38
|
}
|
|
25
|
-
function
|
|
39
|
+
function ut(r, e) {
|
|
26
40
|
const t = Re(e);
|
|
27
|
-
return Object.keys(t).reduce((n, i) => (n[i] && Ie(n[i]) && Ie(r[i] || !r[i]) ? Object.assign(n[i], r[i] || {}) : n[i] = r[i], n), t), t;
|
|
41
|
+
return Object.keys(t).reduce((n, i) => (Object.prototype.hasOwnProperty.call(r, i) && (n[i] && Ie(n[i]) && Ie(r[i] || !r[i]) ? Object.assign(n[i], r[i] || {}) : n[i] = r[i]), n), t), t;
|
|
28
42
|
}
|
|
29
|
-
function
|
|
43
|
+
function lt(r, e) {
|
|
30
44
|
return Object.keys(r).filter((n) => r[n] != null).reduce((n, i) => {
|
|
31
45
|
if (e.has(i)) {
|
|
32
46
|
const l = e.get(i);
|
|
@@ -41,11 +55,11 @@ function ut(r, e) {
|
|
|
41
55
|
return n;
|
|
42
56
|
}, {});
|
|
43
57
|
}
|
|
44
|
-
function
|
|
45
|
-
const n =
|
|
46
|
-
return
|
|
58
|
+
function ct(r, e, t = /* @__PURE__ */ new Map()) {
|
|
59
|
+
const n = ut(r, e);
|
|
60
|
+
return lt(n, t);
|
|
47
61
|
}
|
|
48
|
-
function
|
|
62
|
+
function ht(r = {}) {
|
|
49
63
|
function e(h, p, f, d) {
|
|
50
64
|
if (typeof f == "number")
|
|
51
65
|
return d[h].length === f;
|
|
@@ -94,20 +108,20 @@ function ct(r = {}) {
|
|
|
94
108
|
return l(h).reduce((b, y) => b && u(y, p), !0);
|
|
95
109
|
}
|
|
96
110
|
function g(h, p) {
|
|
97
|
-
const f = Object.keys(h), d = f.includes("allOf"), b = f.includes("anyOf"), y = d || b, M = (y ? h[y ? d ? "allOf" : "anyOf" : "allOf"] : [h]).map((
|
|
111
|
+
const f = Object.keys(h), d = f.includes("allOf"), b = f.includes("anyOf"), y = d || b, M = (y ? h[y ? d ? "allOf" : "anyOf" : "allOf"] : [h]).map((A) => c(A, p));
|
|
98
112
|
return d ? !M.includes(!1) : M.includes(!0);
|
|
99
113
|
}
|
|
100
114
|
return { parseValueSchema: g };
|
|
101
115
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
function
|
|
105
|
-
return
|
|
106
|
-
const c =
|
|
116
|
+
const pt = {}, ft = {};
|
|
117
|
+
ht();
|
|
118
|
+
function dt(r, e, t = /* @__PURE__ */ new Map(), n = (u, c, g, h) => c, i = {}, l = (u) => u) {
|
|
119
|
+
return Ge[e.title] = e, We[e.title] = n, pt[e.title] = i, ft[e.title] = l, (u = {}) => {
|
|
120
|
+
const c = ct(u, e, t), g = Object.keys(r).reduce((h, p) => (h[p] = r[p].default, h), {});
|
|
107
121
|
return Object.assign(g, c);
|
|
108
122
|
};
|
|
109
123
|
}
|
|
110
|
-
const
|
|
124
|
+
const vt = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-design.gitee.io/color-picker.schema.json", yt = "color-picker", mt = "A Farris Component", wt = "object", bt = {
|
|
111
125
|
id: {
|
|
112
126
|
description: "The unique identifier for color picker",
|
|
113
127
|
type: "string"
|
|
@@ -169,27 +183,27 @@ const dt = "https://json-schema.org/draft/2020-12/schema", vt = "https://farris-
|
|
|
169
183
|
type: "boolean",
|
|
170
184
|
default: !0
|
|
171
185
|
}
|
|
172
|
-
},
|
|
186
|
+
}, kt = [
|
|
173
187
|
"id",
|
|
174
188
|
"type"
|
|
175
|
-
],
|
|
176
|
-
$schema:
|
|
177
|
-
$id:
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
180
|
-
type:
|
|
181
|
-
properties:
|
|
182
|
-
required:
|
|
189
|
+
], St = {
|
|
190
|
+
$schema: vt,
|
|
191
|
+
$id: gt,
|
|
192
|
+
title: yt,
|
|
193
|
+
description: mt,
|
|
194
|
+
type: wt,
|
|
195
|
+
properties: bt,
|
|
196
|
+
required: kt
|
|
183
197
|
};
|
|
184
|
-
function
|
|
198
|
+
function Pt(r, e, t) {
|
|
185
199
|
return e;
|
|
186
200
|
}
|
|
187
|
-
function
|
|
201
|
+
function Et(r, e) {
|
|
188
202
|
return { customClass: e.class, customStyle: e.style };
|
|
189
203
|
}
|
|
190
|
-
const
|
|
191
|
-
["appearance",
|
|
192
|
-
]),
|
|
204
|
+
const Mt = /* @__PURE__ */ new Map([
|
|
205
|
+
["appearance", Et]
|
|
206
|
+
]), Ht = "color-picker", Ot = "A Farris Component", Bt = "object", Rt = {
|
|
193
207
|
basic: {
|
|
194
208
|
description: "Basic Infomation",
|
|
195
209
|
title: "基本信息",
|
|
@@ -211,11 +225,11 @@ const Et = /* @__PURE__ */ new Map([
|
|
|
211
225
|
}
|
|
212
226
|
}
|
|
213
227
|
}
|
|
214
|
-
},
|
|
215
|
-
title:
|
|
216
|
-
description:
|
|
217
|
-
type:
|
|
218
|
-
categories:
|
|
228
|
+
}, $t = {
|
|
229
|
+
title: Ht,
|
|
230
|
+
description: Ot,
|
|
231
|
+
type: Bt,
|
|
232
|
+
categories: Rt
|
|
219
233
|
}, $e = {
|
|
220
234
|
/** 初始颜色 */
|
|
221
235
|
color: { type: String, default: "#e1e2e3" },
|
|
@@ -228,7 +242,7 @@ const Et = /* @__PURE__ */ new Map([
|
|
|
228
242
|
/** 颜色值变化事件 */
|
|
229
243
|
onValueChanged: { type: Function, default: () => {
|
|
230
244
|
} }
|
|
231
|
-
},
|
|
245
|
+
}, Je = dt($e, St, Mt, Pt, $t);
|
|
232
246
|
class le {
|
|
233
247
|
}
|
|
234
248
|
class me extends le {
|
|
@@ -667,13 +681,13 @@ function Me(r, e, t) {
|
|
|
667
681
|
function Y(r) {
|
|
668
682
|
return typeof r == "function";
|
|
669
683
|
}
|
|
670
|
-
function
|
|
684
|
+
function Qe(r) {
|
|
671
685
|
var e = function(n) {
|
|
672
686
|
Error.call(n), n.stack = new Error().stack;
|
|
673
687
|
}, t = r(e);
|
|
674
688
|
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
675
689
|
}
|
|
676
|
-
var we =
|
|
690
|
+
var we = Qe(function(r) {
|
|
677
691
|
return function(t) {
|
|
678
692
|
r(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
679
693
|
` + t.map(function(n, i) {
|
|
@@ -776,20 +790,20 @@ var ce = function() {
|
|
|
776
790
|
var e = new r();
|
|
777
791
|
return e.closed = !0, e;
|
|
778
792
|
}(), r;
|
|
779
|
-
}(),
|
|
780
|
-
function
|
|
793
|
+
}(), Ze = ce.EMPTY;
|
|
794
|
+
function Ce(r) {
|
|
781
795
|
return r instanceof ce || r && "closed" in r && Y(r.remove) && Y(r.add) && Y(r.unsubscribe);
|
|
782
796
|
}
|
|
783
797
|
function xe(r) {
|
|
784
798
|
Y(r) ? r() : r.unsubscribe();
|
|
785
799
|
}
|
|
786
|
-
var
|
|
800
|
+
var Ke = {
|
|
787
801
|
onUnhandledError: null,
|
|
788
802
|
onStoppedNotification: null,
|
|
789
803
|
Promise: void 0,
|
|
790
804
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
791
805
|
useDeprecatedNextContext: !1
|
|
792
|
-
},
|
|
806
|
+
}, Vt = {
|
|
793
807
|
setTimeout: function(r, e) {
|
|
794
808
|
for (var t = [], n = 2; n < arguments.length; n++)
|
|
795
809
|
t[n - 2] = arguments[n];
|
|
@@ -800,8 +814,8 @@ var Ce = {
|
|
|
800
814
|
},
|
|
801
815
|
delegate: void 0
|
|
802
816
|
};
|
|
803
|
-
function
|
|
804
|
-
|
|
817
|
+
function At(r) {
|
|
818
|
+
Vt.setTimeout(function() {
|
|
805
819
|
throw r;
|
|
806
820
|
});
|
|
807
821
|
}
|
|
@@ -814,7 +828,7 @@ var Ve = function(r) {
|
|
|
814
828
|
_(e, r);
|
|
815
829
|
function e(t) {
|
|
816
830
|
var n = r.call(this) || this;
|
|
817
|
-
return n.isStopped = !1, t ? (n.destination = t,
|
|
831
|
+
return n.isStopped = !1, t ? (n.destination = t, Ce(t) && t.add(n)) : n.destination = Nt, n;
|
|
818
832
|
}
|
|
819
833
|
return e.create = function(t, n, i) {
|
|
820
834
|
return new Oe(t, n, i);
|
|
@@ -845,7 +859,7 @@ var Ve = function(r) {
|
|
|
845
859
|
function be(r, e) {
|
|
846
860
|
return jt.call(r, e);
|
|
847
861
|
}
|
|
848
|
-
var
|
|
862
|
+
var It = function() {
|
|
849
863
|
function r(e) {
|
|
850
864
|
this.partialObserver = e;
|
|
851
865
|
}
|
|
@@ -888,7 +902,7 @@ var At = function() {
|
|
|
888
902
|
};
|
|
889
903
|
else {
|
|
890
904
|
var c;
|
|
891
|
-
l &&
|
|
905
|
+
l && Ke.useDeprecatedNextContext ? (c = Object.create(t), c.unsubscribe = function() {
|
|
892
906
|
return l.unsubscribe();
|
|
893
907
|
}, u = {
|
|
894
908
|
next: t.next && be(t.next, c),
|
|
@@ -896,29 +910,29 @@ var At = function() {
|
|
|
896
910
|
complete: t.complete && be(t.complete, c)
|
|
897
911
|
}) : u = t;
|
|
898
912
|
}
|
|
899
|
-
return l.destination = new
|
|
913
|
+
return l.destination = new It(u), l;
|
|
900
914
|
}
|
|
901
915
|
return e;
|
|
902
916
|
}(Ve);
|
|
903
917
|
function ae(r) {
|
|
904
|
-
|
|
918
|
+
At(r);
|
|
905
919
|
}
|
|
906
|
-
function
|
|
920
|
+
function xt(r) {
|
|
907
921
|
throw r;
|
|
908
922
|
}
|
|
909
|
-
var
|
|
923
|
+
var Nt = {
|
|
910
924
|
closed: !0,
|
|
911
925
|
next: Ne,
|
|
912
|
-
error:
|
|
926
|
+
error: xt,
|
|
913
927
|
complete: Ne
|
|
914
|
-
},
|
|
928
|
+
}, Ut = function() {
|
|
915
929
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
916
930
|
}();
|
|
917
|
-
function
|
|
931
|
+
function Te(r) {
|
|
918
932
|
return r;
|
|
919
933
|
}
|
|
920
|
-
function
|
|
921
|
-
return r.length === 0 ?
|
|
934
|
+
function Lt(r) {
|
|
935
|
+
return r.length === 0 ? Te : r.length === 1 ? r[0] : function(t) {
|
|
922
936
|
return r.reduce(function(n, i) {
|
|
923
937
|
return i(n);
|
|
924
938
|
}, t);
|
|
@@ -932,7 +946,7 @@ var Ue = function() {
|
|
|
932
946
|
var t = new r();
|
|
933
947
|
return t.source = this, t.operator = e, t;
|
|
934
948
|
}, r.prototype.subscribe = function(e, t, n) {
|
|
935
|
-
var i = this, l =
|
|
949
|
+
var i = this, l = Ft(e) ? e : new Oe(e, t, n);
|
|
936
950
|
return oe(function() {
|
|
937
951
|
var u = i, c = u.operator, g = u.source;
|
|
938
952
|
l.add(c ? c.call(l, g) : g ? i._subscribe(l) : i._trySubscribe(l));
|
|
@@ -962,12 +976,12 @@ var Ue = function() {
|
|
|
962
976
|
}, r.prototype._subscribe = function(e) {
|
|
963
977
|
var t;
|
|
964
978
|
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e);
|
|
965
|
-
}, r.prototype[
|
|
979
|
+
}, r.prototype[Ut] = function() {
|
|
966
980
|
return this;
|
|
967
981
|
}, r.prototype.pipe = function() {
|
|
968
982
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
969
983
|
e[t] = arguments[t];
|
|
970
|
-
return
|
|
984
|
+
return Lt(e)(this);
|
|
971
985
|
}, r.prototype.toPromise = function(e) {
|
|
972
986
|
var t = this;
|
|
973
987
|
return e = Le(e), new e(function(n, i) {
|
|
@@ -986,20 +1000,20 @@ var Ue = function() {
|
|
|
986
1000
|
}();
|
|
987
1001
|
function Le(r) {
|
|
988
1002
|
var e;
|
|
989
|
-
return (e = r ??
|
|
990
|
-
}
|
|
991
|
-
function Lt(r) {
|
|
992
|
-
return r && Y(r.next) && Y(r.error) && Y(r.complete);
|
|
1003
|
+
return (e = r ?? Ke.Promise) !== null && e !== void 0 ? e : Promise;
|
|
993
1004
|
}
|
|
994
1005
|
function Dt(r) {
|
|
995
|
-
return r && r
|
|
1006
|
+
return r && Y(r.next) && Y(r.error) && Y(r.complete);
|
|
996
1007
|
}
|
|
997
1008
|
function Ft(r) {
|
|
998
|
-
return
|
|
1009
|
+
return r && r instanceof Ve || Dt(r) && Ce(r);
|
|
999
1010
|
}
|
|
1000
1011
|
function qt(r) {
|
|
1012
|
+
return Y(r == null ? void 0 : r.lift);
|
|
1013
|
+
}
|
|
1014
|
+
function Yt(r) {
|
|
1001
1015
|
return function(e) {
|
|
1002
|
-
if (
|
|
1016
|
+
if (qt(e))
|
|
1003
1017
|
return e.lift(function(t) {
|
|
1004
1018
|
try {
|
|
1005
1019
|
return r(t, this);
|
|
@@ -1010,10 +1024,10 @@ function qt(r) {
|
|
|
1010
1024
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
1011
1025
|
};
|
|
1012
1026
|
}
|
|
1013
|
-
function
|
|
1014
|
-
return new
|
|
1027
|
+
function Xt(r, e, t, n, i) {
|
|
1028
|
+
return new Gt(r, e, t, n, i);
|
|
1015
1029
|
}
|
|
1016
|
-
var
|
|
1030
|
+
var Gt = function(r) {
|
|
1017
1031
|
_(e, r);
|
|
1018
1032
|
function e(t, n, i, l, u, c) {
|
|
1019
1033
|
var g = r.call(this, t) || this;
|
|
@@ -1048,11 +1062,11 @@ var Xt = function(r) {
|
|
|
1048
1062
|
r.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
|
1049
1063
|
}
|
|
1050
1064
|
}, e;
|
|
1051
|
-
}(Ve),
|
|
1065
|
+
}(Ve), Wt = Qe(function(r) {
|
|
1052
1066
|
return function() {
|
|
1053
1067
|
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
1054
1068
|
};
|
|
1055
|
-
}),
|
|
1069
|
+
}), Ae = function(r) {
|
|
1056
1070
|
_(e, r);
|
|
1057
1071
|
function e() {
|
|
1058
1072
|
var t = r.call(this) || this;
|
|
@@ -1063,7 +1077,7 @@ var Xt = function(r) {
|
|
|
1063
1077
|
return n.operator = t, n;
|
|
1064
1078
|
}, e.prototype._throwIfClosed = function() {
|
|
1065
1079
|
if (this.closed)
|
|
1066
|
-
throw new
|
|
1080
|
+
throw new Wt();
|
|
1067
1081
|
}, e.prototype.next = function(t) {
|
|
1068
1082
|
var n = this;
|
|
1069
1083
|
oe(function() {
|
|
@@ -1119,7 +1133,7 @@ var Xt = function(r) {
|
|
|
1119
1133
|
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
|
|
1120
1134
|
}, e.prototype._innerSubscribe = function(t) {
|
|
1121
1135
|
var n = this, i = this, l = i.hasError, u = i.isStopped, c = i.observers;
|
|
1122
|
-
return l || u ?
|
|
1136
|
+
return l || u ? Ze : (this.currentObservers = null, c.push(t), new ce(function() {
|
|
1123
1137
|
n.currentObservers = null, He(c, t);
|
|
1124
1138
|
}));
|
|
1125
1139
|
}, e.prototype._checkFinalizedStatuses = function(t) {
|
|
@@ -1148,9 +1162,9 @@ var Xt = function(r) {
|
|
|
1148
1162
|
(n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
|
|
1149
1163
|
}, e.prototype._subscribe = function(t) {
|
|
1150
1164
|
var n, i;
|
|
1151
|
-
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && i !== void 0 ? i :
|
|
1165
|
+
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && i !== void 0 ? i : Ze;
|
|
1152
1166
|
}, e;
|
|
1153
|
-
}(
|
|
1167
|
+
}(Ae), Fe = function(r) {
|
|
1154
1168
|
_(e, r);
|
|
1155
1169
|
function e(t) {
|
|
1156
1170
|
var n = r.call(this) || this;
|
|
@@ -1173,21 +1187,21 @@ var Xt = function(r) {
|
|
|
1173
1187
|
}, e.prototype.next = function(t) {
|
|
1174
1188
|
r.prototype.next.call(this, this._value = t);
|
|
1175
1189
|
}, e;
|
|
1176
|
-
}(
|
|
1177
|
-
function
|
|
1178
|
-
return e === void 0 && (e =
|
|
1190
|
+
}(Ae);
|
|
1191
|
+
function zt(r, e) {
|
|
1192
|
+
return e === void 0 && (e = Te), r = r ?? Jt, Yt(function(t, n) {
|
|
1179
1193
|
var i, l = !0;
|
|
1180
|
-
t.subscribe(
|
|
1194
|
+
t.subscribe(Xt(n, function(u) {
|
|
1181
1195
|
var c = e(u);
|
|
1182
1196
|
(l || !r(i, c)) && (l = !1, i = c, n.next(u));
|
|
1183
1197
|
}));
|
|
1184
1198
|
});
|
|
1185
1199
|
}
|
|
1186
|
-
function
|
|
1200
|
+
function Jt(r, e) {
|
|
1187
1201
|
return r === e;
|
|
1188
1202
|
}
|
|
1189
1203
|
var R = /* @__PURE__ */ ((r) => (r.hex = "hex", r.hexa = "hexa", r.rgba = "rgba", r.rgb = "rgb", r.hsla = "hsla", r.hsl = "hsl", r.cmyk = "cmyk", r))(R || {});
|
|
1190
|
-
class
|
|
1204
|
+
class je {
|
|
1191
1205
|
constructor(e) {
|
|
1192
1206
|
/** 所选颜色值 */
|
|
1193
1207
|
s(this, "modelValue", null);
|
|
@@ -1195,11 +1209,11 @@ class Ae {
|
|
|
1195
1209
|
s(this, "hueValue", null);
|
|
1196
1210
|
/** 初始颜色值 */
|
|
1197
1211
|
s(this, "initValue", null);
|
|
1198
|
-
s(this, "valueChanged", new
|
|
1212
|
+
s(this, "valueChanged", new Ae());
|
|
1199
1213
|
s(this, "presetsVisibilityChanges", new Fe(!0));
|
|
1200
1214
|
s(this, "initType", null);
|
|
1201
1215
|
s(this, "alphaChannelVisibilityChanges", new Fe(!0));
|
|
1202
|
-
s(this, "valueChanges", this.valueChanged.asObservable().pipe(
|
|
1216
|
+
s(this, "valueChanges", this.valueChanged.asObservable().pipe(zt(
|
|
1203
1217
|
(e, t) => e.toRgbaString() === t.toRgbaString()
|
|
1204
1218
|
)));
|
|
1205
1219
|
s(this, "colorPresets", []);
|
|
@@ -1276,7 +1290,7 @@ class Ae {
|
|
|
1276
1290
|
}
|
|
1277
1291
|
}
|
|
1278
1292
|
/** 确定输入颜色类型 */
|
|
1279
|
-
s(
|
|
1293
|
+
s(je, "finOutInputType");
|
|
1280
1294
|
function x(r, e) {
|
|
1281
1295
|
switch (e) {
|
|
1282
1296
|
case R.hex:
|
|
@@ -1295,14 +1309,14 @@ function x(r, e) {
|
|
|
1295
1309
|
return r.toRgbaString();
|
|
1296
1310
|
}
|
|
1297
1311
|
}
|
|
1298
|
-
const
|
|
1312
|
+
const Qt = {
|
|
1299
1313
|
color: { type: Object, default: "" },
|
|
1300
1314
|
hue: { type: Object, default: "" },
|
|
1301
1315
|
randomId: { type: String, default: "" },
|
|
1302
1316
|
allowColorNull: { type: Boolean, default: !1 }
|
|
1303
|
-
},
|
|
1317
|
+
}, _e = /* @__PURE__ */ T({
|
|
1304
1318
|
name: "SvPanel",
|
|
1305
|
-
props:
|
|
1319
|
+
props: Qt,
|
|
1306
1320
|
emits: ["update:color"],
|
|
1307
1321
|
setup(r, e) {
|
|
1308
1322
|
const t = S(null), n = S(null), i = S(r.randomId), l = S(r.allowColorNull);
|
|
@@ -1329,7 +1343,7 @@ const Jt = {
|
|
|
1329
1343
|
c(v, $);
|
|
1330
1344
|
const M = r.color == null ? "transparent" : r.color, H = E.from(M);
|
|
1331
1345
|
if (g(), H != null) {
|
|
1332
|
-
const
|
|
1346
|
+
const A = r.hue.getHsva(), N = H.getHsva(), P = new E().setHsva(A.hue, v, $, N.alpha);
|
|
1333
1347
|
e.emit("update:color", P);
|
|
1334
1348
|
}
|
|
1335
1349
|
!H && l.value && e.emit("update:color", null);
|
|
@@ -1344,10 +1358,10 @@ const Jt = {
|
|
|
1344
1358
|
} = n.value.getBoundingClientRect(), {
|
|
1345
1359
|
pageX: $,
|
|
1346
1360
|
pageY: M
|
|
1347
|
-
} = "touches" in f ? f.touches[0] : f, H = Math.max(0, Math.min($ - (v + window.pageXOffset), d)),
|
|
1361
|
+
} = "touches" in f ? f.touches[0] : f, H = Math.max(0, Math.min($ - (v + window.pageXOffset), d)), A = Math.max(0, Math.min(M - (y + window.pageYOffset), b));
|
|
1348
1362
|
h({
|
|
1349
1363
|
x: H,
|
|
1350
|
-
y:
|
|
1364
|
+
y: A,
|
|
1351
1365
|
height: b,
|
|
1352
1366
|
width: d
|
|
1353
1367
|
});
|
|
@@ -1378,14 +1392,14 @@ const Jt = {
|
|
|
1378
1392
|
ref: t
|
|
1379
1393
|
}, [k("div", null, null)])]);
|
|
1380
1394
|
}
|
|
1381
|
-
}),
|
|
1395
|
+
}), Zt = {
|
|
1382
1396
|
color: { type: Object, default: "" },
|
|
1383
1397
|
hue: { type: Object, default: "" },
|
|
1384
1398
|
allowColorNull: { type: Boolean, default: !1 },
|
|
1385
1399
|
onChange: { type: Function }
|
|
1386
|
-
},
|
|
1400
|
+
}, et = /* @__PURE__ */ T({
|
|
1387
1401
|
name: "Hue",
|
|
1388
|
-
props:
|
|
1402
|
+
props: Zt,
|
|
1389
1403
|
emits: ["update:color", "update:hue"],
|
|
1390
1404
|
setup(r, e) {
|
|
1391
1405
|
const t = S(r.hue), n = S(r.allowColorNull), i = [];
|
|
@@ -1401,9 +1415,9 @@ const Jt = {
|
|
|
1401
1415
|
top: M,
|
|
1402
1416
|
left: H
|
|
1403
1417
|
} = u.value.getBoundingClientRect(), {
|
|
1404
|
-
pageX:
|
|
1418
|
+
pageX: A,
|
|
1405
1419
|
pageY: N
|
|
1406
|
-
} = "touches" in y ? y.touches[0] : y, P = Math.max(0, Math.min(
|
|
1420
|
+
} = "touches" in y ? y.touches[0] : y, P = Math.max(0, Math.min(A - (H + window.pageXOffset), v)), V = Math.max(0, Math.min(N - (M + window.pageYOffset), $));
|
|
1407
1421
|
b({
|
|
1408
1422
|
x: P,
|
|
1409
1423
|
y: V,
|
|
@@ -1442,7 +1456,7 @@ const Jt = {
|
|
|
1442
1456
|
}) {
|
|
1443
1457
|
const H = v / $ * 360;
|
|
1444
1458
|
d(H);
|
|
1445
|
-
const
|
|
1459
|
+
const A = r.color.getHsva(), N = new E().setHsva(H, A.saturation, A.value, A.alpha), P = new E().setHsva(H, 100, 100, A.alpha);
|
|
1446
1460
|
(r.color != null || r.color == null && n.value) && (e.emit("update:hue", P), e.emit("update:color", N));
|
|
1447
1461
|
}
|
|
1448
1462
|
return F(t, (y) => {
|
|
@@ -1463,13 +1477,13 @@ const Jt = {
|
|
|
1463
1477
|
ref: f
|
|
1464
1478
|
}, null)]);
|
|
1465
1479
|
}
|
|
1466
|
-
}),
|
|
1480
|
+
}), Ct = {
|
|
1467
1481
|
color: { type: Object, default: "" },
|
|
1468
1482
|
randomId: { type: String, default: "" },
|
|
1469
1483
|
allowColorNull: { type: Boolean, default: !1 }
|
|
1470
|
-
},
|
|
1484
|
+
}, tt = /* @__PURE__ */ T({
|
|
1471
1485
|
name: "Alpha",
|
|
1472
|
-
props:
|
|
1486
|
+
props: Ct,
|
|
1473
1487
|
emits: ["update:color"],
|
|
1474
1488
|
setup(r, e) {
|
|
1475
1489
|
const t = S(null), n = S(null), i = S(r.randomId), l = S(r.allowColorNull), u = (p) => {
|
|
@@ -1529,14 +1543,14 @@ const Jt = {
|
|
|
1529
1543
|
ref: n
|
|
1530
1544
|
}, null)]);
|
|
1531
1545
|
}
|
|
1532
|
-
}),
|
|
1546
|
+
}), Kt = {
|
|
1533
1547
|
color: { type: Object, default: "" },
|
|
1534
1548
|
hue: { type: Object, default: "" },
|
|
1535
1549
|
colorPresets: { type: Object, default: "" },
|
|
1536
1550
|
randomId: { type: String, default: "" }
|
|
1537
|
-
},
|
|
1551
|
+
}, nt = /* @__PURE__ */ T({
|
|
1538
1552
|
name: "Preset",
|
|
1539
|
-
props:
|
|
1553
|
+
props: Kt,
|
|
1540
1554
|
emits: ["update:hue", "update:color"],
|
|
1541
1555
|
setup(r, e) {
|
|
1542
1556
|
const t = S(new E()), n = S(r.colorPresets), i = S(r.randomId);
|
|
@@ -1583,16 +1597,16 @@ const Jt = {
|
|
|
1583
1597
|
setup(r, e) {
|
|
1584
1598
|
const t = S(new E(r.color)), n = S(r.color), i = S(r.disabled), l = S(r.color), u = S(r.allowColorNull), c = S(r.presets), g = S(!1), h = S(!1), p = S(!1), f = S("HEX"), d = Math.floor(Math.random() * 1e3).toString();
|
|
1585
1599
|
let b = -1, y;
|
|
1586
|
-
const v = new
|
|
1600
|
+
const v = new je("#000000"), $ = S(r.color);
|
|
1587
1601
|
let M, H;
|
|
1588
|
-
const
|
|
1602
|
+
const A = S(null), N = S(null), P = S(null), V = U(() => !y && v && v.initType ? v.initType : y), O = U({
|
|
1589
1603
|
get() {
|
|
1590
1604
|
return y && n.value !== null ? (te(y), x(new E(n.value), R[y])) : n.value;
|
|
1591
1605
|
},
|
|
1592
1606
|
set(w) {
|
|
1593
1607
|
w !== null && (q(w), J(w));
|
|
1594
1608
|
}
|
|
1595
|
-
}),
|
|
1609
|
+
}), j = S(O.value), I = U(() => b > -1), W = U(() => c.value.length > 0), he = U(() => ({
|
|
1596
1610
|
"background-color": l.value
|
|
1597
1611
|
})), ie = U(() => h.value && g.value ? "display:flex" : "display:none"), z = [{
|
|
1598
1612
|
text: "HEX",
|
|
@@ -1617,7 +1631,7 @@ const Jt = {
|
|
|
1617
1631
|
}
|
|
1618
1632
|
}
|
|
1619
1633
|
function fe() {
|
|
1620
|
-
n.value && (q(n.value), !n.value && u.value || (n.value = x(new E(n.value), R[V.value])),
|
|
1634
|
+
n.value && (q(n.value), !n.value && u.value || (n.value = x(new E(n.value), R[V.value])), j.value = O.value), ee(te(v.initType));
|
|
1621
1635
|
}
|
|
1622
1636
|
function se() {
|
|
1623
1637
|
n.value && q(n.value), v.hasPresets() || v.setColorPresets(c.value), n.value ? l.value = x(new E(n.value), R[V.value]) : !n.value && u.value && (l.value = null);
|
|
@@ -1660,13 +1674,13 @@ const Jt = {
|
|
|
1660
1674
|
e.emit("valueChanged", D), L();
|
|
1661
1675
|
}
|
|
1662
1676
|
if (!u.value && !(O.value === void 0 || O.value == null || O.value === "")) {
|
|
1663
|
-
(B = (m =
|
|
1677
|
+
(B = (m = A.value) == null ? void 0 : m.style) == null || B.setProperty("background", n.value), p.value = !0, l.value = n.value;
|
|
1664
1678
|
const D = {
|
|
1665
1679
|
elementValue: l
|
|
1666
1680
|
};
|
|
1667
1681
|
e.emit("valueChanged", D), L();
|
|
1668
1682
|
}
|
|
1669
|
-
!$.value && !n.value && !p.value && u && L(), J(n.value), O.value = n.value, H.classList.contains("disabled") || (
|
|
1683
|
+
!$.value && !n.value && !p.value && u && L(), J(n.value), O.value = n.value, H.classList.contains("disabled") || (j.value = n.value, g.value = !1);
|
|
1670
1684
|
}
|
|
1671
1685
|
function q(w) {
|
|
1672
1686
|
v == null || v.setValueFrom(w, d, u.value);
|
|
@@ -1702,20 +1716,20 @@ const Jt = {
|
|
|
1702
1716
|
style: "top:30px"
|
|
1703
1717
|
}, [k("div", {
|
|
1704
1718
|
class: "color-picker-main"
|
|
1705
|
-
}, [k(
|
|
1719
|
+
}, [k(et, {
|
|
1706
1720
|
hue: v.hue,
|
|
1707
1721
|
"onUpdate:hue": (w) => v.hue = w,
|
|
1708
1722
|
allowColorNull: u.value,
|
|
1709
1723
|
color: t.value,
|
|
1710
1724
|
"onUpdate:color": (w) => t.value = w
|
|
1711
|
-
}, null), k(
|
|
1725
|
+
}, null), k(_e, {
|
|
1712
1726
|
randomId: d,
|
|
1713
1727
|
hue: v.hue,
|
|
1714
1728
|
"onUpdate:hue": (w) => v.hue = w,
|
|
1715
1729
|
allowColorNull: u.value,
|
|
1716
1730
|
color: t.value,
|
|
1717
1731
|
"onUpdate:color": (w) => t.value = w
|
|
1718
|
-
}, null)]), k(
|
|
1732
|
+
}, null)]), k(tt, {
|
|
1719
1733
|
style: ie.value,
|
|
1720
1734
|
randomId: d,
|
|
1721
1735
|
allowColorNull: u.value,
|
|
@@ -1747,7 +1761,7 @@ const Jt = {
|
|
|
1747
1761
|
id: "farris-color-picker-plus-sure",
|
|
1748
1762
|
class: "btn btn-secondary",
|
|
1749
1763
|
onClick: (w) => ge(w)
|
|
1750
|
-
}, [Be("确定")])])]), X(k(
|
|
1764
|
+
}, [Be("确定")])])]), X(k(nt, {
|
|
1751
1765
|
color: t.value,
|
|
1752
1766
|
"onUpdate:color": (w) => t.value = w,
|
|
1753
1767
|
hue: v.hue,
|
|
@@ -1760,7 +1774,7 @@ const Jt = {
|
|
|
1760
1774
|
title: "color-picker-input",
|
|
1761
1775
|
type: "text",
|
|
1762
1776
|
class: "color-picker-input form-control",
|
|
1763
|
-
value:
|
|
1777
|
+
value: j.value,
|
|
1764
1778
|
readonly: i.value,
|
|
1765
1779
|
onClick: (w) => w.stopPropagation()
|
|
1766
1780
|
}, null), k("div", {
|
|
@@ -1773,7 +1787,7 @@ const Jt = {
|
|
|
1773
1787
|
}, null)])])])]);
|
|
1774
1788
|
}
|
|
1775
1789
|
});
|
|
1776
|
-
function
|
|
1790
|
+
function Tt(r, e, t) {
|
|
1777
1791
|
var N;
|
|
1778
1792
|
const n = "", i = "", l = S();
|
|
1779
1793
|
function u() {
|
|
@@ -1812,21 +1826,21 @@ function Kt(r, e, t) {
|
|
|
1812
1826
|
}
|
|
1813
1827
|
function $(P, V) {
|
|
1814
1828
|
const { componentType: O } = P;
|
|
1815
|
-
let
|
|
1829
|
+
let j = ze(O, P, V);
|
|
1816
1830
|
const I = O.toLowerCase().replace(/-/g, "_");
|
|
1817
|
-
return
|
|
1831
|
+
return j && !j.id && j.type === O && (j.id = `${I}_${Math.random().toString().slice(2, 6)}`), j;
|
|
1818
1832
|
}
|
|
1819
1833
|
function M(P) {
|
|
1820
1834
|
}
|
|
1821
1835
|
function H(...P) {
|
|
1822
1836
|
}
|
|
1823
|
-
function
|
|
1837
|
+
function A() {
|
|
1824
1838
|
e != null && e.schema.contents && e.schema.contents.map((P) => {
|
|
1825
|
-
var
|
|
1839
|
+
var j;
|
|
1826
1840
|
let V = P.id;
|
|
1827
1841
|
P.type === "component-ref" && (V = P.component);
|
|
1828
1842
|
const O = r.value.querySelector(`#${V}-design-item`);
|
|
1829
|
-
(
|
|
1843
|
+
(j = O == null ? void 0 : O.componentInstance) != null && j.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent();
|
|
1830
1844
|
});
|
|
1831
1845
|
}
|
|
1832
1846
|
return l.value = {
|
|
@@ -1851,23 +1865,23 @@ function Kt(r, e, t) {
|
|
|
1851
1865
|
addNewChildComponentSchema: $,
|
|
1852
1866
|
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
1853
1867
|
triggerBelongedComponentToDeleteWhenDeleted: S(!1),
|
|
1854
|
-
onRemoveComponent:
|
|
1868
|
+
onRemoveComponent: A
|
|
1855
1869
|
}, l;
|
|
1856
1870
|
}
|
|
1857
|
-
const
|
|
1871
|
+
const _t = /* @__PURE__ */ T({
|
|
1858
1872
|
name: "FColorPickerDesign",
|
|
1859
1873
|
props: $e,
|
|
1860
1874
|
emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
|
|
1861
1875
|
setup(r, e) {
|
|
1862
1876
|
const t = S(new E(r.color)), n = S(r.color), i = S(r.disabled), l = S(r.color), u = S(r.allowColorNull), c = S(r.presets), g = S(!1), h = S(!1), p = S(!1), f = S("HEX"), d = Math.floor(Math.random() * 1e3).toString();
|
|
1863
1877
|
let b = -1, y;
|
|
1864
|
-
const v = new
|
|
1878
|
+
const v = new je("#000000"), $ = S(r.color);
|
|
1865
1879
|
let M, H;
|
|
1866
|
-
const
|
|
1880
|
+
const A = S(null), N = S(null), P = S(), V = st("design-item-context"), O = Tt(P, V);
|
|
1867
1881
|
C(() => {
|
|
1868
1882
|
P.value.componentInstance = O;
|
|
1869
1883
|
}), e.expose(O.value);
|
|
1870
|
-
const
|
|
1884
|
+
const j = U(() => !y && v && v.initType ? v.initType : y), I = U({
|
|
1871
1885
|
get() {
|
|
1872
1886
|
return y && n.value !== null ? (Q(y), x(new E(n.value), R[y])) : n.value;
|
|
1873
1887
|
},
|
|
@@ -1899,10 +1913,10 @@ const Tt = /* @__PURE__ */ T({
|
|
|
1899
1913
|
}
|
|
1900
1914
|
}
|
|
1901
1915
|
function de() {
|
|
1902
|
-
n.value && (L(n.value), !n.value && u.value || (n.value = x(new E(n.value), R[
|
|
1916
|
+
n.value && (L(n.value), !n.value && u.value || (n.value = x(new E(n.value), R[j.value])), W.value = I.value), J(Q(v.initType));
|
|
1903
1917
|
}
|
|
1904
1918
|
function ee() {
|
|
1905
|
-
n.value && L(n.value), v.hasPresets() || v.setColorPresets(c.value), n.value ? l.value = x(new E(n.value), R[
|
|
1919
|
+
n.value && L(n.value), v.hasPresets() || v.setColorPresets(c.value), n.value ? l.value = x(new E(n.value), R[j.value]) : !n.value && u.value && (l.value = null);
|
|
1906
1920
|
}
|
|
1907
1921
|
function ve() {
|
|
1908
1922
|
v.valueChanges.subscribe((m) => {
|
|
@@ -1942,7 +1956,7 @@ const Tt = /* @__PURE__ */ T({
|
|
|
1942
1956
|
e.emit("valueChanged", D), M.classList.toggle("disabled");
|
|
1943
1957
|
}
|
|
1944
1958
|
if (!u.value && !(I.value === void 0 || I.value == null || I.value === "")) {
|
|
1945
|
-
(B = (m =
|
|
1959
|
+
(B = (m = A.value) == null ? void 0 : m.style) == null || B.setProperty("background", n.value), p.value = !0, l.value = n.value;
|
|
1946
1960
|
const D = {
|
|
1947
1961
|
elementValue: l
|
|
1948
1962
|
};
|
|
@@ -1979,20 +1993,20 @@ const Tt = /* @__PURE__ */ T({
|
|
|
1979
1993
|
style: "top:30px"
|
|
1980
1994
|
}, [k("div", {
|
|
1981
1995
|
class: "color-picker-main"
|
|
1982
|
-
}, [k(
|
|
1996
|
+
}, [k(et, {
|
|
1983
1997
|
hue: v.hue,
|
|
1984
1998
|
"onUpdate:hue": (m) => v.hue = m,
|
|
1985
1999
|
allowColorNull: u.value,
|
|
1986
2000
|
color: t.value,
|
|
1987
2001
|
"onUpdate:color": (m) => t.value = m
|
|
1988
|
-
}, null), k(
|
|
2002
|
+
}, null), k(_e, {
|
|
1989
2003
|
randomId: d,
|
|
1990
2004
|
hue: v.hue,
|
|
1991
2005
|
"onUpdate:hue": (m) => v.hue = m,
|
|
1992
2006
|
allowColorNull: u.value,
|
|
1993
2007
|
color: t.value,
|
|
1994
2008
|
"onUpdate:color": (m) => t.value = m
|
|
1995
|
-
}, null)]), k(
|
|
2009
|
+
}, null)]), k(tt, {
|
|
1996
2010
|
style: pe.value,
|
|
1997
2011
|
randomId: d,
|
|
1998
2012
|
allowColorNull: u.value,
|
|
@@ -2024,7 +2038,7 @@ const Tt = /* @__PURE__ */ T({
|
|
|
2024
2038
|
id: "farris-color-picker-plus-sure",
|
|
2025
2039
|
class: "btn btn-secondary",
|
|
2026
2040
|
onClick: ye
|
|
2027
|
-
}, [Be("确定")])])]), X(k(
|
|
2041
|
+
}, [Be("确定")])])]), X(k(nt, {
|
|
2028
2042
|
color: t.value,
|
|
2029
2043
|
"onUpdate:color": (m) => t.value = m,
|
|
2030
2044
|
colorPresets: v.presets,
|
|
@@ -2050,13 +2064,13 @@ const Tt = /* @__PURE__ */ T({
|
|
|
2050
2064
|
}
|
|
2051
2065
|
});
|
|
2052
2066
|
ue.register = (r, e, t) => {
|
|
2053
|
-
r["color-picker"] = ue, e["color-picker"] =
|
|
2067
|
+
r["color-picker"] = ue, e["color-picker"] = Je;
|
|
2054
2068
|
};
|
|
2055
2069
|
ue.registerDesigner = (r, e, t) => {
|
|
2056
|
-
r["color-picker"] =
|
|
2070
|
+
r["color-picker"] = _t, e["color-picker"] = Je;
|
|
2057
2071
|
};
|
|
2058
|
-
const
|
|
2072
|
+
const sn = at(ue);
|
|
2059
2073
|
export {
|
|
2060
2074
|
ue as FColorPicker,
|
|
2061
|
-
|
|
2075
|
+
sn as default
|
|
2062
2076
|
};
|