@farris/ui-vue 1.3.0 → 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 +454 -398
- 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 +479 -476
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +255 -252
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +652 -567
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +518 -521
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +659 -553
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +162 -155
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +866 -747
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +371 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1174 -1280
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +340 -991
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +6066 -5847
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3400 -3486
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2328 -2446
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9551 -1200
- 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 +234 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1996 -2630
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +138 -123
- 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 +548 -586
- 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 +2871 -3736
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3380 -3645
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10543 -3207
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9775 -1312
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +442 -438
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +587 -807
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +415 -381
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +361 -1024
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2265 -2371
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6425 -6257
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +6164 -5946
- 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 +524 -1474
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +547 -502
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +646 -574
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1181 -2028
- 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 +1185 -2027
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +442 -1368
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +238 -235
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1635 -1713
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +791 -716
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12203 -5274
- 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 +1873 -520
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +299 -300
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +176 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +715 -659
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1032 -1883
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4767 -5693
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +169 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +490 -1167
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +154 -151
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +575 -1204
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +279 -276
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +478 -428
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2591 -3326
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +442 -439
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +309 -307
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +500 -430
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1391 -1341
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +574 -575
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3422 -3536
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2661 -2764
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +675 -674
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +300 -297
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +454 -1089
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +709 -706
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +54780 -52757
- 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/directive/area-response.d.ts +10 -0
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +5 -4
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- 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.component.d.ts +3 -2
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +9 -11
- 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 +3 -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/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -41
- package/types/designer-canvas/src/types.d.ts +10 -21
- 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/designer/response-form-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
- 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 +6 -1
- 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/external-container/src/designer/use-designer-rules.d.ts +3 -3
- 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/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- 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/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +3 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -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 +43 -35
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- 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 +12 -0
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/query-solution/src/solutions.d.ts +108 -509
- 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-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- 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/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- 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/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- 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/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
|
@@ -1,100 +1,105 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var J = (n, e, t) => e in n ? z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var V = (n, e, t) => J(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as O, onBeforeMount as X, onMounted as j, createVNode as S, ref as D, inject as A, computed as Y } from "vue";
|
|
5
|
+
import { isPlainObject as $, cloneDeep as N } from "lodash-es";
|
|
6
|
+
import { getCustomClass as Z } from "../common/index.esm.js";
|
|
7
|
+
const R = {}, q = {};
|
|
8
|
+
function U(n) {
|
|
9
|
+
const { properties: e, title: t, ignore: o } = n, a = o && Array.isArray(o), c = Object.keys(e).reduce((r, f) => ((!a || !o.find((m) => m === f)) && (r[f] = e[f].type === "object" && e[f].properties ? U(e[f]) : N(e[f].default)), r), {});
|
|
10
|
+
if (t && (!a || !o.find((r) => r === "id"))) {
|
|
11
|
+
const r = t.toLowerCase().replace(/-/g, "_");
|
|
12
|
+
c.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
13
|
+
}
|
|
14
|
+
return c;
|
|
10
15
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
16
|
+
function G(n, e = {}, t) {
|
|
17
|
+
const o = R[n];
|
|
18
|
+
if (o) {
|
|
19
|
+
let a = U(o);
|
|
20
|
+
const c = q[n];
|
|
21
|
+
return a = c ? c({ getSchemaByType: G }, a, e, t) : a, a;
|
|
17
22
|
}
|
|
18
23
|
return null;
|
|
19
24
|
}
|
|
20
|
-
function
|
|
21
|
-
const t =
|
|
22
|
-
return Object.keys(
|
|
25
|
+
function I(n, e) {
|
|
26
|
+
const t = U(e);
|
|
27
|
+
return Object.keys(t).reduce((o, a) => (o[a] && $(o[a]) && $(n[a] || !n[a]) ? Object.assign(o[a], n[a] || {}) : o[a] = n[a], o), t), t;
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(
|
|
26
|
-
if (e.has(
|
|
27
|
-
const
|
|
28
|
-
if (typeof
|
|
29
|
-
|
|
29
|
+
function K(n, e) {
|
|
30
|
+
return Object.keys(n).filter((o) => n[o] != null).reduce((o, a) => {
|
|
31
|
+
if (e.has(a)) {
|
|
32
|
+
const c = e.get(a);
|
|
33
|
+
if (typeof c == "string")
|
|
34
|
+
o[c] = n[a];
|
|
30
35
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(
|
|
36
|
+
const r = c(a, n[a], n);
|
|
37
|
+
Object.assign(o, r);
|
|
33
38
|
}
|
|
34
39
|
} else
|
|
35
|
-
|
|
36
|
-
return
|
|
40
|
+
o[a] = n[a];
|
|
41
|
+
return o;
|
|
37
42
|
}, {});
|
|
38
43
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
return
|
|
44
|
+
function H(n, e, t = /* @__PURE__ */ new Map()) {
|
|
45
|
+
const o = I(n, e);
|
|
46
|
+
return K(o, t);
|
|
42
47
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
48
|
+
function x(n = {}) {
|
|
49
|
+
function e(i, s, l, p) {
|
|
50
|
+
if (typeof l == "number")
|
|
51
|
+
return p[i].length === l;
|
|
52
|
+
if (typeof l == "object") {
|
|
53
|
+
const d = Object.keys(l)[0], v = l[d];
|
|
54
|
+
if (d === "not")
|
|
55
|
+
return Number(p[i].length) !== Number(v);
|
|
56
|
+
if (d === "moreThan")
|
|
57
|
+
return Number(p[i].length) >= Number(v);
|
|
58
|
+
if (d === "lessThan")
|
|
59
|
+
return Number(p[i].length) <= Number(v);
|
|
55
60
|
}
|
|
56
61
|
return !1;
|
|
57
62
|
}
|
|
58
|
-
function t(
|
|
59
|
-
return
|
|
63
|
+
function t(i, s, l, p) {
|
|
64
|
+
return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(l);
|
|
60
65
|
}
|
|
61
|
-
const
|
|
66
|
+
const o = /* @__PURE__ */ new Map([
|
|
62
67
|
["length", e],
|
|
63
68
|
["getProperty", t]
|
|
64
69
|
]);
|
|
65
|
-
Object.keys(
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return typeof
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const
|
|
72
|
-
return { target:
|
|
70
|
+
Object.keys(n).reduce((i, s) => (i.set(s, n[s]), i), o);
|
|
71
|
+
function a(i, s) {
|
|
72
|
+
const l = i;
|
|
73
|
+
return typeof s == "number" ? [{ target: l, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: l, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
|
|
74
|
+
if (p === "length")
|
|
75
|
+
return { target: l, operator: "length", param: null, value: s[p] };
|
|
76
|
+
const d = p, v = s[p];
|
|
77
|
+
return { target: l, operator: "getProperty", param: d, value: v };
|
|
73
78
|
}) : [];
|
|
74
79
|
}
|
|
75
|
-
function
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const
|
|
78
|
-
return
|
|
80
|
+
function c(i) {
|
|
81
|
+
return Object.keys(i).reduce((l, p) => {
|
|
82
|
+
const d = a(p, i[p]);
|
|
83
|
+
return l.push(...d), l;
|
|
79
84
|
}, []);
|
|
80
85
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
return
|
|
86
|
+
function r(i, s) {
|
|
87
|
+
if (o.has(i.operator)) {
|
|
88
|
+
const l = o.get(i.operator);
|
|
89
|
+
return l && l(i.target, i.param, i.value, s) || !1;
|
|
85
90
|
}
|
|
86
91
|
return !1;
|
|
87
92
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
93
|
+
function f(i, s) {
|
|
94
|
+
return c(i).reduce((d, v) => d && r(v, s), !0);
|
|
90
95
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return
|
|
96
|
+
function m(i, s) {
|
|
97
|
+
const l = Object.keys(i), p = l.includes("allOf"), d = l.includes("anyOf"), v = p || d, M = (v ? i[v ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((P) => f(P, s));
|
|
98
|
+
return p ? !M.includes(!1) : M.includes(!0);
|
|
94
99
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
100
|
+
return { parseValueSchema: m };
|
|
96
101
|
}
|
|
97
|
-
const
|
|
102
|
+
const ee = {
|
|
98
103
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
99
104
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
100
105
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -132,21 +137,22 @@ const ie = {
|
|
|
132
137
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
133
138
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
134
139
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
135
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
141
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
142
|
+
}, te = {}, ne = {};
|
|
143
|
+
x();
|
|
144
|
+
function W(n, e, t = /* @__PURE__ */ new Map(), o = (r, f, m, i) => f, a = {}, c = (r) => r) {
|
|
145
|
+
return R[e.title] = e, q[e.title] = o, te[e.title] = a, ne[e.title] = c, (r = {}) => {
|
|
146
|
+
const f = H(r, e, t), m = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
|
|
147
|
+
return Object.assign(m, f);
|
|
142
148
|
};
|
|
143
149
|
}
|
|
144
|
-
function
|
|
150
|
+
function oe(n, e) {
|
|
145
151
|
return { customClass: e.class, customStyle: e.style };
|
|
146
152
|
}
|
|
147
|
-
const
|
|
148
|
-
["appearance",
|
|
149
|
-
]),
|
|
153
|
+
const _ = /* @__PURE__ */ new Map([
|
|
154
|
+
["appearance", oe]
|
|
155
|
+
]), ae = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/component.schema.json", ce = "component", ie = "A Farris Visual Component", se = "object", le = {
|
|
150
156
|
id: {
|
|
151
157
|
description: "The unique identifier for a component",
|
|
152
158
|
type: "string"
|
|
@@ -197,897 +203,252 @@ const R = /* @__PURE__ */ new Map([
|
|
|
197
203
|
type: "string",
|
|
198
204
|
default: ""
|
|
199
205
|
}
|
|
200
|
-
},
|
|
206
|
+
}, pe = [
|
|
201
207
|
"id",
|
|
202
208
|
"type",
|
|
203
209
|
"contents"
|
|
204
|
-
],
|
|
205
|
-
$schema:
|
|
206
|
-
$id:
|
|
207
|
-
title:
|
|
208
|
-
description:
|
|
209
|
-
type:
|
|
210
|
-
properties:
|
|
211
|
-
required:
|
|
210
|
+
], ue = {
|
|
211
|
+
$schema: ae,
|
|
212
|
+
$id: re,
|
|
213
|
+
title: ce,
|
|
214
|
+
description: ie,
|
|
215
|
+
type: se,
|
|
216
|
+
properties: le,
|
|
217
|
+
required: pe
|
|
212
218
|
};
|
|
213
|
-
function
|
|
219
|
+
function Q(n, e, t) {
|
|
214
220
|
return e;
|
|
215
221
|
}
|
|
216
|
-
const
|
|
222
|
+
const L = {
|
|
217
223
|
id: { type: String },
|
|
218
224
|
customClass: { type: String, default: "" },
|
|
219
|
-
|
|
220
|
-
|
|
225
|
+
customStyle: { type: String, default: "" },
|
|
226
|
+
componentType: { type: String, default: "" },
|
|
227
|
+
formColumns: { type: Number, default: 4 }
|
|
228
|
+
}, F = W(L, ue, _, Q), $e = Object.assign({}, L, { componentId: { type: String, default: "" } }), B = /* @__PURE__ */ O({
|
|
221
229
|
name: "FComponent",
|
|
222
|
-
props:
|
|
230
|
+
props: L,
|
|
223
231
|
emits: ["init", "afterViewInit"],
|
|
224
|
-
setup(
|
|
225
|
-
return
|
|
226
|
-
e.emit("init",
|
|
227
|
-
}),
|
|
228
|
-
e.emit("afterViewInit",
|
|
229
|
-
}), () =>
|
|
230
|
-
class:
|
|
232
|
+
setup(n, e) {
|
|
233
|
+
return X(() => {
|
|
234
|
+
e.emit("init", n.id);
|
|
235
|
+
}), j(() => {
|
|
236
|
+
e.emit("afterViewInit", n.id);
|
|
237
|
+
}), () => S("div", {
|
|
238
|
+
class: n.customClass
|
|
231
239
|
}, [e.slots.default && e.slots.default()]);
|
|
232
240
|
}
|
|
233
241
|
});
|
|
234
|
-
function
|
|
235
|
-
var
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
n();
|
|
240
|
-
const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
|
|
241
|
-
function g() {
|
|
242
|
+
function fe(n, e, t) {
|
|
243
|
+
var T;
|
|
244
|
+
const o = t && t.getStyles && t.getStyles() || "", a = t && t.getDesignerClass && t.getDesignerClass() || "", c = D();
|
|
245
|
+
function r() {
|
|
242
246
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
243
247
|
}
|
|
244
|
-
function
|
|
248
|
+
function f() {
|
|
245
249
|
return !1;
|
|
246
250
|
}
|
|
247
|
-
function
|
|
251
|
+
function m() {
|
|
248
252
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
249
253
|
}
|
|
250
|
-
function
|
|
254
|
+
function i() {
|
|
251
255
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
252
256
|
}
|
|
253
|
-
function
|
|
254
|
-
if (!
|
|
257
|
+
function s(u) {
|
|
258
|
+
if (!u || !u.value)
|
|
255
259
|
return null;
|
|
256
|
-
if (
|
|
257
|
-
return
|
|
258
|
-
const
|
|
259
|
-
return
|
|
260
|
+
if (u.value.schema && u.value.schema.type === "component")
|
|
261
|
+
return u.value;
|
|
262
|
+
const w = D(u == null ? void 0 : u.value.parent), b = s(w);
|
|
263
|
+
return b || null;
|
|
260
264
|
}
|
|
261
|
-
function
|
|
262
|
-
const { componentInstance:
|
|
263
|
-
return !
|
|
265
|
+
function l(u = e) {
|
|
266
|
+
const { componentInstance: w, designerItemElementRef: b } = u;
|
|
267
|
+
return !w || !w.value ? null : w.value.canMove ? b : l(u.parent);
|
|
264
268
|
}
|
|
265
|
-
function
|
|
266
|
-
return !!t && t.canAccepts(
|
|
269
|
+
function p(u) {
|
|
270
|
+
return !!t && t.canAccepts(u);
|
|
267
271
|
}
|
|
268
|
-
function
|
|
272
|
+
function d() {
|
|
269
273
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
270
274
|
}
|
|
271
|
-
function
|
|
272
|
-
}
|
|
273
|
-
function c(l, v) {
|
|
274
|
-
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
275
|
+
function v() {
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
let T = B(C, l, v);
|
|
279
|
-
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(l, T));
|
|
280
|
-
const O = C.toLowerCase().replace("-", "_");
|
|
281
|
-
return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
|
|
277
|
+
function y(u, w) {
|
|
278
|
+
w && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(w);
|
|
282
279
|
}
|
|
283
|
-
function
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
return A && !A.id && A.type === C && (A.id = `${V}_${Math.random().toString().slice(2, 6)}`), A;
|
|
280
|
+
function h(u, w) {
|
|
281
|
+
const { componentType: b } = u;
|
|
282
|
+
let C = G(b, u, w);
|
|
283
|
+
t && t.onResolveNewComponentSchema && (C = t.onResolveNewComponentSchema(u, C));
|
|
284
|
+
const E = b.toLowerCase().replace(/-/g, "_");
|
|
285
|
+
return C && !C.id && C.type === b && (C.id = `${E}_${Math.random().toString().slice(2, 6)}`), C;
|
|
290
286
|
}
|
|
291
|
-
function
|
|
287
|
+
function M(u) {
|
|
292
288
|
}
|
|
293
|
-
function
|
|
289
|
+
function g(...u) {
|
|
294
290
|
if (t && t.getPropsConfig)
|
|
295
|
-
return t.getPropsConfig(...
|
|
291
|
+
return t.getPropsConfig(...u);
|
|
296
292
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
293
|
+
function P() {
|
|
294
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((u) => {
|
|
295
|
+
var C;
|
|
296
|
+
let w = u.id;
|
|
297
|
+
u.type === "component-ref" && (w = u.component);
|
|
298
|
+
const b = n.value.querySelector(`#${w}-design-item`);
|
|
299
|
+
(C = b == null ? void 0 : b.componentInstance) != null && C.value.onRemoveComponent && b.componentInstance.value.onRemoveComponent();
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
return c.value = {
|
|
303
|
+
canMove: r(),
|
|
304
|
+
canSelectParent: f(),
|
|
305
|
+
canDelete: m(),
|
|
306
|
+
canNested: !i(),
|
|
302
307
|
contents: e == null ? void 0 : e.schema.contents,
|
|
303
|
-
elementRef:
|
|
304
|
-
parent: (
|
|
308
|
+
elementRef: n,
|
|
309
|
+
parent: (T = e == null ? void 0 : e.parent) == null ? void 0 : T.componentInstance,
|
|
305
310
|
schema: e == null ? void 0 : e.schema,
|
|
306
|
-
styles:
|
|
307
|
-
designerClass:
|
|
308
|
-
canAccepts:
|
|
309
|
-
getBelongedComponentInstance:
|
|
310
|
-
getDraggableDesignItemElement:
|
|
311
|
-
getDraggingDisplayText:
|
|
312
|
-
getPropConfig:
|
|
313
|
-
getDragScopeElement:
|
|
314
|
-
onAcceptMovedChildElement:
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}, y;
|
|
311
|
+
styles: o,
|
|
312
|
+
designerClass: a,
|
|
313
|
+
canAccepts: p,
|
|
314
|
+
getBelongedComponentInstance: s,
|
|
315
|
+
getDraggableDesignItemElement: l,
|
|
316
|
+
getDraggingDisplayText: d,
|
|
317
|
+
getPropConfig: g,
|
|
318
|
+
getDragScopeElement: v,
|
|
319
|
+
onAcceptMovedChildElement: y,
|
|
320
|
+
onChildElementMovedOut: M,
|
|
321
|
+
addNewChildComponentSchema: h,
|
|
322
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || D(!1),
|
|
323
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1),
|
|
324
|
+
onRemoveComponent: P
|
|
325
|
+
}, c;
|
|
322
326
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
"f-struct-form": {
|
|
350
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
351
|
-
type: "object",
|
|
352
|
-
properties: {
|
|
353
|
-
contents: {
|
|
354
|
-
type: "object",
|
|
355
|
-
properties: {
|
|
356
|
-
"f-section-form": {
|
|
357
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
358
|
-
type: "object",
|
|
359
|
-
properties: {
|
|
360
|
-
contents: {
|
|
361
|
-
type: "object",
|
|
362
|
-
properties: {
|
|
363
|
-
"f-form-layout": {
|
|
364
|
-
description: "The class of reponse form",
|
|
365
|
-
type: "object",
|
|
366
|
-
properties: {
|
|
367
|
-
rules: {
|
|
368
|
-
type: "object",
|
|
369
|
-
properties: {
|
|
370
|
-
canAccept: {
|
|
371
|
-
type: "boolean",
|
|
372
|
-
const: !0
|
|
373
|
-
},
|
|
374
|
-
fixed: {
|
|
375
|
-
type: "boolean",
|
|
376
|
-
const: !0
|
|
377
|
-
},
|
|
378
|
-
hidePadding: {
|
|
379
|
-
type: "boolean",
|
|
380
|
-
const: !1
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
rules: {
|
|
389
|
-
type: "object",
|
|
390
|
-
properties: {
|
|
391
|
-
canAccept: {
|
|
392
|
-
type: "boolean",
|
|
393
|
-
const: !1
|
|
394
|
-
},
|
|
395
|
-
fixed: {
|
|
396
|
-
type: "boolean",
|
|
397
|
-
const: !0
|
|
398
|
-
},
|
|
399
|
-
hidePadding: {
|
|
400
|
-
type: "boolean",
|
|
401
|
-
const: !0
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
|
-
rules: {
|
|
410
|
-
type: "object",
|
|
411
|
-
properties: {
|
|
412
|
-
canAccept: {
|
|
413
|
-
type: "boolean",
|
|
414
|
-
const: !1
|
|
415
|
-
},
|
|
416
|
-
fixed: {
|
|
417
|
-
type: "boolean",
|
|
418
|
-
const: !1
|
|
419
|
-
},
|
|
420
|
-
hidePadding: {
|
|
421
|
-
type: "boolean",
|
|
422
|
-
const: !0
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
"f-struct-wrapper": {
|
|
429
|
-
description: "",
|
|
430
|
-
type: "object",
|
|
431
|
-
properties: {
|
|
432
|
-
contents: {
|
|
433
|
-
type: "object",
|
|
434
|
-
properties: {
|
|
435
|
-
"f-section-tabs": {
|
|
436
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
437
|
-
type: "object",
|
|
438
|
-
properties: {
|
|
439
|
-
contents: {
|
|
440
|
-
type: "object",
|
|
441
|
-
properties: {
|
|
442
|
-
"f-tabs-in-card": {
|
|
443
|
-
description: "The class of tabs which contains sub-grid.",
|
|
444
|
-
type: "object",
|
|
445
|
-
properties: {
|
|
446
|
-
contents: {
|
|
447
|
-
type: "object",
|
|
448
|
-
properties: {
|
|
449
|
-
"f-struct-data-grid-in-card": {
|
|
450
|
-
description: "The class of sub-grid component",
|
|
451
|
-
type: "object",
|
|
452
|
-
properties: {
|
|
453
|
-
contents: {
|
|
454
|
-
type: "object",
|
|
455
|
-
properties: {
|
|
456
|
-
"f-grid-is-sub": {
|
|
457
|
-
description: "The class of sub-grid",
|
|
458
|
-
type: "object",
|
|
459
|
-
properties: {
|
|
460
|
-
rules: {
|
|
461
|
-
type: "object",
|
|
462
|
-
properties: {
|
|
463
|
-
canAccept: {
|
|
464
|
-
type: "boolean",
|
|
465
|
-
const: !0
|
|
466
|
-
},
|
|
467
|
-
fixed: {
|
|
468
|
-
type: "boolean",
|
|
469
|
-
const: !0
|
|
470
|
-
},
|
|
471
|
-
hidePadding: {
|
|
472
|
-
type: "boolean",
|
|
473
|
-
const: !1
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
rules: {
|
|
482
|
-
type: "object",
|
|
483
|
-
properties: {
|
|
484
|
-
canAccept: {
|
|
485
|
-
type: "boolean",
|
|
486
|
-
const: !1
|
|
487
|
-
},
|
|
488
|
-
fixed: {
|
|
489
|
-
type: "boolean",
|
|
490
|
-
const: !1
|
|
491
|
-
},
|
|
492
|
-
hidePadding: {
|
|
493
|
-
type: "boolean",
|
|
494
|
-
const: !0
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
rules: {
|
|
503
|
-
type: "object",
|
|
504
|
-
properties: {
|
|
505
|
-
canAccept: {
|
|
506
|
-
type: "boolean",
|
|
507
|
-
const: !1
|
|
508
|
-
},
|
|
509
|
-
fixed: {
|
|
510
|
-
type: "boolean",
|
|
511
|
-
const: !0
|
|
512
|
-
},
|
|
513
|
-
hidePadding: {
|
|
514
|
-
type: "boolean",
|
|
515
|
-
const: !0
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
rules: {
|
|
524
|
-
type: "object",
|
|
525
|
-
properties: {
|
|
526
|
-
canAccept: {
|
|
527
|
-
type: "boolean",
|
|
528
|
-
const: !1
|
|
529
|
-
},
|
|
530
|
-
fixed: {
|
|
531
|
-
type: "boolean",
|
|
532
|
-
const: !0
|
|
533
|
-
},
|
|
534
|
-
hidePadding: {
|
|
535
|
-
type: "boolean",
|
|
536
|
-
const: !0
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
"f-section-in-main": {
|
|
543
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
544
|
-
type: "object",
|
|
545
|
-
properties: {
|
|
546
|
-
rules: {
|
|
547
|
-
type: "object",
|
|
548
|
-
properties: {
|
|
549
|
-
canAccept: {
|
|
550
|
-
type: "boolean",
|
|
551
|
-
const: !0
|
|
552
|
-
},
|
|
553
|
-
fixed: {
|
|
554
|
-
type: "boolean",
|
|
555
|
-
const: !0
|
|
556
|
-
},
|
|
557
|
-
hidePadding: {
|
|
558
|
-
type: "boolean",
|
|
559
|
-
const: !1
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
},
|
|
567
|
-
rules: {
|
|
568
|
-
type: "object",
|
|
569
|
-
properties: {
|
|
570
|
-
canAccept: {
|
|
571
|
-
type: "boolean",
|
|
572
|
-
const: !1
|
|
573
|
-
},
|
|
574
|
-
fixed: {
|
|
575
|
-
type: "boolean",
|
|
576
|
-
const: !1
|
|
577
|
-
},
|
|
578
|
-
hidePadding: {
|
|
579
|
-
type: "boolean",
|
|
580
|
-
const: !0
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
rules: {
|
|
589
|
-
type: "object",
|
|
590
|
-
properties: {
|
|
591
|
-
canAccept: {
|
|
592
|
-
type: "boolean",
|
|
593
|
-
const: !0
|
|
594
|
-
},
|
|
595
|
-
fixed: {
|
|
596
|
-
type: "boolean",
|
|
597
|
-
const: !0
|
|
598
|
-
},
|
|
599
|
-
hidePadding: {
|
|
600
|
-
type: "object",
|
|
601
|
-
const: {
|
|
602
|
-
allOf: [
|
|
603
|
-
{
|
|
604
|
-
sibling: 0,
|
|
605
|
-
parent: {
|
|
606
|
-
"f-page-main": !0
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
]
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
"f-struct-data-grid": {
|
|
617
|
-
description: "",
|
|
618
|
-
type: "object",
|
|
619
|
-
properties: {
|
|
620
|
-
rules: {
|
|
621
|
-
type: "object",
|
|
622
|
-
properties: {
|
|
623
|
-
canAccept: {
|
|
624
|
-
type: "object",
|
|
625
|
-
const: !0
|
|
626
|
-
},
|
|
627
|
-
fixed: {
|
|
628
|
-
type: "boolean",
|
|
629
|
-
const: !0
|
|
630
|
-
},
|
|
631
|
-
hidePadding: {
|
|
632
|
-
type: "boolean",
|
|
633
|
-
const: !0
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
"f-page-main-content": {
|
|
640
|
-
description: "",
|
|
641
|
-
type: "object",
|
|
642
|
-
properties: {
|
|
643
|
-
contents: {
|
|
644
|
-
type: "object",
|
|
645
|
-
properties: {
|
|
646
|
-
"f-page-content-nav": {
|
|
647
|
-
description: "",
|
|
648
|
-
type: "object",
|
|
649
|
-
properties: {
|
|
650
|
-
contents: {
|
|
651
|
-
type: "object",
|
|
652
|
-
properties: {
|
|
653
|
-
"f-struct-data-grid-in-nav": {
|
|
654
|
-
description: "",
|
|
655
|
-
type: "object",
|
|
656
|
-
properties: {
|
|
657
|
-
contents: {
|
|
658
|
-
type: "object",
|
|
659
|
-
properties: {
|
|
660
|
-
"f-page-content-nav-extend": {
|
|
661
|
-
description: "",
|
|
662
|
-
type: "object"
|
|
663
|
-
},
|
|
664
|
-
"f-section-in-nav": {
|
|
665
|
-
description: "",
|
|
666
|
-
type: "object",
|
|
667
|
-
properties: {
|
|
668
|
-
rules: {
|
|
669
|
-
type: "object",
|
|
670
|
-
properties: {
|
|
671
|
-
canAccept: {
|
|
672
|
-
type: "boolean",
|
|
673
|
-
const: !1
|
|
674
|
-
},
|
|
675
|
-
fixed: {
|
|
676
|
-
type: "boolean",
|
|
677
|
-
const: !0
|
|
678
|
-
},
|
|
679
|
-
hidePadding: {
|
|
680
|
-
type: "boolean",
|
|
681
|
-
const: !1
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
},
|
|
689
|
-
rules: {
|
|
690
|
-
type: "object",
|
|
691
|
-
properties: {
|
|
692
|
-
canAccept: {
|
|
693
|
-
type: "boolean",
|
|
694
|
-
const: !0
|
|
695
|
-
},
|
|
696
|
-
fixed: {
|
|
697
|
-
type: "boolean",
|
|
698
|
-
const: !1
|
|
699
|
-
},
|
|
700
|
-
hidePadding: {
|
|
701
|
-
type: "boolean",
|
|
702
|
-
const: !0
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
"f-page-content-main": {
|
|
713
|
-
description: "",
|
|
714
|
-
type: "object",
|
|
715
|
-
properties: {}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
},
|
|
721
|
-
"f-page-content": {
|
|
722
|
-
description: "",
|
|
723
|
-
type: "object",
|
|
724
|
-
properties: {
|
|
725
|
-
contents: {
|
|
726
|
-
type: "object",
|
|
727
|
-
properties: {
|
|
728
|
-
"f-page-content-nav": {
|
|
729
|
-
description: "",
|
|
730
|
-
type: "object",
|
|
731
|
-
properties: {
|
|
732
|
-
contents: {
|
|
733
|
-
type: "object",
|
|
734
|
-
properties: {
|
|
735
|
-
"f-list-nav": {
|
|
736
|
-
description: "",
|
|
737
|
-
type: "object"
|
|
738
|
-
},
|
|
739
|
-
"f-list-nav-left": {
|
|
740
|
-
description: "",
|
|
741
|
-
type: "object"
|
|
742
|
-
},
|
|
743
|
-
"f-struct-data-grid-in-nav": {
|
|
744
|
-
description: "",
|
|
745
|
-
type: "object",
|
|
746
|
-
properties: {
|
|
747
|
-
contents: {
|
|
748
|
-
type: "object",
|
|
749
|
-
properties: {
|
|
750
|
-
"f-section-form": {
|
|
751
|
-
description: "",
|
|
752
|
-
type: "object",
|
|
753
|
-
properties: {
|
|
754
|
-
rules: {
|
|
755
|
-
type: "object",
|
|
756
|
-
properties: {
|
|
757
|
-
canAccept: {
|
|
758
|
-
type: "boolean",
|
|
759
|
-
const: !1
|
|
760
|
-
},
|
|
761
|
-
fixed: {
|
|
762
|
-
type: "boolean",
|
|
763
|
-
const: !0
|
|
764
|
-
},
|
|
765
|
-
hidePadding: {
|
|
766
|
-
type: "boolean",
|
|
767
|
-
const: !0
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
"f-section-grid": {
|
|
774
|
-
description: "",
|
|
775
|
-
type: "object",
|
|
776
|
-
properties: {
|
|
777
|
-
rules: {
|
|
778
|
-
type: "object",
|
|
779
|
-
properties: {
|
|
780
|
-
canAccept: {
|
|
781
|
-
type: "boolean",
|
|
782
|
-
const: !1
|
|
783
|
-
},
|
|
784
|
-
fixed: {
|
|
785
|
-
type: "boolean",
|
|
786
|
-
const: !0
|
|
787
|
-
},
|
|
788
|
-
hidePadding: {
|
|
789
|
-
type: "boolean",
|
|
790
|
-
const: !0
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
},
|
|
798
|
-
rules: {
|
|
799
|
-
type: "object",
|
|
800
|
-
properties: {
|
|
801
|
-
canAccept: {
|
|
802
|
-
type: "boolean",
|
|
803
|
-
const: !1
|
|
804
|
-
},
|
|
805
|
-
fixed: {
|
|
806
|
-
type: "boolean",
|
|
807
|
-
const: !0
|
|
808
|
-
},
|
|
809
|
-
hidePadding: {
|
|
810
|
-
type: "boolean",
|
|
811
|
-
const: !0
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
},
|
|
820
|
-
rules: {
|
|
821
|
-
type: "object",
|
|
822
|
-
properties: {
|
|
823
|
-
canAccept: {
|
|
824
|
-
type: "boolean",
|
|
825
|
-
const: !1
|
|
826
|
-
},
|
|
827
|
-
fixed: {
|
|
828
|
-
type: "boolean",
|
|
829
|
-
const: !0
|
|
830
|
-
},
|
|
831
|
-
hidePadding: {
|
|
832
|
-
type: "boolean",
|
|
833
|
-
const: !0
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
"f-page-content-main": {
|
|
839
|
-
description: "",
|
|
840
|
-
type: "object",
|
|
841
|
-
properties: {
|
|
842
|
-
rules: {
|
|
843
|
-
type: "object",
|
|
844
|
-
properties: {
|
|
845
|
-
canAccept: {
|
|
846
|
-
type: "boolean",
|
|
847
|
-
const: !1
|
|
848
|
-
},
|
|
849
|
-
fixed: {
|
|
850
|
-
type: "boolean",
|
|
851
|
-
const: !1
|
|
852
|
-
},
|
|
853
|
-
hidePadding: {
|
|
854
|
-
type: "boolean",
|
|
855
|
-
const: !0
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
rules: {
|
|
864
|
-
type: "object",
|
|
865
|
-
properties: {
|
|
866
|
-
canAccept: {
|
|
867
|
-
type: "boolean",
|
|
868
|
-
const: !1
|
|
869
|
-
},
|
|
870
|
-
fixed: {
|
|
871
|
-
type: "boolean",
|
|
872
|
-
const: !0
|
|
873
|
-
},
|
|
874
|
-
hidePadding: {
|
|
875
|
-
type: "boolean",
|
|
876
|
-
const: !0
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
},
|
|
884
|
-
rules: {
|
|
885
|
-
type: "object",
|
|
886
|
-
properties: {
|
|
887
|
-
canAccept: {
|
|
888
|
-
type: "object",
|
|
889
|
-
const: {
|
|
890
|
-
anyOf: [
|
|
891
|
-
{
|
|
892
|
-
children: 0
|
|
893
|
-
},
|
|
894
|
-
{
|
|
895
|
-
children: {
|
|
896
|
-
length: {
|
|
897
|
-
not: 1
|
|
898
|
-
},
|
|
899
|
-
"f-struct-like-card": !0
|
|
900
|
-
}
|
|
901
|
-
},
|
|
902
|
-
{
|
|
903
|
-
children: {
|
|
904
|
-
"scroll-spy": !1,
|
|
905
|
-
"f-page-content": !1,
|
|
906
|
-
"f-struct-like-card": !1
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
]
|
|
910
|
-
}
|
|
911
|
-
},
|
|
912
|
-
fixed: {
|
|
913
|
-
type: "boolean",
|
|
914
|
-
const: !0
|
|
915
|
-
},
|
|
916
|
-
hidePadding: {
|
|
917
|
-
type: "boolean",
|
|
918
|
-
const: !0
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
},
|
|
924
|
-
"f-page-footer": {
|
|
925
|
-
description: "The class of page footer designed by farris.",
|
|
926
|
-
type: "string"
|
|
327
|
+
class me {
|
|
328
|
+
getTemplateRule(e, t) {
|
|
329
|
+
const o = t == null ? void 0 : t.formSchemaUtils, a = o == null ? void 0 : o.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
330
|
+
if (!a)
|
|
331
|
+
return c;
|
|
332
|
+
const r = this.getComponentContext(e), { componentClassList: f } = r;
|
|
333
|
+
return f.forEach((m) => {
|
|
334
|
+
if (!m || !a[m])
|
|
335
|
+
return;
|
|
336
|
+
const { canMove: i, canDelete: s, canAccept: l } = a[m];
|
|
337
|
+
c.canMove = c.canMove && this.resolveRuleValue(i, r), c.canDelete = c.canDelete && this.resolveRuleValue(s, r), c.canAccept = c.canAccept && this.resolveRuleValue(l, r);
|
|
338
|
+
}), c;
|
|
339
|
+
}
|
|
340
|
+
resolveRuleValue(e, t) {
|
|
341
|
+
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
|
|
342
|
+
}
|
|
343
|
+
parseRuleValueSchema(e, t) {
|
|
344
|
+
const o = e.invalidContext || [];
|
|
345
|
+
let a = !0;
|
|
346
|
+
for (const c of o) {
|
|
347
|
+
if (c.firstLevelChild) {
|
|
348
|
+
if (c.firstLevelChild.class) {
|
|
349
|
+
const { firstLevelChildClassList: r } = t;
|
|
350
|
+
if (r && !r.includes(c.firstLevelChild.class)) {
|
|
351
|
+
a = !1;
|
|
352
|
+
continue;
|
|
927
353
|
}
|
|
928
354
|
}
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
type: "boolean",
|
|
935
|
-
const: !1
|
|
936
|
-
},
|
|
937
|
-
fixed: {
|
|
938
|
-
type: "boolean",
|
|
939
|
-
const: !0
|
|
940
|
-
},
|
|
941
|
-
hidePadding: {
|
|
942
|
-
type: "boolean",
|
|
943
|
-
const: !0
|
|
355
|
+
if (c.firstLevelChild.type) {
|
|
356
|
+
const { firstLevelChildSchema: r } = t;
|
|
357
|
+
if (!r || r.type !== c.firstLevelChild.type) {
|
|
358
|
+
a = !1;
|
|
359
|
+
continue;
|
|
944
360
|
}
|
|
945
361
|
}
|
|
946
362
|
}
|
|
363
|
+
if (c.secondLevelChild) {
|
|
364
|
+
if (c.secondLevelChild.class) {
|
|
365
|
+
const { secondLevelChildClassList: r } = t;
|
|
366
|
+
if (r && !r.includes(c.secondLevelChild.class)) {
|
|
367
|
+
a = !1;
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (c.secondLevelChild.type) {
|
|
372
|
+
const { secondLevelChildSchema: r } = t;
|
|
373
|
+
if (!r || r.type !== c.secondLevelChild.type) {
|
|
374
|
+
a = !1;
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (c.parent) {
|
|
380
|
+
if (c.parent.class) {
|
|
381
|
+
const { parentClassList: r } = t;
|
|
382
|
+
if (r && !r.includes(c.parent.class)) {
|
|
383
|
+
a = !1;
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if (c.parent.type) {
|
|
388
|
+
const { parentSchema: r } = t;
|
|
389
|
+
if (r && r.type !== c.parent.type) {
|
|
390
|
+
a = !1;
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
a = !0;
|
|
396
|
+
break;
|
|
947
397
|
}
|
|
948
|
-
|
|
949
|
-
"f-page-is-managelist": {
|
|
950
|
-
description: "The root class of mangement list page.",
|
|
951
|
-
type: "string"
|
|
952
|
-
},
|
|
953
|
-
"f-page-card": {
|
|
954
|
-
description: "",
|
|
955
|
-
type: "object"
|
|
956
|
-
},
|
|
957
|
-
"f-page-is-mainsubcard": {
|
|
958
|
-
description: "",
|
|
959
|
-
type: "object"
|
|
960
|
-
}
|
|
961
|
-
}, Ae = {
|
|
962
|
-
$schema: ve,
|
|
963
|
-
$id: Ce,
|
|
964
|
-
title: Pe,
|
|
965
|
-
description: we,
|
|
966
|
-
type: Me,
|
|
967
|
-
properties: Te
|
|
968
|
-
}, N = /* @__PURE__ */ new Map();
|
|
969
|
-
function Se() {
|
|
970
|
-
function r(o, i, c, p) {
|
|
971
|
-
var b;
|
|
972
|
-
if (typeof c == "number")
|
|
973
|
-
return ((b = p[o]) == null ? void 0 : b.length) === c;
|
|
974
|
-
if (typeof c == "object") {
|
|
975
|
-
const h = Object.keys(c)[0], w = c[h];
|
|
976
|
-
if (h === "not")
|
|
977
|
-
return Number(p[o].length) !== Number(w);
|
|
978
|
-
if (h === "moreThan")
|
|
979
|
-
return Number(p[o].length) >= Number(w);
|
|
980
|
-
if (h === "lessThan")
|
|
981
|
-
return Number(p[o].length) <= Number(w);
|
|
982
|
-
}
|
|
983
|
-
return !1;
|
|
984
|
-
}
|
|
985
|
-
function e(o, i, c, p) {
|
|
986
|
-
return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
|
|
987
|
-
}
|
|
988
|
-
function t(o, i, c, p) {
|
|
989
|
-
return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
|
|
990
|
-
}
|
|
991
|
-
function n(o, i, c, p) {
|
|
992
|
-
return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
|
|
993
|
-
}
|
|
994
|
-
const s = /* @__PURE__ */ new Map([
|
|
995
|
-
["length", r],
|
|
996
|
-
["hasChildren", e],
|
|
997
|
-
["hasSibling", n],
|
|
998
|
-
["hasParent", t]
|
|
999
|
-
]);
|
|
1000
|
-
function u(o, i) {
|
|
1001
|
-
const c = o;
|
|
1002
|
-
return typeof i == "number" ? [{ target: c, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((p) => {
|
|
1003
|
-
if (p === "length")
|
|
1004
|
-
return { target: c, operator: "length", param: null, value: i[p] };
|
|
1005
|
-
const b = p, h = i[p];
|
|
1006
|
-
return { target: c, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: b, value: h };
|
|
1007
|
-
}) : [];
|
|
1008
|
-
}
|
|
1009
|
-
function y(o, i) {
|
|
1010
|
-
if (s.has(o.operator)) {
|
|
1011
|
-
const c = s.get(o.operator);
|
|
1012
|
-
return c && c(o.target, o.param, o.value, i) || !1;
|
|
1013
|
-
}
|
|
1014
|
-
return !1;
|
|
1015
|
-
}
|
|
1016
|
-
function g(o, i) {
|
|
1017
|
-
return Object.keys(o).reduce((h, w) => {
|
|
1018
|
-
const S = u(w, o[w]);
|
|
1019
|
-
return h.push(...S), h;
|
|
1020
|
-
}, []).reduce((h, w) => h && y(w, i), !0);
|
|
398
|
+
return !a;
|
|
1021
399
|
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
400
|
+
getComponentContext(e) {
|
|
401
|
+
var y, h, M, g;
|
|
402
|
+
const t = e.schema, o = t.appearance && t.appearance.class || "", a = o.split(" ") || [], c = t.contents || [], r = c.length ? c[0] : null, f = r && r.appearance ? r.appearance.class : "", m = f ? f.split(" ") : [], i = (y = r == null ? void 0 : r.contents) != null && y.length ? r == null ? void 0 : r.contents[0] : null, s = i && i.appearance ? i.appearance.class : "", l = s ? s.split(" ") : [], p = t.type === "component" ? (M = (h = e.parent) == null ? void 0 : h.parent) == null ? void 0 : M.schema : (g = e.parent) == null ? void 0 : g.schema, d = p && p.appearance && p.appearance.class || "", v = d ? d.split(" ") : [];
|
|
403
|
+
return {
|
|
404
|
+
componentClass: o,
|
|
405
|
+
componentClassList: a,
|
|
406
|
+
childContents: c,
|
|
407
|
+
firstLevelChildSchema: r,
|
|
408
|
+
firstLevelChildClass: f,
|
|
409
|
+
firstLevelChildClassList: m,
|
|
410
|
+
secondLevelChildSchema: i,
|
|
411
|
+
secondLevelChildClass: s,
|
|
412
|
+
secondLevelChildClassList: l,
|
|
413
|
+
parentSchema: p,
|
|
414
|
+
parentClass: d,
|
|
415
|
+
parentClassList: v
|
|
1037
416
|
};
|
|
1038
417
|
}
|
|
1039
|
-
function f(o, i, c) {
|
|
1040
|
-
if (i.type === "object" && i.properties) {
|
|
1041
|
-
const { rules: p, contents: b } = i.properties;
|
|
1042
|
-
c.set(o, d(p)), b && Object.keys(b.properties).forEach(
|
|
1043
|
-
(h) => f(h, b.properties[h], c)
|
|
1044
|
-
);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
function m() {
|
|
1048
|
-
const { properties: o } = Ae;
|
|
1049
|
-
Object.keys(o).forEach((i) => {
|
|
1050
|
-
f(i, o[i], N);
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
|
-
function j(o, i) {
|
|
1054
|
-
const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1055
|
-
return N.has(o) ? N.get(o)(i) : c;
|
|
1056
|
-
}
|
|
1057
|
-
return m(), { getRuleValue: j };
|
|
1058
418
|
}
|
|
1059
|
-
class
|
|
419
|
+
class de {
|
|
1060
420
|
constructor(e, t) {
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
421
|
+
V(this, "componentId");
|
|
422
|
+
V(this, "viewModelId");
|
|
423
|
+
V(this, "eventsEditorUtils");
|
|
424
|
+
V(this, "formSchemaUtils");
|
|
425
|
+
V(this, "formMetadataConverter");
|
|
426
|
+
V(this, "designViewModelUtils");
|
|
427
|
+
V(this, "designViewModelField");
|
|
428
|
+
V(this, "controlCreatorUtils");
|
|
429
|
+
V(this, "designerHostService");
|
|
430
|
+
V(this, "schemaService", null);
|
|
431
|
+
V(this, "metadataService", null);
|
|
432
|
+
V(this, "propertyConfig", {
|
|
1073
433
|
type: "object",
|
|
1074
434
|
categories: {}
|
|
1075
435
|
});
|
|
1076
|
-
var
|
|
1077
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
436
|
+
var o;
|
|
437
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
1078
438
|
}
|
|
1079
439
|
getTableInfo() {
|
|
1080
440
|
var e;
|
|
1081
441
|
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1082
442
|
}
|
|
1083
443
|
setDesignViewModelField(e) {
|
|
444
|
+
var o;
|
|
1084
445
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1085
446
|
if (t) {
|
|
1086
447
|
if (!this.designViewModelField) {
|
|
1087
|
-
const
|
|
1088
|
-
this.designViewModelField =
|
|
448
|
+
const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
449
|
+
this.designViewModelField = a.fields.find((c) => c.id === t);
|
|
1089
450
|
}
|
|
1090
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
451
|
+
e.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
|
|
1091
452
|
}
|
|
1092
453
|
}
|
|
1093
454
|
changeFieldEditorType(e, t) {
|
|
@@ -1111,7 +472,7 @@ class Oe {
|
|
|
1111
472
|
type: "combo-list",
|
|
1112
473
|
textField: "name",
|
|
1113
474
|
valueField: "value",
|
|
1114
|
-
data: [{ value: e.type, name:
|
|
475
|
+
data: [{ value: e.type, name: ee[e.type].name }]
|
|
1115
476
|
}
|
|
1116
477
|
}
|
|
1117
478
|
}
|
|
@@ -1144,14 +505,14 @@ class Oe {
|
|
|
1144
505
|
* @returns
|
|
1145
506
|
*/
|
|
1146
507
|
updateElementByParentContainer(e, t) {
|
|
1147
|
-
const
|
|
1148
|
-
if (!
|
|
508
|
+
const o = t && t.parent && t.parent.schema;
|
|
509
|
+
if (!o)
|
|
1149
510
|
return;
|
|
1150
|
-
const
|
|
1151
|
-
|
|
511
|
+
const a = o.contents.findIndex((r) => r.id === e), c = N(o.contents[a]);
|
|
512
|
+
o.contents.splice(a, 1), o.contents.splice(a, 0, c);
|
|
1152
513
|
}
|
|
1153
514
|
}
|
|
1154
|
-
class
|
|
515
|
+
class he extends de {
|
|
1155
516
|
constructor(e, t) {
|
|
1156
517
|
super(e, t);
|
|
1157
518
|
}
|
|
@@ -1168,93 +529,105 @@ class Ee extends Oe {
|
|
|
1168
529
|
label: "onAfterViewInit",
|
|
1169
530
|
name: "视图初始化后事件"
|
|
1170
531
|
}
|
|
1171
|
-
];
|
|
1172
|
-
|
|
1173
|
-
const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
|
|
1174
|
-
u[n.viewModelId] = {
|
|
532
|
+
], o = this, a = o.eventsEditorUtils.formProperties(e, o.viewModelId, t), c = {};
|
|
533
|
+
c[o.viewModelId] = {
|
|
1175
534
|
type: "events-editor",
|
|
1176
535
|
editor: {
|
|
1177
|
-
initialData:
|
|
536
|
+
initialData: a
|
|
1178
537
|
}
|
|
1179
538
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
1180
539
|
title: "事件",
|
|
1181
540
|
hideTitle: !0,
|
|
1182
|
-
properties:
|
|
541
|
+
properties: c,
|
|
1183
542
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1184
543
|
refreshPanelAfterChanged: !0,
|
|
1185
544
|
tabId: "commands",
|
|
1186
545
|
tabName: "交互",
|
|
1187
|
-
setPropertyRelates(
|
|
1188
|
-
const
|
|
1189
|
-
delete e[
|
|
546
|
+
setPropertyRelates(r, f) {
|
|
547
|
+
const m = r.propertyValue;
|
|
548
|
+
delete e[o.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(e, o.viewModelId, m.events, m));
|
|
1190
549
|
}
|
|
1191
550
|
};
|
|
1192
551
|
}
|
|
1193
552
|
}
|
|
1194
|
-
function
|
|
1195
|
-
const t =
|
|
1196
|
-
|
|
1197
|
-
const y = !1, g = r.schema;
|
|
1198
|
-
function P() {
|
|
553
|
+
function ye(n, e) {
|
|
554
|
+
const t = new me(), { canMove: o, canDelete: a } = t.getTemplateRule(n, e);
|
|
555
|
+
function c() {
|
|
1199
556
|
return !1;
|
|
1200
557
|
}
|
|
1201
|
-
function
|
|
1202
|
-
return
|
|
1203
|
-
}
|
|
1204
|
-
function d() {
|
|
1205
|
-
return !u;
|
|
558
|
+
function r() {
|
|
559
|
+
return a;
|
|
1206
560
|
}
|
|
1207
561
|
function f() {
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
562
|
+
return o;
|
|
563
|
+
}
|
|
564
|
+
function m() {
|
|
565
|
+
return !1;
|
|
566
|
+
}
|
|
567
|
+
function i() {
|
|
568
|
+
return " display: inherit;flex-direction: inherit;margin-bottom:10px";
|
|
569
|
+
}
|
|
570
|
+
function s(y) {
|
|
571
|
+
const h = new he(y, e), { schema: M } = n;
|
|
572
|
+
return h.getPropertyConfig(M);
|
|
573
|
+
}
|
|
574
|
+
function l() {
|
|
575
|
+
var P, T, u, w;
|
|
576
|
+
const y = n == null ? void 0 : n.schema, M = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(y.id);
|
|
577
|
+
if (y.componentType !== "data-grid" && y.componentType !== "form" || !((P = n.componentInstance) != null && P.value.parent))
|
|
1216
578
|
return;
|
|
579
|
+
const g = (T = n.componentInstance) == null ? void 0 : T.value.parent.schema;
|
|
580
|
+
if ((u = g == null ? void 0 : g.toolbar) != null && u.buttons && g.toolbar.buttons.length) {
|
|
581
|
+
g.toolbar.buttons.forEach((C) => {
|
|
582
|
+
const E = C.onClick, k = E && E.split(".");
|
|
583
|
+
if (!k || k.length < 3)
|
|
584
|
+
return;
|
|
585
|
+
k[k.length - 2] === M && (C.needRemove = !0);
|
|
586
|
+
}), g.toolbar.buttons = g.toolbar.buttons.filter((C) => !C.needRemove);
|
|
587
|
+
const b = (w = n.componentInstance) == null ? void 0 : w.value.parent;
|
|
588
|
+
b.parent && b.parent.updateToolbarItems && b.parent.updateToolbarItems();
|
|
1217
589
|
}
|
|
1218
|
-
const l = r.parent.parent, v = l && l.schema, C = v && v.appearance ? v.appearance.class : "", T = C ? C.split(" ") : [];
|
|
1219
|
-
s = {
|
|
1220
|
-
componentClass: i,
|
|
1221
|
-
componentClassList: c,
|
|
1222
|
-
childContents: p,
|
|
1223
|
-
firstChildContent: b,
|
|
1224
|
-
firstChildClass: h,
|
|
1225
|
-
firstChildClassList: w,
|
|
1226
|
-
parent: v,
|
|
1227
|
-
parentClass: C,
|
|
1228
|
-
parentClassList: T,
|
|
1229
|
-
children: p,
|
|
1230
|
-
childrenClassList: S
|
|
1231
|
-
};
|
|
1232
|
-
const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
|
|
1233
|
-
n = V, u = A;
|
|
1234
590
|
}
|
|
1235
|
-
function
|
|
1236
|
-
|
|
591
|
+
function p() {
|
|
592
|
+
const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema;
|
|
593
|
+
if (y && h) {
|
|
594
|
+
const g = h.getViewModelIdByComponentId(M.id);
|
|
595
|
+
y.deleteViewModelById(g), h.deleteComponent(M.id);
|
|
596
|
+
}
|
|
1237
597
|
}
|
|
1238
|
-
function
|
|
1239
|
-
|
|
598
|
+
function d() {
|
|
599
|
+
const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema, g = h.getViewModelIdByComponentId(M.id);
|
|
600
|
+
y.getDgViewModel(g).fields.forEach((P) => {
|
|
601
|
+
if (h.getExpressions() && h.getExpressions().length) {
|
|
602
|
+
const T = h.getExpressions().findIndex((u) => u.fieldId === P.id);
|
|
603
|
+
T > -1 && h.getExpressions().splice(T, 1);
|
|
604
|
+
}
|
|
605
|
+
});
|
|
1240
606
|
}
|
|
1241
|
-
|
|
607
|
+
function v() {
|
|
608
|
+
l(), d(), p();
|
|
609
|
+
}
|
|
610
|
+
return { canAccepts: c, checkCanDeleteComponent: r, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: m, getStyles: i, getPropsConfig: s, onRemoveComponent: v };
|
|
1242
611
|
}
|
|
1243
|
-
const
|
|
612
|
+
const ge = /* @__PURE__ */ O({
|
|
1244
613
|
name: "FComponetDesign",
|
|
1245
|
-
props:
|
|
614
|
+
props: L,
|
|
1246
615
|
emits: [],
|
|
1247
|
-
setup(
|
|
1248
|
-
const t =
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
616
|
+
setup(n, e) {
|
|
617
|
+
const t = D(), o = A("designer-host-service"), a = A("design-item-context"), c = ye(a, o), r = fe(t, a, c), f = Y(() => Z({
|
|
618
|
+
"drag-container": !0
|
|
619
|
+
}, n == null ? void 0 : n.customClass));
|
|
620
|
+
return j(() => {
|
|
621
|
+
var m, i, s, l;
|
|
622
|
+
t.value.componentInstance = r, ((i = (m = a.parent) == null ? void 0 : m.schema) == null ? void 0 : i.type) === "component-ref" && (r.value.parent = (l = (s = a.parent) == null ? void 0 : s.parent) == null ? void 0 : l.componentInstance);
|
|
623
|
+
}), e.expose(r.value), () => S("div", {
|
|
1252
624
|
ref: t,
|
|
1253
|
-
class:
|
|
1254
|
-
|
|
625
|
+
class: f.value,
|
|
626
|
+
style: n.customStyle,
|
|
627
|
+
"data-dragref": `${a.schema.id}-container`
|
|
1255
628
|
}, [e.slots.default && e.slots.default()]);
|
|
1256
629
|
}
|
|
1257
|
-
}),
|
|
630
|
+
}), be = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/component.schema.json", Me = "component-ref", we = "A Farris Visual Component", Ce = "object", Ve = {
|
|
1258
631
|
id: {
|
|
1259
632
|
description: "The unique identifier for a Section",
|
|
1260
633
|
type: "string"
|
|
@@ -1269,37 +642,37 @@ const Ve = /* @__PURE__ */ z({
|
|
|
1269
642
|
type: "string",
|
|
1270
643
|
default: ""
|
|
1271
644
|
}
|
|
1272
|
-
},
|
|
645
|
+
}, Pe = [
|
|
1273
646
|
"id",
|
|
1274
647
|
"type",
|
|
1275
648
|
"component"
|
|
1276
|
-
],
|
|
1277
|
-
$schema:
|
|
1278
|
-
$id:
|
|
1279
|
-
title:
|
|
1280
|
-
description:
|
|
1281
|
-
type:
|
|
1282
|
-
properties:
|
|
1283
|
-
required:
|
|
1284
|
-
},
|
|
649
|
+
], Te = {
|
|
650
|
+
$schema: be,
|
|
651
|
+
$id: ve,
|
|
652
|
+
title: Me,
|
|
653
|
+
description: we,
|
|
654
|
+
type: Ce,
|
|
655
|
+
properties: Ve,
|
|
656
|
+
required: Pe
|
|
657
|
+
}, De = {
|
|
1285
658
|
id: { type: String },
|
|
1286
659
|
component: { type: String, default: "" }
|
|
1287
|
-
},
|
|
1288
|
-
install(
|
|
1289
|
-
|
|
660
|
+
}, Ee = W(De, Te, _, Q), Fe = {
|
|
661
|
+
install(n) {
|
|
662
|
+
n.component(B.name, B);
|
|
1290
663
|
},
|
|
1291
|
-
register(
|
|
1292
|
-
|
|
664
|
+
register(n, e, t, o) {
|
|
665
|
+
n.component = B, e.component = F;
|
|
1293
666
|
},
|
|
1294
|
-
registerDesigner(
|
|
1295
|
-
|
|
667
|
+
registerDesigner(n, e) {
|
|
668
|
+
n.component = ge, e.component = F, e["component-ref"] = Ee;
|
|
1296
669
|
}
|
|
1297
670
|
};
|
|
1298
671
|
export {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
672
|
+
B as Component,
|
|
673
|
+
ge as ComponentDesign,
|
|
674
|
+
$e as componentDesignProps,
|
|
675
|
+
L as componentProps,
|
|
676
|
+
Fe as default,
|
|
677
|
+
F as propsResolver
|
|
1305
678
|
};
|