@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { CHECKBOX_CONTEXT as X, useCheck as
|
|
7
|
-
import { DgControl as
|
|
8
|
-
const
|
|
2
|
+
var re = (n, t, e) => t in n ? ie(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var k = (n, t, e) => re(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as D, inject as I, ref as M, computed as x, watch as A, onMounted as N, createVNode as F, Fragment as ae, provide as le } from "vue";
|
|
5
|
+
import { isPlainObject as j, cloneDeep as z } from "lodash-es";
|
|
6
|
+
import { CHECKBOX_CONTEXT as X, useCheck as se } from "../common/index.esm.js";
|
|
7
|
+
import { DgControl as O } from "../designer-canvas/index.esm.js";
|
|
8
|
+
const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/check-box.schema.json", de = "check-box", pe = "A Farris Input Component", me = "object", fe = {
|
|
9
9
|
id: {
|
|
10
10
|
description: "The unique identifier for a check box",
|
|
11
11
|
type: "string"
|
|
@@ -62,11 +62,6 @@ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
62
62
|
type: "boolean",
|
|
63
63
|
default: !1
|
|
64
64
|
},
|
|
65
|
-
require: {
|
|
66
|
-
description: "",
|
|
67
|
-
type: "boolean",
|
|
68
|
-
default: !1
|
|
69
|
-
},
|
|
70
65
|
tabindex: {
|
|
71
66
|
description: "",
|
|
72
67
|
type: "number",
|
|
@@ -80,111 +75,116 @@ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
80
75
|
}, ye = [
|
|
81
76
|
"id",
|
|
82
77
|
"type"
|
|
83
|
-
],
|
|
78
|
+
], he = [
|
|
84
79
|
"id",
|
|
85
80
|
"appearance",
|
|
86
|
-
"binding"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
$
|
|
81
|
+
"binding",
|
|
82
|
+
"visible"
|
|
83
|
+
], ge = {
|
|
84
|
+
$schema: ce,
|
|
85
|
+
$id: ue,
|
|
90
86
|
title: de,
|
|
91
|
-
description:
|
|
92
|
-
type:
|
|
93
|
-
properties:
|
|
87
|
+
description: pe,
|
|
88
|
+
type: me,
|
|
89
|
+
properties: fe,
|
|
94
90
|
required: ye,
|
|
95
|
-
ignore:
|
|
91
|
+
ignore: he
|
|
96
92
|
}, _ = {}, H = {};
|
|
97
|
-
function U(
|
|
98
|
-
const { properties: t, title: e, ignore:
|
|
99
|
-
|
|
93
|
+
function U(n) {
|
|
94
|
+
const { properties: t, title: e, ignore: i } = n, r = i && Array.isArray(i), a = Object.keys(t).reduce((u, y) => ((!r || !i.find((h) => h === y)) && (u[y] = t[y].type === "object" && t[y].properties ? U(t[y]) : z(t[y].default)), u), {});
|
|
95
|
+
if (e && (!r || !i.find((u) => u === "id"))) {
|
|
96
|
+
const u = e.toLowerCase().replace(/-/g, "_");
|
|
97
|
+
a.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
98
|
+
}
|
|
99
|
+
return a;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
let
|
|
105
|
-
const
|
|
106
|
-
return
|
|
101
|
+
function Q(n, t = {}, e) {
|
|
102
|
+
const i = _[n];
|
|
103
|
+
if (i) {
|
|
104
|
+
let r = U(i);
|
|
105
|
+
const a = H[n];
|
|
106
|
+
return r = a ? a({ getSchemaByType: Q }, r, t, e) : r, r;
|
|
107
107
|
}
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function be(n, t) {
|
|
111
111
|
const e = U(t);
|
|
112
|
-
return Object.keys(
|
|
112
|
+
return Object.keys(e).reduce((i, r) => (i[r] && j(i[r]) && j(n[r] || !n[r]) ? Object.assign(i[r], n[r] || {}) : i[r] = n[r], i), e), e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return Object.keys(
|
|
116
|
-
if (t.has(
|
|
117
|
-
const
|
|
118
|
-
if (typeof
|
|
119
|
-
|
|
114
|
+
function ve(n, t) {
|
|
115
|
+
return Object.keys(n).filter((i) => n[i] != null).reduce((i, r) => {
|
|
116
|
+
if (t.has(r)) {
|
|
117
|
+
const a = t.get(r);
|
|
118
|
+
if (typeof a == "string")
|
|
119
|
+
i[a] = n[r];
|
|
120
120
|
else {
|
|
121
|
-
const
|
|
122
|
-
Object.assign(
|
|
121
|
+
const u = a(r, n[r], n);
|
|
122
|
+
Object.assign(i, u);
|
|
123
123
|
}
|
|
124
124
|
} else
|
|
125
|
-
r
|
|
126
|
-
return
|
|
125
|
+
i[r] = n[r];
|
|
126
|
+
return i;
|
|
127
127
|
}, {});
|
|
128
128
|
}
|
|
129
|
-
function ke(
|
|
130
|
-
const
|
|
131
|
-
return
|
|
129
|
+
function ke(n, t, e = /* @__PURE__ */ new Map()) {
|
|
130
|
+
const i = be(n, t);
|
|
131
|
+
return ve(i, e);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
function t(
|
|
135
|
-
if (typeof
|
|
136
|
-
return
|
|
137
|
-
if (typeof
|
|
138
|
-
const s = Object.keys(
|
|
133
|
+
function Ce(n = {}) {
|
|
134
|
+
function t(l, p, o, d) {
|
|
135
|
+
if (typeof o == "number")
|
|
136
|
+
return d[l].length === o;
|
|
137
|
+
if (typeof o == "object") {
|
|
138
|
+
const s = Object.keys(o)[0], c = o[s];
|
|
139
139
|
if (s === "not")
|
|
140
|
-
return Number(
|
|
140
|
+
return Number(d[l].length) !== Number(c);
|
|
141
141
|
if (s === "moreThan")
|
|
142
|
-
return Number(
|
|
142
|
+
return Number(d[l].length) >= Number(c);
|
|
143
143
|
if (s === "lessThan")
|
|
144
|
-
return Number(
|
|
144
|
+
return Number(d[l].length) <= Number(c);
|
|
145
145
|
}
|
|
146
146
|
return !1;
|
|
147
147
|
}
|
|
148
|
-
function e(
|
|
149
|
-
return
|
|
148
|
+
function e(l, p, o, d) {
|
|
149
|
+
return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(o);
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const i = /* @__PURE__ */ new Map([
|
|
152
152
|
["length", t],
|
|
153
153
|
["getProperty", e]
|
|
154
154
|
]);
|
|
155
|
-
Object.keys(
|
|
156
|
-
function
|
|
157
|
-
const
|
|
158
|
-
return typeof
|
|
159
|
-
if (
|
|
160
|
-
return { target:
|
|
161
|
-
const s =
|
|
162
|
-
return { target:
|
|
155
|
+
Object.keys(n).reduce((l, p) => (l.set(p, n[p]), l), i);
|
|
156
|
+
function r(l, p) {
|
|
157
|
+
const o = l;
|
|
158
|
+
return typeof p == "number" ? [{ target: o, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: o, operator: "getProperty", param: l, value: !!p }] : typeof p == "object" ? Object.keys(p).map((d) => {
|
|
159
|
+
if (d === "length")
|
|
160
|
+
return { target: o, operator: "length", param: null, value: p[d] };
|
|
161
|
+
const s = d, c = p[d];
|
|
162
|
+
return { target: o, operator: "getProperty", param: s, value: c };
|
|
163
163
|
}) : [];
|
|
164
164
|
}
|
|
165
|
-
function l
|
|
166
|
-
return Object.keys(
|
|
167
|
-
const s =
|
|
168
|
-
return
|
|
165
|
+
function a(l) {
|
|
166
|
+
return Object.keys(l).reduce((o, d) => {
|
|
167
|
+
const s = r(d, l[d]);
|
|
168
|
+
return o.push(...s), o;
|
|
169
169
|
}, []);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
return
|
|
171
|
+
function u(l, p) {
|
|
172
|
+
if (i.has(l.operator)) {
|
|
173
|
+
const o = i.get(l.operator);
|
|
174
|
+
return o && o(l.target, l.param, l.value, p) || !1;
|
|
175
175
|
}
|
|
176
176
|
return !1;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return l
|
|
178
|
+
function y(l, p) {
|
|
179
|
+
return a(l).reduce((s, c) => s && u(c, p), !0);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
const
|
|
183
|
-
return
|
|
181
|
+
function h(l, p) {
|
|
182
|
+
const o = Object.keys(l), d = o.includes("allOf"), s = o.includes("anyOf"), c = d || s, g = (c ? l[c ? d ? "allOf" : "anyOf" : "allOf"] : [l]).map((w) => y(w, p));
|
|
183
|
+
return d ? !g.includes(!1) : g.includes(!0);
|
|
184
184
|
}
|
|
185
|
-
return { parseValueSchema:
|
|
185
|
+
return { parseValueSchema: h };
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const m = {
|
|
188
188
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
189
189
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
190
190
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -222,31 +222,36 @@ const h = {
|
|
|
222
222
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
223
223
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
224
224
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
225
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
226
|
-
|
|
227
|
-
Me
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
226
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
227
|
+
}, Me = {}, Fe = {};
|
|
228
|
+
Ce();
|
|
229
|
+
function J(n, t, e = /* @__PURE__ */ new Map(), i = (u, y, h, l) => y, r = {}, a = (u) => u) {
|
|
230
|
+
return _[t.title] = t, H[t.title] = i, Me[t.title] = r, Fe[t.title] = a, (u = {}) => {
|
|
231
|
+
const y = ke(u, t, e), h = Object.keys(n).reduce((l, p) => (l[p] = n[p].default, l), {});
|
|
232
|
+
return Object.assign(h, y);
|
|
232
233
|
};
|
|
233
234
|
}
|
|
234
|
-
function
|
|
235
|
+
function Se(n, t) {
|
|
235
236
|
return { customClass: t.class, customStyle: t.style };
|
|
236
237
|
}
|
|
237
238
|
const Y = /* @__PURE__ */ new Map([
|
|
238
|
-
["appearance",
|
|
239
|
+
["appearance", Se]
|
|
239
240
|
]);
|
|
240
|
-
function Z(
|
|
241
|
+
function Z(n, t, e) {
|
|
241
242
|
return t;
|
|
242
243
|
}
|
|
243
|
-
const
|
|
244
|
+
const q = {
|
|
244
245
|
/** 组件唯一标识 */
|
|
245
246
|
id: { Type: String, default: "" },
|
|
246
247
|
/** 自定义样式 */
|
|
247
248
|
customClass: { Type: String, default: "" },
|
|
248
249
|
/** 禁用状态 */
|
|
249
250
|
disabled: { Type: Boolean, default: !1 },
|
|
251
|
+
/**
|
|
252
|
+
* 功能同disabled
|
|
253
|
+
*/
|
|
254
|
+
readonly: { type: Boolean, default: !1 },
|
|
250
255
|
/** 中间状态 */
|
|
251
256
|
indeterminate: { Type: Boolean, default: !1 },
|
|
252
257
|
/** 选择状态 */
|
|
@@ -263,68 +268,68 @@ const W = {
|
|
|
263
268
|
label: { type: String, default: "" },
|
|
264
269
|
/** 标识是否被选中 */
|
|
265
270
|
checked: { type: Boolean, default: !1 }
|
|
266
|
-
},
|
|
271
|
+
}, R = J(q, ge, Y, Z), G = /* @__PURE__ */ D({
|
|
267
272
|
name: "FCheckBox",
|
|
268
|
-
props:
|
|
273
|
+
props: q,
|
|
269
274
|
emits: ["change", "changeValue", "update:modelValue", "update:checked"],
|
|
270
|
-
setup(
|
|
271
|
-
const e =
|
|
272
|
-
buttonClass:
|
|
273
|
-
disabled:
|
|
274
|
-
name:
|
|
275
|
-
shouldRenderButton:
|
|
276
|
-
shouldRenderNative:
|
|
277
|
-
shouldRenderTag:
|
|
278
|
-
tagClass:
|
|
279
|
-
checked:
|
|
280
|
-
onClickCheckBox:
|
|
281
|
-
} =
|
|
282
|
-
|
|
283
|
-
const
|
|
275
|
+
setup(n, t) {
|
|
276
|
+
const e = I(X, null), {
|
|
277
|
+
buttonClass: i,
|
|
278
|
+
disabled: r,
|
|
279
|
+
name: a,
|
|
280
|
+
shouldRenderButton: u,
|
|
281
|
+
shouldRenderNative: y,
|
|
282
|
+
shouldRenderTag: h,
|
|
283
|
+
tagClass: l,
|
|
284
|
+
checked: p,
|
|
285
|
+
onClickCheckBox: o
|
|
286
|
+
} = se(n, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
|
|
287
|
+
M();
|
|
288
|
+
const d = M(n.id), s = M(n.customClass), c = M(n.modelValue), f = M(n.indeterminate);
|
|
284
289
|
return x(() => {
|
|
285
|
-
const
|
|
290
|
+
const v = {
|
|
286
291
|
"custom-control": !0,
|
|
287
292
|
"custom-checkbox": !0
|
|
288
293
|
};
|
|
289
|
-
return s.value && s.value.split(" ").reduce((g,
|
|
290
|
-
}),
|
|
291
|
-
|
|
292
|
-
}),
|
|
293
|
-
|
|
294
|
-
}),
|
|
294
|
+
return s.value && s.value.split(" ").reduce((g, C) => (g[C] = !0, g), v), v;
|
|
295
|
+
}), A(() => n.modelValue, (v) => {
|
|
296
|
+
c.value = v;
|
|
297
|
+
}), A(() => n.indeterminate, (v) => {
|
|
298
|
+
f.value = v;
|
|
299
|
+
}), N(() => {
|
|
295
300
|
}), () => {
|
|
296
|
-
var
|
|
297
|
-
return
|
|
298
|
-
class:
|
|
301
|
+
var v, g, C, w, V, b;
|
|
302
|
+
return F(ae, null, [u.value && F("div", {
|
|
303
|
+
class: i.value,
|
|
299
304
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
300
|
-
onClick:
|
|
301
|
-
}, [(g = (
|
|
302
|
-
class:
|
|
303
|
-
onClick:
|
|
304
|
-
}, [
|
|
305
|
+
onClick: o
|
|
306
|
+
}, [(g = (v = t.slots).default) == null ? void 0 : g.call(v)]), h.value && F("div", {
|
|
307
|
+
class: l.value,
|
|
308
|
+
onClick: o
|
|
309
|
+
}, [F("div", {
|
|
305
310
|
class: "title"
|
|
306
|
-
}, [(
|
|
311
|
+
}, [(w = (C = t.slots).default) == null ? void 0 : w.call(C)]), F("div", {
|
|
307
312
|
class: "tip"
|
|
308
|
-
}, null),
|
|
313
|
+
}, null), F("span", {
|
|
309
314
|
class: "f-icon f-icon-check f-radio-icon"
|
|
310
|
-
}, null)]),
|
|
315
|
+
}, null)]), y.value && F("div", {
|
|
311
316
|
class: "custom-control custom-checkbox",
|
|
312
|
-
onClick:
|
|
313
|
-
}, [
|
|
317
|
+
onClick: o
|
|
318
|
+
}, [F("input", {
|
|
314
319
|
type: "checkbox",
|
|
315
320
|
class: "custom-control-input",
|
|
316
|
-
name:
|
|
317
|
-
id:
|
|
318
|
-
value:
|
|
319
|
-
checked:
|
|
320
|
-
indeterminate:
|
|
321
|
-
disabled:
|
|
322
|
-
}, null),
|
|
321
|
+
name: a.value,
|
|
322
|
+
id: d,
|
|
323
|
+
value: n.value,
|
|
324
|
+
checked: p.value,
|
|
325
|
+
indeterminate: f.value,
|
|
326
|
+
disabled: r.value
|
|
327
|
+
}, null), F("div", {
|
|
323
328
|
class: "custom-control-label"
|
|
324
|
-
}, [(
|
|
329
|
+
}, [(b = (V = t.slots).default) == null ? void 0 : b.call(V)])])]);
|
|
325
330
|
};
|
|
326
331
|
}
|
|
327
|
-
}),
|
|
332
|
+
}), Te = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-design.gitee.io/check-box.schema.json", Ve = "check-group", Pe = "A Farris Input Component", Ee = "object", Be = {
|
|
328
333
|
id: {
|
|
329
334
|
description: "The unique identifier for a check box",
|
|
330
335
|
type: "string"
|
|
@@ -367,7 +372,7 @@ const W = {
|
|
|
367
372
|
type: "string",
|
|
368
373
|
default: "value"
|
|
369
374
|
},
|
|
370
|
-
|
|
375
|
+
data: {
|
|
371
376
|
description: "",
|
|
372
377
|
type: "array"
|
|
373
378
|
},
|
|
@@ -376,33 +381,44 @@ const W = {
|
|
|
376
381
|
type: "boolean",
|
|
377
382
|
default: !1
|
|
378
383
|
},
|
|
379
|
-
required: {
|
|
380
|
-
description: "",
|
|
381
|
-
type: "boolean",
|
|
382
|
-
default: !1
|
|
383
|
-
},
|
|
384
384
|
tabindex: {
|
|
385
385
|
description: "",
|
|
386
386
|
type: "number",
|
|
387
387
|
default: -1
|
|
388
388
|
},
|
|
389
|
-
|
|
389
|
+
separator: {
|
|
390
|
+
description: "",
|
|
391
|
+
type: "string",
|
|
392
|
+
default: ","
|
|
393
|
+
},
|
|
394
|
+
name: {
|
|
395
|
+
description: "",
|
|
396
|
+
type: "string",
|
|
397
|
+
default: ""
|
|
398
|
+
},
|
|
399
|
+
horizontal: {
|
|
390
400
|
description: "",
|
|
391
401
|
type: "boolean",
|
|
392
|
-
default: !
|
|
402
|
+
default: !1
|
|
393
403
|
}
|
|
394
404
|
}, Ie = [
|
|
395
405
|
"id",
|
|
396
406
|
"type"
|
|
397
|
-
], Ae =
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
407
|
+
], Ae = [
|
|
408
|
+
"id",
|
|
409
|
+
"appearance",
|
|
410
|
+
"binding",
|
|
411
|
+
"visible"
|
|
412
|
+
], Le = {
|
|
413
|
+
$schema: Te,
|
|
414
|
+
$id: we,
|
|
415
|
+
title: Ve,
|
|
416
|
+
description: Pe,
|
|
417
|
+
type: Ee,
|
|
418
|
+
properties: Be,
|
|
419
|
+
required: Ie,
|
|
420
|
+
ignore: Ae
|
|
421
|
+
}, De = {
|
|
406
422
|
/**
|
|
407
423
|
* 是否被选中
|
|
408
424
|
*/
|
|
@@ -419,8 +435,8 @@ const W = {
|
|
|
419
435
|
* type为button或者tag时的尺寸
|
|
420
436
|
*/
|
|
421
437
|
size: { type: String, default: "middle" }
|
|
422
|
-
},
|
|
423
|
-
...
|
|
438
|
+
}, W = {
|
|
439
|
+
...De,
|
|
424
440
|
/**
|
|
425
441
|
* 组件标识
|
|
426
442
|
*/
|
|
@@ -430,13 +446,27 @@ const W = {
|
|
|
430
446
|
*/
|
|
431
447
|
disabled: { type: Boolean, default: !1 },
|
|
432
448
|
/**
|
|
433
|
-
*
|
|
449
|
+
* 同disabled
|
|
450
|
+
*/
|
|
451
|
+
readonly: { type: Boolean, default: !1 },
|
|
452
|
+
/**
|
|
453
|
+
* 单选组枚举数组---废弃
|
|
434
454
|
*/
|
|
435
455
|
enumData: {
|
|
436
456
|
type: Array,
|
|
437
457
|
default: [
|
|
438
|
-
{
|
|
439
|
-
{
|
|
458
|
+
{ value: "example1", name: "示例一" },
|
|
459
|
+
{ value: "example2", name: "示例二" }
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
/**
|
|
463
|
+
* 单选组枚举数组
|
|
464
|
+
*/
|
|
465
|
+
data: {
|
|
466
|
+
type: Array,
|
|
467
|
+
default: [
|
|
468
|
+
{ value: "example1", name: "示例一" },
|
|
469
|
+
{ value: "example2", name: "示例二" }
|
|
440
470
|
]
|
|
441
471
|
},
|
|
442
472
|
/**
|
|
@@ -476,234 +506,206 @@ const W = {
|
|
|
476
506
|
* 枚举数组中枚举值的key值。
|
|
477
507
|
*/
|
|
478
508
|
valueField: { type: String, default: "value" }
|
|
479
|
-
},
|
|
480
|
-
function ee(
|
|
481
|
-
const
|
|
482
|
-
function
|
|
483
|
-
return n
|
|
484
|
-
}
|
|
485
|
-
function
|
|
486
|
-
return n
|
|
487
|
-
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
490
|
-
}
|
|
491
|
-
function
|
|
492
|
-
const s =
|
|
493
|
-
return
|
|
494
|
-
}
|
|
495
|
-
function
|
|
496
|
-
const
|
|
497
|
-
return
|
|
498
|
-
}
|
|
499
|
-
function
|
|
500
|
-
if (
|
|
501
|
-
let s =
|
|
502
|
-
const
|
|
503
|
-
!s || !s.length ? s.push(
|
|
509
|
+
}, K = J(W, Le, Y, Z);
|
|
510
|
+
function ee(n, t, e) {
|
|
511
|
+
const i = x(() => !(n.readonly && n.disabled)), r = M(n.data || n.enumData);
|
|
512
|
+
function a(o) {
|
|
513
|
+
return o[n.valueField];
|
|
514
|
+
}
|
|
515
|
+
function u(o) {
|
|
516
|
+
return o[n.textField];
|
|
517
|
+
}
|
|
518
|
+
function y(o) {
|
|
519
|
+
return o ? n.isStringValue ? o.split(n.separator) : o : [];
|
|
520
|
+
}
|
|
521
|
+
function h(o) {
|
|
522
|
+
const s = r.value.map((c) => a(c)).filter((c) => o.some((f) => f === String(c)));
|
|
523
|
+
return n.isStringValue ? s.join(n.separator) : s;
|
|
524
|
+
}
|
|
525
|
+
function l(o) {
|
|
526
|
+
const d = String(a(o));
|
|
527
|
+
return y(e.value).some((c) => c === d);
|
|
528
|
+
}
|
|
529
|
+
function p(o, d) {
|
|
530
|
+
if (i.value) {
|
|
531
|
+
let s = y(e.value) || [];
|
|
532
|
+
const c = String(a(o));
|
|
533
|
+
!s || !s.length ? s.push(c) : s.some((f) => f === c) ? s = s.filter((f) => f !== c) : s.push(c), e.value = h(s), t.emit("changeValue", e.value), t.emit("update:modelValue", e.value);
|
|
504
534
|
}
|
|
505
|
-
|
|
535
|
+
d.stopPropagation();
|
|
506
536
|
}
|
|
507
537
|
return {
|
|
508
|
-
enumData:
|
|
509
|
-
getValue:
|
|
510
|
-
getText:
|
|
511
|
-
checked:
|
|
512
|
-
onClickCheckbox:
|
|
538
|
+
enumData: r,
|
|
539
|
+
getValue: a,
|
|
540
|
+
getText: u,
|
|
541
|
+
checked: l,
|
|
542
|
+
onClickCheckbox: p
|
|
513
543
|
};
|
|
514
544
|
}
|
|
515
|
-
const
|
|
545
|
+
const B = /* @__PURE__ */ D({
|
|
516
546
|
name: "FCheckGroup",
|
|
517
|
-
props:
|
|
547
|
+
props: W,
|
|
518
548
|
emits: ["changeValue", "update:modelValue"],
|
|
519
|
-
setup(
|
|
520
|
-
const e =
|
|
521
|
-
enumData:
|
|
522
|
-
onClickCheckbox:
|
|
523
|
-
getValue:
|
|
524
|
-
getText:
|
|
525
|
-
checked:
|
|
526
|
-
} = ee(
|
|
527
|
-
"farris-checkradio-hor":
|
|
549
|
+
setup(n, t) {
|
|
550
|
+
const e = M(n.modelValue), i = M(n.horizontal), r = M(n.tabIndex), a = M(n.name), {
|
|
551
|
+
enumData: u,
|
|
552
|
+
onClickCheckbox: y,
|
|
553
|
+
getValue: h,
|
|
554
|
+
getText: l,
|
|
555
|
+
checked: p
|
|
556
|
+
} = ee(n, t, e), o = x(() => ({
|
|
557
|
+
"farris-checkradio-hor": i.value
|
|
528
558
|
}));
|
|
529
|
-
|
|
559
|
+
A(() => n.modelValue, (s) => {
|
|
530
560
|
e.value = s;
|
|
531
561
|
});
|
|
532
|
-
const
|
|
533
|
-
return
|
|
534
|
-
values:
|
|
535
|
-
parentProps:
|
|
562
|
+
const d = M([]);
|
|
563
|
+
return le(X, {
|
|
564
|
+
values: d,
|
|
565
|
+
parentProps: n,
|
|
536
566
|
parentContext: t
|
|
537
|
-
}), () =>
|
|
538
|
-
class: ["farris-input-wrap",
|
|
539
|
-
}, [t.slots.default ? t.slots.default() :
|
|
540
|
-
const
|
|
541
|
-
return
|
|
567
|
+
}), () => F("div", {
|
|
568
|
+
class: ["farris-input-wrap", o.value]
|
|
569
|
+
}, [t.slots.default ? t.slots.default() : u.value.map((s, c) => {
|
|
570
|
+
const f = "checkbox_" + a.value + c;
|
|
571
|
+
return F("div", {
|
|
542
572
|
class: "custom-control custom-checkbox"
|
|
543
|
-
}, [
|
|
573
|
+
}, [F("input", {
|
|
544
574
|
type: "checkbox",
|
|
545
575
|
class: "custom-control-input",
|
|
546
|
-
name:
|
|
547
|
-
id:
|
|
548
|
-
value:
|
|
549
|
-
checked:
|
|
550
|
-
disabled:
|
|
551
|
-
tabindex:
|
|
552
|
-
onClick: (
|
|
553
|
-
}, null),
|
|
576
|
+
name: a.value,
|
|
577
|
+
id: f,
|
|
578
|
+
value: h(s),
|
|
579
|
+
checked: p(s),
|
|
580
|
+
disabled: n.readonly || n.disabled,
|
|
581
|
+
tabindex: r.value,
|
|
582
|
+
onClick: (v) => y(s, v)
|
|
583
|
+
}, null), F("label", {
|
|
554
584
|
class: "custom-control-label",
|
|
555
|
-
for:
|
|
556
|
-
title:
|
|
557
|
-
}, [
|
|
585
|
+
for: f,
|
|
586
|
+
title: l(s)
|
|
587
|
+
}, [l(s)])]);
|
|
558
588
|
})]);
|
|
559
589
|
}
|
|
560
590
|
});
|
|
561
|
-
function te(
|
|
562
|
-
var
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
r();
|
|
567
|
-
const i = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", p = k();
|
|
568
|
-
function f() {
|
|
591
|
+
function te(n, t, e) {
|
|
592
|
+
var V;
|
|
593
|
+
const i = e && e.getStyles && e.getStyles() || "", r = e && e.getDesignerClass && e.getDesignerClass() || "", a = M();
|
|
594
|
+
function u() {
|
|
569
595
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
570
596
|
}
|
|
571
|
-
function
|
|
597
|
+
function y() {
|
|
572
598
|
return !1;
|
|
573
599
|
}
|
|
574
|
-
function
|
|
600
|
+
function h() {
|
|
575
601
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
576
602
|
}
|
|
577
|
-
function
|
|
603
|
+
function l() {
|
|
578
604
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
579
605
|
}
|
|
580
|
-
function
|
|
581
|
-
if (!
|
|
606
|
+
function p(b) {
|
|
607
|
+
if (!b || !b.value)
|
|
582
608
|
return null;
|
|
583
|
-
if (
|
|
584
|
-
return
|
|
585
|
-
const
|
|
586
|
-
return
|
|
609
|
+
if (b.value.schema && b.value.schema.type === "component")
|
|
610
|
+
return b.value;
|
|
611
|
+
const S = M(b == null ? void 0 : b.value.parent), T = p(S);
|
|
612
|
+
return T || null;
|
|
587
613
|
}
|
|
588
|
-
function
|
|
589
|
-
const { componentInstance:
|
|
590
|
-
return !
|
|
614
|
+
function o(b = t) {
|
|
615
|
+
const { componentInstance: S, designerItemElementRef: T } = b;
|
|
616
|
+
return !S || !S.value ? null : S.value.canMove ? T : o(b.parent);
|
|
591
617
|
}
|
|
592
|
-
function
|
|
593
|
-
return !!e && e.canAccepts(
|
|
618
|
+
function d(b) {
|
|
619
|
+
return !!e && e.canAccepts(b);
|
|
594
620
|
}
|
|
595
|
-
function
|
|
621
|
+
function s() {
|
|
596
622
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
597
623
|
}
|
|
598
|
-
function
|
|
624
|
+
function c() {
|
|
599
625
|
}
|
|
600
|
-
function b
|
|
601
|
-
|
|
626
|
+
function f(b, S) {
|
|
627
|
+
S && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(S);
|
|
602
628
|
}
|
|
603
|
-
function
|
|
604
|
-
const { componentType:
|
|
605
|
-
let
|
|
606
|
-
e && e.onResolveNewComponentSchema && (
|
|
607
|
-
const
|
|
608
|
-
return
|
|
629
|
+
function v(b, S) {
|
|
630
|
+
const { componentType: T } = b;
|
|
631
|
+
let P = Q(T, b, S);
|
|
632
|
+
e && e.onResolveNewComponentSchema && (P = e.onResolveNewComponentSchema(b, P));
|
|
633
|
+
const $ = T.toLowerCase().replace(/-/g, "_");
|
|
634
|
+
return P && !P.id && P.type === T && (P.id = `${$}_${Math.random().toString().slice(2, 6)}`), P;
|
|
609
635
|
}
|
|
610
|
-
function
|
|
636
|
+
function g(b) {
|
|
611
637
|
}
|
|
612
|
-
function
|
|
638
|
+
function C(...b) {
|
|
613
639
|
if (e && e.getPropsConfig)
|
|
614
|
-
return e.getPropsConfig(...
|
|
640
|
+
return e.getPropsConfig(...b);
|
|
641
|
+
}
|
|
642
|
+
function w() {
|
|
643
|
+
e && e.onRemoveComponent && e.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((b) => {
|
|
644
|
+
var P;
|
|
645
|
+
let S = b.id;
|
|
646
|
+
b.type === "component-ref" && (S = b.component);
|
|
647
|
+
const T = n.value.querySelector(`#${S}-design-item`);
|
|
648
|
+
(P = T == null ? void 0 : T.componentInstance) != null && P.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
|
|
649
|
+
});
|
|
615
650
|
}
|
|
616
|
-
return
|
|
617
|
-
canMove:
|
|
618
|
-
canSelectParent:
|
|
619
|
-
canDelete:
|
|
620
|
-
canNested: !
|
|
651
|
+
return a.value = {
|
|
652
|
+
canMove: u(),
|
|
653
|
+
canSelectParent: y(),
|
|
654
|
+
canDelete: h(),
|
|
655
|
+
canNested: !l(),
|
|
621
656
|
contents: t == null ? void 0 : t.schema.contents,
|
|
622
|
-
elementRef:
|
|
623
|
-
parent: (
|
|
657
|
+
elementRef: n,
|
|
658
|
+
parent: (V = t == null ? void 0 : t.parent) == null ? void 0 : V.componentInstance,
|
|
624
659
|
schema: t == null ? void 0 : t.schema,
|
|
625
660
|
styles: i,
|
|
626
|
-
designerClass:
|
|
627
|
-
canAccepts:
|
|
628
|
-
getBelongedComponentInstance:
|
|
629
|
-
getDraggableDesignItemElement:
|
|
630
|
-
getDraggingDisplayText:
|
|
631
|
-
getPropConfig:
|
|
632
|
-
getDragScopeElement:
|
|
633
|
-
onAcceptMovedChildElement:
|
|
634
|
-
onChildElementMovedOut:
|
|
635
|
-
addNewChildComponentSchema:
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
},
|
|
640
|
-
}
|
|
641
|
-
function ne(o, t) {
|
|
642
|
-
o.schema;
|
|
643
|
-
const e = k(!0), r = k(!0);
|
|
644
|
-
function i(n) {
|
|
645
|
-
return !1;
|
|
646
|
-
}
|
|
647
|
-
function l() {
|
|
648
|
-
return !1;
|
|
649
|
-
}
|
|
650
|
-
function p() {
|
|
651
|
-
return !1;
|
|
652
|
-
}
|
|
653
|
-
function f() {
|
|
654
|
-
return !0;
|
|
655
|
-
}
|
|
656
|
-
function m(n) {
|
|
657
|
-
}
|
|
658
|
-
function a() {
|
|
659
|
-
}
|
|
660
|
-
function d(n) {
|
|
661
|
-
return null;
|
|
662
|
-
}
|
|
663
|
-
return {
|
|
664
|
-
canAccepts: i,
|
|
665
|
-
checkCanDeleteComponent: l,
|
|
666
|
-
checkCanMoveComponent: p,
|
|
667
|
-
hideNestedPaddingInDesginerView: f,
|
|
668
|
-
onAcceptMovedChildElement: m,
|
|
669
|
-
resolveComponentContext: a,
|
|
670
|
-
triggerBelongedComponentToMoveWhenMoved: e,
|
|
671
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
672
|
-
getPropsConfig: d
|
|
673
|
-
};
|
|
661
|
+
designerClass: r,
|
|
662
|
+
canAccepts: d,
|
|
663
|
+
getBelongedComponentInstance: p,
|
|
664
|
+
getDraggableDesignItemElement: o,
|
|
665
|
+
getDraggingDisplayText: s,
|
|
666
|
+
getPropConfig: C,
|
|
667
|
+
getDragScopeElement: c,
|
|
668
|
+
onAcceptMovedChildElement: f,
|
|
669
|
+
onChildElementMovedOut: g,
|
|
670
|
+
addNewChildComponentSchema: v,
|
|
671
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || M(!1),
|
|
672
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || M(!1),
|
|
673
|
+
onRemoveComponent: w
|
|
674
|
+
}, a;
|
|
674
675
|
}
|
|
675
676
|
class xe {
|
|
676
677
|
constructor(t, e) {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
678
|
+
k(this, "componentId");
|
|
679
|
+
k(this, "viewModelId");
|
|
680
|
+
k(this, "eventsEditorUtils");
|
|
681
|
+
k(this, "formSchemaUtils");
|
|
682
|
+
k(this, "formMetadataConverter");
|
|
683
|
+
k(this, "designViewModelUtils");
|
|
684
|
+
k(this, "designViewModelField");
|
|
685
|
+
k(this, "controlCreatorUtils");
|
|
686
|
+
k(this, "designerHostService");
|
|
687
|
+
k(this, "schemaService", null);
|
|
688
|
+
k(this, "metadataService", null);
|
|
689
|
+
k(this, "propertyConfig", {
|
|
689
690
|
type: "object",
|
|
690
691
|
categories: {}
|
|
691
692
|
});
|
|
692
|
-
var
|
|
693
|
-
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((
|
|
693
|
+
var i;
|
|
694
|
+
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
694
695
|
}
|
|
695
696
|
getTableInfo() {
|
|
696
697
|
var t;
|
|
697
698
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
698
699
|
}
|
|
699
700
|
setDesignViewModelField(t) {
|
|
701
|
+
var i;
|
|
700
702
|
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
701
703
|
if (e) {
|
|
702
704
|
if (!this.designViewModelField) {
|
|
703
705
|
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
704
|
-
this.designViewModelField = r.fields.find((
|
|
706
|
+
this.designViewModelField = r.fields.find((a) => a.id === e);
|
|
705
707
|
}
|
|
706
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
708
|
+
t.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
707
709
|
}
|
|
708
710
|
}
|
|
709
711
|
changeFieldEditorType(t, e) {
|
|
@@ -727,7 +729,7 @@ class xe {
|
|
|
727
729
|
type: "combo-list",
|
|
728
730
|
textField: "name",
|
|
729
731
|
valueField: "value",
|
|
730
|
-
data: [{ value: t.type, name:
|
|
732
|
+
data: [{ value: t.type, name: m[t.type].name }]
|
|
731
733
|
}
|
|
732
734
|
}
|
|
733
735
|
}
|
|
@@ -760,11 +762,11 @@ class xe {
|
|
|
760
762
|
* @returns
|
|
761
763
|
*/
|
|
762
764
|
updateElementByParentContainer(t, e) {
|
|
763
|
-
const
|
|
764
|
-
if (!
|
|
765
|
+
const i = e && e.parent && e.parent.schema;
|
|
766
|
+
if (!i)
|
|
765
767
|
return;
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
+
const r = i.contents.findIndex((u) => u.id === t), a = z(i.contents[r]);
|
|
769
|
+
i.contents.splice(r, 1), i.contents.splice(r, 0, a);
|
|
768
770
|
}
|
|
769
771
|
}
|
|
770
772
|
const E = class E {
|
|
@@ -780,9 +782,9 @@ const E = class E {
|
|
|
780
782
|
*/
|
|
781
783
|
static getAllInputTypes() {
|
|
782
784
|
const t = [];
|
|
783
|
-
for (
|
|
784
|
-
E.fieldControlTypeMapping[e].forEach((
|
|
785
|
-
t.find((
|
|
785
|
+
for (const e in E.fieldControlTypeMapping)
|
|
786
|
+
E.fieldControlTypeMapping[e].forEach((i) => {
|
|
787
|
+
t.find((r) => r.key === i.key && r.value === i.value) || t.push({ key: i.key, value: i.value });
|
|
786
788
|
});
|
|
787
789
|
return t;
|
|
788
790
|
}
|
|
@@ -790,176 +792,174 @@ const E = class E {
|
|
|
790
792
|
/**
|
|
791
793
|
* <字段类型,可配置的控件类型列表>的映射
|
|
792
794
|
*/
|
|
793
|
-
|
|
795
|
+
k(E, "fieldControlTypeMapping", {
|
|
794
796
|
String: [
|
|
795
|
-
{ key:
|
|
796
|
-
{ key:
|
|
797
|
-
{ key:
|
|
798
|
-
{ key:
|
|
799
|
-
{ key:
|
|
800
|
-
{ key:
|
|
801
|
-
{ key:
|
|
802
|
-
{ key:
|
|
797
|
+
{ key: m["input-group"].type, value: m["input-group"].name },
|
|
798
|
+
{ key: m.lookup.type, value: m.lookup.name },
|
|
799
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name },
|
|
800
|
+
{ key: m["check-box"].type, value: m["check-box"].name },
|
|
801
|
+
{ key: m["check-group"].type, value: m["check-group"].name },
|
|
802
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name },
|
|
803
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
804
|
+
{ key: m.textarea.type, value: m.textarea.name }
|
|
803
805
|
],
|
|
804
806
|
Text: [
|
|
805
|
-
{ key:
|
|
806
|
-
{ key:
|
|
807
|
+
{ key: m.textarea.type, value: m.textarea.name },
|
|
808
|
+
{ key: m.lookup.type, value: m.lookup.name }
|
|
807
809
|
],
|
|
808
810
|
Decimal: [
|
|
809
|
-
{ key:
|
|
811
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
810
812
|
],
|
|
811
813
|
Integer: [
|
|
812
|
-
{ key:
|
|
814
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
813
815
|
],
|
|
814
816
|
Number: [
|
|
815
|
-
{ key:
|
|
817
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
816
818
|
],
|
|
817
819
|
BigNumber: [
|
|
818
|
-
{ key:
|
|
820
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
819
821
|
],
|
|
820
822
|
Date: [
|
|
821
|
-
{ key:
|
|
823
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name }
|
|
822
824
|
],
|
|
823
825
|
DateTime: [
|
|
824
|
-
{ key:
|
|
826
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name }
|
|
825
827
|
],
|
|
826
828
|
Boolean: [
|
|
827
|
-
{ key:
|
|
828
|
-
{ key:
|
|
829
|
+
{ key: m.switch.type, value: m.switch.name },
|
|
830
|
+
{ key: m["check-box"].type, value: m["check-box"].name }
|
|
829
831
|
],
|
|
830
832
|
Enum: [
|
|
831
|
-
{ key:
|
|
832
|
-
{ key:
|
|
833
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
834
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name }
|
|
833
835
|
],
|
|
834
836
|
Object: [
|
|
835
|
-
{ key:
|
|
836
|
-
{ key:
|
|
837
|
-
{ key:
|
|
837
|
+
{ key: m.lookup.type, value: m.lookup.name },
|
|
838
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
839
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name }
|
|
838
840
|
]
|
|
839
841
|
});
|
|
840
|
-
let
|
|
841
|
-
const
|
|
842
|
-
class
|
|
842
|
+
let L = E;
|
|
843
|
+
const $e = M(0);
|
|
844
|
+
class Ge {
|
|
843
845
|
constructor() {
|
|
844
846
|
/** 控件标题 */
|
|
845
|
-
|
|
847
|
+
k(this, "label", "");
|
|
846
848
|
/** 控件id */
|
|
847
|
-
|
|
849
|
+
k(this, "id", "");
|
|
848
850
|
/** 每个控件占用的栅格数 */
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
k(this, "columnInSM", 12);
|
|
852
|
+
k(this, "columnInMD", 6);
|
|
853
|
+
k(this, "columnInLG", 3);
|
|
854
|
+
k(this, "columnInEL", 2);
|
|
853
855
|
/** 每个控件占用的列数 */
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
856
|
+
k(this, "displayWidthInSM", 1);
|
|
857
|
+
k(this, "displayWidthInMD", 1);
|
|
858
|
+
k(this, "displayWidthInLG", 1);
|
|
859
|
+
k(this, "displayWidthInEL", 1);
|
|
858
860
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
859
|
-
|
|
861
|
+
k(this, "displayColumnCountAtBreakPoint", "md");
|
|
860
862
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
861
|
-
|
|
863
|
+
k(this, "tagRow", 0);
|
|
862
864
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
863
|
-
|
|
865
|
+
k(this, "showTopBorder", 0);
|
|
864
866
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
865
|
-
|
|
867
|
+
k(this, "group", 1);
|
|
866
868
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
867
|
-
|
|
869
|
+
k(this, "isSupportedClass", !0);
|
|
868
870
|
/** 控件所在分组id(设计器用的) */
|
|
869
|
-
|
|
871
|
+
k(this, "fieldSetId", "");
|
|
870
872
|
}
|
|
871
873
|
}
|
|
872
|
-
function
|
|
874
|
+
function Ne(n) {
|
|
873
875
|
let t, e;
|
|
874
|
-
const
|
|
875
|
-
let
|
|
876
|
-
function
|
|
877
|
-
const s =
|
|
876
|
+
const i = /* @__PURE__ */ new Map();
|
|
877
|
+
let r = [];
|
|
878
|
+
function a(p, o) {
|
|
879
|
+
const s = p.split(" ").filter((C) => C.startsWith("col-"));
|
|
878
880
|
if (s.length === 0) {
|
|
879
|
-
|
|
881
|
+
o.isSupportedClass = !1;
|
|
880
882
|
return;
|
|
881
883
|
}
|
|
882
|
-
let
|
|
883
|
-
|
|
884
|
-
}
|
|
885
|
-
function p
|
|
886
|
-
let
|
|
887
|
-
|
|
888
|
-
if (
|
|
889
|
-
|
|
884
|
+
let c = s.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), f = s.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), v = s.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), g = s.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
885
|
+
c = c || "col-12", o.columnInSM = parseInt(c.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), f = f || "col-md-" + o.columnInSM, o.columnInMD = parseInt(f.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), v = v || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(v.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), g = g || "col-el-" + o.columnInLG, o.columnInEL = parseInt(g.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
886
|
+
}
|
|
887
|
+
function u(p, o, d, s = !1) {
|
|
888
|
+
let c = !1;
|
|
889
|
+
p.contents.forEach((f) => {
|
|
890
|
+
if (f.type === "fieldset") {
|
|
891
|
+
d += 1, u(f, o, d, !0), c = !0;
|
|
890
892
|
return;
|
|
891
893
|
}
|
|
892
|
-
|
|
893
|
-
const
|
|
894
|
-
|
|
894
|
+
c && (d += 1, c = !1);
|
|
895
|
+
const v = f.appearance && f.appearance.class, g = new Ge();
|
|
896
|
+
v ? a(v, g) : g.isSupportedClass = !1, g.label = f.label || f.id, g.id = f.id, g.group = d, s && (g.fieldSetId = p.id), e === f.id && (t = d), i.set(f.id, f), o.push(g);
|
|
895
897
|
});
|
|
896
898
|
}
|
|
897
|
-
function
|
|
898
|
-
const
|
|
899
|
-
if (!
|
|
899
|
+
function y(p) {
|
|
900
|
+
const o = n.getComponentById(p);
|
|
901
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
900
902
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
901
|
-
const
|
|
902
|
-
return !
|
|
903
|
-
}
|
|
904
|
-
function
|
|
905
|
-
|
|
906
|
-
const { result:
|
|
907
|
-
if (!
|
|
908
|
-
return { result:
|
|
909
|
-
e =
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
const
|
|
903
|
+
const d = n.selectNode(o, (s) => s.type === O["response-form"].type);
|
|
904
|
+
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
905
|
+
}
|
|
906
|
+
function h(p, o) {
|
|
907
|
+
o = o || p.id;
|
|
908
|
+
const { result: d, message: s, formNode: c } = y(o);
|
|
909
|
+
if (!d)
|
|
910
|
+
return { result: d, message: s };
|
|
911
|
+
e = p.id, r = [], i.clear();
|
|
912
|
+
const f = c.contents[0].type === O.fieldset.type ? 0 : 1;
|
|
913
|
+
u(c, r, f);
|
|
914
|
+
const v = r.find((C) => !C.isSupportedClass);
|
|
913
915
|
return {
|
|
914
916
|
defaultState: {
|
|
915
917
|
defaultGroupNumber: t || 1,
|
|
916
|
-
model:
|
|
918
|
+
model: v ? "customize" : "standard"
|
|
917
919
|
},
|
|
918
|
-
importData:
|
|
920
|
+
importData: r
|
|
919
921
|
};
|
|
920
922
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
923
|
-
const { result:
|
|
924
|
-
if (!
|
|
923
|
+
function l(p, o) {
|
|
924
|
+
o = o;
|
|
925
|
+
const { result: d, formNode: s } = y(o);
|
|
926
|
+
if (!d)
|
|
925
927
|
return "";
|
|
926
|
-
const
|
|
927
|
-
return
|
|
928
|
-
var
|
|
929
|
-
const
|
|
928
|
+
const c = [];
|
|
929
|
+
return p.forEach((f) => {
|
|
930
|
+
var C;
|
|
931
|
+
const v = i.get(f.id), g = v.appearance && v.appearance.class;
|
|
930
932
|
if (g) {
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
+
const V = g.split(" ").filter((oe) => !oe.startsWith("col-")), b = "col-" + f.columnInSM, S = "col-md-" + f.columnInMD, T = "col-xl-" + f.columnInLG, P = "col-el-" + f.columnInEL, $ = [b, S, T, P].concat(V);
|
|
934
|
+
v.appearance.class = $.join(" ");
|
|
933
935
|
}
|
|
934
|
-
if (
|
|
935
|
-
const
|
|
936
|
-
|
|
936
|
+
if (f.fieldSetId) {
|
|
937
|
+
const w = s.contents.find((b) => b.id === f.fieldSetId), V = c.find((b) => b.id === f.fieldSetId);
|
|
938
|
+
V ? (C = V.contents) == null || C.push(v) : (c.push(w), w.contents = [v]);
|
|
937
939
|
} else
|
|
938
|
-
|
|
939
|
-
}), s.contents =
|
|
940
|
+
c.push(v);
|
|
941
|
+
}), s.contents = c, s.id;
|
|
940
942
|
}
|
|
941
943
|
return {
|
|
942
|
-
checkCanFindFormNode:
|
|
943
|
-
checkCanOpenLayoutEditor:
|
|
944
|
-
changeFormControlsByResponseLayoutConfig:
|
|
945
|
-
getResonseFormLayoutConfig:
|
|
944
|
+
checkCanFindFormNode: y,
|
|
945
|
+
checkCanOpenLayoutEditor: h,
|
|
946
|
+
changeFormControlsByResponseLayoutConfig: l,
|
|
947
|
+
getResonseFormLayoutConfig: u
|
|
946
948
|
};
|
|
947
949
|
}
|
|
948
|
-
class
|
|
949
|
-
constructor(e,
|
|
950
|
-
super(e,
|
|
951
|
-
|
|
952
|
-
this.responseLayoutEditorFunction =
|
|
953
|
-
}
|
|
954
|
-
getPropertyConfig(e,
|
|
955
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(e,
|
|
956
|
-
}
|
|
957
|
-
getBasicProperties(e,
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
this.setDesignViewModelField(e)
|
|
961
|
-
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
962
|
-
return {
|
|
950
|
+
class ne extends xe {
|
|
951
|
+
constructor(e, i) {
|
|
952
|
+
super(e, i);
|
|
953
|
+
k(this, "responseLayoutEditorFunction");
|
|
954
|
+
this.responseLayoutEditorFunction = Ne(this.formSchemaUtils);
|
|
955
|
+
}
|
|
956
|
+
getPropertyConfig(e, i) {
|
|
957
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, i), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
958
|
+
}
|
|
959
|
+
getBasicProperties(e, i) {
|
|
960
|
+
var a;
|
|
961
|
+
const r = this;
|
|
962
|
+
return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
963
963
|
description: "Basic Information",
|
|
964
964
|
title: "基本信息",
|
|
965
965
|
properties: {
|
|
@@ -980,7 +980,7 @@ class oe extends xe {
|
|
|
980
980
|
textField: "value",
|
|
981
981
|
valueField: "key",
|
|
982
982
|
editable: !1,
|
|
983
|
-
data:
|
|
983
|
+
data: r.designViewModelField ? L.getEditorTypesByMDataType((a = r.designViewModelField.type) == null ? void 0 : a.name) : L.getAllInputTypes()
|
|
984
984
|
}
|
|
985
985
|
},
|
|
986
986
|
label: {
|
|
@@ -991,41 +991,37 @@ class oe extends xe {
|
|
|
991
991
|
binding: {
|
|
992
992
|
description: "绑定的表单字段",
|
|
993
993
|
title: "绑定",
|
|
994
|
-
$converter: "/converter/field-selector.converter",
|
|
995
994
|
editor: {
|
|
996
|
-
type: "
|
|
995
|
+
type: "binding-selector",
|
|
997
996
|
bindingType: { enable: !1 },
|
|
998
997
|
editorParams: {
|
|
999
|
-
|
|
1000
|
-
|
|
998
|
+
componentSchema: e,
|
|
999
|
+
needSyncToViewModel: !0,
|
|
1000
|
+
viewModelId: this.viewModelId,
|
|
1001
|
+
designerHostService: this.designerHostService,
|
|
1002
|
+
disableOccupiedFields: !0
|
|
1001
1003
|
},
|
|
1002
|
-
|
|
1003
|
-
{ field: "name", title: "字段名称" },
|
|
1004
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1005
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1006
|
-
],
|
|
1007
|
-
textField: "bindingField",
|
|
1008
|
-
data: p
|
|
1004
|
+
textField: "bindingField"
|
|
1009
1005
|
}
|
|
1010
1006
|
}
|
|
1011
1007
|
},
|
|
1012
|
-
setPropertyRelates(
|
|
1013
|
-
if (
|
|
1014
|
-
switch (
|
|
1008
|
+
setPropertyRelates(u, y) {
|
|
1009
|
+
if (u)
|
|
1010
|
+
switch (u && u.propertyID) {
|
|
1015
1011
|
case "type": {
|
|
1016
|
-
|
|
1012
|
+
r.changeControlType(e, u, i);
|
|
1017
1013
|
break;
|
|
1018
1014
|
}
|
|
1019
1015
|
case "label": {
|
|
1020
|
-
|
|
1016
|
+
u.needRefreshControlTree = !0;
|
|
1021
1017
|
break;
|
|
1022
1018
|
}
|
|
1023
1019
|
}
|
|
1024
1020
|
}
|
|
1025
1021
|
};
|
|
1026
1022
|
}
|
|
1027
|
-
getAppearanceProperties(e,
|
|
1028
|
-
|
|
1023
|
+
getAppearanceProperties(e, i) {
|
|
1024
|
+
const r = this;
|
|
1029
1025
|
return {
|
|
1030
1026
|
title: "样式",
|
|
1031
1027
|
description: "Appearance",
|
|
@@ -1051,18 +1047,18 @@ class oe extends xe {
|
|
|
1051
1047
|
refreshPanelAfterChanged: !0,
|
|
1052
1048
|
editor: {
|
|
1053
1049
|
type: "response-layout-editor-setting",
|
|
1054
|
-
initialState:
|
|
1050
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
|
|
1055
1051
|
}
|
|
1056
1052
|
}
|
|
1057
1053
|
},
|
|
1058
|
-
setPropertyRelates(
|
|
1059
|
-
if (
|
|
1060
|
-
switch (
|
|
1054
|
+
setPropertyRelates(a, u) {
|
|
1055
|
+
if (a)
|
|
1056
|
+
switch (a && a.propertyID) {
|
|
1061
1057
|
case "responseLayout":
|
|
1062
|
-
|
|
1058
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, i), delete e.responseLayout;
|
|
1063
1059
|
break;
|
|
1064
1060
|
case "class":
|
|
1065
|
-
|
|
1061
|
+
r.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, i);
|
|
1066
1062
|
break;
|
|
1067
1063
|
}
|
|
1068
1064
|
}
|
|
@@ -1076,44 +1072,44 @@ class oe extends xe {
|
|
|
1076
1072
|
* @param propertyData 控件DOM属性
|
|
1077
1073
|
* @param newControlType 新控件类型
|
|
1078
1074
|
*/
|
|
1079
|
-
changeControlType(e,
|
|
1080
|
-
var
|
|
1081
|
-
const
|
|
1082
|
-
if (!
|
|
1075
|
+
changeControlType(e, i, r) {
|
|
1076
|
+
var p, o, d, s;
|
|
1077
|
+
const a = i.propertyValue, u = r && r.parent && r.parent.schema;
|
|
1078
|
+
if (!u)
|
|
1083
1079
|
return;
|
|
1084
|
-
const
|
|
1085
|
-
let
|
|
1080
|
+
const y = u.contents.findIndex((c) => c.id === e.id), h = u.contents[y];
|
|
1081
|
+
let l;
|
|
1086
1082
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1087
1083
|
editor: {
|
|
1088
|
-
$type:
|
|
1084
|
+
$type: a
|
|
1089
1085
|
},
|
|
1090
1086
|
name: this.designViewModelField.name,
|
|
1091
1087
|
require: this.designViewModelField.require,
|
|
1092
1088
|
readonly: this.designViewModelField.readonly
|
|
1093
|
-
}, !1),
|
|
1094
|
-
id:
|
|
1095
|
-
appearance:
|
|
1096
|
-
size:
|
|
1097
|
-
label:
|
|
1098
|
-
binding:
|
|
1099
|
-
visible:
|
|
1100
|
-
}), Object.assign(
|
|
1101
|
-
isTextArea:
|
|
1102
|
-
placeholder: (
|
|
1103
|
-
holdPlace: (
|
|
1104
|
-
readonly: (
|
|
1105
|
-
require: (s =
|
|
1106
|
-
}),
|
|
1107
|
-
(
|
|
1108
|
-
),
|
|
1109
|
-
}
|
|
1110
|
-
getComponentConfig(e,
|
|
1111
|
-
const
|
|
1089
|
+
}, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), l || (l = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(l, {
|
|
1090
|
+
id: h.id,
|
|
1091
|
+
appearance: h.appearance,
|
|
1092
|
+
size: h.size,
|
|
1093
|
+
label: h.label,
|
|
1094
|
+
binding: h.binding,
|
|
1095
|
+
visible: h.visible
|
|
1096
|
+
}), Object.assign(l.editor, {
|
|
1097
|
+
isTextArea: l.isTextArea && h.isTextArea,
|
|
1098
|
+
placeholder: (p = h.editor) == null ? void 0 : p.placeholder,
|
|
1099
|
+
holdPlace: (o = h.editor) == null ? void 0 : o.holdPlace,
|
|
1100
|
+
readonly: (d = h.editor) == null ? void 0 : d.readonly,
|
|
1101
|
+
require: (s = h.editor) == null ? void 0 : s.require
|
|
1102
|
+
}), u.contents.splice(y, 1), u.contents.splice(y, 0, l), r.schema = Object.assign(h, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1103
|
+
(c) => c.classList.remove("dgComponentSelected")
|
|
1104
|
+
), $e.value++;
|
|
1105
|
+
}
|
|
1106
|
+
getComponentConfig(e, i = {}, r = {}) {
|
|
1107
|
+
const a = Object.assign({
|
|
1112
1108
|
description: "编辑器",
|
|
1113
1109
|
title: "编辑器",
|
|
1114
1110
|
type: "input-group",
|
|
1115
1111
|
$converter: "/converter/property-editor.converter"
|
|
1116
|
-
},
|
|
1112
|
+
}, i), u = Object.assign({
|
|
1117
1113
|
readonly: {
|
|
1118
1114
|
description: "",
|
|
1119
1115
|
title: "只读",
|
|
@@ -1134,8 +1130,8 @@ class oe extends xe {
|
|
|
1134
1130
|
title: "提示文本",
|
|
1135
1131
|
type: "string"
|
|
1136
1132
|
}
|
|
1137
|
-
},
|
|
1138
|
-
return { ...
|
|
1133
|
+
}, r);
|
|
1134
|
+
return { ...a, properties: { ...u } };
|
|
1139
1135
|
}
|
|
1140
1136
|
/**
|
|
1141
1137
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1143,38 +1139,38 @@ class oe extends xe {
|
|
|
1143
1139
|
* @param controlId 控件Id
|
|
1144
1140
|
* @param componentId 控件所在组件id
|
|
1145
1141
|
*/
|
|
1146
|
-
updateUnifiedLayoutAfterControlChanged(e,
|
|
1147
|
-
const
|
|
1148
|
-
let
|
|
1149
|
-
|
|
1150
|
-
const
|
|
1151
|
-
id:
|
|
1152
|
-
columnInSM: parseInt(
|
|
1153
|
-
columnInMD: parseInt(
|
|
1154
|
-
columnInLG: parseInt(
|
|
1155
|
-
columnInEL: parseInt(
|
|
1142
|
+
updateUnifiedLayoutAfterControlChanged(e, i, r) {
|
|
1143
|
+
const a = e.split(" ");
|
|
1144
|
+
let u = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), y = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), h = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), l = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1145
|
+
u = u || "col-12", y = y || "col-md-" + u.replace("col-", ""), h = h || "col-xl-" + y.replace("col-md-", ""), l = l || "col-el-" + h.replace("col-xl-", "");
|
|
1146
|
+
const p = {
|
|
1147
|
+
id: i,
|
|
1148
|
+
columnInSM: parseInt(u.replace("col-", ""), 10),
|
|
1149
|
+
columnInMD: parseInt(y.replace("col-md-", ""), 10),
|
|
1150
|
+
columnInLG: parseInt(h.replace("col-xl-", ""), 10),
|
|
1151
|
+
columnInEL: parseInt(l.replace("col-el-", ""), 10)
|
|
1156
1152
|
};
|
|
1157
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1153
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, p);
|
|
1158
1154
|
}
|
|
1159
1155
|
/**
|
|
1160
1156
|
* 修改控件布局配置后更新Form统一布局配置
|
|
1161
1157
|
* @param componentId 组件Id
|
|
1162
1158
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1163
1159
|
*/
|
|
1164
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(e,
|
|
1165
|
-
const { formNode:
|
|
1166
|
-
if (!
|
|
1160
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, i) {
|
|
1161
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1162
|
+
if (!r || !r.unifiedLayout)
|
|
1167
1163
|
return;
|
|
1168
|
-
const
|
|
1169
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
1170
|
-
const
|
|
1171
|
-
Object.assign(
|
|
1164
|
+
const a = [];
|
|
1165
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, a, 1), i) {
|
|
1166
|
+
const c = a.find((f) => f.id === i.id);
|
|
1167
|
+
Object.assign(c || {}, i);
|
|
1172
1168
|
}
|
|
1173
|
-
const
|
|
1174
|
-
Object.assign(
|
|
1175
|
-
uniqueColClassInSM:
|
|
1176
|
-
uniqueColClassInMD:
|
|
1177
|
-
uniqueColClassInLG:
|
|
1169
|
+
const u = a.map((c) => c.columnInSM), y = a.map((c) => c.columnInMD), h = a.map((c) => c.columnInLG), l = a.map((c) => c.columnInEL), p = this.checkIsUniqueColumn(u) ? u[0] : null, o = this.checkIsUniqueColumn(y) ? y[0] : null, d = this.checkIsUniqueColumn(h) ? h[0] : null, s = this.checkIsUniqueColumn(l) ? l[0] : null;
|
|
1170
|
+
Object.assign(r.unifiedLayout, {
|
|
1171
|
+
uniqueColClassInSM: p,
|
|
1172
|
+
uniqueColClassInMD: o,
|
|
1173
|
+
uniqueColClassInLG: d,
|
|
1178
1174
|
uniqueColClassInEL: s
|
|
1179
1175
|
});
|
|
1180
1176
|
}
|
|
@@ -1182,19 +1178,22 @@ class oe extends xe {
|
|
|
1182
1178
|
* 校验宽度样式值是否一致
|
|
1183
1179
|
*/
|
|
1184
1180
|
checkIsUniqueColumn(e) {
|
|
1185
|
-
const
|
|
1186
|
-
return Array.from(
|
|
1181
|
+
const i = new Set(e);
|
|
1182
|
+
return Array.from(i).length === 1;
|
|
1187
1183
|
}
|
|
1188
1184
|
}
|
|
1189
|
-
class Ue extends
|
|
1185
|
+
class Ue extends ne {
|
|
1190
1186
|
constructor(t, e) {
|
|
1191
1187
|
super(t, e);
|
|
1192
1188
|
}
|
|
1193
1189
|
getEditorProperties(t) {
|
|
1194
|
-
|
|
1190
|
+
const e = this.getComponentConfig(t, { type: "check-group" }, {
|
|
1195
1191
|
placeholder: {
|
|
1196
1192
|
visible: !1
|
|
1197
1193
|
},
|
|
1194
|
+
disabled: {
|
|
1195
|
+
visible: !1
|
|
1196
|
+
},
|
|
1198
1197
|
textField: {
|
|
1199
1198
|
description: "",
|
|
1200
1199
|
title: "文本字段",
|
|
@@ -1205,15 +1204,38 @@ class Ue extends oe {
|
|
|
1205
1204
|
title: "值字段",
|
|
1206
1205
|
type: "string"
|
|
1207
1206
|
},
|
|
1208
|
-
|
|
1209
|
-
visible: !1,
|
|
1207
|
+
data: {
|
|
1210
1208
|
description: "",
|
|
1211
|
-
|
|
1209
|
+
title: "数据",
|
|
1210
|
+
type: "array",
|
|
1211
|
+
editor: {
|
|
1212
|
+
columns: [
|
|
1213
|
+
{ field: t.editor.valueField, title: "值", dataType: "string" },
|
|
1214
|
+
{ field: t.editor.textField, title: "名称", dataType: "string" },
|
|
1215
|
+
{ field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
|
|
1216
|
+
],
|
|
1217
|
+
type: "item-collection-editor",
|
|
1218
|
+
valueField: t.editor.valueField,
|
|
1219
|
+
nameField: t.editor.textField,
|
|
1220
|
+
requiredFields: [t.editor.valueField, t.editor.textField],
|
|
1221
|
+
uniqueFields: [t.editor.valueField, t.editor.textField]
|
|
1222
|
+
},
|
|
1223
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1224
|
+
refreshPanelAfterChanged: !0
|
|
1212
1225
|
}
|
|
1213
1226
|
});
|
|
1227
|
+
return e.setPropertyRelates = function(i) {
|
|
1228
|
+
if (i)
|
|
1229
|
+
switch (i.propertyID) {
|
|
1230
|
+
case "data": {
|
|
1231
|
+
i.propertyValue.parameters && (t.editor.valueField = i.propertyValue.parameters.valueField, t.editor.textField = i.propertyValue.parameters.nameField), t.editor.data = i.propertyValue.value;
|
|
1232
|
+
break;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}, e;
|
|
1214
1236
|
}
|
|
1215
1237
|
}
|
|
1216
|
-
class
|
|
1238
|
+
class qe extends ne {
|
|
1217
1239
|
constructor(t, e) {
|
|
1218
1240
|
super(t, e);
|
|
1219
1241
|
}
|
|
@@ -1222,6 +1244,9 @@ class We extends oe {
|
|
|
1222
1244
|
placeholder: {
|
|
1223
1245
|
visible: !1
|
|
1224
1246
|
},
|
|
1247
|
+
disabled: {
|
|
1248
|
+
visible: !1
|
|
1249
|
+
},
|
|
1225
1250
|
text: {
|
|
1226
1251
|
description: "",
|
|
1227
1252
|
title: "显示文本",
|
|
@@ -1235,141 +1260,103 @@ class We extends oe {
|
|
|
1235
1260
|
});
|
|
1236
1261
|
}
|
|
1237
1262
|
}
|
|
1238
|
-
function
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
checkCanMoveComponent: i,
|
|
1243
|
-
hideNestedPaddingInDesginerView: l,
|
|
1244
|
-
onAcceptMovedChildElement: p,
|
|
1245
|
-
resolveComponentContext: f,
|
|
1246
|
-
triggerBelongedComponentToMoveWhenMoved: m,
|
|
1247
|
-
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1248
|
-
} = ne(o), d = o.schema;
|
|
1249
|
-
function n(c, s) {
|
|
1250
|
-
return new Ue(c, t).getPropertyConfig(d, s);
|
|
1263
|
+
function We(n, t) {
|
|
1264
|
+
const e = n.schema;
|
|
1265
|
+
function i(r, a) {
|
|
1266
|
+
return new Ue(r, t).getPropertyConfig(e, a);
|
|
1251
1267
|
}
|
|
1252
|
-
return {
|
|
1253
|
-
canAccepts: e,
|
|
1254
|
-
checkCanDeleteComponent: r,
|
|
1255
|
-
checkCanMoveComponent: i,
|
|
1256
|
-
hideNestedPaddingInDesginerView: l,
|
|
1257
|
-
onAcceptMovedChildElement: p,
|
|
1258
|
-
resolveComponentContext: f,
|
|
1259
|
-
triggerBelongedComponentToMoveWhenMoved: m,
|
|
1260
|
-
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1261
|
-
getPropsConfig: n
|
|
1262
|
-
};
|
|
1268
|
+
return { getPropsConfig: i };
|
|
1263
1269
|
}
|
|
1264
|
-
function
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
checkCanMoveComponent: i,
|
|
1269
|
-
hideNestedPaddingInDesginerView: l,
|
|
1270
|
-
onAcceptMovedChildElement: p,
|
|
1271
|
-
resolveComponentContext: f,
|
|
1272
|
-
triggerBelongedComponentToMoveWhenMoved: m,
|
|
1273
|
-
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1274
|
-
} = ne(o), d = o.schema;
|
|
1275
|
-
function n(c, s) {
|
|
1276
|
-
return new We(c, t).getPropertyConfig(d, s);
|
|
1270
|
+
function je(n, t) {
|
|
1271
|
+
const e = n.schema;
|
|
1272
|
+
function i(r, a) {
|
|
1273
|
+
return new qe(r, t).getPropertyConfig(e, a);
|
|
1277
1274
|
}
|
|
1278
|
-
return {
|
|
1279
|
-
canAccepts: e,
|
|
1280
|
-
checkCanDeleteComponent: r,
|
|
1281
|
-
checkCanMoveComponent: i,
|
|
1282
|
-
hideNestedPaddingInDesginerView: l,
|
|
1283
|
-
onAcceptMovedChildElement: p,
|
|
1284
|
-
resolveComponentContext: f,
|
|
1285
|
-
triggerBelongedComponentToMoveWhenMoved: m,
|
|
1286
|
-
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1287
|
-
getPropsConfig: n
|
|
1288
|
-
};
|
|
1275
|
+
return { getPropsConfig: i };
|
|
1289
1276
|
}
|
|
1290
|
-
const
|
|
1277
|
+
const Oe = /* @__PURE__ */ D({
|
|
1291
1278
|
name: "FCheckboxGroupDesign",
|
|
1292
|
-
props:
|
|
1279
|
+
props: W,
|
|
1293
1280
|
emits: ["changeValue", "update:modelValue"],
|
|
1294
|
-
setup(
|
|
1295
|
-
const e =
|
|
1296
|
-
"farris-checkradio-hor":
|
|
1281
|
+
setup(n, t) {
|
|
1282
|
+
const e = M(n.modelValue), i = M(n.horizontal), r = M(n.tabIndex), a = M(n.name), u = x(() => ({
|
|
1283
|
+
"farris-checkradio-hor": i.value
|
|
1297
1284
|
})), {
|
|
1298
|
-
enumData:
|
|
1299
|
-
onClickCheckbox:
|
|
1300
|
-
getValue:
|
|
1301
|
-
getText:
|
|
1302
|
-
checked:
|
|
1303
|
-
} = ee(
|
|
1304
|
-
return
|
|
1305
|
-
|
|
1306
|
-
}), t.expose(
|
|
1285
|
+
enumData: y,
|
|
1286
|
+
onClickCheckbox: h,
|
|
1287
|
+
getValue: l,
|
|
1288
|
+
getText: p,
|
|
1289
|
+
checked: o
|
|
1290
|
+
} = ee(n, t, e), d = M(), s = I("designer-host-service"), c = I("design-item-context"), f = We(c, s), v = te(d, c, f);
|
|
1291
|
+
return N(() => {
|
|
1292
|
+
d.value.componentInstance = v;
|
|
1293
|
+
}), t.expose(v.value), A(() => n.modelValue, (g) => {
|
|
1307
1294
|
e.value = g, t.emit("changeValue", e.value);
|
|
1308
|
-
}), () =>
|
|
1309
|
-
ref:
|
|
1310
|
-
class: ["farris-input-wrap",
|
|
1311
|
-
}, [
|
|
1312
|
-
const
|
|
1313
|
-
return
|
|
1295
|
+
}), () => F("div", {
|
|
1296
|
+
ref: d,
|
|
1297
|
+
class: ["farris-input-wrap", u.value]
|
|
1298
|
+
}, [y.value.map((g, C) => {
|
|
1299
|
+
const w = "checkbox_" + a.value + C;
|
|
1300
|
+
return F("div", {
|
|
1314
1301
|
class: "custom-control custom-checkbox"
|
|
1315
|
-
}, [
|
|
1302
|
+
}, [F("input", {
|
|
1316
1303
|
type: "checkbox",
|
|
1317
1304
|
class: "custom-control-input",
|
|
1318
|
-
name:
|
|
1319
|
-
id:
|
|
1320
|
-
value:
|
|
1321
|
-
checked:
|
|
1322
|
-
disabled:
|
|
1323
|
-
tabindex:
|
|
1324
|
-
onClick: (
|
|
1325
|
-
}, null),
|
|
1305
|
+
name: a.value,
|
|
1306
|
+
id: w,
|
|
1307
|
+
value: l(g),
|
|
1308
|
+
checked: o(g),
|
|
1309
|
+
disabled: n.readonly || n.disabled,
|
|
1310
|
+
tabindex: r.value,
|
|
1311
|
+
onClick: (V) => h(g, V)
|
|
1312
|
+
}, null), F("label", {
|
|
1326
1313
|
class: "custom-control-label",
|
|
1327
|
-
for:
|
|
1328
|
-
title:
|
|
1329
|
-
}, [
|
|
1314
|
+
for: w,
|
|
1315
|
+
title: p(g)
|
|
1316
|
+
}, [p(g)])]);
|
|
1330
1317
|
})]);
|
|
1331
1318
|
}
|
|
1332
|
-
}), ze = /* @__PURE__ */
|
|
1319
|
+
}), ze = /* @__PURE__ */ D({
|
|
1333
1320
|
name: "FCheckBoxDesign",
|
|
1334
|
-
props:
|
|
1321
|
+
props: q,
|
|
1335
1322
|
emits: [],
|
|
1336
|
-
setup(
|
|
1337
|
-
const e =
|
|
1338
|
-
return
|
|
1339
|
-
e.value.componentInstance =
|
|
1340
|
-
}),
|
|
1341
|
-
|
|
1342
|
-
}), t.expose(
|
|
1323
|
+
setup(n, t) {
|
|
1324
|
+
const e = M(), i = M(n.id), r = M(n.indeterminate), a = I("designer-host-service"), u = I("design-item-context"), y = je(u, a), h = te(e, u, y);
|
|
1325
|
+
return N(() => {
|
|
1326
|
+
e.value.componentInstance = h;
|
|
1327
|
+
}), A(() => n.indeterminate, (l) => {
|
|
1328
|
+
r.value = l;
|
|
1329
|
+
}), t.expose(h.value), () => F("div", {
|
|
1343
1330
|
ref: e,
|
|
1344
|
-
dragref: `${
|
|
1331
|
+
dragref: `${u.schema.id}-container`,
|
|
1345
1332
|
class: "drag-container custom-control custom-checkbox"
|
|
1346
|
-
}, [
|
|
1333
|
+
}, [F("input", {
|
|
1347
1334
|
type: "checkbox",
|
|
1348
1335
|
class: "custom-control-input",
|
|
1349
|
-
id:
|
|
1350
|
-
value:
|
|
1351
|
-
checked:
|
|
1352
|
-
disabled:
|
|
1353
|
-
}, null),
|
|
1336
|
+
id: i,
|
|
1337
|
+
value: n.value,
|
|
1338
|
+
checked: n.modelValue,
|
|
1339
|
+
disabled: n.readonly || n.disabled
|
|
1340
|
+
}, null), F("div", {
|
|
1354
1341
|
class: "custom-control-label"
|
|
1355
1342
|
}, null)]);
|
|
1356
1343
|
}
|
|
1357
1344
|
});
|
|
1358
|
-
|
|
1359
|
-
|
|
1345
|
+
B.install = (n) => {
|
|
1346
|
+
n.component(B.name, B), n.component(G.name, G);
|
|
1360
1347
|
};
|
|
1361
|
-
|
|
1362
|
-
|
|
1348
|
+
B.register = (n, t, e, i) => {
|
|
1349
|
+
n["check-box"] = G, t["check-box"] = R, n["check-group"] = B, t["check-group"] = K;
|
|
1363
1350
|
};
|
|
1364
|
-
|
|
1365
|
-
|
|
1351
|
+
B.registerDesigner = (n, t, e) => {
|
|
1352
|
+
n["check-box"] = ze, t["check-box"] = R, n["check-group"] = Oe, t["check-group"] = K;
|
|
1366
1353
|
};
|
|
1367
1354
|
export {
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1355
|
+
G as FCheckBox,
|
|
1356
|
+
B as FCheckBoxGroup,
|
|
1357
|
+
K as checkBoxGroupPropsResolver,
|
|
1358
|
+
q as checkBoxProps,
|
|
1359
|
+
R as checkBoxPropsResolver,
|
|
1360
|
+
W as checkboxGroupProps,
|
|
1361
|
+
B as default
|
|
1375
1362
|
};
|