@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,95 +1,98 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { resolveAppearance as
|
|
7
|
-
import { useDesignerComponent as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var O = (i, o, e) => o in i ? j(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
|
|
3
|
+
var f = (i, o, e) => O(i, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { ref as I, computed as B, defineComponent as x, createVNode as b, inject as P, onMounted as Z } from "vue";
|
|
5
|
+
import { isPlainObject as V, cloneDeep as N } from "lodash-es";
|
|
6
|
+
import { resolveAppearance as z } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
import { DgControl as L, useDesignerComponent as K } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as J } from "../common/index.esm.js";
|
|
9
|
+
const X = {}, Y = {};
|
|
10
|
+
function D(i) {
|
|
11
|
+
const { properties: o, title: e, ignore: n } = i, r = n && Array.isArray(n), s = Object.keys(o).reduce((l, m) => ((!r || !n.find((y) => y === m)) && (l[m] = o[m].type === "object" && o[m].properties ? D(o[m]) : N(o[m].default)), l), {});
|
|
12
|
+
if (e && (!r || !n.find((l) => l === "id"))) {
|
|
13
|
+
const l = e.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
s.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
15
|
+
}
|
|
16
|
+
return s;
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
const e =
|
|
17
|
-
return Object.keys(
|
|
18
|
+
function $(i, o) {
|
|
19
|
+
const e = D(o);
|
|
20
|
+
return Object.keys(e).reduce((n, r) => (n[r] && V(n[r]) && V(i[r] || !i[r]) ? Object.assign(n[r], i[r] || {}) : n[r] = i[r], n), e), e;
|
|
18
21
|
}
|
|
19
|
-
function
|
|
20
|
-
return Object.keys(
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
23
|
-
if (typeof
|
|
24
|
-
|
|
22
|
+
function _(i, o) {
|
|
23
|
+
return Object.keys(i).filter((n) => i[n] != null).reduce((n, r) => {
|
|
24
|
+
if (o.has(r)) {
|
|
25
|
+
const s = o.get(r);
|
|
26
|
+
if (typeof s == "string")
|
|
27
|
+
n[s] = i[r];
|
|
25
28
|
else {
|
|
26
|
-
const l =
|
|
27
|
-
Object.assign(
|
|
29
|
+
const l = s(r, i[r], i);
|
|
30
|
+
Object.assign(n, l);
|
|
28
31
|
}
|
|
29
32
|
} else
|
|
30
|
-
|
|
31
|
-
return
|
|
33
|
+
n[r] = i[r];
|
|
34
|
+
return n;
|
|
32
35
|
}, {});
|
|
33
36
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
+
function ee(i, o, e = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const n = $(i, o);
|
|
39
|
+
return _(n, e);
|
|
37
40
|
}
|
|
38
|
-
function
|
|
39
|
-
function
|
|
40
|
-
if (typeof
|
|
41
|
-
return
|
|
42
|
-
if (typeof
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
return Number(
|
|
46
|
-
if (
|
|
47
|
-
return Number(
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
41
|
+
function te(i = {}) {
|
|
42
|
+
function o(a, d, t, p) {
|
|
43
|
+
if (typeof t == "number")
|
|
44
|
+
return p[a].length === t;
|
|
45
|
+
if (typeof t == "object") {
|
|
46
|
+
const c = Object.keys(t)[0], A = t[c];
|
|
47
|
+
if (c === "not")
|
|
48
|
+
return Number(p[a].length) !== Number(A);
|
|
49
|
+
if (c === "moreThan")
|
|
50
|
+
return Number(p[a].length) >= Number(A);
|
|
51
|
+
if (c === "lessThan")
|
|
52
|
+
return Number(p[a].length) <= Number(A);
|
|
50
53
|
}
|
|
51
54
|
return !1;
|
|
52
55
|
}
|
|
53
|
-
function e(
|
|
54
|
-
return
|
|
56
|
+
function e(a, d, t, p) {
|
|
57
|
+
return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(t);
|
|
55
58
|
}
|
|
56
|
-
const
|
|
57
|
-
["length",
|
|
59
|
+
const n = /* @__PURE__ */ new Map([
|
|
60
|
+
["length", o],
|
|
58
61
|
["getProperty", e]
|
|
59
62
|
]);
|
|
60
|
-
Object.keys(
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
return typeof d == "number" ? [{ target:
|
|
64
|
-
if (
|
|
65
|
-
return { target:
|
|
66
|
-
const
|
|
67
|
-
return { target:
|
|
63
|
+
Object.keys(i).reduce((a, d) => (a.set(d, i[d]), a), n);
|
|
64
|
+
function r(a, d) {
|
|
65
|
+
const t = a;
|
|
66
|
+
return typeof d == "number" ? [{ target: t, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: t, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((p) => {
|
|
67
|
+
if (p === "length")
|
|
68
|
+
return { target: t, operator: "length", param: null, value: d[p] };
|
|
69
|
+
const c = p, A = d[p];
|
|
70
|
+
return { target: t, operator: "getProperty", param: c, value: A };
|
|
68
71
|
}) : [];
|
|
69
72
|
}
|
|
70
|
-
function a
|
|
71
|
-
return Object.keys(
|
|
72
|
-
const
|
|
73
|
-
return
|
|
73
|
+
function s(a) {
|
|
74
|
+
return Object.keys(a).reduce((t, p) => {
|
|
75
|
+
const c = r(p, a[p]);
|
|
76
|
+
return t.push(...c), t;
|
|
74
77
|
}, []);
|
|
75
78
|
}
|
|
76
|
-
function l(
|
|
77
|
-
if (
|
|
78
|
-
const
|
|
79
|
-
return
|
|
79
|
+
function l(a, d) {
|
|
80
|
+
if (n.has(a.operator)) {
|
|
81
|
+
const t = n.get(a.operator);
|
|
82
|
+
return t && t(a.target, a.param, a.value, d) || !1;
|
|
80
83
|
}
|
|
81
84
|
return !1;
|
|
82
85
|
}
|
|
83
|
-
function
|
|
84
|
-
return a
|
|
86
|
+
function m(a, d) {
|
|
87
|
+
return s(a).reduce((c, A) => c && l(A, d), !0);
|
|
85
88
|
}
|
|
86
|
-
function
|
|
87
|
-
const
|
|
88
|
-
return
|
|
89
|
+
function y(a, d) {
|
|
90
|
+
const t = Object.keys(a), p = t.includes("allOf"), c = t.includes("anyOf"), A = p || c, v = (A ? a[A ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) => m(k, d));
|
|
91
|
+
return p ? !v.includes(!1) : v.includes(!0);
|
|
89
92
|
}
|
|
90
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: y };
|
|
91
94
|
}
|
|
92
|
-
const
|
|
95
|
+
const u = {
|
|
93
96
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
94
97
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
95
98
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -127,21 +130,22 @@ const c = {
|
|
|
127
130
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
128
131
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
129
132
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
130
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
134
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
135
|
+
}, ne = {}, re = {};
|
|
136
|
+
te();
|
|
137
|
+
function oe(i, o, e = /* @__PURE__ */ new Map(), n = (l, m, y, a) => m, r = {}, s = (l) => l) {
|
|
138
|
+
return X[o.title] = o, Y[o.title] = n, ne[o.title] = r, re[o.title] = s, (l = {}) => {
|
|
139
|
+
const m = ee(l, o, e), y = Object.keys(i).reduce((a, d) => (a[d] = i[d].default, a), {});
|
|
140
|
+
return Object.assign(y, m);
|
|
137
141
|
};
|
|
138
142
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
143
|
+
function ie(i, o, e) {
|
|
144
|
+
return o;
|
|
141
145
|
}
|
|
142
|
-
const
|
|
143
|
-
["appearance",
|
|
144
|
-
]),
|
|
146
|
+
const ae = /* @__PURE__ */ new Map([
|
|
147
|
+
["appearance", z]
|
|
148
|
+
]), se = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/avatar.schema.json", ce = "avatar", de = "A Farris Component", pe = "object", ue = {
|
|
145
149
|
id: {
|
|
146
150
|
description: "The unique identifier for avatar",
|
|
147
151
|
type: "string"
|
|
@@ -203,23 +207,24 @@ const _ = /* @__PURE__ */ new Map([
|
|
|
203
207
|
type: "boolean",
|
|
204
208
|
default: !0
|
|
205
209
|
}
|
|
206
|
-
},
|
|
210
|
+
}, Ae = [
|
|
207
211
|
"id",
|
|
208
212
|
"type"
|
|
209
|
-
],
|
|
213
|
+
], me = [
|
|
210
214
|
"id",
|
|
211
215
|
"appearance",
|
|
212
|
-
"binding"
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
$
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
"binding",
|
|
217
|
+
"visible"
|
|
218
|
+
], ye = {
|
|
219
|
+
$schema: se,
|
|
220
|
+
$id: le,
|
|
221
|
+
title: ce,
|
|
222
|
+
description: de,
|
|
223
|
+
type: pe,
|
|
224
|
+
properties: ue,
|
|
225
|
+
required: Ae,
|
|
226
|
+
ignore: me
|
|
227
|
+
}, T = {
|
|
223
228
|
/**
|
|
224
229
|
* 头像宽度
|
|
225
230
|
*/
|
|
@@ -256,152 +261,119 @@ const _ = /* @__PURE__ */ new Map([
|
|
|
256
261
|
* 支持的头像类型
|
|
257
262
|
*/
|
|
258
263
|
imageType: { type: Array, default: ["jpeg"] }
|
|
259
|
-
},
|
|
260
|
-
function
|
|
261
|
-
const
|
|
262
|
-
function l(
|
|
263
|
-
return
|
|
264
|
+
}, H = oe(T, ye, ae, ie);
|
|
265
|
+
function q(i, o, e, n) {
|
|
266
|
+
const r = "data:image/jpeg;base64,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", s = I(i.readonly);
|
|
267
|
+
function l(c) {
|
|
268
|
+
return c.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
264
269
|
}
|
|
265
|
-
function
|
|
266
|
-
return
|
|
270
|
+
function m(c) {
|
|
271
|
+
return c.indexOf("data:image/") > -1;
|
|
267
272
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
273
|
+
function y(c) {
|
|
274
|
+
return c ? "data:image/jpeg;base64," + c : "";
|
|
270
275
|
}
|
|
271
|
-
const
|
|
272
|
-
var
|
|
273
|
-
if (!
|
|
276
|
+
const a = B(() => {
|
|
277
|
+
var A;
|
|
278
|
+
if (!i.imageType || !i.imageType.length)
|
|
274
279
|
return "";
|
|
275
|
-
const
|
|
276
|
-
return !
|
|
277
|
-
}), d =
|
|
278
|
-
const
|
|
279
|
-
return l(
|
|
280
|
-
}),
|
|
281
|
-
function
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
return { acceptTypes:
|
|
280
|
+
const c = (A = i.imageType) == null ? void 0 : A.map((g) => (g === "jpg" && (g = "jpeg"), `image/${g}`));
|
|
281
|
+
return !c || !c.length ? "image/*" : c.join(",");
|
|
282
|
+
}), d = B(() => {
|
|
283
|
+
const c = n.value || i.cover || r;
|
|
284
|
+
return l(c) || m(c) ? c : y(c);
|
|
285
|
+
}), t = B(() => s.value ? "" : i.title);
|
|
286
|
+
function p() {
|
|
287
|
+
s.value || e && e.value && e.value.click();
|
|
288
|
+
}
|
|
289
|
+
return { acceptTypes: a, imageSource: d, imageTitle: t, onClickImage: p };
|
|
285
290
|
}
|
|
286
|
-
const
|
|
291
|
+
const E = /* @__PURE__ */ x({
|
|
287
292
|
name: "FAvatar",
|
|
288
|
-
props:
|
|
293
|
+
props: T,
|
|
289
294
|
emits: ["change", "update:modelValue"],
|
|
290
|
-
setup(
|
|
291
|
-
const e =
|
|
295
|
+
setup(i, o) {
|
|
296
|
+
const e = B(() => ({
|
|
292
297
|
"f-avatar": !0,
|
|
293
|
-
"f-avatar-readonly":
|
|
294
|
-
"f-avatar-circle":
|
|
295
|
-
"f-avatar-square":
|
|
296
|
-
})),
|
|
297
|
-
width:
|
|
298
|
-
height:
|
|
299
|
-
})),
|
|
298
|
+
"f-avatar-readonly": i.readonly,
|
|
299
|
+
"f-avatar-circle": i.shape === "circle",
|
|
300
|
+
"f-avatar-square": i.shape === "square"
|
|
301
|
+
})), n = I(i.modelValue), r = B(() => ({
|
|
302
|
+
width: i.avatarWidth + "px",
|
|
303
|
+
height: i.avatarHeight + "px"
|
|
304
|
+
})), s = !1;
|
|
300
305
|
function l() {
|
|
301
306
|
return "";
|
|
302
307
|
}
|
|
303
|
-
function
|
|
308
|
+
function m() {
|
|
304
309
|
}
|
|
305
|
-
const
|
|
306
|
-
acceptTypes:
|
|
310
|
+
const y = I(null), {
|
|
311
|
+
acceptTypes: a,
|
|
307
312
|
imageSource: d,
|
|
308
|
-
onClickImage:
|
|
309
|
-
} =
|
|
310
|
-
return () =>
|
|
313
|
+
onClickImage: t
|
|
314
|
+
} = q(i, o, y, n);
|
|
315
|
+
return () => b("div", {
|
|
311
316
|
class: e.value,
|
|
312
|
-
style:
|
|
313
|
-
onClick:
|
|
314
|
-
}, [
|
|
315
|
-
title:
|
|
317
|
+
style: r.value,
|
|
318
|
+
onClick: t
|
|
319
|
+
}, [s, b("img", {
|
|
320
|
+
title: i.title,
|
|
316
321
|
class: "f-avatar-image",
|
|
317
322
|
src: d.value,
|
|
318
323
|
onError: l
|
|
319
|
-
}, null), !
|
|
324
|
+
}, null), !i.readonly && b("div", {
|
|
320
325
|
class: "f-avatar-icon"
|
|
321
|
-
}, [
|
|
326
|
+
}, [b("span", {
|
|
322
327
|
class: "f-icon f-icon-camera"
|
|
323
|
-
}, null)]),
|
|
328
|
+
}, null)]), b("input", {
|
|
324
329
|
ref: "file",
|
|
325
330
|
name: "file-input",
|
|
326
331
|
type: "file",
|
|
327
332
|
class: "f-avatar-upload",
|
|
328
|
-
accept:
|
|
329
|
-
onChange:
|
|
333
|
+
accept: a.value,
|
|
334
|
+
onChange: m,
|
|
330
335
|
style: "display: none;"
|
|
331
336
|
}, null)]);
|
|
332
337
|
}
|
|
333
338
|
});
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
function p(s) {
|
|
350
|
-
}
|
|
351
|
-
function i() {
|
|
352
|
-
}
|
|
353
|
-
function d(s) {
|
|
354
|
-
return null;
|
|
355
|
-
}
|
|
356
|
-
return {
|
|
357
|
-
canAccepts: o,
|
|
358
|
-
checkCanDeleteComponent: a,
|
|
359
|
-
checkCanMoveComponent: l,
|
|
360
|
-
hideNestedPaddingInDesginerView: u,
|
|
361
|
-
onAcceptMovedChildElement: p,
|
|
362
|
-
resolveComponentContext: i,
|
|
363
|
-
triggerBelongedComponentToMoveWhenMoved: e,
|
|
364
|
-
triggerBelongedComponentToDeleteWhenDeleted: t,
|
|
365
|
-
getPropsConfig: d
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
class pe {
|
|
369
|
-
constructor(n, e) {
|
|
370
|
-
y(this, "componentId");
|
|
371
|
-
y(this, "viewModelId");
|
|
372
|
-
y(this, "eventsEditorUtils");
|
|
373
|
-
y(this, "formSchemaUtils");
|
|
374
|
-
y(this, "formMetadataConverter");
|
|
375
|
-
y(this, "designViewModelUtils");
|
|
376
|
-
y(this, "designViewModelField");
|
|
377
|
-
y(this, "controlCreatorUtils");
|
|
378
|
-
y(this, "designerHostService");
|
|
379
|
-
y(this, "schemaService", null);
|
|
380
|
-
y(this, "metadataService", null);
|
|
381
|
-
y(this, "propertyConfig", {
|
|
339
|
+
class ge {
|
|
340
|
+
constructor(o, e) {
|
|
341
|
+
f(this, "componentId");
|
|
342
|
+
f(this, "viewModelId");
|
|
343
|
+
f(this, "eventsEditorUtils");
|
|
344
|
+
f(this, "formSchemaUtils");
|
|
345
|
+
f(this, "formMetadataConverter");
|
|
346
|
+
f(this, "designViewModelUtils");
|
|
347
|
+
f(this, "designViewModelField");
|
|
348
|
+
f(this, "controlCreatorUtils");
|
|
349
|
+
f(this, "designerHostService");
|
|
350
|
+
f(this, "schemaService", null);
|
|
351
|
+
f(this, "metadataService", null);
|
|
352
|
+
f(this, "propertyConfig", {
|
|
382
353
|
type: "object",
|
|
383
354
|
categories: {}
|
|
384
355
|
});
|
|
385
|
-
var
|
|
386
|
-
this.componentId =
|
|
356
|
+
var n;
|
|
357
|
+
this.componentId = o, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(o)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
387
358
|
}
|
|
388
359
|
getTableInfo() {
|
|
389
|
-
var
|
|
390
|
-
return (
|
|
360
|
+
var o;
|
|
361
|
+
return (o = this.schemaService) == null ? void 0 : o.getTableInfoByViewModelId(this.viewModelId);
|
|
391
362
|
}
|
|
392
|
-
setDesignViewModelField(
|
|
393
|
-
|
|
363
|
+
setDesignViewModelField(o) {
|
|
364
|
+
var n;
|
|
365
|
+
const e = o.binding && o.binding.type === "Form" && o.binding.field;
|
|
394
366
|
if (e) {
|
|
395
367
|
if (!this.designViewModelField) {
|
|
396
|
-
const
|
|
397
|
-
this.designViewModelField =
|
|
368
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
369
|
+
this.designViewModelField = r.fields.find((s) => s.id === e);
|
|
398
370
|
}
|
|
399
|
-
|
|
371
|
+
o.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
|
|
400
372
|
}
|
|
401
373
|
}
|
|
402
|
-
changeFieldEditorType(
|
|
374
|
+
changeFieldEditorType(o, e) {
|
|
403
375
|
}
|
|
404
|
-
getBasicPropConfig(
|
|
376
|
+
getBasicPropConfig(o) {
|
|
405
377
|
return {
|
|
406
378
|
description: "Basic Information",
|
|
407
379
|
title: "基本信息",
|
|
@@ -420,13 +392,13 @@ class pe {
|
|
|
420
392
|
type: "combo-list",
|
|
421
393
|
textField: "name",
|
|
422
394
|
valueField: "value",
|
|
423
|
-
data: [{ value:
|
|
395
|
+
data: [{ value: o.type, name: u[o.type].name }]
|
|
424
396
|
}
|
|
425
397
|
}
|
|
426
398
|
}
|
|
427
399
|
};
|
|
428
400
|
}
|
|
429
|
-
getAppearanceConfig(
|
|
401
|
+
getAppearanceConfig(o = null) {
|
|
430
402
|
return {
|
|
431
403
|
title: "样式",
|
|
432
404
|
description: "Appearance",
|
|
@@ -452,100 +424,205 @@ class pe {
|
|
|
452
424
|
* @param componentInstance
|
|
453
425
|
* @returns
|
|
454
426
|
*/
|
|
455
|
-
updateElementByParentContainer(
|
|
456
|
-
const
|
|
457
|
-
if (!
|
|
427
|
+
updateElementByParentContainer(o, e) {
|
|
428
|
+
const n = e && e.parent && e.parent.schema;
|
|
429
|
+
if (!n)
|
|
458
430
|
return;
|
|
459
|
-
const
|
|
460
|
-
|
|
431
|
+
const r = n.contents.findIndex((l) => l.id === o), s = N(n.contents[r]);
|
|
432
|
+
n.contents.splice(r, 1), n.contents.splice(r, 0, s);
|
|
461
433
|
}
|
|
462
434
|
}
|
|
463
|
-
const
|
|
435
|
+
const S = class S {
|
|
464
436
|
/**
|
|
465
437
|
* 根据绑定字段类型获取可用的输入类控件
|
|
466
438
|
*/
|
|
467
|
-
static getEditorTypesByMDataType(
|
|
468
|
-
const e =
|
|
439
|
+
static getEditorTypesByMDataType(o) {
|
|
440
|
+
const e = S.fieldControlTypeMapping[o];
|
|
469
441
|
return e || [{ key: "", value: "" }];
|
|
470
442
|
}
|
|
471
443
|
/**
|
|
472
444
|
* 获取所有输入类控件
|
|
473
445
|
*/
|
|
474
446
|
static getAllInputTypes() {
|
|
475
|
-
const
|
|
476
|
-
for (
|
|
477
|
-
|
|
478
|
-
|
|
447
|
+
const o = [];
|
|
448
|
+
for (const e in S.fieldControlTypeMapping)
|
|
449
|
+
S.fieldControlTypeMapping[e].forEach((n) => {
|
|
450
|
+
o.find((r) => r.key === n.key && r.value === n.value) || o.push({ key: n.key, value: n.value });
|
|
479
451
|
});
|
|
480
|
-
return
|
|
452
|
+
return o;
|
|
481
453
|
}
|
|
482
454
|
};
|
|
483
455
|
/**
|
|
484
456
|
* <字段类型,可配置的控件类型列表>的映射
|
|
485
457
|
*/
|
|
486
|
-
|
|
458
|
+
f(S, "fieldControlTypeMapping", {
|
|
487
459
|
String: [
|
|
488
|
-
{ key:
|
|
489
|
-
{ key:
|
|
490
|
-
{ key:
|
|
491
|
-
{ key:
|
|
492
|
-
{ key:
|
|
493
|
-
{ key:
|
|
494
|
-
{ key:
|
|
460
|
+
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
461
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
462
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name },
|
|
463
|
+
{ key: u["check-box"].type, value: u["check-box"].name },
|
|
464
|
+
{ key: u["check-group"].type, value: u["check-group"].name },
|
|
465
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name },
|
|
466
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
467
|
+
{ key: u.textarea.type, value: u.textarea.name }
|
|
495
468
|
],
|
|
496
469
|
Text: [
|
|
497
|
-
{ key:
|
|
498
|
-
{ key:
|
|
470
|
+
{ key: u.textarea.type, value: u.textarea.name },
|
|
471
|
+
{ key: u.lookup.type, value: u.lookup.name }
|
|
499
472
|
],
|
|
500
473
|
Decimal: [
|
|
501
|
-
{ key:
|
|
474
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
502
475
|
],
|
|
503
476
|
Integer: [
|
|
504
|
-
{ key:
|
|
477
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
505
478
|
],
|
|
506
479
|
Number: [
|
|
507
|
-
{ key:
|
|
480
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
508
481
|
],
|
|
509
482
|
BigNumber: [
|
|
510
|
-
{ key:
|
|
483
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
511
484
|
],
|
|
512
485
|
Date: [
|
|
513
|
-
{ key:
|
|
486
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
514
487
|
],
|
|
515
488
|
DateTime: [
|
|
516
|
-
{ key:
|
|
489
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
517
490
|
],
|
|
518
491
|
Boolean: [
|
|
519
|
-
{ key:
|
|
520
|
-
{ key:
|
|
492
|
+
{ key: u.switch.type, value: u.switch.name },
|
|
493
|
+
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
521
494
|
],
|
|
522
495
|
Enum: [
|
|
523
|
-
{ key:
|
|
524
|
-
{ key:
|
|
496
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
497
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
525
498
|
],
|
|
526
499
|
Object: [
|
|
527
|
-
{ key:
|
|
528
|
-
{ key:
|
|
529
|
-
{ key:
|
|
500
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
501
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
502
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
530
503
|
]
|
|
531
504
|
});
|
|
532
|
-
let
|
|
533
|
-
const
|
|
534
|
-
class
|
|
535
|
-
constructor(
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
this
|
|
547
|
-
|
|
505
|
+
let w = S;
|
|
506
|
+
const fe = I(0);
|
|
507
|
+
class he {
|
|
508
|
+
constructor() {
|
|
509
|
+
/** 控件标题 */
|
|
510
|
+
f(this, "label", "");
|
|
511
|
+
/** 控件id */
|
|
512
|
+
f(this, "id", "");
|
|
513
|
+
/** 每个控件占用的栅格数 */
|
|
514
|
+
f(this, "columnInSM", 12);
|
|
515
|
+
f(this, "columnInMD", 6);
|
|
516
|
+
f(this, "columnInLG", 3);
|
|
517
|
+
f(this, "columnInEL", 2);
|
|
518
|
+
/** 每个控件占用的列数 */
|
|
519
|
+
f(this, "displayWidthInSM", 1);
|
|
520
|
+
f(this, "displayWidthInMD", 1);
|
|
521
|
+
f(this, "displayWidthInLG", 1);
|
|
522
|
+
f(this, "displayWidthInEL", 1);
|
|
523
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
524
|
+
f(this, "displayColumnCountAtBreakPoint", "md");
|
|
525
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
526
|
+
f(this, "tagRow", 0);
|
|
527
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
528
|
+
f(this, "showTopBorder", 0);
|
|
529
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
530
|
+
f(this, "group", 1);
|
|
531
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
532
|
+
f(this, "isSupportedClass", !0);
|
|
533
|
+
/** 控件所在分组id(设计器用的) */
|
|
534
|
+
f(this, "fieldSetId", "");
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function ve(i) {
|
|
538
|
+
let o, e;
|
|
539
|
+
const n = /* @__PURE__ */ new Map();
|
|
540
|
+
let r = [];
|
|
541
|
+
function s(d, t) {
|
|
542
|
+
const c = d.split(" ").filter((C) => C.startsWith("col-"));
|
|
543
|
+
if (c.length === 0) {
|
|
544
|
+
t.isSupportedClass = !1;
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
let A = c.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), g = c.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), h = c.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = c.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
548
|
+
A = A || "col-12", t.columnInSM = parseInt(A.replace("col-", ""), 10), t.displayWidthInSM = t.columnInSM / 12, t.displayWidthInSM !== 1 && (t.isSupportedClass = !1), g = g || "col-md-" + t.columnInSM, t.columnInMD = parseInt(g.replace("col-md-", ""), 10), t.displayWidthInMD = t.columnInMD / 6, [1, 2].includes(t.displayWidthInMD) || (t.isSupportedClass = !1), h = h || "col-xl-" + t.columnInMD, t.columnInLG = parseInt(h.replace("col-xl-", ""), 10), t.displayWidthInLG = t.columnInLG / 3, [1, 2, 3, 4].includes(t.displayWidthInLG) || (t.isSupportedClass = !1), v = v || "col-el-" + t.columnInLG, t.columnInEL = parseInt(v.replace("col-el-", ""), 10), t.displayWidthInEL = t.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(t.displayWidthInEL) || (t.isSupportedClass = !1);
|
|
549
|
+
}
|
|
550
|
+
function l(d, t, p, c = !1) {
|
|
551
|
+
let A = !1;
|
|
552
|
+
d.contents.forEach((g) => {
|
|
553
|
+
if (g.type === "fieldset") {
|
|
554
|
+
p += 1, l(g, t, p, !0), A = !0;
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
A && (p += 1, A = !1);
|
|
558
|
+
const h = g.appearance && g.appearance.class, v = new he();
|
|
559
|
+
h ? s(h, v) : v.isSupportedClass = !1, v.label = g.label || g.id, v.id = g.id, v.group = p, c && (v.fieldSetId = d.id), e === g.id && (o = p), n.set(g.id, g), t.push(v);
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
function m(d) {
|
|
563
|
+
const t = i.getComponentById(d);
|
|
564
|
+
if (!t || !t.componentType || !t.componentType.startsWith("form"))
|
|
565
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
566
|
+
const p = i.selectNode(t, (c) => c.type === L["response-form"].type);
|
|
567
|
+
return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
|
|
568
|
+
}
|
|
569
|
+
function y(d, t) {
|
|
570
|
+
t = t || d.id;
|
|
571
|
+
const { result: p, message: c, formNode: A } = m(t);
|
|
572
|
+
if (!p)
|
|
573
|
+
return { result: p, message: c };
|
|
574
|
+
e = d.id, r = [], n.clear();
|
|
575
|
+
const g = A.contents[0].type === L.fieldset.type ? 0 : 1;
|
|
576
|
+
l(A, r, g);
|
|
577
|
+
const h = r.find((C) => !C.isSupportedClass);
|
|
548
578
|
return {
|
|
579
|
+
defaultState: {
|
|
580
|
+
defaultGroupNumber: o || 1,
|
|
581
|
+
model: h ? "customize" : "standard"
|
|
582
|
+
},
|
|
583
|
+
importData: r
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
function a(d, t) {
|
|
587
|
+
t = t;
|
|
588
|
+
const { result: p, formNode: c } = m(t);
|
|
589
|
+
if (!p)
|
|
590
|
+
return "";
|
|
591
|
+
const A = [];
|
|
592
|
+
return d.forEach((g) => {
|
|
593
|
+
var C;
|
|
594
|
+
const h = n.get(g.id), v = h.appearance && h.appearance.class;
|
|
595
|
+
if (v) {
|
|
596
|
+
const F = v.split(" ").filter((R) => !R.startsWith("col-")), M = "col-" + g.columnInSM, U = "col-md-" + g.columnInMD, Q = "col-xl-" + g.columnInLG, W = "col-el-" + g.columnInEL, G = [M, U, Q, W].concat(F);
|
|
597
|
+
h.appearance.class = G.join(" ");
|
|
598
|
+
}
|
|
599
|
+
if (g.fieldSetId) {
|
|
600
|
+
const k = c.contents.find((M) => M.id === g.fieldSetId), F = A.find((M) => M.id === g.fieldSetId);
|
|
601
|
+
F ? (C = F.contents) == null || C.push(h) : (A.push(k), k.contents = [h]);
|
|
602
|
+
} else
|
|
603
|
+
A.push(h);
|
|
604
|
+
}), c.contents = A, c.id;
|
|
605
|
+
}
|
|
606
|
+
return {
|
|
607
|
+
checkCanFindFormNode: m,
|
|
608
|
+
checkCanOpenLayoutEditor: y,
|
|
609
|
+
changeFormControlsByResponseLayoutConfig: a,
|
|
610
|
+
getResonseFormLayoutConfig: l
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
class Ce extends ge {
|
|
614
|
+
constructor(e, n) {
|
|
615
|
+
super(e, n);
|
|
616
|
+
f(this, "responseLayoutEditorFunction");
|
|
617
|
+
this.responseLayoutEditorFunction = ve(this.formSchemaUtils);
|
|
618
|
+
}
|
|
619
|
+
getPropertyConfig(e, n) {
|
|
620
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
621
|
+
}
|
|
622
|
+
getBasicProperties(e, n) {
|
|
623
|
+
var s;
|
|
624
|
+
const r = this;
|
|
625
|
+
return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
549
626
|
description: "Basic Information",
|
|
550
627
|
title: "基本信息",
|
|
551
628
|
properties: {
|
|
@@ -566,7 +643,7 @@ class ue extends pe {
|
|
|
566
643
|
textField: "value",
|
|
567
644
|
valueField: "key",
|
|
568
645
|
editable: !1,
|
|
569
|
-
data:
|
|
646
|
+
data: r.designViewModelField ? w.getEditorTypesByMDataType((s = r.designViewModelField.type) == null ? void 0 : s.name) : w.getAllInputTypes()
|
|
570
647
|
}
|
|
571
648
|
},
|
|
572
649
|
label: {
|
|
@@ -577,41 +654,37 @@ class ue extends pe {
|
|
|
577
654
|
binding: {
|
|
578
655
|
description: "绑定的表单字段",
|
|
579
656
|
title: "绑定",
|
|
580
|
-
$converter: "/converter/field-selector.converter",
|
|
581
657
|
editor: {
|
|
582
|
-
type: "
|
|
658
|
+
type: "binding-selector",
|
|
583
659
|
bindingType: { enable: !1 },
|
|
584
660
|
editorParams: {
|
|
585
|
-
|
|
586
|
-
|
|
661
|
+
componentSchema: e,
|
|
662
|
+
needSyncToViewModel: !0,
|
|
663
|
+
viewModelId: this.viewModelId,
|
|
664
|
+
designerHostService: this.designerHostService,
|
|
665
|
+
disableOccupiedFields: !0
|
|
587
666
|
},
|
|
588
|
-
|
|
589
|
-
{ field: "name", title: "字段名称" },
|
|
590
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
591
|
-
{ field: "fieldType", title: "字段类型" }
|
|
592
|
-
],
|
|
593
|
-
textField: "bindingField",
|
|
594
|
-
data: l
|
|
667
|
+
textField: "bindingField"
|
|
595
668
|
}
|
|
596
669
|
}
|
|
597
670
|
},
|
|
598
|
-
setPropertyRelates(
|
|
599
|
-
if (
|
|
600
|
-
switch (
|
|
671
|
+
setPropertyRelates(l, m) {
|
|
672
|
+
if (l)
|
|
673
|
+
switch (l && l.propertyID) {
|
|
601
674
|
case "type": {
|
|
602
|
-
|
|
675
|
+
r.changeControlType(e, l, n);
|
|
603
676
|
break;
|
|
604
677
|
}
|
|
605
678
|
case "label": {
|
|
606
|
-
|
|
679
|
+
l.needRefreshControlTree = !0;
|
|
607
680
|
break;
|
|
608
681
|
}
|
|
609
682
|
}
|
|
610
683
|
}
|
|
611
684
|
};
|
|
612
685
|
}
|
|
613
|
-
getAppearanceProperties(e,
|
|
614
|
-
|
|
686
|
+
getAppearanceProperties(e, n) {
|
|
687
|
+
const r = this;
|
|
615
688
|
return {
|
|
616
689
|
title: "样式",
|
|
617
690
|
description: "Appearance",
|
|
@@ -637,18 +710,18 @@ class ue extends pe {
|
|
|
637
710
|
refreshPanelAfterChanged: !0,
|
|
638
711
|
editor: {
|
|
639
712
|
type: "response-layout-editor-setting",
|
|
640
|
-
initialState:
|
|
713
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
|
|
641
714
|
}
|
|
642
715
|
}
|
|
643
716
|
},
|
|
644
|
-
setPropertyRelates(
|
|
645
|
-
if (
|
|
646
|
-
switch (
|
|
717
|
+
setPropertyRelates(s, l) {
|
|
718
|
+
if (s)
|
|
719
|
+
switch (s && s.propertyID) {
|
|
647
720
|
case "responseLayout":
|
|
648
|
-
|
|
721
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, n), delete e.responseLayout;
|
|
649
722
|
break;
|
|
650
723
|
case "class":
|
|
651
|
-
|
|
724
|
+
r.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, n);
|
|
652
725
|
break;
|
|
653
726
|
}
|
|
654
727
|
}
|
|
@@ -662,44 +735,44 @@ class ue extends pe {
|
|
|
662
735
|
* @param propertyData 控件DOM属性
|
|
663
736
|
* @param newControlType 新控件类型
|
|
664
737
|
*/
|
|
665
|
-
changeControlType(e,
|
|
666
|
-
var d,
|
|
667
|
-
const
|
|
738
|
+
changeControlType(e, n, r) {
|
|
739
|
+
var d, t, p, c;
|
|
740
|
+
const s = n.propertyValue, l = r && r.parent && r.parent.schema;
|
|
668
741
|
if (!l)
|
|
669
742
|
return;
|
|
670
|
-
const
|
|
671
|
-
let
|
|
743
|
+
const m = l.contents.findIndex((A) => A.id === e.id), y = l.contents[m];
|
|
744
|
+
let a;
|
|
672
745
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
673
746
|
editor: {
|
|
674
|
-
$type:
|
|
747
|
+
$type: s
|
|
675
748
|
},
|
|
676
749
|
name: this.designViewModelField.name,
|
|
677
750
|
require: this.designViewModelField.require,
|
|
678
751
|
readonly: this.designViewModelField.readonly
|
|
679
|
-
}, !1),
|
|
680
|
-
id:
|
|
681
|
-
appearance:
|
|
682
|
-
size:
|
|
683
|
-
label:
|
|
684
|
-
binding:
|
|
685
|
-
visible:
|
|
686
|
-
}), Object.assign(
|
|
687
|
-
isTextArea:
|
|
688
|
-
placeholder: (d =
|
|
689
|
-
holdPlace: (
|
|
690
|
-
readonly: (
|
|
691
|
-
require: (
|
|
692
|
-
}), l.contents.splice(
|
|
693
|
-
(
|
|
694
|
-
),
|
|
695
|
-
}
|
|
696
|
-
getComponentConfig(e,
|
|
697
|
-
const
|
|
752
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
|
|
753
|
+
id: y.id,
|
|
754
|
+
appearance: y.appearance,
|
|
755
|
+
size: y.size,
|
|
756
|
+
label: y.label,
|
|
757
|
+
binding: y.binding,
|
|
758
|
+
visible: y.visible
|
|
759
|
+
}), Object.assign(a.editor, {
|
|
760
|
+
isTextArea: a.isTextArea && y.isTextArea,
|
|
761
|
+
placeholder: (d = y.editor) == null ? void 0 : d.placeholder,
|
|
762
|
+
holdPlace: (t = y.editor) == null ? void 0 : t.holdPlace,
|
|
763
|
+
readonly: (p = y.editor) == null ? void 0 : p.readonly,
|
|
764
|
+
require: (c = y.editor) == null ? void 0 : c.require
|
|
765
|
+
}), l.contents.splice(m, 1), l.contents.splice(m, 0, a), r.schema = Object.assign(y, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
766
|
+
(A) => A.classList.remove("dgComponentSelected")
|
|
767
|
+
), fe.value++;
|
|
768
|
+
}
|
|
769
|
+
getComponentConfig(e, n = {}, r = {}) {
|
|
770
|
+
const s = Object.assign({
|
|
698
771
|
description: "编辑器",
|
|
699
772
|
title: "编辑器",
|
|
700
773
|
type: "input-group",
|
|
701
774
|
$converter: "/converter/property-editor.converter"
|
|
702
|
-
},
|
|
775
|
+
}, n), l = Object.assign({
|
|
703
776
|
readonly: {
|
|
704
777
|
description: "",
|
|
705
778
|
title: "只读",
|
|
@@ -720,8 +793,8 @@ class ue extends pe {
|
|
|
720
793
|
title: "提示文本",
|
|
721
794
|
type: "string"
|
|
722
795
|
}
|
|
723
|
-
},
|
|
724
|
-
return { ...
|
|
796
|
+
}, r);
|
|
797
|
+
return { ...s, properties: { ...l } };
|
|
725
798
|
}
|
|
726
799
|
/**
|
|
727
800
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -729,54 +802,54 @@ class ue extends pe {
|
|
|
729
802
|
* @param controlId 控件Id
|
|
730
803
|
* @param componentId 控件所在组件id
|
|
731
804
|
*/
|
|
732
|
-
updateUnifiedLayoutAfterControlChanged(e,
|
|
733
|
-
const
|
|
734
|
-
let l =
|
|
735
|
-
l = l || "col-12",
|
|
805
|
+
updateUnifiedLayoutAfterControlChanged(e, n, r) {
|
|
806
|
+
const s = e.split(" ");
|
|
807
|
+
let l = s.find((t) => /^col-([1-9]|10|11|12)$/.test(t)), m = s.find((t) => /^col-md-([1-9]|10|11|12)$/.test(t)), y = s.find((t) => /^col-xl-([1-9]|10|11|12)$/.test(t)), a = s.find((t) => /^col-el-([1-9]|10|11|12)$/.test(t));
|
|
808
|
+
l = l || "col-12", m = m || "col-md-" + l.replace("col-", ""), y = y || "col-xl-" + m.replace("col-md-", ""), a = a || "col-el-" + y.replace("col-xl-", "");
|
|
736
809
|
const d = {
|
|
737
|
-
id:
|
|
810
|
+
id: n,
|
|
738
811
|
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
739
|
-
columnInMD: parseInt(
|
|
740
|
-
columnInLG: parseInt(
|
|
741
|
-
columnInEL: parseInt(
|
|
812
|
+
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
813
|
+
columnInLG: parseInt(y.replace("col-xl-", ""), 10),
|
|
814
|
+
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
742
815
|
};
|
|
743
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
816
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, d);
|
|
744
817
|
}
|
|
745
818
|
/**
|
|
746
819
|
* 修改控件布局配置后更新Form统一布局配置
|
|
747
820
|
* @param componentId 组件Id
|
|
748
821
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
749
822
|
*/
|
|
750
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(e,
|
|
751
|
-
const { formNode:
|
|
752
|
-
if (!
|
|
823
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
|
|
824
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
825
|
+
if (!r || !r.unifiedLayout)
|
|
753
826
|
return;
|
|
754
|
-
const
|
|
755
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
756
|
-
const
|
|
757
|
-
Object.assign(
|
|
827
|
+
const s = [];
|
|
828
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, s, 1), n) {
|
|
829
|
+
const A = s.find((g) => g.id === n.id);
|
|
830
|
+
Object.assign(A || {}, n);
|
|
758
831
|
}
|
|
759
|
-
const l =
|
|
760
|
-
Object.assign(
|
|
832
|
+
const l = s.map((A) => A.columnInSM), m = s.map((A) => A.columnInMD), y = s.map((A) => A.columnInLG), a = s.map((A) => A.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, t = this.checkIsUniqueColumn(m) ? m[0] : null, p = this.checkIsUniqueColumn(y) ? y[0] : null, c = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
833
|
+
Object.assign(r.unifiedLayout, {
|
|
761
834
|
uniqueColClassInSM: d,
|
|
762
|
-
uniqueColClassInMD:
|
|
763
|
-
uniqueColClassInLG:
|
|
764
|
-
uniqueColClassInEL:
|
|
835
|
+
uniqueColClassInMD: t,
|
|
836
|
+
uniqueColClassInLG: p,
|
|
837
|
+
uniqueColClassInEL: c
|
|
765
838
|
});
|
|
766
839
|
}
|
|
767
840
|
/**
|
|
768
841
|
* 校验宽度样式值是否一致
|
|
769
842
|
*/
|
|
770
843
|
checkIsUniqueColumn(e) {
|
|
771
|
-
const
|
|
772
|
-
return Array.from(
|
|
844
|
+
const n = new Set(e);
|
|
845
|
+
return Array.from(n).length === 1;
|
|
773
846
|
}
|
|
774
847
|
}
|
|
775
|
-
class
|
|
776
|
-
constructor(
|
|
777
|
-
super(
|
|
848
|
+
class be extends Ce {
|
|
849
|
+
constructor(o, e) {
|
|
850
|
+
super(o, e);
|
|
778
851
|
}
|
|
779
|
-
getEditorProperties(
|
|
852
|
+
getEditorProperties(o) {
|
|
780
853
|
return {
|
|
781
854
|
description: "编辑器",
|
|
782
855
|
title: "编辑器",
|
|
@@ -807,95 +880,78 @@ class Ae extends ue {
|
|
|
807
880
|
};
|
|
808
881
|
}
|
|
809
882
|
}
|
|
810
|
-
function
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
checkCanMoveComponent: o,
|
|
815
|
-
hideNestedPaddingInDesginerView: a,
|
|
816
|
-
onAcceptMovedChildElement: l,
|
|
817
|
-
resolveComponentContext: u,
|
|
818
|
-
triggerBelongedComponentToMoveWhenMoved: p,
|
|
819
|
-
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
820
|
-
} = ce(r), d = r.schema;
|
|
821
|
-
function s(g, A) {
|
|
822
|
-
return new Ae(g, n).getPropertyConfig(d, A);
|
|
883
|
+
function Ie(i, o) {
|
|
884
|
+
const e = i.schema;
|
|
885
|
+
function n(r, s) {
|
|
886
|
+
return new be(r, o).getPropertyConfig(e, s);
|
|
823
887
|
}
|
|
824
888
|
return {
|
|
825
|
-
|
|
826
|
-
checkCanDeleteComponent: t,
|
|
827
|
-
checkCanMoveComponent: o,
|
|
828
|
-
hideNestedPaddingInDesginerView: a,
|
|
829
|
-
onAcceptMovedChildElement: l,
|
|
830
|
-
resolveComponentContext: u,
|
|
831
|
-
triggerBelongedComponentToMoveWhenMoved: p,
|
|
832
|
-
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
833
|
-
getPropsConfig: s
|
|
889
|
+
getPropsConfig: n
|
|
834
890
|
};
|
|
835
891
|
}
|
|
836
|
-
const
|
|
892
|
+
const Be = /* @__PURE__ */ x({
|
|
837
893
|
name: "FAvatarDesign",
|
|
838
|
-
props:
|
|
894
|
+
props: T,
|
|
839
895
|
emits: ["change", "update:modelValue"],
|
|
840
|
-
setup(
|
|
841
|
-
const e =
|
|
842
|
-
|
|
896
|
+
setup(i, o) {
|
|
897
|
+
const e = I(), n = P("designer-host-service"), r = P("design-item-context"), s = Ie(r, n), l = K(e, r, s);
|
|
898
|
+
Z(() => {
|
|
843
899
|
e.value.componentInstance = l;
|
|
844
|
-
}),
|
|
845
|
-
const
|
|
900
|
+
}), o.expose(l.value);
|
|
901
|
+
const m = B(() => ({
|
|
846
902
|
"f-avatar": !0,
|
|
847
|
-
"f-avatar-readonly":
|
|
848
|
-
"f-avatar-circle":
|
|
849
|
-
"f-avatar-square":
|
|
850
|
-
})),
|
|
851
|
-
width:
|
|
852
|
-
height:
|
|
903
|
+
"f-avatar-readonly": i.readonly,
|
|
904
|
+
"f-avatar-circle": i.shape === "circle",
|
|
905
|
+
"f-avatar-square": i.shape === "square"
|
|
906
|
+
})), y = I(i.modelValue), a = B(() => ({
|
|
907
|
+
width: i.avatarWidth + "px",
|
|
908
|
+
height: i.avatarHeight + "px"
|
|
853
909
|
})), d = !1;
|
|
854
|
-
function
|
|
910
|
+
function t() {
|
|
855
911
|
return "";
|
|
856
912
|
}
|
|
857
|
-
function
|
|
913
|
+
function p() {
|
|
858
914
|
}
|
|
859
|
-
const
|
|
860
|
-
acceptTypes:
|
|
861
|
-
imageSource:
|
|
862
|
-
onClickImage:
|
|
863
|
-
} =
|
|
864
|
-
return () =>
|
|
915
|
+
const c = I(null), {
|
|
916
|
+
acceptTypes: A,
|
|
917
|
+
imageSource: g,
|
|
918
|
+
onClickImage: h
|
|
919
|
+
} = q(i, o, c, y);
|
|
920
|
+
return () => b("div", {
|
|
865
921
|
ref: e,
|
|
866
|
-
class:
|
|
867
|
-
style:
|
|
868
|
-
onClick:
|
|
869
|
-
}, [d,
|
|
870
|
-
title:
|
|
922
|
+
class: m.value,
|
|
923
|
+
style: a.value,
|
|
924
|
+
onClick: h
|
|
925
|
+
}, [d, b("img", {
|
|
926
|
+
title: i.title,
|
|
871
927
|
class: "f-avatar-image",
|
|
872
|
-
src:
|
|
873
|
-
onError:
|
|
874
|
-
}, null), !
|
|
928
|
+
src: g.value,
|
|
929
|
+
onError: t
|
|
930
|
+
}, null), !i.readonly && b("div", {
|
|
875
931
|
class: "f-avatar-icon"
|
|
876
|
-
}, [
|
|
932
|
+
}, [b("span", {
|
|
877
933
|
class: "f-icon f-icon-camera"
|
|
878
|
-
}, null)]),
|
|
934
|
+
}, null)]), b("input", {
|
|
879
935
|
ref: "file",
|
|
880
936
|
name: "file-input",
|
|
881
937
|
type: "file",
|
|
882
938
|
class: "f-avatar-upload",
|
|
883
|
-
accept:
|
|
884
|
-
onChange:
|
|
939
|
+
accept: A.value,
|
|
940
|
+
onChange: p,
|
|
885
941
|
style: "display: none;"
|
|
886
942
|
}, null)]);
|
|
887
943
|
}
|
|
888
944
|
});
|
|
889
|
-
|
|
890
|
-
|
|
945
|
+
E.register = (i, o, e, n) => {
|
|
946
|
+
i.avatar = E, o.avatar = H;
|
|
891
947
|
};
|
|
892
|
-
|
|
893
|
-
|
|
948
|
+
E.registerDesigner = (i, o, e) => {
|
|
949
|
+
i.avatar = Be, o.avatar = H;
|
|
894
950
|
};
|
|
895
|
-
const
|
|
951
|
+
const Te = J(E);
|
|
896
952
|
export {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
953
|
+
E as FAvatar,
|
|
954
|
+
T as avatarProps,
|
|
955
|
+
Te as default,
|
|
956
|
+
H as propsResolver
|
|
901
957
|
};
|