@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1
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/avatar/index.esm.js +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
var Bt = Object.defineProperty;
|
|
2
|
-
var jt = (e,
|
|
3
|
-
var J = (e,
|
|
4
|
-
import { getCustomClass as
|
|
5
|
-
import { resolveAppearance as Lt, createPropsResolver as lt, createResponseToolbarEventHandlerResolver as
|
|
2
|
+
var jt = (e, v, t) => v in e ? Bt(e, v, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[v] = t;
|
|
3
|
+
var J = (e, v, t) => jt(e, typeof v != "symbol" ? v + "" : v, t);
|
|
4
|
+
import { getCustomClass as ne, isMobilePhone as At, useGuid as _t, withInstall as $t } from "../../components/common/index.esm.js";
|
|
5
|
+
import { resolveAppearance as Lt, createPropsResolver as lt, createResponseToolbarEventHandlerResolver as Ft, getSchemaByType as at } from "../../components/dynamic-resolver/index.esm.js";
|
|
6
6
|
import { responseToolbarProps as ct } from "../../components/response-toolbar/index.esm.js";
|
|
7
|
-
import { computed as fe, createVNode as L, Teleport as
|
|
7
|
+
import { computed as fe, createVNode as L, Teleport as Nt, getCurrentInstance as Wt, reactive as Pe, withDirectives as Ee, resolveDirective as Me, ref as re, defineComponent as ze, watch as Ie, onMounted as Ge, onUnmounted as ut, nextTick as Te, inject as Ce, provide as qt, createTextVNode as zt } from "vue";
|
|
8
8
|
import { LocaleService as Gt } from "../../components/locale/index.esm.js";
|
|
9
|
-
import { canvasChanged as
|
|
9
|
+
import { canvasChanged as Ne, useDesignerInnerComponent as Ut, FDesignerInnerItem as Yt, useDesignerComponent as Xt, setPositionForSelectedElement as Ht } from "../../components/designer-canvas/index.esm.js";
|
|
10
10
|
import { BaseControlProperty as dt } from "../../components/property-panel/index.esm.js";
|
|
11
|
-
import { isPlainObject as nt, cloneDeep as
|
|
11
|
+
import { isPlainObject as nt, cloneDeep as xe } from "lodash-es";
|
|
12
12
|
import { TabToolbarItemProperty as Vt } from "../../components/tabs/index.esm.js";
|
|
13
13
|
const Qt = /* @__PURE__ */ new Map([
|
|
14
14
|
["buttons", "items"],
|
|
15
15
|
["appearance", Lt]
|
|
16
16
|
]);
|
|
17
|
-
function ft(e,
|
|
18
|
-
return
|
|
17
|
+
function ft(e, v, t) {
|
|
18
|
+
return v;
|
|
19
19
|
}
|
|
20
20
|
const Zt = "https://json-schema.org/draft/2020-12/schema", Jt = "https://farris-design.gitee.io/response-toolbar.schema.json", Kt = "response-toolbar", en = "A Farris Toolbar Component", tn = "object", nn = {
|
|
21
21
|
id: {
|
|
@@ -133,8 +133,7 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Jt = "https://farris-
|
|
|
133
133
|
},
|
|
134
134
|
dropdownClass: {
|
|
135
135
|
description: "处于下拉菜单时的样式",
|
|
136
|
-
type: "string"
|
|
137
|
-
default: ""
|
|
136
|
+
type: "string"
|
|
138
137
|
},
|
|
139
138
|
split: {
|
|
140
139
|
description: "",
|
|
@@ -179,7 +178,8 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Jt = "https://farris-
|
|
|
179
178
|
// 是否下拉
|
|
180
179
|
isDP: { type: Boolean, default: !1 },
|
|
181
180
|
// 是否下拉项
|
|
182
|
-
isDPItem: { type: Boolean, default: !1 }
|
|
181
|
+
isDPItem: { type: Boolean, default: !1 },
|
|
182
|
+
dropdownClass: { Type: String, default: "" }
|
|
183
183
|
}, pt = Object.assign({}, vn, {
|
|
184
184
|
item: { type: Object, default: {} },
|
|
185
185
|
items: { type: Object, default: {} },
|
|
@@ -190,7 +190,7 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Jt = "https://farris-
|
|
|
190
190
|
gn,
|
|
191
191
|
void 0,
|
|
192
192
|
ft
|
|
193
|
-
), yn =
|
|
193
|
+
), yn = Ft(), wn = {
|
|
194
194
|
id: { type: String, default: "" },
|
|
195
195
|
/** 组件自定义样式 */
|
|
196
196
|
customClass: { type: String, default: "" },
|
|
@@ -205,7 +205,7 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Jt = "https://farris-
|
|
|
205
205
|
buttonSize: { type: String, default: "" }
|
|
206
206
|
};
|
|
207
207
|
class ht {
|
|
208
|
-
constructor(
|
|
208
|
+
constructor(v) {
|
|
209
209
|
/** 工具栏项标识 */
|
|
210
210
|
J(this, "id", "");
|
|
211
211
|
/** 工具栏项自定义样式 */
|
|
@@ -237,7 +237,7 @@ class ht {
|
|
|
237
237
|
});
|
|
238
238
|
J(this, "options");
|
|
239
239
|
var h, c;
|
|
240
|
-
this.options =
|
|
240
|
+
this.options = v;
|
|
241
241
|
const t = [
|
|
242
242
|
"id",
|
|
243
243
|
"class",
|
|
@@ -255,37 +255,37 @@ class ht {
|
|
|
255
255
|
"dropdownClass",
|
|
256
256
|
"onClick"
|
|
257
257
|
];
|
|
258
|
-
Object.keys(
|
|
259
|
-
r === "visible" ? this[r] =
|
|
260
|
-
}), this.shown = this.visible, (h =
|
|
258
|
+
Object.keys(v).filter((r) => t.indexOf(r) > -1).forEach((r) => {
|
|
259
|
+
r === "visible" ? this[r] = v[r] === void 0 ? !0 : v[r] : this[r] = v[r];
|
|
260
|
+
}), this.shown = this.visible, (h = v.appearance) != null && h.class && (this.class = (c = v.appearance) == null ? void 0 : c.class), this.class || (this.class = "btn-secondary");
|
|
261
261
|
}
|
|
262
262
|
/** 是否可用 */
|
|
263
263
|
get enable() {
|
|
264
264
|
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : fe(() => !0);
|
|
265
265
|
}
|
|
266
266
|
/** 设置宽度 */
|
|
267
|
-
setWidth(
|
|
268
|
-
this.width = parseInt(
|
|
267
|
+
setWidth(v) {
|
|
268
|
+
this.width = parseInt(v, 10);
|
|
269
269
|
}
|
|
270
270
|
/** 获取宽度 */
|
|
271
271
|
getWidth() {
|
|
272
272
|
return this.visible ? this.width : !1;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
class
|
|
276
|
-
constructor(
|
|
277
|
-
super(
|
|
275
|
+
class Cn extends ht {
|
|
276
|
+
constructor(v) {
|
|
277
|
+
super(v);
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
function gt() {
|
|
281
|
-
function e(
|
|
281
|
+
function e(v) {
|
|
282
282
|
const t = [];
|
|
283
|
-
return
|
|
283
|
+
return v.reduce((h, c) => (c.children && c.children.length > 0 ? h.push(new ke(c)) : h.push(new Cn(c)), h), t), t;
|
|
284
284
|
}
|
|
285
285
|
return { buildResponseToolbarItems: e };
|
|
286
286
|
}
|
|
287
|
-
const { buildResponseToolbarItems:
|
|
288
|
-
class
|
|
287
|
+
const { buildResponseToolbarItems: xn } = gt();
|
|
288
|
+
class ke extends ht {
|
|
289
289
|
constructor(t) {
|
|
290
290
|
super(t);
|
|
291
291
|
J(this, "placement", "");
|
|
@@ -304,7 +304,7 @@ class Ie extends ht {
|
|
|
304
304
|
const h = ["visible", "icon", "isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
305
305
|
Object.keys(t).filter((c) => h.indexOf(c) > -1).forEach((c) => {
|
|
306
306
|
c === "visible" ? this[c] = t[c] === void 0 ? !0 : t[c] : this[c] = t[c];
|
|
307
|
-
}), this.shown = this.visible, t.children && t.children.length && (this.children =
|
|
307
|
+
}), this.shown = this.visible, t.children && t.children.length && (this.children = xn(t.children));
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function Ye() {
|
|
@@ -318,14 +318,14 @@ function Ye() {
|
|
|
318
318
|
}
|
|
319
319
|
return h;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function v(t) {
|
|
322
322
|
return !!(t.icon && t.icon.trim());
|
|
323
323
|
}
|
|
324
|
-
return { iconClass: e, shouldShowIcon:
|
|
324
|
+
return { iconClass: e, shouldShowIcon: v };
|
|
325
325
|
}
|
|
326
|
-
function Tn(e,
|
|
326
|
+
function Tn(e, v) {
|
|
327
327
|
function t(p) {
|
|
328
|
-
return
|
|
328
|
+
return ne({
|
|
329
329
|
"dropdown-menu": !0
|
|
330
330
|
}, p.menuClass);
|
|
331
331
|
}
|
|
@@ -336,7 +336,7 @@ function Tn(e, m) {
|
|
|
336
336
|
"f-rt-dropdown": !0,
|
|
337
337
|
"text-truncate": !0
|
|
338
338
|
};
|
|
339
|
-
return
|
|
339
|
+
return ne(o, p.dropdownClass);
|
|
340
340
|
}
|
|
341
341
|
function c(p) {
|
|
342
342
|
const o = {
|
|
@@ -345,7 +345,7 @@ function Tn(e, m) {
|
|
|
345
345
|
"f-rt-btn": !0,
|
|
346
346
|
"text-truncate": !0
|
|
347
347
|
};
|
|
348
|
-
return
|
|
348
|
+
return ne(o, p.dropdownClass);
|
|
349
349
|
}
|
|
350
350
|
function r(p) {
|
|
351
351
|
const o = {
|
|
@@ -358,7 +358,7 @@ function Tn(e, m) {
|
|
|
358
358
|
"dropdown-toggle": !p.split,
|
|
359
359
|
"btn-secondary": !0
|
|
360
360
|
};
|
|
361
|
-
return
|
|
361
|
+
return ne(o, p.dropdownClass);
|
|
362
362
|
}
|
|
363
363
|
function T(p) {
|
|
364
364
|
const o = {
|
|
@@ -367,126 +367,126 @@ function Tn(e, m) {
|
|
|
367
367
|
"btn-icontext": !!(p.icon && p.icon.trim()),
|
|
368
368
|
"d-block": !0
|
|
369
369
|
};
|
|
370
|
-
return
|
|
370
|
+
return ne(o, p.dropdownClass);
|
|
371
371
|
}
|
|
372
|
-
let
|
|
372
|
+
let C;
|
|
373
373
|
const g = /* @__PURE__ */ new Map();
|
|
374
374
|
let E = "";
|
|
375
375
|
function P(p) {
|
|
376
376
|
E = "#" + p;
|
|
377
377
|
}
|
|
378
|
-
function u(p, o,
|
|
378
|
+
function u(p, o, N) {
|
|
379
379
|
p.stopPropagation();
|
|
380
|
-
const
|
|
380
|
+
const k = N ? N.id : "__top_item__";
|
|
381
381
|
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded)) {
|
|
382
|
-
if (g.has(
|
|
383
|
-
const f = g.get(
|
|
384
|
-
f && (f.expanded = !1, g.delete(
|
|
382
|
+
if (g.has(k) && g.get(k) !== o) {
|
|
383
|
+
const f = g.get(k);
|
|
384
|
+
f && (f.expanded = !1, g.delete(k));
|
|
385
385
|
}
|
|
386
|
-
g.set(
|
|
386
|
+
g.set(k, o);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
function l(p, o) {
|
|
390
390
|
document.body.click(), o.enable && (p.stopPropagation(), typeof o.onClick == "function" && o.onClick(p, o.id), e.emit("click", p, o.id));
|
|
391
391
|
}
|
|
392
392
|
function d(p, o) {
|
|
393
|
-
const
|
|
394
|
-
|
|
393
|
+
const N = p.target;
|
|
394
|
+
N.className.indexOf("dropdown-item") < 0 || (N.title = N.scrollWidth > N.clientWidth ? o : "");
|
|
395
395
|
}
|
|
396
|
-
function i(p, o,
|
|
396
|
+
function i(p, o, N) {
|
|
397
397
|
if (o.tipsEnable && o.tipsText) {
|
|
398
|
-
const
|
|
398
|
+
const k = Pe({
|
|
399
399
|
content: o.tipsText,
|
|
400
400
|
enable: o.tipsEnable
|
|
401
401
|
});
|
|
402
402
|
return Ee(L("li", {
|
|
403
403
|
class: c(o),
|
|
404
404
|
id: o.id,
|
|
405
|
-
key: o.id + "_" +
|
|
405
|
+
key: o.id + "_" + N,
|
|
406
406
|
onClick: (f) => l(f, o)
|
|
407
407
|
}, [L("span", {
|
|
408
408
|
class: T(o)
|
|
409
|
-
}, [
|
|
410
|
-
class:
|
|
411
|
-
}, null), o.text])]), [[Me("tooltip"),
|
|
409
|
+
}, [v.shouldShowIcon(o) && L("i", {
|
|
410
|
+
class: v.iconClass(o)
|
|
411
|
+
}, null), o.text])]), [[Me("tooltip"), k]]);
|
|
412
412
|
}
|
|
413
413
|
return L("li", {
|
|
414
414
|
class: c(o),
|
|
415
415
|
id: o.id,
|
|
416
|
-
onClick: (
|
|
416
|
+
onClick: (k) => l(k, o)
|
|
417
417
|
}, [L("span", {
|
|
418
418
|
class: T(o),
|
|
419
|
-
onMouseenter: (
|
|
420
|
-
}, [
|
|
421
|
-
class:
|
|
419
|
+
onMouseenter: (k) => d(k, o.text)
|
|
420
|
+
}, [v.shouldShowIcon(o) && L("i", {
|
|
421
|
+
class: v.iconClass(o)
|
|
422
422
|
}, null), o.text])]);
|
|
423
423
|
}
|
|
424
|
-
function n(p, o,
|
|
425
|
-
o.enable && (typeof o.onClick == "function" &&
|
|
424
|
+
function n(p, o, N) {
|
|
425
|
+
o.enable && (typeof o.onClick == "function" && N.onClick(p, o.id), e.emit("click", p, o.id), N.split || u(p, o, N));
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
p && p.stopPropagation(), u(p, o,
|
|
427
|
+
function D(p, o, N) {
|
|
428
|
+
p && p.stopPropagation(), u(p, o, N);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function O(p, o) {
|
|
431
431
|
p.stopPropagation();
|
|
432
|
-
const
|
|
433
|
-
if (o.children && o.children.length && o.expanded && g.has(
|
|
434
|
-
const
|
|
435
|
-
|
|
432
|
+
const N = o.id;
|
|
433
|
+
if (o.children && o.children.length && o.expanded && g.has(N)) {
|
|
434
|
+
const k = g.get(N);
|
|
435
|
+
k && (k.expanded = !1, g.delete(N));
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
function G(p, o,
|
|
438
|
+
function G(p, o, N) {
|
|
439
439
|
if (o.tipsEnable && o.tipsText) {
|
|
440
|
-
const
|
|
440
|
+
const k = Pe({
|
|
441
441
|
content: o.tipsText,
|
|
442
442
|
enable: o.tipsEnable
|
|
443
443
|
});
|
|
444
444
|
return L("li", {
|
|
445
445
|
class: h(o),
|
|
446
446
|
id: o.id,
|
|
447
|
-
key: o.id + "_" +
|
|
447
|
+
key: o.id + "_" + N,
|
|
448
448
|
onClick: (f) => n(f, o, p)
|
|
449
449
|
}, [Ee(L("span", {
|
|
450
450
|
class: r(o)
|
|
451
|
-
}, [
|
|
452
|
-
class:
|
|
453
|
-
}, null), o.text]), [[Me("tooltip"),
|
|
451
|
+
}, [v.shouldShowIcon(o) && L("i", {
|
|
452
|
+
class: v.iconClass(o)
|
|
453
|
+
}, null), o.text]), [[Me("tooltip"), k]]), o.split && L("span", {
|
|
454
454
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
455
|
-
onClick: (f) =>
|
|
456
|
-
}, null),
|
|
455
|
+
onClick: (f) => D(f, o, p)
|
|
456
|
+
}, null), C(o, o)]);
|
|
457
457
|
}
|
|
458
458
|
return L("li", {
|
|
459
459
|
class: h(o),
|
|
460
460
|
id: o.id,
|
|
461
|
-
onClick: (
|
|
462
|
-
onMouseenter: (
|
|
461
|
+
onClick: (k) => n(k, o, p),
|
|
462
|
+
onMouseenter: (k) => d(k, o.text)
|
|
463
463
|
}, [L("span", {
|
|
464
464
|
class: r(o)
|
|
465
|
-
}, [
|
|
466
|
-
class:
|
|
465
|
+
}, [v.shouldShowIcon(o) && L("i", {
|
|
466
|
+
class: v.iconClass(o)
|
|
467
467
|
}, null), o.text]), o.split && L("span", {
|
|
468
468
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
469
|
-
onClick: (
|
|
470
|
-
}, null),
|
|
469
|
+
onClick: (k) => D(k, o, p)
|
|
470
|
+
}, null), C(o, o)]);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
return p.children.filter((o) => o.visible).map((o,
|
|
472
|
+
function B(p) {
|
|
473
|
+
return p.children.filter((o) => o.visible).map((o, N) => o.children && o.children.length ? G(p, o, N) : i(p, o, N));
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function S(p, o) {
|
|
476
476
|
if (!p)
|
|
477
477
|
return 1080;
|
|
478
|
-
let
|
|
479
|
-
const
|
|
480
|
-
for (let f = 0; f <
|
|
478
|
+
let N = -1;
|
|
479
|
+
const k = p.children.length;
|
|
480
|
+
for (let f = 0; f < k; f++)
|
|
481
481
|
if (p.children[f].id === o) {
|
|
482
|
-
|
|
482
|
+
N = f;
|
|
483
483
|
break;
|
|
484
484
|
}
|
|
485
|
-
return 1080 +
|
|
485
|
+
return 1080 + k - N;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function w(p, o, N) {
|
|
488
488
|
var W, Y;
|
|
489
|
-
const
|
|
489
|
+
const k = {
|
|
490
490
|
display: p.expanded ? "block" : "none",
|
|
491
491
|
position: "fixed",
|
|
492
492
|
maxWidth: "300px",
|
|
@@ -497,79 +497,79 @@ function Tn(e, m) {
|
|
|
497
497
|
maxHeight: "none"
|
|
498
498
|
}, f = document.querySelector(E);
|
|
499
499
|
if (!f)
|
|
500
|
-
return
|
|
501
|
-
const
|
|
502
|
-
let s = (Y = (W =
|
|
500
|
+
return k;
|
|
501
|
+
const m = Wt();
|
|
502
|
+
let s = (Y = (W = m == null ? void 0 : m.exposed) == null ? void 0 : W.elementRef.value) == null ? void 0 : Y.querySelector("#" + o);
|
|
503
503
|
if (s || (s = f == null ? void 0 : f.querySelector("#" + o)), !s)
|
|
504
|
-
return
|
|
505
|
-
const
|
|
504
|
+
return k;
|
|
505
|
+
const b = window.innerWidth, I = window.innerHeight, M = s == null ? void 0 : s.getClientRects();
|
|
506
506
|
if (s && M && M.length) {
|
|
507
507
|
const {
|
|
508
508
|
top: X,
|
|
509
|
-
width:
|
|
510
|
-
left:
|
|
509
|
+
width: _,
|
|
510
|
+
left: F,
|
|
511
511
|
right: V,
|
|
512
512
|
height: U
|
|
513
513
|
} = M[0], H = Math.ceil(U + X);
|
|
514
|
-
|
|
514
|
+
k.top = `${H}px`, k.left = `${F}px`;
|
|
515
515
|
const q = p.id + "_menu", te = (s == null ? void 0 : s.querySelector("#" + q)) || (f == null ? void 0 : f.querySelector("#" + q)) || null;
|
|
516
516
|
if (te) {
|
|
517
517
|
te.style.visibility = "hidden", te.style.display = "block";
|
|
518
518
|
const ae = te.offsetHeight;
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
if (
|
|
522
|
-
|
|
523
|
-
const
|
|
524
|
-
|
|
519
|
+
k.zIndex = p.expanded ? S(f, q) : 1080, k.display === "block" && (te.style.display = "block");
|
|
520
|
+
const y = te.getBoundingClientRect();
|
|
521
|
+
if (N) {
|
|
522
|
+
k.top = `${X - 6}px`;
|
|
523
|
+
const x = Math.ceil(_ + F);
|
|
524
|
+
k.left = `${x}px`;
|
|
525
525
|
}
|
|
526
|
-
|
|
526
|
+
b - F - _ < y.width && (k.left = `${(N ? F : V) - y.width}px`), I - X - U < ae ? X > ae ? (k.top = `${X - ae - 6}px`, k.maxHeight = `${X - 16}px`) : (k.maxHeight = `${I - H}px`, X > I - X - U && (k.top = "10px", k.maxHeight = `${X - 16}px`)) : k.maxHeight = `${I - H}px`, te.style.visibility = "visible";
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
return
|
|
529
|
+
return k;
|
|
530
530
|
}
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
return L(
|
|
531
|
+
C = function(p, o) {
|
|
532
|
+
const N = o ? o.id : p.id;
|
|
533
|
+
return L(Nt, {
|
|
534
534
|
to: E,
|
|
535
535
|
disabled: !p.expanded
|
|
536
536
|
}, {
|
|
537
537
|
default: () => [L("ul", {
|
|
538
538
|
class: t(p),
|
|
539
|
-
style:
|
|
539
|
+
style: w(p, N, o),
|
|
540
540
|
id: p.id + "_menu",
|
|
541
|
-
onWheel: (
|
|
542
|
-
}, [
|
|
541
|
+
onWheel: (k) => O(k, p)
|
|
542
|
+
}, [B(p)])]
|
|
543
543
|
});
|
|
544
544
|
};
|
|
545
|
-
function
|
|
545
|
+
function A() {
|
|
546
546
|
g.forEach((p) => {
|
|
547
547
|
p.expanded = !1;
|
|
548
548
|
}), g.clear();
|
|
549
549
|
}
|
|
550
550
|
return {
|
|
551
|
-
renderDropdownMenu:
|
|
552
|
-
clearAllDropDownMenu:
|
|
551
|
+
renderDropdownMenu: C,
|
|
552
|
+
clearAllDropDownMenu: A,
|
|
553
553
|
updateContainerId: P
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
function Dn(e,
|
|
557
|
-
const h =
|
|
556
|
+
function Dn(e, v, t) {
|
|
557
|
+
const h = re(e.alignment), {
|
|
558
558
|
renderDropdownMenu: c,
|
|
559
559
|
clearAllDropDownMenu: r,
|
|
560
560
|
updateContainerId: T
|
|
561
|
-
} = Tn(
|
|
562
|
-
function
|
|
563
|
-
const
|
|
561
|
+
} = Tn(v, t);
|
|
562
|
+
function C(n) {
|
|
563
|
+
const D = {
|
|
564
564
|
"btn-group": !0,
|
|
565
565
|
"f-rt-dropdown": !0,
|
|
566
566
|
"f-btn-ml": h.value === "right" || h.value === "center",
|
|
567
567
|
"f-btn-mr": h.value === "left"
|
|
568
568
|
};
|
|
569
|
-
return
|
|
569
|
+
return ne(D, n.dropdownClass);
|
|
570
570
|
}
|
|
571
571
|
function g(n) {
|
|
572
|
-
const
|
|
572
|
+
const D = {
|
|
573
573
|
btn: !0,
|
|
574
574
|
disabled: !n.enable,
|
|
575
575
|
"f-rt-btn": !0,
|
|
@@ -580,10 +580,10 @@ function Dn(e, m, t) {
|
|
|
580
580
|
"f-btn-icon": n.icon && !n.text
|
|
581
581
|
// 只有图标
|
|
582
582
|
};
|
|
583
|
-
return
|
|
583
|
+
return ne(D, n.class);
|
|
584
584
|
}
|
|
585
585
|
function E(n) {
|
|
586
|
-
return
|
|
586
|
+
return ne({
|
|
587
587
|
btn: !0,
|
|
588
588
|
"dropdown-toggle": !0,
|
|
589
589
|
"dropdown-toggle-split": !0
|
|
@@ -597,51 +597,51 @@ function Dn(e, m, t) {
|
|
|
597
597
|
"border-radius": "6px"
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
function u(n,
|
|
600
|
+
function u(n, D) {
|
|
601
601
|
n.stopPropagation();
|
|
602
|
-
const
|
|
603
|
-
document.body.click(), typeof
|
|
602
|
+
const O = D.expanded;
|
|
603
|
+
document.body.click(), typeof D.onClick == "function" && D.onClick(n, D.id), v.emit("click", n, D.id), D.split || (D.expanded = !O);
|
|
604
604
|
}
|
|
605
|
-
function l(n,
|
|
605
|
+
function l(n, D) {
|
|
606
606
|
n.stopPropagation();
|
|
607
|
-
const
|
|
608
|
-
document.body.click(),
|
|
607
|
+
const O = D.expanded;
|
|
608
|
+
document.body.click(), D.expanded = !O;
|
|
609
609
|
}
|
|
610
|
-
function d(n,
|
|
610
|
+
function d(n, D = !0) {
|
|
611
611
|
if (n.tipsEnable && n.tipsText) {
|
|
612
|
-
const
|
|
612
|
+
const O = Pe({
|
|
613
613
|
content: n.tipsText,
|
|
614
614
|
enable: n.tipsEnable
|
|
615
615
|
});
|
|
616
616
|
return L("div", {
|
|
617
617
|
id: n.id,
|
|
618
|
-
class:
|
|
618
|
+
class: C(n)
|
|
619
619
|
}, [Ee(L("div", {
|
|
620
620
|
class: g(n),
|
|
621
621
|
style: P(n),
|
|
622
622
|
onClick: (G) => n.enable && u(G, n)
|
|
623
623
|
}, [t.shouldShowIcon(n) && L("i", {
|
|
624
624
|
class: t.iconClass(n)
|
|
625
|
-
}, null), n.text && L("span", null, [n.text])]), [[Me("tooltip"),
|
|
625
|
+
}, null), n.text && L("span", null, [n.text])]), [[Me("tooltip"), O]]), n.split && L("button", {
|
|
626
626
|
class: E(n),
|
|
627
627
|
style: "border-radius:0 6px 6px 0;",
|
|
628
628
|
onClick: (G) => l(G, n)
|
|
629
|
-
}, null),
|
|
629
|
+
}, null), D && c(n)]);
|
|
630
630
|
}
|
|
631
631
|
return L("div", {
|
|
632
632
|
id: n.id,
|
|
633
|
-
class:
|
|
633
|
+
class: C(n)
|
|
634
634
|
}, [L("div", {
|
|
635
635
|
class: g(n),
|
|
636
636
|
style: P(n),
|
|
637
|
-
onClick: (
|
|
637
|
+
onClick: (O) => n.enable && u(O, n)
|
|
638
638
|
}, [t.shouldShowIcon(n) && L("i", {
|
|
639
639
|
class: t.iconClass(n)
|
|
640
640
|
}, null), n.text && L("span", null, [n.text])]), n.split && L("button", {
|
|
641
641
|
class: E(n),
|
|
642
642
|
style: "border-radius:0 6px 6px 0;",
|
|
643
|
-
onClick: (
|
|
644
|
-
}, null),
|
|
643
|
+
onClick: (O) => l(O, n)
|
|
644
|
+
}, null), D && c(n)]);
|
|
645
645
|
}
|
|
646
646
|
function i() {
|
|
647
647
|
r();
|
|
@@ -658,37 +658,37 @@ const {
|
|
|
658
658
|
name: "FResponseToolbar",
|
|
659
659
|
props: wn,
|
|
660
660
|
emits: ["click"],
|
|
661
|
-
setup(e,
|
|
662
|
-
const t =
|
|
661
|
+
setup(e, v) {
|
|
662
|
+
const t = re(ot(e.items)), h = re(), c = re(), r = re(), T = At(), C = {
|
|
663
663
|
id: "__more_buttons__",
|
|
664
664
|
text: T ? "" : Gt.getLocaleValue("responseToolbar.more"),
|
|
665
665
|
icon: T ? "f-icon-more-horizontal" : ""
|
|
666
|
-
}, g =
|
|
667
|
-
id:
|
|
668
|
-
}), P =
|
|
666
|
+
}, g = re(new ke(C)), E = Object.assign({}, C, {
|
|
667
|
+
id: C.id + "width"
|
|
668
|
+
}), P = re(-1), u = Ye();
|
|
669
669
|
let l = !1;
|
|
670
670
|
const {
|
|
671
671
|
guid: d,
|
|
672
672
|
uuid: i
|
|
673
|
-
} = _t(), n = e.id ? e.id : "toolbar-" + d(),
|
|
673
|
+
} = _t(), n = e.id ? e.id : "toolbar-" + d(), D = re(), O = "dropdown-container-" + n + "-" + i(4), {
|
|
674
674
|
renderToolbarDropdown: G,
|
|
675
|
-
clearAllDropDown:
|
|
676
|
-
updateContainerId:
|
|
677
|
-
} = Dn(e,
|
|
678
|
-
|
|
679
|
-
const
|
|
675
|
+
clearAllDropDown: B,
|
|
676
|
+
updateContainerId: S
|
|
677
|
+
} = Dn(e, v, u);
|
|
678
|
+
S(O);
|
|
679
|
+
const w = fe(() => g.value.children.length > 0), A = fe(() => e.visible ? g.value.children.length > 0 ? !0 : t.value.findIndex((y) => y.shown && y.children && y.children.length > 0) > -1 : !1);
|
|
680
680
|
function p() {
|
|
681
|
-
e.visible && !
|
|
681
|
+
e.visible && !D.value && document && (D.value = document.createElement("div"), D.value.id = O, document.body.appendChild(D.value));
|
|
682
682
|
}
|
|
683
683
|
p();
|
|
684
684
|
function o() {
|
|
685
|
-
|
|
685
|
+
D.value && document.body.contains(D.value) && (document.body.removeChild(D.value), D.value = null);
|
|
686
686
|
}
|
|
687
|
-
|
|
688
|
-
|
|
687
|
+
Ie(A, (y, x) => {
|
|
688
|
+
y ? p() : o();
|
|
689
689
|
});
|
|
690
|
-
const
|
|
691
|
-
const
|
|
690
|
+
const N = fe(() => {
|
|
691
|
+
const y = {
|
|
692
692
|
"f-toolbar": !0,
|
|
693
693
|
"f-response-toolbar": !0,
|
|
694
694
|
"position-relative": !0,
|
|
@@ -696,8 +696,8 @@ const {
|
|
|
696
696
|
"f-response-toolbar-lg": e.buttonSize === "lg",
|
|
697
697
|
"d-none": !e.visible
|
|
698
698
|
};
|
|
699
|
-
return
|
|
700
|
-
}),
|
|
699
|
+
return ne(y, e.customClass);
|
|
700
|
+
}), k = fe(() => ({
|
|
701
701
|
"w-100": !0,
|
|
702
702
|
"d-flex": !0,
|
|
703
703
|
"flex-nowrap": !0,
|
|
@@ -705,168 +705,168 @@ const {
|
|
|
705
705
|
"justify-content-start": e.alignment === "left",
|
|
706
706
|
"justify-content-center": e.alignment === "center"
|
|
707
707
|
}));
|
|
708
|
-
function f(
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}), g.value.expanded = !1,
|
|
708
|
+
function f(y) {
|
|
709
|
+
y && y.target.closest("ul.dropdown-menu") && y.type === "wheel" || (t.value.filter((x) => x.children && x.children.length > 0).forEach((x) => {
|
|
710
|
+
x.expanded = !1;
|
|
711
|
+
}), g.value.expanded = !1, B());
|
|
712
712
|
}
|
|
713
|
-
function y
|
|
713
|
+
function m(y, x) {
|
|
714
714
|
var ee;
|
|
715
|
-
const
|
|
715
|
+
const $ = {
|
|
716
716
|
btn: !0,
|
|
717
717
|
"f-rt-btn": !0,
|
|
718
|
-
"f-btn-ml": e.alignment === "right" ||
|
|
718
|
+
"f-btn-ml": e.alignment === "right" || x > 0 && e.alignment === "center",
|
|
719
719
|
"f-btn-mr": e.alignment === "left",
|
|
720
|
-
"btn-icontext": !!(
|
|
721
|
-
}, K = ((ee =
|
|
722
|
-
return
|
|
720
|
+
"btn-icontext": !!(y.icon && y.icon.trim())
|
|
721
|
+
}, K = ((ee = y == null ? void 0 : y.appearance) == null ? void 0 : ee.class) || y.class || "btn-secondary";
|
|
722
|
+
return ne($, K);
|
|
723
723
|
}
|
|
724
|
-
function s(
|
|
725
|
-
document.body.click(), typeof
|
|
724
|
+
function s(y, x) {
|
|
725
|
+
document.body.click(), typeof x.onClick == "function" && x.onClick(y, x.id), v.emit("click", y, x.id);
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
if (
|
|
729
|
-
const
|
|
730
|
-
content:
|
|
731
|
-
enable:
|
|
727
|
+
function b(y, x) {
|
|
728
|
+
if (y.tipsEnable && y.tipsText) {
|
|
729
|
+
const $ = Pe({
|
|
730
|
+
content: y.tipsText,
|
|
731
|
+
enable: y.tipsEnable
|
|
732
732
|
});
|
|
733
733
|
return Ee(L("button", {
|
|
734
734
|
type: "button",
|
|
735
|
-
class: y
|
|
736
|
-
id:
|
|
737
|
-
disabled: !
|
|
738
|
-
onClick: (K) => s(K,
|
|
739
|
-
}, [u.shouldShowIcon(
|
|
740
|
-
class: u.iconClass(
|
|
741
|
-
}, null),
|
|
735
|
+
class: m(y, x),
|
|
736
|
+
id: y.id,
|
|
737
|
+
disabled: !y.enable,
|
|
738
|
+
onClick: (K) => s(K, y)
|
|
739
|
+
}, [u.shouldShowIcon(y) && L("i", {
|
|
740
|
+
class: u.iconClass(y)
|
|
741
|
+
}, null), y.text]), [[Me("tooltip"), $]]);
|
|
742
742
|
}
|
|
743
743
|
return L("button", {
|
|
744
744
|
type: "button",
|
|
745
|
-
class: y
|
|
746
|
-
id:
|
|
747
|
-
disabled: !
|
|
748
|
-
onClick: (
|
|
749
|
-
}, [u.shouldShowIcon(
|
|
750
|
-
class: u.iconClass(
|
|
751
|
-
}, null),
|
|
745
|
+
class: m(y, x),
|
|
746
|
+
id: y.id,
|
|
747
|
+
disabled: !y.enable,
|
|
748
|
+
onClick: ($) => s($, y)
|
|
749
|
+
}, [u.shouldShowIcon(y) && L("i", {
|
|
750
|
+
class: u.iconClass(y)
|
|
751
|
+
}, null), y.text]);
|
|
752
752
|
}
|
|
753
|
-
let
|
|
754
|
-
function W(
|
|
755
|
-
const
|
|
756
|
-
return (
|
|
753
|
+
let I = /* @__PURE__ */ new Map(), M = [];
|
|
754
|
+
function W(y) {
|
|
755
|
+
const x = Math.ceil(parseFloat(getComputedStyle(y).getPropertyValue("margin-left"))), $ = Math.ceil(parseFloat(getComputedStyle(y).getPropertyValue("margin-right")));
|
|
756
|
+
return (x || 0) + y.getBoundingClientRect().width + ($ || 0);
|
|
757
757
|
}
|
|
758
|
-
function Y(
|
|
759
|
-
if (
|
|
760
|
-
let K =
|
|
758
|
+
function Y(y, x, $) {
|
|
759
|
+
if (x < P.value) {
|
|
760
|
+
let K = $ - 1;
|
|
761
761
|
for (; K >= 0; K--) {
|
|
762
|
-
const ee =
|
|
763
|
-
if (
|
|
762
|
+
const ee = y[K], oe = W(ee);
|
|
763
|
+
if (x += oe, x >= P.value)
|
|
764
764
|
break;
|
|
765
765
|
}
|
|
766
|
-
|
|
766
|
+
$ = K;
|
|
767
767
|
}
|
|
768
|
-
return
|
|
769
|
-
start:
|
|
770
|
-
space:
|
|
768
|
+
return x -= P.value, $ = $ < 0 ? 0 : $, {
|
|
769
|
+
start: $,
|
|
770
|
+
space: x
|
|
771
771
|
};
|
|
772
772
|
}
|
|
773
|
-
function X(
|
|
774
|
-
const
|
|
775
|
-
let
|
|
776
|
-
const ee = Array.from(
|
|
773
|
+
function X(y) {
|
|
774
|
+
const x = r.value;
|
|
775
|
+
let $ = y;
|
|
776
|
+
const ee = Array.from(x.children).filter((ce) => ce.id !== "__more_buttons__"), oe = ee.length;
|
|
777
777
|
let ye = !1, se = 0;
|
|
778
|
-
for (; se <
|
|
778
|
+
for (; se < oe; se++) {
|
|
779
779
|
const ce = ee[se], we = W(ce);
|
|
780
|
-
if (we <=
|
|
781
|
-
|
|
780
|
+
if (we <= $)
|
|
781
|
+
$ -= we;
|
|
782
782
|
else {
|
|
783
|
-
const he = Y(ee,
|
|
784
|
-
se = he.start,
|
|
783
|
+
const he = Y(ee, $, se);
|
|
784
|
+
se = he.start, $ = he.space, ye = !0;
|
|
785
785
|
break;
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
if (!ye && M.length > 0) {
|
|
789
|
-
const ce = Y(ee,
|
|
790
|
-
se = ce.start,
|
|
789
|
+
const ce = Y(ee, $, se);
|
|
790
|
+
se = ce.start, $ = ce.space;
|
|
791
791
|
}
|
|
792
792
|
const De = M.length > 0;
|
|
793
|
-
for (; se <
|
|
793
|
+
for (; se < oe; se++) {
|
|
794
794
|
const ce = ee[se], we = W(ce);
|
|
795
|
-
|
|
795
|
+
I.set(ce.id, !0);
|
|
796
796
|
const he = M.find((Oe) => Oe.id === ce.id);
|
|
797
797
|
he ? he.width = we : M[De ? "unshift" : "push"]({
|
|
798
798
|
id: ce.id,
|
|
799
799
|
width: we
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
|
-
return
|
|
802
|
+
return $;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
|
|
804
|
+
function _() {
|
|
805
|
+
I = /* @__PURE__ */ new Map(), M = [];
|
|
806
806
|
}
|
|
807
|
-
function
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
const
|
|
811
|
-
const ye = e.items.find((se) => se.id ===
|
|
812
|
-
return
|
|
807
|
+
function F(y = !1) {
|
|
808
|
+
const x = Object.assign({}, g.value);
|
|
809
|
+
x.children = [];
|
|
810
|
+
const $ = new ke(x), K = t.value.reduce((ee, oe) => {
|
|
811
|
+
const ye = e.items.find((se) => se.id === oe.id);
|
|
812
|
+
return y ? ($.children.push(oe), oe.shown = !1, ee) : (I.has(oe.id) ? ($.children.push(oe), oe.shown = !1) : oe.shown = ye.visible !== !1, ee.push(oe), ee);
|
|
813
813
|
}, []);
|
|
814
|
-
g.value =
|
|
814
|
+
g.value = $, t.value = K;
|
|
815
815
|
}
|
|
816
|
-
function V(
|
|
816
|
+
function V(y) {
|
|
817
817
|
if (T) {
|
|
818
|
-
|
|
818
|
+
_(), F(!0);
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
|
-
let
|
|
821
|
+
let x = X(y);
|
|
822
822
|
if (M.length) {
|
|
823
|
-
let
|
|
824
|
-
for (;
|
|
825
|
-
const K = e.items.find((ee) => ee.id === M[
|
|
823
|
+
let $ = 0;
|
|
824
|
+
for (; $ < M.length; $++) {
|
|
825
|
+
const K = e.items.find((ee) => ee.id === M[$].id);
|
|
826
826
|
if (K && K.visible !== !1) {
|
|
827
|
-
const ee = M[
|
|
828
|
-
if (
|
|
829
|
-
|
|
827
|
+
const ee = M[$].width;
|
|
828
|
+
if (x >= ee || $ === M.length - 1 && x + P.value >= ee)
|
|
829
|
+
x -= ee;
|
|
830
830
|
else
|
|
831
831
|
break;
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
|
-
for (let K = 0; K <
|
|
835
|
-
|
|
836
|
-
M.splice(0,
|
|
834
|
+
for (let K = 0; K < $; K++)
|
|
835
|
+
I.delete(M[K].id);
|
|
836
|
+
M.splice(0, $ - 1);
|
|
837
837
|
}
|
|
838
|
-
|
|
838
|
+
F();
|
|
839
839
|
}
|
|
840
840
|
function U() {
|
|
841
841
|
if (h.value && P.value < 0) {
|
|
842
|
-
const
|
|
843
|
-
if (!
|
|
842
|
+
const y = h.value.querySelector("#" + E.id);
|
|
843
|
+
if (!y)
|
|
844
844
|
return;
|
|
845
|
-
|
|
845
|
+
y.getBoundingClientRect().width === 0 ? P.value = -1 : P.value = W(y);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
function H(
|
|
849
|
-
if (
|
|
848
|
+
function H(y = -1) {
|
|
849
|
+
if (y === 0 || !r.value || !c.value)
|
|
850
850
|
return;
|
|
851
|
-
|
|
852
|
-
const
|
|
851
|
+
y < 0 && (y = c.value.getBoundingClientRect().width);
|
|
852
|
+
const x = r.value.getBoundingClientRect().width;
|
|
853
853
|
if (T) {
|
|
854
|
-
V(
|
|
854
|
+
V(y), f();
|
|
855
855
|
return;
|
|
856
856
|
}
|
|
857
|
-
(
|
|
857
|
+
(y >= 0 && y < x || M.length) && (U(), V(y), f());
|
|
858
858
|
}
|
|
859
859
|
function q() {
|
|
860
860
|
return P.value < 0 && L("div", {
|
|
861
861
|
style: "position:fixed;top:-40px;visibility:hidden;"
|
|
862
|
-
}, [G(new
|
|
862
|
+
}, [G(new ke(E))]);
|
|
863
863
|
}
|
|
864
|
-
const te = new ResizeObserver((
|
|
865
|
-
if (
|
|
864
|
+
const te = new ResizeObserver((y) => {
|
|
865
|
+
if (y.length) {
|
|
866
866
|
if (T)
|
|
867
867
|
return;
|
|
868
|
-
const
|
|
869
|
-
H(
|
|
868
|
+
const $ = y[0].contentRect.width;
|
|
869
|
+
H($);
|
|
870
870
|
}
|
|
871
871
|
});
|
|
872
872
|
function ae() {
|
|
@@ -876,20 +876,20 @@ const {
|
|
|
876
876
|
U(), H(), ae(), document.body.addEventListener("click", f), document.body.addEventListener("wheel", f);
|
|
877
877
|
}), ut(() => {
|
|
878
878
|
te.disconnect(), o(), document.body.removeEventListener("click", f), document.body.removeEventListener("wheel", f);
|
|
879
|
-
}),
|
|
879
|
+
}), Ie(() => e.items, () => {
|
|
880
880
|
t.value = ot(e.items), g.value.children = [], Te(() => {
|
|
881
|
-
U(),
|
|
881
|
+
U(), _(), H();
|
|
882
882
|
});
|
|
883
883
|
}, {
|
|
884
884
|
deep: !0
|
|
885
|
-
}),
|
|
886
|
-
|
|
885
|
+
}), Ie(() => e.visible, (y) => {
|
|
886
|
+
y && Te(() => {
|
|
887
887
|
U(), H(), ae();
|
|
888
888
|
});
|
|
889
|
-
}),
|
|
889
|
+
}), v.expose({
|
|
890
890
|
elementRef: h
|
|
891
891
|
}), () => L("div", {
|
|
892
|
-
class:
|
|
892
|
+
class: N.value,
|
|
893
893
|
id: n,
|
|
894
894
|
ref: h,
|
|
895
895
|
style: {
|
|
@@ -897,15 +897,15 @@ const {
|
|
|
897
897
|
}
|
|
898
898
|
}, [e.visible && q(), e.visible && L("div", {
|
|
899
899
|
ref: c,
|
|
900
|
-
class:
|
|
900
|
+
class: k.value
|
|
901
901
|
}, [L("div", {
|
|
902
902
|
ref: r,
|
|
903
903
|
class: "d-inline-block f-response-content",
|
|
904
904
|
style: "white-space: nowrap;"
|
|
905
|
-
}, [t.value.filter((
|
|
905
|
+
}, [t.value.filter((y) => y.shown).map((y, x) => y.children && y.children.length > 0 ? G(y) : b(y, x)), w.value && G(g.value)])])]);
|
|
906
906
|
}
|
|
907
907
|
});
|
|
908
|
-
class
|
|
908
|
+
class In extends dt {
|
|
909
909
|
constructor(t, h, c = "response-toolbar") {
|
|
910
910
|
super(t, h);
|
|
911
911
|
// 有三类值 response-toolbar、section-toolbar、tab-toolbar
|
|
@@ -963,12 +963,12 @@ class kn extends dt {
|
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function kn(e, v, t) {
|
|
967
967
|
const h = e.schema;
|
|
968
968
|
function c() {
|
|
969
|
-
var n,
|
|
969
|
+
var n, D, O;
|
|
970
970
|
let i = ((n = e.parent) == null ? void 0 : n.schema.type) || "";
|
|
971
|
-
i === "drawer" && (((
|
|
971
|
+
i === "drawer" && (((D = e.parent) == null ? void 0 : D.schema.headerToolbar.id) === h.id ? i = "drawer-header-toolbar" : ((O = e.parent) == null ? void 0 : O.schema.footerToolbar.id) === h.id && (i = "drawer-footer-toolbar")), ["page-header", "tabs", "section", "drawer-header-toolbar", "drawer-footer-toolbar"].findIndex((G) => G === i) === -1 && (i = ""), t.toolbarPosition = i;
|
|
972
972
|
}
|
|
973
973
|
c();
|
|
974
974
|
function r(i) {
|
|
@@ -977,7 +977,7 @@ function In(e, m, t) {
|
|
|
977
977
|
function T(i, n) {
|
|
978
978
|
return n.text = i.label, n;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function C() {
|
|
981
981
|
return !1;
|
|
982
982
|
}
|
|
983
983
|
function g() {
|
|
@@ -990,32 +990,32 @@ function In(e, m, t) {
|
|
|
990
990
|
return !0;
|
|
991
991
|
}
|
|
992
992
|
function u(i) {
|
|
993
|
-
return new
|
|
993
|
+
return new In(i, v, h.type).getPropertyConfig(h);
|
|
994
994
|
}
|
|
995
995
|
function l(i) {
|
|
996
996
|
var G;
|
|
997
997
|
i && (i.stopPropagation(), i.preventDefault());
|
|
998
998
|
const { schema: n } = e;
|
|
999
999
|
n.buttons || (n.buttons = []);
|
|
1000
|
-
let
|
|
1000
|
+
let D = "";
|
|
1001
1001
|
if (n.type)
|
|
1002
|
-
|
|
1002
|
+
D = n.type + "-item";
|
|
1003
1003
|
else
|
|
1004
1004
|
switch ((G = e.parent) == null ? void 0 : G.schema.type) {
|
|
1005
1005
|
case "tabs":
|
|
1006
|
-
|
|
1006
|
+
D = "tab-toolbar-item";
|
|
1007
1007
|
break;
|
|
1008
1008
|
case "section":
|
|
1009
|
-
|
|
1009
|
+
D = "section-toolbar-item";
|
|
1010
1010
|
break;
|
|
1011
1011
|
case "drawer":
|
|
1012
|
-
|
|
1012
|
+
D = "drawer-toolbar-item";
|
|
1013
1013
|
break;
|
|
1014
1014
|
default:
|
|
1015
|
-
|
|
1015
|
+
D = "response-toolbar-item";
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1017
|
+
const O = at(D);
|
|
1018
|
+
O.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, n.buttons.push(O), t.updateToolbarItems(), t.changeSelectedId("");
|
|
1019
1019
|
}
|
|
1020
1020
|
function d() {
|
|
1021
1021
|
return [
|
|
@@ -1032,7 +1032,7 @@ function In(e, m, t) {
|
|
|
1032
1032
|
canAccepts: r,
|
|
1033
1033
|
checkCanAddComponent: E,
|
|
1034
1034
|
checkCanDeleteComponent: g,
|
|
1035
|
-
checkCanMoveComponent:
|
|
1035
|
+
checkCanMoveComponent: C,
|
|
1036
1036
|
hideNestedPaddingInDesginerView: P,
|
|
1037
1037
|
onResolveNewComponentSchema: T,
|
|
1038
1038
|
getPropsConfig: u,
|
|
@@ -1047,7 +1047,7 @@ function Se(e) {
|
|
|
1047
1047
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1048
1048
|
}
|
|
1049
1049
|
var bt = { exports: {} };
|
|
1050
|
-
(function(e,
|
|
1050
|
+
(function(e, v) {
|
|
1051
1051
|
(function(t) {
|
|
1052
1052
|
e.exports = t();
|
|
1053
1053
|
})(function() {
|
|
@@ -1058,7 +1058,7 @@ var bt = { exports: {} };
|
|
|
1058
1058
|
if (!h[E]) {
|
|
1059
1059
|
var u = typeof Se == "function" && Se;
|
|
1060
1060
|
if (!P && u) return u(E, !0);
|
|
1061
|
-
if (
|
|
1061
|
+
if (C) return C(E, !0);
|
|
1062
1062
|
var l = new Error("Cannot find module '" + E + "'");
|
|
1063
1063
|
throw l.code = "MODULE_NOT_FOUND", l;
|
|
1064
1064
|
}
|
|
@@ -1070,16 +1070,16 @@ var bt = { exports: {} };
|
|
|
1070
1070
|
}
|
|
1071
1071
|
return c[E].exports;
|
|
1072
1072
|
}
|
|
1073
|
-
for (var
|
|
1073
|
+
for (var C = typeof Se == "function" && Se, g = 0; g < r.length; g++) T(r[g]);
|
|
1074
1074
|
return T;
|
|
1075
1075
|
}
|
|
1076
1076
|
return t;
|
|
1077
1077
|
}())({
|
|
1078
1078
|
1: [function(t, h, c) {
|
|
1079
|
-
var r = {}, T = "(?:^|\\s)",
|
|
1079
|
+
var r = {}, T = "(?:^|\\s)", C = "(?:\\s|$)";
|
|
1080
1080
|
function g(u) {
|
|
1081
1081
|
var l = r[u];
|
|
1082
|
-
return l ? l.lastIndex = 0 : r[u] = l = new RegExp(T + u +
|
|
1082
|
+
return l ? l.lastIndex = 0 : r[u] = l = new RegExp(T + u + C, "g"), l;
|
|
1083
1083
|
}
|
|
1084
1084
|
function E(u, l) {
|
|
1085
1085
|
var d = u.className;
|
|
@@ -1095,14 +1095,14 @@ var bt = { exports: {} };
|
|
|
1095
1095
|
}, {}],
|
|
1096
1096
|
2: [function(t, h, c) {
|
|
1097
1097
|
(function(r) {
|
|
1098
|
-
var T = t("contra/emitter"),
|
|
1099
|
-
function u(f,
|
|
1098
|
+
var T = t("contra/emitter"), C = t("crossvent"), g = t("./classes"), E = document, P = E.documentElement;
|
|
1099
|
+
function u(f, m) {
|
|
1100
1100
|
var s = arguments.length;
|
|
1101
|
-
s === 1 && Array.isArray(f) === !1 && (
|
|
1102
|
-
var
|
|
1103
|
-
|
|
1104
|
-
var
|
|
1105
|
-
containers:
|
|
1101
|
+
s === 1 && Array.isArray(f) === !1 && (m = f, f = []);
|
|
1102
|
+
var b, I, M, W, Y, X, _, F, V, U = null, H, q, te = !1, ae = 0, y, x = m || {};
|
|
1103
|
+
x.moves === void 0 && (x.moves = G), x.accepts === void 0 && (x.accepts = G), x.invalid === void 0 && (x.invalid = yt), x.containers === void 0 && (x.containers = f || []), x.isContainer === void 0 && (x.isContainer = O), x.copy === void 0 && (x.copy = !1), x.copySortSource === void 0 && (x.copySortSource = !1), x.revertOnSpill === void 0 && (x.revertOnSpill = !1), x.removeOnSpill === void 0 && (x.removeOnSpill = !1), x.direction === void 0 && (x.direction = "vertical"), x.ignoreInputTextSelection === void 0 && (x.ignoreInputTextSelection = !0), x.mirrorContainer === void 0 && (x.mirrorContainer = E.body);
|
|
1104
|
+
var $ = T({
|
|
1105
|
+
containers: x.containers,
|
|
1106
1106
|
start: mt,
|
|
1107
1107
|
end: He,
|
|
1108
1108
|
cancel: Je,
|
|
@@ -1111,21 +1111,21 @@ var bt = { exports: {} };
|
|
|
1111
1111
|
canMove: Oe,
|
|
1112
1112
|
dragging: !1
|
|
1113
1113
|
});
|
|
1114
|
-
return
|
|
1114
|
+
return x.removeOnSpill === !0 && $.on("over", Ct).on("out", xt), ee(), $;
|
|
1115
1115
|
function K(a) {
|
|
1116
|
-
return
|
|
1116
|
+
return $.containers.indexOf(a) !== -1 || x.isContainer(a);
|
|
1117
1117
|
}
|
|
1118
1118
|
function ee(a) {
|
|
1119
1119
|
var R = a ? "remove" : "add";
|
|
1120
1120
|
i(P, R, "mousedown", ce), i(P, R, "mouseup", Be);
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function oe(a) {
|
|
1123
1123
|
var R = a ? "remove" : "add";
|
|
1124
1124
|
i(P, R, "mousemove", we);
|
|
1125
1125
|
}
|
|
1126
1126
|
function ye(a) {
|
|
1127
1127
|
var R = a ? "remove" : "add";
|
|
1128
|
-
|
|
1128
|
+
C[R](P, "selectstart", De), C[R](P, "click", De);
|
|
1129
1129
|
}
|
|
1130
1130
|
function se() {
|
|
1131
1131
|
ee(!0), Be({});
|
|
@@ -1137,8 +1137,8 @@ var bt = { exports: {} };
|
|
|
1137
1137
|
W = a.clientX, Y = a.clientY;
|
|
1138
1138
|
var R = n(a) !== 1 || a.metaKey || a.ctrlKey;
|
|
1139
1139
|
if (!R) {
|
|
1140
|
-
var
|
|
1141
|
-
z && (H = z,
|
|
1140
|
+
var j = a.target, z = he(j);
|
|
1141
|
+
z && (H = z, oe(), a.type === "mousedown" && (A(j) ? j.focus() : a.preventDefault()));
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
1144
|
function we(a) {
|
|
@@ -1147,29 +1147,29 @@ var bt = { exports: {} };
|
|
|
1147
1147
|
Be({});
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
|
-
if (!(a.clientX !== void 0 && Math.abs(a.clientX - W) <= (
|
|
1151
|
-
if (
|
|
1152
|
-
var R =
|
|
1153
|
-
if (
|
|
1150
|
+
if (!(a.clientX !== void 0 && Math.abs(a.clientX - W) <= (x.slideFactorX || 0) && a.clientY !== void 0 && Math.abs(a.clientY - Y) <= (x.slideFactorY || 0))) {
|
|
1151
|
+
if (x.ignoreInputTextSelection) {
|
|
1152
|
+
var R = k("clientX", a) || 0, j = k("clientY", a) || 0, z = E.elementFromPoint(R, j);
|
|
1153
|
+
if (A(z))
|
|
1154
1154
|
return;
|
|
1155
1155
|
}
|
|
1156
1156
|
var Q = H;
|
|
1157
|
-
|
|
1157
|
+
oe(!0), ye(), He(), Xe(Q), g.add(F || M, "gu-transit"), Dt(), Tt(), ae = 0, _e(a);
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
function he(a) {
|
|
1162
|
-
if (!(
|
|
1163
|
-
for (var R = a;
|
|
1164
|
-
if (
|
|
1162
|
+
if (!($.dragging && b) && !K(a)) {
|
|
1163
|
+
for (var R = a; w(a) && K(w(a)) === !1; )
|
|
1164
|
+
if (x.invalid(a, R) || (a = w(a), !a))
|
|
1165
1165
|
return;
|
|
1166
|
-
var
|
|
1167
|
-
if (
|
|
1168
|
-
var z =
|
|
1166
|
+
var j = w(a);
|
|
1167
|
+
if (j && !x.invalid(a, R)) {
|
|
1168
|
+
var z = x.moves(a, j, R, o(a));
|
|
1169
1169
|
if (z)
|
|
1170
1170
|
return {
|
|
1171
1171
|
item: a,
|
|
1172
|
-
source:
|
|
1172
|
+
source: j
|
|
1173
1173
|
};
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
@@ -1182,87 +1182,87 @@ var bt = { exports: {} };
|
|
|
1182
1182
|
R && Xe(R);
|
|
1183
1183
|
}
|
|
1184
1184
|
function Xe(a) {
|
|
1185
|
-
Ot(a.item, a.source) && (
|
|
1185
|
+
Ot(a.item, a.source) && (F = a.item.cloneNode(!0), $.emit("cloned", F, a.item, "copy")), I = a.source, M = a.item, X = _ = o(a.item), $.dragging = !0, $.emit("drag", M, I);
|
|
1186
1186
|
}
|
|
1187
1187
|
function yt() {
|
|
1188
1188
|
return !1;
|
|
1189
1189
|
}
|
|
1190
1190
|
function He() {
|
|
1191
|
-
if (
|
|
1192
|
-
var a =
|
|
1193
|
-
Qe(a,
|
|
1191
|
+
if ($.dragging) {
|
|
1192
|
+
var a = F || M;
|
|
1193
|
+
Qe(a, w(a));
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
function Ve() {
|
|
1197
|
-
H = !1,
|
|
1197
|
+
H = !1, oe(!0), ye(!0);
|
|
1198
1198
|
}
|
|
1199
1199
|
function Be(a) {
|
|
1200
|
-
if (Ve(),
|
|
1201
|
-
var R =
|
|
1202
|
-
Z && (
|
|
1200
|
+
if (Ve(), !!$.dragging) {
|
|
1201
|
+
var R = F || M, j = k("clientX", a) || 0, z = k("clientY", a) || 0, Q = D(b, j, z), Z = Ke(Q, j, z);
|
|
1202
|
+
Z && (F && x.copySortSource || !F || Z !== I) ? Qe(R, Z) : x.removeOnSpill ? Ze() : Je();
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
function Qe(a, R) {
|
|
1206
|
-
var
|
|
1207
|
-
|
|
1206
|
+
var j = w(a);
|
|
1207
|
+
F && x.copySortSource && R === I && j.removeChild(M), Ae(R) ? $.emit("cancel", a, I) : $.emit("drop", a, R, I, _), je();
|
|
1208
1208
|
}
|
|
1209
1209
|
function Ze() {
|
|
1210
|
-
if (
|
|
1211
|
-
var a =
|
|
1212
|
-
R && R.removeChild(a),
|
|
1210
|
+
if ($.dragging) {
|
|
1211
|
+
var a = F || M, R = w(a);
|
|
1212
|
+
R && R.removeChild(a), $.emit(F ? "cancel" : "remove", a, R, I), je();
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
1215
|
function Je(a) {
|
|
1216
|
-
if (
|
|
1217
|
-
var R = arguments.length > 0 ? a :
|
|
1218
|
-
Q === !1 && R && (
|
|
1216
|
+
if ($.dragging) {
|
|
1217
|
+
var R = arguments.length > 0 ? a : x.revertOnSpill, j = F || M, z = w(j), Q = Ae(z);
|
|
1218
|
+
Q === !1 && R && (F ? z && z.removeChild(F) : I.insertBefore(j, X)), Q || R ? $.emit("cancel", j, I, I) : $.emit("drop", j, z, I, _), je();
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
function je() {
|
|
1222
|
-
var a =
|
|
1223
|
-
Ve(), St(),
|
|
1222
|
+
var a = F || M;
|
|
1223
|
+
Ve(), St(), It(), a && g.rm(a, "gu-transit"), V && clearTimeout(V), $.dragging = !1, U && $.emit("out", a, U, I), $.emit("dragend", a, ae), I = M = F = X = _ = V = U = null;
|
|
1224
1224
|
}
|
|
1225
1225
|
function Ae(a, R) {
|
|
1226
|
-
var
|
|
1227
|
-
return R !== void 0 ?
|
|
1226
|
+
var j;
|
|
1227
|
+
return R !== void 0 ? j = R : b ? j = _ : j = o(F || M), a === I && j === X;
|
|
1228
1228
|
}
|
|
1229
|
-
function Ke(a, R,
|
|
1229
|
+
function Ke(a, R, j) {
|
|
1230
1230
|
for (var z = a; z && !Q(); )
|
|
1231
|
-
z =
|
|
1231
|
+
z = w(z);
|
|
1232
1232
|
return z;
|
|
1233
1233
|
function Q() {
|
|
1234
1234
|
var Z = K(z);
|
|
1235
1235
|
if (Z === !1)
|
|
1236
1236
|
return !1;
|
|
1237
|
-
var ge = et(z, a), ue = tt(z, ge, R,
|
|
1238
|
-
return pe ? !0 :
|
|
1237
|
+
var ge = et(z, a), ue = tt(z, ge, R, j), pe = Ae(z, ue);
|
|
1238
|
+
return pe ? !0 : x.accepts(M, z, I, ue);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
1241
|
function _e(a) {
|
|
1242
|
-
if (!
|
|
1242
|
+
if (!b)
|
|
1243
1243
|
return;
|
|
1244
1244
|
a.preventDefault();
|
|
1245
|
-
var R =
|
|
1246
|
-
|
|
1247
|
-
var z =
|
|
1248
|
-
(ge || Z === null) && (de(), U = Z, ve()), Rt(Q,
|
|
1249
|
-
var ue =
|
|
1250
|
-
if (Z ===
|
|
1245
|
+
var R = k("clientX", a) || 0, j = k("clientY", a) || 0;
|
|
1246
|
+
b.style.left = R - 2 + "px", b.style.top = j - 2 + "px";
|
|
1247
|
+
var z = F || M, Q = D(b, R, j), Z = Ke(Q, R, j), ge = Z !== null && Z !== U;
|
|
1248
|
+
(ge || Z === null) && (de(), U = Z, ve()), Rt(Q, j);
|
|
1249
|
+
var ue = w(z);
|
|
1250
|
+
if (Z === I && F && !x.copySortSource) {
|
|
1251
1251
|
ue && ue.removeChild(z);
|
|
1252
1252
|
return;
|
|
1253
1253
|
}
|
|
1254
1254
|
var pe, be = et(Z, Q);
|
|
1255
|
-
if (te =
|
|
1256
|
-
pe = tt(Z, be, R,
|
|
1257
|
-
else if (
|
|
1258
|
-
pe = X, Z =
|
|
1255
|
+
if (te = kt(be, Z), be !== null)
|
|
1256
|
+
pe = tt(Z, be, R, j);
|
|
1257
|
+
else if (x.revertOnSpill === !0 && !F)
|
|
1258
|
+
pe = X, Z = I;
|
|
1259
1259
|
else {
|
|
1260
|
-
|
|
1260
|
+
F && ue && ue.removeChild(z), F && q && (q.style.display = "none");
|
|
1261
1261
|
return;
|
|
1262
1262
|
}
|
|
1263
1263
|
q.style.display = "block", wt(pe, z, ge), pe ? Et(be, pe) : Mt(Z);
|
|
1264
1264
|
function ie(le) {
|
|
1265
|
-
|
|
1265
|
+
$.emit(le, z, U, I);
|
|
1266
1266
|
}
|
|
1267
1267
|
function ve() {
|
|
1268
1268
|
ge && ie("over");
|
|
@@ -1271,41 +1271,41 @@ var bt = { exports: {} };
|
|
|
1271
1271
|
U && ie("out");
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
function wt(a, R,
|
|
1275
|
-
(a === R || a === o(R)) && (
|
|
1274
|
+
function wt(a, R, j) {
|
|
1275
|
+
(a === R || a === o(R)) && (_ = o(R)), (a === null && j || a !== R && a !== o(R)) && (_ = a);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function Ct(a) {
|
|
1278
1278
|
g.rm(a, "gu-hide");
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1280
|
+
function xt(a) {
|
|
1281
|
+
$.dragging && g.add(a, "gu-hide");
|
|
1282
1282
|
}
|
|
1283
1283
|
function Tt() {
|
|
1284
|
-
|
|
1284
|
+
b || (b = document.createElement("div"), b.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", b.innerHTML = x.getMirrorText && x.getMirrorText(M) || "控件", g.add(b, "gu-mirror"), x.mirrorContainer.appendChild(b), i(P, "add", "mousemove", _e), g.add(x.mirrorContainer, "gu-unselectable"), $.emit("cloned", b, M, "mirror"));
|
|
1285
1285
|
}
|
|
1286
1286
|
function Dt() {
|
|
1287
1287
|
if (q = document.createElement("div"), g.add(q, "gu-insertion"), M) {
|
|
1288
1288
|
var a = M.getBoundingClientRect();
|
|
1289
1289
|
q.style.left = a.left + "px", q.style.top = a.top + "px";
|
|
1290
1290
|
}
|
|
1291
|
-
te = !1,
|
|
1291
|
+
te = !1, x.mirrorContainer.appendChild(q);
|
|
1292
1292
|
}
|
|
1293
1293
|
function St() {
|
|
1294
|
-
|
|
1294
|
+
b && (g.rm(x.mirrorContainer, "gu-unselectable"), i(P, "remove", "mousemove", _e), w(b).removeChild(b), b = null);
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
q && (
|
|
1296
|
+
function It() {
|
|
1297
|
+
q && (w(q).removeChild(q), q = null);
|
|
1298
1298
|
}
|
|
1299
1299
|
function et(a, R) {
|
|
1300
|
-
for (var
|
|
1301
|
-
|
|
1302
|
-
return
|
|
1300
|
+
for (var j = R; j !== a && w(j) !== a; )
|
|
1301
|
+
j = w(j);
|
|
1302
|
+
return j === P ? null : j;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function kt(a, R) {
|
|
1305
1305
|
if (!R)
|
|
1306
1306
|
return te;
|
|
1307
|
-
var
|
|
1308
|
-
if (!
|
|
1307
|
+
var j = a || R && R.lastElementChild;
|
|
1308
|
+
if (!j)
|
|
1309
1309
|
return !0;
|
|
1310
1310
|
var z = getComputedStyle(a), Q = /^inline/.test(z.getPropertyValue("display")) || /^(left|right)$/.test(z.getPropertyValue("float"));
|
|
1311
1311
|
if (Q)
|
|
@@ -1337,88 +1337,88 @@ var bt = { exports: {} };
|
|
|
1337
1337
|
return !0;
|
|
1338
1338
|
}
|
|
1339
1339
|
function Et(a, R) {
|
|
1340
|
-
const
|
|
1341
|
-
if (q.style.left =
|
|
1342
|
-
if (q.style.height =
|
|
1340
|
+
const j = R.getBoundingClientRect();
|
|
1341
|
+
if (q.style.left = j.left + "px", q.style.top = j.top + "px", te) {
|
|
1342
|
+
if (q.style.height = j.height + "px", q.style.width = "4px", a) {
|
|
1343
1343
|
const z = a.getBoundingClientRect();
|
|
1344
|
-
z.top !==
|
|
1344
|
+
z.top !== j.top && (q.style.left = z.right + "px", q.style.top = z.top + "px", q.style.height = z.height + "px");
|
|
1345
1345
|
}
|
|
1346
|
-
} else if (q.style.height = "4px", q.style.width =
|
|
1347
|
-
const z =
|
|
1348
|
-
|
|
1346
|
+
} else if (q.style.height = "4px", q.style.width = j.width + "px", y) {
|
|
1347
|
+
const z = y.getBoundingClientRect();
|
|
1348
|
+
j.top < z.top && (q.style.display = "none");
|
|
1349
1349
|
}
|
|
1350
1350
|
R === M && M && (q.style.display = "none");
|
|
1351
1351
|
}
|
|
1352
1352
|
function Mt(a) {
|
|
1353
|
-
|
|
1353
|
+
_ = null;
|
|
1354
1354
|
var R = a.lastElementChild;
|
|
1355
1355
|
if (R) {
|
|
1356
|
-
var
|
|
1357
|
-
te ? (q.style.left =
|
|
1356
|
+
var j = R.getBoundingClientRect();
|
|
1357
|
+
te ? (q.style.left = j.right + "px", q.style.top = j.top + "px", q.style.height = j.height + "px", q.style.width = "4px") : (q.style.left = j.left + "px", q.style.top = j.bottom + "px", q.style.height = "4px", q.style.width = j.width + "px"), R === M && M && (q.style.display = "none");
|
|
1358
1358
|
} else
|
|
1359
1359
|
q.style.display = "none";
|
|
1360
1360
|
}
|
|
1361
1361
|
function Rt(a, R) {
|
|
1362
|
-
if (!
|
|
1362
|
+
if (!x.mirrorContainer.contains(a) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (y = l(a), !y || !y.contains(a)))
|
|
1363
1363
|
return;
|
|
1364
|
-
const
|
|
1365
|
-
if (R - 30 < z.top &&
|
|
1366
|
-
let Q =
|
|
1367
|
-
|
|
1364
|
+
const j = document.querySelector(".dgComponentSelected"), z = y.getBoundingClientRect();
|
|
1365
|
+
if (R - 30 < z.top && y.scrollTop > 0) {
|
|
1366
|
+
let Q = y.scrollTop < 10 ? y.scrollTop : 10;
|
|
1367
|
+
y.scrollBy(0, -1 * Q), j && y.contains(j) && (ae = ae + -1 * Q);
|
|
1368
1368
|
}
|
|
1369
|
-
if (R + 30 > z.bottom &&
|
|
1370
|
-
const Q =
|
|
1369
|
+
if (R + 30 > z.bottom && y.scrollTop < y.scrollHeight - y.clientHeight) {
|
|
1370
|
+
const Q = y.scrollHeight - y.clientHeight - y.scrollTop;
|
|
1371
1371
|
let Z = Q < 10 ? Q : 10;
|
|
1372
|
-
|
|
1372
|
+
y.scrollBy(0, Z), j && y.contains(j) && (ae = ae + Z);
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
|
-
function tt(a, R,
|
|
1376
|
-
var Q =
|
|
1375
|
+
function tt(a, R, j, z) {
|
|
1376
|
+
var Q = x.direction === "horizontal", Z = x.direction === "mixed", ge = R !== a ? pe() : ue();
|
|
1377
1377
|
return ge;
|
|
1378
1378
|
function ue() {
|
|
1379
1379
|
var ie = a.children.length, ve, de, le;
|
|
1380
1380
|
for (ve = 0; ve < ie; ve++)
|
|
1381
|
-
if (de = a.children[ve], le = de.getBoundingClientRect(), Q && le.left + le.width / 2 >
|
|
1381
|
+
if (de = a.children[ve], le = de.getBoundingClientRect(), Q && le.left + le.width / 2 > j || !Z && !Q && le.top + le.height / 2 > z || Z && le.left + le.width > j && le.top + le.height > z)
|
|
1382
1382
|
return de;
|
|
1383
1383
|
return null;
|
|
1384
1384
|
}
|
|
1385
1385
|
function pe() {
|
|
1386
1386
|
var ie = R.getBoundingClientRect();
|
|
1387
1387
|
if (Z) {
|
|
1388
|
-
var ve = z - ie.top, de =
|
|
1389
|
-
return te ?
|
|
1388
|
+
var ve = z - ie.top, de = j - ie.left, le = ie.bottom - z, $e = ie.right - j, Le = Math.min(de, $e, ve, le), Fe;
|
|
1389
|
+
return te ? Fe = $e < de : Fe = le === Le || $e === Le || de === Le, be(Fe);
|
|
1390
1390
|
}
|
|
1391
|
-
return be(Q ?
|
|
1391
|
+
return be(Q ? j > ie.left + B(ie) / 2 : z > ie.top + S(ie) / 2);
|
|
1392
1392
|
}
|
|
1393
1393
|
function be(ie) {
|
|
1394
1394
|
return ie ? o(R) : R;
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
function Ot(a, R) {
|
|
1398
|
-
return typeof
|
|
1398
|
+
return typeof x.copy == "boolean" ? x.copy : x.copy(a, R);
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
1401
|
function l(f) {
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1404
|
-
const
|
|
1405
|
-
return document.getElementById(
|
|
1402
|
+
const m = Array.from(window.scrollContainerList);
|
|
1403
|
+
if (m.length === 1) {
|
|
1404
|
+
const b = Array.from(window.scrollContainerList)[0];
|
|
1405
|
+
return document.getElementById(b);
|
|
1406
1406
|
}
|
|
1407
|
-
const s = d(
|
|
1408
|
-
for (const
|
|
1409
|
-
if (
|
|
1410
|
-
return
|
|
1407
|
+
const s = d(m);
|
|
1408
|
+
for (const b of s)
|
|
1409
|
+
if (b.contains(f))
|
|
1410
|
+
return b;
|
|
1411
1411
|
return null;
|
|
1412
1412
|
}
|
|
1413
1413
|
function d(f) {
|
|
1414
|
-
const
|
|
1414
|
+
const m = [];
|
|
1415
1415
|
return f.forEach((s) => {
|
|
1416
|
-
const
|
|
1417
|
-
|
|
1418
|
-
}),
|
|
1416
|
+
const b = document.getElementById(s);
|
|
1417
|
+
b && m.push(b);
|
|
1418
|
+
}), m.sort((s, b) => s.contains(b) ? 1 : b.contains(s) ? -1 : 0), m;
|
|
1419
1419
|
}
|
|
1420
|
-
function i(f,
|
|
1421
|
-
var
|
|
1420
|
+
function i(f, m, s, b) {
|
|
1421
|
+
var I = {
|
|
1422
1422
|
mouseup: "touchend",
|
|
1423
1423
|
mousedown: "touchstart",
|
|
1424
1424
|
mousemove: "touchmove"
|
|
@@ -1431,7 +1431,7 @@ var bt = { exports: {} };
|
|
|
1431
1431
|
mousedown: "MSPointerDown",
|
|
1432
1432
|
mousemove: "MSPointerMove"
|
|
1433
1433
|
};
|
|
1434
|
-
r.navigator.pointerEnabled ?
|
|
1434
|
+
r.navigator.pointerEnabled ? C[m](f, M[s], b) : r.navigator.msPointerEnabled ? C[m](f, W[s], b) : (C[m](f, I[s], b), C[m](f, s, b));
|
|
1435
1435
|
}
|
|
1436
1436
|
function n(f) {
|
|
1437
1437
|
if (f.touches !== void 0)
|
|
@@ -1440,39 +1440,39 @@ var bt = { exports: {} };
|
|
|
1440
1440
|
return f.which;
|
|
1441
1441
|
if (f.buttons !== void 0)
|
|
1442
1442
|
return f.buttons;
|
|
1443
|
-
var
|
|
1444
|
-
if (
|
|
1445
|
-
return
|
|
1443
|
+
var m = f.button;
|
|
1444
|
+
if (m !== void 0)
|
|
1445
|
+
return m & 1 ? 1 : m & 2 ? 3 : m & 4 ? 2 : 0;
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function D(f, m, s) {
|
|
1448
1448
|
f = f || {};
|
|
1449
|
-
var
|
|
1450
|
-
return f.className += " gu-hide",
|
|
1449
|
+
var b = f.className || "", I;
|
|
1450
|
+
return f.className += " gu-hide", I = E.elementFromPoint(m, s), f.className = b, I;
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1452
|
+
function O() {
|
|
1453
1453
|
return !1;
|
|
1454
1454
|
}
|
|
1455
1455
|
function G() {
|
|
1456
1456
|
return !0;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function B(f) {
|
|
1459
1459
|
return f.width || f.right - f.left;
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function S(f) {
|
|
1462
1462
|
return f.height || f.bottom - f.top;
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function w(f) {
|
|
1465
1465
|
return f.parentNode === E ? null : f.parentNode;
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function A(f) {
|
|
1468
1468
|
return f.tagName === "INPUT" || f.tagName === "TEXTAREA" || f.tagName === "SELECT" || p(f);
|
|
1469
1469
|
}
|
|
1470
1470
|
function p(f) {
|
|
1471
|
-
return !f || f.contentEditable === "false" ? !1 : f.contentEditable === "true" ? !0 : p(
|
|
1471
|
+
return !f || f.contentEditable === "false" ? !1 : f.contentEditable === "true" ? !0 : p(w(f));
|
|
1472
1472
|
}
|
|
1473
1473
|
function o(f) {
|
|
1474
|
-
return f.nextElementSibling ||
|
|
1475
|
-
function
|
|
1474
|
+
return f.nextElementSibling || m();
|
|
1475
|
+
function m() {
|
|
1476
1476
|
var s = f;
|
|
1477
1477
|
do
|
|
1478
1478
|
s = s.nextSibling;
|
|
@@ -1480,31 +1480,31 @@ var bt = { exports: {} };
|
|
|
1480
1480
|
return s;
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function N(f) {
|
|
1484
1484
|
return f.targetTouches && f.targetTouches.length ? f.targetTouches[0] : f.changedTouches && f.changedTouches.length ? f.changedTouches[0] : f;
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
var s =
|
|
1486
|
+
function k(f, m) {
|
|
1487
|
+
var s = N(m), b = {
|
|
1488
1488
|
pageX: "clientX",
|
|
1489
1489
|
// IE8
|
|
1490
1490
|
pageY: "clientY"
|
|
1491
1491
|
// IE8
|
|
1492
1492
|
};
|
|
1493
|
-
return f in
|
|
1493
|
+
return f in b && !(f in s) && b[f] in s && (f = b[f]), s[f];
|
|
1494
1494
|
}
|
|
1495
1495
|
h.exports = u;
|
|
1496
1496
|
}).call(this, typeof me < "u" ? me : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1497
1497
|
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
|
|
1498
1498
|
3: [function(t, h, c) {
|
|
1499
|
-
h.exports = function(T,
|
|
1500
|
-
return Array.prototype.slice.call(T,
|
|
1499
|
+
h.exports = function(T, C) {
|
|
1500
|
+
return Array.prototype.slice.call(T, C);
|
|
1501
1501
|
};
|
|
1502
1502
|
}, {}],
|
|
1503
1503
|
4: [function(t, h, c) {
|
|
1504
1504
|
var r = t("ticky");
|
|
1505
|
-
h.exports = function(
|
|
1506
|
-
|
|
1507
|
-
|
|
1505
|
+
h.exports = function(C, g, E) {
|
|
1506
|
+
C && r(function() {
|
|
1507
|
+
C.apply(E || null, g || []);
|
|
1508
1508
|
});
|
|
1509
1509
|
};
|
|
1510
1510
|
}, { ticky: 10 }],
|
|
@@ -1538,8 +1538,8 @@ var bt = { exports: {} };
|
|
|
1538
1538
|
var i = r(arguments), n = this || g;
|
|
1539
1539
|
if (l === "error" && P.throws !== !1 && !d.length)
|
|
1540
1540
|
throw i.length === 1 ? i[0] : i;
|
|
1541
|
-
return d.forEach(function(
|
|
1542
|
-
P.async ? T(
|
|
1541
|
+
return d.forEach(function(O) {
|
|
1542
|
+
P.async ? T(O, i, n) : O.apply(n, i), O._once && g.off(l, O);
|
|
1543
1543
|
}), g;
|
|
1544
1544
|
};
|
|
1545
1545
|
}, g;
|
|
@@ -1547,83 +1547,83 @@ var bt = { exports: {} };
|
|
|
1547
1547
|
}, { "./debounce": 4, atoa: 3 }],
|
|
1548
1548
|
6: [function(t, h, c) {
|
|
1549
1549
|
(function(r) {
|
|
1550
|
-
var T = t("custom-event"),
|
|
1550
|
+
var T = t("custom-event"), C = t("./eventmap"), g = r.document, E = l, P = i, u = [];
|
|
1551
1551
|
r.addEventListener || (E = d, P = n), h.exports = {
|
|
1552
1552
|
add: E,
|
|
1553
1553
|
remove: P,
|
|
1554
|
-
fabricate:
|
|
1554
|
+
fabricate: D
|
|
1555
1555
|
};
|
|
1556
|
-
function l(
|
|
1557
|
-
return
|
|
1556
|
+
function l(w, A, p, o) {
|
|
1557
|
+
return w.addEventListener(A, p, o);
|
|
1558
1558
|
}
|
|
1559
|
-
function d(
|
|
1560
|
-
return
|
|
1559
|
+
function d(w, A, p) {
|
|
1560
|
+
return w.attachEvent("on" + A, G(w, A, p));
|
|
1561
1561
|
}
|
|
1562
|
-
function i(
|
|
1563
|
-
return
|
|
1562
|
+
function i(w, A, p, o) {
|
|
1563
|
+
return w.removeEventListener(A, p, o);
|
|
1564
1564
|
}
|
|
1565
|
-
function n(
|
|
1566
|
-
var o =
|
|
1565
|
+
function n(w, A, p) {
|
|
1566
|
+
var o = B(w, A, p);
|
|
1567
1567
|
if (o)
|
|
1568
|
-
return
|
|
1568
|
+
return w.detachEvent("on" + A, o);
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1571
|
-
var o =
|
|
1572
|
-
|
|
1573
|
-
function
|
|
1570
|
+
function D(w, A, p) {
|
|
1571
|
+
var o = C.indexOf(A) === -1 ? k() : N();
|
|
1572
|
+
w.dispatchEvent ? w.dispatchEvent(o) : w.fireEvent("on" + A, o);
|
|
1573
|
+
function N() {
|
|
1574
1574
|
var f;
|
|
1575
|
-
return g.createEvent ? (f = g.createEvent("Event"), f.initEvent(
|
|
1575
|
+
return g.createEvent ? (f = g.createEvent("Event"), f.initEvent(A, !0, !0)) : g.createEventObject && (f = g.createEventObject()), f;
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return new T(
|
|
1577
|
+
function k() {
|
|
1578
|
+
return new T(A, { detail: p });
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return function(
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
},
|
|
1587
|
-
|
|
1588
|
-
},
|
|
1581
|
+
function O(w, A, p) {
|
|
1582
|
+
return function(N) {
|
|
1583
|
+
var k = N || r.event;
|
|
1584
|
+
k.target = k.target || k.srcElement, k.preventDefault = k.preventDefault || function() {
|
|
1585
|
+
k.returnValue = !1;
|
|
1586
|
+
}, k.stopPropagation = k.stopPropagation || function() {
|
|
1587
|
+
k.cancelBubble = !0;
|
|
1588
|
+
}, k.which = k.which || k.keyCode, p.call(w, k);
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
|
-
function G(
|
|
1592
|
-
var o =
|
|
1591
|
+
function G(w, A, p) {
|
|
1592
|
+
var o = B(w, A, p) || O(w, A, p);
|
|
1593
1593
|
return u.push({
|
|
1594
1594
|
wrapper: o,
|
|
1595
|
-
element:
|
|
1596
|
-
type:
|
|
1595
|
+
element: w,
|
|
1596
|
+
type: A,
|
|
1597
1597
|
fn: p
|
|
1598
1598
|
}), o;
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
var o =
|
|
1600
|
+
function B(w, A, p) {
|
|
1601
|
+
var o = S(w, A, p);
|
|
1602
1602
|
if (o) {
|
|
1603
|
-
var
|
|
1604
|
-
return u.splice(o, 1),
|
|
1603
|
+
var N = u[o].wrapper;
|
|
1604
|
+
return u.splice(o, 1), N;
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
var o,
|
|
1607
|
+
function S(w, A, p) {
|
|
1608
|
+
var o, N;
|
|
1609
1609
|
for (o = 0; o < u.length; o++)
|
|
1610
|
-
if (
|
|
1610
|
+
if (N = u[o], N.element === w && N.type === A && N.fn === p)
|
|
1611
1611
|
return o;
|
|
1612
1612
|
}
|
|
1613
1613
|
}).call(this, typeof me < "u" ? me : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1614
1614
|
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
1615
1615
|
7: [function(t, h, c) {
|
|
1616
1616
|
(function(r) {
|
|
1617
|
-
var T = [],
|
|
1618
|
-
for (
|
|
1619
|
-
g.test(
|
|
1617
|
+
var T = [], C = "", g = /^on/;
|
|
1618
|
+
for (C in r)
|
|
1619
|
+
g.test(C) && T.push(C.slice(2));
|
|
1620
1620
|
h.exports = T;
|
|
1621
1621
|
}).call(this, typeof me < "u" ? me : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1622
1622
|
}, {}],
|
|
1623
1623
|
8: [function(t, h, c) {
|
|
1624
1624
|
(function(r) {
|
|
1625
1625
|
var T = r.CustomEvent;
|
|
1626
|
-
function
|
|
1626
|
+
function C() {
|
|
1627
1627
|
try {
|
|
1628
1628
|
var g = new T("cat", { detail: { foo: "bar" } });
|
|
1629
1629
|
return g.type === "cat" && g.detail.foo === "bar";
|
|
@@ -1631,7 +1631,7 @@ var bt = { exports: {} };
|
|
|
1631
1631
|
}
|
|
1632
1632
|
return !1;
|
|
1633
1633
|
}
|
|
1634
|
-
h.exports =
|
|
1634
|
+
h.exports = C() ? T : (
|
|
1635
1635
|
// IE >= 9
|
|
1636
1636
|
typeof document < "u" && typeof document.createEvent == "function" ? function(E, P) {
|
|
1637
1637
|
var u = document.createEvent("CustomEvent");
|
|
@@ -1647,7 +1647,7 @@ var bt = { exports: {} };
|
|
|
1647
1647
|
}).call(this, typeof me < "u" ? me : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1648
1648
|
}, {}],
|
|
1649
1649
|
9: [function(t, h, c) {
|
|
1650
|
-
var r = h.exports = {}, T,
|
|
1650
|
+
var r = h.exports = {}, T, C;
|
|
1651
1651
|
function g() {
|
|
1652
1652
|
throw new Error("setTimeout has not been defined");
|
|
1653
1653
|
}
|
|
@@ -1661,79 +1661,79 @@ var bt = { exports: {} };
|
|
|
1661
1661
|
T = g;
|
|
1662
1662
|
}
|
|
1663
1663
|
try {
|
|
1664
|
-
typeof clearTimeout == "function" ?
|
|
1664
|
+
typeof clearTimeout == "function" ? C = clearTimeout : C = E;
|
|
1665
1665
|
} catch {
|
|
1666
|
-
|
|
1666
|
+
C = E;
|
|
1667
1667
|
}
|
|
1668
1668
|
})();
|
|
1669
|
-
function P(
|
|
1669
|
+
function P(S) {
|
|
1670
1670
|
if (T === setTimeout)
|
|
1671
|
-
return setTimeout(
|
|
1671
|
+
return setTimeout(S, 0);
|
|
1672
1672
|
if ((T === g || !T) && setTimeout)
|
|
1673
|
-
return T = setTimeout, setTimeout(
|
|
1673
|
+
return T = setTimeout, setTimeout(S, 0);
|
|
1674
1674
|
try {
|
|
1675
|
-
return T(
|
|
1675
|
+
return T(S, 0);
|
|
1676
1676
|
} catch {
|
|
1677
1677
|
try {
|
|
1678
|
-
return T.call(null,
|
|
1678
|
+
return T.call(null, S, 0);
|
|
1679
1679
|
} catch {
|
|
1680
|
-
return T.call(this,
|
|
1680
|
+
return T.call(this, S, 0);
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
|
-
function u(
|
|
1685
|
-
if (
|
|
1686
|
-
return clearTimeout(
|
|
1687
|
-
if ((
|
|
1688
|
-
return
|
|
1684
|
+
function u(S) {
|
|
1685
|
+
if (C === clearTimeout)
|
|
1686
|
+
return clearTimeout(S);
|
|
1687
|
+
if ((C === E || !C) && clearTimeout)
|
|
1688
|
+
return C = clearTimeout, clearTimeout(S);
|
|
1689
1689
|
try {
|
|
1690
|
-
return
|
|
1690
|
+
return C(S);
|
|
1691
1691
|
} catch {
|
|
1692
1692
|
try {
|
|
1693
|
-
return
|
|
1693
|
+
return C.call(null, S);
|
|
1694
1694
|
} catch {
|
|
1695
|
-
return
|
|
1695
|
+
return C.call(this, S);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
1698
|
}
|
|
1699
1699
|
var l = [], d = !1, i, n = -1;
|
|
1700
|
-
function
|
|
1701
|
-
!d || !i || (d = !1, i.length ? l = i.concat(l) : n = -1, l.length &&
|
|
1700
|
+
function D() {
|
|
1701
|
+
!d || !i || (d = !1, i.length ? l = i.concat(l) : n = -1, l.length && O());
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function O() {
|
|
1704
1704
|
if (!d) {
|
|
1705
|
-
var
|
|
1705
|
+
var S = P(D);
|
|
1706
1706
|
d = !0;
|
|
1707
|
-
for (var
|
|
1708
|
-
for (i = l, l = []; ++n <
|
|
1707
|
+
for (var w = l.length; w; ) {
|
|
1708
|
+
for (i = l, l = []; ++n < w; )
|
|
1709
1709
|
i && i[n].run();
|
|
1710
|
-
n = -1,
|
|
1710
|
+
n = -1, w = l.length;
|
|
1711
1711
|
}
|
|
1712
|
-
i = null, d = !1, u(
|
|
1712
|
+
i = null, d = !1, u(S);
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
-
r.nextTick = function(
|
|
1716
|
-
var
|
|
1715
|
+
r.nextTick = function(S) {
|
|
1716
|
+
var w = new Array(arguments.length - 1);
|
|
1717
1717
|
if (arguments.length > 1)
|
|
1718
|
-
for (var
|
|
1719
|
-
|
|
1720
|
-
l.push(new G(
|
|
1718
|
+
for (var A = 1; A < arguments.length; A++)
|
|
1719
|
+
w[A - 1] = arguments[A];
|
|
1720
|
+
l.push(new G(S, w)), l.length === 1 && !d && P(O);
|
|
1721
1721
|
};
|
|
1722
|
-
function G(
|
|
1723
|
-
this.fun =
|
|
1722
|
+
function G(S, w) {
|
|
1723
|
+
this.fun = S, this.array = w;
|
|
1724
1724
|
}
|
|
1725
1725
|
G.prototype.run = function() {
|
|
1726
1726
|
this.fun.apply(null, this.array);
|
|
1727
1727
|
}, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version = "", r.versions = {};
|
|
1728
|
-
function
|
|
1728
|
+
function B() {
|
|
1729
1729
|
}
|
|
1730
|
-
r.on =
|
|
1730
|
+
r.on = B, r.addListener = B, r.once = B, r.off = B, r.removeListener = B, r.removeAllListeners = B, r.emit = B, r.prependListener = B, r.prependOnceListener = B, r.listeners = function(S) {
|
|
1731
1731
|
return [];
|
|
1732
|
-
}, r.binding = function(
|
|
1732
|
+
}, r.binding = function(S) {
|
|
1733
1733
|
throw new Error("process.binding is not supported");
|
|
1734
1734
|
}, r.cwd = function() {
|
|
1735
1735
|
return "/";
|
|
1736
|
-
}, r.chdir = function(
|
|
1736
|
+
}, r.chdir = function(S) {
|
|
1737
1737
|
throw new Error("process.chdir is not supported");
|
|
1738
1738
|
}, r.umask = function() {
|
|
1739
1739
|
return 0;
|
|
@@ -1741,17 +1741,17 @@ var bt = { exports: {} };
|
|
|
1741
1741
|
}, {}],
|
|
1742
1742
|
10: [function(t, h, c) {
|
|
1743
1743
|
(function(r) {
|
|
1744
|
-
var T = typeof r == "function",
|
|
1745
|
-
T ?
|
|
1744
|
+
var T = typeof r == "function", C;
|
|
1745
|
+
T ? C = function(g) {
|
|
1746
1746
|
r(g);
|
|
1747
|
-
} :
|
|
1747
|
+
} : C = function(g) {
|
|
1748
1748
|
setTimeout(g, 0);
|
|
1749
|
-
}, h.exports =
|
|
1749
|
+
}, h.exports = C;
|
|
1750
1750
|
}).call(this, t("timers").setImmediate);
|
|
1751
1751
|
}, { timers: 11 }],
|
|
1752
1752
|
11: [function(t, h, c) {
|
|
1753
1753
|
(function(r, T) {
|
|
1754
|
-
var
|
|
1754
|
+
var C = t("process/browser.js").nextTick, g = Function.prototype.apply, E = Array.prototype.slice, P = {}, u = 0;
|
|
1755
1755
|
c.setTimeout = function() {
|
|
1756
1756
|
return new l(g.call(setTimeout, window, arguments), clearTimeout);
|
|
1757
1757
|
}, c.setInterval = function() {
|
|
@@ -1777,7 +1777,7 @@ var bt = { exports: {} };
|
|
|
1777
1777
|
}, i));
|
|
1778
1778
|
}, c.setImmediate = typeof r == "function" ? r : function(d) {
|
|
1779
1779
|
var i = u++, n = arguments.length < 2 ? !1 : E.call(arguments, 1);
|
|
1780
|
-
return P[i] = !0,
|
|
1780
|
+
return P[i] = !0, C(function() {
|
|
1781
1781
|
P[i] && (n ? d.apply(null, n) : d.call(null), c.clearImmediate(i));
|
|
1782
1782
|
}), i;
|
|
1783
1783
|
}, c.clearImmediate = typeof T == "function" ? T : function(d) {
|
|
@@ -1791,8 +1791,8 @@ var bt = { exports: {} };
|
|
|
1791
1791
|
var En = bt.exports;
|
|
1792
1792
|
const rt = /* @__PURE__ */ Pn(En);
|
|
1793
1793
|
function Mn(e) {
|
|
1794
|
-
let
|
|
1795
|
-
function t(c, r, T,
|
|
1794
|
+
let v;
|
|
1795
|
+
function t(c, r, T, C) {
|
|
1796
1796
|
const g = e.schema;
|
|
1797
1797
|
if (!(g != null && g.buttons))
|
|
1798
1798
|
return;
|
|
@@ -1803,207 +1803,205 @@ function Mn(e) {
|
|
|
1803
1803
|
} else
|
|
1804
1804
|
E = Array.from(r.children).length;
|
|
1805
1805
|
const P = c.getAttribute("id"), u = Array.from(r.children).findIndex((d) => d.getAttribute("id") === P), l = g.buttons[u];
|
|
1806
|
-
u !== E && u > -1 && E > -1 && (u < E && (E = E - 1), g.buttons.splice(u, 1), g.buttons.splice(E, 0, l),
|
|
1806
|
+
u !== E && u > -1 && E > -1 && (u < E && (E = E - 1), g.buttons.splice(u, 1), g.buttons.splice(E, 0, l), C(), Te(() => {
|
|
1807
1807
|
const d = r.querySelector(".dgComponentSelected");
|
|
1808
|
-
d != null && d.className.includes("dgComponentSelected") && (d.classList.remove("dgComponentSelected"), d.classList.remove("dgComponentFocused"), d.click()),
|
|
1808
|
+
d != null && d.className.includes("dgComponentSelected") && (d.classList.remove("dgComponentSelected"), d.classList.remove("dgComponentFocused"), d.click()), Ne.value++;
|
|
1809
1809
|
}));
|
|
1810
1810
|
}
|
|
1811
1811
|
function h(c, r, T) {
|
|
1812
|
-
|
|
1812
|
+
v && v.destroy(), !(!rt || !c || !r) && (v = rt([c], {
|
|
1813
1813
|
mirrorContainer: r,
|
|
1814
1814
|
direction: "horizontal",
|
|
1815
|
-
getMirrorText(
|
|
1816
|
-
return
|
|
1815
|
+
getMirrorText(C) {
|
|
1816
|
+
return C.innerText;
|
|
1817
1817
|
},
|
|
1818
1818
|
// 判断是否可移动
|
|
1819
|
-
moves(
|
|
1819
|
+
moves(C, g, E) {
|
|
1820
1820
|
let P = !0;
|
|
1821
|
-
return E.classList.contains("dropdown-item") ? (P = !1, P) : (
|
|
1821
|
+
return E.classList.contains("dropdown-item") ? (P = !1, P) : (C.classList.contains("no-drag") && (P = !1), P);
|
|
1822
1822
|
}
|
|
1823
|
-
}).on("drop", (
|
|
1823
|
+
}).on("drop", (C, g, E, P) => t(C, g, P, T)));
|
|
1824
1824
|
}
|
|
1825
1825
|
return {
|
|
1826
|
-
dragulaInstance:
|
|
1826
|
+
dragulaInstance: v,
|
|
1827
1827
|
initDragula: h
|
|
1828
1828
|
};
|
|
1829
1829
|
}
|
|
1830
|
-
function Rn(e,
|
|
1830
|
+
function Rn(e, v, t) {
|
|
1831
1831
|
const {
|
|
1832
1832
|
renderToolbarItemDesigner: h,
|
|
1833
1833
|
actionHandlers: c
|
|
1834
1834
|
} = t;
|
|
1835
1835
|
let r;
|
|
1836
|
-
function T(
|
|
1837
|
-
r =
|
|
1838
|
-
}
|
|
1839
|
-
function
|
|
1840
|
-
const
|
|
1841
|
-
if (
|
|
1842
|
-
if (document.body.click(), typeof
|
|
1843
|
-
|
|
1836
|
+
function T(B) {
|
|
1837
|
+
r = B;
|
|
1838
|
+
}
|
|
1839
|
+
function C(B, S = null) {
|
|
1840
|
+
const w = v.value.find((A) => A.id === B.id);
|
|
1841
|
+
if (w.isDP)
|
|
1842
|
+
if (document.body.click(), typeof S == "boolean")
|
|
1843
|
+
w.expanded = S;
|
|
1844
1844
|
else {
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1845
|
+
const A = B.expanded;
|
|
1846
|
+
w.expanded = !A;
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
|
-
c.toggleDropdownMenu =
|
|
1850
|
-
function g(
|
|
1851
|
-
var
|
|
1852
|
-
const
|
|
1849
|
+
c.toggleDropdownMenu = C;
|
|
1850
|
+
function g(B) {
|
|
1851
|
+
var w;
|
|
1852
|
+
const S = {
|
|
1853
1853
|
"dropdown-menu": !0
|
|
1854
1854
|
};
|
|
1855
|
-
if (
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1855
|
+
if (B.class) {
|
|
1856
|
+
const A = (w = B.menuClass) == null ? void 0 : w.split(" ");
|
|
1857
|
+
A && A.length && A.reduce((p, o) => (p[o] = !0, p), S);
|
|
1858
1858
|
}
|
|
1859
|
-
return
|
|
1859
|
+
return S;
|
|
1860
1860
|
}
|
|
1861
|
-
function E(
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
disabled: j.disabled === !1,
|
|
1861
|
+
function E(B) {
|
|
1862
|
+
const S = {
|
|
1863
|
+
disabled: B.disabled === !1,
|
|
1865
1864
|
"dropdown-submenu": !0,
|
|
1866
1865
|
"f-rt-dropdown": !0,
|
|
1867
1866
|
"text-truncate": !0
|
|
1868
|
-
}
|
|
1869
|
-
return
|
|
1867
|
+
};
|
|
1868
|
+
return ne(S, B.dropdownClass || "");
|
|
1870
1869
|
}
|
|
1871
|
-
function P(
|
|
1872
|
-
|
|
1870
|
+
function P(B) {
|
|
1871
|
+
return ne({
|
|
1873
1872
|
disabled: !1,
|
|
1874
1873
|
"dropdown-item": !0,
|
|
1875
1874
|
"f-rt-btn": !0,
|
|
1876
1875
|
"position-relative": !0,
|
|
1877
1876
|
"farris-component": !0,
|
|
1878
1877
|
"text-truncate": !0
|
|
1879
|
-
},
|
|
1880
|
-
return b && b.length && b.reduce((O, p) => (O[p] = !0, O), D), D;
|
|
1878
|
+
}, B.class || "");
|
|
1881
1879
|
}
|
|
1882
1880
|
let u;
|
|
1883
1881
|
const l = /* @__PURE__ */ new Map();
|
|
1884
|
-
function d(
|
|
1885
|
-
|
|
1886
|
-
const
|
|
1887
|
-
if (
|
|
1888
|
-
if (l.has(
|
|
1889
|
-
const p = l.get(
|
|
1890
|
-
p && (p.expanded = !1, l.delete(
|
|
1882
|
+
function d(B, S, w) {
|
|
1883
|
+
B.stopPropagation();
|
|
1884
|
+
const A = w ? w.id : "__top_item__";
|
|
1885
|
+
if (S.children && S.children.length && (S.expanded = !S.expanded, S.expanded)) {
|
|
1886
|
+
if (l.has(A) && l.get(A) !== S) {
|
|
1887
|
+
const p = l.get(A);
|
|
1888
|
+
p && (p.expanded = !1, l.delete(A));
|
|
1891
1889
|
}
|
|
1892
|
-
l.set(
|
|
1890
|
+
l.set(A, S);
|
|
1893
1891
|
}
|
|
1894
1892
|
}
|
|
1895
|
-
function i(
|
|
1896
|
-
var
|
|
1897
|
-
return (
|
|
1898
|
-
class: E(
|
|
1899
|
-
id:
|
|
1893
|
+
function i(B) {
|
|
1894
|
+
var S;
|
|
1895
|
+
return (S = B.children) == null ? void 0 : S.map((w, A) => w.children && w.children.length ? L("li", {
|
|
1896
|
+
class: E(w),
|
|
1897
|
+
id: w.id
|
|
1900
1898
|
}, [L("span", {
|
|
1901
|
-
class: P(
|
|
1902
|
-
onClick: (p) => d(p,
|
|
1903
|
-
}, [
|
|
1899
|
+
class: P(w),
|
|
1900
|
+
onClick: (p) => d(p, w, B)
|
|
1901
|
+
}, [w.text, L("i", {
|
|
1904
1902
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1905
1903
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1906
|
-
}, null)]), u(
|
|
1904
|
+
}, null)]), u(w, w)]) : h(w, A, !0));
|
|
1907
1905
|
}
|
|
1908
|
-
function n(
|
|
1909
|
-
return
|
|
1906
|
+
function n(B) {
|
|
1907
|
+
return B === "page-header" || B === "drawer-header-toolbar";
|
|
1910
1908
|
}
|
|
1911
|
-
function
|
|
1909
|
+
function D(B, S, w, A) {
|
|
1912
1910
|
const {
|
|
1913
|
-
height:
|
|
1914
|
-
left:
|
|
1911
|
+
height: N,
|
|
1912
|
+
left: k,
|
|
1915
1913
|
top: f
|
|
1916
|
-
} =
|
|
1917
|
-
width:
|
|
1914
|
+
} = A[0], {
|
|
1915
|
+
width: m,
|
|
1918
1916
|
height: s
|
|
1919
|
-
} =
|
|
1920
|
-
marginTop:
|
|
1921
|
-
marginBottom:
|
|
1922
|
-
} = getComputedStyle(
|
|
1917
|
+
} = w.getBoundingClientRect(), {
|
|
1918
|
+
marginTop: b,
|
|
1919
|
+
marginBottom: I
|
|
1920
|
+
} = getComputedStyle(w), M = Math.ceil(parseFloat(b)) + Math.ceil(parseFloat(I)), W = f + N, Y = S == null ? void 0 : S.getBoundingClientRect();
|
|
1923
1921
|
function X() {
|
|
1924
1922
|
let U = 0, H = "left";
|
|
1925
1923
|
const q = Y ? Y.right : window.innerWidth, te = Y ? Y.left : 0;
|
|
1926
|
-
return U = q -
|
|
1924
|
+
return U = q - k - 10, q - k < m && k - te > q - k && (H = "right", U = k - te - 10), {
|
|
1927
1925
|
hposition: H,
|
|
1928
1926
|
maxWidth: Math.min(U, 300)
|
|
1929
1927
|
};
|
|
1930
1928
|
}
|
|
1931
|
-
let
|
|
1932
|
-
if (
|
|
1933
|
-
|
|
1929
|
+
let _ = 0, F = "bottom";
|
|
1930
|
+
if (B === "tabs" || B === "section")
|
|
1931
|
+
_ = S.getBoundingClientRect().bottom - W - M - 10;
|
|
1934
1932
|
else {
|
|
1935
1933
|
const U = Y ? Y.bottom : window.innerHeight;
|
|
1936
|
-
|
|
1934
|
+
_ = n(B) ? U - W : f, _ = _ - M - 10, F = n(B) ? "bottom" : "top";
|
|
1937
1935
|
}
|
|
1938
1936
|
const V = X();
|
|
1939
1937
|
return {
|
|
1940
|
-
position:
|
|
1938
|
+
position: F + "-" + V.hposition,
|
|
1941
1939
|
maxWidth: V.maxWidth,
|
|
1942
|
-
maxHeight:
|
|
1940
|
+
maxHeight: _
|
|
1943
1941
|
};
|
|
1944
1942
|
}
|
|
1945
|
-
function B
|
|
1946
|
-
var o,
|
|
1947
|
-
const
|
|
1948
|
-
display:
|
|
1943
|
+
function O(B) {
|
|
1944
|
+
var o, N, k, f;
|
|
1945
|
+
const S = "300px", w = {
|
|
1946
|
+
display: B.expanded === !0 ? "block" : "none",
|
|
1949
1947
|
position: "absolute",
|
|
1950
|
-
maxWidth:
|
|
1948
|
+
maxWidth: S,
|
|
1951
1949
|
minWidth: "120px"
|
|
1952
1950
|
};
|
|
1953
1951
|
if (!(r != null && r.value))
|
|
1954
|
-
return
|
|
1955
|
-
const
|
|
1956
|
-
if (
|
|
1957
|
-
const
|
|
1958
|
-
if (!
|
|
1959
|
-
return
|
|
1960
|
-
|
|
1952
|
+
return w;
|
|
1953
|
+
const A = r.value.querySelector("#" + B.id), p = A == null ? void 0 : A.getClientRects();
|
|
1954
|
+
if (A && p && p.length > 0) {
|
|
1955
|
+
const m = A ? A.querySelector("#" + B.id + "_menu") : null;
|
|
1956
|
+
if (!m || B.expanded !== !0)
|
|
1957
|
+
return w;
|
|
1958
|
+
m.style.visibility = "hidden", m.style.display = "block", m.style.maxHeight = "auto", m.style.maxWidth = S;
|
|
1961
1959
|
let s;
|
|
1962
1960
|
switch (c.toolbarPosition) {
|
|
1963
1961
|
case "tabs":
|
|
1964
1962
|
s = (o = r.value) == null ? void 0 : o.closest(".farris-tabs");
|
|
1965
1963
|
break;
|
|
1966
1964
|
case "section":
|
|
1967
|
-
s = (
|
|
1965
|
+
s = (N = r.value) == null ? void 0 : N.closest(".f-section");
|
|
1968
1966
|
break;
|
|
1969
1967
|
case "drawer-header-toolbar":
|
|
1970
1968
|
case "drawer-footer-toolbar":
|
|
1971
|
-
s = (
|
|
1969
|
+
s = (k = r.value) == null ? void 0 : k.closest(".f-drawer-container");
|
|
1972
1970
|
break;
|
|
1973
1971
|
default:
|
|
1974
1972
|
s = (f = r.value) == null ? void 0 : f.closest(".f-page");
|
|
1975
1973
|
}
|
|
1976
|
-
const
|
|
1977
|
-
position:
|
|
1974
|
+
const b = D(c.toolbarPosition, s, m, p), {
|
|
1975
|
+
position: I,
|
|
1978
1976
|
maxHeight: M,
|
|
1979
1977
|
maxWidth: W
|
|
1980
|
-
} =
|
|
1981
|
-
|
|
1978
|
+
} = b;
|
|
1979
|
+
m.style.visibility = "visible";
|
|
1982
1980
|
const Y = {
|
|
1983
|
-
left:
|
|
1984
|
-
right:
|
|
1985
|
-
bottom:
|
|
1986
|
-
top:
|
|
1981
|
+
left: I.indexOf("left") > -1 ? 0 : "unset",
|
|
1982
|
+
right: I.indexOf("left") > -1 ? "unset" : 0,
|
|
1983
|
+
bottom: I.indexOf("bottom") > -1 ? "unset" : "100%",
|
|
1984
|
+
top: I.indexOf("bottom") > -1 ? "!00%" : "unset",
|
|
1987
1985
|
maxWidth: W ? W + "px" : "300px",
|
|
1988
1986
|
maxHeight: M ? M + "px" : "auto",
|
|
1989
1987
|
overflowY: M ? "auto" : "unset"
|
|
1990
1988
|
};
|
|
1991
|
-
Object.assign(
|
|
1989
|
+
Object.assign(w, Y);
|
|
1992
1990
|
}
|
|
1993
|
-
return
|
|
1991
|
+
return w;
|
|
1994
1992
|
}
|
|
1995
|
-
c.changeMenuPosition =
|
|
1993
|
+
c.changeMenuPosition = O, u = function(B, S) {
|
|
1996
1994
|
return L("ul", {
|
|
1997
|
-
class: g(
|
|
1998
|
-
style: B
|
|
1999
|
-
id:
|
|
2000
|
-
}, [i(
|
|
1995
|
+
class: g(B),
|
|
1996
|
+
style: O(B),
|
|
1997
|
+
id: B.id + "_menu"
|
|
1998
|
+
}, [i(B)]);
|
|
2001
1999
|
};
|
|
2002
|
-
function G(
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
}) : (l.forEach((
|
|
2006
|
-
|
|
2000
|
+
function G(B = "") {
|
|
2001
|
+
B && l.has(B) ? l.forEach((S, w) => {
|
|
2002
|
+
w !== B && (S.expanded = !1, l.delete(w));
|
|
2003
|
+
}) : (l.forEach((S) => {
|
|
2004
|
+
S.expanded = !1;
|
|
2007
2005
|
}), l.clear());
|
|
2008
2006
|
}
|
|
2009
2007
|
return {
|
|
@@ -2063,16 +2061,17 @@ class On extends dt {
|
|
|
2063
2061
|
parentPropertyID: "appearance",
|
|
2064
2062
|
visible: !h
|
|
2065
2063
|
},
|
|
2066
|
-
// "dropdownClass": {
|
|
2067
|
-
// "title": "在下拉菜单中的样式",
|
|
2068
|
-
// "type": "string",
|
|
2069
|
-
// "description": ""
|
|
2070
|
-
// },
|
|
2071
2064
|
icon: {
|
|
2072
2065
|
title: "图标",
|
|
2073
2066
|
type: "string",
|
|
2074
2067
|
description: ""
|
|
2075
2068
|
},
|
|
2069
|
+
dropdownClass: {
|
|
2070
|
+
title: "下拉按钮样式",
|
|
2071
|
+
type: "string",
|
|
2072
|
+
description: "下拉按钮样式",
|
|
2073
|
+
visible: !!(t.children && t.children.length > 0)
|
|
2074
|
+
},
|
|
2076
2075
|
split: {
|
|
2077
2076
|
title: "下拉按钮分离",
|
|
2078
2077
|
type: "boolean",
|
|
@@ -2110,61 +2109,61 @@ class On extends dt {
|
|
|
2110
2109
|
refreshPanelAfterChanged: !0,
|
|
2111
2110
|
tabId: "commands",
|
|
2112
2111
|
tabName: "交互",
|
|
2113
|
-
setPropertyRelates(
|
|
2114
|
-
const E =
|
|
2112
|
+
setPropertyRelates(C, g) {
|
|
2113
|
+
const E = C.propertyValue;
|
|
2115
2114
|
delete t[c.viewModelId], E && (E.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(t, c.viewModelId, E.events, E));
|
|
2116
2115
|
}
|
|
2117
2116
|
};
|
|
2118
2117
|
}
|
|
2119
2118
|
}
|
|
2120
|
-
function We(e,
|
|
2119
|
+
function We(e, v) {
|
|
2121
2120
|
if (!e)
|
|
2122
2121
|
return !1;
|
|
2123
|
-
const t =
|
|
2122
|
+
const t = v || [];
|
|
2124
2123
|
return (t == null ? void 0 : t.findIndex((c) => c.id === e)) === -1;
|
|
2125
2124
|
}
|
|
2126
|
-
function it(e,
|
|
2127
|
-
const t =
|
|
2125
|
+
function it(e, v) {
|
|
2126
|
+
const t = v || [];
|
|
2128
2127
|
let h = { parentIndex: -1, itemIndex: -1 };
|
|
2129
2128
|
return t.some((c, r) => {
|
|
2130
2129
|
if (c.children && c.children.length > 0) {
|
|
2131
|
-
const T = c.children.findIndex((
|
|
2130
|
+
const T = c.children.findIndex((C) => C.id === e);
|
|
2132
2131
|
return T > -1 ? (h = { parentIndex: r, itemIndex: T }, !0) : !1;
|
|
2133
2132
|
}
|
|
2134
2133
|
}), h;
|
|
2135
2134
|
}
|
|
2136
|
-
function st(e,
|
|
2137
|
-
const t =
|
|
2135
|
+
function st(e, v) {
|
|
2136
|
+
const t = v || [];
|
|
2138
2137
|
let h = { parentIndex: -1, itemIndex: -1 };
|
|
2139
2138
|
const c = t == null ? void 0 : t.findIndex((r) => r.id === e);
|
|
2140
2139
|
return c > -1 ? { parent: null, item: t[c] } : (t.some((r, T) => {
|
|
2141
2140
|
if (r.children && r.children.length > 0) {
|
|
2142
|
-
const
|
|
2143
|
-
return
|
|
2141
|
+
const C = r.children.findIndex((g) => g.id === e);
|
|
2142
|
+
return C > -1 ? (h = { parentIndex: T, itemIndex: C }, !0) : !1;
|
|
2144
2143
|
}
|
|
2145
2144
|
}), h.parentIndex < 0 ? { parent: null, item: null } : { parent: t[h.parentIndex], item: t[h.parentIndex].children[h.itemIndex] });
|
|
2146
2145
|
}
|
|
2147
|
-
function Bn(e,
|
|
2148
|
-
const t =
|
|
2146
|
+
function Bn(e, v) {
|
|
2147
|
+
const t = v || [], h = t == null ? void 0 : t.findIndex((c) => c.id === e);
|
|
2149
2148
|
return h > -1 && t[h].children && t[h].children.length > 0 ? t[h].expanded === !0 : !1;
|
|
2150
2149
|
}
|
|
2151
|
-
function jn(e,
|
|
2150
|
+
function jn(e, v) {
|
|
2152
2151
|
let t;
|
|
2153
2152
|
function h(u) {
|
|
2154
|
-
const { properties: l, title: d, ignore: i } = u, n = i && Array.isArray(i),
|
|
2155
|
-
if (d && (!n || !i.find((
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2153
|
+
const { properties: l, title: d, ignore: i } = u, n = i && Array.isArray(i), D = Object.keys(l).reduce((O, G) => ((!n || !i.find((B) => B === G)) && (O[G] = l[G].type === "object" && l[G].properties ? h(l[G]) : xe(l[G].default)), O), {});
|
|
2154
|
+
if (d && (!n || !i.find((O) => O === "id"))) {
|
|
2155
|
+
const O = d.toLowerCase().replace(/-/g, "_");
|
|
2156
|
+
D.id = `${O}_${Math.random().toString().slice(2, 6)}`;
|
|
2158
2157
|
}
|
|
2159
|
-
return
|
|
2158
|
+
return D;
|
|
2160
2159
|
}
|
|
2161
2160
|
function c(u) {
|
|
2162
2161
|
const { properties: l, title: d, required: i } = u;
|
|
2163
2162
|
if (i && Array.isArray(i)) {
|
|
2164
|
-
const n = i.reduce((
|
|
2165
|
-
if (d && i.find((
|
|
2166
|
-
const
|
|
2167
|
-
n.id = `${
|
|
2163
|
+
const n = i.reduce((D, O) => (D[O] = l[O].type === "object" && l[O].properties ? h(l[O]) : xe(l[O].default), D), {});
|
|
2164
|
+
if (d && i.find((D) => D === "id")) {
|
|
2165
|
+
const D = d.toLowerCase().replace(/-/g, "_");
|
|
2166
|
+
n.id = `${D}_${Math.random().toString().slice(2, 6)}`;
|
|
2168
2167
|
}
|
|
2169
2168
|
return n;
|
|
2170
2169
|
}
|
|
@@ -2176,8 +2175,8 @@ function jn(e, m) {
|
|
|
2176
2175
|
const i = e[u];
|
|
2177
2176
|
if (i) {
|
|
2178
2177
|
let n = c(i);
|
|
2179
|
-
const
|
|
2180
|
-
return n =
|
|
2178
|
+
const D = v[u];
|
|
2179
|
+
return n = D ? D({ getSchemaByType: r }, n, l, d) : n, t != null && t.appendIdentifyForNewControl && t.appendIdentifyForNewControl(n), n;
|
|
2181
2180
|
}
|
|
2182
2181
|
return null;
|
|
2183
2182
|
}
|
|
@@ -2185,15 +2184,15 @@ function jn(e, m) {
|
|
|
2185
2184
|
const d = h(l);
|
|
2186
2185
|
return Object.keys(d).reduce((i, n) => (Object.prototype.hasOwnProperty.call(u, n) && (i[n] && nt(i[n]) && nt(u[n] || !u[n]) ? Object.assign(i[n], u[n] || {}) : i[n] = u[n]), i), d), d;
|
|
2187
2186
|
}
|
|
2188
|
-
function
|
|
2187
|
+
function C(u, l) {
|
|
2189
2188
|
return Object.keys(u).filter((i) => u[i] != null).reduce((i, n) => {
|
|
2190
2189
|
if (l.has(n)) {
|
|
2191
|
-
const
|
|
2192
|
-
if (typeof
|
|
2193
|
-
i[
|
|
2190
|
+
const D = l.get(n);
|
|
2191
|
+
if (typeof D == "string")
|
|
2192
|
+
i[D] = u[n];
|
|
2194
2193
|
else {
|
|
2195
|
-
const
|
|
2196
|
-
Object.assign(i,
|
|
2194
|
+
const O = D(n, u[n], u);
|
|
2195
|
+
Object.assign(i, O);
|
|
2197
2196
|
}
|
|
2198
2197
|
} else
|
|
2199
2198
|
i[n] = u[n];
|
|
@@ -2202,7 +2201,7 @@ function jn(e, m) {
|
|
|
2202
2201
|
}
|
|
2203
2202
|
function g(u, l, d = /* @__PURE__ */ new Map()) {
|
|
2204
2203
|
const i = T(u, l);
|
|
2205
|
-
return
|
|
2204
|
+
return C(i, d);
|
|
2206
2205
|
}
|
|
2207
2206
|
function E(u) {
|
|
2208
2207
|
var d;
|
|
@@ -2211,9 +2210,9 @@ function jn(e, m) {
|
|
|
2211
2210
|
const i = e[l];
|
|
2212
2211
|
if (!i)
|
|
2213
2212
|
return u;
|
|
2214
|
-
const n = T(u, i),
|
|
2215
|
-
if (
|
|
2216
|
-
const
|
|
2213
|
+
const n = T(u, i), D = ((d = u.editor) == null ? void 0 : d.type) || "";
|
|
2214
|
+
if (D) {
|
|
2215
|
+
const O = e[D], G = T(u.editor, O);
|
|
2217
2216
|
n.editor = G;
|
|
2218
2217
|
}
|
|
2219
2218
|
return n;
|
|
@@ -2223,11 +2222,11 @@ function jn(e, m) {
|
|
|
2223
2222
|
function P(u) {
|
|
2224
2223
|
t = u;
|
|
2225
2224
|
}
|
|
2226
|
-
return { getSchemaByType: r, resolveSchemaWithDefaultValue: E, resolveSchemaToProps: g, mappingSchemaToProps:
|
|
2225
|
+
return { getSchemaByType: r, resolveSchemaWithDefaultValue: E, resolveSchemaToProps: g, mappingSchemaToProps: C, setDesignerContext: P };
|
|
2227
2226
|
}
|
|
2228
2227
|
const An = {}, _n = {}, { getSchemaByType: $n } = jn(An, _n);
|
|
2229
|
-
function Ln(e,
|
|
2230
|
-
function h(
|
|
2228
|
+
function Ln(e, v, t) {
|
|
2229
|
+
function h(m) {
|
|
2231
2230
|
return !1;
|
|
2232
2231
|
}
|
|
2233
2232
|
function c() {
|
|
@@ -2239,157 +2238,157 @@ function Ln(e, m, t) {
|
|
|
2239
2238
|
function T() {
|
|
2240
2239
|
return !1;
|
|
2241
2240
|
}
|
|
2242
|
-
function
|
|
2241
|
+
function C() {
|
|
2243
2242
|
return t.toolbarContext.schema.buttons || [];
|
|
2244
2243
|
}
|
|
2245
|
-
function g(
|
|
2244
|
+
function g(m, s = "") {
|
|
2246
2245
|
setTimeout(() => {
|
|
2247
2246
|
var W, Y;
|
|
2248
|
-
const
|
|
2249
|
-
let
|
|
2250
|
-
s && (
|
|
2251
|
-
const M = (Y =
|
|
2247
|
+
const b = (W = e.parent) == null ? void 0 : W.designerItemElementRef.value;
|
|
2248
|
+
let I;
|
|
2249
|
+
s && (I = b == null ? void 0 : b.querySelector("#" + s));
|
|
2250
|
+
const M = (Y = I || b) == null ? void 0 : Y.querySelector("#" + m);
|
|
2252
2251
|
M == null || M.click();
|
|
2253
2252
|
}, 0);
|
|
2254
2253
|
}
|
|
2255
|
-
function E(
|
|
2254
|
+
function E(m, s) {
|
|
2256
2255
|
s.disabled && s.disabled.expressionId && (s.disabled.expressionId = `${s.id}_disabled`), s.visible && s.visible.expressionId && (s.visible.expressionId = `${s.id}_visible`);
|
|
2257
|
-
const
|
|
2258
|
-
if (!
|
|
2256
|
+
const b = v.formSchemaUtils.getExpressions(), I = b.find((W) => W.target === m.id);
|
|
2257
|
+
if (!I || !I.rules || !I.rules.length)
|
|
2259
2258
|
return;
|
|
2260
2259
|
const M = {
|
|
2261
2260
|
target: s.id,
|
|
2262
2261
|
rules: [],
|
|
2263
2262
|
targetType: "Button"
|
|
2264
2263
|
};
|
|
2265
|
-
|
|
2266
|
-
const Y = Object.assign(
|
|
2264
|
+
I.rules.forEach((W) => {
|
|
2265
|
+
const Y = Object.assign(xe(W), {
|
|
2267
2266
|
id: `${s.id}_${W.type}`
|
|
2268
2267
|
});
|
|
2269
2268
|
M.rules.push(Y);
|
|
2270
|
-
}),
|
|
2269
|
+
}), b.push(M);
|
|
2271
2270
|
}
|
|
2272
2271
|
function P() {
|
|
2273
|
-
var
|
|
2274
|
-
const
|
|
2275
|
-
|
|
2272
|
+
var I;
|
|
2273
|
+
const m = e.schema, s = Object.assign(
|
|
2274
|
+
xe(m),
|
|
2276
2275
|
{
|
|
2277
2276
|
id: `${e.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
2278
2277
|
onClick: null
|
|
2279
2278
|
}
|
|
2280
2279
|
);
|
|
2281
|
-
(
|
|
2282
|
-
let
|
|
2283
|
-
return s.children && s.children.length && (
|
|
2280
|
+
(I = v == null ? void 0 : v.designerContext) != null && I.appendIdentifyForNewControl && v.designerContext.appendIdentifyForNewControl(s);
|
|
2281
|
+
let b = [];
|
|
2282
|
+
return s.children && s.children.length && (b = s.children.map((M) => {
|
|
2284
2283
|
var Y;
|
|
2285
|
-
const W =
|
|
2284
|
+
const W = xe(M);
|
|
2286
2285
|
return Object.assign(
|
|
2287
2286
|
W,
|
|
2288
2287
|
{
|
|
2289
2288
|
id: `${e.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
2290
2289
|
onClick: null
|
|
2291
2290
|
}
|
|
2292
|
-
), (Y =
|
|
2293
|
-
}), s.children =
|
|
2291
|
+
), (Y = v == null ? void 0 : v.designerContext) != null && Y.appendIdentifyForNewControl && v.designerContext.appendIdentifyForNewControl(W), E(M, W), W;
|
|
2292
|
+
}), s.children = b), E(m, s), s;
|
|
2294
2293
|
}
|
|
2295
2294
|
function u() {
|
|
2296
|
-
const
|
|
2297
|
-
return s && !s.id && s.type ===
|
|
2295
|
+
const m = e.schema.type || "response-toolbar-item", s = $n(m), b = m.toLowerCase().replace("-", "_");
|
|
2296
|
+
return s && !s.id && s.type === m && (s.id = `${b}_${Math.random().toString().slice(2, 6)}`, s.text = "按钮"), s;
|
|
2298
2297
|
}
|
|
2299
|
-
function l(
|
|
2300
|
-
const s =
|
|
2301
|
-
return { index:
|
|
2298
|
+
function l(m) {
|
|
2299
|
+
const s = C(), b = s == null ? void 0 : s.findIndex((M) => M.id === m), I = b === -1 ? null : s[b];
|
|
2300
|
+
return { index: b, toolbarItem: I };
|
|
2302
2301
|
}
|
|
2303
2302
|
function d() {
|
|
2304
|
-
const
|
|
2305
|
-
return We(
|
|
2303
|
+
const m = e.schema.id, s = C();
|
|
2304
|
+
return We(m, s);
|
|
2306
2305
|
}
|
|
2307
|
-
function i(
|
|
2308
|
-
const s =
|
|
2306
|
+
function i(m) {
|
|
2307
|
+
const s = v.formSchemaUtils.getExpressions();
|
|
2309
2308
|
if (!s || !s.length)
|
|
2310
2309
|
return;
|
|
2311
|
-
const
|
|
2312
|
-
const M = s && s.findIndex((W) => W.target ===
|
|
2310
|
+
const b = (I) => {
|
|
2311
|
+
const M = s && s.findIndex((W) => W.target === I.id);
|
|
2313
2312
|
M > -1 && s.splice(M, 1);
|
|
2314
2313
|
};
|
|
2315
|
-
|
|
2316
|
-
|
|
2314
|
+
b(m), m.children && m.children.length && m.children.forEach((I) => {
|
|
2315
|
+
b(I);
|
|
2317
2316
|
});
|
|
2318
2317
|
}
|
|
2319
|
-
function n(
|
|
2320
|
-
t.changeSelectedId(
|
|
2318
|
+
function n(m) {
|
|
2319
|
+
t.changeSelectedId(m);
|
|
2321
2320
|
}
|
|
2322
|
-
function
|
|
2323
|
-
|
|
2324
|
-
|
|
2321
|
+
function D(m) {
|
|
2322
|
+
v.formSchemaUtils.removeCommunicationInComponent(m), m.children && m.children.length && m.children.forEach((s) => {
|
|
2323
|
+
v.formSchemaUtils.removeCommunicationInComponent(s);
|
|
2325
2324
|
});
|
|
2326
2325
|
}
|
|
2327
|
-
function
|
|
2328
|
-
var
|
|
2329
|
-
if ((
|
|
2326
|
+
function O() {
|
|
2327
|
+
var I, M, W;
|
|
2328
|
+
if ((I = v == null ? void 0 : v.designerContext) != null && I.checkCanDeleteControl && !v.designerContext.checkCanDeleteControl(e.schema))
|
|
2330
2329
|
return;
|
|
2331
|
-
const
|
|
2332
|
-
s === -1 ||
|
|
2330
|
+
const m = C(), { parentIndex: s, itemIndex: b } = it(e.schema.id, m);
|
|
2331
|
+
s === -1 || b === -1 || (i(e.schema), D(e.schema), m[s].children.splice(b, 1), t.updateToolbarItems(), (M = e.setupContext) == null || M.emit("removeComponent"), (W = e.setupContext) == null || W.emit("selectionChange"), Ne.value++);
|
|
2333
2332
|
}
|
|
2334
2333
|
function G() {
|
|
2335
|
-
var
|
|
2336
|
-
if ((
|
|
2334
|
+
var I, M, W;
|
|
2335
|
+
if ((I = v == null ? void 0 : v.designerContext) != null && I.checkCanDeleteControl && !v.designerContext.checkCanDeleteControl(e.schema))
|
|
2337
2336
|
return;
|
|
2338
|
-
const
|
|
2339
|
-
|
|
2337
|
+
const m = e.schema.id, s = C(), b = s == null ? void 0 : s.findIndex((Y) => Y.id === m);
|
|
2338
|
+
b !== -1 && (i(s[b]), D(s[b]), s == null || s.splice(b, 1), t.updateToolbarItems(), (M = e.setupContext) == null || M.emit("removeComponent"), (W = e.setupContext) == null || W.emit("selectionChange"), Ne.value++);
|
|
2340
2339
|
}
|
|
2341
|
-
function
|
|
2340
|
+
function B(m = "Append") {
|
|
2342
2341
|
var Y;
|
|
2343
|
-
const s =
|
|
2344
|
-
if (
|
|
2342
|
+
const s = C(), { parentIndex: b, itemIndex: I } = it(e.schema.id, s);
|
|
2343
|
+
if (b === -1 || I === -1)
|
|
2345
2344
|
return;
|
|
2346
|
-
const M = u(), W =
|
|
2347
|
-
s[
|
|
2348
|
-
}
|
|
2349
|
-
function
|
|
2350
|
-
const { index:
|
|
2351
|
-
if (
|
|
2352
|
-
return { index:
|
|
2353
|
-
const
|
|
2354
|
-
return { index:
|
|
2355
|
-
}
|
|
2356
|
-
function
|
|
2357
|
-
var
|
|
2358
|
-
const
|
|
2359
|
-
|
|
2360
|
-
}
|
|
2361
|
-
function
|
|
2362
|
-
var
|
|
2363
|
-
const
|
|
2364
|
-
if (
|
|
2365
|
-
const W =
|
|
2366
|
-
W.push(
|
|
2367
|
-
const Y =
|
|
2368
|
-
Y[s].children = W, t.updateToolbarItems(), n(
|
|
2345
|
+
const M = u(), W = m === "Copy" ? P() : Object.assign({}, M);
|
|
2346
|
+
s[b].children.splice(I + 1, 0, W), t.updateToolbarItems(), n(W.id), (Y = e.setupContext) == null || Y.emit("addComponent");
|
|
2347
|
+
}
|
|
2348
|
+
function S(m, s) {
|
|
2349
|
+
const { index: b } = l(s);
|
|
2350
|
+
if (b === -1)
|
|
2351
|
+
return { index: b, schema: null };
|
|
2352
|
+
const I = u(), M = m === "Copy" ? P() : Object.assign({}, I);
|
|
2353
|
+
return { index: b, schema: M };
|
|
2354
|
+
}
|
|
2355
|
+
function w() {
|
|
2356
|
+
var I;
|
|
2357
|
+
const m = e.schema.id, { index: s, schema: b } = S("Copy", m);
|
|
2358
|
+
b && (C().splice(s + 1, 0, b), t.updateToolbarItems(), g(b.id), (I = e.setupContext) == null || I.emit("addComponent"));
|
|
2359
|
+
}
|
|
2360
|
+
function A() {
|
|
2361
|
+
var I;
|
|
2362
|
+
const m = e.schema.id, { index: s, schema: b } = S("Append", m);
|
|
2363
|
+
if (b && e.parent) {
|
|
2364
|
+
const W = C()[s].children || [];
|
|
2365
|
+
W.push(b);
|
|
2366
|
+
const Y = C();
|
|
2367
|
+
Y[s].children = W, t.updateToolbarItems(), n(b.id), (I = e.setupContext) == null || I.emit("addComponent");
|
|
2369
2368
|
}
|
|
2370
2369
|
}
|
|
2371
|
-
function p(
|
|
2370
|
+
function p(m) {
|
|
2372
2371
|
let s;
|
|
2373
2372
|
switch (e.schema.type) {
|
|
2374
2373
|
case "tab-toolbar-item":
|
|
2375
|
-
s = new Vt(
|
|
2374
|
+
s = new Vt(m, v);
|
|
2376
2375
|
break;
|
|
2377
2376
|
default:
|
|
2378
|
-
s = new On(
|
|
2377
|
+
s = new On(m, v, e.schema.type);
|
|
2379
2378
|
}
|
|
2380
2379
|
return s.getPropertyConfig(e.schema, d());
|
|
2381
2380
|
}
|
|
2382
|
-
function o(
|
|
2383
|
-
|
|
2381
|
+
function o(m) {
|
|
2382
|
+
m.stopPropagation(), m.stopImmediatePropagation();
|
|
2384
2383
|
}
|
|
2385
|
-
function
|
|
2386
|
-
const
|
|
2384
|
+
function N() {
|
|
2385
|
+
const m = [{
|
|
2387
2386
|
id: "delete",
|
|
2388
2387
|
title: "删除",
|
|
2389
2388
|
text: "",
|
|
2390
2389
|
icon: "f-icon-yxs_delete",
|
|
2391
2390
|
onClick: (s) => {
|
|
2392
|
-
o(s), d() ?
|
|
2391
|
+
o(s), d() ? O() : G();
|
|
2393
2392
|
}
|
|
2394
2393
|
}, {
|
|
2395
2394
|
id: "copy",
|
|
@@ -2397,19 +2396,19 @@ function Ln(e, m, t) {
|
|
|
2397
2396
|
icon: "f-icon-yxs_copy",
|
|
2398
2397
|
onClick: (s) => {
|
|
2399
2398
|
o(s);
|
|
2400
|
-
const { activeElement:
|
|
2401
|
-
|
|
2402
|
-
d() ?
|
|
2403
|
-
})) : d() ?
|
|
2399
|
+
const { activeElement: b } = document, I = b ? b.tagName.toLowerCase() : "";
|
|
2400
|
+
I && I === "input" || I === "textarea" ? (b == null || b.blur(), Te(() => {
|
|
2401
|
+
d() ? B("Copy") : w();
|
|
2402
|
+
})) : d() ? B("Copy") : w();
|
|
2404
2403
|
}
|
|
2405
2404
|
}];
|
|
2406
|
-
return
|
|
2405
|
+
return m.push(d() ? {
|
|
2407
2406
|
id: "appendSiblingButton",
|
|
2408
2407
|
title: "",
|
|
2409
2408
|
text: "新增同级",
|
|
2410
2409
|
icon: "f-icon-plus-circle",
|
|
2411
2410
|
onClick: (s) => {
|
|
2412
|
-
o(s),
|
|
2411
|
+
o(s), B();
|
|
2413
2412
|
}
|
|
2414
2413
|
} : {
|
|
2415
2414
|
id: "appendChildButton",
|
|
@@ -2417,18 +2416,18 @@ function Ln(e, m, t) {
|
|
|
2417
2416
|
text: "新增子级",
|
|
2418
2417
|
icon: "f-icon-plus-circle",
|
|
2419
2418
|
onClick: (s) => {
|
|
2420
|
-
o(s),
|
|
2419
|
+
o(s), A();
|
|
2421
2420
|
}
|
|
2422
|
-
}),
|
|
2421
|
+
}), m;
|
|
2423
2422
|
}
|
|
2424
|
-
function
|
|
2425
|
-
const { schema:
|
|
2426
|
-
i(
|
|
2423
|
+
function k() {
|
|
2424
|
+
const { schema: m } = e;
|
|
2425
|
+
i(m);
|
|
2427
2426
|
}
|
|
2428
2427
|
function f() {
|
|
2429
|
-
var
|
|
2430
|
-
if (e &&
|
|
2431
|
-
const { formSchemaUtils: M } =
|
|
2428
|
+
var m, s, b, I;
|
|
2429
|
+
if (e && v) {
|
|
2430
|
+
const { formSchemaUtils: M } = v, { schema: W } = e;
|
|
2432
2431
|
switch (W.type) {
|
|
2433
2432
|
case "response-toolbar-item": {
|
|
2434
2433
|
M.getControlBasicInfoMap().set(W.id, {
|
|
@@ -2441,8 +2440,8 @@ function Ln(e, m, t) {
|
|
|
2441
2440
|
case "section-toolbar-item":
|
|
2442
2441
|
case "drawer-toolbar-item": {
|
|
2443
2442
|
let Y;
|
|
2444
|
-
const X = (
|
|
2445
|
-
(X == null ? void 0 : X.schema.type) === "tabs" || (X == null ? void 0 : X.schema.type) === "section" || (X == null ? void 0 : X.schema.type) === "drawer" ? Y = (s = X.componentInstance) == null ? void 0 : s.value : Y = (
|
|
2443
|
+
const X = (m = e.parent) == null ? void 0 : m.parent;
|
|
2444
|
+
(X == null ? void 0 : X.schema.type) === "tabs" || (X == null ? void 0 : X.schema.type) === "section" || (X == null ? void 0 : X.schema.type) === "drawer" ? Y = (s = X.componentInstance) == null ? void 0 : s.value : Y = (I = (b = X == null ? void 0 : X.parent) == null ? void 0 : b.componentInstance) == null ? void 0 : I.value, Y != null && Y.setComponentBasicInfoMap && Y.setComponentBasicInfoMap();
|
|
2446
2445
|
}
|
|
2447
2446
|
}
|
|
2448
2447
|
}
|
|
@@ -2453,8 +2452,8 @@ function Ln(e, m, t) {
|
|
|
2453
2452
|
checkCanDeleteComponent: r,
|
|
2454
2453
|
checkCanAddComponent: T,
|
|
2455
2454
|
getPropsConfig: p,
|
|
2456
|
-
getCustomButtons:
|
|
2457
|
-
onRemoveComponent:
|
|
2455
|
+
getCustomButtons: N,
|
|
2456
|
+
onRemoveComponent: k,
|
|
2458
2457
|
setComponentBasicInfoMap: f
|
|
2459
2458
|
};
|
|
2460
2459
|
}
|
|
@@ -2462,22 +2461,22 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2462
2461
|
name: "FResponseToolbarItemDesign",
|
|
2463
2462
|
props: pt,
|
|
2464
2463
|
emits: ["Click", "dropdown", "clearAll"],
|
|
2465
|
-
setup(e,
|
|
2466
|
-
const t =
|
|
2464
|
+
setup(e, v) {
|
|
2465
|
+
const t = re(e.alignment), h = Ye(), c = re(), r = Ce("designer-host-service"), T = Ce("design-item-context"), C = Ce("toolbar-item-action"), g = Ln(T, r, C), E = Ut(c, T, g);
|
|
2467
2466
|
Ge(() => {
|
|
2468
2467
|
c.value.componentInstance = E;
|
|
2469
|
-
}),
|
|
2468
|
+
}), v.expose(E.value);
|
|
2470
2469
|
function P() {
|
|
2471
|
-
const
|
|
2470
|
+
const S = {
|
|
2472
2471
|
"f-icon": !0
|
|
2473
|
-
},
|
|
2474
|
-
return
|
|
2472
|
+
}, w = e.icon ? e.icon.trim() : "";
|
|
2473
|
+
return ne(S, w);
|
|
2475
2474
|
}
|
|
2476
2475
|
function u() {
|
|
2477
2476
|
return !!(e.icon && e.icon.trim());
|
|
2478
2477
|
}
|
|
2479
2478
|
const l = fe(() => {
|
|
2480
|
-
const
|
|
2479
|
+
const S = {
|
|
2481
2480
|
btn: !0,
|
|
2482
2481
|
"f-rt-btn": !0,
|
|
2483
2482
|
"f-btn-ml": !e.isDP && (t.value === "right" || t.value === "center"),
|
|
@@ -2488,7 +2487,7 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2488
2487
|
"text-truncate": !0
|
|
2489
2488
|
// 'f-rt-toggle':props.isDP&&!props.split
|
|
2490
2489
|
};
|
|
2491
|
-
return
|
|
2490
|
+
return ne(S, e.class);
|
|
2492
2491
|
}), d = fe(() => e.split ? {
|
|
2493
2492
|
display: "flex",
|
|
2494
2493
|
"align-items": "center"
|
|
@@ -2500,16 +2499,16 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2500
2499
|
"border-top-right-radius": "6px",
|
|
2501
2500
|
"border-bottom-right-radius": "6px"
|
|
2502
2501
|
}), i = fe(() => {
|
|
2503
|
-
const
|
|
2502
|
+
const S = {
|
|
2504
2503
|
btn: !0,
|
|
2505
2504
|
"dropdown-toggle": !0,
|
|
2506
2505
|
"f-btn-mr": t.value === "left",
|
|
2507
2506
|
"dropdown-toggle-split": !0,
|
|
2508
2507
|
"no-drag": !0
|
|
2509
2508
|
};
|
|
2510
|
-
return
|
|
2509
|
+
return ne(S, e.class);
|
|
2511
2510
|
}), n = fe(() => {
|
|
2512
|
-
let
|
|
2511
|
+
let S = {
|
|
2513
2512
|
btn: !e.isDPItem,
|
|
2514
2513
|
// 不是下拉按钮,不是下拉项
|
|
2515
2514
|
disabled: e.disabled === !0,
|
|
@@ -2521,22 +2520,23 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2521
2520
|
// 保证内部层级不被拖拽
|
|
2522
2521
|
"no-drag": !0
|
|
2523
2522
|
};
|
|
2524
|
-
return e.isDPItem || (
|
|
2523
|
+
return e.isDPItem || (S = ne(S, e.class || "")), e.isDP && (S = ne(S, e.dropdownClass || "")), S;
|
|
2525
2524
|
});
|
|
2526
|
-
function S
|
|
2527
|
-
|
|
2525
|
+
function D(S, w) {
|
|
2526
|
+
w && w.stopPropagation(), v.emit(S, {
|
|
2528
2527
|
id: e.id,
|
|
2529
2528
|
isDP: e.isDP
|
|
2530
2529
|
});
|
|
2531
2530
|
}
|
|
2532
|
-
function
|
|
2533
|
-
|
|
2531
|
+
function O() {
|
|
2532
|
+
const S = {
|
|
2534
2533
|
"btn-group": !0,
|
|
2535
2534
|
"no-drag": !0,
|
|
2536
2535
|
"f-rt-dropdown": !0,
|
|
2537
2536
|
"f-btn-ml": t.value === "right" || t.value === "center",
|
|
2538
2537
|
"f-btn-mr": t.value === "left"
|
|
2539
2538
|
};
|
|
2539
|
+
return ne(S, e.dropdownClass);
|
|
2540
2540
|
}
|
|
2541
2541
|
function G() {
|
|
2542
2542
|
return L("div", {
|
|
@@ -2545,25 +2545,25 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2545
2545
|
class: "farris-component position-relative",
|
|
2546
2546
|
style: "display:inline-block!important;"
|
|
2547
2547
|
}, [L("div", {
|
|
2548
|
-
class:
|
|
2548
|
+
class: O(),
|
|
2549
2549
|
id: e.id
|
|
2550
2550
|
}, [L("div", {
|
|
2551
2551
|
class: l.value,
|
|
2552
2552
|
style: d.value,
|
|
2553
|
-
onClick: () =>
|
|
2553
|
+
onClick: () => D("clearAll")
|
|
2554
2554
|
}, [h.shouldShowIcon(e) && L("i", {
|
|
2555
2555
|
class: h.iconClass(e)
|
|
2556
2556
|
}, null), L("span", null, [e.text]), !e.split && L("span", {
|
|
2557
2557
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
2558
2558
|
style: "margin:0 0.5rem 0 0.25rem;",
|
|
2559
|
-
onClick: (
|
|
2559
|
+
onClick: (S) => D("dropdown", S)
|
|
2560
2560
|
}, null)]), e.split && L("button", {
|
|
2561
2561
|
class: i.value,
|
|
2562
2562
|
style: "border-radius:0 6px 6px 0;",
|
|
2563
|
-
onClick: (
|
|
2564
|
-
}, null),
|
|
2563
|
+
onClick: (S) => D("dropdown", S)
|
|
2564
|
+
}, null), C.renderDropdownMenu(e.item, e.item)])]);
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2566
|
+
function B() {
|
|
2567
2567
|
return L("li", {
|
|
2568
2568
|
ref: c,
|
|
2569
2569
|
"data-dragref": `${T.schema.id}-container`,
|
|
@@ -2573,7 +2573,7 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2573
2573
|
class: h.iconClass(e)
|
|
2574
2574
|
}, null), e.text]);
|
|
2575
2575
|
}
|
|
2576
|
-
return () => e.isDP ? G() : e.isDPItem ?
|
|
2576
|
+
return () => e.isDP ? G() : e.isDPItem ? B() : L("div", {
|
|
2577
2577
|
ref: c,
|
|
2578
2578
|
"data-dragref": `${T.schema.id}-container`,
|
|
2579
2579
|
class: "farris-component position-relative",
|
|
@@ -2582,13 +2582,13 @@ const vt = /* @__PURE__ */ ze({
|
|
|
2582
2582
|
type: "button",
|
|
2583
2583
|
class: l.value,
|
|
2584
2584
|
id: e.id,
|
|
2585
|
-
onClick: () =>
|
|
2585
|
+
onClick: () => D("clearAll")
|
|
2586
2586
|
}, [u() && L("i", {
|
|
2587
2587
|
class: P()
|
|
2588
2588
|
}, null), e.text])]);
|
|
2589
2589
|
}
|
|
2590
2590
|
});
|
|
2591
|
-
function
|
|
2591
|
+
function Fn(e, v, t, h) {
|
|
2592
2592
|
function c(l, d, i, n) {
|
|
2593
2593
|
h.changeSelectedId((d == null ? void 0 : d.id) || ""), t && t.setupContext && t.setupContext.emit("selectionChange", l, d, i, n);
|
|
2594
2594
|
}
|
|
@@ -2598,12 +2598,12 @@ function Nn(e, m, t, h) {
|
|
|
2598
2598
|
const d = l.expanded;
|
|
2599
2599
|
h.clearAllDropdown(), h.toggleDropdownMenu(l, !d);
|
|
2600
2600
|
}
|
|
2601
|
-
function
|
|
2601
|
+
function C(l) {
|
|
2602
2602
|
h.clearAllDropdown(l.isDP ? l.id : "");
|
|
2603
2603
|
}
|
|
2604
2604
|
function g(l, d = "") {
|
|
2605
|
-
const i = e.items || [], n = d || l,
|
|
2606
|
-
return d ?
|
|
2605
|
+
const i = e.items || [], n = d || l, D = i.find((O) => O.id === n);
|
|
2606
|
+
return d ? D.children.find((O) => O.id === l) : D;
|
|
2607
2607
|
}
|
|
2608
2608
|
function E(l, d = !1) {
|
|
2609
2609
|
if (!d)
|
|
@@ -2618,12 +2618,12 @@ function Nn(e, m, t, h) {
|
|
|
2618
2618
|
i != null && i.classList.contains("dgComponentFocused") && (i == null || i.classList.remove("dgComponentSelected"));
|
|
2619
2619
|
}
|
|
2620
2620
|
function u(l, d, i = !1) {
|
|
2621
|
-
const n = g(l.id, l.parent),
|
|
2621
|
+
const n = g(l.id, l.parent), D = re(n);
|
|
2622
2622
|
return L(Yt, {
|
|
2623
2623
|
key: n.id,
|
|
2624
2624
|
class: ["p-0", i ? "d-block no-drag" : "d-inline-block"],
|
|
2625
|
-
modelValue:
|
|
2626
|
-
"onUpdate:modelValue": (
|
|
2625
|
+
modelValue: D.value,
|
|
2626
|
+
"onUpdate:modelValue": (O) => D.value = O,
|
|
2627
2627
|
canMove: !1,
|
|
2628
2628
|
childType: "response-toolbar-item",
|
|
2629
2629
|
childLabel: "按钮",
|
|
@@ -2632,11 +2632,11 @@ function Nn(e, m, t, h) {
|
|
|
2632
2632
|
id: n.id,
|
|
2633
2633
|
onSelectionChange: c,
|
|
2634
2634
|
onRemoveComponent: r,
|
|
2635
|
-
onMouseenter: (
|
|
2636
|
-
onMouseleave: (
|
|
2635
|
+
onMouseenter: (O) => E(O, i),
|
|
2636
|
+
onMouseleave: (O) => P(O, i)
|
|
2637
2637
|
}, {
|
|
2638
2638
|
default: () => {
|
|
2639
|
-
var
|
|
2639
|
+
var O;
|
|
2640
2640
|
return [L(vt, {
|
|
2641
2641
|
id: n.id,
|
|
2642
2642
|
disabled: n.disabled,
|
|
@@ -2646,10 +2646,11 @@ function Nn(e, m, t, h) {
|
|
|
2646
2646
|
item: l,
|
|
2647
2647
|
split: n.split,
|
|
2648
2648
|
isDPItem: l.isDPItem,
|
|
2649
|
-
class: ((
|
|
2649
|
+
class: ((O = l.appearance) == null ? void 0 : O.class) || "btn-secondary",
|
|
2650
|
+
dropdownClass: l.dropdownClass,
|
|
2650
2651
|
alignment: e.alignment || "right",
|
|
2651
2652
|
onDropdown: () => T(l),
|
|
2652
|
-
onClearAll: (G) =>
|
|
2653
|
+
onClearAll: (G) => C(G),
|
|
2653
2654
|
componentId: e.componentId
|
|
2654
2655
|
}, null)];
|
|
2655
2656
|
}
|
|
@@ -2660,7 +2661,7 @@ function Nn(e, m, t, h) {
|
|
|
2660
2661
|
actionHandlers: h
|
|
2661
2662
|
};
|
|
2662
2663
|
}
|
|
2663
|
-
function qe(e,
|
|
2664
|
+
function qe(e, v = !1, t = "") {
|
|
2664
2665
|
const h = [];
|
|
2665
2666
|
return e.reduce((c, r) => {
|
|
2666
2667
|
if (r.children && r.children.length > 0) {
|
|
@@ -2674,7 +2675,7 @@ function qe(e, m = !1, t = "") {
|
|
|
2674
2675
|
}));
|
|
2675
2676
|
} else
|
|
2676
2677
|
c.push(Object.assign({}, r, {
|
|
2677
|
-
isDPItem:
|
|
2678
|
+
isDPItem: v,
|
|
2678
2679
|
isDP: !1,
|
|
2679
2680
|
parent: t
|
|
2680
2681
|
}));
|
|
@@ -2685,69 +2686,69 @@ const Re = /* @__PURE__ */ ze({
|
|
|
2685
2686
|
name: "FResponseToolbarDesign",
|
|
2686
2687
|
props: bn,
|
|
2687
2688
|
emits: ["Click"],
|
|
2688
|
-
setup(e,
|
|
2689
|
-
const t =
|
|
2690
|
-
let
|
|
2691
|
-
const g = 15, E =
|
|
2692
|
-
clearAllDropdown: (
|
|
2689
|
+
setup(e, v) {
|
|
2690
|
+
const t = re(qe(e.items)), h = re(), c = re(), r = re(), T = re("");
|
|
2691
|
+
let C = 0;
|
|
2692
|
+
const g = 15, E = Ce("designer-host-service"), P = Ce("design-item-context"), u = {
|
|
2693
|
+
clearAllDropdown: (_) => {
|
|
2693
2694
|
},
|
|
2694
|
-
toggleDropdownMenu: (
|
|
2695
|
+
toggleDropdownMenu: (_) => {
|
|
2695
2696
|
},
|
|
2696
2697
|
updateToolbarItems: () => {
|
|
2697
2698
|
},
|
|
2698
|
-
changeSelectedId: (
|
|
2699
|
-
T.value =
|
|
2699
|
+
changeSelectedId: (_) => {
|
|
2700
|
+
T.value = _;
|
|
2700
2701
|
},
|
|
2701
|
-
renderDropdownMenu: (
|
|
2702
|
+
renderDropdownMenu: (_, F) => {
|
|
2702
2703
|
},
|
|
2703
2704
|
toolbarContext: P,
|
|
2704
|
-
changeMenuPosition: (
|
|
2705
|
+
changeMenuPosition: (_, F, V) => ({}),
|
|
2705
2706
|
toolbarPosition: ""
|
|
2706
|
-
}, l =
|
|
2707
|
+
}, l = kn(P, E, u), d = Xt(r, P, l), i = Ce("toolbar-item-handler"), {
|
|
2707
2708
|
initDragula: n,
|
|
2708
|
-
dragulaInstance:
|
|
2709
|
-
} = Mn(P),
|
|
2710
|
-
renderToolbarItemDesigner:
|
|
2709
|
+
dragulaInstance: D
|
|
2710
|
+
} = Mn(P), O = Ye(), G = Fn(e, c, P, u), B = Rn(O, t, G), {
|
|
2711
|
+
renderToolbarItemDesigner: S
|
|
2711
2712
|
} = G, {
|
|
2712
|
-
clearAllDropDownMenu:
|
|
2713
|
-
renderDropdownMenu:
|
|
2713
|
+
clearAllDropDownMenu: w,
|
|
2714
|
+
renderDropdownMenu: A,
|
|
2714
2715
|
setResponseToolbarRef: p
|
|
2715
|
-
} =
|
|
2716
|
-
qt("toolbar-item-action", u), u.renderDropdownMenu =
|
|
2717
|
-
T.value =
|
|
2716
|
+
} = B;
|
|
2717
|
+
qt("toolbar-item-action", u), u.renderDropdownMenu = A, p(r), i && (i.changeSelectedId = function(_) {
|
|
2718
|
+
T.value = _;
|
|
2718
2719
|
});
|
|
2719
2720
|
function o() {
|
|
2720
|
-
const
|
|
2721
|
-
|
|
2721
|
+
const _ = c.value.querySelector(".dgComponentSelected");
|
|
2722
|
+
_ && Ht(_);
|
|
2722
2723
|
}
|
|
2723
|
-
function
|
|
2724
|
+
function N() {
|
|
2724
2725
|
if (T.value)
|
|
2725
2726
|
if (We(T.value, t.value)) {
|
|
2726
2727
|
const {
|
|
2727
|
-
parent:
|
|
2728
|
-
item:
|
|
2728
|
+
parent: _,
|
|
2729
|
+
item: F
|
|
2729
2730
|
} = st(T.value, t.value);
|
|
2730
|
-
|
|
2731
|
+
_ && (u.toggleDropdownMenu(_, !0), setTimeout(() => {
|
|
2731
2732
|
var H;
|
|
2732
|
-
const V = r.value.querySelector("#" +
|
|
2733
|
+
const V = r.value.querySelector("#" + _.id), U = V == null ? void 0 : V.querySelector("#" + F.id);
|
|
2733
2734
|
(((H = U == null ? void 0 : U.parentElement) == null ? void 0 : H.className) || "").indexOf("dgComponentFocused") < 0 && (U == null || U.click());
|
|
2734
2735
|
}, 0));
|
|
2735
2736
|
} else
|
|
2736
2737
|
o();
|
|
2737
2738
|
}
|
|
2738
|
-
function
|
|
2739
|
-
t.value.filter((
|
|
2740
|
-
|
|
2741
|
-
}),
|
|
2739
|
+
function k(_ = "") {
|
|
2740
|
+
t.value.filter((F) => F.id !== _ && F.children && F.children.length > 0).forEach((F) => {
|
|
2741
|
+
F.expanded = !1;
|
|
2742
|
+
}), w(_);
|
|
2742
2743
|
}
|
|
2743
|
-
u.clearAllDropdown =
|
|
2744
|
+
u.clearAllDropdown = k;
|
|
2744
2745
|
function f() {
|
|
2745
2746
|
i && i.updateToolbarItems && i.updateToolbarItems();
|
|
2746
2747
|
}
|
|
2747
2748
|
u.updateToolbarItems = f;
|
|
2748
|
-
function
|
|
2749
|
-
if (
|
|
2750
|
-
const
|
|
2749
|
+
function m(_) {
|
|
2750
|
+
if (_) {
|
|
2751
|
+
const F = r.value.querySelector("#" + _.id), V = F.querySelector("#" + _.id + "_menu"), U = u.changeMenuPosition(_, F);
|
|
2751
2752
|
Object.keys(U).forEach((H) => {
|
|
2752
2753
|
V.style[H] = U[H];
|
|
2753
2754
|
});
|
|
@@ -2763,44 +2764,44 @@ const Re = /* @__PURE__ */ ze({
|
|
|
2763
2764
|
q.querySelector(".dropdown-toggle-split") ? q.querySelector(".f-rt-btn").style.maxWidth = V - 38 + "px" : q.style.maxWidth = V - 12 + "px";
|
|
2764
2765
|
});
|
|
2765
2766
|
}
|
|
2766
|
-
const
|
|
2767
|
-
var
|
|
2768
|
-
if (
|
|
2769
|
-
const U =
|
|
2767
|
+
const b = new ResizeObserver((_) => {
|
|
2768
|
+
var F;
|
|
2769
|
+
if (_.length) {
|
|
2770
|
+
const U = _[0].contentRect.width;
|
|
2770
2771
|
if (U === 0) {
|
|
2771
|
-
|
|
2772
|
+
C = 0;
|
|
2772
2773
|
return;
|
|
2773
2774
|
}
|
|
2774
|
-
if (Math.abs(U -
|
|
2775
|
-
if (
|
|
2775
|
+
if (Math.abs(U - C) > g) {
|
|
2776
|
+
if (C = U, We(T.value, t.value)) {
|
|
2776
2777
|
const {
|
|
2777
2778
|
parent: H,
|
|
2778
2779
|
item: q
|
|
2779
2780
|
} = st(T.value, t.value);
|
|
2780
|
-
|
|
2781
|
+
m(H);
|
|
2781
2782
|
} else if (Bn(T.value, t.value)) {
|
|
2782
|
-
const H = (
|
|
2783
|
-
|
|
2783
|
+
const H = (F = t.value) == null ? void 0 : F.find((q) => q.id === T.value);
|
|
2784
|
+
m(H);
|
|
2784
2785
|
} else
|
|
2785
|
-
|
|
2786
|
+
k();
|
|
2786
2787
|
s();
|
|
2787
2788
|
}
|
|
2788
2789
|
}
|
|
2789
2790
|
});
|
|
2790
2791
|
Ge(() => {
|
|
2791
|
-
|
|
2792
|
+
b.observe(r.value), C = r.value.clientWidth, r.value.componentInstance = d, n(c.value, h.value, f);
|
|
2792
2793
|
}), ut(() => {
|
|
2793
|
-
|
|
2794
|
-
}),
|
|
2795
|
-
const
|
|
2796
|
-
const
|
|
2794
|
+
b.disconnect(), D && D.destroy && D.destroy();
|
|
2795
|
+
}), v.expose(d.value);
|
|
2796
|
+
const I = fe(() => {
|
|
2797
|
+
const _ = {
|
|
2797
2798
|
"f-toolbar": !0,
|
|
2798
2799
|
"f-response-toolbar": !0,
|
|
2799
2800
|
"position-relative": !0,
|
|
2800
2801
|
"f-response-toolbar-sm": e.buttonSize === "sm",
|
|
2801
2802
|
"f-response-toolbar-lg": e.buttonSize === "lg"
|
|
2802
2803
|
};
|
|
2803
|
-
return
|
|
2804
|
+
return ne(_, e.customClass);
|
|
2804
2805
|
}), M = fe(() => ({
|
|
2805
2806
|
"text-left": e.alignment === "left",
|
|
2806
2807
|
"text-right": e.alignment === "right",
|
|
@@ -2810,19 +2811,19 @@ const Re = /* @__PURE__ */ ze({
|
|
|
2810
2811
|
"no-drag": !0,
|
|
2811
2812
|
"w-100": !0
|
|
2812
2813
|
}));
|
|
2813
|
-
|
|
2814
|
+
Ie(() => e.items, () => {
|
|
2814
2815
|
t.value = qe(e.items), Te(() => {
|
|
2815
|
-
|
|
2816
|
+
N(), s();
|
|
2816
2817
|
});
|
|
2817
2818
|
}, {
|
|
2818
2819
|
deep: !0
|
|
2819
2820
|
});
|
|
2820
|
-
function W(
|
|
2821
|
-
|
|
2821
|
+
function W(_) {
|
|
2822
|
+
_ && (_.stopPropagation(), _.preventDefault());
|
|
2822
2823
|
const {
|
|
2823
|
-
schema:
|
|
2824
|
+
schema: F
|
|
2824
2825
|
} = P;
|
|
2825
|
-
|
|
2826
|
+
F.buttons || (F.buttons = []);
|
|
2826
2827
|
let V = "";
|
|
2827
2828
|
switch (u.toolbarPosition) {
|
|
2828
2829
|
case "drawer-header-toolbar":
|
|
@@ -2839,10 +2840,10 @@ const Re = /* @__PURE__ */ ze({
|
|
|
2839
2840
|
V = "response-toolbar-item";
|
|
2840
2841
|
}
|
|
2841
2842
|
const U = at(V);
|
|
2842
|
-
U.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`,
|
|
2843
|
+
U.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, F.buttons.push(U);
|
|
2843
2844
|
}
|
|
2844
2845
|
function Y() {
|
|
2845
|
-
return L("li", {
|
|
2846
|
+
return Ce("external-container-id") ? null : L("li", {
|
|
2846
2847
|
style: "border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",
|
|
2847
2848
|
onClick: W
|
|
2848
2849
|
}, [L("span", {
|
|
@@ -2853,31 +2854,31 @@ const Re = /* @__PURE__ */ ze({
|
|
|
2853
2854
|
}, [zt("添加按钮")])]);
|
|
2854
2855
|
}
|
|
2855
2856
|
function X() {
|
|
2856
|
-
return t.value.map((
|
|
2857
|
+
return t.value.map((_, F) => S(_, F));
|
|
2857
2858
|
}
|
|
2858
2859
|
return () => {
|
|
2859
|
-
var
|
|
2860
|
+
var _;
|
|
2860
2861
|
return L("div", {
|
|
2861
2862
|
ref: r,
|
|
2862
2863
|
"data-dragref": `${P.schema.id}-container`,
|
|
2863
|
-
class:
|
|
2864
|
+
class: I.value,
|
|
2864
2865
|
id: e.id
|
|
2865
2866
|
}, [L("div", {
|
|
2866
2867
|
ref: h,
|
|
2867
2868
|
class: M.value,
|
|
2868
|
-
onClick: (
|
|
2869
|
+
onClick: (F) => k(F)
|
|
2869
2870
|
}, [L("div", {
|
|
2870
2871
|
ref: c,
|
|
2871
2872
|
class: "d-block f-response-content"
|
|
2872
|
-
}, [(
|
|
2873
|
+
}, [(_ = t.value) != null && _.length ? X() : Y()])])]);
|
|
2873
2874
|
};
|
|
2874
2875
|
}
|
|
2875
2876
|
}), Qn = Ue;
|
|
2876
|
-
Re.register = (e,
|
|
2877
|
-
e["response-toolbar"] = Sn,
|
|
2877
|
+
Re.register = (e, v, t, h) => {
|
|
2878
|
+
e["response-toolbar"] = Sn, v["response-toolbar"] = Ue, h["response-toolbar"] = { eventHandlerResolver: yn };
|
|
2878
2879
|
};
|
|
2879
|
-
Re.registerDesigner = (e,
|
|
2880
|
-
e["response-toolbar"] = Re,
|
|
2880
|
+
Re.registerDesigner = (e, v, t) => {
|
|
2881
|
+
e["response-toolbar"] = Re, v["response-toolbar"] = Ue, e["response-toolbar-item"] = vt, v["response-toolbar-item"] = mn;
|
|
2881
2882
|
};
|
|
2882
2883
|
const Zn = $t(Re);
|
|
2883
2884
|
export {
|