@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,40 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Se = (s, e,
|
|
3
|
-
var
|
|
4
|
-
import { computed as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { getCustomClass as J, withInstall as
|
|
7
|
-
import { useDesignerInnerComponent as
|
|
8
|
-
class
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var Se = (s, e, n) => e in s ? Ie(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
|
|
3
|
+
var D = (s, e, n) => Se(s, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { computed as V, getCurrentInstance as ae, createVNode as y, ref as M, defineComponent as Y, onMounted as H, onUnmounted as de, watch as Q, inject as L, createTextVNode as ue, provide as De, onBeforeUnmount as Me, withModifiers as Ee } from "vue";
|
|
5
|
+
import { isPlainObject as ie, cloneDeep as pe } from "lodash-es";
|
|
6
|
+
import { getCustomClass as J, withInstall as Re } from "../common/index.esm.js";
|
|
7
|
+
import { useDesignerInnerComponent as fe } from "../designer-canvas/index.esm.js";
|
|
8
|
+
class ge {
|
|
9
9
|
constructor(e) {
|
|
10
10
|
/** 工具栏项标识 */
|
|
11
|
-
|
|
11
|
+
D(this, "id", "");
|
|
12
12
|
/** 工具栏项自定义样式 */
|
|
13
|
-
|
|
13
|
+
D(this, "class", "btn-secondary");
|
|
14
14
|
/** 图标 */
|
|
15
|
-
|
|
15
|
+
D(this, "icon", "");
|
|
16
16
|
/** 所属分组 */
|
|
17
|
-
|
|
17
|
+
D(this, "groupId", "");
|
|
18
18
|
/** 收藏顺序 */
|
|
19
|
-
|
|
19
|
+
D(this, "order", -1);
|
|
20
20
|
/** 是否作为下拉菜单的顶层按钮 */
|
|
21
|
-
|
|
21
|
+
D(this, "asDropDownTop", !1);
|
|
22
22
|
/** 文本 */
|
|
23
|
-
|
|
23
|
+
D(this, "text", "");
|
|
24
24
|
/** 是否可见 */
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
D(this, "visible", !0);
|
|
26
|
+
D(this, "responsed", !1);
|
|
27
27
|
/** 是否启用提示消息 */
|
|
28
|
-
|
|
28
|
+
D(this, "tipsEnable", !1);
|
|
29
29
|
/** 提示消息内容 */
|
|
30
|
-
|
|
30
|
+
D(this, "tipsText", "");
|
|
31
31
|
/** 记录宽度 */
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
D(this, "width", 0);
|
|
33
|
+
D(this, "onClick", () => {
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
D(this, "options");
|
|
36
36
|
this.options = e;
|
|
37
|
-
const
|
|
37
|
+
const n = [
|
|
38
38
|
"id",
|
|
39
39
|
"class",
|
|
40
40
|
"icon",
|
|
@@ -50,13 +50,13 @@ class be {
|
|
|
50
50
|
"tipsText",
|
|
51
51
|
"onClick"
|
|
52
52
|
];
|
|
53
|
-
Object.keys(e).filter((
|
|
54
|
-
this[
|
|
53
|
+
Object.keys(e).filter((i) => n.indexOf(i) > -1).forEach((i) => {
|
|
54
|
+
this[i] = e[i];
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/** 是否可用 */
|
|
58
58
|
get enable() {
|
|
59
|
-
return Object.keys(this.options).indexOf("
|
|
59
|
+
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : V(() => !0);
|
|
60
60
|
}
|
|
61
61
|
/** 设置宽度 */
|
|
62
62
|
setWidth(e) {
|
|
@@ -67,49 +67,49 @@ class be {
|
|
|
67
67
|
return this.visible ? this.width : !1;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class
|
|
70
|
+
class ke extends ge {
|
|
71
71
|
constructor(e) {
|
|
72
72
|
super(e);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function me() {
|
|
76
76
|
function s(e) {
|
|
77
|
-
const
|
|
78
|
-
return e.reduce((
|
|
77
|
+
const n = [];
|
|
78
|
+
return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new z(d)) : i.push(new ke(d)), i), n), n;
|
|
79
79
|
}
|
|
80
80
|
return { buildResponseToolbarItems: s };
|
|
81
81
|
}
|
|
82
|
-
const { buildResponseToolbarItems:
|
|
83
|
-
class
|
|
84
|
-
constructor(
|
|
85
|
-
super(
|
|
86
|
-
|
|
82
|
+
const { buildResponseToolbarItems: Pe } = me();
|
|
83
|
+
class z extends ge {
|
|
84
|
+
constructor(n) {
|
|
85
|
+
super(n);
|
|
86
|
+
D(this, "placement", "");
|
|
87
87
|
// 下拉位置
|
|
88
88
|
/** 下拉class */
|
|
89
|
-
|
|
89
|
+
D(this, "dropdownClass", "");
|
|
90
90
|
/** 下拉菜单class */
|
|
91
|
-
|
|
91
|
+
D(this, "menuClass", "");
|
|
92
92
|
/** 是否用分开的下拉按钮 */
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
Object.keys(
|
|
98
|
-
this[d] =
|
|
99
|
-
}),
|
|
93
|
+
D(this, "split", !1);
|
|
94
|
+
D(this, "children", []);
|
|
95
|
+
D(this, "expanded", !1);
|
|
96
|
+
const i = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
97
|
+
Object.keys(n).filter((d) => i.indexOf(d) > -1).forEach((d) => {
|
|
98
|
+
this[d] = n[d];
|
|
99
|
+
}), n.children && n.children.length && (this.children = Pe(n.children));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
class
|
|
103
|
-
constructor(e,
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
class Dt {
|
|
103
|
+
constructor(e, n) {
|
|
104
|
+
D(this, "id");
|
|
105
|
+
D(this, "name");
|
|
106
106
|
/** 记录元素的Id */
|
|
107
|
-
|
|
107
|
+
D(this, "presetId", []);
|
|
108
108
|
/** 记录转变为下拉时元素的位置 */
|
|
109
|
-
|
|
109
|
+
D(this, "responsedIndex", []);
|
|
110
110
|
/** 记录宽度 */
|
|
111
|
-
|
|
112
|
-
this.id = e, this.name =
|
|
111
|
+
D(this, "width");
|
|
112
|
+
this.id = e, this.name = n, this.width = 0;
|
|
113
113
|
}
|
|
114
114
|
// 设置宽度
|
|
115
115
|
setWidth(e) {
|
|
@@ -144,98 +144,102 @@ class Vt {
|
|
|
144
144
|
return this.presetId.length === this.responsedIndex.length;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
const
|
|
148
|
-
function
|
|
149
|
-
const { properties: e, title:
|
|
150
|
-
|
|
147
|
+
const he = {}, be = {};
|
|
148
|
+
function ee(s) {
|
|
149
|
+
const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i), m = Object.keys(e).reduce((p, T) => ((!d || !i.find((x) => x === T)) && (p[T] = e[T].type === "object" && e[T].properties ? ee(e[T]) : pe(e[T].default)), p), {});
|
|
150
|
+
if (n && (!d || !i.find((p) => p === "id"))) {
|
|
151
|
+
const p = n.toLowerCase().replace(/-/g, "_");
|
|
152
|
+
m.id = `${p}_${Math.random().toString().slice(2, 6)}`;
|
|
153
|
+
}
|
|
154
|
+
return m;
|
|
151
155
|
}
|
|
152
|
-
function
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
let d =
|
|
156
|
-
const
|
|
157
|
-
return d =
|
|
156
|
+
function Z(s, e = {}, n) {
|
|
157
|
+
const i = he[s];
|
|
158
|
+
if (i) {
|
|
159
|
+
let d = ee(i);
|
|
160
|
+
const m = be[s];
|
|
161
|
+
return d = m ? m({ getSchemaByType: Z }, d, e, n) : d, d;
|
|
158
162
|
}
|
|
159
163
|
return null;
|
|
160
164
|
}
|
|
161
|
-
function
|
|
162
|
-
const
|
|
163
|
-
return Object.keys(
|
|
165
|
+
function Be(s, e) {
|
|
166
|
+
const n = ee(e);
|
|
167
|
+
return Object.keys(n).reduce((i, d) => (i[d] && ie(i[d]) && ie(s[d] || !s[d]) ? Object.assign(i[d], s[d] || {}) : i[d] = s[d], i), n), n;
|
|
164
168
|
}
|
|
165
|
-
function
|
|
166
|
-
return Object.keys(s).filter((
|
|
169
|
+
function Ae(s, e) {
|
|
170
|
+
return Object.keys(s).filter((i) => s[i] != null).reduce((i, d) => {
|
|
167
171
|
if (e.has(d)) {
|
|
168
|
-
const
|
|
169
|
-
if (typeof
|
|
170
|
-
|
|
172
|
+
const m = e.get(d);
|
|
173
|
+
if (typeof m == "string")
|
|
174
|
+
i[m] = s[d];
|
|
171
175
|
else {
|
|
172
|
-
const
|
|
173
|
-
Object.assign(
|
|
176
|
+
const p = m(d, s[d], s);
|
|
177
|
+
Object.assign(i, p);
|
|
174
178
|
}
|
|
175
179
|
} else
|
|
176
|
-
|
|
177
|
-
return
|
|
180
|
+
i[d] = s[d];
|
|
181
|
+
return i;
|
|
178
182
|
}, {});
|
|
179
183
|
}
|
|
180
|
-
function
|
|
181
|
-
const
|
|
182
|
-
return
|
|
184
|
+
function Oe(s, e, n = /* @__PURE__ */ new Map()) {
|
|
185
|
+
const i = Be(s, e);
|
|
186
|
+
return Ae(i, n);
|
|
183
187
|
}
|
|
184
|
-
function
|
|
185
|
-
function e(
|
|
186
|
-
if (typeof
|
|
187
|
-
return
|
|
188
|
-
if (typeof
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
return Number(
|
|
192
|
-
if (
|
|
193
|
-
return Number(
|
|
194
|
-
if (
|
|
195
|
-
return Number(
|
|
188
|
+
function _e(s = {}) {
|
|
189
|
+
function e(f, g, l, c) {
|
|
190
|
+
if (typeof l == "number")
|
|
191
|
+
return c[f].length === l;
|
|
192
|
+
if (typeof l == "object") {
|
|
193
|
+
const u = Object.keys(l)[0], b = l[u];
|
|
194
|
+
if (u === "not")
|
|
195
|
+
return Number(c[f].length) !== Number(b);
|
|
196
|
+
if (u === "moreThan")
|
|
197
|
+
return Number(c[f].length) >= Number(b);
|
|
198
|
+
if (u === "lessThan")
|
|
199
|
+
return Number(c[f].length) <= Number(b);
|
|
196
200
|
}
|
|
197
201
|
return !1;
|
|
198
202
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
203
|
+
function n(f, g, l, c) {
|
|
204
|
+
return c[f] && c[f].propertyValue && String(c[f].propertyValue.value) === String(l);
|
|
201
205
|
}
|
|
202
|
-
const
|
|
206
|
+
const i = /* @__PURE__ */ new Map([
|
|
203
207
|
["length", e],
|
|
204
|
-
["getProperty",
|
|
208
|
+
["getProperty", n]
|
|
205
209
|
]);
|
|
206
|
-
Object.keys(s).reduce((
|
|
207
|
-
function d(
|
|
208
|
-
const
|
|
209
|
-
return typeof
|
|
210
|
-
if (
|
|
211
|
-
return { target:
|
|
212
|
-
const
|
|
213
|
-
return { target:
|
|
210
|
+
Object.keys(s).reduce((f, g) => (f.set(g, s[g]), f), i);
|
|
211
|
+
function d(f, g) {
|
|
212
|
+
const l = f;
|
|
213
|
+
return typeof g == "number" ? [{ target: l, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: l, operator: "getProperty", param: f, value: !!g }] : typeof g == "object" ? Object.keys(g).map((c) => {
|
|
214
|
+
if (c === "length")
|
|
215
|
+
return { target: l, operator: "length", param: null, value: g[c] };
|
|
216
|
+
const u = c, b = g[c];
|
|
217
|
+
return { target: l, operator: "getProperty", param: u, value: b };
|
|
214
218
|
}) : [];
|
|
215
219
|
}
|
|
216
|
-
function
|
|
217
|
-
return Object.keys(
|
|
218
|
-
const
|
|
219
|
-
return
|
|
220
|
+
function m(f) {
|
|
221
|
+
return Object.keys(f).reduce((l, c) => {
|
|
222
|
+
const u = d(c, f[c]);
|
|
223
|
+
return l.push(...u), l;
|
|
220
224
|
}, []);
|
|
221
225
|
}
|
|
222
|
-
function
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
return
|
|
226
|
+
function p(f, g) {
|
|
227
|
+
if (i.has(f.operator)) {
|
|
228
|
+
const l = i.get(f.operator);
|
|
229
|
+
return l && l(f.target, f.param, f.value, g) || !1;
|
|
226
230
|
}
|
|
227
231
|
return !1;
|
|
228
232
|
}
|
|
229
|
-
function
|
|
230
|
-
return
|
|
233
|
+
function T(f, g) {
|
|
234
|
+
return m(f).reduce((u, b) => u && p(b, g), !0);
|
|
231
235
|
}
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
return
|
|
236
|
+
function x(f, g) {
|
|
237
|
+
const l = Object.keys(f), c = l.includes("allOf"), u = l.includes("anyOf"), b = c || u, O = (b ? f[b ? c ? "allOf" : "anyOf" : "allOf"] : [f]).map((j) => T(j, g));
|
|
238
|
+
return c ? !O.includes(!1) : O.includes(!0);
|
|
235
239
|
}
|
|
236
|
-
return { parseValueSchema:
|
|
240
|
+
return { parseValueSchema: x };
|
|
237
241
|
}
|
|
238
|
-
const
|
|
242
|
+
const te = {
|
|
239
243
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
240
244
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
241
245
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -273,31 +277,33 @@ const re = {
|
|
|
273
277
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
274
278
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
275
279
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
276
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
281
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
282
|
+
}, je = {}, $e = {};
|
|
283
|
+
_e();
|
|
284
|
+
function ye(s, e, n = /* @__PURE__ */ new Map(), i = (p, T, x, f) => T, d = {}, m = (p) => p) {
|
|
285
|
+
return he[e.title] = e, be[e.title] = i, je[e.title] = d, $e[e.title] = m, (p = {}) => {
|
|
286
|
+
const T = Oe(p, e, n), x = Object.keys(s).reduce((f, g) => (f[g] = s[g].default, f), {});
|
|
287
|
+
return Object.assign(x, T);
|
|
283
288
|
};
|
|
284
289
|
}
|
|
285
|
-
function
|
|
290
|
+
function Fe(s, e) {
|
|
286
291
|
return { customClass: e.class, customStyle: e.style };
|
|
287
292
|
}
|
|
288
|
-
const
|
|
293
|
+
const Ne = /* @__PURE__ */ new Map([
|
|
289
294
|
["buttons", "items"],
|
|
290
|
-
["appearance",
|
|
291
|
-
]), qe = /* @__PURE__ */ new Map([
|
|
292
|
-
["appearance", ze]
|
|
295
|
+
["appearance", Fe]
|
|
293
296
|
]);
|
|
294
|
-
function
|
|
297
|
+
function Le(s, e) {
|
|
295
298
|
return { class: e.class, style: e.style };
|
|
296
299
|
}
|
|
297
|
-
|
|
300
|
+
const Ve = /* @__PURE__ */ new Map([
|
|
301
|
+
["appearance", Le]
|
|
302
|
+
]);
|
|
303
|
+
function ve(s, e, n) {
|
|
298
304
|
return e;
|
|
299
305
|
}
|
|
300
|
-
const
|
|
306
|
+
const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/response-toolbar.schema.json", qe = "response-toolbar", ze = "A Farris Toolbar Component", Ge = "object", He = {
|
|
301
307
|
id: {
|
|
302
308
|
description: "The unique identifier for a Response Toolbar",
|
|
303
309
|
type: "string"
|
|
@@ -312,13 +318,10 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
312
318
|
type: "object",
|
|
313
319
|
properties: {
|
|
314
320
|
class: {
|
|
315
|
-
type: "string"
|
|
316
|
-
|
|
317
|
-
style: {
|
|
318
|
-
type: "string"
|
|
321
|
+
type: "string",
|
|
322
|
+
default: ""
|
|
319
323
|
}
|
|
320
|
-
}
|
|
321
|
-
default: {}
|
|
324
|
+
}
|
|
322
325
|
},
|
|
323
326
|
alignment: {
|
|
324
327
|
description: "The alignment of Response Toolbar Button.",
|
|
@@ -330,19 +333,19 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
330
333
|
type: "array",
|
|
331
334
|
default: []
|
|
332
335
|
}
|
|
333
|
-
},
|
|
336
|
+
}, Qe = [
|
|
334
337
|
"id",
|
|
335
338
|
"type",
|
|
336
339
|
"buttons"
|
|
337
|
-
],
|
|
338
|
-
$schema:
|
|
339
|
-
$id:
|
|
340
|
-
title:
|
|
341
|
-
description:
|
|
342
|
-
type:
|
|
343
|
-
properties:
|
|
344
|
-
required:
|
|
345
|
-
},
|
|
340
|
+
], Je = {
|
|
341
|
+
$schema: Ue,
|
|
342
|
+
$id: We,
|
|
343
|
+
title: qe,
|
|
344
|
+
description: ze,
|
|
345
|
+
type: Ge,
|
|
346
|
+
properties: He,
|
|
347
|
+
required: Qe
|
|
348
|
+
}, Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ze = "response-toolbar-item", Ke = "A Farris Toolbar Item Component", et = "object", tt = {
|
|
346
349
|
id: {
|
|
347
350
|
description: "The unique identifier for a Response Toolbar",
|
|
348
351
|
type: "string"
|
|
@@ -358,13 +361,9 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
358
361
|
properties: {
|
|
359
362
|
class: {
|
|
360
363
|
type: "string",
|
|
361
|
-
default: "btn-
|
|
362
|
-
},
|
|
363
|
-
style: {
|
|
364
|
-
type: "string"
|
|
364
|
+
default: "btn-secondary"
|
|
365
365
|
}
|
|
366
|
-
}
|
|
367
|
-
default: {}
|
|
366
|
+
}
|
|
368
367
|
},
|
|
369
368
|
alignment: {
|
|
370
369
|
description: "对齐",
|
|
@@ -374,69 +373,36 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
374
373
|
text: {
|
|
375
374
|
description: "文本",
|
|
376
375
|
type: "string",
|
|
377
|
-
default: "
|
|
376
|
+
default: "按钮"
|
|
378
377
|
},
|
|
379
378
|
icon: {
|
|
380
379
|
description: "图标",
|
|
381
380
|
type: "string",
|
|
382
381
|
default: ""
|
|
383
382
|
},
|
|
383
|
+
disabled: {
|
|
384
|
+
description: "禁用",
|
|
385
|
+
type: "boolean",
|
|
386
|
+
default: !1
|
|
387
|
+
},
|
|
384
388
|
onClick: {
|
|
385
389
|
description: "点击事件",
|
|
386
390
|
type: "string",
|
|
387
391
|
default: ""
|
|
388
392
|
}
|
|
389
|
-
},
|
|
393
|
+
}, nt = [
|
|
390
394
|
"id",
|
|
391
395
|
"type",
|
|
392
396
|
"text"
|
|
393
|
-
],
|
|
394
|
-
$schema:
|
|
395
|
-
$id:
|
|
396
|
-
title:
|
|
397
|
-
description:
|
|
398
|
-
type:
|
|
399
|
-
properties:
|
|
400
|
-
required:
|
|
401
|
-
},
|
|
402
|
-
basic: {
|
|
403
|
-
title: "基本信息",
|
|
404
|
-
description: "Basic Infomation",
|
|
405
|
-
properties: {
|
|
406
|
-
id: {
|
|
407
|
-
title: "标识",
|
|
408
|
-
type: "string",
|
|
409
|
-
description: "The identifier of a component.",
|
|
410
|
-
readonly: !0
|
|
411
|
-
},
|
|
412
|
-
type: {
|
|
413
|
-
title: "类型",
|
|
414
|
-
type: "enum",
|
|
415
|
-
description: "The type of a component.",
|
|
416
|
-
editor: {
|
|
417
|
-
type: "combo-list",
|
|
418
|
-
data: []
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
text: {
|
|
422
|
-
title: "文本",
|
|
423
|
-
type: "string",
|
|
424
|
-
description: "",
|
|
425
|
-
refreshPanelAfterChanged: !0
|
|
426
|
-
},
|
|
427
|
-
icon: {
|
|
428
|
-
title: "图标",
|
|
429
|
-
type: "string",
|
|
430
|
-
description: ""
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}, de = {
|
|
435
|
-
title: ct,
|
|
436
|
-
description: at,
|
|
437
|
-
type: lt,
|
|
438
|
-
categories: pt
|
|
439
|
-
}, ie = {
|
|
397
|
+
], ot = {
|
|
398
|
+
$schema: Xe,
|
|
399
|
+
$id: Ye,
|
|
400
|
+
title: Ze,
|
|
401
|
+
description: Ke,
|
|
402
|
+
type: et,
|
|
403
|
+
properties: tt,
|
|
404
|
+
required: nt
|
|
405
|
+
}, ne = {
|
|
440
406
|
/** 组件自定义样式 */
|
|
441
407
|
customClass: { type: String, default: "" },
|
|
442
408
|
alignment: { Type: String, default: "right" },
|
|
@@ -444,17 +410,14 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
444
410
|
Type: Array,
|
|
445
411
|
default: []
|
|
446
412
|
}
|
|
447
|
-
}
|
|
448
|
-
oe[te.title] = te;
|
|
449
|
-
Ce[de.title] = de;
|
|
450
|
-
const dt = Object.assign({}, ie, {
|
|
413
|
+
}, st = Object.assign({}, ne, {
|
|
451
414
|
componentId: { type: String, default: "" }
|
|
452
|
-
}),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
),
|
|
415
|
+
}), oe = ye(
|
|
416
|
+
ne,
|
|
417
|
+
Je,
|
|
418
|
+
Ne,
|
|
419
|
+
ve
|
|
420
|
+
), Ce = {
|
|
458
421
|
id: { type: String, default: "" },
|
|
459
422
|
items: { type: Object, default: {} },
|
|
460
423
|
class: { type: String, default: "" },
|
|
@@ -463,1528 +426,773 @@ const dt = Object.assign({}, ie, {
|
|
|
463
426
|
icon: { type: String, default: "" },
|
|
464
427
|
componentId: { type: String, default: "" },
|
|
465
428
|
alignment: { Type: String, default: "right" }
|
|
466
|
-
},
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
429
|
+
}, rt = ye(
|
|
430
|
+
Ce,
|
|
431
|
+
ot,
|
|
432
|
+
Ve,
|
|
433
|
+
ve
|
|
471
434
|
);
|
|
472
|
-
function
|
|
473
|
-
function s(
|
|
474
|
-
const
|
|
435
|
+
function we() {
|
|
436
|
+
function s(n) {
|
|
437
|
+
const i = {
|
|
475
438
|
"f-icon": !0
|
|
476
439
|
};
|
|
477
|
-
if (
|
|
478
|
-
const d =
|
|
479
|
-
d && d.length && d.reduce((
|
|
440
|
+
if (n.icon) {
|
|
441
|
+
const d = n.icon.trim().split(" ");
|
|
442
|
+
d && d.length && d.reduce((m, p) => (m[p] = !0, m), i);
|
|
480
443
|
}
|
|
481
|
-
return
|
|
444
|
+
return i;
|
|
482
445
|
}
|
|
483
|
-
function e(
|
|
484
|
-
return !!(
|
|
446
|
+
function e(n) {
|
|
447
|
+
return !!(n.icon && n.icon.trim());
|
|
485
448
|
}
|
|
486
449
|
return { iconClass: s, shouldShowIcon: e };
|
|
487
450
|
}
|
|
488
|
-
function
|
|
489
|
-
function e(
|
|
490
|
-
const
|
|
451
|
+
function it(s) {
|
|
452
|
+
function e(l) {
|
|
453
|
+
const c = {
|
|
491
454
|
"dropdown-menu": !0
|
|
492
455
|
};
|
|
493
|
-
if (
|
|
494
|
-
const
|
|
495
|
-
|
|
456
|
+
if (l.class) {
|
|
457
|
+
const u = l.menuClass.split(" ");
|
|
458
|
+
u && u.length && u.reduce((b, I) => (b[I] = !0, b), c);
|
|
496
459
|
}
|
|
497
|
-
return
|
|
460
|
+
return c;
|
|
498
461
|
}
|
|
499
|
-
function
|
|
500
|
-
const
|
|
501
|
-
disabled: !
|
|
462
|
+
function n(l) {
|
|
463
|
+
const c = {
|
|
464
|
+
disabled: !l.enable,
|
|
502
465
|
"dropdown-submenu": !0,
|
|
503
466
|
"f-rt-dropdown": !0
|
|
504
|
-
},
|
|
505
|
-
return
|
|
467
|
+
}, u = l.dropdownClass.split(" ");
|
|
468
|
+
return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
|
|
506
469
|
}
|
|
507
|
-
function
|
|
508
|
-
const
|
|
509
|
-
disabled: !
|
|
470
|
+
function i(l) {
|
|
471
|
+
const c = {
|
|
472
|
+
disabled: !l.enable,
|
|
510
473
|
"dropdown-item": !0,
|
|
511
474
|
"f-rt-btn": !0
|
|
512
|
-
},
|
|
513
|
-
return
|
|
475
|
+
}, u = l.class.split(" ");
|
|
476
|
+
return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
|
|
514
477
|
}
|
|
515
478
|
let d;
|
|
516
|
-
const
|
|
517
|
-
function
|
|
518
|
-
var
|
|
519
|
-
((
|
|
520
|
-
const
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
|
|
479
|
+
const m = /* @__PURE__ */ new Map();
|
|
480
|
+
function p(l, c, u) {
|
|
481
|
+
var I;
|
|
482
|
+
((I = l.target) == null ? void 0 : I.id) === c.id && l.stopPropagation();
|
|
483
|
+
const b = u ? u.id : "__top_item__";
|
|
484
|
+
if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? m.set(b, c) : m.delete(b)), m.has(b) && m.get(b) !== c) {
|
|
485
|
+
const B = m.get(b);
|
|
486
|
+
B && (B.expanded = !1);
|
|
524
487
|
}
|
|
525
488
|
}
|
|
526
|
-
function
|
|
527
|
-
document.body.click(),
|
|
528
|
-
}
|
|
529
|
-
function
|
|
530
|
-
return
|
|
531
|
-
class:
|
|
532
|
-
id:
|
|
533
|
-
onClick: (
|
|
534
|
-
}, [
|
|
535
|
-
id:
|
|
536
|
-
class: c
|
|
537
|
-
onMouseover: (
|
|
538
|
-
}, [
|
|
489
|
+
function T(l, c) {
|
|
490
|
+
document.body.click(), c.enable && c.onClick(l, c.id);
|
|
491
|
+
}
|
|
492
|
+
function x(l) {
|
|
493
|
+
return l.children.map((c) => c.children && c.children.length ? y("li", {
|
|
494
|
+
class: n(c),
|
|
495
|
+
id: c.id,
|
|
496
|
+
onClick: (u) => c.enable && p(u, c, l)
|
|
497
|
+
}, [y("span", {
|
|
498
|
+
id: c.id,
|
|
499
|
+
class: i(c),
|
|
500
|
+
onMouseover: (u) => c.enable && p(u, c, l)
|
|
501
|
+
}, [c.text, y("i", {
|
|
539
502
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
540
503
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
541
|
-
}, null)]), d(
|
|
542
|
-
class: c
|
|
543
|
-
id:
|
|
544
|
-
onClick: (
|
|
545
|
-
onMouseover: (
|
|
546
|
-
}, [s.shouldShowIcon(
|
|
547
|
-
class: s.iconClass(
|
|
548
|
-
}, null),
|
|
549
|
-
}
|
|
550
|
-
function
|
|
551
|
-
const
|
|
552
|
-
display:
|
|
504
|
+
}, null)]), d(c, c)]) : y("li", {
|
|
505
|
+
class: i(c),
|
|
506
|
+
id: c.id,
|
|
507
|
+
onClick: (u) => T(u, c),
|
|
508
|
+
onMouseover: (u) => c.enable && p(u, c, l)
|
|
509
|
+
}, [s.shouldShowIcon(c) && y("i", {
|
|
510
|
+
class: s.iconClass(c)
|
|
511
|
+
}, null), c.text]));
|
|
512
|
+
}
|
|
513
|
+
function f(l, c, u) {
|
|
514
|
+
const b = {
|
|
515
|
+
display: l.expanded ? "block" : "none",
|
|
553
516
|
position: "fixed",
|
|
554
517
|
maxWidth: "300px",
|
|
555
518
|
width: "auto",
|
|
556
519
|
minWidth: "120px"
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
520
|
+
}, I = document.getElementsByTagName("body")[0].getClientRects()[0].width, B = c, O = B == null ? void 0 : B.getClientRects();
|
|
521
|
+
if (B && O && O.length) {
|
|
559
522
|
const {
|
|
560
|
-
top:
|
|
561
|
-
width:
|
|
562
|
-
left:
|
|
563
|
-
right:
|
|
564
|
-
height:
|
|
565
|
-
} =
|
|
566
|
-
|
|
567
|
-
const
|
|
568
|
-
if (
|
|
569
|
-
|
|
570
|
-
const
|
|
571
|
-
if (
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
|
|
523
|
+
top: F,
|
|
524
|
+
width: j,
|
|
525
|
+
left: A,
|
|
526
|
+
right: k,
|
|
527
|
+
height: R
|
|
528
|
+
} = O[0], v = Math.ceil(R + F);
|
|
529
|
+
b.top = `${v}px`, b.left = `${A}px`;
|
|
530
|
+
const E = l.id + "_menu", P = c ? c.querySelector("#" + E) : null;
|
|
531
|
+
if (P) {
|
|
532
|
+
b.display === "block" && (P.style.display = "block");
|
|
533
|
+
const h = P.getBoundingClientRect();
|
|
534
|
+
if (u) {
|
|
535
|
+
b.top = `${F - 6}px`;
|
|
536
|
+
const o = Math.ceil(j + A);
|
|
537
|
+
b.left = `${o}px`;
|
|
575
538
|
}
|
|
576
|
-
|
|
539
|
+
I - A - j < h.width && (b.left = `${(u ? A : k) - h.width}px`);
|
|
577
540
|
}
|
|
578
541
|
}
|
|
579
|
-
return
|
|
580
|
-
}
|
|
581
|
-
d = function(
|
|
582
|
-
var
|
|
583
|
-
const
|
|
584
|
-
return
|
|
585
|
-
class: e(
|
|
586
|
-
style:
|
|
587
|
-
id:
|
|
588
|
-
}, [
|
|
542
|
+
return b;
|
|
543
|
+
}
|
|
544
|
+
d = function(l, c) {
|
|
545
|
+
var B, O;
|
|
546
|
+
const u = ae(), b = c ? c.id : l.id, I = (O = (B = u == null ? void 0 : u.exposed) == null ? void 0 : B.elementRef.value) == null ? void 0 : O.querySelector("#" + b);
|
|
547
|
+
return y("ul", {
|
|
548
|
+
class: e(l),
|
|
549
|
+
style: f(l, I, c),
|
|
550
|
+
id: l.id + "_menu"
|
|
551
|
+
}, [x(l)]);
|
|
589
552
|
};
|
|
590
|
-
function
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}),
|
|
553
|
+
function g() {
|
|
554
|
+
m.forEach((l) => {
|
|
555
|
+
l.expanded = !1;
|
|
556
|
+
}), m.clear();
|
|
594
557
|
}
|
|
595
558
|
return {
|
|
596
559
|
renderDropdownMenu: d,
|
|
597
|
-
clearAllDropDownMenu:
|
|
560
|
+
clearAllDropDownMenu: g
|
|
598
561
|
};
|
|
599
562
|
}
|
|
600
|
-
function
|
|
601
|
-
const
|
|
602
|
-
renderDropdownMenu:
|
|
563
|
+
function ct(s, e) {
|
|
564
|
+
const n = M(s.alignment), {
|
|
565
|
+
renderDropdownMenu: i,
|
|
603
566
|
clearAllDropDownMenu: d
|
|
604
|
-
} =
|
|
605
|
-
function
|
|
606
|
-
const
|
|
567
|
+
} = it(e);
|
|
568
|
+
function m(g) {
|
|
569
|
+
const l = {
|
|
607
570
|
"btn-group": !0,
|
|
608
571
|
"f-rt-dropdown": !0,
|
|
609
|
-
"f-btn-ml":
|
|
610
|
-
"f-btn-mr":
|
|
611
|
-
},
|
|
612
|
-
return
|
|
572
|
+
"f-btn-ml": n.value === "right",
|
|
573
|
+
"f-btn-mr": n.value === "left"
|
|
574
|
+
}, c = g.dropdownClass.split(" ");
|
|
575
|
+
return c && c.length && c.reduce((u, b) => (u[b] = !0, u), l), l;
|
|
613
576
|
}
|
|
614
|
-
function
|
|
615
|
-
const
|
|
577
|
+
function p(g) {
|
|
578
|
+
const l = {
|
|
616
579
|
btn: !0,
|
|
617
|
-
disabled: !
|
|
580
|
+
disabled: !g.enable,
|
|
618
581
|
"f-rt-btn": !0,
|
|
619
|
-
"btn-icontext": !!(
|
|
582
|
+
"btn-icontext": !!(g.icon && g.icon.trim())
|
|
620
583
|
};
|
|
621
|
-
if (
|
|
622
|
-
const
|
|
623
|
-
|
|
584
|
+
if (g.class) {
|
|
585
|
+
const c = g.class.split(" ");
|
|
586
|
+
c && c.length && c.reduce((u, b) => (u[b] = !0, u), l);
|
|
624
587
|
}
|
|
625
|
-
return
|
|
626
|
-
}
|
|
627
|
-
function
|
|
628
|
-
|
|
629
|
-
const
|
|
630
|
-
document.body.click(),
|
|
631
|
-
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
634
|
-
id:
|
|
635
|
-
class:
|
|
636
|
-
}, [
|
|
637
|
-
class:
|
|
588
|
+
return l;
|
|
589
|
+
}
|
|
590
|
+
function T(g, l) {
|
|
591
|
+
g.stopPropagation();
|
|
592
|
+
const c = l.expanded;
|
|
593
|
+
document.body.click(), l.expanded = !c;
|
|
594
|
+
}
|
|
595
|
+
function x(g) {
|
|
596
|
+
return y("div", {
|
|
597
|
+
id: g.id,
|
|
598
|
+
class: m(g)
|
|
599
|
+
}, [y("div", {
|
|
600
|
+
class: p(g),
|
|
638
601
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
639
|
-
onClick: (
|
|
640
|
-
}, [e.shouldShowIcon(
|
|
641
|
-
class: e.iconClass(
|
|
642
|
-
}, null),
|
|
602
|
+
onClick: (l) => g.enable && T(l, g)
|
|
603
|
+
}, [e.shouldShowIcon(g) && y("i", {
|
|
604
|
+
class: e.iconClass(g)
|
|
605
|
+
}, null), y("span", null, [g.text]), y("i", {
|
|
643
606
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
644
607
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
645
|
-
}, null)]),
|
|
608
|
+
}, null)]), i(g)]);
|
|
646
609
|
}
|
|
647
|
-
function
|
|
610
|
+
function f() {
|
|
648
611
|
d();
|
|
649
612
|
}
|
|
650
613
|
return {
|
|
651
|
-
renderToolbarDropdown:
|
|
652
|
-
clearAllDropDown:
|
|
614
|
+
renderToolbarDropdown: x,
|
|
615
|
+
clearAllDropDown: f
|
|
653
616
|
};
|
|
654
617
|
}
|
|
655
618
|
const {
|
|
656
|
-
buildResponseToolbarItems:
|
|
657
|
-
} =
|
|
619
|
+
buildResponseToolbarItems: ce
|
|
620
|
+
} = me(), X = /* @__PURE__ */ Y({
|
|
658
621
|
name: "FResponseToolbar",
|
|
659
|
-
props:
|
|
622
|
+
props: ne,
|
|
660
623
|
emits: ["click"],
|
|
661
624
|
setup(s, e) {
|
|
662
|
-
const
|
|
625
|
+
const n = M(ce(s.items)), i = M(), d = M(), m = M(), p = M(s.alignment), T = {
|
|
663
626
|
id: "__more_buttons__",
|
|
664
627
|
text: "更多"
|
|
665
|
-
},
|
|
628
|
+
}, x = M(new z(T)), f = we(), g = V(() => x.value.children.length > 0), l = V(() => J({
|
|
666
629
|
"f-toolbar": !0,
|
|
667
630
|
"f-response-toolbar": !0,
|
|
668
631
|
"position-relative": !0
|
|
669
|
-
}, s.customClass)),
|
|
632
|
+
}, s.customClass)), c = V(() => ({
|
|
670
633
|
"w-100": !0,
|
|
671
634
|
"d-flex": !0,
|
|
672
635
|
"flex-nowrap": !0,
|
|
673
|
-
"justify-content-end":
|
|
674
|
-
"justify-content-start":
|
|
636
|
+
"justify-content-end": p.value === "right",
|
|
637
|
+
"justify-content-start": p.value === "left"
|
|
675
638
|
})), {
|
|
676
|
-
renderToolbarDropdown:
|
|
677
|
-
clearAllDropDown:
|
|
678
|
-
} =
|
|
679
|
-
function
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}),
|
|
639
|
+
renderToolbarDropdown: u,
|
|
640
|
+
clearAllDropDown: b
|
|
641
|
+
} = ct(s, f);
|
|
642
|
+
function I() {
|
|
643
|
+
n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
|
|
644
|
+
v.expanded = !1;
|
|
645
|
+
}), x.value.expanded = !1, b();
|
|
683
646
|
}
|
|
684
|
-
function v
|
|
685
|
-
const
|
|
647
|
+
function B(v) {
|
|
648
|
+
const E = {
|
|
686
649
|
btn: !0,
|
|
687
650
|
"f-rt-btn": !0,
|
|
688
|
-
"f-btn-ml":
|
|
689
|
-
"f-btn-mr":
|
|
690
|
-
"btn-icontext": !!(
|
|
651
|
+
"f-btn-ml": p.value === "right",
|
|
652
|
+
"f-btn-mr": p.value === "left",
|
|
653
|
+
"btn-icontext": !!(v.icon && v.icon.trim())
|
|
691
654
|
};
|
|
692
|
-
if (
|
|
693
|
-
const
|
|
694
|
-
|
|
655
|
+
if (v.class) {
|
|
656
|
+
const P = v.class.split(" ");
|
|
657
|
+
P && P.length && P.reduce((h, o) => (h[o] = !0, h), E);
|
|
695
658
|
}
|
|
696
|
-
return
|
|
659
|
+
return E;
|
|
697
660
|
}
|
|
698
|
-
function
|
|
699
|
-
document.body.click(), typeof
|
|
661
|
+
function O(v, E) {
|
|
662
|
+
document.body.click(), typeof E.onClick == "function" && E.onClick(v, E.id), e.emit("click", v, E.id);
|
|
700
663
|
}
|
|
701
|
-
function
|
|
702
|
-
return
|
|
664
|
+
function F(v) {
|
|
665
|
+
return y("button", {
|
|
703
666
|
type: "button",
|
|
704
|
-
class: v
|
|
705
|
-
id:
|
|
706
|
-
disabled: !
|
|
707
|
-
onClick: (
|
|
708
|
-
}, [
|
|
709
|
-
class:
|
|
710
|
-
}, null),
|
|
667
|
+
class: B(v),
|
|
668
|
+
id: v.id,
|
|
669
|
+
disabled: !v.enable,
|
|
670
|
+
onClick: (E) => O(E, v)
|
|
671
|
+
}, [f.shouldShowIcon(v) && y("i", {
|
|
672
|
+
class: f.iconClass(v)
|
|
673
|
+
}, null), v.text]);
|
|
711
674
|
}
|
|
712
|
-
const
|
|
713
|
-
function
|
|
714
|
-
const
|
|
715
|
-
let
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
719
|
-
|
|
675
|
+
const j = /* @__PURE__ */ new Map(), A = [];
|
|
676
|
+
function k(v) {
|
|
677
|
+
const E = m.value;
|
|
678
|
+
let P = v;
|
|
679
|
+
const h = Array.from(E.children), o = h[h.length - 1].id === "__more_buttons__" ? h[h.length - 1] : null;
|
|
680
|
+
if (o) {
|
|
681
|
+
const C = o.computedStyleMap().get("margin-left"), S = o.computedStyleMap().get("margin-right"), $ = (C ? C.value : 0) + o.getBoundingClientRect().width + (S ? S.value : 0);
|
|
682
|
+
P -= $;
|
|
720
683
|
}
|
|
721
|
-
const t =
|
|
722
|
-
for (const
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
id:
|
|
726
|
-
width:
|
|
727
|
-
})) :
|
|
684
|
+
const t = h.filter((C) => C.id !== "__more_buttons__");
|
|
685
|
+
for (const C of t) {
|
|
686
|
+
const S = C.computedStyleMap().get("margin-left"), $ = C.computedStyleMap().get("margin-right"), U = (S ? S.value : 0) + C.getBoundingClientRect().width + ($ ? $.value : 0);
|
|
687
|
+
P < U ? (j.set(C.id, !0), A.push({
|
|
688
|
+
id: C.id,
|
|
689
|
+
width: U
|
|
690
|
+
})) : P -= U;
|
|
728
691
|
}
|
|
729
|
-
if (
|
|
730
|
-
for (let
|
|
731
|
-
const
|
|
732
|
-
if (
|
|
733
|
-
|
|
692
|
+
if (A.length)
|
|
693
|
+
for (let C = A.length - 1; C >= 0; C--) {
|
|
694
|
+
const S = A[C].width;
|
|
695
|
+
if (P >= S)
|
|
696
|
+
P -= S, j.delete(A[C].id), A.pop();
|
|
734
697
|
else
|
|
735
698
|
break;
|
|
736
699
|
}
|
|
737
|
-
const r = Object.assign({},
|
|
700
|
+
const r = Object.assign({}, x.value);
|
|
738
701
|
r.children = [];
|
|
739
|
-
const
|
|
740
|
-
|
|
702
|
+
const a = new z(r), w = n.value.reduce((C, S) => (j.has(S.id) && a.children.push(S), S.visible = !j.has(S.id), C.push(S), C), []);
|
|
703
|
+
x.value = a, n.value = w;
|
|
741
704
|
}
|
|
742
|
-
const
|
|
743
|
-
if (
|
|
744
|
-
const
|
|
745
|
-
(
|
|
705
|
+
const R = new ResizeObserver((v) => {
|
|
706
|
+
if (v.length) {
|
|
707
|
+
const P = v[0].contentRect.width, o = m.value.getBoundingClientRect().width;
|
|
708
|
+
(P < o || A.length) && (k(P), I());
|
|
746
709
|
}
|
|
747
710
|
});
|
|
748
|
-
return
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
}),
|
|
752
|
-
|
|
753
|
-
}),
|
|
754
|
-
|
|
711
|
+
return H(() => {
|
|
712
|
+
const v = d.value;
|
|
713
|
+
R.observe(v), document.body.addEventListener("click", I), document.body.addEventListener("wheel", I);
|
|
714
|
+
}), de(() => {
|
|
715
|
+
R.disconnect(), document.body.removeEventListener("click", I), document.body.removeEventListener("wheel", I);
|
|
716
|
+
}), Q(() => s.items, () => {
|
|
717
|
+
n.value = ce(s.items);
|
|
755
718
|
}, {
|
|
756
719
|
deep: !0
|
|
757
720
|
}), e.expose({
|
|
758
|
-
elementRef:
|
|
759
|
-
}), () =>
|
|
760
|
-
class:
|
|
761
|
-
ref:
|
|
762
|
-
}, [
|
|
721
|
+
elementRef: i
|
|
722
|
+
}), () => y("div", {
|
|
723
|
+
class: l.value,
|
|
724
|
+
ref: i
|
|
725
|
+
}, [y("div", {
|
|
763
726
|
ref: d,
|
|
764
|
-
class:
|
|
765
|
-
}, [
|
|
766
|
-
ref:
|
|
727
|
+
class: c.value
|
|
728
|
+
}, [y("div", {
|
|
729
|
+
ref: m,
|
|
767
730
|
class: "d-inline-block f-response-content",
|
|
768
731
|
style: "white-space: nowrap;"
|
|
769
|
-
}, [
|
|
732
|
+
}, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? u(v) : F(v)), g.value && u(x.value)])])]);
|
|
770
733
|
}
|
|
771
734
|
});
|
|
772
|
-
function
|
|
773
|
-
const
|
|
735
|
+
function lt(s, e) {
|
|
736
|
+
const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
|
|
774
737
|
});
|
|
775
738
|
function d() {
|
|
776
|
-
|
|
739
|
+
i && i();
|
|
777
740
|
}
|
|
778
|
-
function
|
|
741
|
+
function m(o) {
|
|
779
742
|
const t = {
|
|
780
743
|
"dropdown-menu": !0
|
|
781
744
|
};
|
|
782
|
-
if (
|
|
783
|
-
const r =
|
|
784
|
-
r && r.length && r.reduce((
|
|
745
|
+
if (o.class) {
|
|
746
|
+
const r = o.menuClass.split(" ");
|
|
747
|
+
r && r.length && r.reduce((a, w) => (a[w] = !0, a), t);
|
|
785
748
|
}
|
|
786
749
|
return t;
|
|
787
750
|
}
|
|
788
|
-
function
|
|
751
|
+
function p(o) {
|
|
789
752
|
const t = {
|
|
790
|
-
disabled: !
|
|
753
|
+
disabled: !o.enable,
|
|
791
754
|
"dropdown-submenu": !0,
|
|
792
755
|
"f-rt-dropdown": !0
|
|
793
|
-
}, r =
|
|
794
|
-
return r && r.length && r.reduce((
|
|
756
|
+
}, r = o.dropdownClass.split(" ");
|
|
757
|
+
return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
|
|
795
758
|
}
|
|
796
|
-
function
|
|
759
|
+
function T(o) {
|
|
797
760
|
const t = {
|
|
798
|
-
disabled: !
|
|
761
|
+
disabled: !o.enable,
|
|
799
762
|
"dropdown-item": !0,
|
|
800
763
|
"f-rt-btn": !0,
|
|
801
764
|
"position-relative": !0,
|
|
802
765
|
"farris-component": !0
|
|
803
|
-
}, r =
|
|
804
|
-
return r && r.length && r.reduce((
|
|
805
|
-
}
|
|
806
|
-
let
|
|
807
|
-
const
|
|
808
|
-
function
|
|
809
|
-
var
|
|
810
|
-
((
|
|
811
|
-
const
|
|
812
|
-
if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ?
|
|
813
|
-
const
|
|
814
|
-
|
|
766
|
+
}, r = o.class.split(" ");
|
|
767
|
+
return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
|
|
768
|
+
}
|
|
769
|
+
let x;
|
|
770
|
+
const f = /* @__PURE__ */ new Map();
|
|
771
|
+
function g(o, t, r) {
|
|
772
|
+
var w;
|
|
773
|
+
((w = o.target) == null ? void 0 : w.id) === t.id && o.stopPropagation();
|
|
774
|
+
const a = r ? r.id : "__top_item__";
|
|
775
|
+
if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? f.set(a, t) : f.delete(a)), f.has(a) && f.get(a) !== t) {
|
|
776
|
+
const C = f.get(a);
|
|
777
|
+
C && (C.expanded = !1);
|
|
815
778
|
}
|
|
816
779
|
}
|
|
817
|
-
function
|
|
818
|
-
|
|
780
|
+
function l(o) {
|
|
781
|
+
o && (o.stopPropagation(), o.preventDefault());
|
|
819
782
|
}
|
|
820
|
-
function
|
|
783
|
+
function c() {
|
|
821
784
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
|
|
822
|
-
const
|
|
823
|
-
Array.from(
|
|
785
|
+
const o = document.getElementsByClassName("dgComponentSelected");
|
|
786
|
+
Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
|
|
824
787
|
}
|
|
825
|
-
function
|
|
826
|
-
|
|
788
|
+
function u(o) {
|
|
789
|
+
o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
827
790
|
}
|
|
828
|
-
function
|
|
791
|
+
function b(o) {
|
|
829
792
|
const {
|
|
830
793
|
buttons: t = []
|
|
831
|
-
} =
|
|
794
|
+
} = n.schema;
|
|
832
795
|
let r = [];
|
|
833
|
-
t.forEach((
|
|
834
|
-
r = r.concat(
|
|
796
|
+
t.forEach((C) => {
|
|
797
|
+
r = r.concat(C.children || []);
|
|
835
798
|
});
|
|
836
|
-
const
|
|
799
|
+
const a = r.findIndex((C) => C.id === o), w = a === -1 ? null : r[a];
|
|
837
800
|
return {
|
|
838
|
-
index:
|
|
839
|
-
item:
|
|
801
|
+
index: a,
|
|
802
|
+
item: w
|
|
840
803
|
};
|
|
841
804
|
}
|
|
842
|
-
function
|
|
805
|
+
function I(o) {
|
|
843
806
|
const {
|
|
844
807
|
buttons: t = []
|
|
845
|
-
} =
|
|
808
|
+
} = n.schema, r = t.findIndex((w) => w.id === o), a = r === -1 ? null : t[r];
|
|
846
809
|
return {
|
|
847
810
|
index: r,
|
|
848
|
-
item:
|
|
811
|
+
item: a
|
|
849
812
|
};
|
|
850
813
|
}
|
|
851
|
-
function
|
|
852
|
-
var
|
|
853
|
-
|
|
814
|
+
function B(o) {
|
|
815
|
+
var a;
|
|
816
|
+
n.schema;
|
|
854
817
|
const {
|
|
855
818
|
index: t,
|
|
856
819
|
item: r
|
|
857
|
-
} =
|
|
858
|
-
(
|
|
820
|
+
} = b(o);
|
|
821
|
+
(a = n == null ? void 0 : n.setupContext) == null || a.emit("selectionChange", r == null ? void 0 : r.type, r);
|
|
859
822
|
}
|
|
860
|
-
const
|
|
823
|
+
const O = function(o) {
|
|
861
824
|
const {
|
|
862
825
|
componentType: t
|
|
863
|
-
} =
|
|
864
|
-
return r && !r.id && r.type === t && (r.id = `${
|
|
865
|
-
},
|
|
866
|
-
const
|
|
826
|
+
} = o, r = Z(t, o), a = t.toLowerCase().replace("-", "_");
|
|
827
|
+
return r && !r.id && r.type === t && (r.id = `${a}_${Math.random().toString().slice(2, 6)}`), r;
|
|
828
|
+
}, F = function() {
|
|
829
|
+
const o = {
|
|
867
830
|
componentType: "response-toolbar-item",
|
|
868
831
|
parentComponentInstance: e.value,
|
|
869
832
|
targetPosition: -1
|
|
870
833
|
};
|
|
871
|
-
return
|
|
834
|
+
return O(o);
|
|
872
835
|
};
|
|
873
|
-
function
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
function
|
|
877
|
-
|
|
878
|
-
const
|
|
879
|
-
buttons:
|
|
880
|
-
} =
|
|
881
|
-
if (!
|
|
836
|
+
function j(o, t) {
|
|
837
|
+
l(o), c(), u(o), B(t.id);
|
|
838
|
+
}
|
|
839
|
+
function A(o, t, r) {
|
|
840
|
+
l(o);
|
|
841
|
+
const a = t.id, w = r && r.id, {
|
|
842
|
+
buttons: C = []
|
|
843
|
+
} = n.schema;
|
|
844
|
+
if (!w)
|
|
882
845
|
return;
|
|
883
846
|
const {
|
|
884
|
-
index:
|
|
885
|
-
} =
|
|
886
|
-
if (
|
|
847
|
+
index: S
|
|
848
|
+
} = I(w);
|
|
849
|
+
if (S === -1)
|
|
887
850
|
return;
|
|
888
851
|
const {
|
|
889
|
-
index:
|
|
890
|
-
} = a
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
function
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
-
buttons:
|
|
897
|
-
} =
|
|
898
|
-
if (!
|
|
852
|
+
index: $
|
|
853
|
+
} = b(a);
|
|
854
|
+
$ !== -1 && (C[S].children.splice($, 1), d());
|
|
855
|
+
}
|
|
856
|
+
function k(o, t, r) {
|
|
857
|
+
l(o);
|
|
858
|
+
const a = r && r.id, {
|
|
859
|
+
buttons: w = []
|
|
860
|
+
} = n.schema;
|
|
861
|
+
if (!a)
|
|
899
862
|
return;
|
|
900
863
|
const {
|
|
901
|
-
index:
|
|
902
|
-
} =
|
|
903
|
-
if (
|
|
864
|
+
index: C
|
|
865
|
+
} = I(a);
|
|
866
|
+
if (C === -1)
|
|
904
867
|
return;
|
|
905
|
-
const
|
|
868
|
+
const S = F(), $ = Object.assign({}, S, {
|
|
906
869
|
text: t.text
|
|
907
870
|
});
|
|
908
|
-
|
|
909
|
-
}
|
|
910
|
-
function
|
|
911
|
-
|
|
912
|
-
const
|
|
913
|
-
buttons:
|
|
914
|
-
} =
|
|
915
|
-
if (!
|
|
871
|
+
w[C].children.push($), d();
|
|
872
|
+
}
|
|
873
|
+
function R(o, t, r) {
|
|
874
|
+
l(o);
|
|
875
|
+
const a = r && r.id, {
|
|
876
|
+
buttons: w = []
|
|
877
|
+
} = n.schema;
|
|
878
|
+
if (!a)
|
|
916
879
|
return;
|
|
917
880
|
const {
|
|
918
|
-
index:
|
|
919
|
-
} =
|
|
920
|
-
if (
|
|
881
|
+
index: C
|
|
882
|
+
} = I(a);
|
|
883
|
+
if (C === -1)
|
|
921
884
|
return;
|
|
922
|
-
const
|
|
885
|
+
const S = F(), $ = Object.assign({}, S, {
|
|
923
886
|
text: "按钮"
|
|
924
887
|
});
|
|
925
|
-
|
|
888
|
+
w[C].children.push($), d();
|
|
926
889
|
}
|
|
927
|
-
function
|
|
928
|
-
return
|
|
890
|
+
function v(o, t) {
|
|
891
|
+
return y("div", {
|
|
929
892
|
class: "component-btn-group"
|
|
930
|
-
}, [
|
|
893
|
+
}, [y("div", null, [y("div", {
|
|
931
894
|
role: "button",
|
|
932
895
|
class: "btn component-settings-button",
|
|
933
896
|
title: "删除",
|
|
934
897
|
ref: "removeButton",
|
|
935
898
|
style: "position:static;",
|
|
936
|
-
onClick: (r) =>
|
|
937
|
-
}, [
|
|
899
|
+
onClick: (r) => A(r, o, t)
|
|
900
|
+
}, [y("i", {
|
|
938
901
|
class: "f-icon f-icon-yxs_delete"
|
|
939
|
-
}, null)]),
|
|
902
|
+
}, null)]), y("div", {
|
|
940
903
|
role: "button",
|
|
941
904
|
class: "btn component-settings-button",
|
|
942
905
|
title: "复制",
|
|
943
906
|
ref: "copyButton",
|
|
944
907
|
style: "position:static;",
|
|
945
|
-
onClick: (r) =>
|
|
946
|
-
}, [
|
|
908
|
+
onClick: (r) => k(r, o, t)
|
|
909
|
+
}, [y("i", {
|
|
947
910
|
class: "f-icon f-icon-yxs_copy"
|
|
948
|
-
}, null)]),
|
|
911
|
+
}, null)]), y("div", {
|
|
949
912
|
role: "button",
|
|
950
913
|
class: "btn component-settings-button",
|
|
951
914
|
title: "新增同级",
|
|
952
915
|
ref: "appendSame",
|
|
953
916
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
954
|
-
onClick: (r) =>
|
|
955
|
-
}, [
|
|
917
|
+
onClick: (r) => R(r, o, t)
|
|
918
|
+
}, [y("i", {
|
|
956
919
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
957
|
-
}, null),
|
|
920
|
+
}, null), y("span", {
|
|
958
921
|
style: "font-size:13px;margin:auto"
|
|
959
|
-
}, [
|
|
922
|
+
}, [ue("新增同级")])])])]);
|
|
960
923
|
}
|
|
961
|
-
function
|
|
962
|
-
return
|
|
963
|
-
class:
|
|
924
|
+
function E(o) {
|
|
925
|
+
return o.children.map((t) => t.children && t.children.length ? y("li", {
|
|
926
|
+
class: p(t),
|
|
964
927
|
id: t.id,
|
|
965
|
-
onClick: (r) => t.enable &&
|
|
966
|
-
}, [
|
|
928
|
+
onClick: (r) => t.enable && g(r, t, o)
|
|
929
|
+
}, [y("span", {
|
|
967
930
|
id: t.id,
|
|
968
|
-
class:
|
|
969
|
-
onMouseover: (r) => t.enable &&
|
|
970
|
-
}, [t.text,
|
|
931
|
+
class: T(t),
|
|
932
|
+
onMouseover: (r) => t.enable && g(r, t, o)
|
|
933
|
+
}, [t.text, y("i", {
|
|
971
934
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
972
935
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
973
|
-
}, null)]),
|
|
974
|
-
class:
|
|
936
|
+
}, null)]), x(t, t)]) : y("li", {
|
|
937
|
+
class: T(t),
|
|
975
938
|
id: t.id,
|
|
976
|
-
onClick: (r) =>
|
|
977
|
-
}, [
|
|
939
|
+
onClick: (r) => j(r, t)
|
|
940
|
+
}, [v(t, o), s.shouldShowIcon(t) && y("i", {
|
|
978
941
|
class: s.iconClass(t)
|
|
979
942
|
}, null), t.text]));
|
|
980
943
|
}
|
|
981
|
-
function
|
|
982
|
-
const
|
|
983
|
-
display:
|
|
944
|
+
function P(o, t, r) {
|
|
945
|
+
const a = {
|
|
946
|
+
display: o.expanded ? "block" : "none",
|
|
984
947
|
position: "fixed",
|
|
985
948
|
maxWidth: "300px",
|
|
986
949
|
width: "auto",
|
|
987
950
|
minWidth: "120px"
|
|
988
|
-
},
|
|
989
|
-
if (
|
|
951
|
+
}, w = document.getElementsByTagName("body")[0].getClientRects()[0].width, C = t, S = C == null ? void 0 : C.getClientRects();
|
|
952
|
+
if (C && S && S.length) {
|
|
990
953
|
const {
|
|
991
|
-
top:
|
|
992
|
-
width:
|
|
993
|
-
left:
|
|
994
|
-
right:
|
|
995
|
-
height:
|
|
996
|
-
} =
|
|
997
|
-
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
-
const
|
|
954
|
+
top: $,
|
|
955
|
+
width: U,
|
|
956
|
+
left: W,
|
|
957
|
+
right: _,
|
|
958
|
+
height: N
|
|
959
|
+
} = S[0], q = Math.ceil(N + $);
|
|
960
|
+
a.top = `${q}px`, a.left = `${W}px`;
|
|
961
|
+
const G = o.id + "_menu", K = t ? t.querySelector("#" + G) : null;
|
|
962
|
+
if (K) {
|
|
963
|
+
a.display === "block" && (K.style.display = "block");
|
|
964
|
+
const re = K.getBoundingClientRect();
|
|
1002
965
|
if (r) {
|
|
1003
|
-
|
|
1004
|
-
const
|
|
1005
|
-
|
|
966
|
+
a.top = `${$ - 6}px`;
|
|
967
|
+
const Te = Math.ceil(U + W);
|
|
968
|
+
a.left = `${Te}px`;
|
|
1006
969
|
}
|
|
1007
|
-
|
|
970
|
+
w - W - U < re.width && (a.left = `${(r ? W : _) - re.width}px`);
|
|
1008
971
|
}
|
|
1009
972
|
}
|
|
1010
|
-
return
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
var
|
|
1014
|
-
const r =
|
|
1015
|
-
return
|
|
1016
|
-
class:
|
|
1017
|
-
style:
|
|
1018
|
-
id:
|
|
1019
|
-
}, [
|
|
973
|
+
return a;
|
|
974
|
+
}
|
|
975
|
+
x = function(o, t) {
|
|
976
|
+
var C, S;
|
|
977
|
+
const r = ae(), a = t ? t.id : o.id, w = (S = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : S.querySelector("#" + a);
|
|
978
|
+
return y("ul", {
|
|
979
|
+
class: m(o),
|
|
980
|
+
style: P(o, w, t),
|
|
981
|
+
id: o.id + "_menu"
|
|
982
|
+
}, [E(o)]);
|
|
1020
983
|
};
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}),
|
|
984
|
+
function h() {
|
|
985
|
+
f.forEach((o) => {
|
|
986
|
+
o.expanded = !1;
|
|
987
|
+
}), f.clear();
|
|
1025
988
|
}
|
|
1026
989
|
return {
|
|
1027
|
-
renderDropdownMenu:
|
|
1028
|
-
clearAllDropDownMenu:
|
|
990
|
+
renderDropdownMenu: x,
|
|
991
|
+
clearAllDropDownMenu: h
|
|
1029
992
|
};
|
|
1030
993
|
}
|
|
1031
|
-
function
|
|
1032
|
-
const
|
|
994
|
+
function at(s, e, n) {
|
|
995
|
+
const i = M(s.alignment), {
|
|
1033
996
|
renderDropdownMenu: d,
|
|
1034
|
-
clearAllDropDownMenu:
|
|
1035
|
-
} =
|
|
997
|
+
clearAllDropDownMenu: m
|
|
998
|
+
} = lt(e, n), p = L("design-item-context"), T = L("toolbar-item-handler", () => {
|
|
1036
999
|
});
|
|
1037
|
-
function
|
|
1038
|
-
|
|
1000
|
+
function x() {
|
|
1001
|
+
T && T();
|
|
1039
1002
|
}
|
|
1040
|
-
function
|
|
1041
|
-
const
|
|
1003
|
+
function f(h) {
|
|
1004
|
+
const o = {
|
|
1042
1005
|
"btn-group": !0,
|
|
1043
1006
|
"f-rt-dropdown": !0,
|
|
1044
|
-
"f-btn-ml":
|
|
1045
|
-
"f-btn-mr":
|
|
1046
|
-
}, t =
|
|
1047
|
-
return t && t.length && t.reduce((r,
|
|
1007
|
+
"f-btn-ml": i.value === "right",
|
|
1008
|
+
"f-btn-mr": i.value === "left"
|
|
1009
|
+
}, t = h.dropdownClass.split(" ");
|
|
1010
|
+
return t && t.length && t.reduce((r, a) => (r[a] = !0, r), o), o;
|
|
1048
1011
|
}
|
|
1049
|
-
function
|
|
1050
|
-
const
|
|
1012
|
+
function g(h) {
|
|
1013
|
+
const o = {
|
|
1051
1014
|
btn: !0,
|
|
1052
|
-
disabled: !
|
|
1015
|
+
disabled: !h.enable,
|
|
1053
1016
|
"position-relative": !0,
|
|
1054
1017
|
"farris-component": !0,
|
|
1055
1018
|
"f-rt-btn": !0,
|
|
1056
|
-
"btn-icontext": !!(
|
|
1019
|
+
"btn-icontext": !!(h.icon && h.icon.trim())
|
|
1057
1020
|
};
|
|
1058
|
-
if (
|
|
1059
|
-
const t =
|
|
1060
|
-
t && t.length && t.reduce((r,
|
|
1021
|
+
if (h.class) {
|
|
1022
|
+
const t = h.class.split(" ");
|
|
1023
|
+
t && t.length && t.reduce((r, a) => (r[a] = !0, r), o);
|
|
1061
1024
|
}
|
|
1062
|
-
return
|
|
1025
|
+
return o;
|
|
1063
1026
|
}
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1027
|
+
function l(h) {
|
|
1028
|
+
h && (h.stopPropagation(), h.preventDefault());
|
|
1066
1029
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
const t =
|
|
1070
|
-
document.body.click(),
|
|
1030
|
+
function c(h, o) {
|
|
1031
|
+
l(h);
|
|
1032
|
+
const t = o.expanded;
|
|
1033
|
+
document.body.click(), o.expanded = !t;
|
|
1071
1034
|
}
|
|
1072
|
-
const
|
|
1035
|
+
const u = function(h) {
|
|
1073
1036
|
const {
|
|
1074
|
-
componentType:
|
|
1075
|
-
} =
|
|
1076
|
-
return t && !t.id && t.type ===
|
|
1077
|
-
},
|
|
1078
|
-
const
|
|
1037
|
+
componentType: o
|
|
1038
|
+
} = h, t = Z(o, h), r = o.toLowerCase().replace("-", "_");
|
|
1039
|
+
return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
|
|
1040
|
+
}, b = function() {
|
|
1041
|
+
const h = {
|
|
1079
1042
|
componentType: "response-toolbar-item",
|
|
1080
|
-
parentComponentInstance:
|
|
1043
|
+
parentComponentInstance: n.value,
|
|
1081
1044
|
targetPosition: -1
|
|
1082
1045
|
};
|
|
1083
|
-
return
|
|
1046
|
+
return u(h);
|
|
1084
1047
|
};
|
|
1085
|
-
function
|
|
1086
|
-
const
|
|
1048
|
+
function I(h) {
|
|
1049
|
+
const o = p.schema.buttons || p.schema.contents, t = o == null ? void 0 : o.findIndex((a) => a.id === h), r = t === -1 ? null : o[t];
|
|
1087
1050
|
return {
|
|
1088
1051
|
index: t,
|
|
1089
1052
|
toolbarItem: r
|
|
1090
1053
|
};
|
|
1091
1054
|
}
|
|
1092
|
-
function
|
|
1093
|
-
var
|
|
1055
|
+
function B(h, o) {
|
|
1056
|
+
var S;
|
|
1094
1057
|
const {
|
|
1095
1058
|
index: t,
|
|
1096
1059
|
toolbarItem: r
|
|
1097
|
-
} =
|
|
1060
|
+
} = I(o);
|
|
1098
1061
|
if (t === -1)
|
|
1099
1062
|
return;
|
|
1100
|
-
const
|
|
1101
|
-
text:
|
|
1063
|
+
const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
|
|
1064
|
+
text: a
|
|
1102
1065
|
});
|
|
1103
|
-
(
|
|
1066
|
+
(S = p.schema.buttons) == null || S.push(C), x();
|
|
1104
1067
|
}
|
|
1105
|
-
function
|
|
1068
|
+
function O(h, o) {
|
|
1106
1069
|
const {
|
|
1107
1070
|
index: t,
|
|
1108
1071
|
toolbarItem: r
|
|
1109
|
-
} =
|
|
1072
|
+
} = I(o);
|
|
1110
1073
|
if (t === -1)
|
|
1111
1074
|
return;
|
|
1112
|
-
const
|
|
1113
|
-
text:
|
|
1114
|
-
}),
|
|
1115
|
-
|
|
1075
|
+
const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
|
|
1076
|
+
text: a
|
|
1077
|
+
}), S = p.schema.buttons[t].children || [];
|
|
1078
|
+
S.push(C), p.schema.buttons[t].children = S, x();
|
|
1116
1079
|
}
|
|
1117
|
-
function
|
|
1118
|
-
const t =
|
|
1119
|
-
r !== -1 && (t.splice(r, 1),
|
|
1080
|
+
function F(h, o) {
|
|
1081
|
+
const t = p.schema.buttons || p.schema.contents, r = t == null ? void 0 : t.findIndex((a) => a.id === o);
|
|
1082
|
+
r !== -1 && (t.splice(r, 1), x());
|
|
1120
1083
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return
|
|
1084
|
+
function j(h) {
|
|
1085
|
+
return y("div", {
|
|
1123
1086
|
class: "component-btn-group"
|
|
1124
|
-
}, [
|
|
1087
|
+
}, [y("div", null, [y("div", {
|
|
1125
1088
|
role: "button",
|
|
1126
1089
|
class: "btn component-settings-button",
|
|
1127
1090
|
title: "删除",
|
|
1128
1091
|
ref: "removeButton",
|
|
1129
1092
|
style: "position:static;",
|
|
1130
|
-
onClick: (
|
|
1131
|
-
}, [
|
|
1093
|
+
onClick: (o) => F(o, h)
|
|
1094
|
+
}, [y("i", {
|
|
1132
1095
|
class: "f-icon f-icon-yxs_delete"
|
|
1133
|
-
}, null)]),
|
|
1096
|
+
}, null)]), y("div", {
|
|
1134
1097
|
role: "button",
|
|
1135
1098
|
class: "btn component-settings-button",
|
|
1136
1099
|
title: "复制",
|
|
1137
1100
|
ref: "copyButton",
|
|
1138
1101
|
style: "position:static;",
|
|
1139
|
-
onClick: (
|
|
1140
|
-
}, [
|
|
1102
|
+
onClick: (o) => B(o, h)
|
|
1103
|
+
}, [y("i", {
|
|
1141
1104
|
class: "f-icon f-icon-yxs_copy"
|
|
1142
|
-
}, null)]),
|
|
1105
|
+
}, null)]), y("div", {
|
|
1143
1106
|
role: "button",
|
|
1144
1107
|
class: "btn component-settings-button",
|
|
1145
1108
|
title: "新增子级",
|
|
1146
1109
|
ref: "appendChildButton",
|
|
1147
1110
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1148
|
-
onClick: (
|
|
1149
|
-
}, [
|
|
1111
|
+
onClick: (o) => O(o, h)
|
|
1112
|
+
}, [y("i", {
|
|
1150
1113
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1151
|
-
}, null),
|
|
1114
|
+
}, null), y("span", {
|
|
1152
1115
|
style: "font-size:13px;margin:auto"
|
|
1153
|
-
}, [
|
|
1116
|
+
}, [ue("新增子级")])])])]);
|
|
1154
1117
|
}
|
|
1155
|
-
function
|
|
1156
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1157
|
-
const
|
|
1158
|
-
Array.from(
|
|
1118
|
+
function A() {
|
|
1119
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1120
|
+
const h = document.getElementsByClassName("dgComponentSelected");
|
|
1121
|
+
Array.from(h).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1159
1122
|
}
|
|
1160
|
-
function
|
|
1161
|
-
|
|
1123
|
+
function k(h) {
|
|
1124
|
+
h.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1162
1125
|
}
|
|
1163
|
-
function
|
|
1164
|
-
var
|
|
1165
|
-
const
|
|
1126
|
+
function R(h) {
|
|
1127
|
+
var a;
|
|
1128
|
+
const o = p.schema.buttons || p.schema.contents, t = o == null ? void 0 : o.findIndex((w) => w.id === h);
|
|
1166
1129
|
if (t === -1)
|
|
1167
1130
|
return;
|
|
1168
|
-
const r =
|
|
1169
|
-
(
|
|
1170
|
-
}
|
|
1171
|
-
function h
|
|
1172
|
-
|
|
1173
|
-
}
|
|
1174
|
-
function
|
|
1175
|
-
return
|
|
1176
|
-
id:
|
|
1177
|
-
class:
|
|
1178
|
-
}, [
|
|
1179
|
-
class:
|
|
1131
|
+
const r = o[t];
|
|
1132
|
+
(a = p == null ? void 0 : p.setupContext) == null || a.emit("selectionChange", "response-toolbar-item", r);
|
|
1133
|
+
}
|
|
1134
|
+
function v(h, o) {
|
|
1135
|
+
l(h), A(), k(h), l(h), c(h, o), R(o.id);
|
|
1136
|
+
}
|
|
1137
|
+
function E(h) {
|
|
1138
|
+
return y("div", {
|
|
1139
|
+
id: h.id,
|
|
1140
|
+
class: f(h)
|
|
1141
|
+
}, [y("div", {
|
|
1142
|
+
class: g(h),
|
|
1180
1143
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1181
|
-
onClick: (
|
|
1182
|
-
}, [
|
|
1183
|
-
class: e.iconClass(
|
|
1184
|
-
}, null),
|
|
1144
|
+
onClick: (o) => h.enable && v(o, h)
|
|
1145
|
+
}, [j(h.id), e.shouldShowIcon(h) && y("i", {
|
|
1146
|
+
class: e.iconClass(h)
|
|
1147
|
+
}, null), y("span", null, [h.text]), y("i", {
|
|
1185
1148
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1186
1149
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1187
|
-
}, null)]), d(
|
|
1188
|
-
}
|
|
1189
|
-
function A() {
|
|
1190
|
-
b();
|
|
1150
|
+
}, null)]), d(h)]);
|
|
1191
1151
|
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
clearAllDropDown: A
|
|
1195
|
-
};
|
|
1196
|
-
}
|
|
1197
|
-
function bt() {
|
|
1198
|
-
function s(e) {
|
|
1199
|
-
var d, b;
|
|
1200
|
-
if (!e)
|
|
1201
|
-
return !1;
|
|
1202
|
-
const o = ((d = e.targetContainer) == null ? void 0 : d.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1203
|
-
if (!o)
|
|
1204
|
-
return !1;
|
|
1205
|
-
const c = (b = o.schema.appearance) == null ? void 0 : b.class;
|
|
1206
|
-
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1207
|
-
const m = o.schema.type, D = (m === "response-form" || m === "content-container") && c && c.includes("farris-form");
|
|
1208
|
-
if (o.schema.type !== "response-layout-item" && !D)
|
|
1209
|
-
return !1;
|
|
1210
|
-
}
|
|
1211
|
-
return e.controlType !== "field-set";
|
|
1152
|
+
function P() {
|
|
1153
|
+
m();
|
|
1212
1154
|
}
|
|
1213
1155
|
return {
|
|
1214
|
-
|
|
1156
|
+
renderToolbarDropdown: E,
|
|
1157
|
+
clearAllDropDown: P
|
|
1215
1158
|
};
|
|
1216
1159
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
type: "object",
|
|
1232
|
-
properties: {
|
|
1233
|
-
contents: {
|
|
1234
|
-
type: "object",
|
|
1235
|
-
properties: {
|
|
1236
|
-
"f-struct-like-card": {
|
|
1237
|
-
description: "",
|
|
1238
|
-
type: "object",
|
|
1239
|
-
properties: {
|
|
1240
|
-
contents: {
|
|
1241
|
-
type: "object",
|
|
1242
|
-
properties: {
|
|
1243
|
-
"f-struct-form": {
|
|
1244
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
1245
|
-
type: "object",
|
|
1246
|
-
properties: {
|
|
1247
|
-
contents: {
|
|
1248
|
-
type: "object",
|
|
1249
|
-
properties: {
|
|
1250
|
-
"f-section-form": {
|
|
1251
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1252
|
-
type: "object",
|
|
1253
|
-
properties: {
|
|
1254
|
-
contents: {
|
|
1255
|
-
type: "object",
|
|
1256
|
-
properties: {
|
|
1257
|
-
"f-form-layout": {
|
|
1258
|
-
description: "The class of reponse form",
|
|
1259
|
-
type: "object",
|
|
1260
|
-
properties: {
|
|
1261
|
-
rules: {
|
|
1262
|
-
type: "object",
|
|
1263
|
-
properties: {
|
|
1264
|
-
canAccept: {
|
|
1265
|
-
type: "boolean",
|
|
1266
|
-
const: !0
|
|
1267
|
-
},
|
|
1268
|
-
fixed: {
|
|
1269
|
-
type: "boolean",
|
|
1270
|
-
const: !0
|
|
1271
|
-
},
|
|
1272
|
-
hidePadding: {
|
|
1273
|
-
type: "boolean",
|
|
1274
|
-
const: !1
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
},
|
|
1282
|
-
rules: {
|
|
1283
|
-
type: "object",
|
|
1284
|
-
properties: {
|
|
1285
|
-
canAccept: {
|
|
1286
|
-
type: "boolean",
|
|
1287
|
-
const: !1
|
|
1288
|
-
},
|
|
1289
|
-
fixed: {
|
|
1290
|
-
type: "boolean",
|
|
1291
|
-
const: !0
|
|
1292
|
-
},
|
|
1293
|
-
hidePadding: {
|
|
1294
|
-
type: "boolean",
|
|
1295
|
-
const: !0
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
},
|
|
1303
|
-
rules: {
|
|
1304
|
-
type: "object",
|
|
1305
|
-
properties: {
|
|
1306
|
-
canAccept: {
|
|
1307
|
-
type: "boolean",
|
|
1308
|
-
const: !1
|
|
1309
|
-
},
|
|
1310
|
-
fixed: {
|
|
1311
|
-
type: "boolean",
|
|
1312
|
-
const: !1
|
|
1313
|
-
},
|
|
1314
|
-
hidePadding: {
|
|
1315
|
-
type: "boolean",
|
|
1316
|
-
const: !0
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
},
|
|
1322
|
-
"f-struct-wrapper": {
|
|
1323
|
-
description: "",
|
|
1324
|
-
type: "object",
|
|
1325
|
-
properties: {
|
|
1326
|
-
contents: {
|
|
1327
|
-
type: "object",
|
|
1328
|
-
properties: {
|
|
1329
|
-
"f-section-tabs": {
|
|
1330
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
1331
|
-
type: "object",
|
|
1332
|
-
properties: {
|
|
1333
|
-
contents: {
|
|
1334
|
-
type: "object",
|
|
1335
|
-
properties: {
|
|
1336
|
-
"f-tabs-in-card": {
|
|
1337
|
-
description: "The class of tabs which contains sub-grid.",
|
|
1338
|
-
type: "object",
|
|
1339
|
-
properties: {
|
|
1340
|
-
contents: {
|
|
1341
|
-
type: "object",
|
|
1342
|
-
properties: {
|
|
1343
|
-
"f-struct-data-grid-in-card": {
|
|
1344
|
-
description: "The class of sub-grid component",
|
|
1345
|
-
type: "object",
|
|
1346
|
-
properties: {
|
|
1347
|
-
contents: {
|
|
1348
|
-
type: "object",
|
|
1349
|
-
properties: {
|
|
1350
|
-
"f-grid-is-sub": {
|
|
1351
|
-
description: "The class of sub-grid",
|
|
1352
|
-
type: "object",
|
|
1353
|
-
properties: {
|
|
1354
|
-
rules: {
|
|
1355
|
-
type: "object",
|
|
1356
|
-
properties: {
|
|
1357
|
-
canAccept: {
|
|
1358
|
-
type: "boolean",
|
|
1359
|
-
const: !0
|
|
1360
|
-
},
|
|
1361
|
-
fixed: {
|
|
1362
|
-
type: "boolean",
|
|
1363
|
-
const: !0
|
|
1364
|
-
},
|
|
1365
|
-
hidePadding: {
|
|
1366
|
-
type: "boolean",
|
|
1367
|
-
const: !1
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
},
|
|
1375
|
-
rules: {
|
|
1376
|
-
type: "object",
|
|
1377
|
-
properties: {
|
|
1378
|
-
canAccept: {
|
|
1379
|
-
type: "boolean",
|
|
1380
|
-
const: !1
|
|
1381
|
-
},
|
|
1382
|
-
fixed: {
|
|
1383
|
-
type: "boolean",
|
|
1384
|
-
const: !1
|
|
1385
|
-
},
|
|
1386
|
-
hidePadding: {
|
|
1387
|
-
type: "boolean",
|
|
1388
|
-
const: !0
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
},
|
|
1396
|
-
rules: {
|
|
1397
|
-
type: "object",
|
|
1398
|
-
properties: {
|
|
1399
|
-
canAccept: {
|
|
1400
|
-
type: "boolean",
|
|
1401
|
-
const: !1
|
|
1402
|
-
},
|
|
1403
|
-
fixed: {
|
|
1404
|
-
type: "boolean",
|
|
1405
|
-
const: !0
|
|
1406
|
-
},
|
|
1407
|
-
hidePadding: {
|
|
1408
|
-
type: "boolean",
|
|
1409
|
-
const: !0
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
},
|
|
1417
|
-
rules: {
|
|
1418
|
-
type: "object",
|
|
1419
|
-
properties: {
|
|
1420
|
-
canAccept: {
|
|
1421
|
-
type: "boolean",
|
|
1422
|
-
const: !1
|
|
1423
|
-
},
|
|
1424
|
-
fixed: {
|
|
1425
|
-
type: "boolean",
|
|
1426
|
-
const: !0
|
|
1427
|
-
},
|
|
1428
|
-
hidePadding: {
|
|
1429
|
-
type: "boolean",
|
|
1430
|
-
const: !0
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
},
|
|
1436
|
-
"f-section-in-main": {
|
|
1437
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1438
|
-
type: "object",
|
|
1439
|
-
properties: {
|
|
1440
|
-
rules: {
|
|
1441
|
-
type: "object",
|
|
1442
|
-
properties: {
|
|
1443
|
-
canAccept: {
|
|
1444
|
-
type: "boolean",
|
|
1445
|
-
const: !0
|
|
1446
|
-
},
|
|
1447
|
-
fixed: {
|
|
1448
|
-
type: "boolean",
|
|
1449
|
-
const: !0
|
|
1450
|
-
},
|
|
1451
|
-
hidePadding: {
|
|
1452
|
-
type: "boolean",
|
|
1453
|
-
const: !1
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
},
|
|
1461
|
-
rules: {
|
|
1462
|
-
type: "object",
|
|
1463
|
-
properties: {
|
|
1464
|
-
canAccept: {
|
|
1465
|
-
type: "boolean",
|
|
1466
|
-
const: !1
|
|
1467
|
-
},
|
|
1468
|
-
fixed: {
|
|
1469
|
-
type: "boolean",
|
|
1470
|
-
const: !1
|
|
1471
|
-
},
|
|
1472
|
-
hidePadding: {
|
|
1473
|
-
type: "boolean",
|
|
1474
|
-
const: !0
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
rules: {
|
|
1483
|
-
type: "object",
|
|
1484
|
-
properties: {
|
|
1485
|
-
canAccept: {
|
|
1486
|
-
type: "boolean",
|
|
1487
|
-
const: !0
|
|
1488
|
-
},
|
|
1489
|
-
fixed: {
|
|
1490
|
-
type: "boolean",
|
|
1491
|
-
const: !0
|
|
1492
|
-
},
|
|
1493
|
-
hidePadding: {
|
|
1494
|
-
type: "object",
|
|
1495
|
-
const: {
|
|
1496
|
-
allOf: [
|
|
1497
|
-
{
|
|
1498
|
-
sibling: 0,
|
|
1499
|
-
parent: {
|
|
1500
|
-
"f-page-main": !0
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
]
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
"f-struct-data-grid": {
|
|
1511
|
-
description: "",
|
|
1512
|
-
type: "object",
|
|
1513
|
-
properties: {
|
|
1514
|
-
rules: {
|
|
1515
|
-
type: "object",
|
|
1516
|
-
properties: {
|
|
1517
|
-
canAccept: {
|
|
1518
|
-
type: "object",
|
|
1519
|
-
const: !0
|
|
1520
|
-
},
|
|
1521
|
-
fixed: {
|
|
1522
|
-
type: "boolean",
|
|
1523
|
-
const: !0
|
|
1524
|
-
},
|
|
1525
|
-
hidePadding: {
|
|
1526
|
-
type: "boolean",
|
|
1527
|
-
const: !0
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
},
|
|
1533
|
-
"f-page-main-content": {
|
|
1534
|
-
description: "",
|
|
1535
|
-
type: "object",
|
|
1536
|
-
properties: {
|
|
1537
|
-
contents: {
|
|
1538
|
-
type: "object",
|
|
1539
|
-
properties: {
|
|
1540
|
-
"f-page-content-nav": {
|
|
1541
|
-
description: "",
|
|
1542
|
-
type: "object",
|
|
1543
|
-
properties: {
|
|
1544
|
-
contents: {
|
|
1545
|
-
type: "object",
|
|
1546
|
-
properties: {
|
|
1547
|
-
"f-struct-data-grid-in-nav": {
|
|
1548
|
-
description: "",
|
|
1549
|
-
type: "object",
|
|
1550
|
-
properties: {
|
|
1551
|
-
contents: {
|
|
1552
|
-
type: "object",
|
|
1553
|
-
properties: {
|
|
1554
|
-
"f-page-content-nav-extend": {
|
|
1555
|
-
description: "",
|
|
1556
|
-
type: "object"
|
|
1557
|
-
},
|
|
1558
|
-
"f-section-in-nav": {
|
|
1559
|
-
description: "",
|
|
1560
|
-
type: "object",
|
|
1561
|
-
properties: {
|
|
1562
|
-
rules: {
|
|
1563
|
-
type: "object",
|
|
1564
|
-
properties: {
|
|
1565
|
-
canAccept: {
|
|
1566
|
-
type: "boolean",
|
|
1567
|
-
const: !1
|
|
1568
|
-
},
|
|
1569
|
-
fixed: {
|
|
1570
|
-
type: "boolean",
|
|
1571
|
-
const: !0
|
|
1572
|
-
},
|
|
1573
|
-
hidePadding: {
|
|
1574
|
-
type: "boolean",
|
|
1575
|
-
const: !1
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
},
|
|
1583
|
-
rules: {
|
|
1584
|
-
type: "object",
|
|
1585
|
-
properties: {
|
|
1586
|
-
canAccept: {
|
|
1587
|
-
type: "boolean",
|
|
1588
|
-
const: !0
|
|
1589
|
-
},
|
|
1590
|
-
fixed: {
|
|
1591
|
-
type: "boolean",
|
|
1592
|
-
const: !1
|
|
1593
|
-
},
|
|
1594
|
-
hidePadding: {
|
|
1595
|
-
type: "boolean",
|
|
1596
|
-
const: !0
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
},
|
|
1606
|
-
"f-page-content-main": {
|
|
1607
|
-
description: "",
|
|
1608
|
-
type: "object",
|
|
1609
|
-
properties: {}
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
},
|
|
1615
|
-
"f-page-content": {
|
|
1616
|
-
description: "",
|
|
1617
|
-
type: "object",
|
|
1618
|
-
properties: {
|
|
1619
|
-
contents: {
|
|
1620
|
-
type: "object",
|
|
1621
|
-
properties: {
|
|
1622
|
-
"f-page-content-nav": {
|
|
1623
|
-
description: "",
|
|
1624
|
-
type: "object",
|
|
1625
|
-
properties: {
|
|
1626
|
-
contents: {
|
|
1627
|
-
type: "object",
|
|
1628
|
-
properties: {
|
|
1629
|
-
"f-list-nav": {
|
|
1630
|
-
description: "",
|
|
1631
|
-
type: "object"
|
|
1632
|
-
},
|
|
1633
|
-
"f-list-nav-left": {
|
|
1634
|
-
description: "",
|
|
1635
|
-
type: "object"
|
|
1636
|
-
},
|
|
1637
|
-
"f-struct-data-grid-in-nav": {
|
|
1638
|
-
description: "",
|
|
1639
|
-
type: "object",
|
|
1640
|
-
properties: {
|
|
1641
|
-
contents: {
|
|
1642
|
-
type: "object",
|
|
1643
|
-
properties: {
|
|
1644
|
-
"f-section-form": {
|
|
1645
|
-
description: "",
|
|
1646
|
-
type: "object",
|
|
1647
|
-
properties: {
|
|
1648
|
-
rules: {
|
|
1649
|
-
type: "object",
|
|
1650
|
-
properties: {
|
|
1651
|
-
canAccept: {
|
|
1652
|
-
type: "boolean",
|
|
1653
|
-
const: !1
|
|
1654
|
-
},
|
|
1655
|
-
fixed: {
|
|
1656
|
-
type: "boolean",
|
|
1657
|
-
const: !0
|
|
1658
|
-
},
|
|
1659
|
-
hidePadding: {
|
|
1660
|
-
type: "boolean",
|
|
1661
|
-
const: !0
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
},
|
|
1667
|
-
"f-section-grid": {
|
|
1668
|
-
description: "",
|
|
1669
|
-
type: "object",
|
|
1670
|
-
properties: {
|
|
1671
|
-
rules: {
|
|
1672
|
-
type: "object",
|
|
1673
|
-
properties: {
|
|
1674
|
-
canAccept: {
|
|
1675
|
-
type: "boolean",
|
|
1676
|
-
const: !1
|
|
1677
|
-
},
|
|
1678
|
-
fixed: {
|
|
1679
|
-
type: "boolean",
|
|
1680
|
-
const: !0
|
|
1681
|
-
},
|
|
1682
|
-
hidePadding: {
|
|
1683
|
-
type: "boolean",
|
|
1684
|
-
const: !0
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
},
|
|
1692
|
-
rules: {
|
|
1693
|
-
type: "object",
|
|
1694
|
-
properties: {
|
|
1695
|
-
canAccept: {
|
|
1696
|
-
type: "boolean",
|
|
1697
|
-
const: !1
|
|
1698
|
-
},
|
|
1699
|
-
fixed: {
|
|
1700
|
-
type: "boolean",
|
|
1701
|
-
const: !0
|
|
1702
|
-
},
|
|
1703
|
-
hidePadding: {
|
|
1704
|
-
type: "boolean",
|
|
1705
|
-
const: !0
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
},
|
|
1714
|
-
rules: {
|
|
1715
|
-
type: "object",
|
|
1716
|
-
properties: {
|
|
1717
|
-
canAccept: {
|
|
1718
|
-
type: "boolean",
|
|
1719
|
-
const: !1
|
|
1720
|
-
},
|
|
1721
|
-
fixed: {
|
|
1722
|
-
type: "boolean",
|
|
1723
|
-
const: !0
|
|
1724
|
-
},
|
|
1725
|
-
hidePadding: {
|
|
1726
|
-
type: "boolean",
|
|
1727
|
-
const: !0
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
},
|
|
1732
|
-
"f-page-content-main": {
|
|
1733
|
-
description: "",
|
|
1734
|
-
type: "object",
|
|
1735
|
-
properties: {
|
|
1736
|
-
rules: {
|
|
1737
|
-
type: "object",
|
|
1738
|
-
properties: {
|
|
1739
|
-
canAccept: {
|
|
1740
|
-
type: "boolean",
|
|
1741
|
-
const: !1
|
|
1742
|
-
},
|
|
1743
|
-
fixed: {
|
|
1744
|
-
type: "boolean",
|
|
1745
|
-
const: !1
|
|
1746
|
-
},
|
|
1747
|
-
hidePadding: {
|
|
1748
|
-
type: "boolean",
|
|
1749
|
-
const: !0
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
},
|
|
1757
|
-
rules: {
|
|
1758
|
-
type: "object",
|
|
1759
|
-
properties: {
|
|
1760
|
-
canAccept: {
|
|
1761
|
-
type: "boolean",
|
|
1762
|
-
const: !1
|
|
1763
|
-
},
|
|
1764
|
-
fixed: {
|
|
1765
|
-
type: "boolean",
|
|
1766
|
-
const: !0
|
|
1767
|
-
},
|
|
1768
|
-
hidePadding: {
|
|
1769
|
-
type: "boolean",
|
|
1770
|
-
const: !0
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
},
|
|
1778
|
-
rules: {
|
|
1779
|
-
type: "object",
|
|
1780
|
-
properties: {
|
|
1781
|
-
canAccept: {
|
|
1782
|
-
type: "object",
|
|
1783
|
-
const: {
|
|
1784
|
-
anyOf: [
|
|
1785
|
-
{
|
|
1786
|
-
children: 0
|
|
1787
|
-
},
|
|
1788
|
-
{
|
|
1789
|
-
children: {
|
|
1790
|
-
length: {
|
|
1791
|
-
not: 1
|
|
1792
|
-
},
|
|
1793
|
-
"f-struct-like-card": !0
|
|
1794
|
-
}
|
|
1795
|
-
},
|
|
1796
|
-
{
|
|
1797
|
-
children: {
|
|
1798
|
-
"scroll-spy": !1,
|
|
1799
|
-
"f-page-content": !1,
|
|
1800
|
-
"f-struct-like-card": !1
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
]
|
|
1804
|
-
}
|
|
1805
|
-
},
|
|
1806
|
-
fixed: {
|
|
1807
|
-
type: "boolean",
|
|
1808
|
-
const: !0
|
|
1809
|
-
},
|
|
1810
|
-
hidePadding: {
|
|
1811
|
-
type: "boolean",
|
|
1812
|
-
const: !0
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
},
|
|
1818
|
-
"f-page-footer": {
|
|
1819
|
-
description: "The class of page footer designed by farris.",
|
|
1820
|
-
type: "string"
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
},
|
|
1824
|
-
rules: {
|
|
1825
|
-
type: "object",
|
|
1826
|
-
properties: {
|
|
1827
|
-
canAccept: {
|
|
1828
|
-
type: "boolean",
|
|
1829
|
-
const: !1
|
|
1830
|
-
},
|
|
1831
|
-
fixed: {
|
|
1832
|
-
type: "boolean",
|
|
1833
|
-
const: !0
|
|
1834
|
-
},
|
|
1835
|
-
hidePadding: {
|
|
1836
|
-
type: "boolean",
|
|
1837
|
-
const: !0
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
},
|
|
1843
|
-
"f-page-is-managelist": {
|
|
1844
|
-
description: "The root class of mangement list page.",
|
|
1845
|
-
type: "string"
|
|
1846
|
-
},
|
|
1847
|
-
"f-page-card": {
|
|
1848
|
-
description: "",
|
|
1849
|
-
type: "object"
|
|
1850
|
-
},
|
|
1851
|
-
"f-page-is-mainsubcard": {
|
|
1852
|
-
description: "",
|
|
1853
|
-
type: "object"
|
|
1854
|
-
}
|
|
1855
|
-
}, jt = {
|
|
1856
|
-
$schema: yt,
|
|
1857
|
-
$id: vt,
|
|
1858
|
-
title: Ct,
|
|
1859
|
-
description: wt,
|
|
1860
|
-
type: xt,
|
|
1861
|
-
properties: Tt
|
|
1862
|
-
}, K = /* @__PURE__ */ new Map();
|
|
1863
|
-
function Pe() {
|
|
1864
|
-
function s(a, y, v, T) {
|
|
1865
|
-
var O;
|
|
1866
|
-
if (typeof v == "number")
|
|
1867
|
-
return ((O = T[a]) == null ? void 0 : O.length) === v;
|
|
1868
|
-
if (typeof v == "object") {
|
|
1869
|
-
const E = Object.keys(v)[0], k = v[E];
|
|
1870
|
-
if (E === "not")
|
|
1871
|
-
return Number(T[a].length) !== Number(k);
|
|
1872
|
-
if (E === "moreThan")
|
|
1873
|
-
return Number(T[a].length) >= Number(k);
|
|
1874
|
-
if (E === "lessThan")
|
|
1875
|
-
return Number(T[a].length) <= Number(k);
|
|
1876
|
-
}
|
|
1877
|
-
return !1;
|
|
1878
|
-
}
|
|
1879
|
-
function e(a, y, v, T) {
|
|
1880
|
-
return typeof v == "boolean" ? T.childrenClassList.includes(y) === !!v : !1;
|
|
1881
|
-
}
|
|
1882
|
-
function o(a, y, v, T) {
|
|
1883
|
-
return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
|
|
1884
|
-
}
|
|
1885
|
-
function c(a, y, v, T) {
|
|
1886
|
-
return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
|
|
1887
|
-
}
|
|
1888
|
-
const d = /* @__PURE__ */ new Map([
|
|
1889
|
-
["length", s],
|
|
1890
|
-
["hasChildren", e],
|
|
1891
|
-
["hasSibling", c],
|
|
1892
|
-
["hasParent", o]
|
|
1893
|
-
]);
|
|
1894
|
-
function b(a, y) {
|
|
1895
|
-
const v = a;
|
|
1896
|
-
return typeof y == "number" ? [{ target: v, operator: "length", param: null, value: Number(y) }] : typeof y == "object" ? Object.keys(y).map((T) => {
|
|
1897
|
-
if (T === "length")
|
|
1898
|
-
return { target: v, operator: "length", param: null, value: y[T] };
|
|
1899
|
-
const O = T, E = y[T];
|
|
1900
|
-
return { target: v, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param: O, value: E };
|
|
1901
|
-
}) : [];
|
|
1902
|
-
}
|
|
1903
|
-
function m(a, y) {
|
|
1904
|
-
if (d.has(a.operator)) {
|
|
1905
|
-
const v = d.get(a.operator);
|
|
1906
|
-
return v && v(a.target, a.param, a.value, y) || !1;
|
|
1907
|
-
}
|
|
1908
|
-
return !1;
|
|
1909
|
-
}
|
|
1910
|
-
function D(a, y) {
|
|
1911
|
-
return Object.keys(a).reduce((E, k) => {
|
|
1912
|
-
const N = b(k, a[k]);
|
|
1913
|
-
return E.push(...N), E;
|
|
1914
|
-
}, []).reduce((E, k) => E && m(k, y), !0);
|
|
1915
|
-
}
|
|
1916
|
-
function P(a, y) {
|
|
1917
|
-
const v = Object.keys(a), T = v.includes("allOf"), O = v.includes("anyOf"), E = T || O, j = (E ? a[E ? T ? "allOf" : "anyOf" : "allOf"] : [a]).map((I) => D(I, y));
|
|
1918
|
-
return T ? !j.includes(!1) : j.includes(!0);
|
|
1919
|
-
}
|
|
1920
|
-
function g(a, y) {
|
|
1921
|
-
const v = a.const;
|
|
1922
|
-
return v ? typeof v == "boolean" ? v : typeof v == "object" ? P(v, y) : !1 : !1;
|
|
1923
|
-
}
|
|
1924
|
-
function C(a) {
|
|
1925
|
-
return (y) => {
|
|
1926
|
-
const v = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1927
|
-
return a && a.properties && Object.keys(a.properties).reduce((T, O) => {
|
|
1928
|
-
const E = a.properties[O];
|
|
1929
|
-
return T[O] = g(E, y), T;
|
|
1930
|
-
}, v), v;
|
|
1931
|
-
};
|
|
1932
|
-
}
|
|
1933
|
-
function p(a, y, v) {
|
|
1934
|
-
if (y.type === "object" && y.properties) {
|
|
1935
|
-
const { rules: T, contents: O } = y.properties;
|
|
1936
|
-
v.set(a, C(T)), O && Object.keys(O.properties).forEach(
|
|
1937
|
-
(E) => p(E, O.properties[E], v)
|
|
1938
|
-
);
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
function i() {
|
|
1942
|
-
const { properties: a } = jt;
|
|
1943
|
-
Object.keys(a).forEach((y) => {
|
|
1944
|
-
p(y, a[y], K);
|
|
1945
|
-
});
|
|
1946
|
-
}
|
|
1947
|
-
function f(a, y) {
|
|
1948
|
-
const v = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1949
|
-
return K.has(a) ? K.get(a)(y) : v;
|
|
1950
|
-
}
|
|
1951
|
-
return i(), { getRuleValue: f };
|
|
1952
|
-
}
|
|
1953
|
-
class ae {
|
|
1954
|
-
constructor(e, o) {
|
|
1955
|
-
B(this, "componentId");
|
|
1956
|
-
B(this, "viewModelId");
|
|
1957
|
-
B(this, "eventsEditorUtils");
|
|
1958
|
-
B(this, "formSchemaUtils");
|
|
1959
|
-
B(this, "formMetadataConverter");
|
|
1960
|
-
B(this, "designViewModelUtils");
|
|
1961
|
-
B(this, "designViewModelField");
|
|
1962
|
-
B(this, "controlCreatorUtils");
|
|
1963
|
-
B(this, "designerHostService");
|
|
1964
|
-
B(this, "schemaService", null);
|
|
1965
|
-
B(this, "metadataService", null);
|
|
1966
|
-
B(this, "propertyConfig", {
|
|
1160
|
+
class se {
|
|
1161
|
+
constructor(e, n) {
|
|
1162
|
+
D(this, "componentId");
|
|
1163
|
+
D(this, "viewModelId");
|
|
1164
|
+
D(this, "eventsEditorUtils");
|
|
1165
|
+
D(this, "formSchemaUtils");
|
|
1166
|
+
D(this, "formMetadataConverter");
|
|
1167
|
+
D(this, "designViewModelUtils");
|
|
1168
|
+
D(this, "designViewModelField");
|
|
1169
|
+
D(this, "controlCreatorUtils");
|
|
1170
|
+
D(this, "designerHostService");
|
|
1171
|
+
D(this, "schemaService", null);
|
|
1172
|
+
D(this, "metadataService", null);
|
|
1173
|
+
D(this, "propertyConfig", {
|
|
1967
1174
|
type: "object",
|
|
1968
1175
|
categories: {}
|
|
1969
1176
|
});
|
|
1970
|
-
var
|
|
1971
|
-
this.componentId = e, this.designerHostService =
|
|
1177
|
+
var i;
|
|
1178
|
+
this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1972
1179
|
}
|
|
1973
1180
|
getTableInfo() {
|
|
1974
1181
|
var e;
|
|
1975
1182
|
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1976
1183
|
}
|
|
1977
1184
|
setDesignViewModelField(e) {
|
|
1978
|
-
|
|
1979
|
-
|
|
1185
|
+
var i;
|
|
1186
|
+
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1187
|
+
if (n) {
|
|
1980
1188
|
if (!this.designViewModelField) {
|
|
1981
|
-
const
|
|
1982
|
-
this.designViewModelField =
|
|
1189
|
+
const d = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1190
|
+
this.designViewModelField = d.fields.find((m) => m.id === n);
|
|
1983
1191
|
}
|
|
1984
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
1192
|
+
e.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
1985
1193
|
}
|
|
1986
1194
|
}
|
|
1987
|
-
changeFieldEditorType(e,
|
|
1195
|
+
changeFieldEditorType(e, n) {
|
|
1988
1196
|
}
|
|
1989
1197
|
getBasicPropConfig(e) {
|
|
1990
1198
|
return {
|
|
@@ -2005,7 +1213,7 @@ class ae {
|
|
|
2005
1213
|
type: "combo-list",
|
|
2006
1214
|
textField: "name",
|
|
2007
1215
|
valueField: "value",
|
|
2008
|
-
data: [{ value: e.type, name:
|
|
1216
|
+
data: [{ value: e.type, name: te[e.type].name }]
|
|
2009
1217
|
}
|
|
2010
1218
|
}
|
|
2011
1219
|
}
|
|
@@ -2037,20 +1245,34 @@ class ae {
|
|
|
2037
1245
|
* @param componentInstance
|
|
2038
1246
|
* @returns
|
|
2039
1247
|
*/
|
|
2040
|
-
updateElementByParentContainer(e,
|
|
2041
|
-
const
|
|
2042
|
-
if (!
|
|
1248
|
+
updateElementByParentContainer(e, n) {
|
|
1249
|
+
const i = n && n.parent && n.parent.schema;
|
|
1250
|
+
if (!i)
|
|
2043
1251
|
return;
|
|
2044
|
-
const d =
|
|
2045
|
-
|
|
1252
|
+
const d = i.contents.findIndex((p) => p.id === e), m = pe(i.contents[d]);
|
|
1253
|
+
i.contents.splice(d, 1), i.contents.splice(d, 0, m);
|
|
2046
1254
|
}
|
|
2047
1255
|
}
|
|
2048
|
-
class
|
|
2049
|
-
constructor(e,
|
|
2050
|
-
super(e,
|
|
1256
|
+
class dt extends se {
|
|
1257
|
+
constructor(e, n) {
|
|
1258
|
+
super(e, n);
|
|
2051
1259
|
}
|
|
2052
1260
|
getPropertyConfig(e) {
|
|
2053
|
-
return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
|
|
1261
|
+
return this.getBasicPropConfig(e), this.getAppearancePropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
|
|
1262
|
+
}
|
|
1263
|
+
getAppearancePropConfig(e) {
|
|
1264
|
+
this.propertyConfig.categories.appearance = {
|
|
1265
|
+
title: "样式",
|
|
1266
|
+
description: "Appearance",
|
|
1267
|
+
properties: {
|
|
1268
|
+
class: {
|
|
1269
|
+
title: "class样式",
|
|
1270
|
+
type: "string",
|
|
1271
|
+
description: "组件的CSS样式",
|
|
1272
|
+
$converter: "/converter/appearance.converter"
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
};
|
|
2054
1276
|
}
|
|
2055
1277
|
getBasicPropConfig(e) {
|
|
2056
1278
|
this.propertyConfig.categories.basic = {
|
|
@@ -2071,7 +1293,7 @@ class Pt extends ae {
|
|
|
2071
1293
|
type: "combo-list",
|
|
2072
1294
|
textField: "value",
|
|
2073
1295
|
valueField: "key",
|
|
2074
|
-
data: [{ key: "response-toolbar", value:
|
|
1296
|
+
data: [{ key: "response-toolbar", value: te["response-toolbar"].name }]
|
|
2075
1297
|
}
|
|
2076
1298
|
}
|
|
2077
1299
|
}
|
|
@@ -2102,7 +1324,7 @@ class Pt extends ae {
|
|
|
2102
1324
|
]
|
|
2103
1325
|
}
|
|
2104
1326
|
},
|
|
2105
|
-
|
|
1327
|
+
items: {
|
|
2106
1328
|
title: "按钮",
|
|
2107
1329
|
description: "The items of Response Toolbar.",
|
|
2108
1330
|
type: "array",
|
|
@@ -2114,85 +1336,40 @@ class Pt extends ae {
|
|
|
2114
1336
|
};
|
|
2115
1337
|
}
|
|
2116
1338
|
}
|
|
2117
|
-
function
|
|
2118
|
-
const
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? j.sourceType === "control" && j.controlCategory === "input" || j.sourceType === "move" && j.controlType === "form-group" : !0;
|
|
2122
|
-
}
|
|
2123
|
-
function p(j) {
|
|
2124
|
-
return !bt().basalDragulaRuleForContainer(j) || !D || !C(j), !1;
|
|
2125
|
-
}
|
|
2126
|
-
function i() {
|
|
2127
|
-
b.value = !1, m.value = !1;
|
|
2128
|
-
const j = s, h = j.appearance && j.appearance.class || "", I = h.split(" "), A = j.buttons || [], l = A.length ? A[0] : null, n = l && l.appearance ? l.appearance.class : "", t = n ? n.split(" ") : [], r = A.length ? A.reduce(($, V) => {
|
|
2129
|
-
const U = V && V.appearance ? V.appearance.class : "", Y = U ? U.split(" ") : [];
|
|
2130
|
-
return $.push(...Y), $;
|
|
2131
|
-
}, []) : [], u = o == null ? void 0 : o.schema, R = u && u.appearance && u.appearance.class || "", x = R ? R.split(" ") : [];
|
|
2132
|
-
g = {
|
|
2133
|
-
componentClass: h,
|
|
2134
|
-
componentClassList: I,
|
|
2135
|
-
childContents: A,
|
|
2136
|
-
firstChildContent: l,
|
|
2137
|
-
firstChildClass: n,
|
|
2138
|
-
firstChildClassList: t,
|
|
2139
|
-
parent: u,
|
|
2140
|
-
parentClass: R,
|
|
2141
|
-
parentClassList: x,
|
|
2142
|
-
children: A,
|
|
2143
|
-
childrenClassList: r
|
|
2144
|
-
};
|
|
2145
|
-
const { canAccept: M, fixed: F, hidePadding: _ } = d.getRuleValue(I[0], g);
|
|
2146
|
-
return D = M, P = _, !0;
|
|
2147
|
-
}
|
|
2148
|
-
function f(j) {
|
|
2149
|
-
}
|
|
2150
|
-
function a() {
|
|
2151
|
-
return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2152
|
-
}
|
|
2153
|
-
function y(j, h) {
|
|
2154
|
-
return h.text = j.label, h;
|
|
1339
|
+
function ut(s, e) {
|
|
1340
|
+
const n = s.schema;
|
|
1341
|
+
function i(g) {
|
|
1342
|
+
return !1;
|
|
2155
1343
|
}
|
|
2156
|
-
function
|
|
2157
|
-
|
|
2158
|
-
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2159
|
-
const t = String(j.innerText), r = q("form-group");
|
|
2160
|
-
return r.editor = I, r.label = t, r;
|
|
2161
|
-
}
|
|
2162
|
-
return I;
|
|
1344
|
+
function d(g, l) {
|
|
1345
|
+
return l.text = g.label, l;
|
|
2163
1346
|
}
|
|
2164
|
-
function
|
|
1347
|
+
function m() {
|
|
2165
1348
|
return !1;
|
|
2166
1349
|
}
|
|
2167
|
-
function
|
|
1350
|
+
function p() {
|
|
2168
1351
|
return !1;
|
|
2169
1352
|
}
|
|
2170
|
-
function
|
|
1353
|
+
function T() {
|
|
2171
1354
|
return !0;
|
|
2172
1355
|
}
|
|
2173
|
-
function
|
|
2174
|
-
return
|
|
1356
|
+
function x() {
|
|
1357
|
+
return !0;
|
|
2175
1358
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return new
|
|
1359
|
+
function f(g) {
|
|
1360
|
+
return new dt(g, e).getPropertyConfig(n);
|
|
2178
1361
|
}
|
|
2179
1362
|
return {
|
|
2180
|
-
canAccepts:
|
|
2181
|
-
checkCanAddComponent:
|
|
2182
|
-
checkCanDeleteComponent:
|
|
2183
|
-
checkCanMoveComponent:
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
onAcceptMovedChildElement: f,
|
|
2188
|
-
onResolveNewComponentSchema: y,
|
|
2189
|
-
resolveComponentContext: i,
|
|
2190
|
-
getPropsConfig: N,
|
|
2191
|
-
triggerBelongedComponentToMoveWhenMoved: b,
|
|
2192
|
-
triggerBelongedComponentToDeleteWhenDeleted: m
|
|
1363
|
+
canAccepts: i,
|
|
1364
|
+
checkCanAddComponent: T,
|
|
1365
|
+
checkCanDeleteComponent: p,
|
|
1366
|
+
checkCanMoveComponent: m,
|
|
1367
|
+
hideNestedPaddingInDesginerView: x,
|
|
1368
|
+
onResolveNewComponentSchema: d,
|
|
1369
|
+
getPropsConfig: f
|
|
2193
1370
|
};
|
|
2194
1371
|
}
|
|
2195
|
-
const
|
|
1372
|
+
const pt = {
|
|
2196
1373
|
id: { type: String, default: "" },
|
|
2197
1374
|
componentId: { type: String, default: "" },
|
|
2198
1375
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2205,256 +1382,247 @@ const It = {
|
|
|
2205
1382
|
* 组件值
|
|
2206
1383
|
*/
|
|
2207
1384
|
modelValue: { type: Object }
|
|
2208
|
-
},
|
|
2209
|
-
function
|
|
2210
|
-
const
|
|
2211
|
-
return d &&
|
|
1385
|
+
}, le = M(0);
|
|
1386
|
+
function ft(s, e) {
|
|
1387
|
+
const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top, m = i.top <= n.bottom;
|
|
1388
|
+
return d && m;
|
|
2212
1389
|
}
|
|
2213
|
-
function
|
|
1390
|
+
function gt(s) {
|
|
2214
1391
|
if (!s)
|
|
2215
1392
|
return;
|
|
2216
1393
|
let e;
|
|
2217
1394
|
if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
|
|
2218
1395
|
return;
|
|
2219
|
-
const
|
|
2220
|
-
if (
|
|
1396
|
+
const n = e.getBoundingClientRect();
|
|
1397
|
+
if (n.width === 0 && n.height === 0)
|
|
2221
1398
|
return;
|
|
2222
|
-
const
|
|
2223
|
-
if (
|
|
2224
|
-
if (!
|
|
2225
|
-
|
|
1399
|
+
const i = e.querySelector(".component-btn-group");
|
|
1400
|
+
if (i) {
|
|
1401
|
+
if (!ft(e, s)) {
|
|
1402
|
+
i.style.display = "none";
|
|
2226
1403
|
return;
|
|
2227
1404
|
}
|
|
2228
|
-
|
|
2229
|
-
const
|
|
2230
|
-
if (
|
|
2231
|
-
const
|
|
2232
|
-
|
|
1405
|
+
i.style.display = "";
|
|
1406
|
+
const m = i.getBoundingClientRect(), p = i.querySelector("div");
|
|
1407
|
+
if (p) {
|
|
1408
|
+
const T = p.getBoundingClientRect();
|
|
1409
|
+
p.style.top = m.top + "px", p.style.left = m.left - T.width + "px";
|
|
2233
1410
|
}
|
|
2234
1411
|
}
|
|
2235
1412
|
}
|
|
2236
|
-
function
|
|
2237
|
-
var
|
|
2238
|
-
|
|
2239
|
-
}
|
|
2240
|
-
const d = "", b = S();
|
|
1413
|
+
function mt(s, e, n) {
|
|
1414
|
+
var A;
|
|
1415
|
+
const i = "", d = M();
|
|
2241
1416
|
function m() {
|
|
2242
1417
|
return !0;
|
|
2243
1418
|
}
|
|
2244
|
-
function
|
|
1419
|
+
function p() {
|
|
2245
1420
|
return !1;
|
|
2246
1421
|
}
|
|
2247
|
-
function
|
|
1422
|
+
function T() {
|
|
2248
1423
|
return !0;
|
|
2249
1424
|
}
|
|
2250
|
-
function
|
|
1425
|
+
function x() {
|
|
2251
1426
|
return !0;
|
|
2252
1427
|
}
|
|
2253
|
-
function
|
|
1428
|
+
function f() {
|
|
2254
1429
|
return !0;
|
|
2255
1430
|
}
|
|
2256
|
-
function
|
|
2257
|
-
if (!
|
|
1431
|
+
function g(k) {
|
|
1432
|
+
if (!k || !k.value)
|
|
2258
1433
|
return null;
|
|
2259
|
-
const
|
|
2260
|
-
return
|
|
1434
|
+
const R = M(k == null ? void 0 : k.value.parent), v = g(R);
|
|
1435
|
+
return v || null;
|
|
2261
1436
|
}
|
|
2262
|
-
function
|
|
2263
|
-
const { componentInstance:
|
|
2264
|
-
return !
|
|
1437
|
+
function l(k = e) {
|
|
1438
|
+
const { componentInstance: R, designerItemElementRef: v } = k;
|
|
1439
|
+
return !R || !R.value ? null : R.value.canMove || R.value.canAdd || R.value.canDelete ? v : l(k.parent);
|
|
2265
1440
|
}
|
|
2266
|
-
function
|
|
2267
|
-
return !!
|
|
1441
|
+
function c(k) {
|
|
1442
|
+
return !!n;
|
|
2268
1443
|
}
|
|
2269
|
-
function
|
|
1444
|
+
function u() {
|
|
2270
1445
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2271
1446
|
}
|
|
2272
|
-
function
|
|
2273
|
-
}
|
|
2274
|
-
function v(j, h) {
|
|
1447
|
+
function b() {
|
|
2275
1448
|
}
|
|
2276
|
-
function
|
|
2277
|
-
const { componentType: h } = j;
|
|
2278
|
-
let I = q(h, j);
|
|
2279
|
-
const A = h.toLowerCase().replace("-", "_");
|
|
2280
|
-
return I && !I.id && I.type === h && (I.id = `${A}_${Math.random().toString().slice(2, 6)}`), I;
|
|
1449
|
+
function I(k, R) {
|
|
2281
1450
|
}
|
|
2282
|
-
function
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
return n && !n.id && n.type === I && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
|
|
1451
|
+
function B(k) {
|
|
1452
|
+
const { componentType: R } = k, v = L("designer-host-service");
|
|
1453
|
+
let E = Z(R, k, v);
|
|
1454
|
+
const P = R.toLowerCase().replace(/-/g, "_");
|
|
1455
|
+
return E && !E.id && E.type === R && (E.id = `${P}_${Math.random().toString().slice(2, 6)}`), E;
|
|
2288
1456
|
}
|
|
2289
|
-
function
|
|
1457
|
+
function O(k) {
|
|
2290
1458
|
}
|
|
2291
|
-
function
|
|
1459
|
+
function F(...k) {
|
|
2292
1460
|
return [];
|
|
2293
1461
|
}
|
|
2294
|
-
|
|
1462
|
+
function j() {
|
|
1463
|
+
}
|
|
1464
|
+
return d.value = {
|
|
2295
1465
|
canMove: m(),
|
|
2296
|
-
canSelectParent:
|
|
2297
|
-
canAdd:
|
|
2298
|
-
canDelete:
|
|
2299
|
-
canNested: !
|
|
1466
|
+
canSelectParent: p(),
|
|
1467
|
+
canAdd: x(),
|
|
1468
|
+
canDelete: T(),
|
|
1469
|
+
canNested: !f(),
|
|
2300
1470
|
contents: [],
|
|
2301
1471
|
elementRef: s,
|
|
2302
|
-
parent: (
|
|
1472
|
+
parent: (A = e.parent) == null ? void 0 : A.componentInstance,
|
|
2303
1473
|
schema: e.schema,
|
|
2304
|
-
styles:
|
|
2305
|
-
canAccepts:
|
|
2306
|
-
getBelongedComponentInstance:
|
|
2307
|
-
getDraggableDesignItemElement:
|
|
2308
|
-
getDraggingDisplayText:
|
|
2309
|
-
getPropConfig:
|
|
2310
|
-
getDragScopeElement:
|
|
2311
|
-
onAcceptMovedChildElement:
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
}, b;
|
|
1474
|
+
styles: i,
|
|
1475
|
+
canAccepts: c,
|
|
1476
|
+
getBelongedComponentInstance: g,
|
|
1477
|
+
getDraggableDesignItemElement: l,
|
|
1478
|
+
getDraggingDisplayText: u,
|
|
1479
|
+
getPropConfig: F,
|
|
1480
|
+
getDragScopeElement: b,
|
|
1481
|
+
onAcceptMovedChildElement: I,
|
|
1482
|
+
onChildElementMovedOut: O,
|
|
1483
|
+
addNewChildComponentSchema: B,
|
|
1484
|
+
onRemoveComponent: j,
|
|
1485
|
+
triggerBelongedComponentToMoveWhenMoved: M(!1),
|
|
1486
|
+
triggerBelongedComponentToDeleteWhenDeleted: M(!1)
|
|
1487
|
+
}, d;
|
|
2319
1488
|
}
|
|
2320
|
-
const
|
|
1489
|
+
const ht = /* @__PURE__ */ Y({
|
|
2321
1490
|
name: "FDesignerInnerItem",
|
|
2322
|
-
props:
|
|
1491
|
+
props: pt,
|
|
2323
1492
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2324
1493
|
setup(s, e) {
|
|
2325
|
-
const
|
|
2326
|
-
designerItemElementRef:
|
|
2327
|
-
componentInstance:
|
|
2328
|
-
schema:
|
|
2329
|
-
parent:
|
|
1494
|
+
const n = M(s.canMove), i = M(s.canAdd), d = M(s.canDelete), m = M(!1), p = M(s.contentKey), T = M(s.childType), x = M(s.childLabel), f = M(s.modelValue), g = M(""), l = M(), c = L("canvas-dragula"), u = M(), b = L("design-item-context"), I = {
|
|
1495
|
+
designerItemElementRef: l,
|
|
1496
|
+
componentInstance: u,
|
|
1497
|
+
schema: f.value,
|
|
1498
|
+
parent: b,
|
|
2330
1499
|
setupContext: e
|
|
2331
1500
|
};
|
|
2332
|
-
|
|
2333
|
-
const
|
|
1501
|
+
De("design-item-context", I);
|
|
1502
|
+
const B = V(() => ({
|
|
2334
1503
|
"farris-component": !0,
|
|
2335
1504
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2336
|
-
"flex-fill": s.id
|
|
2337
|
-
"position-relative":
|
|
2338
|
-
"farris-nested":
|
|
2339
|
-
"can-move":
|
|
2340
|
-
"d-none":
|
|
2341
|
-
})),
|
|
1505
|
+
"flex-fill": s.id === "root-component",
|
|
1506
|
+
"position-relative": n.value || d.value,
|
|
1507
|
+
"farris-nested": m.value,
|
|
1508
|
+
"can-move": n.value,
|
|
1509
|
+
"d-none": l.value && l.value.classList.contains("d-none")
|
|
1510
|
+
})), O = V(() => {
|
|
2342
1511
|
const t = {};
|
|
2343
|
-
return
|
|
2344
|
-
const [
|
|
2345
|
-
return
|
|
1512
|
+
return g.value && g.value.split(";").reduce((r, a) => {
|
|
1513
|
+
const [w, C] = a.split(":");
|
|
1514
|
+
return w && (r[w] = C), r;
|
|
2346
1515
|
}, t), t;
|
|
2347
1516
|
});
|
|
2348
|
-
function
|
|
2349
|
-
if (
|
|
2350
|
-
const
|
|
2351
|
-
if (
|
|
2352
|
-
const
|
|
2353
|
-
|
|
1517
|
+
function F(t, r) {
|
|
1518
|
+
if (b && b.schema[p.value]) {
|
|
1519
|
+
const a = b.schema[p.value].findIndex((w) => w.id === r.id);
|
|
1520
|
+
if (a > -1) {
|
|
1521
|
+
const w = b.schema[p.value].length, C = b.schema[p.value][a % w];
|
|
1522
|
+
b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[p.value].splice(a, 1), le.value++, e.emit("removeComponent");
|
|
2354
1523
|
}
|
|
2355
1524
|
}
|
|
2356
1525
|
}
|
|
2357
|
-
function
|
|
2358
|
-
if (
|
|
1526
|
+
function j(t) {
|
|
1527
|
+
if (u.value.addNewChildComponentSchema) {
|
|
2359
1528
|
const r = {
|
|
2360
|
-
componentType:
|
|
2361
|
-
label:
|
|
2362
|
-
parentComponentInstance:
|
|
1529
|
+
componentType: T.value,
|
|
1530
|
+
label: x.value,
|
|
1531
|
+
parentComponentInstance: u.value,
|
|
2363
1532
|
targetPosition: -1
|
|
2364
|
-
},
|
|
2365
|
-
|
|
1533
|
+
}, a = u.value.addNewChildComponentSchema(r);
|
|
1534
|
+
f.value[p.value].push(a), e.emit("addComponent");
|
|
2366
1535
|
}
|
|
2367
1536
|
}
|
|
2368
|
-
function
|
|
2369
|
-
return
|
|
1537
|
+
function A() {
|
|
1538
|
+
return i.value && y("div", {
|
|
2370
1539
|
role: "button",
|
|
2371
1540
|
class: "btn component-settings-button",
|
|
2372
1541
|
title: "新增",
|
|
2373
1542
|
ref: "removeComponent",
|
|
2374
1543
|
onClick: (t) => {
|
|
2375
|
-
|
|
1544
|
+
j();
|
|
2376
1545
|
}
|
|
2377
|
-
}, [
|
|
1546
|
+
}, [y("i", {
|
|
2378
1547
|
class: "f-icon f-icon-plus-circle"
|
|
2379
1548
|
}, null)]);
|
|
2380
1549
|
}
|
|
2381
|
-
function
|
|
2382
|
-
return d.value &&
|
|
1550
|
+
function k(t) {
|
|
1551
|
+
return d.value && y("div", {
|
|
2383
1552
|
role: "button",
|
|
2384
1553
|
class: "btn component-settings-button",
|
|
2385
1554
|
title: "删除",
|
|
2386
1555
|
ref: "removeComponent",
|
|
2387
|
-
onClick:
|
|
2388
|
-
}, [
|
|
1556
|
+
onClick: Ee((r) => F(r, t), ["stop"])
|
|
1557
|
+
}, [y("i", {
|
|
2389
1558
|
class: "f-icon f-icon-yxs_delete"
|
|
2390
1559
|
}, null)]);
|
|
2391
1560
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return
|
|
1561
|
+
function R() {
|
|
1562
|
+
return n.value && y("div", {
|
|
2394
1563
|
role: "button",
|
|
2395
1564
|
class: "btn component-settings-button",
|
|
2396
1565
|
title: "移动",
|
|
2397
1566
|
ref: "moveComponent"
|
|
2398
|
-
}, [
|
|
1567
|
+
}, [y("i", {
|
|
2399
1568
|
"data-dragging-icon": "true",
|
|
2400
1569
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2401
1570
|
}, null)]);
|
|
2402
1571
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return
|
|
1572
|
+
function v(t) {
|
|
1573
|
+
return y("div", {
|
|
2405
1574
|
class: "component-btn-group",
|
|
2406
1575
|
"data-noattach": "true"
|
|
2407
|
-
}, [
|
|
1576
|
+
}, [y("div", null, [A(), R(), k(t)])]);
|
|
2408
1577
|
}
|
|
2409
|
-
|
|
2410
|
-
|
|
1578
|
+
Q(() => s.modelValue, (t) => {
|
|
1579
|
+
f.value = t, I.schema = t;
|
|
2411
1580
|
});
|
|
2412
|
-
function
|
|
1581
|
+
function E(t) {
|
|
2413
1582
|
const r = t.target;
|
|
2414
|
-
|
|
1583
|
+
gt(r);
|
|
2415
1584
|
}
|
|
2416
|
-
function
|
|
1585
|
+
function P() {
|
|
2417
1586
|
var t, r;
|
|
2418
|
-
(r = (t =
|
|
1587
|
+
(r = (t = f.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", E);
|
|
2419
1588
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const t =
|
|
2422
|
-
return
|
|
1589
|
+
function h() {
|
|
1590
|
+
const t = l.value, r = M(t.children[1]);
|
|
1591
|
+
return mt(r, I).value;
|
|
2423
1592
|
}
|
|
2424
|
-
|
|
2425
|
-
if (
|
|
2426
|
-
const t =
|
|
2427
|
-
|
|
1593
|
+
H(() => {
|
|
1594
|
+
if (l.value) {
|
|
1595
|
+
const t = l.value.querySelector(`[data-dragref='${f.value.id}-container']`);
|
|
1596
|
+
u.value = t && t.componentInstance ? t.componentInstance.value : h(), c && t && c.attachComponents(t, f.value), m.value = u.value.canNested !== void 0 ? u.value.canNested : m.value, i.value = u.value.canAdd !== void 0 ? u.value.canAdd : i.value, d.value = u.value.canDelete !== void 0 ? u.value.canDelete : d.value, n.value = u.value.canMove !== void 0 ? u.value.canMove : n.value, g.value = u.value.styles || "", l.value && (l.value.componentInstance = u, l.value.designItemContext = I);
|
|
2428
1597
|
}
|
|
2429
|
-
|
|
2430
|
-
}),
|
|
2431
|
-
|
|
1598
|
+
P(), le.value++;
|
|
1599
|
+
}), Me(() => {
|
|
1600
|
+
l.value && l.value.removeEventListener("scroll", E);
|
|
2432
1601
|
});
|
|
2433
|
-
function
|
|
2434
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
const x = f.value.getDraggableDesignItemElement(y);
|
|
2441
|
-
x && x.value && x.value.classList.add("dgComponentSelected");
|
|
2442
|
-
}
|
|
1602
|
+
function o(t) {
|
|
1603
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((w) => w.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
|
|
1604
|
+
let r = I.designerItemElementRef;
|
|
1605
|
+
const a = l.value;
|
|
1606
|
+
if (a) {
|
|
1607
|
+
const w = document.getElementsByClassName("dgComponentSelected");
|
|
1608
|
+
w && w.length === 1 && w[0] === l.value || (Array.from(w).forEach((S) => S.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", f.value.type, f.value, s.componentId, u.value), r = u.value.getDraggableDesignItemElement(I), r && r.value && r.value.classList.add("dgComponentSelected"));
|
|
2443
1609
|
}
|
|
2444
|
-
|
|
1610
|
+
E({
|
|
1611
|
+
target: r == null ? void 0 : r.value
|
|
1612
|
+
});
|
|
2445
1613
|
}
|
|
2446
|
-
return () =>
|
|
1614
|
+
return () => y("div", {
|
|
2447
1615
|
id: `${s.id}-design-item`,
|
|
2448
|
-
ref:
|
|
2449
|
-
class:
|
|
2450
|
-
style:
|
|
2451
|
-
onClick:
|
|
2452
|
-
}, [
|
|
1616
|
+
ref: l,
|
|
1617
|
+
class: B.value,
|
|
1618
|
+
style: O.value,
|
|
1619
|
+
onClick: o
|
|
1620
|
+
}, [v(f.value), e.slots.default && e.slots.default()]);
|
|
2453
1621
|
}
|
|
2454
1622
|
});
|
|
2455
|
-
class
|
|
2456
|
-
constructor(e,
|
|
2457
|
-
super(e,
|
|
1623
|
+
class bt extends se {
|
|
1624
|
+
constructor(e, n) {
|
|
1625
|
+
super(e, n);
|
|
2458
1626
|
}
|
|
2459
1627
|
getPropertyConfig(e) {
|
|
2460
1628
|
return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
@@ -2503,20 +1671,18 @@ class kt extends ae {
|
|
|
2503
1671
|
title: "style样式"
|
|
2504
1672
|
}
|
|
2505
1673
|
},
|
|
2506
|
-
setPropertyRelates(
|
|
1674
|
+
setPropertyRelates(n, i) {
|
|
2507
1675
|
}
|
|
2508
1676
|
};
|
|
2509
1677
|
}
|
|
2510
1678
|
getEventPropConfig(e) {
|
|
2511
|
-
const
|
|
1679
|
+
const n = [
|
|
2512
1680
|
{
|
|
2513
1681
|
label: "onClick",
|
|
2514
1682
|
name: "点击事件"
|
|
2515
1683
|
}
|
|
2516
|
-
];
|
|
2517
|
-
|
|
2518
|
-
const d = c.eventsEditorUtils.formProperties(e, c.viewModelId, o), b = {};
|
|
2519
|
-
b[c.viewModelId] = {
|
|
1684
|
+
], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
|
|
1685
|
+
m[i.viewModelId] = {
|
|
2520
1686
|
type: "events-editor",
|
|
2521
1687
|
editor: {
|
|
2522
1688
|
initialData: d
|
|
@@ -2524,24 +1690,24 @@ class kt extends ae {
|
|
|
2524
1690
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2525
1691
|
title: "事件",
|
|
2526
1692
|
hideTitle: !0,
|
|
2527
|
-
properties:
|
|
1693
|
+
properties: m,
|
|
2528
1694
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2529
1695
|
refreshPanelAfterChanged: !0,
|
|
2530
1696
|
tabId: "commands",
|
|
2531
1697
|
tabName: "交互",
|
|
2532
|
-
setPropertyRelates(
|
|
2533
|
-
const
|
|
2534
|
-
delete e[
|
|
1698
|
+
setPropertyRelates(p, T) {
|
|
1699
|
+
const x = p.propertyValue;
|
|
1700
|
+
delete e[i.viewModelId], x && (x.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, x.events, x));
|
|
2535
1701
|
}
|
|
2536
1702
|
};
|
|
2537
1703
|
}
|
|
2538
1704
|
}
|
|
2539
|
-
class
|
|
2540
|
-
constructor(e,
|
|
2541
|
-
super(e,
|
|
1705
|
+
class yt extends se {
|
|
1706
|
+
constructor(e, n) {
|
|
1707
|
+
super(e, n);
|
|
2542
1708
|
}
|
|
2543
1709
|
getPropertyConfig(e) {
|
|
2544
|
-
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
1710
|
+
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
|
|
2545
1711
|
}
|
|
2546
1712
|
getBasicPropConfig() {
|
|
2547
1713
|
this.propertyConfig.categories.basic = {
|
|
@@ -2562,7 +1728,7 @@ class At extends ae {
|
|
|
2562
1728
|
type: "combo-list",
|
|
2563
1729
|
textField: "value",
|
|
2564
1730
|
valueField: "key",
|
|
2565
|
-
data: [{ key: "response-toolbar-item", value:
|
|
1731
|
+
data: [{ key: "response-toolbar-item", value: te["response-toolbar-item"].name }]
|
|
2566
1732
|
}
|
|
2567
1733
|
},
|
|
2568
1734
|
text: {
|
|
@@ -2579,32 +1745,42 @@ class At extends ae {
|
|
|
2579
1745
|
}
|
|
2580
1746
|
};
|
|
2581
1747
|
}
|
|
1748
|
+
getbBehaviorConfig() {
|
|
1749
|
+
this.propertyConfig.categories.behavior = {
|
|
1750
|
+
title: "行为",
|
|
1751
|
+
description: "Behavior",
|
|
1752
|
+
properties: {
|
|
1753
|
+
disabled: {
|
|
1754
|
+
title: "禁用",
|
|
1755
|
+
type: "boolean",
|
|
1756
|
+
description: "按钮禁用状态",
|
|
1757
|
+
refreshPanelAfterChanged: !0
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
};
|
|
1761
|
+
}
|
|
2582
1762
|
getAppearanceProperties(e) {
|
|
2583
1763
|
this.propertyConfig.categories.appearance = {
|
|
2584
1764
|
title: "样式",
|
|
2585
1765
|
description: "Appearance",
|
|
2586
1766
|
properties: {
|
|
2587
1767
|
class: {
|
|
2588
|
-
title: "class",
|
|
2589
|
-
type: "string",
|
|
2590
|
-
description: ""
|
|
2591
|
-
},
|
|
2592
|
-
style: {
|
|
2593
|
-
title: "style",
|
|
1768
|
+
title: "class样式",
|
|
2594
1769
|
type: "string",
|
|
2595
|
-
description: ""
|
|
1770
|
+
description: "",
|
|
1771
|
+
$converter: "/converter/appearance.converter"
|
|
2596
1772
|
}
|
|
2597
1773
|
}
|
|
2598
1774
|
};
|
|
2599
1775
|
}
|
|
2600
1776
|
getEventPropConfig(e) {
|
|
2601
|
-
const
|
|
1777
|
+
const n = [
|
|
2602
1778
|
{
|
|
2603
1779
|
label: "onClick",
|
|
2604
1780
|
name: "点击事件"
|
|
2605
1781
|
}
|
|
2606
|
-
],
|
|
2607
|
-
|
|
1782
|
+
], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
|
|
1783
|
+
m[i.viewModelId] = {
|
|
2608
1784
|
type: "events-editor",
|
|
2609
1785
|
editor: {
|
|
2610
1786
|
initialData: d
|
|
@@ -2612,272 +1788,245 @@ class At extends ae {
|
|
|
2612
1788
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2613
1789
|
title: "事件",
|
|
2614
1790
|
hideTitle: !0,
|
|
2615
|
-
properties:
|
|
1791
|
+
properties: m,
|
|
2616
1792
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2617
1793
|
refreshPanelAfterChanged: !0,
|
|
2618
1794
|
tabId: "commands",
|
|
2619
1795
|
tabName: "交互",
|
|
2620
|
-
setPropertyRelates(
|
|
2621
|
-
const
|
|
2622
|
-
delete e[
|
|
1796
|
+
setPropertyRelates(p, T) {
|
|
1797
|
+
const x = p.propertyValue;
|
|
1798
|
+
delete e[i.viewModelId], x && (x.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, x.events, x));
|
|
2623
1799
|
}
|
|
2624
1800
|
};
|
|
2625
1801
|
}
|
|
2626
1802
|
}
|
|
2627
|
-
function
|
|
2628
|
-
|
|
2629
|
-
const o = S(!1), c = S(!1);
|
|
2630
|
-
let d = !1, b = !1;
|
|
2631
|
-
function m(v) {
|
|
1803
|
+
function vt(s, e) {
|
|
1804
|
+
function n(T) {
|
|
2632
1805
|
return !1;
|
|
2633
1806
|
}
|
|
2634
|
-
function
|
|
2635
|
-
}
|
|
2636
|
-
function P() {
|
|
2637
|
-
return "";
|
|
2638
|
-
}
|
|
2639
|
-
function g(v, T) {
|
|
2640
|
-
return T.text = v.label, T;
|
|
2641
|
-
}
|
|
2642
|
-
function C(v, T, O) {
|
|
2643
|
-
const E = s.schema;
|
|
2644
|
-
if ((E.appearance && E.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2645
|
-
const j = String(v.innerText), h = q("form-group");
|
|
2646
|
-
return h.editor = O, h.label = j, h;
|
|
2647
|
-
}
|
|
2648
|
-
return O;
|
|
2649
|
-
}
|
|
2650
|
-
function p() {
|
|
1807
|
+
function i() {
|
|
2651
1808
|
return !1;
|
|
2652
1809
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return !
|
|
1810
|
+
function d() {
|
|
1811
|
+
return !0;
|
|
2655
1812
|
}
|
|
2656
|
-
function
|
|
1813
|
+
function m() {
|
|
2657
1814
|
return !1;
|
|
2658
1815
|
}
|
|
2659
|
-
function
|
|
2660
|
-
|
|
2661
|
-
}
|
|
2662
|
-
function y(v) {
|
|
2663
|
-
let T;
|
|
1816
|
+
function p(T) {
|
|
1817
|
+
let x;
|
|
2664
1818
|
switch (s.schema.type) {
|
|
2665
1819
|
case "tab-toolbar-item":
|
|
2666
|
-
|
|
1820
|
+
x = new bt(T, e);
|
|
2667
1821
|
break;
|
|
2668
1822
|
default:
|
|
2669
|
-
|
|
1823
|
+
x = new yt(T, e);
|
|
2670
1824
|
}
|
|
2671
|
-
return
|
|
1825
|
+
return x.getPropertyConfig(s.schema);
|
|
2672
1826
|
}
|
|
2673
1827
|
return {
|
|
2674
|
-
canAccepts:
|
|
2675
|
-
|
|
2676
|
-
checkCanDeleteComponent:
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
hideNestedPaddingInDesginerView: a,
|
|
2680
|
-
onAcceptNewChildElement: C,
|
|
2681
|
-
onAcceptMovedChildElement: D,
|
|
2682
|
-
onResolveNewComponentSchema: g,
|
|
2683
|
-
getPropsConfig: y,
|
|
2684
|
-
triggerBelongedComponentToMoveWhenMoved: o,
|
|
2685
|
-
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
1828
|
+
canAccepts: n,
|
|
1829
|
+
checkCanMoveComponent: i,
|
|
1830
|
+
checkCanDeleteComponent: d,
|
|
1831
|
+
checkCanAddComponent: m,
|
|
1832
|
+
getPropsConfig: p
|
|
2686
1833
|
};
|
|
2687
1834
|
}
|
|
2688
|
-
const
|
|
1835
|
+
const xe = /* @__PURE__ */ Y({
|
|
2689
1836
|
name: "FResponseToolbarItemDesign",
|
|
2690
|
-
props:
|
|
1837
|
+
props: Ce,
|
|
2691
1838
|
emits: ["Click"],
|
|
2692
1839
|
setup(s, e) {
|
|
2693
|
-
|
|
2694
|
-
const
|
|
1840
|
+
M(), M();
|
|
1841
|
+
const n = M(s.alignment), i = {
|
|
2695
1842
|
id: "__more_buttons__",
|
|
2696
1843
|
text: "More"
|
|
2697
|
-
}, d =
|
|
2698
|
-
|
|
2699
|
-
const
|
|
1844
|
+
}, d = M(new z(i));
|
|
1845
|
+
V(() => d.value.children.length > 0);
|
|
1846
|
+
const m = M(), p = L("designer-host-service"), T = L("design-item-context"), x = vt(T, p), f = fe(m, T, x);
|
|
2700
1847
|
L("toolbar-item-handler", () => {
|
|
2701
|
-
}),
|
|
2702
|
-
|
|
2703
|
-
}), e.expose(
|
|
2704
|
-
function
|
|
2705
|
-
const
|
|
1848
|
+
}), H(() => {
|
|
1849
|
+
m.value.componentInstance = f;
|
|
1850
|
+
}), e.expose(f.value);
|
|
1851
|
+
function g() {
|
|
1852
|
+
const u = {
|
|
2706
1853
|
"f-icon": !0
|
|
2707
|
-
},
|
|
2708
|
-
return J(
|
|
1854
|
+
}, b = s.icon ? s.icon.trim() : "";
|
|
1855
|
+
return J(u, b);
|
|
2709
1856
|
}
|
|
2710
|
-
function
|
|
1857
|
+
function l() {
|
|
2711
1858
|
return !!(s.icon && s.icon.trim());
|
|
2712
1859
|
}
|
|
2713
|
-
function
|
|
2714
|
-
const
|
|
1860
|
+
function c() {
|
|
1861
|
+
const u = {
|
|
2715
1862
|
btn: !0,
|
|
2716
1863
|
"f-rt-btn": !0,
|
|
2717
|
-
"f-btn-ml":
|
|
2718
|
-
"f-btn-mr":
|
|
2719
|
-
"btn-icontext": !!(s.icon && s.icon.trim())
|
|
1864
|
+
"f-btn-ml": n.value === "right",
|
|
1865
|
+
"f-btn-mr": n.value === "left",
|
|
1866
|
+
"btn-icontext": !!(s.icon && s.icon.trim()),
|
|
1867
|
+
disabled: s.disabled === !0
|
|
2720
1868
|
};
|
|
2721
|
-
return J(
|
|
1869
|
+
return J(u, s.class);
|
|
2722
1870
|
}
|
|
2723
|
-
return
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
ref: b,
|
|
2727
|
-
"data-dragref": `${D.schema.id}-container`,
|
|
1871
|
+
return () => y("div", {
|
|
1872
|
+
ref: m,
|
|
1873
|
+
"data-dragref": `${T.schema.id}-container`,
|
|
2728
1874
|
class: "farris-component position-relative",
|
|
2729
1875
|
style: "display:inline-block!important;"
|
|
2730
|
-
}, [
|
|
1876
|
+
}, [y("button", {
|
|
2731
1877
|
type: "button",
|
|
2732
|
-
class:
|
|
1878
|
+
class: c(),
|
|
2733
1879
|
id: s.id
|
|
2734
|
-
}, [
|
|
2735
|
-
class:
|
|
1880
|
+
}, [l() && y("i", {
|
|
1881
|
+
class: g()
|
|
2736
1882
|
}, null), s.text])]);
|
|
2737
1883
|
}
|
|
2738
|
-
}),
|
|
1884
|
+
}), Ct = /* @__PURE__ */ Y({
|
|
2739
1885
|
name: "FResponseToolbarDesign",
|
|
2740
|
-
props:
|
|
1886
|
+
props: st,
|
|
2741
1887
|
emits: ["Click"],
|
|
2742
1888
|
setup(s, e) {
|
|
2743
|
-
const
|
|
2744
|
-
let
|
|
2745
|
-
const d =
|
|
1889
|
+
const n = M(s.items);
|
|
1890
|
+
let i = new Array(n.value.length).fill(M());
|
|
1891
|
+
const d = M(), m = M(), p = M(s.alignment), T = {
|
|
2746
1892
|
id: "__more_buttons__",
|
|
2747
1893
|
text: "More"
|
|
2748
|
-
},
|
|
2749
|
-
|
|
2750
|
-
const
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
}), e.expose(
|
|
2755
|
-
|
|
1894
|
+
}, x = M(new z(T)), f = we();
|
|
1895
|
+
V(() => x.value.children.length > 0);
|
|
1896
|
+
const g = M(), l = L("designer-host-service"), c = L("design-item-context"), u = ut(c, l), b = fe(g, c, u), I = L("toolbar-item-handler", () => {
|
|
1897
|
+
});
|
|
1898
|
+
H(() => {
|
|
1899
|
+
g.value.componentInstance = b;
|
|
1900
|
+
}), e.expose(b.value);
|
|
1901
|
+
function B() {
|
|
1902
|
+
I && I();
|
|
1903
|
+
}
|
|
1904
|
+
const O = V(() => J({
|
|
2756
1905
|
"f-toolbar": !0,
|
|
2757
1906
|
"f-response-toolbar": !0,
|
|
2758
1907
|
"position-relative": !0
|
|
2759
|
-
}, s.customClass)),
|
|
1908
|
+
}, s.customClass)), F = V(() => ({
|
|
2760
1909
|
"d-flex": !0,
|
|
2761
1910
|
"flex-nowrap": !0,
|
|
2762
|
-
"justify-content-end":
|
|
2763
|
-
"justify-content-start":
|
|
1911
|
+
"justify-content-end": p.value === "right",
|
|
1912
|
+
"justify-content-start": p.value === "left"
|
|
2764
1913
|
})), {
|
|
2765
|
-
renderToolbarDropdown:
|
|
2766
|
-
clearAllDropDown:
|
|
2767
|
-
} =
|
|
2768
|
-
function
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
}),
|
|
1914
|
+
renderToolbarDropdown: j,
|
|
1915
|
+
clearAllDropDown: A
|
|
1916
|
+
} = at(s, f, b);
|
|
1917
|
+
function k() {
|
|
1918
|
+
n.value.filter((t) => t.children && t.children.length > 0).forEach((t) => {
|
|
1919
|
+
t.expanded = !1;
|
|
1920
|
+
}), x.value.expanded = !1, A();
|
|
2772
1921
|
}
|
|
2773
|
-
const
|
|
2774
|
-
function
|
|
2775
|
-
const
|
|
2776
|
-
let
|
|
2777
|
-
const
|
|
2778
|
-
if (
|
|
2779
|
-
const _ =
|
|
2780
|
-
|
|
1922
|
+
const R = /* @__PURE__ */ new Map(), v = [];
|
|
1923
|
+
function E(t) {
|
|
1924
|
+
const r = m.value;
|
|
1925
|
+
let a = t;
|
|
1926
|
+
const w = Array.from(r.children), C = w[w.length - 1].id === "__more_buttons__" ? w[w.length - 1] : null;
|
|
1927
|
+
if (C) {
|
|
1928
|
+
const _ = C.computedStyleMap().get("margin-left"), N = C.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + C.getBoundingClientRect().width + (N ? N.value : 0);
|
|
1929
|
+
a -= q;
|
|
2781
1930
|
}
|
|
2782
|
-
const
|
|
2783
|
-
for (const _ of
|
|
2784
|
-
const
|
|
2785
|
-
|
|
1931
|
+
const S = w.filter((_) => _.id !== "__more_buttons__");
|
|
1932
|
+
for (const _ of S) {
|
|
1933
|
+
const N = _.computedStyleMap().get("margin-left"), q = _.computedStyleMap().get("margin-right"), G = (N ? N.value : 0) + _.getBoundingClientRect().width + (q ? q.value : 0);
|
|
1934
|
+
a < G ? (R.set(_.id, !0), v.push({
|
|
2786
1935
|
id: _.id,
|
|
2787
|
-
width:
|
|
2788
|
-
})) :
|
|
1936
|
+
width: G
|
|
1937
|
+
})) : a -= G;
|
|
2789
1938
|
}
|
|
2790
|
-
if (
|
|
2791
|
-
for (let _ =
|
|
2792
|
-
const
|
|
2793
|
-
if (
|
|
2794
|
-
|
|
1939
|
+
if (v.length)
|
|
1940
|
+
for (let _ = v.length - 1; _ >= 0; _--) {
|
|
1941
|
+
const N = v[_].width;
|
|
1942
|
+
if (a >= N)
|
|
1943
|
+
a -= N, R.delete(v[_].id), v.pop();
|
|
2795
1944
|
else
|
|
2796
1945
|
break;
|
|
2797
1946
|
}
|
|
2798
|
-
const
|
|
2799
|
-
|
|
2800
|
-
const
|
|
2801
|
-
|
|
1947
|
+
const $ = Object.assign({}, x.value);
|
|
1948
|
+
$.children = [];
|
|
1949
|
+
const U = new z($), W = n.value.reduce((_, N) => (R.has(N.id) && U.children.push(N), N.visible = !R.has(N.id), _.push(N), _), []);
|
|
1950
|
+
x.value = U, n.value = W;
|
|
2802
1951
|
}
|
|
2803
|
-
const
|
|
2804
|
-
if (
|
|
2805
|
-
const
|
|
2806
|
-
(
|
|
1952
|
+
const P = new ResizeObserver((t) => {
|
|
1953
|
+
if (t.length) {
|
|
1954
|
+
const a = t[0].contentRect.width, C = m.value.getBoundingClientRect().width;
|
|
1955
|
+
(a < C || v.length) && E(a);
|
|
2807
1956
|
}
|
|
2808
1957
|
});
|
|
2809
|
-
|
|
2810
|
-
const
|
|
2811
|
-
|
|
2812
|
-
}),
|
|
2813
|
-
|
|
2814
|
-
}),
|
|
2815
|
-
|
|
1958
|
+
H(() => {
|
|
1959
|
+
const t = d.value;
|
|
1960
|
+
P.observe(t), document.body.addEventListener("click", k);
|
|
1961
|
+
}), de(() => {
|
|
1962
|
+
P.disconnect(), document.body.removeEventListener("click", k);
|
|
1963
|
+
}), Q(() => s.items, () => {
|
|
1964
|
+
n.value = s.items;
|
|
2816
1965
|
}, {
|
|
2817
1966
|
deep: !0
|
|
2818
|
-
}),
|
|
2819
|
-
|
|
1967
|
+
}), Q(n, (t) => {
|
|
1968
|
+
i = new Array(n.value.length).fill(M());
|
|
2820
1969
|
});
|
|
2821
|
-
function
|
|
2822
|
-
|
|
1970
|
+
function h(t, r, a, w) {
|
|
1971
|
+
c && c.setupContext && c.setupContext.emit("selectionChange", t, r, a, w);
|
|
2823
1972
|
}
|
|
2824
|
-
function
|
|
2825
|
-
const
|
|
2826
|
-
|
|
1973
|
+
function o() {
|
|
1974
|
+
const t = m.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
1975
|
+
t == null || t.classList.remove("dgComponentSelected"), t == null || t.classList.remove("dgComponentFocused"), B();
|
|
2827
1976
|
}
|
|
2828
|
-
return () =>
|
|
2829
|
-
ref:
|
|
2830
|
-
"data-dragref": `${
|
|
2831
|
-
class:
|
|
2832
|
-
}, [
|
|
1977
|
+
return () => y("div", {
|
|
1978
|
+
ref: g,
|
|
1979
|
+
"data-dragref": `${c.schema.id}-container`,
|
|
1980
|
+
class: O.value
|
|
1981
|
+
}, [y("div", {
|
|
2833
1982
|
ref: d,
|
|
2834
|
-
class:
|
|
2835
|
-
}, [
|
|
2836
|
-
ref:
|
|
1983
|
+
class: F.value
|
|
1984
|
+
}, [y("div", {
|
|
1985
|
+
ref: m,
|
|
2837
1986
|
class: "d-inline-block f-response-content",
|
|
2838
1987
|
style: "white-space: nowrap;"
|
|
2839
|
-
}, [
|
|
2840
|
-
ref:
|
|
1988
|
+
}, [n.value.map((t, r) => y(ht, {
|
|
1989
|
+
ref: i[r],
|
|
2841
1990
|
class: "p-0 display-inline-block",
|
|
2842
|
-
modelValue:
|
|
2843
|
-
"onUpdate:modelValue": (
|
|
1991
|
+
modelValue: t,
|
|
1992
|
+
"onUpdate:modelValue": (a) => t = a,
|
|
2844
1993
|
canMove: !0,
|
|
2845
1994
|
childType: "response-toolbar-item",
|
|
2846
1995
|
childLabel: "按钮",
|
|
2847
1996
|
contentKey: "buttons",
|
|
2848
1997
|
componentId: s.componentId,
|
|
2849
|
-
id:
|
|
1998
|
+
id: t.id,
|
|
2850
1999
|
style: "padding:0 !important;display:inline-block",
|
|
2851
|
-
onSelectionChange:
|
|
2852
|
-
onRemoveComponent:
|
|
2000
|
+
onSelectionChange: h,
|
|
2001
|
+
onRemoveComponent: o
|
|
2853
2002
|
}, {
|
|
2854
2003
|
default: () => {
|
|
2855
|
-
var
|
|
2856
|
-
return [
|
|
2857
|
-
id:
|
|
2858
|
-
|
|
2859
|
-
text:
|
|
2860
|
-
icon:
|
|
2861
|
-
class: ((
|
|
2004
|
+
var a;
|
|
2005
|
+
return [y(xe, {
|
|
2006
|
+
id: t.id,
|
|
2007
|
+
disabled: t.disabled,
|
|
2008
|
+
text: t.text,
|
|
2009
|
+
icon: t.icon,
|
|
2010
|
+
class: ((a = t.appearance) == null ? void 0 : a.class) || "btn-secondary",
|
|
2862
2011
|
alignment: s.alignment || "right",
|
|
2863
2012
|
componentId: s.componentId
|
|
2864
2013
|
}, null)];
|
|
2865
2014
|
}
|
|
2866
2015
|
}))])])]);
|
|
2867
2016
|
}
|
|
2868
|
-
}),
|
|
2869
|
-
|
|
2870
|
-
s["response-toolbar"] =
|
|
2017
|
+
}), Mt = oe;
|
|
2018
|
+
X.register = (s, e, n) => {
|
|
2019
|
+
s["response-toolbar"] = X, e["response-toolbar"] = oe;
|
|
2871
2020
|
};
|
|
2872
|
-
|
|
2873
|
-
s["response-toolbar"] =
|
|
2021
|
+
X.registerDesigner = (s, e, n) => {
|
|
2022
|
+
s["response-toolbar"] = Ct, e["response-toolbar"] = oe, s["response-toolbar-item"] = xe, e["response-toolbar-item"] = rt;
|
|
2874
2023
|
};
|
|
2875
|
-
const
|
|
2024
|
+
const Et = Re(X);
|
|
2876
2025
|
export {
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2026
|
+
X as FResponseToolbar,
|
|
2027
|
+
z as ResponseToolbarDropDownItem,
|
|
2028
|
+
Dt as ResponseToolbarGroup,
|
|
2029
|
+
ke as ResponseToolbarItem,
|
|
2030
|
+
Et as default,
|
|
2031
|
+
Mt as responseToolbarResolver
|
|
2883
2032
|
};
|