@farris/ui-vue 1.2.8 → 1.3.0
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 +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (r, e, t) =>
|
|
4
|
-
import { defineComponent as ee, ref as S, onMounted as T, watch as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
const
|
|
1
|
+
var nt = Object.defineProperty;
|
|
2
|
+
var rt = (r, e, t) => e in r ? nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var s = (r, e, t) => rt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as ee, ref as S, onMounted as T, watch as q, createVNode as k, withModifiers as _, createTextVNode as Re, computed as U, onBeforeMount as Ye, withDirectives as W, vShow as K, vModelText as Xe, inject as it } from "vue";
|
|
5
|
+
import { isPlainObject as je, cloneDeep as st } from "lodash-es";
|
|
6
|
+
const Ge = {}, We = {};
|
|
7
7
|
function $e(r) {
|
|
8
|
-
const { properties: e, title: t } = r, n = Object.keys(e).reduce((
|
|
9
|
-
return n.id = `${t}-${Date.now()}
|
|
8
|
+
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 ? $e(e[c]) : st(e[c].default)), u), {});
|
|
9
|
+
return (!i || !n.find((u) => u == "id")) && (l.id = `${t}-${Date.now()}`), l;
|
|
10
10
|
}
|
|
11
|
-
function ke(r, e = {}) {
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
11
|
+
function ke(r, e = {}, t) {
|
|
12
|
+
const n = Ge[r];
|
|
13
|
+
if (n) {
|
|
14
|
+
let i = $e(n);
|
|
15
|
+
const l = We[r];
|
|
16
|
+
return i = l ? l({ getSchemaByType: ke }, i, e, t) : i, i;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function at(r, e) {
|
|
21
21
|
const t = $e(e);
|
|
22
|
-
return Object.keys(r).reduce((n, i) => (n[i] &&
|
|
22
|
+
return Object.keys(r).reduce((n, i) => (n[i] && je(n[i]) && je(r[i]) ? Object.assign(n[i], r[i]) : n[i] = r[i], n), t), t;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ot(r, e) {
|
|
25
25
|
return Object.keys(r).filter((n) => r[n] != null).reduce((n, i) => {
|
|
26
26
|
if (e.has(i)) {
|
|
27
27
|
const l = e.get(i);
|
|
@@ -36,11 +36,11 @@ function at(r, e) {
|
|
|
36
36
|
return n;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const n =
|
|
41
|
-
return
|
|
39
|
+
function ut(r, e, t = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const n = at(r, e);
|
|
41
|
+
return ot(n, t);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function lt(r = {}) {
|
|
44
44
|
function e(h, p, d, f) {
|
|
45
45
|
if (typeof d == "number")
|
|
46
46
|
return f[h].length === d;
|
|
@@ -89,20 +89,20 @@ function ut(r = {}) {
|
|
|
89
89
|
return l(h).reduce((b, y) => b && u(y, p), !0);
|
|
90
90
|
}
|
|
91
91
|
function g(h, p) {
|
|
92
|
-
const d = Object.keys(h), f = d.includes("allOf"), b = d.includes("anyOf"), y = f || b, E = (y ? h[y ? f ? "allOf" : "anyOf" : "allOf"] : [h]).map((
|
|
92
|
+
const d = Object.keys(h), f = d.includes("allOf"), b = d.includes("anyOf"), y = f || b, E = (y ? h[y ? f ? "allOf" : "anyOf" : "allOf"] : [h]).map((A) => c(A, p));
|
|
93
93
|
return f ? !E.includes(!1) : E.includes(!0);
|
|
94
94
|
}
|
|
95
95
|
return { parseValueSchema: g };
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
function
|
|
100
|
-
return
|
|
101
|
-
const c =
|
|
97
|
+
const ct = {}, ht = {};
|
|
98
|
+
lt();
|
|
99
|
+
function pt(r, e, t = /* @__PURE__ */ new Map(), n = (u, c, g) => c, i = {}, l = (u) => u) {
|
|
100
|
+
return Ge[e.title] = e, We[e.title] = n, ct[e.title] = i, ht[e.title] = l, (u = {}) => {
|
|
101
|
+
const c = ut(u, e, t), g = Object.keys(r).reduce((h, p) => (h[p] = r[p].default, h), {});
|
|
102
102
|
return Object.assign(g, c);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const dt = "https://json-schema.org/draft/2020-12/schema", ft = "https://farris-design.gitee.io/color-picker.schema.json", vt = "color-picker", gt = "A Farris Component", yt = "object", mt = {
|
|
106
106
|
id: {
|
|
107
107
|
description: "The unique identifier for color picker",
|
|
108
108
|
type: "string"
|
|
@@ -164,27 +164,27 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
164
164
|
type: "boolean",
|
|
165
165
|
default: !0
|
|
166
166
|
}
|
|
167
|
-
},
|
|
167
|
+
}, wt = [
|
|
168
168
|
"id",
|
|
169
169
|
"type"
|
|
170
|
-
],
|
|
171
|
-
$schema:
|
|
172
|
-
$id:
|
|
173
|
-
title:
|
|
174
|
-
description:
|
|
175
|
-
type:
|
|
176
|
-
properties:
|
|
177
|
-
required:
|
|
170
|
+
], bt = {
|
|
171
|
+
$schema: dt,
|
|
172
|
+
$id: ft,
|
|
173
|
+
title: vt,
|
|
174
|
+
description: gt,
|
|
175
|
+
type: yt,
|
|
176
|
+
properties: mt,
|
|
177
|
+
required: wt
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function kt(r, e, t) {
|
|
180
180
|
return e;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function St(r, e) {
|
|
183
183
|
return { customClass: e.class, customStyle: e.style };
|
|
184
184
|
}
|
|
185
|
-
const
|
|
186
|
-
["appearance",
|
|
187
|
-
]),
|
|
185
|
+
const Pt = /* @__PURE__ */ new Map([
|
|
186
|
+
["appearance", St]
|
|
187
|
+
]), Et = "color-picker", Mt = "A Farris Component", Ht = "object", Ot = {
|
|
188
188
|
basic: {
|
|
189
189
|
description: "Basic Infomation",
|
|
190
190
|
title: "基本信息",
|
|
@@ -206,11 +206,11 @@ const St = /* @__PURE__ */ new Map([
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
},
|
|
210
|
-
title:
|
|
211
|
-
description:
|
|
212
|
-
type:
|
|
213
|
-
categories:
|
|
209
|
+
}, Bt = {
|
|
210
|
+
title: Et,
|
|
211
|
+
description: Mt,
|
|
212
|
+
type: Ht,
|
|
213
|
+
categories: Ot
|
|
214
214
|
}, Ve = {
|
|
215
215
|
/** 初始颜色 */
|
|
216
216
|
color: { type: String, default: "#e1e2e3" },
|
|
@@ -223,7 +223,7 @@ const St = /* @__PURE__ */ new Map([
|
|
|
223
223
|
/** 颜色值变化事件 */
|
|
224
224
|
onValueChanged: { type: Function, default: () => {
|
|
225
225
|
} }
|
|
226
|
-
},
|
|
226
|
+
}, ze = pt(Ve, bt, Pt, kt, Bt);
|
|
227
227
|
class ce {
|
|
228
228
|
}
|
|
229
229
|
class me extends ce {
|
|
@@ -659,16 +659,16 @@ function He(r, e, t) {
|
|
|
659
659
|
(l || !(n in e)) && (l || (l = Array.prototype.slice.call(e, 0, n)), l[n] = e[n]);
|
|
660
660
|
return r.concat(l || Array.prototype.slice.call(e));
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function X(r) {
|
|
663
663
|
return typeof r == "function";
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Ce(r) {
|
|
666
666
|
var e = function(n) {
|
|
667
667
|
Error.call(n), n.stack = new Error().stack;
|
|
668
668
|
}, t = r(e);
|
|
669
669
|
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
670
670
|
}
|
|
671
|
-
var we =
|
|
671
|
+
var we = Ce(function(r) {
|
|
672
672
|
return function(t) {
|
|
673
673
|
r(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
674
674
|
` + t.map(function(n, i) {
|
|
@@ -711,7 +711,7 @@ var he = function() {
|
|
|
711
711
|
else
|
|
712
712
|
u.remove(this);
|
|
713
713
|
var p = this.initialTeardown;
|
|
714
|
-
if (
|
|
714
|
+
if (X(p))
|
|
715
715
|
try {
|
|
716
716
|
p();
|
|
717
717
|
} catch (v) {
|
|
@@ -724,7 +724,7 @@ var he = function() {
|
|
|
724
724
|
for (var f = Ee(d), b = f.next(); !b.done; b = f.next()) {
|
|
725
725
|
var y = b.value;
|
|
726
726
|
try {
|
|
727
|
-
|
|
727
|
+
Ne(y);
|
|
728
728
|
} catch (v) {
|
|
729
729
|
l = l ?? [], v instanceof we ? l = He(He([], Me(l)), Me(v.errors)) : l.push(v);
|
|
730
730
|
}
|
|
@@ -746,7 +746,7 @@ var he = function() {
|
|
|
746
746
|
var t;
|
|
747
747
|
if (e && e !== this)
|
|
748
748
|
if (this.closed)
|
|
749
|
-
|
|
749
|
+
Ne(e);
|
|
750
750
|
else {
|
|
751
751
|
if (e instanceof r) {
|
|
752
752
|
if (e.closed || e._hasParent(this))
|
|
@@ -771,20 +771,20 @@ var he = function() {
|
|
|
771
771
|
var e = new r();
|
|
772
772
|
return e.closed = !0, e;
|
|
773
773
|
}(), r;
|
|
774
|
-
}(),
|
|
775
|
-
function
|
|
776
|
-
return r instanceof he || r && "closed" in r &&
|
|
774
|
+
}(), Je = he.EMPTY;
|
|
775
|
+
function Qe(r) {
|
|
776
|
+
return r instanceof he || r && "closed" in r && X(r.remove) && X(r.add) && X(r.unsubscribe);
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
|
|
778
|
+
function Ne(r) {
|
|
779
|
+
X(r) ? r() : r.unsubscribe();
|
|
780
780
|
}
|
|
781
|
-
var
|
|
781
|
+
var Ze = {
|
|
782
782
|
onUnhandledError: null,
|
|
783
783
|
onStoppedNotification: null,
|
|
784
784
|
Promise: void 0,
|
|
785
785
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
786
786
|
useDeprecatedNextContext: !1
|
|
787
|
-
},
|
|
787
|
+
}, Rt = {
|
|
788
788
|
setTimeout: function(r, e) {
|
|
789
789
|
for (var t = [], n = 2; n < arguments.length; n++)
|
|
790
790
|
t[n - 2] = arguments[n];
|
|
@@ -795,12 +795,12 @@ var Qe = {
|
|
|
795
795
|
},
|
|
796
796
|
delegate: void 0
|
|
797
797
|
};
|
|
798
|
-
function
|
|
799
|
-
|
|
798
|
+
function $t(r) {
|
|
799
|
+
Rt.setTimeout(function() {
|
|
800
800
|
throw r;
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Ue() {
|
|
804
804
|
}
|
|
805
805
|
function ue(r) {
|
|
806
806
|
r();
|
|
@@ -809,7 +809,7 @@ var xe = function(r) {
|
|
|
809
809
|
te(e, r);
|
|
810
810
|
function e(t) {
|
|
811
811
|
var n = r.call(this) || this;
|
|
812
|
-
return n.isStopped = !1, t ? (n.destination = t,
|
|
812
|
+
return n.isStopped = !1, t ? (n.destination = t, Qe(t) && t.add(n)) : n.destination = It, n;
|
|
813
813
|
}
|
|
814
814
|
return e.create = function(t, n, i) {
|
|
815
815
|
return new Be(t, n, i);
|
|
@@ -836,11 +836,11 @@ var xe = function(r) {
|
|
|
836
836
|
this.unsubscribe();
|
|
837
837
|
}
|
|
838
838
|
}, e;
|
|
839
|
-
}(he),
|
|
839
|
+
}(he), Vt = Function.prototype.bind;
|
|
840
840
|
function be(r, e) {
|
|
841
|
-
return
|
|
841
|
+
return Vt.call(r, e);
|
|
842
842
|
}
|
|
843
|
-
var
|
|
843
|
+
var xt = function() {
|
|
844
844
|
function r(e) {
|
|
845
845
|
this.partialObserver = e;
|
|
846
846
|
}
|
|
@@ -875,7 +875,7 @@ var Vt = function() {
|
|
|
875
875
|
te(e, r);
|
|
876
876
|
function e(t, n, i) {
|
|
877
877
|
var l = r.call(this) || this, u;
|
|
878
|
-
if (
|
|
878
|
+
if (X(t) || !t)
|
|
879
879
|
u = {
|
|
880
880
|
next: t ?? void 0,
|
|
881
881
|
error: n ?? void 0,
|
|
@@ -883,7 +883,7 @@ var Vt = function() {
|
|
|
883
883
|
};
|
|
884
884
|
else {
|
|
885
885
|
var c;
|
|
886
|
-
l &&
|
|
886
|
+
l && Ze.useDeprecatedNextContext ? (c = Object.create(t), c.unsubscribe = function() {
|
|
887
887
|
return l.unsubscribe();
|
|
888
888
|
}, u = {
|
|
889
889
|
next: t.next && be(t.next, c),
|
|
@@ -891,35 +891,35 @@ var Vt = function() {
|
|
|
891
891
|
complete: t.complete && be(t.complete, c)
|
|
892
892
|
}) : u = t;
|
|
893
893
|
}
|
|
894
|
-
return l.destination = new
|
|
894
|
+
return l.destination = new xt(u), l;
|
|
895
895
|
}
|
|
896
896
|
return e;
|
|
897
897
|
}(xe);
|
|
898
898
|
function oe(r) {
|
|
899
|
-
|
|
899
|
+
$t(r);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function At(r) {
|
|
902
902
|
throw r;
|
|
903
903
|
}
|
|
904
904
|
var It = {
|
|
905
905
|
closed: !0,
|
|
906
|
-
next:
|
|
907
|
-
error:
|
|
908
|
-
complete:
|
|
909
|
-
},
|
|
906
|
+
next: Ue,
|
|
907
|
+
error: At,
|
|
908
|
+
complete: Ue
|
|
909
|
+
}, jt = function() {
|
|
910
910
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
911
911
|
}();
|
|
912
|
-
function
|
|
912
|
+
function Ke(r) {
|
|
913
913
|
return r;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
return r.length === 0 ?
|
|
915
|
+
function Nt(r) {
|
|
916
|
+
return r.length === 0 ? Ke : r.length === 1 ? r[0] : function(t) {
|
|
917
917
|
return r.reduce(function(n, i) {
|
|
918
918
|
return i(n);
|
|
919
919
|
}, t);
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
|
-
var
|
|
922
|
+
var De = function() {
|
|
923
923
|
function r(e) {
|
|
924
924
|
e && (this._subscribe = e);
|
|
925
925
|
}
|
|
@@ -927,7 +927,7 @@ var Ue = function() {
|
|
|
927
927
|
var t = new r();
|
|
928
928
|
return t.source = this, t.operator = e, t;
|
|
929
929
|
}, r.prototype.subscribe = function(e, t, n) {
|
|
930
|
-
var i = this, l =
|
|
930
|
+
var i = this, l = Dt(e) ? e : new Be(e, t, n);
|
|
931
931
|
return ue(function() {
|
|
932
932
|
var u = i, c = u.operator, g = u.source;
|
|
933
933
|
l.add(c ? c.call(l, g) : g ? i._subscribe(l) : i._trySubscribe(l));
|
|
@@ -940,7 +940,7 @@ var Ue = function() {
|
|
|
940
940
|
}
|
|
941
941
|
}, r.prototype.forEach = function(e, t) {
|
|
942
942
|
var n = this;
|
|
943
|
-
return t =
|
|
943
|
+
return t = Le(t), new t(function(i, l) {
|
|
944
944
|
var u = new Be({
|
|
945
945
|
next: function(c) {
|
|
946
946
|
try {
|
|
@@ -957,15 +957,15 @@ var Ue = function() {
|
|
|
957
957
|
}, r.prototype._subscribe = function(e) {
|
|
958
958
|
var t;
|
|
959
959
|
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e);
|
|
960
|
-
}, r.prototype[
|
|
960
|
+
}, r.prototype[jt] = function() {
|
|
961
961
|
return this;
|
|
962
962
|
}, r.prototype.pipe = function() {
|
|
963
963
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
964
964
|
e[t] = arguments[t];
|
|
965
|
-
return
|
|
965
|
+
return Nt(e)(this);
|
|
966
966
|
}, r.prototype.toPromise = function(e) {
|
|
967
967
|
var t = this;
|
|
968
|
-
return e =
|
|
968
|
+
return e = Le(e), new e(function(n, i) {
|
|
969
969
|
var l;
|
|
970
970
|
t.subscribe(function(u) {
|
|
971
971
|
return l = u;
|
|
@@ -979,22 +979,22 @@ var Ue = function() {
|
|
|
979
979
|
return new r(e);
|
|
980
980
|
}, r;
|
|
981
981
|
}();
|
|
982
|
-
function
|
|
982
|
+
function Le(r) {
|
|
983
983
|
var e;
|
|
984
|
-
return (e = r ??
|
|
985
|
-
}
|
|
986
|
-
function Nt(r) {
|
|
987
|
-
return r && Y(r.next) && Y(r.error) && Y(r.complete);
|
|
984
|
+
return (e = r ?? Ze.Promise) !== null && e !== void 0 ? e : Promise;
|
|
988
985
|
}
|
|
989
986
|
function Ut(r) {
|
|
990
|
-
return r && r
|
|
987
|
+
return r && X(r.next) && X(r.error) && X(r.complete);
|
|
991
988
|
}
|
|
992
989
|
function Dt(r) {
|
|
993
|
-
return
|
|
990
|
+
return r && r instanceof xe || Ut(r) && Qe(r);
|
|
994
991
|
}
|
|
995
992
|
function Lt(r) {
|
|
993
|
+
return X(r == null ? void 0 : r.lift);
|
|
994
|
+
}
|
|
995
|
+
function Ft(r) {
|
|
996
996
|
return function(e) {
|
|
997
|
-
if (
|
|
997
|
+
if (Lt(e))
|
|
998
998
|
return e.lift(function(t) {
|
|
999
999
|
try {
|
|
1000
1000
|
return r(t, this);
|
|
@@ -1005,10 +1005,10 @@ function Lt(r) {
|
|
|
1005
1005
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
1006
1006
|
};
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return new
|
|
1008
|
+
function qt(r, e, t, n, i) {
|
|
1009
|
+
return new Yt(r, e, t, n, i);
|
|
1010
1010
|
}
|
|
1011
|
-
var
|
|
1011
|
+
var Yt = function(r) {
|
|
1012
1012
|
te(e, r);
|
|
1013
1013
|
function e(t, n, i, l, u, c) {
|
|
1014
1014
|
var g = r.call(this, t) || this;
|
|
@@ -1043,22 +1043,22 @@ var qt = function(r) {
|
|
|
1043
1043
|
r.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
|
1044
1044
|
}
|
|
1045
1045
|
}, e;
|
|
1046
|
-
}(xe),
|
|
1046
|
+
}(xe), Xt = Ce(function(r) {
|
|
1047
1047
|
return function() {
|
|
1048
1048
|
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
1049
1049
|
};
|
|
1050
|
-
}),
|
|
1050
|
+
}), Ae = function(r) {
|
|
1051
1051
|
te(e, r);
|
|
1052
1052
|
function e() {
|
|
1053
1053
|
var t = r.call(this) || this;
|
|
1054
1054
|
return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
|
|
1055
1055
|
}
|
|
1056
1056
|
return e.prototype.lift = function(t) {
|
|
1057
|
-
var n = new
|
|
1057
|
+
var n = new Fe(this, this);
|
|
1058
1058
|
return n.operator = t, n;
|
|
1059
1059
|
}, e.prototype._throwIfClosed = function() {
|
|
1060
1060
|
if (this.closed)
|
|
1061
|
-
throw new
|
|
1061
|
+
throw new Xt();
|
|
1062
1062
|
}, e.prototype.next = function(t) {
|
|
1063
1063
|
var n = this;
|
|
1064
1064
|
ue(function() {
|
|
@@ -1114,19 +1114,19 @@ var qt = function(r) {
|
|
|
1114
1114
|
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
|
|
1115
1115
|
}, e.prototype._innerSubscribe = function(t) {
|
|
1116
1116
|
var n = this, i = this, l = i.hasError, u = i.isStopped, c = i.observers;
|
|
1117
|
-
return l || u ?
|
|
1117
|
+
return l || u ? Je : (this.currentObservers = null, c.push(t), new he(function() {
|
|
1118
1118
|
n.currentObservers = null, Oe(c, t);
|
|
1119
1119
|
}));
|
|
1120
1120
|
}, e.prototype._checkFinalizedStatuses = function(t) {
|
|
1121
1121
|
var n = this, i = n.hasError, l = n.thrownError, u = n.isStopped;
|
|
1122
1122
|
i ? t.error(l) : u && t.complete();
|
|
1123
1123
|
}, e.prototype.asObservable = function() {
|
|
1124
|
-
var t = new
|
|
1124
|
+
var t = new De();
|
|
1125
1125
|
return t.source = this, t;
|
|
1126
1126
|
}, e.create = function(t, n) {
|
|
1127
|
-
return new
|
|
1127
|
+
return new Fe(t, n);
|
|
1128
1128
|
}, e;
|
|
1129
|
-
}(
|
|
1129
|
+
}(De), Fe = function(r) {
|
|
1130
1130
|
te(e, r);
|
|
1131
1131
|
function e(t, n) {
|
|
1132
1132
|
var i = r.call(this) || this;
|
|
@@ -1143,9 +1143,9 @@ var qt = function(r) {
|
|
|
1143
1143
|
(n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
|
|
1144
1144
|
}, e.prototype._subscribe = function(t) {
|
|
1145
1145
|
var n, i;
|
|
1146
|
-
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && i !== void 0 ? i :
|
|
1146
|
+
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && i !== void 0 ? i : Je;
|
|
1147
1147
|
}, e;
|
|
1148
|
-
}(
|
|
1148
|
+
}(Ae), qe = function(r) {
|
|
1149
1149
|
te(e, r);
|
|
1150
1150
|
function e(t) {
|
|
1151
1151
|
var n = r.call(this) || this;
|
|
@@ -1168,21 +1168,21 @@ var qt = function(r) {
|
|
|
1168
1168
|
}, e.prototype.next = function(t) {
|
|
1169
1169
|
r.prototype.next.call(this, this._value = t);
|
|
1170
1170
|
}, e;
|
|
1171
|
-
}(
|
|
1172
|
-
function
|
|
1173
|
-
return e === void 0 && (e =
|
|
1171
|
+
}(Ae);
|
|
1172
|
+
function Gt(r, e) {
|
|
1173
|
+
return e === void 0 && (e = Ke), r = r ?? Wt, Ft(function(t, n) {
|
|
1174
1174
|
var i, l = !0;
|
|
1175
|
-
t.subscribe(
|
|
1175
|
+
t.subscribe(qt(n, function(u) {
|
|
1176
1176
|
var c = e(u);
|
|
1177
1177
|
(l || !r(i, c)) && (l = !1, i = c, n.next(u));
|
|
1178
1178
|
}));
|
|
1179
1179
|
});
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Wt(r, e) {
|
|
1182
1182
|
return r === e;
|
|
1183
1183
|
}
|
|
1184
1184
|
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 || {});
|
|
1185
|
-
class
|
|
1185
|
+
class Ie {
|
|
1186
1186
|
constructor(e) {
|
|
1187
1187
|
/** 所选颜色值 */
|
|
1188
1188
|
s(this, "modelValue", null);
|
|
@@ -1190,11 +1190,11 @@ class Ae {
|
|
|
1190
1190
|
s(this, "hueValue", null);
|
|
1191
1191
|
/** 初始颜色值 */
|
|
1192
1192
|
s(this, "initValue", null);
|
|
1193
|
-
s(this, "valueChanged", new
|
|
1194
|
-
s(this, "presetsVisibilityChanges", new
|
|
1193
|
+
s(this, "valueChanged", new Ae());
|
|
1194
|
+
s(this, "presetsVisibilityChanges", new qe(!0));
|
|
1195
1195
|
s(this, "initType", null);
|
|
1196
|
-
s(this, "alphaChannelVisibilityChanges", new
|
|
1197
|
-
s(this, "valueChanges", this.valueChanged.asObservable().pipe(
|
|
1196
|
+
s(this, "alphaChannelVisibilityChanges", new qe(!0));
|
|
1197
|
+
s(this, "valueChanges", this.valueChanged.asObservable().pipe(Gt(
|
|
1198
1198
|
(e, t) => e.toRgbaString() === t.toRgbaString()
|
|
1199
1199
|
)));
|
|
1200
1200
|
s(this, "colorPresets", []);
|
|
@@ -1271,7 +1271,7 @@ class Ae {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
1273
|
/** 确定输入颜色类型 */
|
|
1274
|
-
s(
|
|
1274
|
+
s(Ie, "finOutInputType");
|
|
1275
1275
|
function j(r, e) {
|
|
1276
1276
|
switch (e) {
|
|
1277
1277
|
case R.hex:
|
|
@@ -1290,14 +1290,14 @@ function j(r, e) {
|
|
|
1290
1290
|
return r.toRgbaString();
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
const
|
|
1293
|
+
const zt = {
|
|
1294
1294
|
color: { type: Object, default: "" },
|
|
1295
1295
|
hue: { type: Object, default: "" },
|
|
1296
1296
|
randomId: { type: String, default: "" },
|
|
1297
1297
|
allowColorNull: { type: Boolean, default: !1 }
|
|
1298
|
-
},
|
|
1298
|
+
}, Te = /* @__PURE__ */ ee({
|
|
1299
1299
|
name: "SvPanel",
|
|
1300
|
-
props:
|
|
1300
|
+
props: zt,
|
|
1301
1301
|
emits: ["update:color"],
|
|
1302
1302
|
setup(r, e) {
|
|
1303
1303
|
const t = S(null), n = S(null), i = S(r.randomId), l = S(r.allowColorNull);
|
|
@@ -1324,8 +1324,8 @@ const Wt = {
|
|
|
1324
1324
|
c(v, $);
|
|
1325
1325
|
const E = r.color == null ? "transparent" : r.color, M = P.from(E);
|
|
1326
1326
|
if (g(), M != null) {
|
|
1327
|
-
const
|
|
1328
|
-
e.emit("update:color",
|
|
1327
|
+
const A = r.hue.getHsva(), N = M.getHsva(), I = new P().setHsva(A.hue, v, $, N.alpha);
|
|
1328
|
+
e.emit("update:color", I);
|
|
1329
1329
|
}
|
|
1330
1330
|
!M && l.value && e.emit("update:color", null);
|
|
1331
1331
|
}
|
|
@@ -1339,10 +1339,10 @@ const Wt = {
|
|
|
1339
1339
|
} = n.value.getBoundingClientRect(), {
|
|
1340
1340
|
pageX: $,
|
|
1341
1341
|
pageY: E
|
|
1342
|
-
} = "touches" in d ? d.touches[0] : d, M = Math.max(0, Math.min($ - (v + window.pageXOffset), f)),
|
|
1342
|
+
} = "touches" in d ? d.touches[0] : d, M = Math.max(0, Math.min($ - (v + window.pageXOffset), f)), A = Math.max(0, Math.min(E - (y + window.pageYOffset), b));
|
|
1343
1343
|
h({
|
|
1344
1344
|
x: M,
|
|
1345
|
-
y:
|
|
1345
|
+
y: A,
|
|
1346
1346
|
height: b,
|
|
1347
1347
|
width: f
|
|
1348
1348
|
});
|
|
@@ -1351,9 +1351,9 @@ const Wt = {
|
|
|
1351
1351
|
return T(() => {
|
|
1352
1352
|
const d = r.color.getHsva();
|
|
1353
1353
|
c(d.saturation, d.value);
|
|
1354
|
-
}),
|
|
1354
|
+
}), q(() => r.color, (d) => {
|
|
1355
1355
|
d.getHsva();
|
|
1356
|
-
}),
|
|
1356
|
+
}), q(() => r.color, (d) => {
|
|
1357
1357
|
const f = d.getHsva();
|
|
1358
1358
|
c(f.saturation, f.value);
|
|
1359
1359
|
}), () => k("div", {
|
|
@@ -1373,14 +1373,14 @@ const Wt = {
|
|
|
1373
1373
|
ref: t
|
|
1374
1374
|
}, [k("div", null, null)])]);
|
|
1375
1375
|
}
|
|
1376
|
-
}),
|
|
1376
|
+
}), Ct = {
|
|
1377
1377
|
color: { type: Object, default: "" },
|
|
1378
1378
|
hue: { type: Object, default: "" },
|
|
1379
1379
|
allowColorNull: { type: Boolean, default: !1 },
|
|
1380
1380
|
onChange: { type: Function }
|
|
1381
|
-
},
|
|
1381
|
+
}, _e = /* @__PURE__ */ ee({
|
|
1382
1382
|
name: "Hue",
|
|
1383
|
-
props:
|
|
1383
|
+
props: Ct,
|
|
1384
1384
|
emits: ["update:color", "update:hue"],
|
|
1385
1385
|
setup(r, e) {
|
|
1386
1386
|
const t = S(r.hue), n = S(r.allowColorNull), i = [];
|
|
@@ -1396,11 +1396,11 @@ const Wt = {
|
|
|
1396
1396
|
top: E,
|
|
1397
1397
|
left: M
|
|
1398
1398
|
} = u.value.getBoundingClientRect(), {
|
|
1399
|
-
pageX:
|
|
1399
|
+
pageX: A,
|
|
1400
1400
|
pageY: N
|
|
1401
|
-
} = "touches" in y ? y.touches[0] : y,
|
|
1401
|
+
} = "touches" in y ? y.touches[0] : y, I = Math.max(0, Math.min(A - (M + window.pageXOffset), v)), H = Math.max(0, Math.min(N - (E + window.pageYOffset), $));
|
|
1402
1402
|
b({
|
|
1403
|
-
x:
|
|
1403
|
+
x: I,
|
|
1404
1404
|
y: H,
|
|
1405
1405
|
height: $,
|
|
1406
1406
|
width: v
|
|
@@ -1437,13 +1437,13 @@ const Wt = {
|
|
|
1437
1437
|
}) {
|
|
1438
1438
|
const M = v / $ * 360;
|
|
1439
1439
|
f(M);
|
|
1440
|
-
const
|
|
1441
|
-
(r.color != null || r.color == null && n.value) && (e.emit("update:hue",
|
|
1440
|
+
const A = r.color.getHsva(), N = new P().setHsva(M, A.saturation, A.value, A.alpha), I = new P().setHsva(M, 100, 100, A.alpha);
|
|
1441
|
+
(r.color != null || r.color == null && n.value) && (e.emit("update:hue", I), e.emit("update:color", N));
|
|
1442
1442
|
}
|
|
1443
|
-
return
|
|
1443
|
+
return q(t, (y) => {
|
|
1444
1444
|
const v = y.getHsva();
|
|
1445
1445
|
f(v.hue);
|
|
1446
|
-
}),
|
|
1446
|
+
}), q(() => r.color, (y) => {
|
|
1447
1447
|
const v = y.getHsva();
|
|
1448
1448
|
f(v.hue);
|
|
1449
1449
|
}), () => k("div", {
|
|
@@ -1458,13 +1458,13 @@ const Wt = {
|
|
|
1458
1458
|
ref: d
|
|
1459
1459
|
}, null)]);
|
|
1460
1460
|
}
|
|
1461
|
-
}),
|
|
1461
|
+
}), Jt = {
|
|
1462
1462
|
color: { type: Object, default: "" },
|
|
1463
1463
|
randomId: { type: String, default: "" },
|
|
1464
1464
|
allowColorNull: { type: Boolean, default: !1 }
|
|
1465
|
-
},
|
|
1465
|
+
}, et = /* @__PURE__ */ ee({
|
|
1466
1466
|
name: "Alpha",
|
|
1467
|
-
props:
|
|
1467
|
+
props: Jt,
|
|
1468
1468
|
emits: ["update:color"],
|
|
1469
1469
|
setup(r, e) {
|
|
1470
1470
|
const t = S(null), n = S(null), i = S(r.randomId), l = S(r.allowColorNull), u = (p) => {
|
|
@@ -1509,7 +1509,7 @@ const Wt = {
|
|
|
1509
1509
|
return T(() => {
|
|
1510
1510
|
const p = r.color.getHsva();
|
|
1511
1511
|
u(p.alpha);
|
|
1512
|
-
}),
|
|
1512
|
+
}), q(() => r.color, (p) => {
|
|
1513
1513
|
const d = p.getHsva();
|
|
1514
1514
|
u(d.alpha);
|
|
1515
1515
|
}), () => k("div", {
|
|
@@ -1524,14 +1524,14 @@ const Wt = {
|
|
|
1524
1524
|
ref: n
|
|
1525
1525
|
}, null)]);
|
|
1526
1526
|
}
|
|
1527
|
-
}),
|
|
1527
|
+
}), Qt = {
|
|
1528
1528
|
color: { type: Object, default: "" },
|
|
1529
1529
|
hue: { type: Object, default: "" },
|
|
1530
1530
|
colorPresets: { type: Object, default: "" },
|
|
1531
1531
|
randomId: { type: String, default: "" }
|
|
1532
|
-
},
|
|
1532
|
+
}, tt = /* @__PURE__ */ ee({
|
|
1533
1533
|
name: "Preset",
|
|
1534
|
-
props:
|
|
1534
|
+
props: Qt,
|
|
1535
1535
|
emits: ["update:hue", "update:color"],
|
|
1536
1536
|
setup(r, e) {
|
|
1537
1537
|
const t = S(new P()), n = S(r.colorPresets), i = S(r.randomId);
|
|
@@ -1577,19 +1577,19 @@ const Wt = {
|
|
|
1577
1577
|
emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
|
|
1578
1578
|
setup(r, e) {
|
|
1579
1579
|
const t = S(new P(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), d = S("HEX"), f = Math.floor(Math.random() * 1e3).toString();
|
|
1580
|
-
let b = -1, y, v = new
|
|
1580
|
+
let b = -1, y, v = new Ie("#000000");
|
|
1581
1581
|
const $ = S(r.color);
|
|
1582
1582
|
let E, M;
|
|
1583
|
-
const
|
|
1583
|
+
const A = S(null), N = S(null), I = S(null);
|
|
1584
1584
|
let H = U(() => !y && v && v.initType ? v.initType : y);
|
|
1585
1585
|
const O = U({
|
|
1586
1586
|
get() {
|
|
1587
1587
|
return y && n.value !== null ? (re(y), j(new P(n.value), R[y])) : n.value;
|
|
1588
1588
|
},
|
|
1589
1589
|
set(w) {
|
|
1590
|
-
w !== null && (
|
|
1590
|
+
w !== null && (Y(w), Q(w));
|
|
1591
1591
|
}
|
|
1592
|
-
}),
|
|
1592
|
+
}), x = S(O.value), V = U(() => b > -1), D = U(() => c.value.length > 0), G = U(() => ({
|
|
1593
1593
|
"background-color": l.value
|
|
1594
1594
|
})), C = U(() => h.value && g.value ? "display:flex" : "display:none"), J = [{
|
|
1595
1595
|
text: "HEX",
|
|
@@ -1614,10 +1614,10 @@ const Wt = {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
}
|
|
1616
1616
|
function de() {
|
|
1617
|
-
n.value && (
|
|
1617
|
+
n.value && (Y(n.value), !n.value && u.value || (n.value = j(new P(n.value), R[H.value])), x.value = O.value), ne(re(v.initType));
|
|
1618
1618
|
}
|
|
1619
1619
|
function ae() {
|
|
1620
|
-
n.value &&
|
|
1620
|
+
n.value && Y(n.value), v.hasPresets() || v.setColorPresets(c.value), n.value ? l.value = j(new P(n.value), R[H.value]) : !n.value && u.value && (l.value = null);
|
|
1621
1621
|
}
|
|
1622
1622
|
function fe() {
|
|
1623
1623
|
v.valueChanges.subscribe((w) => {
|
|
@@ -1632,16 +1632,16 @@ const Wt = {
|
|
|
1632
1632
|
var w;
|
|
1633
1633
|
h.value = !!(y != null && y.includes("a") || (w = v.initType) != null && w.includes("a"));
|
|
1634
1634
|
}
|
|
1635
|
-
|
|
1635
|
+
Ye(() => {
|
|
1636
1636
|
v.setColorPresets(c.value || ["#eaecf3"]);
|
|
1637
1637
|
}), T(() => {
|
|
1638
1638
|
pe(), z(), de(), ae();
|
|
1639
|
-
}),
|
|
1639
|
+
}), q(d, () => {
|
|
1640
1640
|
fe(), O.value = j(new P(n.value), R[y || v.initType]), t.value = new P(O.value), ve();
|
|
1641
|
-
}),
|
|
1642
|
-
j(v.value, v.initType) !== w && w !== null &&
|
|
1643
|
-
}),
|
|
1644
|
-
n.value = j(w, R[y || v.initType]),
|
|
1641
|
+
}), q(n, (w) => {
|
|
1642
|
+
j(v.value, v.initType) !== w && w !== null && Y(w), ne(re(v.initType));
|
|
1643
|
+
}), q(t, (w) => {
|
|
1644
|
+
n.value = j(w, R[y || v.initType]), Y(n.value), O.value = n.value;
|
|
1645
1645
|
});
|
|
1646
1646
|
function Q(w) {
|
|
1647
1647
|
const m = document.getElementById(`farris-color-picker-plus-input-${f}`);
|
|
@@ -1651,29 +1651,29 @@ const Wt = {
|
|
|
1651
1651
|
var m, B;
|
|
1652
1652
|
if (w == null || w.stopPropagation(), u.value) {
|
|
1653
1653
|
l.value = (n == null ? void 0 : n.value) ?? null;
|
|
1654
|
-
const
|
|
1654
|
+
const F = {
|
|
1655
1655
|
elementValue: l
|
|
1656
1656
|
};
|
|
1657
|
-
e.emit("valueChanged",
|
|
1657
|
+
e.emit("valueChanged", F), L();
|
|
1658
1658
|
}
|
|
1659
1659
|
if (!u.value && !(O.value == null || O.value == null || O.value == "")) {
|
|
1660
|
-
(B = (m =
|
|
1661
|
-
const
|
|
1660
|
+
(B = (m = A.value) == null ? void 0 : m.style) == null || B.setProperty("background", n.value), p.value = !0, l.value = n.value;
|
|
1661
|
+
const F = {
|
|
1662
1662
|
elementValue: l
|
|
1663
1663
|
};
|
|
1664
|
-
e.emit("valueChanged",
|
|
1664
|
+
e.emit("valueChanged", F), L();
|
|
1665
1665
|
}
|
|
1666
|
-
!$.value && !n.value && !p.value && u &&
|
|
1666
|
+
!$.value && !n.value && !p.value && u && L(), Q(n.value), O.value = n.value, M.classList.contains("disabled") || (x.value = n.value, g.value = !1);
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function Y(w) {
|
|
1669
1669
|
v == null || v.setValueFrom(w, f, u.value);
|
|
1670
1670
|
}
|
|
1671
1671
|
function ye(w) {
|
|
1672
1672
|
E = document.getElementById(`farris-color-picker-panel-${f}`);
|
|
1673
1673
|
const m = E.className == "color-picker-panel";
|
|
1674
|
-
i.value || m || (g.value = !0, E.classList.toggle("disabled"), z(),
|
|
1674
|
+
i.value || m || (g.value = !0, E.classList.toggle("disabled"), z(), Y(n.value), w.stopPropagation());
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function L() {
|
|
1677
1677
|
E = document.getElementById(`farris-color-picker-panel-${f}`), E.className = "color-picker-panel disabled";
|
|
1678
1678
|
}
|
|
1679
1679
|
function re(w) {
|
|
@@ -1683,7 +1683,7 @@ const Wt = {
|
|
|
1683
1683
|
function Z(w) {
|
|
1684
1684
|
if (!M.classList.contains("disabled")) {
|
|
1685
1685
|
const m = J.length;
|
|
1686
|
-
b = (m + b + (w === "up" ? 1 : -1)) % m, y = J[b].type, ne(b),
|
|
1686
|
+
b = (m + b + (w === "up" ? 1 : -1)) % m, y = J[b].type, ne(b), Y(n.value);
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
return () => k("div", {
|
|
@@ -1694,25 +1694,25 @@ const Wt = {
|
|
|
1694
1694
|
disabled: i.value
|
|
1695
1695
|
}],
|
|
1696
1696
|
id: "farris-color-picker-panel",
|
|
1697
|
-
ref:
|
|
1697
|
+
ref: I,
|
|
1698
1698
|
onClick: (w) => w.stopPropagation(),
|
|
1699
1699
|
style: "top:30px"
|
|
1700
1700
|
}, [k("div", {
|
|
1701
1701
|
class: "color-picker-main"
|
|
1702
|
-
}, [k(
|
|
1702
|
+
}, [k(_e, {
|
|
1703
1703
|
hue: v.hue,
|
|
1704
1704
|
"onUpdate:hue": (w) => v.hue = w,
|
|
1705
1705
|
allowColorNull: u.value,
|
|
1706
1706
|
color: t.value,
|
|
1707
1707
|
"onUpdate:color": (w) => t.value = w
|
|
1708
|
-
}, null), k(
|
|
1708
|
+
}, null), k(Te, {
|
|
1709
1709
|
randomId: f,
|
|
1710
1710
|
hue: v.hue,
|
|
1711
1711
|
"onUpdate:hue": (w) => v.hue = w,
|
|
1712
1712
|
allowColorNull: u.value,
|
|
1713
1713
|
color: t.value,
|
|
1714
1714
|
"onUpdate:color": (w) => t.value = w
|
|
1715
|
-
}, null)]), k(
|
|
1715
|
+
}, null)]), k(et, {
|
|
1716
1716
|
style: C.value,
|
|
1717
1717
|
randomId: f,
|
|
1718
1718
|
allowColorNull: u.value,
|
|
@@ -1723,13 +1723,13 @@ const Wt = {
|
|
|
1723
1723
|
style: "display:flex;align-items: center;"
|
|
1724
1724
|
}, [W(k("span", {
|
|
1725
1725
|
style: "width:40px;margin-right:10px;"
|
|
1726
|
-
}, [d.value]), [[K,
|
|
1726
|
+
}, [d.value]), [[K, D]]), W(k("input", {
|
|
1727
1727
|
type: "text",
|
|
1728
1728
|
title: "color-picker-plus",
|
|
1729
1729
|
id: "farris-color-picker-plus-input",
|
|
1730
1730
|
"onUpdate:modelValue": (w) => O.value = w,
|
|
1731
1731
|
style: "float:none"
|
|
1732
|
-
}, null), [[
|
|
1732
|
+
}, null), [[Xe, O.value]]), W(k("div", {
|
|
1733
1733
|
class: "type-icon-btn-wrapper",
|
|
1734
1734
|
style: "cursor:pointer"
|
|
1735
1735
|
}, [k("span", {
|
|
@@ -1738,26 +1738,26 @@ const Wt = {
|
|
|
1738
1738
|
}, null), k("span", {
|
|
1739
1739
|
class: "f-icon f-icon-arrow-60-down type-icon-btn",
|
|
1740
1740
|
onClick: () => Z("down")
|
|
1741
|
-
}, null)]), [[K,
|
|
1741
|
+
}, null)]), [[K, D]]), k("div", {
|
|
1742
1742
|
class: "input-btn"
|
|
1743
1743
|
}, [k("button", {
|
|
1744
1744
|
id: "farris-color-picker-plus-sure",
|
|
1745
1745
|
class: "btn btn-secondary",
|
|
1746
1746
|
onClick: (w) => ge(w)
|
|
1747
|
-
}, [Re("确定")])])]), W(k(
|
|
1747
|
+
}, [Re("确定")])])]), W(k(tt, {
|
|
1748
1748
|
color: t.value,
|
|
1749
1749
|
"onUpdate:color": (w) => t.value = w,
|
|
1750
1750
|
hue: v.hue,
|
|
1751
1751
|
"onUpdate:hue": (w) => v.hue = w,
|
|
1752
1752
|
randomId: f,
|
|
1753
1753
|
colorPresets: v.presets
|
|
1754
|
-
}, null), [[K,
|
|
1754
|
+
}, null), [[K, V]])]), k("div", {
|
|
1755
1755
|
class: "color-picker-wrapper"
|
|
1756
1756
|
}, [k("input", {
|
|
1757
1757
|
title: "color-picker-input",
|
|
1758
1758
|
type: "text",
|
|
1759
1759
|
class: "color-picker-input form-control",
|
|
1760
|
-
value:
|
|
1760
|
+
value: x.value,
|
|
1761
1761
|
readonly: i.value,
|
|
1762
1762
|
onClick: (w) => w.stopPropagation()
|
|
1763
1763
|
}, null), k("div", {
|
|
@@ -1770,8 +1770,8 @@ const Wt = {
|
|
|
1770
1770
|
}, null)])])])]);
|
|
1771
1771
|
}
|
|
1772
1772
|
});
|
|
1773
|
-
function
|
|
1774
|
-
var
|
|
1773
|
+
function Zt(r, e, t) {
|
|
1774
|
+
var I;
|
|
1775
1775
|
function n() {
|
|
1776
1776
|
}
|
|
1777
1777
|
const i = "", l = "", u = S();
|
|
@@ -1792,12 +1792,12 @@ function Qt(r, e, t) {
|
|
|
1792
1792
|
return null;
|
|
1793
1793
|
if (H.value.schema && H.value.schema.type === "component")
|
|
1794
1794
|
return H.value;
|
|
1795
|
-
const O = S(H == null ? void 0 : H.value.parent),
|
|
1796
|
-
return
|
|
1795
|
+
const O = S(H == null ? void 0 : H.value.parent), x = d(O);
|
|
1796
|
+
return x || null;
|
|
1797
1797
|
}
|
|
1798
1798
|
function f(H = e) {
|
|
1799
|
-
const { componentInstance: O, designerItemElementRef:
|
|
1800
|
-
return !O || !O.value ? null : O.value.canMove ?
|
|
1799
|
+
const { componentInstance: O, designerItemElementRef: x } = H;
|
|
1800
|
+
return !O || !O.value ? null : O.value.canMove ? x : f(H.parent);
|
|
1801
1801
|
}
|
|
1802
1802
|
function b(H) {
|
|
1803
1803
|
return !!t;
|
|
@@ -1809,20 +1809,20 @@ function Qt(r, e, t) {
|
|
|
1809
1809
|
}
|
|
1810
1810
|
function $(H, O) {
|
|
1811
1811
|
}
|
|
1812
|
-
function E(H) {
|
|
1813
|
-
const { componentType:
|
|
1814
|
-
let V = ke(
|
|
1815
|
-
const
|
|
1816
|
-
return V && !V.id && V.type ===
|
|
1812
|
+
function E(H, O) {
|
|
1813
|
+
const { componentType: x } = H;
|
|
1814
|
+
let V = ke(x, H, O);
|
|
1815
|
+
const D = x.toLowerCase().replace("-", "_");
|
|
1816
|
+
return V && !V.id && V.type === x && (V.id = `${D}_${Math.random().toString().slice(2, 6)}`), V;
|
|
1817
1817
|
}
|
|
1818
1818
|
function M(H, O) {
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1821
|
-
let G = ke(
|
|
1822
|
-
const C =
|
|
1823
|
-
return G && !G.id && G.type ===
|
|
1819
|
+
const x = String(H.getAttribute("data-controltype")), V = H.getAttribute("data-feature"), D = V ? JSON.parse(V) : {};
|
|
1820
|
+
D.parentComponentInstance = u.value;
|
|
1821
|
+
let G = ke(x, D);
|
|
1822
|
+
const C = x.toLowerCase().replace("-", "_");
|
|
1823
|
+
return G && !G.id && G.type === x && (G.id = `${C}_${Math.random().toString().slice(2, 6)}`), G;
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function A(H) {
|
|
1826
1826
|
}
|
|
1827
1827
|
function N(...H) {
|
|
1828
1828
|
}
|
|
@@ -1833,7 +1833,7 @@ function Qt(r, e, t) {
|
|
|
1833
1833
|
canNested: !p(),
|
|
1834
1834
|
contents: e == null ? void 0 : e.schema.contents,
|
|
1835
1835
|
elementRef: r,
|
|
1836
|
-
parent: (
|
|
1836
|
+
parent: (I = e == null ? void 0 : e.parent) == null ? void 0 : I.componentInstance,
|
|
1837
1837
|
schema: e == null ? void 0 : e.schema,
|
|
1838
1838
|
styles: i,
|
|
1839
1839
|
designerClass: l,
|
|
@@ -1845,35 +1845,35 @@ function Qt(r, e, t) {
|
|
|
1845
1845
|
getDragScopeElement: v,
|
|
1846
1846
|
onAcceptMovedChildElement: $,
|
|
1847
1847
|
onAcceptNewChildElement: M,
|
|
1848
|
-
onChildElementMovedOut:
|
|
1848
|
+
onChildElementMovedOut: A,
|
|
1849
1849
|
addNewChildComponentSchema: E,
|
|
1850
1850
|
updateDragAndDropRules: n,
|
|
1851
1851
|
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
1852
1852
|
triggerBelongedComponentToDeleteWhenDeleted: S(!1)
|
|
1853
1853
|
}, u;
|
|
1854
1854
|
}
|
|
1855
|
-
const
|
|
1855
|
+
const Kt = /* @__PURE__ */ ee({
|
|
1856
1856
|
name: "FColorPickerDesign",
|
|
1857
1857
|
props: Ve,
|
|
1858
1858
|
emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
|
|
1859
1859
|
setup(r, e) {
|
|
1860
1860
|
const t = S(new P(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), d = S("HEX"), f = Math.floor(Math.random() * 1e3).toString();
|
|
1861
|
-
let b = -1, y, v = new
|
|
1861
|
+
let b = -1, y, v = new Ie("#000000");
|
|
1862
1862
|
const $ = S(r.color);
|
|
1863
1863
|
let E, M;
|
|
1864
|
-
const
|
|
1864
|
+
const A = S(null), N = S(null), I = S(), H = it("design-item-context"), O = Zt(I, H);
|
|
1865
1865
|
T(() => {
|
|
1866
|
-
|
|
1866
|
+
I.value.componentInstance = O;
|
|
1867
1867
|
}), e.expose(O.value);
|
|
1868
|
-
let
|
|
1869
|
-
const
|
|
1868
|
+
let x = U(() => !y && v && v.initType ? v.initType : y);
|
|
1869
|
+
const V = U({
|
|
1870
1870
|
get() {
|
|
1871
1871
|
return y && n.value !== null ? (Z(y), j(new P(n.value), R[y])) : n.value;
|
|
1872
1872
|
},
|
|
1873
1873
|
set(m) {
|
|
1874
|
-
m !== null && (
|
|
1874
|
+
m !== null && (L(m), Y(m));
|
|
1875
1875
|
}
|
|
1876
|
-
}),
|
|
1876
|
+
}), D = S(V.value), G = U(() => b > -1), C = U(() => c.value.length > 0), J = U(() => ({
|
|
1877
1877
|
"background-color": l.value
|
|
1878
1878
|
})), pe = U(() => h.value && g.value ? "display:flex" : "display:none"), z = [{
|
|
1879
1879
|
text: "HEX",
|
|
@@ -1887,8 +1887,8 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
1887
1887
|
m.id = `farris-color-picker-panel-${f}`;
|
|
1888
1888
|
const B = document.getElementById("farris-color-picker-plus-sure");
|
|
1889
1889
|
B.id = `farris-color-picker-plus-sure-${f}`;
|
|
1890
|
-
const
|
|
1891
|
-
|
|
1890
|
+
const F = document.getElementById("farris-color-picker-plus-input");
|
|
1891
|
+
F.id = `farris-color-picker-plus-input-${f}`, M = document.getElementById(`farris-color-picker-plus-sure-${f}`), E = document.getElementById(`farris-color-picker-panel-${f}`), E.className = "color-picker-panel disabled";
|
|
1892
1892
|
}
|
|
1893
1893
|
function ae() {
|
|
1894
1894
|
if (!u.value && !n.value) {
|
|
@@ -1898,10 +1898,10 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
1900
|
function fe() {
|
|
1901
|
-
n.value && (
|
|
1901
|
+
n.value && (L(n.value), !n.value && u.value || (n.value = j(new P(n.value), R[x.value])), D.value = V.value), Q(Z(v.initType));
|
|
1902
1902
|
}
|
|
1903
1903
|
function ne() {
|
|
1904
|
-
n.value &&
|
|
1904
|
+
n.value && L(n.value), v.hasPresets() || v.setColorPresets(c.value), n.value ? l.value = j(new P(n.value), R[x.value]) : !n.value && u.value && (l.value = null);
|
|
1905
1905
|
}
|
|
1906
1906
|
function ve() {
|
|
1907
1907
|
v.valueChanges.subscribe((m) => {
|
|
@@ -1916,18 +1916,18 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
1916
1916
|
var m;
|
|
1917
1917
|
h.value = !!(y != null && y.includes("a") || (m = v.initType) != null && m.includes("a"));
|
|
1918
1918
|
}
|
|
1919
|
-
|
|
1919
|
+
Ye(() => {
|
|
1920
1920
|
v.setColorPresets(c.value || ["#eaecf3"]);
|
|
1921
1921
|
}), T(() => {
|
|
1922
1922
|
de(), ae(), fe(), ne();
|
|
1923
|
-
}),
|
|
1924
|
-
ve(),
|
|
1925
|
-
}),
|
|
1926
|
-
j(v.value, v.initType) !== m && m !== null &&
|
|
1927
|
-
}),
|
|
1928
|
-
n.value = j(m, R[y || v.initType]),
|
|
1923
|
+
}), q(d, () => {
|
|
1924
|
+
ve(), V.value = j(new P(n.value), R[y || v.initType]), t.value = new P(V.value), ge();
|
|
1925
|
+
}), q(n, (m) => {
|
|
1926
|
+
j(v.value, v.initType) !== m && m !== null && L(m), Q(Z(v.initType));
|
|
1927
|
+
}), q(t, (m) => {
|
|
1928
|
+
n.value = j(m, R[y || v.initType]), L(n.value), V.value = n.value;
|
|
1929
1929
|
});
|
|
1930
|
-
function
|
|
1930
|
+
function Y(m) {
|
|
1931
1931
|
const B = document.getElementById(`farris-color-picker-plus-input-${f}`);
|
|
1932
1932
|
(m == "" || m == null || m == null) && !u.value ? (n.value = null, B.style.borderColor = "red", M.className = "btn btn-secondary disabled") : (B.style.borderColor = "#dcdfe6", M.className = "btn btn-secondary");
|
|
1933
1933
|
}
|
|
@@ -1935,39 +1935,39 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
1935
1935
|
var m, B;
|
|
1936
1936
|
if (u.value) {
|
|
1937
1937
|
l.value = (n == null ? void 0 : n.value) ?? null;
|
|
1938
|
-
const
|
|
1938
|
+
const F = {
|
|
1939
1939
|
elementValue: l
|
|
1940
1940
|
};
|
|
1941
|
-
e.emit("valueChanged",
|
|
1941
|
+
e.emit("valueChanged", F), E.classList.toggle("disabled");
|
|
1942
1942
|
}
|
|
1943
|
-
if (!u.value && !(
|
|
1944
|
-
(B = (m =
|
|
1945
|
-
const
|
|
1943
|
+
if (!u.value && !(V.value == null || V.value == null || V.value == "")) {
|
|
1944
|
+
(B = (m = A.value) == null ? void 0 : m.style) == null || B.setProperty("background", n.value), p.value = !0, l.value = n.value;
|
|
1945
|
+
const F = {
|
|
1946
1946
|
elementValue: l
|
|
1947
1947
|
};
|
|
1948
|
-
e.emit("valueChanged",
|
|
1948
|
+
e.emit("valueChanged", F), E.classList.toggle("disabled");
|
|
1949
1949
|
}
|
|
1950
|
-
!$.value && !n.value && !p.value && u && E.classList.toggle("disabled"),
|
|
1950
|
+
!$.value && !n.value && !p.value && u && E.classList.toggle("disabled"), Y(n.value), V.value = n.value, M.classList.contains("disabled") || (D.value = n.value, g.value = !1);
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function L(m) {
|
|
1953
1953
|
v == null || v.setValueFrom(m, f, u.value);
|
|
1954
1954
|
}
|
|
1955
1955
|
function re(m) {
|
|
1956
|
-
i.value || (g.value = !0, E.classList.toggle("disabled"), ae(),
|
|
1956
|
+
i.value || (g.value = !0, E.classList.toggle("disabled"), ae(), L(n.value));
|
|
1957
1957
|
}
|
|
1958
1958
|
function Z(m) {
|
|
1959
|
-
const B = z.findIndex((
|
|
1959
|
+
const B = z.findIndex((F) => F.type === m);
|
|
1960
1960
|
return b = B, B;
|
|
1961
1961
|
}
|
|
1962
1962
|
function w(m) {
|
|
1963
1963
|
if (!M.classList.contains("disabled")) {
|
|
1964
1964
|
const B = z.length;
|
|
1965
|
-
b = (B + b + (m === "up" ? 1 : -1)) % B, y = z[b].type, Q(b),
|
|
1965
|
+
b = (B + b + (m === "up" ? 1 : -1)) % B, y = z[b].type, Q(b), L(n.value);
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
return () => k("div", {
|
|
1969
1969
|
class: "f-color-picker-component",
|
|
1970
|
-
ref:
|
|
1970
|
+
ref: I
|
|
1971
1971
|
}, [k("div", {
|
|
1972
1972
|
class: ["color-picker-panel", {
|
|
1973
1973
|
disabled: i.value
|
|
@@ -1978,20 +1978,20 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
1978
1978
|
style: "top:30px"
|
|
1979
1979
|
}, [k("div", {
|
|
1980
1980
|
class: "color-picker-main"
|
|
1981
|
-
}, [k(
|
|
1981
|
+
}, [k(_e, {
|
|
1982
1982
|
hue: v.hue,
|
|
1983
1983
|
"onUpdate:hue": (m) => v.hue = m,
|
|
1984
1984
|
allowColorNull: u.value,
|
|
1985
1985
|
color: t.value,
|
|
1986
1986
|
"onUpdate:color": (m) => t.value = m
|
|
1987
|
-
}, null), k(
|
|
1987
|
+
}, null), k(Te, {
|
|
1988
1988
|
randomId: f,
|
|
1989
1989
|
hue: v.hue,
|
|
1990
1990
|
"onUpdate:hue": (m) => v.hue = m,
|
|
1991
1991
|
allowColorNull: u.value,
|
|
1992
1992
|
color: t.value,
|
|
1993
1993
|
"onUpdate:color": (m) => t.value = m
|
|
1994
|
-
}, null)]), k(
|
|
1994
|
+
}, null)]), k(et, {
|
|
1995
1995
|
style: pe.value,
|
|
1996
1996
|
randomId: f,
|
|
1997
1997
|
allowColorNull: u.value,
|
|
@@ -2005,9 +2005,9 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
2005
2005
|
}, [d.value]), [[K, C]]), W(k("input", {
|
|
2006
2006
|
type: "text",
|
|
2007
2007
|
id: "farris-color-picker-plus-input",
|
|
2008
|
-
"onUpdate:modelValue": (m) =>
|
|
2008
|
+
"onUpdate:modelValue": (m) => V.value = m,
|
|
2009
2009
|
style: "float:none"
|
|
2010
|
-
}, null), [[
|
|
2010
|
+
}, null), [[Xe, V.value]]), W(k("div", {
|
|
2011
2011
|
class: "type-icon-btn-wrapper",
|
|
2012
2012
|
style: "cursor:pointer"
|
|
2013
2013
|
}, [k("span", {
|
|
@@ -2022,7 +2022,7 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
2022
2022
|
id: "farris-color-picker-plus-sure",
|
|
2023
2023
|
class: "btn btn-secondary",
|
|
2024
2024
|
onClick: ye
|
|
2025
|
-
}, [Re("确定")])])]), W(k(
|
|
2025
|
+
}, [Re("确定")])])]), W(k(tt, {
|
|
2026
2026
|
color: t.value,
|
|
2027
2027
|
"onUpdate:color": (m) => t.value = m,
|
|
2028
2028
|
colorPresets: v.presets,
|
|
@@ -2034,7 +2034,7 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
2034
2034
|
}, [k("input", {
|
|
2035
2035
|
type: "text",
|
|
2036
2036
|
class: "color-picker-input form-control",
|
|
2037
|
-
value:
|
|
2037
|
+
value: D.value,
|
|
2038
2038
|
readonly: i.value,
|
|
2039
2039
|
onClick: (m) => m.stopPropagation()
|
|
2040
2040
|
}, null), k("div", {
|
|
@@ -2046,20 +2046,20 @@ const Zt = /* @__PURE__ */ ee({
|
|
|
2046
2046
|
style: J.value
|
|
2047
2047
|
}, null)])])])]);
|
|
2048
2048
|
}
|
|
2049
|
-
}),
|
|
2049
|
+
}), Tt = (r) => {
|
|
2050
2050
|
const e = r;
|
|
2051
2051
|
return e.install = function(t) {
|
|
2052
2052
|
t.component(e.name, r);
|
|
2053
2053
|
}, r;
|
|
2054
2054
|
};
|
|
2055
2055
|
le.register = (r, e, t) => {
|
|
2056
|
-
r["color-picker"] = le, e["color-picker"] =
|
|
2056
|
+
r["color-picker"] = le, e["color-picker"] = ze;
|
|
2057
2057
|
};
|
|
2058
2058
|
le.registerDesigner = (r, e, t) => {
|
|
2059
|
-
r["color-picker"] =
|
|
2059
|
+
r["color-picker"] = Kt, e["color-picker"] = ze;
|
|
2060
2060
|
};
|
|
2061
|
-
const
|
|
2061
|
+
const nn = Tt(le);
|
|
2062
2062
|
export {
|
|
2063
2063
|
le as FColorPicker,
|
|
2064
|
-
|
|
2064
|
+
nn as default
|
|
2065
2065
|
};
|