@farris/ui-vue 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var D = (s, e, n) =>
|
|
4
|
-
import { computed as V, getCurrentInstance as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { getCustomClass 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", "");
|
|
@@ -67,20 +67,20 @@ class me {
|
|
|
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
77
|
const n = [];
|
|
78
|
-
return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new
|
|
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
|
|
82
|
+
const { buildResponseToolbarItems: Pe } = me();
|
|
83
|
+
class z extends ge {
|
|
84
84
|
constructor(n) {
|
|
85
85
|
super(n);
|
|
86
86
|
D(this, "placement", "");
|
|
@@ -96,10 +96,10 @@ class W extends me {
|
|
|
96
96
|
const i = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
97
97
|
Object.keys(n).filter((d) => i.indexOf(d) > -1).forEach((d) => {
|
|
98
98
|
this[d] = n[d];
|
|
99
|
-
}), n.children && n.children.length && (this.children =
|
|
99
|
+
}), n.children && n.children.length && (this.children = Pe(n.children));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
class
|
|
102
|
+
class Dt {
|
|
103
103
|
constructor(e, n) {
|
|
104
104
|
D(this, "id");
|
|
105
105
|
D(this, "name");
|
|
@@ -144,98 +144,102 @@ class Pt {
|
|
|
144
144
|
return this.presetId.length === this.responsedIndex.length;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
const
|
|
148
|
-
function
|
|
149
|
-
const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i),
|
|
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 i =
|
|
156
|
+
function Z(s, e = {}, n) {
|
|
157
|
+
const i = he[s];
|
|
154
158
|
if (i) {
|
|
155
|
-
let d =
|
|
156
|
-
const
|
|
157
|
-
return d =
|
|
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 n =
|
|
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
|
|
169
|
+
function Ae(s, e) {
|
|
166
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
|
-
i[
|
|
172
|
+
const m = e.get(d);
|
|
173
|
+
if (typeof m == "string")
|
|
174
|
+
i[m] = s[d];
|
|
171
175
|
else {
|
|
172
|
-
const
|
|
173
|
-
Object.assign(i,
|
|
176
|
+
const p = m(d, s[d], s);
|
|
177
|
+
Object.assign(i, p);
|
|
174
178
|
}
|
|
175
179
|
} else
|
|
176
180
|
i[d] = s[d];
|
|
177
181
|
return i;
|
|
178
182
|
}, {});
|
|
179
183
|
}
|
|
180
|
-
function
|
|
181
|
-
const i =
|
|
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(
|
|
188
|
+
function _e(s = {}) {
|
|
189
|
+
function e(f, g, l, c) {
|
|
186
190
|
if (typeof l == "number")
|
|
187
|
-
return c[
|
|
191
|
+
return c[f].length === l;
|
|
188
192
|
if (typeof l == "object") {
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
return Number(c[
|
|
192
|
-
if (
|
|
193
|
-
return Number(c[
|
|
194
|
-
if (
|
|
195
|
-
return Number(c[
|
|
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 n(
|
|
200
|
-
return c[
|
|
203
|
+
function n(f, g, l, c) {
|
|
204
|
+
return c[f] && c[f].propertyValue && String(c[f].propertyValue.value) === String(l);
|
|
201
205
|
}
|
|
202
206
|
const i = /* @__PURE__ */ new Map([
|
|
203
207
|
["length", e],
|
|
204
208
|
["getProperty", n]
|
|
205
209
|
]);
|
|
206
|
-
Object.keys(s).reduce((
|
|
207
|
-
function d(
|
|
208
|
-
const l =
|
|
209
|
-
return typeof
|
|
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) => {
|
|
210
214
|
if (c === "length")
|
|
211
|
-
return { target: l, operator: "length", param: null, value:
|
|
212
|
-
const
|
|
213
|
-
return { target: l, operator: "getProperty", param:
|
|
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 l.push(...
|
|
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 f
|
|
223
|
-
if (i.has(
|
|
224
|
-
const l = i.get(
|
|
225
|
-
return l && l(
|
|
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 l = Object.keys(
|
|
234
|
-
return c ? !
|
|
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 ne = {
|
|
|
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
|
-
]), Ue = /* @__PURE__ */ new Map([
|
|
292
|
-
["appearance", We]
|
|
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,10 +318,10 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
312
318
|
type: "object",
|
|
313
319
|
properties: {
|
|
314
320
|
class: {
|
|
315
|
-
type: "string"
|
|
321
|
+
type: "string",
|
|
322
|
+
default: ""
|
|
316
323
|
}
|
|
317
|
-
}
|
|
318
|
-
default: {}
|
|
324
|
+
}
|
|
319
325
|
},
|
|
320
326
|
alignment: {
|
|
321
327
|
description: "The alignment of Response Toolbar Button.",
|
|
@@ -327,19 +333,19 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
327
333
|
type: "array",
|
|
328
334
|
default: []
|
|
329
335
|
}
|
|
330
|
-
},
|
|
336
|
+
}, Qe = [
|
|
331
337
|
"id",
|
|
332
338
|
"type",
|
|
333
339
|
"buttons"
|
|
334
|
-
],
|
|
335
|
-
$schema:
|
|
336
|
-
$id:
|
|
337
|
-
title:
|
|
338
|
-
description:
|
|
339
|
-
type:
|
|
340
|
-
properties:
|
|
341
|
-
required:
|
|
342
|
-
},
|
|
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 = {
|
|
343
349
|
id: {
|
|
344
350
|
description: "The unique identifier for a Response Toolbar",
|
|
345
351
|
type: "string"
|
|
@@ -357,8 +363,7 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
357
363
|
type: "string",
|
|
358
364
|
default: "btn-secondary"
|
|
359
365
|
}
|
|
360
|
-
}
|
|
361
|
-
default: {}
|
|
366
|
+
}
|
|
362
367
|
},
|
|
363
368
|
alignment: {
|
|
364
369
|
description: "对齐",
|
|
@@ -385,57 +390,19 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
385
390
|
type: "string",
|
|
386
391
|
default: ""
|
|
387
392
|
}
|
|
388
|
-
},
|
|
393
|
+
}, nt = [
|
|
389
394
|
"id",
|
|
390
395
|
"type",
|
|
391
396
|
"text"
|
|
392
|
-
],
|
|
393
|
-
$schema:
|
|
394
|
-
$id:
|
|
395
|
-
title:
|
|
396
|
-
description:
|
|
397
|
-
type:
|
|
398
|
-
properties:
|
|
399
|
-
required:
|
|
400
|
-
},
|
|
401
|
-
basic: {
|
|
402
|
-
title: "基本信息",
|
|
403
|
-
description: "Basic Infomation",
|
|
404
|
-
properties: {
|
|
405
|
-
id: {
|
|
406
|
-
title: "标识",
|
|
407
|
-
type: "string",
|
|
408
|
-
description: "The identifier of a component.",
|
|
409
|
-
readonly: !0
|
|
410
|
-
},
|
|
411
|
-
type: {
|
|
412
|
-
title: "类型",
|
|
413
|
-
type: "enum",
|
|
414
|
-
description: "The type of a component.",
|
|
415
|
-
editor: {
|
|
416
|
-
type: "combo-list",
|
|
417
|
-
data: []
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
text: {
|
|
421
|
-
title: "文本",
|
|
422
|
-
type: "string",
|
|
423
|
-
description: "",
|
|
424
|
-
refreshPanelAfterChanged: !0
|
|
425
|
-
},
|
|
426
|
-
icon: {
|
|
427
|
-
title: "图标",
|
|
428
|
-
type: "string",
|
|
429
|
-
description: ""
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}, le = {
|
|
434
|
-
title: rt,
|
|
435
|
-
description: it,
|
|
436
|
-
type: ct,
|
|
437
|
-
categories: lt
|
|
438
|
-
}, oe = {
|
|
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 = {
|
|
439
406
|
/** 组件自定义样式 */
|
|
440
407
|
customClass: { type: String, default: "" },
|
|
441
408
|
alignment: { Type: String, default: "right" },
|
|
@@ -443,17 +410,14 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
443
410
|
Type: Array,
|
|
444
411
|
default: []
|
|
445
412
|
}
|
|
446
|
-
}
|
|
447
|
-
ee[K.title] = K;
|
|
448
|
-
ye[le.title] = le;
|
|
449
|
-
const at = Object.assign({}, oe, {
|
|
413
|
+
}, st = Object.assign({}, ne, {
|
|
450
414
|
componentId: { type: String, default: "" }
|
|
451
|
-
}),
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
),
|
|
415
|
+
}), oe = ye(
|
|
416
|
+
ne,
|
|
417
|
+
Je,
|
|
418
|
+
Ne,
|
|
419
|
+
ve
|
|
420
|
+
), Ce = {
|
|
457
421
|
id: { type: String, default: "" },
|
|
458
422
|
items: { type: Object, default: {} },
|
|
459
423
|
class: { type: String, default: "" },
|
|
@@ -462,20 +426,20 @@ const at = Object.assign({}, oe, {
|
|
|
462
426
|
icon: { type: String, default: "" },
|
|
463
427
|
componentId: { type: String, default: "" },
|
|
464
428
|
alignment: { Type: String, default: "right" }
|
|
465
|
-
},
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
429
|
+
}, rt = ye(
|
|
430
|
+
Ce,
|
|
431
|
+
ot,
|
|
432
|
+
Ve,
|
|
433
|
+
ve
|
|
470
434
|
);
|
|
471
|
-
function
|
|
435
|
+
function we() {
|
|
472
436
|
function s(n) {
|
|
473
437
|
const i = {
|
|
474
438
|
"f-icon": !0
|
|
475
439
|
};
|
|
476
440
|
if (n.icon) {
|
|
477
441
|
const d = n.icon.trim().split(" ");
|
|
478
|
-
d && d.length && d.reduce((
|
|
442
|
+
d && d.length && d.reduce((m, p) => (m[p] = !0, m), i);
|
|
479
443
|
}
|
|
480
444
|
return i;
|
|
481
445
|
}
|
|
@@ -484,14 +448,14 @@ function xe() {
|
|
|
484
448
|
}
|
|
485
449
|
return { iconClass: s, shouldShowIcon: e };
|
|
486
450
|
}
|
|
487
|
-
function
|
|
451
|
+
function it(s) {
|
|
488
452
|
function e(l) {
|
|
489
453
|
const c = {
|
|
490
454
|
"dropdown-menu": !0
|
|
491
455
|
};
|
|
492
456
|
if (l.class) {
|
|
493
|
-
const
|
|
494
|
-
|
|
457
|
+
const u = l.menuClass.split(" ");
|
|
458
|
+
u && u.length && u.reduce((b, I) => (b[I] = !0, b), c);
|
|
495
459
|
}
|
|
496
460
|
return c;
|
|
497
461
|
}
|
|
@@ -500,168 +464,168 @@ function ut(s) {
|
|
|
500
464
|
disabled: !l.enable,
|
|
501
465
|
"dropdown-submenu": !0,
|
|
502
466
|
"f-rt-dropdown": !0
|
|
503
|
-
},
|
|
504
|
-
return
|
|
467
|
+
}, u = l.dropdownClass.split(" ");
|
|
468
|
+
return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
|
|
505
469
|
}
|
|
506
470
|
function i(l) {
|
|
507
471
|
const c = {
|
|
508
472
|
disabled: !l.enable,
|
|
509
473
|
"dropdown-item": !0,
|
|
510
474
|
"f-rt-btn": !0
|
|
511
|
-
},
|
|
512
|
-
return
|
|
475
|
+
}, u = l.class.split(" ");
|
|
476
|
+
return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
|
|
513
477
|
}
|
|
514
478
|
let d;
|
|
515
|
-
const
|
|
516
|
-
function
|
|
517
|
-
var
|
|
518
|
-
((
|
|
519
|
-
const b =
|
|
520
|
-
if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ?
|
|
521
|
-
const
|
|
522
|
-
|
|
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);
|
|
523
487
|
}
|
|
524
488
|
}
|
|
525
|
-
function
|
|
489
|
+
function T(l, c) {
|
|
526
490
|
document.body.click(), c.enable && c.onClick(l, c.id);
|
|
527
491
|
}
|
|
528
|
-
function
|
|
492
|
+
function x(l) {
|
|
529
493
|
return l.children.map((c) => c.children && c.children.length ? y("li", {
|
|
530
494
|
class: n(c),
|
|
531
495
|
id: c.id,
|
|
532
|
-
onClick: (
|
|
496
|
+
onClick: (u) => c.enable && p(u, c, l)
|
|
533
497
|
}, [y("span", {
|
|
534
498
|
id: c.id,
|
|
535
499
|
class: i(c),
|
|
536
|
-
onMouseover: (
|
|
500
|
+
onMouseover: (u) => c.enable && p(u, c, l)
|
|
537
501
|
}, [c.text, y("i", {
|
|
538
502
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
539
503
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
540
504
|
}, null)]), d(c, c)]) : y("li", {
|
|
541
505
|
class: i(c),
|
|
542
506
|
id: c.id,
|
|
543
|
-
onClick: (
|
|
544
|
-
onMouseover: (
|
|
507
|
+
onClick: (u) => T(u, c),
|
|
508
|
+
onMouseover: (u) => c.enable && p(u, c, l)
|
|
545
509
|
}, [s.shouldShowIcon(c) && y("i", {
|
|
546
510
|
class: s.iconClass(c)
|
|
547
511
|
}, null), c.text]));
|
|
548
512
|
}
|
|
549
|
-
function
|
|
513
|
+
function f(l, c, u) {
|
|
550
514
|
const b = {
|
|
551
515
|
display: l.expanded ? "block" : "none",
|
|
552
516
|
position: "fixed",
|
|
553
517
|
maxWidth: "300px",
|
|
554
518
|
width: "auto",
|
|
555
519
|
minWidth: "120px"
|
|
556
|
-
},
|
|
557
|
-
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) {
|
|
558
522
|
const {
|
|
559
523
|
top: F,
|
|
560
|
-
width:
|
|
561
|
-
left:
|
|
562
|
-
right:
|
|
563
|
-
height:
|
|
564
|
-
} =
|
|
565
|
-
b.top = `${v}px`, b.left = `${
|
|
566
|
-
const
|
|
567
|
-
if (
|
|
568
|
-
b.display === "block" && (
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
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) {
|
|
571
535
|
b.top = `${F - 6}px`;
|
|
572
|
-
const o = Math.ceil(
|
|
536
|
+
const o = Math.ceil(j + A);
|
|
573
537
|
b.left = `${o}px`;
|
|
574
538
|
}
|
|
575
|
-
|
|
539
|
+
I - A - j < h.width && (b.left = `${(u ? A : k) - h.width}px`);
|
|
576
540
|
}
|
|
577
541
|
}
|
|
578
542
|
return b;
|
|
579
543
|
}
|
|
580
544
|
d = function(l, c) {
|
|
581
|
-
var
|
|
582
|
-
const
|
|
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);
|
|
583
547
|
return y("ul", {
|
|
584
548
|
class: e(l),
|
|
585
|
-
style:
|
|
549
|
+
style: f(l, I, c),
|
|
586
550
|
id: l.id + "_menu"
|
|
587
|
-
}, [
|
|
551
|
+
}, [x(l)]);
|
|
588
552
|
};
|
|
589
|
-
function
|
|
590
|
-
|
|
553
|
+
function g() {
|
|
554
|
+
m.forEach((l) => {
|
|
591
555
|
l.expanded = !1;
|
|
592
|
-
}),
|
|
556
|
+
}), m.clear();
|
|
593
557
|
}
|
|
594
558
|
return {
|
|
595
559
|
renderDropdownMenu: d,
|
|
596
|
-
clearAllDropDownMenu:
|
|
560
|
+
clearAllDropDownMenu: g
|
|
597
561
|
};
|
|
598
562
|
}
|
|
599
|
-
function
|
|
600
|
-
const n =
|
|
563
|
+
function ct(s, e) {
|
|
564
|
+
const n = M(s.alignment), {
|
|
601
565
|
renderDropdownMenu: i,
|
|
602
566
|
clearAllDropDownMenu: d
|
|
603
|
-
} =
|
|
604
|
-
function
|
|
567
|
+
} = it(e);
|
|
568
|
+
function m(g) {
|
|
605
569
|
const l = {
|
|
606
570
|
"btn-group": !0,
|
|
607
571
|
"f-rt-dropdown": !0,
|
|
608
572
|
"f-btn-ml": n.value === "right",
|
|
609
573
|
"f-btn-mr": n.value === "left"
|
|
610
|
-
}, c =
|
|
611
|
-
return c && c.length && c.reduce((
|
|
574
|
+
}, c = g.dropdownClass.split(" ");
|
|
575
|
+
return c && c.length && c.reduce((u, b) => (u[b] = !0, u), l), l;
|
|
612
576
|
}
|
|
613
|
-
function
|
|
577
|
+
function p(g) {
|
|
614
578
|
const l = {
|
|
615
579
|
btn: !0,
|
|
616
|
-
disabled: !
|
|
580
|
+
disabled: !g.enable,
|
|
617
581
|
"f-rt-btn": !0,
|
|
618
|
-
"btn-icontext": !!(
|
|
582
|
+
"btn-icontext": !!(g.icon && g.icon.trim())
|
|
619
583
|
};
|
|
620
|
-
if (
|
|
621
|
-
const c =
|
|
622
|
-
c && c.length && c.reduce((
|
|
584
|
+
if (g.class) {
|
|
585
|
+
const c = g.class.split(" ");
|
|
586
|
+
c && c.length && c.reduce((u, b) => (u[b] = !0, u), l);
|
|
623
587
|
}
|
|
624
588
|
return l;
|
|
625
589
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
590
|
+
function T(g, l) {
|
|
591
|
+
g.stopPropagation();
|
|
628
592
|
const c = l.expanded;
|
|
629
593
|
document.body.click(), l.expanded = !c;
|
|
630
594
|
}
|
|
631
|
-
function
|
|
595
|
+
function x(g) {
|
|
632
596
|
return y("div", {
|
|
633
|
-
id:
|
|
634
|
-
class:
|
|
597
|
+
id: g.id,
|
|
598
|
+
class: m(g)
|
|
635
599
|
}, [y("div", {
|
|
636
|
-
class:
|
|
600
|
+
class: p(g),
|
|
637
601
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
638
|
-
onClick: (l) =>
|
|
639
|
-
}, [e.shouldShowIcon(
|
|
640
|
-
class: e.iconClass(
|
|
641
|
-
}, null), y("span", 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", {
|
|
642
606
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
643
607
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
644
|
-
}, null)]), i(
|
|
608
|
+
}, null)]), i(g)]);
|
|
645
609
|
}
|
|
646
|
-
function
|
|
610
|
+
function f() {
|
|
647
611
|
d();
|
|
648
612
|
}
|
|
649
613
|
return {
|
|
650
|
-
renderToolbarDropdown:
|
|
651
|
-
clearAllDropDown:
|
|
614
|
+
renderToolbarDropdown: x,
|
|
615
|
+
clearAllDropDown: f
|
|
652
616
|
};
|
|
653
617
|
}
|
|
654
618
|
const {
|
|
655
|
-
buildResponseToolbarItems:
|
|
656
|
-
} =
|
|
619
|
+
buildResponseToolbarItems: ce
|
|
620
|
+
} = me(), X = /* @__PURE__ */ Y({
|
|
657
621
|
name: "FResponseToolbar",
|
|
658
|
-
props:
|
|
622
|
+
props: ne,
|
|
659
623
|
emits: ["click"],
|
|
660
624
|
setup(s, e) {
|
|
661
|
-
const n =
|
|
625
|
+
const n = M(ce(s.items)), i = M(), d = M(), m = M(), p = M(s.alignment), T = {
|
|
662
626
|
id: "__more_buttons__",
|
|
663
627
|
text: "更多"
|
|
664
|
-
},
|
|
628
|
+
}, x = M(new z(T)), f = we(), g = V(() => x.value.children.length > 0), l = V(() => J({
|
|
665
629
|
"f-toolbar": !0,
|
|
666
630
|
"f-response-toolbar": !0,
|
|
667
631
|
"position-relative": !0
|
|
@@ -669,88 +633,88 @@ const {
|
|
|
669
633
|
"w-100": !0,
|
|
670
634
|
"d-flex": !0,
|
|
671
635
|
"flex-nowrap": !0,
|
|
672
|
-
"justify-content-end":
|
|
673
|
-
"justify-content-start":
|
|
636
|
+
"justify-content-end": p.value === "right",
|
|
637
|
+
"justify-content-start": p.value === "left"
|
|
674
638
|
})), {
|
|
675
|
-
renderToolbarDropdown:
|
|
639
|
+
renderToolbarDropdown: u,
|
|
676
640
|
clearAllDropDown: b
|
|
677
|
-
} =
|
|
678
|
-
function
|
|
641
|
+
} = ct(s, f);
|
|
642
|
+
function I() {
|
|
679
643
|
n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
|
|
680
644
|
v.expanded = !1;
|
|
681
|
-
}),
|
|
645
|
+
}), x.value.expanded = !1, b();
|
|
682
646
|
}
|
|
683
|
-
function
|
|
684
|
-
const
|
|
647
|
+
function B(v) {
|
|
648
|
+
const E = {
|
|
685
649
|
btn: !0,
|
|
686
650
|
"f-rt-btn": !0,
|
|
687
|
-
"f-btn-ml":
|
|
688
|
-
"f-btn-mr":
|
|
651
|
+
"f-btn-ml": p.value === "right",
|
|
652
|
+
"f-btn-mr": p.value === "left",
|
|
689
653
|
"btn-icontext": !!(v.icon && v.icon.trim())
|
|
690
654
|
};
|
|
691
655
|
if (v.class) {
|
|
692
|
-
const
|
|
693
|
-
|
|
656
|
+
const P = v.class.split(" ");
|
|
657
|
+
P && P.length && P.reduce((h, o) => (h[o] = !0, h), E);
|
|
694
658
|
}
|
|
695
|
-
return
|
|
659
|
+
return E;
|
|
696
660
|
}
|
|
697
|
-
function
|
|
698
|
-
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);
|
|
699
663
|
}
|
|
700
664
|
function F(v) {
|
|
701
665
|
return y("button", {
|
|
702
666
|
type: "button",
|
|
703
|
-
class:
|
|
667
|
+
class: B(v),
|
|
704
668
|
id: v.id,
|
|
705
669
|
disabled: !v.enable,
|
|
706
|
-
onClick: (
|
|
707
|
-
}, [
|
|
708
|
-
class:
|
|
670
|
+
onClick: (E) => O(E, v)
|
|
671
|
+
}, [f.shouldShowIcon(v) && y("i", {
|
|
672
|
+
class: f.iconClass(v)
|
|
709
673
|
}, null), v.text]);
|
|
710
674
|
}
|
|
711
|
-
const
|
|
712
|
-
function
|
|
713
|
-
const
|
|
714
|
-
let
|
|
715
|
-
const
|
|
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;
|
|
716
680
|
if (o) {
|
|
717
|
-
const C = o.computedStyleMap().get("margin-left"),
|
|
718
|
-
|
|
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 -= $;
|
|
719
683
|
}
|
|
720
|
-
const t =
|
|
684
|
+
const t = h.filter((C) => C.id !== "__more_buttons__");
|
|
721
685
|
for (const C of t) {
|
|
722
|
-
const
|
|
723
|
-
|
|
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({
|
|
724
688
|
id: C.id,
|
|
725
|
-
width:
|
|
726
|
-
})) :
|
|
689
|
+
width: U
|
|
690
|
+
})) : P -= U;
|
|
727
691
|
}
|
|
728
|
-
if (
|
|
729
|
-
for (let C =
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
732
|
-
|
|
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();
|
|
733
697
|
else
|
|
734
698
|
break;
|
|
735
699
|
}
|
|
736
|
-
const r = Object.assign({},
|
|
700
|
+
const r = Object.assign({}, x.value);
|
|
737
701
|
r.children = [];
|
|
738
|
-
const
|
|
739
|
-
|
|
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;
|
|
740
704
|
}
|
|
741
|
-
const
|
|
705
|
+
const R = new ResizeObserver((v) => {
|
|
742
706
|
if (v.length) {
|
|
743
|
-
const
|
|
744
|
-
(
|
|
707
|
+
const P = v[0].contentRect.width, o = m.value.getBoundingClientRect().width;
|
|
708
|
+
(P < o || A.length) && (k(P), I());
|
|
745
709
|
}
|
|
746
710
|
});
|
|
747
|
-
return
|
|
711
|
+
return H(() => {
|
|
748
712
|
const v = d.value;
|
|
749
|
-
|
|
750
|
-
}),
|
|
751
|
-
|
|
752
|
-
}),
|
|
753
|
-
n.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);
|
|
754
718
|
}, {
|
|
755
719
|
deep: !0
|
|
756
720
|
}), e.expose({
|
|
@@ -762,37 +726,37 @@ const {
|
|
|
762
726
|
ref: d,
|
|
763
727
|
class: c.value
|
|
764
728
|
}, [y("div", {
|
|
765
|
-
ref:
|
|
729
|
+
ref: m,
|
|
766
730
|
class: "d-inline-block f-response-content",
|
|
767
731
|
style: "white-space: nowrap;"
|
|
768
|
-
}, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ?
|
|
732
|
+
}, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? u(v) : F(v)), g.value && u(x.value)])])]);
|
|
769
733
|
}
|
|
770
734
|
});
|
|
771
|
-
function
|
|
735
|
+
function lt(s, e) {
|
|
772
736
|
const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
|
|
773
737
|
});
|
|
774
738
|
function d() {
|
|
775
739
|
i && i();
|
|
776
740
|
}
|
|
777
|
-
function
|
|
741
|
+
function m(o) {
|
|
778
742
|
const t = {
|
|
779
743
|
"dropdown-menu": !0
|
|
780
744
|
};
|
|
781
745
|
if (o.class) {
|
|
782
746
|
const r = o.menuClass.split(" ");
|
|
783
|
-
r && r.length && r.reduce((
|
|
747
|
+
r && r.length && r.reduce((a, w) => (a[w] = !0, a), t);
|
|
784
748
|
}
|
|
785
749
|
return t;
|
|
786
750
|
}
|
|
787
|
-
function
|
|
751
|
+
function p(o) {
|
|
788
752
|
const t = {
|
|
789
753
|
disabled: !o.enable,
|
|
790
754
|
"dropdown-submenu": !0,
|
|
791
755
|
"f-rt-dropdown": !0
|
|
792
756
|
}, r = o.dropdownClass.split(" ");
|
|
793
|
-
return r && r.length && r.reduce((
|
|
757
|
+
return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
|
|
794
758
|
}
|
|
795
|
-
function
|
|
759
|
+
function T(o) {
|
|
796
760
|
const t = {
|
|
797
761
|
disabled: !o.enable,
|
|
798
762
|
"dropdown-item": !0,
|
|
@@ -800,16 +764,16 @@ function ft(s, e) {
|
|
|
800
764
|
"position-relative": !0,
|
|
801
765
|
"farris-component": !0
|
|
802
766
|
}, r = o.class.split(" ");
|
|
803
|
-
return r && r.length && r.reduce((
|
|
804
|
-
}
|
|
805
|
-
let
|
|
806
|
-
const
|
|
807
|
-
function
|
|
808
|
-
var
|
|
809
|
-
((
|
|
810
|
-
const
|
|
811
|
-
if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ?
|
|
812
|
-
const C =
|
|
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);
|
|
813
777
|
C && (C.expanded = !1);
|
|
814
778
|
}
|
|
815
779
|
}
|
|
@@ -821,7 +785,7 @@ function ft(s, e) {
|
|
|
821
785
|
const o = document.getElementsByClassName("dgComponentSelected");
|
|
822
786
|
Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
|
|
823
787
|
}
|
|
824
|
-
function
|
|
788
|
+
function u(o) {
|
|
825
789
|
o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
826
790
|
}
|
|
827
791
|
function b(o) {
|
|
@@ -832,96 +796,96 @@ function ft(s, e) {
|
|
|
832
796
|
t.forEach((C) => {
|
|
833
797
|
r = r.concat(C.children || []);
|
|
834
798
|
});
|
|
835
|
-
const
|
|
799
|
+
const a = r.findIndex((C) => C.id === o), w = a === -1 ? null : r[a];
|
|
836
800
|
return {
|
|
837
|
-
index:
|
|
838
|
-
item:
|
|
801
|
+
index: a,
|
|
802
|
+
item: w
|
|
839
803
|
};
|
|
840
804
|
}
|
|
841
|
-
function
|
|
805
|
+
function I(o) {
|
|
842
806
|
const {
|
|
843
807
|
buttons: t = []
|
|
844
|
-
} = n.schema, r = t.findIndex((
|
|
808
|
+
} = n.schema, r = t.findIndex((w) => w.id === o), a = r === -1 ? null : t[r];
|
|
845
809
|
return {
|
|
846
810
|
index: r,
|
|
847
|
-
item:
|
|
811
|
+
item: a
|
|
848
812
|
};
|
|
849
813
|
}
|
|
850
|
-
function
|
|
851
|
-
var
|
|
814
|
+
function B(o) {
|
|
815
|
+
var a;
|
|
852
816
|
n.schema;
|
|
853
817
|
const {
|
|
854
818
|
index: t,
|
|
855
819
|
item: r
|
|
856
820
|
} = b(o);
|
|
857
|
-
(
|
|
821
|
+
(a = n == null ? void 0 : n.setupContext) == null || a.emit("selectionChange", r == null ? void 0 : r.type, r);
|
|
858
822
|
}
|
|
859
|
-
const
|
|
823
|
+
const O = function(o) {
|
|
860
824
|
const {
|
|
861
825
|
componentType: t
|
|
862
|
-
} = o, r =
|
|
863
|
-
return r && !r.id && r.type === t && (r.id = `${
|
|
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;
|
|
864
828
|
}, F = function() {
|
|
865
829
|
const o = {
|
|
866
830
|
componentType: "response-toolbar-item",
|
|
867
831
|
parentComponentInstance: e.value,
|
|
868
832
|
targetPosition: -1
|
|
869
833
|
};
|
|
870
|
-
return
|
|
834
|
+
return O(o);
|
|
871
835
|
};
|
|
872
|
-
function
|
|
873
|
-
l(o), c(),
|
|
836
|
+
function j(o, t) {
|
|
837
|
+
l(o), c(), u(o), B(t.id);
|
|
874
838
|
}
|
|
875
|
-
function
|
|
839
|
+
function A(o, t, r) {
|
|
876
840
|
l(o);
|
|
877
|
-
const
|
|
841
|
+
const a = t.id, w = r && r.id, {
|
|
878
842
|
buttons: C = []
|
|
879
843
|
} = n.schema;
|
|
880
|
-
if (!
|
|
844
|
+
if (!w)
|
|
881
845
|
return;
|
|
882
846
|
const {
|
|
883
|
-
index:
|
|
884
|
-
} =
|
|
885
|
-
if (
|
|
847
|
+
index: S
|
|
848
|
+
} = I(w);
|
|
849
|
+
if (S === -1)
|
|
886
850
|
return;
|
|
887
851
|
const {
|
|
888
|
-
index:
|
|
889
|
-
} = b(
|
|
890
|
-
|
|
852
|
+
index: $
|
|
853
|
+
} = b(a);
|
|
854
|
+
$ !== -1 && (C[S].children.splice($, 1), d());
|
|
891
855
|
}
|
|
892
|
-
function
|
|
856
|
+
function k(o, t, r) {
|
|
893
857
|
l(o);
|
|
894
|
-
const
|
|
895
|
-
buttons:
|
|
858
|
+
const a = r && r.id, {
|
|
859
|
+
buttons: w = []
|
|
896
860
|
} = n.schema;
|
|
897
|
-
if (!
|
|
861
|
+
if (!a)
|
|
898
862
|
return;
|
|
899
863
|
const {
|
|
900
864
|
index: C
|
|
901
|
-
} =
|
|
865
|
+
} = I(a);
|
|
902
866
|
if (C === -1)
|
|
903
867
|
return;
|
|
904
|
-
const
|
|
868
|
+
const S = F(), $ = Object.assign({}, S, {
|
|
905
869
|
text: t.text
|
|
906
870
|
});
|
|
907
|
-
|
|
871
|
+
w[C].children.push($), d();
|
|
908
872
|
}
|
|
909
|
-
function
|
|
873
|
+
function R(o, t, r) {
|
|
910
874
|
l(o);
|
|
911
|
-
const
|
|
912
|
-
buttons:
|
|
875
|
+
const a = r && r.id, {
|
|
876
|
+
buttons: w = []
|
|
913
877
|
} = n.schema;
|
|
914
|
-
if (!
|
|
878
|
+
if (!a)
|
|
915
879
|
return;
|
|
916
880
|
const {
|
|
917
881
|
index: C
|
|
918
|
-
} =
|
|
882
|
+
} = I(a);
|
|
919
883
|
if (C === -1)
|
|
920
884
|
return;
|
|
921
|
-
const
|
|
885
|
+
const S = F(), $ = Object.assign({}, S, {
|
|
922
886
|
text: "按钮"
|
|
923
887
|
});
|
|
924
|
-
|
|
888
|
+
w[C].children.push($), d();
|
|
925
889
|
}
|
|
926
890
|
function v(o, t) {
|
|
927
891
|
return y("div", {
|
|
@@ -932,7 +896,7 @@ function ft(s, e) {
|
|
|
932
896
|
title: "删除",
|
|
933
897
|
ref: "removeButton",
|
|
934
898
|
style: "position:static;",
|
|
935
|
-
onClick: (r) =>
|
|
899
|
+
onClick: (r) => A(r, o, t)
|
|
936
900
|
}, [y("i", {
|
|
937
901
|
class: "f-icon f-icon-yxs_delete"
|
|
938
902
|
}, null)]), y("div", {
|
|
@@ -941,7 +905,7 @@ function ft(s, e) {
|
|
|
941
905
|
title: "复制",
|
|
942
906
|
ref: "copyButton",
|
|
943
907
|
style: "position:static;",
|
|
944
|
-
onClick: (r) =>
|
|
908
|
+
onClick: (r) => k(r, o, t)
|
|
945
909
|
}, [y("i", {
|
|
946
910
|
class: "f-icon f-icon-yxs_copy"
|
|
947
911
|
}, null)]), y("div", {
|
|
@@ -950,174 +914,174 @@ function ft(s, e) {
|
|
|
950
914
|
title: "新增同级",
|
|
951
915
|
ref: "appendSame",
|
|
952
916
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
953
|
-
onClick: (r) =>
|
|
917
|
+
onClick: (r) => R(r, o, t)
|
|
954
918
|
}, [y("i", {
|
|
955
919
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
956
920
|
}, null), y("span", {
|
|
957
921
|
style: "font-size:13px;margin:auto"
|
|
958
|
-
}, [
|
|
922
|
+
}, [ue("新增同级")])])])]);
|
|
959
923
|
}
|
|
960
|
-
function
|
|
924
|
+
function E(o) {
|
|
961
925
|
return o.children.map((t) => t.children && t.children.length ? y("li", {
|
|
962
|
-
class:
|
|
926
|
+
class: p(t),
|
|
963
927
|
id: t.id,
|
|
964
|
-
onClick: (r) => t.enable &&
|
|
928
|
+
onClick: (r) => t.enable && g(r, t, o)
|
|
965
929
|
}, [y("span", {
|
|
966
930
|
id: t.id,
|
|
967
|
-
class:
|
|
968
|
-
onMouseover: (r) => t.enable &&
|
|
931
|
+
class: T(t),
|
|
932
|
+
onMouseover: (r) => t.enable && g(r, t, o)
|
|
969
933
|
}, [t.text, y("i", {
|
|
970
934
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
971
935
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
972
|
-
}, null)]),
|
|
973
|
-
class:
|
|
936
|
+
}, null)]), x(t, t)]) : y("li", {
|
|
937
|
+
class: T(t),
|
|
974
938
|
id: t.id,
|
|
975
|
-
onClick: (r) =>
|
|
939
|
+
onClick: (r) => j(r, t)
|
|
976
940
|
}, [v(t, o), s.shouldShowIcon(t) && y("i", {
|
|
977
941
|
class: s.iconClass(t)
|
|
978
942
|
}, null), t.text]));
|
|
979
943
|
}
|
|
980
|
-
function
|
|
981
|
-
const
|
|
944
|
+
function P(o, t, r) {
|
|
945
|
+
const a = {
|
|
982
946
|
display: o.expanded ? "block" : "none",
|
|
983
947
|
position: "fixed",
|
|
984
948
|
maxWidth: "300px",
|
|
985
949
|
width: "auto",
|
|
986
950
|
minWidth: "120px"
|
|
987
|
-
},
|
|
988
|
-
if (C &&
|
|
951
|
+
}, w = document.getElementsByTagName("body")[0].getClientRects()[0].width, C = t, S = C == null ? void 0 : C.getClientRects();
|
|
952
|
+
if (C && S && S.length) {
|
|
989
953
|
const {
|
|
990
|
-
top:
|
|
991
|
-
width:
|
|
992
|
-
left:
|
|
993
|
-
right:
|
|
994
|
-
height:
|
|
995
|
-
} =
|
|
996
|
-
|
|
997
|
-
const
|
|
998
|
-
if (
|
|
999
|
-
|
|
1000
|
-
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();
|
|
1001
965
|
if (r) {
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
|
|
966
|
+
a.top = `${$ - 6}px`;
|
|
967
|
+
const Te = Math.ceil(U + W);
|
|
968
|
+
a.left = `${Te}px`;
|
|
1005
969
|
}
|
|
1006
|
-
|
|
970
|
+
w - W - U < re.width && (a.left = `${(r ? W : _) - re.width}px`);
|
|
1007
971
|
}
|
|
1008
972
|
}
|
|
1009
|
-
return
|
|
973
|
+
return a;
|
|
1010
974
|
}
|
|
1011
|
-
|
|
1012
|
-
var C,
|
|
1013
|
-
const r =
|
|
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);
|
|
1014
978
|
return y("ul", {
|
|
1015
|
-
class:
|
|
1016
|
-
style:
|
|
979
|
+
class: m(o),
|
|
980
|
+
style: P(o, w, t),
|
|
1017
981
|
id: o.id + "_menu"
|
|
1018
|
-
}, [
|
|
982
|
+
}, [E(o)]);
|
|
1019
983
|
};
|
|
1020
|
-
function
|
|
1021
|
-
|
|
984
|
+
function h() {
|
|
985
|
+
f.forEach((o) => {
|
|
1022
986
|
o.expanded = !1;
|
|
1023
|
-
}),
|
|
987
|
+
}), f.clear();
|
|
1024
988
|
}
|
|
1025
989
|
return {
|
|
1026
|
-
renderDropdownMenu:
|
|
1027
|
-
clearAllDropDownMenu:
|
|
990
|
+
renderDropdownMenu: x,
|
|
991
|
+
clearAllDropDownMenu: h
|
|
1028
992
|
};
|
|
1029
993
|
}
|
|
1030
|
-
function
|
|
1031
|
-
const i =
|
|
994
|
+
function at(s, e, n) {
|
|
995
|
+
const i = M(s.alignment), {
|
|
1032
996
|
renderDropdownMenu: d,
|
|
1033
|
-
clearAllDropDownMenu:
|
|
1034
|
-
} =
|
|
997
|
+
clearAllDropDownMenu: m
|
|
998
|
+
} = lt(e, n), p = L("design-item-context"), T = L("toolbar-item-handler", () => {
|
|
1035
999
|
});
|
|
1036
|
-
function
|
|
1037
|
-
|
|
1000
|
+
function x() {
|
|
1001
|
+
T && T();
|
|
1038
1002
|
}
|
|
1039
|
-
function
|
|
1003
|
+
function f(h) {
|
|
1040
1004
|
const o = {
|
|
1041
1005
|
"btn-group": !0,
|
|
1042
1006
|
"f-rt-dropdown": !0,
|
|
1043
1007
|
"f-btn-ml": i.value === "right",
|
|
1044
1008
|
"f-btn-mr": i.value === "left"
|
|
1045
|
-
}, t =
|
|
1046
|
-
return t && t.length && t.reduce((r,
|
|
1009
|
+
}, t = h.dropdownClass.split(" ");
|
|
1010
|
+
return t && t.length && t.reduce((r, a) => (r[a] = !0, r), o), o;
|
|
1047
1011
|
}
|
|
1048
|
-
function
|
|
1012
|
+
function g(h) {
|
|
1049
1013
|
const o = {
|
|
1050
1014
|
btn: !0,
|
|
1051
|
-
disabled: !
|
|
1015
|
+
disabled: !h.enable,
|
|
1052
1016
|
"position-relative": !0,
|
|
1053
1017
|
"farris-component": !0,
|
|
1054
1018
|
"f-rt-btn": !0,
|
|
1055
|
-
"btn-icontext": !!(
|
|
1019
|
+
"btn-icontext": !!(h.icon && h.icon.trim())
|
|
1056
1020
|
};
|
|
1057
|
-
if (
|
|
1058
|
-
const t =
|
|
1059
|
-
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);
|
|
1060
1024
|
}
|
|
1061
1025
|
return o;
|
|
1062
1026
|
}
|
|
1063
|
-
function l(
|
|
1064
|
-
|
|
1027
|
+
function l(h) {
|
|
1028
|
+
h && (h.stopPropagation(), h.preventDefault());
|
|
1065
1029
|
}
|
|
1066
|
-
function c(
|
|
1067
|
-
l(
|
|
1030
|
+
function c(h, o) {
|
|
1031
|
+
l(h);
|
|
1068
1032
|
const t = o.expanded;
|
|
1069
1033
|
document.body.click(), o.expanded = !t;
|
|
1070
1034
|
}
|
|
1071
|
-
const
|
|
1035
|
+
const u = function(h) {
|
|
1072
1036
|
const {
|
|
1073
1037
|
componentType: o
|
|
1074
|
-
} =
|
|
1038
|
+
} = h, t = Z(o, h), r = o.toLowerCase().replace("-", "_");
|
|
1075
1039
|
return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
|
|
1076
1040
|
}, b = function() {
|
|
1077
|
-
const
|
|
1041
|
+
const h = {
|
|
1078
1042
|
componentType: "response-toolbar-item",
|
|
1079
1043
|
parentComponentInstance: n.value,
|
|
1080
1044
|
targetPosition: -1
|
|
1081
1045
|
};
|
|
1082
|
-
return
|
|
1046
|
+
return u(h);
|
|
1083
1047
|
};
|
|
1084
|
-
function
|
|
1085
|
-
const o =
|
|
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];
|
|
1086
1050
|
return {
|
|
1087
1051
|
index: t,
|
|
1088
1052
|
toolbarItem: r
|
|
1089
1053
|
};
|
|
1090
1054
|
}
|
|
1091
|
-
function
|
|
1092
|
-
var
|
|
1055
|
+
function B(h, o) {
|
|
1056
|
+
var S;
|
|
1093
1057
|
const {
|
|
1094
1058
|
index: t,
|
|
1095
1059
|
toolbarItem: r
|
|
1096
|
-
} =
|
|
1060
|
+
} = I(o);
|
|
1097
1061
|
if (t === -1)
|
|
1098
1062
|
return;
|
|
1099
|
-
const
|
|
1100
|
-
text:
|
|
1063
|
+
const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
|
|
1064
|
+
text: a
|
|
1101
1065
|
});
|
|
1102
|
-
(
|
|
1066
|
+
(S = p.schema.buttons) == null || S.push(C), x();
|
|
1103
1067
|
}
|
|
1104
|
-
function
|
|
1068
|
+
function O(h, o) {
|
|
1105
1069
|
const {
|
|
1106
1070
|
index: t,
|
|
1107
1071
|
toolbarItem: r
|
|
1108
|
-
} =
|
|
1072
|
+
} = I(o);
|
|
1109
1073
|
if (t === -1)
|
|
1110
1074
|
return;
|
|
1111
|
-
const
|
|
1112
|
-
text:
|
|
1113
|
-
}),
|
|
1114
|
-
|
|
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();
|
|
1115
1079
|
}
|
|
1116
|
-
function F(
|
|
1117
|
-
const t =
|
|
1118
|
-
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());
|
|
1119
1083
|
}
|
|
1120
|
-
function
|
|
1084
|
+
function j(h) {
|
|
1121
1085
|
return y("div", {
|
|
1122
1086
|
class: "component-btn-group"
|
|
1123
1087
|
}, [y("div", null, [y("div", {
|
|
@@ -1126,7 +1090,7 @@ function gt(s, e, n) {
|
|
|
1126
1090
|
title: "删除",
|
|
1127
1091
|
ref: "removeButton",
|
|
1128
1092
|
style: "position:static;",
|
|
1129
|
-
onClick: (o) => F(o,
|
|
1093
|
+
onClick: (o) => F(o, h)
|
|
1130
1094
|
}, [y("i", {
|
|
1131
1095
|
class: "f-icon f-icon-yxs_delete"
|
|
1132
1096
|
}, null)]), y("div", {
|
|
@@ -1135,7 +1099,7 @@ function gt(s, e, n) {
|
|
|
1135
1099
|
title: "复制",
|
|
1136
1100
|
ref: "copyButton",
|
|
1137
1101
|
style: "position:static;",
|
|
1138
|
-
onClick: (o) =>
|
|
1102
|
+
onClick: (o) => B(o, h)
|
|
1139
1103
|
}, [y("i", {
|
|
1140
1104
|
class: "f-icon f-icon-yxs_copy"
|
|
1141
1105
|
}, null)]), y("div", {
|
|
@@ -1144,56 +1108,56 @@ function gt(s, e, n) {
|
|
|
1144
1108
|
title: "新增子级",
|
|
1145
1109
|
ref: "appendChildButton",
|
|
1146
1110
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1147
|
-
onClick: (o) =>
|
|
1111
|
+
onClick: (o) => O(o, h)
|
|
1148
1112
|
}, [y("i", {
|
|
1149
1113
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1150
1114
|
}, null), y("span", {
|
|
1151
1115
|
style: "font-size:13px;margin:auto"
|
|
1152
|
-
}, [
|
|
1116
|
+
}, [ue("新增子级")])])])]);
|
|
1153
1117
|
}
|
|
1154
|
-
function
|
|
1118
|
+
function A() {
|
|
1155
1119
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1156
|
-
const
|
|
1157
|
-
Array.from(
|
|
1120
|
+
const h = document.getElementsByClassName("dgComponentSelected");
|
|
1121
|
+
Array.from(h).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1158
1122
|
}
|
|
1159
|
-
function
|
|
1160
|
-
|
|
1123
|
+
function k(h) {
|
|
1124
|
+
h.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1161
1125
|
}
|
|
1162
|
-
function
|
|
1163
|
-
var
|
|
1164
|
-
const o =
|
|
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);
|
|
1165
1129
|
if (t === -1)
|
|
1166
1130
|
return;
|
|
1167
1131
|
const r = o[t];
|
|
1168
|
-
(
|
|
1132
|
+
(a = p == null ? void 0 : p.setupContext) == null || a.emit("selectionChange", "response-toolbar-item", r);
|
|
1169
1133
|
}
|
|
1170
|
-
function v(
|
|
1171
|
-
l(
|
|
1134
|
+
function v(h, o) {
|
|
1135
|
+
l(h), A(), k(h), l(h), c(h, o), R(o.id);
|
|
1172
1136
|
}
|
|
1173
|
-
function
|
|
1137
|
+
function E(h) {
|
|
1174
1138
|
return y("div", {
|
|
1175
|
-
id:
|
|
1176
|
-
class:
|
|
1139
|
+
id: h.id,
|
|
1140
|
+
class: f(h)
|
|
1177
1141
|
}, [y("div", {
|
|
1178
|
-
class:
|
|
1142
|
+
class: g(h),
|
|
1179
1143
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1180
|
-
onClick: (o) =>
|
|
1181
|
-
}, [
|
|
1182
|
-
class: e.iconClass(
|
|
1183
|
-
}, null), y("span", 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", {
|
|
1184
1148
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1185
1149
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1186
|
-
}, null)]), d(
|
|
1150
|
+
}, null)]), d(h)]);
|
|
1187
1151
|
}
|
|
1188
|
-
function
|
|
1189
|
-
|
|
1152
|
+
function P() {
|
|
1153
|
+
m();
|
|
1190
1154
|
}
|
|
1191
1155
|
return {
|
|
1192
|
-
renderToolbarDropdown:
|
|
1193
|
-
clearAllDropDown:
|
|
1156
|
+
renderToolbarDropdown: E,
|
|
1157
|
+
clearAllDropDown: P
|
|
1194
1158
|
};
|
|
1195
1159
|
}
|
|
1196
|
-
class
|
|
1160
|
+
class se {
|
|
1197
1161
|
constructor(e, n) {
|
|
1198
1162
|
D(this, "componentId");
|
|
1199
1163
|
D(this, "viewModelId");
|
|
@@ -1218,13 +1182,14 @@ class re {
|
|
|
1218
1182
|
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1219
1183
|
}
|
|
1220
1184
|
setDesignViewModelField(e) {
|
|
1185
|
+
var i;
|
|
1221
1186
|
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1222
1187
|
if (n) {
|
|
1223
1188
|
if (!this.designViewModelField) {
|
|
1224
|
-
const
|
|
1225
|
-
this.designViewModelField =
|
|
1189
|
+
const d = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1190
|
+
this.designViewModelField = d.fields.find((m) => m.id === n);
|
|
1226
1191
|
}
|
|
1227
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
1192
|
+
e.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
1228
1193
|
}
|
|
1229
1194
|
}
|
|
1230
1195
|
changeFieldEditorType(e, n) {
|
|
@@ -1248,7 +1213,7 @@ class re {
|
|
|
1248
1213
|
type: "combo-list",
|
|
1249
1214
|
textField: "name",
|
|
1250
1215
|
valueField: "value",
|
|
1251
|
-
data: [{ value: e.type, name:
|
|
1216
|
+
data: [{ value: e.type, name: te[e.type].name }]
|
|
1252
1217
|
}
|
|
1253
1218
|
}
|
|
1254
1219
|
}
|
|
@@ -1284,16 +1249,30 @@ class re {
|
|
|
1284
1249
|
const i = n && n.parent && n.parent.schema;
|
|
1285
1250
|
if (!i)
|
|
1286
1251
|
return;
|
|
1287
|
-
const d = i.contents.findIndex((
|
|
1288
|
-
i.contents.splice(d, 1), i.contents.splice(d, 0,
|
|
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);
|
|
1289
1254
|
}
|
|
1290
1255
|
}
|
|
1291
|
-
class
|
|
1256
|
+
class dt extends se {
|
|
1292
1257
|
constructor(e, n) {
|
|
1293
1258
|
super(e, n);
|
|
1294
1259
|
}
|
|
1295
1260
|
getPropertyConfig(e) {
|
|
1296
|
-
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
|
+
};
|
|
1297
1276
|
}
|
|
1298
1277
|
getBasicPropConfig(e) {
|
|
1299
1278
|
this.propertyConfig.categories.basic = {
|
|
@@ -1314,7 +1293,7 @@ class mt extends re {
|
|
|
1314
1293
|
type: "combo-list",
|
|
1315
1294
|
textField: "value",
|
|
1316
1295
|
valueField: "key",
|
|
1317
|
-
data: [{ key: "response-toolbar", value:
|
|
1296
|
+
data: [{ key: "response-toolbar", value: te["response-toolbar"].name }]
|
|
1318
1297
|
}
|
|
1319
1298
|
}
|
|
1320
1299
|
}
|
|
@@ -1345,7 +1324,7 @@ class mt extends re {
|
|
|
1345
1324
|
]
|
|
1346
1325
|
}
|
|
1347
1326
|
},
|
|
1348
|
-
|
|
1327
|
+
items: {
|
|
1349
1328
|
title: "按钮",
|
|
1350
1329
|
description: "The items of Response Toolbar.",
|
|
1351
1330
|
type: "array",
|
|
@@ -1357,40 +1336,40 @@ class mt extends re {
|
|
|
1357
1336
|
};
|
|
1358
1337
|
}
|
|
1359
1338
|
}
|
|
1360
|
-
function
|
|
1339
|
+
function ut(s, e) {
|
|
1361
1340
|
const n = s.schema;
|
|
1362
|
-
function i(
|
|
1341
|
+
function i(g) {
|
|
1363
1342
|
return !1;
|
|
1364
1343
|
}
|
|
1365
|
-
function d(
|
|
1366
|
-
return l.text =
|
|
1344
|
+
function d(g, l) {
|
|
1345
|
+
return l.text = g.label, l;
|
|
1367
1346
|
}
|
|
1368
|
-
function
|
|
1347
|
+
function m() {
|
|
1369
1348
|
return !1;
|
|
1370
1349
|
}
|
|
1371
|
-
function
|
|
1350
|
+
function p() {
|
|
1372
1351
|
return !1;
|
|
1373
1352
|
}
|
|
1374
|
-
function
|
|
1353
|
+
function T() {
|
|
1375
1354
|
return !0;
|
|
1376
1355
|
}
|
|
1377
|
-
function
|
|
1356
|
+
function x() {
|
|
1378
1357
|
return !0;
|
|
1379
1358
|
}
|
|
1380
|
-
function g
|
|
1381
|
-
return new
|
|
1359
|
+
function f(g) {
|
|
1360
|
+
return new dt(g, e).getPropertyConfig(n);
|
|
1382
1361
|
}
|
|
1383
1362
|
return {
|
|
1384
1363
|
canAccepts: i,
|
|
1385
|
-
checkCanAddComponent:
|
|
1386
|
-
checkCanDeleteComponent:
|
|
1387
|
-
checkCanMoveComponent:
|
|
1388
|
-
hideNestedPaddingInDesginerView:
|
|
1364
|
+
checkCanAddComponent: T,
|
|
1365
|
+
checkCanDeleteComponent: p,
|
|
1366
|
+
checkCanMoveComponent: m,
|
|
1367
|
+
hideNestedPaddingInDesginerView: x,
|
|
1389
1368
|
onResolveNewComponentSchema: d,
|
|
1390
|
-
getPropsConfig:
|
|
1369
|
+
getPropsConfig: f
|
|
1391
1370
|
};
|
|
1392
1371
|
}
|
|
1393
|
-
const
|
|
1372
|
+
const pt = {
|
|
1394
1373
|
id: { type: String, default: "" },
|
|
1395
1374
|
componentId: { type: String, default: "" },
|
|
1396
1375
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -1403,12 +1382,12 @@ const bt = {
|
|
|
1403
1382
|
* 组件值
|
|
1404
1383
|
*/
|
|
1405
1384
|
modelValue: { type: Object }
|
|
1406
|
-
},
|
|
1407
|
-
function
|
|
1408
|
-
const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top,
|
|
1409
|
-
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;
|
|
1410
1389
|
}
|
|
1411
|
-
function
|
|
1390
|
+
function gt(s) {
|
|
1412
1391
|
if (!s)
|
|
1413
1392
|
return;
|
|
1414
1393
|
let e;
|
|
@@ -1419,167 +1398,167 @@ function vt(s) {
|
|
|
1419
1398
|
return;
|
|
1420
1399
|
const i = e.querySelector(".component-btn-group");
|
|
1421
1400
|
if (i) {
|
|
1422
|
-
if (!
|
|
1401
|
+
if (!ft(e, s)) {
|
|
1423
1402
|
i.style.display = "none";
|
|
1424
1403
|
return;
|
|
1425
1404
|
}
|
|
1426
1405
|
i.style.display = "";
|
|
1427
|
-
const
|
|
1428
|
-
if (
|
|
1429
|
-
const
|
|
1430
|
-
|
|
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";
|
|
1431
1410
|
}
|
|
1432
1411
|
}
|
|
1433
1412
|
}
|
|
1434
|
-
function
|
|
1435
|
-
var
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
const d = "", h = S();
|
|
1439
|
-
function f() {
|
|
1413
|
+
function mt(s, e, n) {
|
|
1414
|
+
var A;
|
|
1415
|
+
const i = "", d = M();
|
|
1416
|
+
function m() {
|
|
1440
1417
|
return !0;
|
|
1441
1418
|
}
|
|
1442
|
-
function
|
|
1419
|
+
function p() {
|
|
1443
1420
|
return !1;
|
|
1444
1421
|
}
|
|
1445
|
-
function
|
|
1422
|
+
function T() {
|
|
1446
1423
|
return !0;
|
|
1447
1424
|
}
|
|
1448
|
-
function
|
|
1425
|
+
function x() {
|
|
1449
1426
|
return !0;
|
|
1450
1427
|
}
|
|
1451
|
-
function
|
|
1428
|
+
function f() {
|
|
1452
1429
|
return !0;
|
|
1453
1430
|
}
|
|
1454
|
-
function
|
|
1455
|
-
if (!
|
|
1431
|
+
function g(k) {
|
|
1432
|
+
if (!k || !k.value)
|
|
1456
1433
|
return null;
|
|
1457
|
-
const
|
|
1434
|
+
const R = M(k == null ? void 0 : k.value.parent), v = g(R);
|
|
1458
1435
|
return v || null;
|
|
1459
1436
|
}
|
|
1460
|
-
function
|
|
1461
|
-
const { componentInstance:
|
|
1462
|
-
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);
|
|
1463
1440
|
}
|
|
1464
|
-
function
|
|
1441
|
+
function c(k) {
|
|
1465
1442
|
return !!n;
|
|
1466
1443
|
}
|
|
1467
|
-
function
|
|
1444
|
+
function u() {
|
|
1468
1445
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
1469
1446
|
}
|
|
1470
|
-
function
|
|
1447
|
+
function b() {
|
|
1471
1448
|
}
|
|
1472
|
-
function
|
|
1449
|
+
function I(k, R) {
|
|
1473
1450
|
}
|
|
1474
|
-
function
|
|
1475
|
-
const { componentType:
|
|
1476
|
-
let
|
|
1477
|
-
const P =
|
|
1478
|
-
return
|
|
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;
|
|
1479
1456
|
}
|
|
1480
|
-
function
|
|
1457
|
+
function O(k) {
|
|
1481
1458
|
}
|
|
1482
|
-
function
|
|
1459
|
+
function F(...k) {
|
|
1483
1460
|
return [];
|
|
1484
1461
|
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1462
|
+
function j() {
|
|
1463
|
+
}
|
|
1464
|
+
return d.value = {
|
|
1465
|
+
canMove: m(),
|
|
1466
|
+
canSelectParent: p(),
|
|
1467
|
+
canAdd: x(),
|
|
1468
|
+
canDelete: T(),
|
|
1469
|
+
canNested: !f(),
|
|
1491
1470
|
contents: [],
|
|
1492
1471
|
elementRef: s,
|
|
1493
|
-
parent: (
|
|
1472
|
+
parent: (A = e.parent) == null ? void 0 : A.componentInstance,
|
|
1494
1473
|
schema: e.schema,
|
|
1495
|
-
styles:
|
|
1496
|
-
canAccepts:
|
|
1497
|
-
getBelongedComponentInstance:
|
|
1498
|
-
getDraggableDesignItemElement:
|
|
1499
|
-
getDraggingDisplayText:
|
|
1500
|
-
getPropConfig:
|
|
1501
|
-
getDragScopeElement:
|
|
1502
|
-
onAcceptMovedChildElement:
|
|
1503
|
-
onChildElementMovedOut:
|
|
1504
|
-
addNewChildComponentSchema:
|
|
1505
|
-
|
|
1506
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1507
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1508
|
-
},
|
|
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;
|
|
1509
1488
|
}
|
|
1510
|
-
const
|
|
1489
|
+
const ht = /* @__PURE__ */ Y({
|
|
1511
1490
|
name: "FDesignerInnerItem",
|
|
1512
|
-
props:
|
|
1491
|
+
props: pt,
|
|
1513
1492
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
1514
1493
|
setup(s, e) {
|
|
1515
|
-
const n =
|
|
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 = {
|
|
1516
1495
|
designerItemElementRef: l,
|
|
1517
|
-
componentInstance:
|
|
1518
|
-
schema:
|
|
1496
|
+
componentInstance: u,
|
|
1497
|
+
schema: f.value,
|
|
1519
1498
|
parent: b,
|
|
1520
1499
|
setupContext: e
|
|
1521
1500
|
};
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1501
|
+
De("design-item-context", I);
|
|
1502
|
+
const B = V(() => ({
|
|
1524
1503
|
"farris-component": !0,
|
|
1525
1504
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
1526
|
-
"flex-fill": s.id
|
|
1505
|
+
"flex-fill": s.id === "root-component",
|
|
1527
1506
|
"position-relative": n.value || d.value,
|
|
1528
|
-
"farris-nested":
|
|
1507
|
+
"farris-nested": m.value,
|
|
1529
1508
|
"can-move": n.value,
|
|
1530
1509
|
"d-none": l.value && l.value.classList.contains("d-none")
|
|
1531
|
-
})),
|
|
1510
|
+
})), O = V(() => {
|
|
1532
1511
|
const t = {};
|
|
1533
|
-
return
|
|
1534
|
-
const [
|
|
1535
|
-
return
|
|
1512
|
+
return g.value && g.value.split(";").reduce((r, a) => {
|
|
1513
|
+
const [w, C] = a.split(":");
|
|
1514
|
+
return w && (r[w] = C), r;
|
|
1536
1515
|
}, t), t;
|
|
1537
1516
|
});
|
|
1538
1517
|
function F(t, r) {
|
|
1539
|
-
if (b && b.schema[
|
|
1540
|
-
const
|
|
1541
|
-
if (
|
|
1542
|
-
const
|
|
1543
|
-
b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[
|
|
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");
|
|
1544
1523
|
}
|
|
1545
1524
|
}
|
|
1546
1525
|
}
|
|
1547
|
-
function
|
|
1548
|
-
if (
|
|
1526
|
+
function j(t) {
|
|
1527
|
+
if (u.value.addNewChildComponentSchema) {
|
|
1549
1528
|
const r = {
|
|
1550
|
-
componentType:
|
|
1551
|
-
label:
|
|
1552
|
-
parentComponentInstance:
|
|
1529
|
+
componentType: T.value,
|
|
1530
|
+
label: x.value,
|
|
1531
|
+
parentComponentInstance: u.value,
|
|
1553
1532
|
targetPosition: -1
|
|
1554
|
-
},
|
|
1555
|
-
|
|
1533
|
+
}, a = u.value.addNewChildComponentSchema(r);
|
|
1534
|
+
f.value[p.value].push(a), e.emit("addComponent");
|
|
1556
1535
|
}
|
|
1557
1536
|
}
|
|
1558
|
-
function
|
|
1537
|
+
function A() {
|
|
1559
1538
|
return i.value && y("div", {
|
|
1560
1539
|
role: "button",
|
|
1561
1540
|
class: "btn component-settings-button",
|
|
1562
1541
|
title: "新增",
|
|
1563
1542
|
ref: "removeComponent",
|
|
1564
1543
|
onClick: (t) => {
|
|
1565
|
-
|
|
1544
|
+
j();
|
|
1566
1545
|
}
|
|
1567
1546
|
}, [y("i", {
|
|
1568
1547
|
class: "f-icon f-icon-plus-circle"
|
|
1569
1548
|
}, null)]);
|
|
1570
1549
|
}
|
|
1571
|
-
function
|
|
1550
|
+
function k(t) {
|
|
1572
1551
|
return d.value && y("div", {
|
|
1573
1552
|
role: "button",
|
|
1574
1553
|
class: "btn component-settings-button",
|
|
1575
1554
|
title: "删除",
|
|
1576
1555
|
ref: "removeComponent",
|
|
1577
|
-
onClick:
|
|
1556
|
+
onClick: Ee((r) => F(r, t), ["stop"])
|
|
1578
1557
|
}, [y("i", {
|
|
1579
1558
|
class: "f-icon f-icon-yxs_delete"
|
|
1580
1559
|
}, null)]);
|
|
1581
1560
|
}
|
|
1582
|
-
function
|
|
1561
|
+
function R() {
|
|
1583
1562
|
return n.value && y("div", {
|
|
1584
1563
|
role: "button",
|
|
1585
1564
|
class: "btn component-settings-button",
|
|
@@ -1594,55 +1573,54 @@ const wt = /* @__PURE__ */ Q({
|
|
|
1594
1573
|
return y("div", {
|
|
1595
1574
|
class: "component-btn-group",
|
|
1596
1575
|
"data-noattach": "true"
|
|
1597
|
-
}, [y("div", null, [
|
|
1576
|
+
}, [y("div", null, [A(), R(), k(t)])]);
|
|
1598
1577
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1578
|
+
Q(() => s.modelValue, (t) => {
|
|
1579
|
+
f.value = t, I.schema = t;
|
|
1601
1580
|
});
|
|
1602
|
-
function
|
|
1581
|
+
function E(t) {
|
|
1603
1582
|
const r = t.target;
|
|
1604
|
-
|
|
1583
|
+
gt(r);
|
|
1605
1584
|
}
|
|
1606
|
-
function
|
|
1585
|
+
function P() {
|
|
1607
1586
|
var t, r;
|
|
1608
|
-
(r = (t =
|
|
1587
|
+
(r = (t = f.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", E);
|
|
1609
1588
|
}
|
|
1610
|
-
function
|
|
1611
|
-
const t = l.value, r =
|
|
1612
|
-
return
|
|
1589
|
+
function h() {
|
|
1590
|
+
const t = l.value, r = M(t.children[1]);
|
|
1591
|
+
return mt(r, I).value;
|
|
1613
1592
|
}
|
|
1614
|
-
|
|
1593
|
+
H(() => {
|
|
1615
1594
|
if (l.value) {
|
|
1616
|
-
const t = l.value.querySelector(`[data-dragref='${
|
|
1617
|
-
|
|
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);
|
|
1618
1597
|
}
|
|
1619
|
-
|
|
1620
|
-
}),
|
|
1621
|
-
l.value && l.value.removeEventListener("scroll",
|
|
1598
|
+
P(), le.value++;
|
|
1599
|
+
}), Me(() => {
|
|
1600
|
+
l.value && l.value.removeEventListener("scroll", E);
|
|
1622
1601
|
});
|
|
1623
1602
|
function o(t) {
|
|
1624
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
const C = p.value.getDraggableDesignItemElement(M);
|
|
1631
|
-
C && C.value && C.value.classList.add("dgComponentSelected");
|
|
1632
|
-
}
|
|
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"));
|
|
1633
1609
|
}
|
|
1634
|
-
|
|
1610
|
+
E({
|
|
1611
|
+
target: r == null ? void 0 : r.value
|
|
1612
|
+
});
|
|
1635
1613
|
}
|
|
1636
1614
|
return () => y("div", {
|
|
1637
1615
|
id: `${s.id}-design-item`,
|
|
1638
1616
|
ref: l,
|
|
1639
|
-
class:
|
|
1640
|
-
style:
|
|
1617
|
+
class: B.value,
|
|
1618
|
+
style: O.value,
|
|
1641
1619
|
onClick: o
|
|
1642
|
-
}, [v(
|
|
1620
|
+
}, [v(f.value), e.slots.default && e.slots.default()]);
|
|
1643
1621
|
}
|
|
1644
1622
|
});
|
|
1645
|
-
class
|
|
1623
|
+
class bt extends se {
|
|
1646
1624
|
constructor(e, n) {
|
|
1647
1625
|
super(e, n);
|
|
1648
1626
|
}
|
|
@@ -1703,10 +1681,8 @@ class xt extends re {
|
|
|
1703
1681
|
label: "onClick",
|
|
1704
1682
|
name: "点击事件"
|
|
1705
1683
|
}
|
|
1706
|
-
];
|
|
1707
|
-
|
|
1708
|
-
const d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
|
|
1709
|
-
h[i.viewModelId] = {
|
|
1684
|
+
], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
|
|
1685
|
+
m[i.viewModelId] = {
|
|
1710
1686
|
type: "events-editor",
|
|
1711
1687
|
editor: {
|
|
1712
1688
|
initialData: d
|
|
@@ -1714,19 +1690,19 @@ class xt extends re {
|
|
|
1714
1690
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
1715
1691
|
title: "事件",
|
|
1716
1692
|
hideTitle: !0,
|
|
1717
|
-
properties:
|
|
1693
|
+
properties: m,
|
|
1718
1694
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1719
1695
|
refreshPanelAfterChanged: !0,
|
|
1720
1696
|
tabId: "commands",
|
|
1721
1697
|
tabName: "交互",
|
|
1722
|
-
setPropertyRelates(
|
|
1723
|
-
const
|
|
1724
|
-
delete e[i.viewModelId],
|
|
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));
|
|
1725
1701
|
}
|
|
1726
1702
|
};
|
|
1727
1703
|
}
|
|
1728
1704
|
}
|
|
1729
|
-
class
|
|
1705
|
+
class yt extends se {
|
|
1730
1706
|
constructor(e, n) {
|
|
1731
1707
|
super(e, n);
|
|
1732
1708
|
}
|
|
@@ -1752,7 +1728,7 @@ class Tt extends re {
|
|
|
1752
1728
|
type: "combo-list",
|
|
1753
1729
|
textField: "value",
|
|
1754
1730
|
valueField: "key",
|
|
1755
|
-
data: [{ key: "response-toolbar-item", value:
|
|
1731
|
+
data: [{ key: "response-toolbar-item", value: te["response-toolbar-item"].name }]
|
|
1756
1732
|
}
|
|
1757
1733
|
},
|
|
1758
1734
|
text: {
|
|
@@ -1775,7 +1751,7 @@ class Tt extends re {
|
|
|
1775
1751
|
description: "Behavior",
|
|
1776
1752
|
properties: {
|
|
1777
1753
|
disabled: {
|
|
1778
|
-
title: "
|
|
1754
|
+
title: "禁用",
|
|
1779
1755
|
type: "boolean",
|
|
1780
1756
|
description: "按钮禁用状态",
|
|
1781
1757
|
refreshPanelAfterChanged: !0
|
|
@@ -1789,7 +1765,7 @@ class Tt extends re {
|
|
|
1789
1765
|
description: "Appearance",
|
|
1790
1766
|
properties: {
|
|
1791
1767
|
class: {
|
|
1792
|
-
title: "class",
|
|
1768
|
+
title: "class样式",
|
|
1793
1769
|
type: "string",
|
|
1794
1770
|
description: "",
|
|
1795
1771
|
$converter: "/converter/appearance.converter"
|
|
@@ -1803,8 +1779,8 @@ class Tt extends re {
|
|
|
1803
1779
|
label: "onClick",
|
|
1804
1780
|
name: "点击事件"
|
|
1805
1781
|
}
|
|
1806
|
-
], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n),
|
|
1807
|
-
|
|
1782
|
+
], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
|
|
1783
|
+
m[i.viewModelId] = {
|
|
1808
1784
|
type: "events-editor",
|
|
1809
1785
|
editor: {
|
|
1810
1786
|
initialData: d
|
|
@@ -1812,20 +1788,20 @@ class Tt extends re {
|
|
|
1812
1788
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
1813
1789
|
title: "事件",
|
|
1814
1790
|
hideTitle: !0,
|
|
1815
|
-
properties:
|
|
1791
|
+
properties: m,
|
|
1816
1792
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1817
1793
|
refreshPanelAfterChanged: !0,
|
|
1818
1794
|
tabId: "commands",
|
|
1819
1795
|
tabName: "交互",
|
|
1820
|
-
setPropertyRelates(
|
|
1821
|
-
const
|
|
1822
|
-
delete e[i.viewModelId],
|
|
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));
|
|
1823
1799
|
}
|
|
1824
1800
|
};
|
|
1825
1801
|
}
|
|
1826
1802
|
}
|
|
1827
|
-
function
|
|
1828
|
-
function n(
|
|
1803
|
+
function vt(s, e) {
|
|
1804
|
+
function n(T) {
|
|
1829
1805
|
return !1;
|
|
1830
1806
|
}
|
|
1831
1807
|
function i() {
|
|
@@ -1834,55 +1810,55 @@ function It(s, e) {
|
|
|
1834
1810
|
function d() {
|
|
1835
1811
|
return !0;
|
|
1836
1812
|
}
|
|
1837
|
-
function
|
|
1813
|
+
function m() {
|
|
1838
1814
|
return !1;
|
|
1839
1815
|
}
|
|
1840
|
-
function
|
|
1841
|
-
let
|
|
1816
|
+
function p(T) {
|
|
1817
|
+
let x;
|
|
1842
1818
|
switch (s.schema.type) {
|
|
1843
1819
|
case "tab-toolbar-item":
|
|
1844
|
-
|
|
1820
|
+
x = new bt(T, e);
|
|
1845
1821
|
break;
|
|
1846
1822
|
default:
|
|
1847
|
-
|
|
1823
|
+
x = new yt(T, e);
|
|
1848
1824
|
}
|
|
1849
|
-
return
|
|
1825
|
+
return x.getPropertyConfig(s.schema);
|
|
1850
1826
|
}
|
|
1851
1827
|
return {
|
|
1852
1828
|
canAccepts: n,
|
|
1853
1829
|
checkCanMoveComponent: i,
|
|
1854
1830
|
checkCanDeleteComponent: d,
|
|
1855
|
-
checkCanAddComponent:
|
|
1856
|
-
getPropsConfig:
|
|
1831
|
+
checkCanAddComponent: m,
|
|
1832
|
+
getPropsConfig: p
|
|
1857
1833
|
};
|
|
1858
1834
|
}
|
|
1859
|
-
const
|
|
1835
|
+
const xe = /* @__PURE__ */ Y({
|
|
1860
1836
|
name: "FResponseToolbarItemDesign",
|
|
1861
|
-
props:
|
|
1837
|
+
props: Ce,
|
|
1862
1838
|
emits: ["Click"],
|
|
1863
1839
|
setup(s, e) {
|
|
1864
|
-
|
|
1865
|
-
const n =
|
|
1840
|
+
M(), M();
|
|
1841
|
+
const n = M(s.alignment), i = {
|
|
1866
1842
|
id: "__more_buttons__",
|
|
1867
1843
|
text: "More"
|
|
1868
|
-
}, d =
|
|
1844
|
+
}, d = M(new z(i));
|
|
1869
1845
|
V(() => d.value.children.length > 0);
|
|
1870
|
-
const
|
|
1846
|
+
const m = M(), p = L("designer-host-service"), T = L("design-item-context"), x = vt(T, p), f = fe(m, T, x);
|
|
1871
1847
|
L("toolbar-item-handler", () => {
|
|
1872
|
-
}),
|
|
1873
|
-
|
|
1874
|
-
}), e.expose(
|
|
1875
|
-
function
|
|
1876
|
-
const
|
|
1848
|
+
}), H(() => {
|
|
1849
|
+
m.value.componentInstance = f;
|
|
1850
|
+
}), e.expose(f.value);
|
|
1851
|
+
function g() {
|
|
1852
|
+
const u = {
|
|
1877
1853
|
"f-icon": !0
|
|
1878
1854
|
}, b = s.icon ? s.icon.trim() : "";
|
|
1879
|
-
return
|
|
1855
|
+
return J(u, b);
|
|
1880
1856
|
}
|
|
1881
1857
|
function l() {
|
|
1882
1858
|
return !!(s.icon && s.icon.trim());
|
|
1883
1859
|
}
|
|
1884
1860
|
function c() {
|
|
1885
|
-
const
|
|
1861
|
+
const u = {
|
|
1886
1862
|
btn: !0,
|
|
1887
1863
|
"f-rt-btn": !0,
|
|
1888
1864
|
"f-btn-ml": n.value === "right",
|
|
@@ -1890,11 +1866,11 @@ const Te = /* @__PURE__ */ Q({
|
|
|
1890
1866
|
"btn-icontext": !!(s.icon && s.icon.trim()),
|
|
1891
1867
|
disabled: s.disabled === !0
|
|
1892
1868
|
};
|
|
1893
|
-
return
|
|
1869
|
+
return J(u, s.class);
|
|
1894
1870
|
}
|
|
1895
1871
|
return () => y("div", {
|
|
1896
|
-
ref:
|
|
1897
|
-
"data-dragref": `${
|
|
1872
|
+
ref: m,
|
|
1873
|
+
"data-dragref": `${T.schema.id}-container`,
|
|
1898
1874
|
class: "farris-component position-relative",
|
|
1899
1875
|
style: "display:inline-block!important;"
|
|
1900
1876
|
}, [y("button", {
|
|
@@ -1902,152 +1878,155 @@ const Te = /* @__PURE__ */ Q({
|
|
|
1902
1878
|
class: c(),
|
|
1903
1879
|
id: s.id
|
|
1904
1880
|
}, [l() && y("i", {
|
|
1905
|
-
class:
|
|
1881
|
+
class: g()
|
|
1906
1882
|
}, null), s.text])]);
|
|
1907
1883
|
}
|
|
1908
|
-
}),
|
|
1884
|
+
}), Ct = /* @__PURE__ */ Y({
|
|
1909
1885
|
name: "FResponseToolbarDesign",
|
|
1910
|
-
props:
|
|
1886
|
+
props: st,
|
|
1911
1887
|
emits: ["Click"],
|
|
1912
1888
|
setup(s, e) {
|
|
1913
|
-
const n =
|
|
1914
|
-
let i = new Array(n.value.length).fill(
|
|
1915
|
-
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 = {
|
|
1916
1892
|
id: "__more_buttons__",
|
|
1917
1893
|
text: "More"
|
|
1918
|
-
},
|
|
1919
|
-
V(() =>
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
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;
|
|
1924
1900
|
}), e.expose(b.value);
|
|
1925
|
-
|
|
1901
|
+
function B() {
|
|
1902
|
+
I && I();
|
|
1903
|
+
}
|
|
1904
|
+
const O = V(() => J({
|
|
1926
1905
|
"f-toolbar": !0,
|
|
1927
1906
|
"f-response-toolbar": !0,
|
|
1928
1907
|
"position-relative": !0
|
|
1929
|
-
}, s.customClass)),
|
|
1908
|
+
}, s.customClass)), F = V(() => ({
|
|
1930
1909
|
"d-flex": !0,
|
|
1931
1910
|
"flex-nowrap": !0,
|
|
1932
|
-
"justify-content-end":
|
|
1933
|
-
"justify-content-start":
|
|
1911
|
+
"justify-content-end": p.value === "right",
|
|
1912
|
+
"justify-content-start": p.value === "left"
|
|
1934
1913
|
})), {
|
|
1935
1914
|
renderToolbarDropdown: j,
|
|
1936
|
-
clearAllDropDown:
|
|
1937
|
-
} =
|
|
1938
|
-
function
|
|
1939
|
-
n.value.filter((
|
|
1940
|
-
|
|
1941
|
-
}),
|
|
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();
|
|
1942
1921
|
}
|
|
1943
|
-
const R = /* @__PURE__ */ new Map(),
|
|
1944
|
-
function
|
|
1945
|
-
const
|
|
1946
|
-
let
|
|
1947
|
-
const
|
|
1948
|
-
if (
|
|
1949
|
-
const
|
|
1950
|
-
|
|
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;
|
|
1951
1930
|
}
|
|
1952
|
-
const
|
|
1953
|
-
for (const
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
id:
|
|
1957
|
-
width:
|
|
1958
|
-
})) :
|
|
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({
|
|
1935
|
+
id: _.id,
|
|
1936
|
+
width: G
|
|
1937
|
+
})) : a -= G;
|
|
1959
1938
|
}
|
|
1960
|
-
if (
|
|
1961
|
-
for (let
|
|
1962
|
-
const
|
|
1963
|
-
if (
|
|
1964
|
-
|
|
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();
|
|
1965
1944
|
else
|
|
1966
1945
|
break;
|
|
1967
1946
|
}
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1970
|
-
const
|
|
1971
|
-
|
|
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;
|
|
1972
1951
|
}
|
|
1973
|
-
const
|
|
1974
|
-
if (
|
|
1975
|
-
const
|
|
1976
|
-
(
|
|
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);
|
|
1977
1956
|
}
|
|
1978
1957
|
});
|
|
1979
|
-
|
|
1980
|
-
const
|
|
1981
|
-
|
|
1982
|
-
}),
|
|
1983
|
-
|
|
1984
|
-
}),
|
|
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, () => {
|
|
1985
1964
|
n.value = s.items;
|
|
1986
1965
|
}, {
|
|
1987
1966
|
deep: !0
|
|
1988
|
-
}),
|
|
1989
|
-
i = new Array(n.value.length).fill(
|
|
1967
|
+
}), Q(n, (t) => {
|
|
1968
|
+
i = new Array(n.value.length).fill(M());
|
|
1990
1969
|
});
|
|
1991
|
-
function
|
|
1992
|
-
c && c.setupContext && c.setupContext.emit("selectionChange",
|
|
1970
|
+
function h(t, r, a, w) {
|
|
1971
|
+
c && c.setupContext && c.setupContext.emit("selectionChange", t, r, a, w);
|
|
1993
1972
|
}
|
|
1994
|
-
function
|
|
1995
|
-
const
|
|
1996
|
-
|
|
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();
|
|
1997
1976
|
}
|
|
1998
1977
|
return () => y("div", {
|
|
1999
|
-
ref:
|
|
1978
|
+
ref: g,
|
|
2000
1979
|
"data-dragref": `${c.schema.id}-container`,
|
|
2001
|
-
class:
|
|
1980
|
+
class: O.value
|
|
2002
1981
|
}, [y("div", {
|
|
2003
1982
|
ref: d,
|
|
2004
|
-
class:
|
|
1983
|
+
class: F.value
|
|
2005
1984
|
}, [y("div", {
|
|
2006
|
-
ref:
|
|
1985
|
+
ref: m,
|
|
2007
1986
|
class: "d-inline-block f-response-content",
|
|
2008
1987
|
style: "white-space: nowrap;"
|
|
2009
|
-
}, [n.value.map((
|
|
2010
|
-
ref: i[
|
|
1988
|
+
}, [n.value.map((t, r) => y(ht, {
|
|
1989
|
+
ref: i[r],
|
|
2011
1990
|
class: "p-0 display-inline-block",
|
|
2012
|
-
modelValue:
|
|
2013
|
-
"onUpdate:modelValue": (
|
|
1991
|
+
modelValue: t,
|
|
1992
|
+
"onUpdate:modelValue": (a) => t = a,
|
|
2014
1993
|
canMove: !0,
|
|
2015
1994
|
childType: "response-toolbar-item",
|
|
2016
1995
|
childLabel: "按钮",
|
|
2017
1996
|
contentKey: "buttons",
|
|
2018
1997
|
componentId: s.componentId,
|
|
2019
|
-
id:
|
|
1998
|
+
id: t.id,
|
|
2020
1999
|
style: "padding:0 !important;display:inline-block",
|
|
2021
|
-
onSelectionChange:
|
|
2022
|
-
onRemoveComponent:
|
|
2000
|
+
onSelectionChange: h,
|
|
2001
|
+
onRemoveComponent: o
|
|
2023
2002
|
}, {
|
|
2024
2003
|
default: () => {
|
|
2025
|
-
var
|
|
2026
|
-
return [y(
|
|
2027
|
-
id:
|
|
2028
|
-
disabled:
|
|
2029
|
-
text:
|
|
2030
|
-
icon:
|
|
2031
|
-
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",
|
|
2032
2011
|
alignment: s.alignment || "right",
|
|
2033
2012
|
componentId: s.componentId
|
|
2034
2013
|
}, null)];
|
|
2035
2014
|
}
|
|
2036
2015
|
}))])])]);
|
|
2037
2016
|
}
|
|
2038
|
-
}),
|
|
2039
|
-
|
|
2040
|
-
s["response-toolbar"] =
|
|
2017
|
+
}), Mt = oe;
|
|
2018
|
+
X.register = (s, e, n) => {
|
|
2019
|
+
s["response-toolbar"] = X, e["response-toolbar"] = oe;
|
|
2041
2020
|
};
|
|
2042
|
-
|
|
2043
|
-
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;
|
|
2044
2023
|
};
|
|
2045
|
-
const
|
|
2024
|
+
const Et = Re(X);
|
|
2046
2025
|
export {
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2026
|
+
X as FResponseToolbar,
|
|
2027
|
+
z as ResponseToolbarDropDownItem,
|
|
2028
|
+
Dt as ResponseToolbarGroup,
|
|
2029
|
+
ke as ResponseToolbarItem,
|
|
2030
|
+
Et as default,
|
|
2031
|
+
Mt as responseToolbarResolver
|
|
2053
2032
|
};
|