@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,105 +1,105 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as C, ref as D, watch as T, createVNode as b, Fragment as O } from "vue";
|
|
2
|
+
import { isPlainObject as j, cloneDeep as V } from "lodash-es";
|
|
3
|
+
const $ = {}, w = {};
|
|
4
4
|
function x(t) {
|
|
5
|
-
const { properties: e, title: u } = t,
|
|
6
|
-
return
|
|
5
|
+
const { properties: e, title: u, ignore: r } = t, o = r && Array.isArray(r), i = Object.keys(e).reduce((l, p) => ((!o || !r.find((g) => g == p)) && (l[p] = e[p].type === "object" && e[p].properties ? x(e[p]) : V(e[p].default)), l), {});
|
|
6
|
+
return (!o || !r.find((l) => l == "id")) && (i.id = `${u}-${Date.now()}`), i;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function M(t, e) {
|
|
9
9
|
const u = x(e);
|
|
10
|
-
return Object.keys(t).reduce((
|
|
10
|
+
return Object.keys(t).reduce((r, o) => (r[o] && j(r[o]) && j(t[o]) ? Object.assign(r[o], t[o]) : r[o] = t[o], r), u), u;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return Object.keys(t).filter((
|
|
14
|
-
if (e.has(
|
|
15
|
-
const
|
|
16
|
-
if (typeof
|
|
17
|
-
|
|
12
|
+
function B(t, e) {
|
|
13
|
+
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
14
|
+
if (e.has(o)) {
|
|
15
|
+
const i = e.get(o);
|
|
16
|
+
if (typeof i == "string")
|
|
17
|
+
r[i] = t[o];
|
|
18
18
|
else {
|
|
19
|
-
const l = o
|
|
20
|
-
Object.assign(
|
|
19
|
+
const l = i(o, t[o], t);
|
|
20
|
+
Object.assign(r, l);
|
|
21
21
|
}
|
|
22
22
|
} else
|
|
23
|
-
|
|
24
|
-
return
|
|
23
|
+
r[o] = t[o];
|
|
24
|
+
return r;
|
|
25
25
|
}, {});
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
return
|
|
27
|
+
function N(t, e, u = /* @__PURE__ */ new Map()) {
|
|
28
|
+
const r = M(t, e);
|
|
29
|
+
return B(r, u);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
function e(n,
|
|
31
|
+
function A(t = {}) {
|
|
32
|
+
function e(n, s, a, c) {
|
|
33
33
|
if (typeof a == "number")
|
|
34
34
|
return c[n].length === a;
|
|
35
35
|
if (typeof a == "object") {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
36
|
+
const f = Object.keys(a)[0], d = a[f];
|
|
37
|
+
if (f === "not")
|
|
38
38
|
return Number(c[n].length) !== Number(d);
|
|
39
|
-
if (
|
|
39
|
+
if (f === "moreThan")
|
|
40
40
|
return Number(c[n].length) >= Number(d);
|
|
41
|
-
if (
|
|
41
|
+
if (f === "lessThan")
|
|
42
42
|
return Number(c[n].length) <= Number(d);
|
|
43
43
|
}
|
|
44
44
|
return !1;
|
|
45
45
|
}
|
|
46
|
-
function u(n,
|
|
46
|
+
function u(n, s, a, c) {
|
|
47
47
|
return c[n] && c[n].propertyValue && String(c[n].propertyValue.value) === String(a);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const r = /* @__PURE__ */ new Map([
|
|
50
50
|
["length", e],
|
|
51
51
|
["getProperty", u]
|
|
52
52
|
]);
|
|
53
|
-
Object.keys(t).reduce((n,
|
|
54
|
-
function
|
|
53
|
+
Object.keys(t).reduce((n, s) => (n.set(s, t[s]), n), r);
|
|
54
|
+
function o(n, s) {
|
|
55
55
|
const a = n;
|
|
56
|
-
return typeof
|
|
56
|
+
return typeof s == "number" ? [{ target: a, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: a, operator: "getProperty", param: n, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
|
|
57
57
|
if (c === "length")
|
|
58
|
-
return { target: a, operator: "length", param: null, value:
|
|
59
|
-
const
|
|
60
|
-
return { target: a, operator: "getProperty", param:
|
|
58
|
+
return { target: a, operator: "length", param: null, value: s[c] };
|
|
59
|
+
const f = c, d = s[c];
|
|
60
|
+
return { target: a, operator: "getProperty", param: f, value: d };
|
|
61
61
|
}) : [];
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function i(n) {
|
|
64
64
|
return Object.keys(n).reduce((a, c) => {
|
|
65
|
-
const
|
|
66
|
-
return a.push(...
|
|
65
|
+
const f = o(c, n[c]);
|
|
66
|
+
return a.push(...f), a;
|
|
67
67
|
}, []);
|
|
68
68
|
}
|
|
69
|
-
function l(n,
|
|
70
|
-
if (
|
|
71
|
-
const a =
|
|
72
|
-
return a && a(n.target, n.param, n.value,
|
|
69
|
+
function l(n, s) {
|
|
70
|
+
if (r.has(n.operator)) {
|
|
71
|
+
const a = r.get(n.operator);
|
|
72
|
+
return a && a(n.target, n.param, n.value, s) || !1;
|
|
73
73
|
}
|
|
74
74
|
return !1;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
76
|
+
function p(n, s) {
|
|
77
|
+
return i(n).reduce((f, d) => f && l(d, s), !0);
|
|
78
78
|
}
|
|
79
|
-
function g(n,
|
|
80
|
-
const a = Object.keys(n), c = a.includes("allOf"),
|
|
79
|
+
function g(n, s) {
|
|
80
|
+
const a = Object.keys(n), c = a.includes("allOf"), f = a.includes("anyOf"), d = c || f, h = (d ? n[d ? c ? "allOf" : "anyOf" : "allOf"] : [n]).map((v) => p(v, s));
|
|
81
81
|
return c ? !h.includes(!1) : h.includes(!0);
|
|
82
82
|
}
|
|
83
83
|
return { parseValueSchema: g };
|
|
84
84
|
}
|
|
85
|
-
const F = {},
|
|
86
|
-
|
|
87
|
-
function
|
|
88
|
-
return
|
|
89
|
-
const
|
|
90
|
-
return Object.assign(g,
|
|
85
|
+
const F = {}, P = {};
|
|
86
|
+
A();
|
|
87
|
+
function k(t, e, u = /* @__PURE__ */ new Map(), r = (l, p, g) => p, o = {}, i = (l) => l) {
|
|
88
|
+
return $[e.title] = e, w[e.title] = r, F[e.title] = o, P[e.title] = i, (l = {}) => {
|
|
89
|
+
const p = N(l, e, u), g = Object.keys(t).reduce((n, s) => (n[s] = t[s].default, n), {});
|
|
90
|
+
return Object.assign(g, p);
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function q(t, e) {
|
|
94
94
|
return { customClass: e.class, customStyle: e.style };
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
["appearance",
|
|
96
|
+
const L = /* @__PURE__ */ new Map([
|
|
97
|
+
["appearance", q]
|
|
98
98
|
]);
|
|
99
|
-
function
|
|
99
|
+
function I(t, e, u) {
|
|
100
100
|
return e;
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const S = "https://json-schema.org/draft/2020-12/schema", z = "https://farris-design.gitee.io/radio-button.schema.json", G = "radio-button", H = "A Farris Component", J = "object", Q = {
|
|
103
103
|
id: {
|
|
104
104
|
description: "The unique identifier for radio-button",
|
|
105
105
|
type: "string"
|
|
@@ -161,18 +161,18 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
|
|
|
161
161
|
type: "boolean",
|
|
162
162
|
default: !0
|
|
163
163
|
}
|
|
164
|
-
},
|
|
164
|
+
}, U = [
|
|
165
165
|
"id",
|
|
166
166
|
"type"
|
|
167
|
-
],
|
|
168
|
-
$schema:
|
|
169
|
-
$id:
|
|
170
|
-
title:
|
|
171
|
-
description:
|
|
172
|
-
type:
|
|
173
|
-
properties:
|
|
174
|
-
required:
|
|
175
|
-
},
|
|
167
|
+
], W = {
|
|
168
|
+
$schema: S,
|
|
169
|
+
$id: z,
|
|
170
|
+
title: G,
|
|
171
|
+
description: H,
|
|
172
|
+
type: J,
|
|
173
|
+
properties: Q,
|
|
174
|
+
required: U
|
|
175
|
+
}, X = "radio-button", Y = "A Farris Component", Z = "object", _ = {
|
|
176
176
|
basic: {
|
|
177
177
|
description: "Basic Infomation",
|
|
178
178
|
title: "基本信息",
|
|
@@ -194,12 +194,12 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
},
|
|
198
|
-
title:
|
|
199
|
-
description:
|
|
200
|
-
type:
|
|
201
|
-
categories:
|
|
202
|
-
},
|
|
197
|
+
}, K = {
|
|
198
|
+
title: X,
|
|
199
|
+
description: Y,
|
|
200
|
+
type: Z,
|
|
201
|
+
categories: _
|
|
202
|
+
}, m = {
|
|
203
203
|
/**
|
|
204
204
|
* 单选组枚举数组
|
|
205
205
|
*/
|
|
@@ -213,60 +213,60 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
|
|
|
213
213
|
*/
|
|
214
214
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
215
215
|
} }
|
|
216
|
-
},
|
|
216
|
+
}, E = k(m, W, L, I, K), y = /* @__PURE__ */ C({
|
|
217
217
|
name: "FRadioButton",
|
|
218
|
-
props:
|
|
218
|
+
props: m,
|
|
219
219
|
emits: ["selectedValueChanged"],
|
|
220
220
|
setup(t, e) {
|
|
221
|
-
const u =
|
|
222
|
-
function
|
|
223
|
-
if (
|
|
221
|
+
const u = D(t.enumData);
|
|
222
|
+
function r(i, l) {
|
|
223
|
+
if (i.currentTarget.classList.value = "btn btn-secondary active", i.currentTarget.tagName.toLowerCase() === "label") {
|
|
224
224
|
const {
|
|
225
|
-
currentTarget:
|
|
226
|
-
} =
|
|
227
|
-
Array.from(g.querySelectorAll("label")).filter((
|
|
225
|
+
currentTarget: p
|
|
226
|
+
} = i, g = p.parentElement;
|
|
227
|
+
Array.from(g.querySelectorAll("label")).filter((s) => s !== p).forEach((s) => s.classList.remove("active"));
|
|
228
228
|
}
|
|
229
229
|
e.emit("selectedValueChanged", l);
|
|
230
230
|
}
|
|
231
|
-
function i
|
|
232
|
-
return `${
|
|
231
|
+
function o(i) {
|
|
232
|
+
return `${i.text}${t.suffixValue}`;
|
|
233
233
|
}
|
|
234
|
-
return
|
|
235
|
-
|
|
234
|
+
return T(() => t.enumData, (i, l) => {
|
|
235
|
+
i !== l && (u.value = t.enumData);
|
|
236
236
|
}), () => b("div", {
|
|
237
237
|
class: "f-radio-button"
|
|
238
238
|
}, [b("div", {
|
|
239
239
|
class: ["farris-input-wrap"]
|
|
240
|
-
}, [u.value.map((
|
|
241
|
-
class:
|
|
242
|
-
onClick: (
|
|
240
|
+
}, [u.value.map((i, l) => b(O, null, [b("label", {
|
|
241
|
+
class: i.active ? "btn btn-secondary active" : "btn btn-secondary",
|
|
242
|
+
onClick: (p) => r(p, i)
|
|
243
243
|
}, [b("span", {
|
|
244
244
|
class: "f-radio-button-text"
|
|
245
|
-
}, [i
|
|
245
|
+
}, [o(i)])])]))])]);
|
|
246
246
|
}
|
|
247
|
-
}),
|
|
247
|
+
}), tt = /* @__PURE__ */ C({
|
|
248
248
|
name: "FRadioButtonDesign",
|
|
249
|
-
props:
|
|
249
|
+
props: m,
|
|
250
250
|
emits: [""],
|
|
251
251
|
setup(t, e) {
|
|
252
|
-
return () => b(
|
|
252
|
+
return () => b(O, null, null);
|
|
253
253
|
}
|
|
254
|
-
}),
|
|
254
|
+
}), et = (t) => {
|
|
255
255
|
const e = t;
|
|
256
256
|
return e.install = function(u) {
|
|
257
257
|
u.component(e.name, t);
|
|
258
258
|
}, t;
|
|
259
259
|
};
|
|
260
|
-
|
|
261
|
-
t["radio-button"] =
|
|
260
|
+
y.register = (t, e, u, r) => {
|
|
261
|
+
t["radio-button"] = y, e["radio-button"] = E;
|
|
262
262
|
};
|
|
263
|
-
|
|
264
|
-
t["radio-button"] =
|
|
263
|
+
y.registerDesigner = (t, e, u) => {
|
|
264
|
+
t["radio-button"] = tt, e["radio-button"] = E;
|
|
265
265
|
};
|
|
266
|
-
const
|
|
266
|
+
const it = et(y);
|
|
267
267
|
export {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
268
|
+
y as RadioButton,
|
|
269
|
+
it as default,
|
|
270
|
+
E as propsResolver,
|
|
271
|
+
m as radioButtonProps
|
|
272
272
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(g,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],d):(g=typeof globalThis<"u"?globalThis:g||self,d(g["radio-button"]={},g.Vue,g.LodashES))})(this,function(g,d,j){"use strict";const $={},N={};function V(e){const{properties:t,title:u,ignore:r}=e,s=r&&Array.isArray(r),i=Object.keys(t).reduce((l,p)=>((!s||!r.find(y=>y==p))&&(l[p]=t[p].type==="object"&&t[p].properties?V(t[p]):j.cloneDeep(t[p].default)),l),{});return(!s||!r.find(l=>l=="id"))&&(i.id=`${u}-${Date.now()}`),i}function R(e,t){const u=V(t);return Object.keys(e).reduce((r,s)=>(r[s]&&j.isPlainObject(r[s])&&j.isPlainObject(e[s])?Object.assign(r[s],e[s]):r[s]=e[s],r),u),u}function T(e,t){return Object.keys(e).filter(r=>e[r]!=null).reduce((r,s)=>{if(t.has(s)){const i=t.get(s);if(typeof i=="string")r[i]=e[s];else{const l=i(s,e[s],e);Object.assign(r,l)}}else r[s]=e[s];return r},{})}function x(e,t,u=new Map){const r=R(e,t);return T(r,u)}function M(e={}){function t(n,o,a,c){if(typeof a=="number")return c[n].length===a;if(typeof a=="object"){const f=Object.keys(a)[0],b=a[f];if(f==="not")return Number(c[n].length)!==Number(b);if(f==="moreThan")return Number(c[n].length)>=Number(b);if(f==="lessThan")return Number(c[n].length)<=Number(b)}return!1}function u(n,o,a,c){return c[n]&&c[n].propertyValue&&String(c[n].propertyValue.value)===String(a)}const r=new Map([["length",t],["getProperty",u]]);Object.keys(e).reduce((n,o)=>(n.set(o,e[o]),n),r);function s(n,o){const a=n;return typeof o=="number"?[{target:a,operator:"length",param:null,value:Number(o)}]:typeof o=="boolean"?[{target:a,operator:"getProperty",param:n,value:!!o}]:typeof o=="object"?Object.keys(o).map(c=>{if(c==="length")return{target:a,operator:"length",param:null,value:o[c]};const f=c,b=o[c];return{target:a,operator:"getProperty",param:f,value:b}}):[]}function i(n){return Object.keys(n).reduce((a,c)=>{const f=s(c,n[c]);return a.push(...f),a},[])}function l(n,o){if(r.has(n.operator)){const a=r.get(n.operator);return a&&a(n.target,n.param,n.value,o)||!1}return!1}function p(n,o){return i(n).reduce((f,b)=>f&&l(b,o),!0)}function y(n,o){const a=Object.keys(n),c=a.includes("allOf"),f=a.includes("anyOf"),b=c||f,C=(b?n[b?c?"allOf":"anyOf":"allOf"]:[n]).map(S=>p(S,o));return c?!C.includes(!1):C.includes(!0)}return{parseValueSchema:y}}const B={},D={};M();function E(e,t,u=new Map,r=(l,p,y)=>p,s={},i=l=>l){return $[t.title]=t,N[t.title]=r,B[t.title]=s,D[t.title]=i,(l={})=>{const p=x(l,t,u),y=Object.keys(e).reduce((n,o)=>(n[o]=e[o].default,n),{});return Object.assign(y,p)}}function P(e,t){return{customClass:t.class,customStyle:t.style}}const w=new Map([["appearance",P]]);function F(e,t,u){return t}const q={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-button.schema.json",title:"radio-button",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for radio-button",type:"string"},type:{description:"The type string of radio-button",type:"string",default:"radio-button"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},A={title:"radio-button",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},h={enumData:{type:Array,default:[{text:"1",active:!0}]},suffixValue:{type:String,default:""},onSelectedValueChanged:{type:Function,default:()=>{}}},O=E(h,q,w,F,A),m=d.defineComponent({name:"FRadioButton",props:h,emits:["selectedValueChanged"],setup(e,t){const u=d.ref(e.enumData);function r(i,l){if(i.currentTarget.classList.value="btn btn-secondary active",i.currentTarget.tagName.toLowerCase()==="label"){const{currentTarget:p}=i,y=p.parentElement;Array.from(y.querySelectorAll("label")).filter(o=>o!==p).forEach(o=>o.classList.remove("active"))}t.emit("selectedValueChanged",l)}function s(i){return`${i.text}${e.suffixValue}`}return d.watch(()=>e.enumData,(i,l)=>{i!==l&&(u.value=e.enumData)}),()=>d.createVNode("div",{class:"f-radio-button"},[d.createVNode("div",{class:["farris-input-wrap"]},[u.value.map((i,l)=>d.createVNode(d.Fragment,null,[d.createVNode("label",{class:i.active?"btn btn-secondary active":"btn btn-secondary",onClick:p=>r(p,i)},[d.createVNode("span",{class:"f-radio-button-text"},[s(i)])])]))])])}}),k=d.defineComponent({name:"FRadioButtonDesign",props:h,emits:[""],setup(e,t){return()=>d.createVNode(d.Fragment,null,null)}}),L=e=>{const t=e;return t.install=function(u){u.component(t.name,e)},e};m.register=(e,t,u,r)=>{e["radio-button"]=m,t["radio-button"]=O},m.registerDesigner=(e,t,u)=>{e["radio-button"]=k,t["radio-button"]=O};const v=L(m);g.RadioButton=m,g.default=v,g.propsResolver=O,g.radioButtonProps=h,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|