@farris/ui-vue 1.5.6 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +4 -4
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/binding-selector/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/checkbox-group/package.json +1 -1
- package/components/code-editor/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +4 -4
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +4 -4
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +4 -4
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +1082 -1421
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +4 -4
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +4 -4
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +4 -4
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/event-parameter/package.json +1 -1
- package/components/events-editor/index.esm.js +4 -4
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/fieldset/package.json +1 -1
- package/components/filter-bar/index.esm.js +12 -11
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/filter-condition-editor/package.json +1 -1
- package/components/flow-canvas/index.esm.js +4 -4
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/html-template/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/package.json +1 -1
- package/components/json-editor/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/menu-lookup/package.json +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/number-range/index.esm.js +4 -4
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-range/package.json +1 -1
- package/components/number-spinner/index.esm.js +4 -4
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/number-spinner/package.json +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +1584 -2320
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +4 -4
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/query-solution/index.esm.js +77 -76
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/query-solution/package.json +1 -1
- package/components/radio/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/index.esm.js +4 -4
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +500 -3662
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.esm.js +3008 -7347
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +1564 -1635
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/sort-condition-editor/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.esm.js +545 -4943
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +100 -5841
- package/components/textarea/index.umd.cjs +2 -2
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.esm.js +4 -4
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/package.json +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/index.esm.js +4 -4
- package/components/video/index.umd.cjs +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +1556 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +207 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +377 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +14332 -0
- package/designer/data-grid/index.umd.cjs +20 -0
- package/designer/data-view/index.esm.js +271 -0
- package/designer/data-view/index.umd.cjs +1 -0
- package/designer/date-picker/index.esm.js +1879 -0
- package/designer/date-picker/index.umd.cjs +1 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +463 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +16815 -0
- package/designer/farris-designer.all.umd.cjs +32 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +647 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +6959 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/response-toolbar/index.esm.js +3015 -0
- package/designer/response-toolbar/index.umd.cjs +1 -0
- package/designer/tabs/index.esm.js +2200 -0
- package/designer/tabs/index.umd.cjs +1 -0
- package/designer/textarea/index.esm.js +249 -0
- package/designer/textarea/index.umd.cjs +1 -0
- package/designer/tree-grid/index.css +1 -0
- package/designer/tree-grid/index.esm.js +1673 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +57107 -57104
- package/farris.all.umd.cjs +16 -16
- package/package.json +1 -1
- package/types/components.d.ts +1 -0
- package/types/date-picker/designer.d.ts +29 -0
- package/types/date-picker/index.d.ts +2 -1
- package/types/date-picker/src/date-picker.props.d.ts +0 -5
- package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
- package/types/response-toolbar/designer.d.ts +37 -0
- package/types/response-toolbar/index.d.ts +6 -5
- package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
- package/types/response-toolbar/src/composition/types.d.ts +1 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
- package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
- package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
- package/types/tabs/designer.d.ts +28 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/src/components/tab-page.props.d.ts +0 -1
- package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
- package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
- package/types/tabs/src/tabs.props.d.ts +0 -11
- package/types/textarea/designer.d.ts +28 -0
- package/types/textarea/index.d.ts +0 -15
- package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
- package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
- package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
- package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
- package/types/textarea/src/textarea.props.d.ts +0 -5
- /package/{components/textarea → designer/radio-group}/index.css +0 -0
|
@@ -0,0 +1,2200 @@
|
|
|
1
|
+
import { withInstall as St } from "../../components/common/index.esm.js";
|
|
2
|
+
import Pt, { tabsProps as Ye, tabPageProps as ze, FTabPage as xt } from "../../components/tabs/index.esm.js";
|
|
3
|
+
import Et, { schemaResolver as Bt } from "../response-toolbar/index.esm.js";
|
|
4
|
+
import { computed as U, ref as K, watch as he, nextTick as te, createVNode as F, onMounted as Oe, defineComponent as Ge, inject as Ce, shallowRef as We, provide as Ue, onUnmounted as Ke, isVNode as Rt } from "vue";
|
|
5
|
+
import { DgControl as Dt, UseTemplateDragAndDropRules as Qe, canvasChanged as Je, setPositionForSelectedElement as At, setPositionOfButtonGroup as $t, FDesignerInnerItem as jt, useDesignerComponent as Ze, useDragulaCommonRule as Ot } from "../../components/designer-canvas/index.esm.js";
|
|
6
|
+
import { resolveAppearance as et, createPropsResolver as we, createTabsEventHandlerResolver as Lt, getSchemaByType as tt } from "../../components/dynamic-resolver/index.esm.js";
|
|
7
|
+
import kt, { responseToolbarProps as Ht } from "../../components/response-toolbar/index.esm.js";
|
|
8
|
+
import _t from "../../components/capsule/index.esm.js";
|
|
9
|
+
import { BaseControlProperty as nt } from "../../components/property-panel/index.esm.js";
|
|
10
|
+
import Mt from "../../components/section/index.esm.js";
|
|
11
|
+
const xe = /* @__PURE__ */ new Map([
|
|
12
|
+
["appearance", et]
|
|
13
|
+
]);
|
|
14
|
+
function Ft(a, t) {
|
|
15
|
+
const s = Math.random().toString().slice(2, 6), d = t.parentComponentInstance, v = a.getSchemaByType("tab-page");
|
|
16
|
+
v.id = `tab-page-${s}`, v.title = "标题", v.toolbar = { id: `tab-page-toolbar-${s}`, buttons: [] };
|
|
17
|
+
const l = a.getSchemaByType("tabs");
|
|
18
|
+
Object.assign(l, {
|
|
19
|
+
id: `tabs-${s}`,
|
|
20
|
+
appearance: {
|
|
21
|
+
class: "f-component-tabs f-tabs-has-grid"
|
|
22
|
+
},
|
|
23
|
+
contents: [v],
|
|
24
|
+
activeId: v.id
|
|
25
|
+
});
|
|
26
|
+
const c = a.getSchemaByType("section");
|
|
27
|
+
Object.assign(c, {
|
|
28
|
+
id: `section-${s}`,
|
|
29
|
+
appearance: {
|
|
30
|
+
class: "f-section-tabs f-section-in-mainsubcard"
|
|
31
|
+
},
|
|
32
|
+
fill: !1,
|
|
33
|
+
showHeader: !1,
|
|
34
|
+
contents: [l]
|
|
35
|
+
});
|
|
36
|
+
const n = a.getSchemaByType("content-container");
|
|
37
|
+
Object.assign(n, {
|
|
38
|
+
id: `container-${s}`,
|
|
39
|
+
appearance: {
|
|
40
|
+
class: "f-struct-wrapper"
|
|
41
|
+
},
|
|
42
|
+
contents: [c]
|
|
43
|
+
});
|
|
44
|
+
const r = d.schema;
|
|
45
|
+
switch (r && r.type) {
|
|
46
|
+
case Dt["splitter-pane"].type: {
|
|
47
|
+
c.appearance.class = "f-section-tabs f-section-in-main", l.appearance.class = "f-component-tabs";
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const p = d.elementRef, f = window.getComputedStyle(p);
|
|
52
|
+
return f && f.display === "flex" && (n.appearance.class += " d-block"), n;
|
|
53
|
+
}
|
|
54
|
+
function ot(a, t, s) {
|
|
55
|
+
if (s.parentComponentInstance)
|
|
56
|
+
return Ft(a, s);
|
|
57
|
+
{
|
|
58
|
+
const v = a.getSchemaByType("tab-page");
|
|
59
|
+
return t.contents = [v], t;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function qt(a, t, s) {
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
const Nt = "https://json-schema.org/draft/2020-12/schema", Vt = "https://farris-design.gitee.io/tabs.schema.json", Wt = "tabs", Ut = "A Farris Container Component", Xt = "object", Yt = {
|
|
66
|
+
id: {
|
|
67
|
+
description: "The unique identifier for a Tabs",
|
|
68
|
+
type: "string"
|
|
69
|
+
},
|
|
70
|
+
type: {
|
|
71
|
+
description: "The type string of Tabs component",
|
|
72
|
+
type: "string",
|
|
73
|
+
default: "tabs"
|
|
74
|
+
},
|
|
75
|
+
appearance: {
|
|
76
|
+
description: "",
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
class: {
|
|
80
|
+
type: "string"
|
|
81
|
+
},
|
|
82
|
+
style: {
|
|
83
|
+
type: "string"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
default: {}
|
|
87
|
+
},
|
|
88
|
+
contents: {
|
|
89
|
+
description: "",
|
|
90
|
+
type: "array",
|
|
91
|
+
default: []
|
|
92
|
+
},
|
|
93
|
+
autoTitleWidth: {
|
|
94
|
+
description: "",
|
|
95
|
+
type: "boolean",
|
|
96
|
+
default: !1
|
|
97
|
+
},
|
|
98
|
+
titleWidth: {
|
|
99
|
+
description: "",
|
|
100
|
+
type: "number"
|
|
101
|
+
},
|
|
102
|
+
titleLength: {
|
|
103
|
+
description: "",
|
|
104
|
+
type: "number",
|
|
105
|
+
default: 7
|
|
106
|
+
},
|
|
107
|
+
fill: {
|
|
108
|
+
description: "",
|
|
109
|
+
type: "boolean",
|
|
110
|
+
default: !1
|
|
111
|
+
},
|
|
112
|
+
visible: {
|
|
113
|
+
description: "",
|
|
114
|
+
type: "boolean",
|
|
115
|
+
default: !0
|
|
116
|
+
},
|
|
117
|
+
activeId: {
|
|
118
|
+
description: "",
|
|
119
|
+
type: "string",
|
|
120
|
+
default: ""
|
|
121
|
+
}
|
|
122
|
+
}, zt = [
|
|
123
|
+
"id",
|
|
124
|
+
"type",
|
|
125
|
+
"contents"
|
|
126
|
+
], Gt = {
|
|
127
|
+
onTabChange: "切换标签页事件",
|
|
128
|
+
onTabRemove: "移除标签页事件"
|
|
129
|
+
}, rt = {
|
|
130
|
+
$schema: Nt,
|
|
131
|
+
$id: Vt,
|
|
132
|
+
title: Wt,
|
|
133
|
+
description: Ut,
|
|
134
|
+
type: Xt,
|
|
135
|
+
properties: Yt,
|
|
136
|
+
required: zt,
|
|
137
|
+
events: Gt
|
|
138
|
+
}, Kt = "https://json-schema.org/draft/2020-12/schema", Qt = "https://farris-design.gitee.io/tab-toolbar.schema.json", Jt = "tab-toolbar", Zt = "A Farris Toolbar Component", en = "object", tn = {
|
|
139
|
+
id: {
|
|
140
|
+
description: "The unique identifier for a Tab Toolbar",
|
|
141
|
+
type: "string"
|
|
142
|
+
},
|
|
143
|
+
type: {
|
|
144
|
+
description: "The type string of Tab Toolbar",
|
|
145
|
+
type: "string",
|
|
146
|
+
default: "tab-toolbar"
|
|
147
|
+
},
|
|
148
|
+
appearance: {
|
|
149
|
+
description: "",
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: {
|
|
152
|
+
class: {
|
|
153
|
+
type: "string",
|
|
154
|
+
default: ""
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
alignment: {
|
|
159
|
+
description: "The alignment of Tab Toolbar Button.",
|
|
160
|
+
type: "string",
|
|
161
|
+
default: "right"
|
|
162
|
+
},
|
|
163
|
+
buttons: {
|
|
164
|
+
description: "The items of Tab Toolbar.",
|
|
165
|
+
type: "array",
|
|
166
|
+
default: []
|
|
167
|
+
},
|
|
168
|
+
buttonSize: {
|
|
169
|
+
type: "string",
|
|
170
|
+
default: ""
|
|
171
|
+
},
|
|
172
|
+
visible: {
|
|
173
|
+
description: "",
|
|
174
|
+
type: "boolean",
|
|
175
|
+
default: !0
|
|
176
|
+
}
|
|
177
|
+
}, nn = [
|
|
178
|
+
"id",
|
|
179
|
+
"type",
|
|
180
|
+
"buttons"
|
|
181
|
+
], on = {
|
|
182
|
+
onClick: "点击事件"
|
|
183
|
+
}, rn = {
|
|
184
|
+
$schema: Kt,
|
|
185
|
+
$id: Qt,
|
|
186
|
+
title: Jt,
|
|
187
|
+
description: Zt,
|
|
188
|
+
type: en,
|
|
189
|
+
properties: tn,
|
|
190
|
+
required: nn,
|
|
191
|
+
events: on
|
|
192
|
+
}, an = we(Ye, rt, xe, ot), it = Object.assign({}, Ye, {
|
|
193
|
+
componentId: { type: String, default: "" }
|
|
194
|
+
}), sn = we(it, rt, xe, ot), ln = Lt(), cn = we(
|
|
195
|
+
Ht,
|
|
196
|
+
rn,
|
|
197
|
+
xe,
|
|
198
|
+
Bt
|
|
199
|
+
);
|
|
200
|
+
function un(a, t, s, d, v, l) {
|
|
201
|
+
const {
|
|
202
|
+
activeId: c,
|
|
203
|
+
selectTab: n,
|
|
204
|
+
removeDesignTab: r,
|
|
205
|
+
selectDesignTab: p,
|
|
206
|
+
addTabPageToolbar: f,
|
|
207
|
+
resetPositionForSelectedElement: u
|
|
208
|
+
} = v, g = U(() => ({
|
|
209
|
+
"st-tab-text": !0,
|
|
210
|
+
"farris-title-auto": a.autoTitleWidth
|
|
211
|
+
})), m = U(() => {
|
|
212
|
+
const S = {
|
|
213
|
+
"farris-component": !0,
|
|
214
|
+
"nav-item": !0,
|
|
215
|
+
"f-state-active": t.id === c.value
|
|
216
|
+
};
|
|
217
|
+
return S[`${t.id}-design-item`] = !0, S;
|
|
218
|
+
}), C = U(() => {
|
|
219
|
+
const S = {};
|
|
220
|
+
return t.tabWidth && t.tabWidth > 0 && (S.width = `${t.tabWidth}px`), S;
|
|
221
|
+
}), T = U(() => ({
|
|
222
|
+
"nav-link": !0,
|
|
223
|
+
"tabs-text-truncate": !0,
|
|
224
|
+
active: t.id === c.value
|
|
225
|
+
}));
|
|
226
|
+
function k(S) {
|
|
227
|
+
return F("span", {
|
|
228
|
+
class: g.value,
|
|
229
|
+
title: S.title
|
|
230
|
+
}, [S.title]);
|
|
231
|
+
}
|
|
232
|
+
function L(S) {
|
|
233
|
+
return S.slots.title ? S.slots.title : k;
|
|
234
|
+
}
|
|
235
|
+
const B = L(s), j = K(t.removeable);
|
|
236
|
+
function E() {
|
|
237
|
+
return F("span", {
|
|
238
|
+
class: "st-drop-close",
|
|
239
|
+
style: {
|
|
240
|
+
opacity: 0.6
|
|
241
|
+
}
|
|
242
|
+
}, [F("i", {
|
|
243
|
+
class: "f-icon f-icon-close"
|
|
244
|
+
}, null)]);
|
|
245
|
+
}
|
|
246
|
+
function I(S) {
|
|
247
|
+
n(t.id), a.tabType === "one-page" && d.scrollToByPaggId(t.id);
|
|
248
|
+
}
|
|
249
|
+
function D(S) {
|
|
250
|
+
S && (S.stopPropagation(), S.preventDefault()), p(S, t.id, l.value);
|
|
251
|
+
}
|
|
252
|
+
function O(S) {
|
|
253
|
+
r(S, t.id);
|
|
254
|
+
}
|
|
255
|
+
function A(S) {
|
|
256
|
+
f(S, t.id);
|
|
257
|
+
}
|
|
258
|
+
he(() => t.toolbarPosition, () => {
|
|
259
|
+
te(() => {
|
|
260
|
+
u();
|
|
261
|
+
});
|
|
262
|
+
}), he(() => t.tabWidth, () => {
|
|
263
|
+
te(() => {
|
|
264
|
+
u();
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
function X() {
|
|
268
|
+
return F("div", {
|
|
269
|
+
role: "button",
|
|
270
|
+
class: "btn component-settings-button",
|
|
271
|
+
title: "删除",
|
|
272
|
+
ref: "removeComponent",
|
|
273
|
+
onClick: (S) => O(S)
|
|
274
|
+
}, [F("i", {
|
|
275
|
+
class: "f-icon f-icon-yxs_delete"
|
|
276
|
+
}, null)]);
|
|
277
|
+
}
|
|
278
|
+
function H() {
|
|
279
|
+
return F("div", {
|
|
280
|
+
role: "button",
|
|
281
|
+
class: "btn component-settings-button",
|
|
282
|
+
title: "新增按钮",
|
|
283
|
+
ref: "addComponent",
|
|
284
|
+
onClick: (S) => A(S)
|
|
285
|
+
}, [F("i", {
|
|
286
|
+
class: "f-icon f-icon-plus-circle"
|
|
287
|
+
}, null)]);
|
|
288
|
+
}
|
|
289
|
+
function b() {
|
|
290
|
+
return F("div", {
|
|
291
|
+
class: "component-btn-group",
|
|
292
|
+
"data-noattach": "true"
|
|
293
|
+
}, [F("div", null, [X(), !t.toolbar || !t.toolbar.buttons || !t.toolbar.buttons.length ? H() : ""])]);
|
|
294
|
+
}
|
|
295
|
+
return F("li", {
|
|
296
|
+
onClick: (S) => D(S),
|
|
297
|
+
class: m.value,
|
|
298
|
+
style: C.value,
|
|
299
|
+
pageId: `${t.id}-design-item`
|
|
300
|
+
}, [b(), F("a", {
|
|
301
|
+
class: T.value,
|
|
302
|
+
onClick: I,
|
|
303
|
+
id: `${t.id}-design-item`
|
|
304
|
+
}, [B(t), j.value && E()])]);
|
|
305
|
+
}
|
|
306
|
+
function dn(a, t, s, d, v, l, c) {
|
|
307
|
+
const {
|
|
308
|
+
tabPages: n,
|
|
309
|
+
selectTab: r,
|
|
310
|
+
emitSelectionChange: p
|
|
311
|
+
} = v, f = U(() => ({
|
|
312
|
+
spacer: !0,
|
|
313
|
+
"f-utils-fill": !0
|
|
314
|
+
})), u = U(() => ({
|
|
315
|
+
width: "100%",
|
|
316
|
+
"justify-content": a.justifyContent
|
|
317
|
+
})), g = U(() => ({
|
|
318
|
+
nav: !0,
|
|
319
|
+
"farris-nav-tabs": !0,
|
|
320
|
+
"flex-nowrap": !0,
|
|
321
|
+
"nav-fill": a.tabType === "fill",
|
|
322
|
+
"nav-pills": a.tabType === "pills",
|
|
323
|
+
"flex-row": a.position === "top" || a.position === "bottom",
|
|
324
|
+
"flex-column": a.position === "left" || a.position === "right"
|
|
325
|
+
})), m = U(() => ({
|
|
326
|
+
overflow: "auto"
|
|
327
|
+
})), C = function(T) {
|
|
328
|
+
var L;
|
|
329
|
+
T && (T.stopPropagation(), T.preventDefault());
|
|
330
|
+
const k = tt("tab-page");
|
|
331
|
+
k.id = `tab_page_${Math.random().toString().slice(2, 6)}`, k.title = "标题", k.toolbar = {
|
|
332
|
+
id: `${k.id}_toolbar`,
|
|
333
|
+
buttons: []
|
|
334
|
+
}, (L = l.value.schema.contents) == null || L.push(k), r(k.id), te(() => {
|
|
335
|
+
p(k.id, l.value);
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
return () => F("div", {
|
|
339
|
+
class: f.value,
|
|
340
|
+
style: u.value
|
|
341
|
+
}, [F("ul", {
|
|
342
|
+
class: g.value,
|
|
343
|
+
style: m.value,
|
|
344
|
+
ref: t
|
|
345
|
+
}, [n.value.map((T) => un(a, T.props, T, d, v, l)), F("li", {
|
|
346
|
+
class: "nav-item no-drag add-nav-item"
|
|
347
|
+
}, [F("a", {
|
|
348
|
+
class: "nav-link tabs-text-truncate",
|
|
349
|
+
title: "添加页签",
|
|
350
|
+
onClick: (T) => C(T)
|
|
351
|
+
}, [F("i", {
|
|
352
|
+
class: "f-icon f-icon-plus",
|
|
353
|
+
style: "font-size: 20px;margin: 0 auto;line-height: 24px;"
|
|
354
|
+
}, null)])])])]);
|
|
355
|
+
}
|
|
356
|
+
function fn(a, t, s, d, v) {
|
|
357
|
+
const l = K(), {
|
|
358
|
+
shouldShowNavigationButtons: c
|
|
359
|
+
} = s, {
|
|
360
|
+
activeId: n,
|
|
361
|
+
tabPages: r,
|
|
362
|
+
selectTab: p
|
|
363
|
+
} = v, f = K(n.value), u = U(() => r.value.map((T) => ({
|
|
364
|
+
name: T.props.title,
|
|
365
|
+
value: T.props.id,
|
|
366
|
+
show: T.props.show,
|
|
367
|
+
disabled: T.props.disabled
|
|
368
|
+
}))), g = U(() => ({
|
|
369
|
+
spacer: !0,
|
|
370
|
+
"f-utils-fill": !0,
|
|
371
|
+
"spacer-sides-dropdown": c.value
|
|
372
|
+
})), m = U(() => ({
|
|
373
|
+
width: "100%",
|
|
374
|
+
display: "flex",
|
|
375
|
+
"justify-content": a.justifyContent
|
|
376
|
+
}));
|
|
377
|
+
Oe(() => {
|
|
378
|
+
l.value && (t.value = l.value.$el);
|
|
379
|
+
});
|
|
380
|
+
function C(T) {
|
|
381
|
+
p(T);
|
|
382
|
+
}
|
|
383
|
+
return he(() => n.value, (T) => {
|
|
384
|
+
T !== f.value && (f.value = T);
|
|
385
|
+
}, {
|
|
386
|
+
immediate: !0
|
|
387
|
+
}), () => F("div", {
|
|
388
|
+
class: g.value,
|
|
389
|
+
style: m.value
|
|
390
|
+
}, [F(_t, {
|
|
391
|
+
items: u.value,
|
|
392
|
+
modelValue: f.value,
|
|
393
|
+
"onUpdate:modelValue": (T) => f.value = T,
|
|
394
|
+
onChange: C,
|
|
395
|
+
ref: l
|
|
396
|
+
}, null)]);
|
|
397
|
+
}
|
|
398
|
+
function pn(a, t, s, d) {
|
|
399
|
+
const v = K(!1), { selectTab: l, tabPages: c, needUpdateNavigationLayout: n, activeId: r } = d, p = 4, f = U(() => ({
|
|
400
|
+
btn: !0,
|
|
401
|
+
"sc-nav-btn": !0,
|
|
402
|
+
"px-1": !0,
|
|
403
|
+
"sc-nav-lr": !0,
|
|
404
|
+
"d-none": !v.value
|
|
405
|
+
})), u = U(() => ({
|
|
406
|
+
"btn-group": !0,
|
|
407
|
+
"sc-nav-btn": !0,
|
|
408
|
+
dropdown: !0,
|
|
409
|
+
"d-none": !v.value
|
|
410
|
+
})), g = U(() => ({
|
|
411
|
+
btn: !0,
|
|
412
|
+
"sc-nav-rg": !0,
|
|
413
|
+
"d-none": !v.value
|
|
414
|
+
}));
|
|
415
|
+
function m(B, j) {
|
|
416
|
+
if (!t.value)
|
|
417
|
+
return;
|
|
418
|
+
const E = t.value.scrollLeft, I = t.value.scrollWidth - t.value.offsetWidth;
|
|
419
|
+
if (j > 0) {
|
|
420
|
+
if (t.value.scrollLeft >= I)
|
|
421
|
+
return;
|
|
422
|
+
t.value.scrollLeft = E + a.scrollStep + B;
|
|
423
|
+
} else if (j < 0) {
|
|
424
|
+
if (t.value.scrollLeft <= 0)
|
|
425
|
+
return;
|
|
426
|
+
t.value.scrollLeft = E - a.scrollStep - B;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function C(B = -1) {
|
|
430
|
+
if (!v.value || !t.value)
|
|
431
|
+
return;
|
|
432
|
+
B < 0 && (B = c.value.findIndex((O) => O.props.id === r.value));
|
|
433
|
+
const j = a.tabType === "pills" ? ".f-capsule-item" : ".nav-item", E = t.value.querySelectorAll(j), { parentElement: I } = t.value, D = E[B];
|
|
434
|
+
if (D && I) {
|
|
435
|
+
const O = I.getBoundingClientRect().left, A = I.getBoundingClientRect().right, X = D.getBoundingClientRect().left, H = D.getBoundingClientRect().right;
|
|
436
|
+
X < O ? m(O - X, -1) : A < H && m(H - A, 1), a.tabType === "one-page" && s.scrollTo(B);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function T() {
|
|
440
|
+
var E;
|
|
441
|
+
if (!t.value)
|
|
442
|
+
return;
|
|
443
|
+
const B = t.value, j = (E = t.value) == null ? void 0 : E.parentElement;
|
|
444
|
+
v.value = j && B && j.offsetWidth < B.scrollWidth - p, v.value && te(() => {
|
|
445
|
+
C();
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
function k(B) {
|
|
449
|
+
B.disabled || l(B.id);
|
|
450
|
+
}
|
|
451
|
+
function L() {
|
|
452
|
+
["default", "one-page"].indexOf(a.tabType) > -1 && te(() => {
|
|
453
|
+
C();
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
return he(n, () => {
|
|
457
|
+
T();
|
|
458
|
+
}), {
|
|
459
|
+
previousButtonClass: f,
|
|
460
|
+
nextButtonGroupClass: u,
|
|
461
|
+
nextButtonClass: g,
|
|
462
|
+
scrollTab: m,
|
|
463
|
+
selectAndScrollToTab: k,
|
|
464
|
+
shouldShowNavigationButtons: v,
|
|
465
|
+
updateNavigationLayout: T,
|
|
466
|
+
scrollToSelectedTab: L
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
function vn(a, t) {
|
|
470
|
+
const { tabPages: s } = t, d = K(""), v = K(!0), l = U(() => a.searchBoxVisible), c = U(() => l.value ? s.value.filter((r) => r.props.title.includes(d.value)) : s.value.slice());
|
|
471
|
+
return he(v, (n) => {
|
|
472
|
+
n || (d.value = "");
|
|
473
|
+
}), {
|
|
474
|
+
searchTabText: d,
|
|
475
|
+
hideDropDown: v,
|
|
476
|
+
shouldShowSearchBox: l,
|
|
477
|
+
tabsInDropdownMenu: c
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
function mn(a, t, s) {
|
|
481
|
+
const d = ".farris-tab-page", { tabPages: v } = s;
|
|
482
|
+
function l(n) {
|
|
483
|
+
const r = t.value;
|
|
484
|
+
if (r) {
|
|
485
|
+
const p = t.value.querySelectorAll(d);
|
|
486
|
+
if (p.length > 0) {
|
|
487
|
+
const f = p[n], { offsetTop: u } = f, g = u - 32 > 0 ? u - 32 : 0;
|
|
488
|
+
r.scrollTop = g;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
function c(n) {
|
|
493
|
+
const r = v.value.findIndex((p) => p.props.id === n);
|
|
494
|
+
r > -1 && l(r);
|
|
495
|
+
}
|
|
496
|
+
return { scrollTo: l, scrollToByPaggId: c };
|
|
497
|
+
}
|
|
498
|
+
class gn extends nt {
|
|
499
|
+
constructor(t, s) {
|
|
500
|
+
super(t, s);
|
|
501
|
+
}
|
|
502
|
+
getPropertyConfig(t) {
|
|
503
|
+
return this.getBasicPropConfig(t), this.getAppearanceProperties(t), this.getBehaviorProperties(t), this.getToolbarProperties(t), this.propertyConfig;
|
|
504
|
+
}
|
|
505
|
+
getBehaviorProperties(t) {
|
|
506
|
+
this.propertyConfig.categories.behavior = {
|
|
507
|
+
description: "",
|
|
508
|
+
title: "行为",
|
|
509
|
+
properties: {
|
|
510
|
+
removeable: {
|
|
511
|
+
description: "是否可移除",
|
|
512
|
+
type: "boolean",
|
|
513
|
+
title: "是否可移除"
|
|
514
|
+
},
|
|
515
|
+
disabled: {
|
|
516
|
+
description: "是否禁用",
|
|
517
|
+
type: "boolean",
|
|
518
|
+
title: "是否禁用"
|
|
519
|
+
},
|
|
520
|
+
show: {
|
|
521
|
+
description: "是否可见",
|
|
522
|
+
type: "boolean",
|
|
523
|
+
title: "是否可见"
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
getBasicPropConfig(t) {
|
|
529
|
+
this.propertyConfig.categories.basic = {
|
|
530
|
+
description: "Basic Infomation",
|
|
531
|
+
title: "基本信息",
|
|
532
|
+
properties: {
|
|
533
|
+
id: {
|
|
534
|
+
description: "标签页项的标识",
|
|
535
|
+
title: "标识",
|
|
536
|
+
type: "string",
|
|
537
|
+
readonly: !0
|
|
538
|
+
},
|
|
539
|
+
title: {
|
|
540
|
+
description: "标签页项的标题",
|
|
541
|
+
title: "标题",
|
|
542
|
+
type: "string"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
setPropertyRelates(s, d) {
|
|
546
|
+
if (s)
|
|
547
|
+
switch (s && s.propertyID) {
|
|
548
|
+
case "title": {
|
|
549
|
+
s.needRefreshControlTree = !0;
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
getAppearanceProperties(t) {
|
|
557
|
+
this.propertyConfig.categories.appearance = {
|
|
558
|
+
title: "外观",
|
|
559
|
+
description: "",
|
|
560
|
+
properties: {
|
|
561
|
+
customTitleClass: {
|
|
562
|
+
title: "标题样式",
|
|
563
|
+
type: "string",
|
|
564
|
+
description: "为标签页的标题指定样式"
|
|
565
|
+
},
|
|
566
|
+
tabWidth: {
|
|
567
|
+
description: "为标签页的标题指定宽度",
|
|
568
|
+
type: "number",
|
|
569
|
+
title: "标签页的标题宽度(px)",
|
|
570
|
+
editor: {
|
|
571
|
+
nullable: !0,
|
|
572
|
+
min: 0,
|
|
573
|
+
decimals: 0
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
getToolbarProperties(t) {
|
|
580
|
+
this.propertyConfig.categories.toolbar = {
|
|
581
|
+
title: "工具栏",
|
|
582
|
+
description: "",
|
|
583
|
+
properties: {
|
|
584
|
+
toolbarPosition: {
|
|
585
|
+
title: "工具栏位置",
|
|
586
|
+
type: "string",
|
|
587
|
+
description: "为工具栏指定位置",
|
|
588
|
+
editor: {
|
|
589
|
+
type: "combo-list",
|
|
590
|
+
data: [
|
|
591
|
+
{ id: "inHead", name: "标题区域" },
|
|
592
|
+
{ id: "inContent", name: "内容区域" }
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
class bn extends nt {
|
|
601
|
+
constructor(t, s) {
|
|
602
|
+
super(t, s);
|
|
603
|
+
}
|
|
604
|
+
getPropertyConfig(t) {
|
|
605
|
+
return this.propertyConfig.categories.basic = this.getBasicPropConfig(t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.behavior = this.getBehaviorProperties(t), this.getEventPropConfig(t), this.propertyConfig;
|
|
606
|
+
}
|
|
607
|
+
getAppearanceProperties(t) {
|
|
608
|
+
return {
|
|
609
|
+
title: "外观",
|
|
610
|
+
description: "Appearance",
|
|
611
|
+
properties: {
|
|
612
|
+
class: {
|
|
613
|
+
title: "class样式",
|
|
614
|
+
type: "string",
|
|
615
|
+
description: ""
|
|
616
|
+
},
|
|
617
|
+
titleWidth: {
|
|
618
|
+
description: "标题区域宽度占标签头部区域的横向比例",
|
|
619
|
+
type: "number",
|
|
620
|
+
title: "标题区域宽度(%)",
|
|
621
|
+
editor: {
|
|
622
|
+
min: 0,
|
|
623
|
+
decimals: 0,
|
|
624
|
+
max: 100,
|
|
625
|
+
nullable: !0
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
autoTitleWidth: {
|
|
629
|
+
description: "是,则标题显示全部字符;否,则标题最多显示20个字符",
|
|
630
|
+
type: "boolean",
|
|
631
|
+
title: "标题自适应宽度"
|
|
632
|
+
},
|
|
633
|
+
fill: {
|
|
634
|
+
description: "flex布局下,是否填充满剩余部分",
|
|
635
|
+
type: "boolean",
|
|
636
|
+
title: "填充"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
getBehaviorProperties(t) {
|
|
642
|
+
const s = this.getCurrentTabPages(t);
|
|
643
|
+
t.activeId && typeof t.activeId == "string" && (s.find((c) => c.id === t.activeId) || (t.activeId = ""));
|
|
644
|
+
const d = this.getPropertyEditorParams(t, ["Const", "Variable"], "activeId", {
|
|
645
|
+
constType: "enum",
|
|
646
|
+
constEnums: s
|
|
647
|
+
}, { newVariableType: "String" }), v = this;
|
|
648
|
+
return {
|
|
649
|
+
description: "",
|
|
650
|
+
title: "行为",
|
|
651
|
+
properties: {
|
|
652
|
+
activeId: {
|
|
653
|
+
title: "默认选中标签页",
|
|
654
|
+
type: "string",
|
|
655
|
+
description: "默认选中标签页",
|
|
656
|
+
defaultValue: s.length > 0 ? s[0].id : "",
|
|
657
|
+
editor: d
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
setPropertyRelates(l, c) {
|
|
661
|
+
if (l)
|
|
662
|
+
switch (l.propertyID) {
|
|
663
|
+
case "activeId":
|
|
664
|
+
v.addNewVariableToViewModel(l, v.viewModelId);
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
getCurrentTabPages(t) {
|
|
671
|
+
const s = t.contents || [], d = [];
|
|
672
|
+
return s.forEach((v) => {
|
|
673
|
+
d.push({
|
|
674
|
+
name: v.title,
|
|
675
|
+
id: v.id
|
|
676
|
+
});
|
|
677
|
+
}), d;
|
|
678
|
+
}
|
|
679
|
+
getEventPropConfig(t) {
|
|
680
|
+
const s = [
|
|
681
|
+
{
|
|
682
|
+
label: "onTabChange",
|
|
683
|
+
name: "切换标签页事件"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
label: "onTabRemove",
|
|
687
|
+
name: "移除标签页事件"
|
|
688
|
+
}
|
|
689
|
+
], d = this, v = d.eventsEditorUtils.formProperties(t, d.viewModelId, s), l = {};
|
|
690
|
+
l[d.viewModelId] = {
|
|
691
|
+
type: "events-editor",
|
|
692
|
+
editor: {
|
|
693
|
+
initialData: v
|
|
694
|
+
}
|
|
695
|
+
}, this.propertyConfig.categories.eventsEditor = {
|
|
696
|
+
title: "事件",
|
|
697
|
+
hideTitle: !0,
|
|
698
|
+
properties: l,
|
|
699
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
700
|
+
refreshPanelAfterChanged: !0,
|
|
701
|
+
tabId: "commands",
|
|
702
|
+
tabName: "交互",
|
|
703
|
+
setPropertyRelates(c, n) {
|
|
704
|
+
const r = c.propertyValue;
|
|
705
|
+
delete t[d.viewModelId], r && (r.setPropertyRelates = this.setPropertyRelates, d.eventsEditorUtils.saveRelatedParameters(t, d.viewModelId, r.events, r));
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
function hn(a, t) {
|
|
711
|
+
const s = a.schema, d = new Qe(), { canMove: v, canAccept: l, canDelete: c } = d.getTemplateRule(a, t);
|
|
712
|
+
function n(C) {
|
|
713
|
+
return l;
|
|
714
|
+
}
|
|
715
|
+
function r() {
|
|
716
|
+
return c;
|
|
717
|
+
}
|
|
718
|
+
function p() {
|
|
719
|
+
return v;
|
|
720
|
+
}
|
|
721
|
+
function f() {
|
|
722
|
+
return !v && !c;
|
|
723
|
+
}
|
|
724
|
+
function u(C) {
|
|
725
|
+
var L;
|
|
726
|
+
return (((L = document.querySelector(".dgComponentFocused")) == null ? void 0 : L.id) === `${s.id}-design-item` ? new bn(C, t) : new gn(C, t)).getPropertyConfig(s);
|
|
727
|
+
}
|
|
728
|
+
function g() {
|
|
729
|
+
a.designerItemElementRef.value && te(() => {
|
|
730
|
+
const C = a.designerItemElementRef.value.querySelector(".dgComponentSelected");
|
|
731
|
+
C != null && C.className.includes("dgComponentSelected") && C.click();
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
function m(C) {
|
|
735
|
+
if (!C)
|
|
736
|
+
return;
|
|
737
|
+
const { changeObject: T } = C;
|
|
738
|
+
T && T.propertyID === "title" && g();
|
|
739
|
+
}
|
|
740
|
+
return {
|
|
741
|
+
canAccepts: n,
|
|
742
|
+
checkCanDeleteComponent: r,
|
|
743
|
+
checkCanMoveComponent: p,
|
|
744
|
+
getPropsConfig: u,
|
|
745
|
+
hideNestedPaddingInDesginerView: f,
|
|
746
|
+
onPropertyChanged: m
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
function yn(a, t, s, d, v, l) {
|
|
750
|
+
const c = K([]), n = K(a.activeId || ""), r = K(!0), p = K(), f = K([]), u = K(0), g = U(() => {
|
|
751
|
+
const e = c.value.find((h) => h.props.id === n.value);
|
|
752
|
+
return (e == null ? void 0 : e.props.toolbarPosition) === "inHead";
|
|
753
|
+
});
|
|
754
|
+
let m;
|
|
755
|
+
function C(e) {
|
|
756
|
+
m = e;
|
|
757
|
+
}
|
|
758
|
+
function T(e, i = !0) {
|
|
759
|
+
const h = e.value && e.value.length > 0 ? 0 : -1;
|
|
760
|
+
if (f.value = [], h !== -1 && (!n.value || typeof n.value == "object")) {
|
|
761
|
+
if (n.value = e.value[h].props.id, !i)
|
|
762
|
+
return;
|
|
763
|
+
const P = e.value[h];
|
|
764
|
+
P && P.props.toolbar && P.props.toolbar.buttons && P.props.toolbar.buttons.length && (f.value = [...P.props.toolbar.buttons]);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
function k() {
|
|
768
|
+
const e = c.value.find((P) => P.props.id === n.value);
|
|
769
|
+
if (f.value = [], e && e.props.toolbar) {
|
|
770
|
+
const P = Object.prototype.hasOwnProperty.call(e.props.toolbar, "contents") ? "contents" : "buttons";
|
|
771
|
+
e.props.toolbar[P] && e.props.toolbar[P].length && (f.value = [...e.props.toolbar[P]]);
|
|
772
|
+
}
|
|
773
|
+
const i = d.schema.contents, h = i == null ? void 0 : i.find((P) => P.id === n.value);
|
|
774
|
+
p.value = h == null ? void 0 : h.toolbar;
|
|
775
|
+
}
|
|
776
|
+
function L(e) {
|
|
777
|
+
const i = n.value;
|
|
778
|
+
n.value = e, v.changeSelectedId(""), k(), t.emit("tabChange", {
|
|
779
|
+
prevId: i,
|
|
780
|
+
nextId: n.value
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
function B(e) {
|
|
784
|
+
let i = -1;
|
|
785
|
+
!n.value && (i = e.value.findIndex((h) => n.value === h.props.id), i > -1) || (T(e, !1), L(n.value));
|
|
786
|
+
}
|
|
787
|
+
function j(e) {
|
|
788
|
+
let i = !1;
|
|
789
|
+
i = !c.value.find((P) => P.props.id === e), i ? (n.value = "", B(c)) : (n.value = e, L(n.value));
|
|
790
|
+
}
|
|
791
|
+
function E(e, i) {
|
|
792
|
+
e.classList.contains(i) || e.classList.add(i);
|
|
793
|
+
}
|
|
794
|
+
function I(e, i) {
|
|
795
|
+
e.classList.remove(i);
|
|
796
|
+
}
|
|
797
|
+
function D(e) {
|
|
798
|
+
const { parentElement: i } = e;
|
|
799
|
+
i && (e.scrollWidth > i.offsetWidth ? E(e, "farris-title-text-custom") : I(e, "farris-title-text-custom"));
|
|
800
|
+
}
|
|
801
|
+
he(() => a.activeId, (e, i) => {
|
|
802
|
+
e !== i && j(e);
|
|
803
|
+
});
|
|
804
|
+
function O(e) {
|
|
805
|
+
var h;
|
|
806
|
+
if (a.autoTitleWidth)
|
|
807
|
+
return;
|
|
808
|
+
const i = (h = e.value) == null ? void 0 : h.querySelectorAll(".st-tab-text");
|
|
809
|
+
i && i.forEach((P) => D(P));
|
|
810
|
+
}
|
|
811
|
+
const A = (e) => {
|
|
812
|
+
e.preventDefault(), e.stopPropagation();
|
|
813
|
+
};
|
|
814
|
+
function X(e) {
|
|
815
|
+
c.value = c.value.filter((i) => i.props.id !== e), n.value === e && (n.value = "", T(c));
|
|
816
|
+
}
|
|
817
|
+
function H(e, i, h = !1) {
|
|
818
|
+
const P = c.value.findIndex((z) => z.props.id === i);
|
|
819
|
+
X(i), A(e), te(() => {
|
|
820
|
+
u.value++, O(s), h && (r.value = !0), t.emit("tabRemove", {
|
|
821
|
+
removeIndex: P,
|
|
822
|
+
removeId: i,
|
|
823
|
+
activeId: n.value
|
|
824
|
+
});
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function b(e, i = !0) {
|
|
828
|
+
n.value === e && (n.value = "", T(c)), te(() => {
|
|
829
|
+
u.value++, i && (r.value = !0);
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
function S(e) {
|
|
833
|
+
L(e);
|
|
834
|
+
}
|
|
835
|
+
function _(e) {
|
|
836
|
+
c.value.findIndex((h) => h.props.id === e.props.id) === -1 && c.value.push(e), u.value++;
|
|
837
|
+
}
|
|
838
|
+
function R(e) {
|
|
839
|
+
c.value.findIndex((h) => h.props.id === e.props.id) !== -1 && (c.value.forEach((h) => {
|
|
840
|
+
h.props.id === e.props.id && (h = e);
|
|
841
|
+
}), e.props.id === n.value && g.value, te(() => {
|
|
842
|
+
u.value++, O(s);
|
|
843
|
+
}));
|
|
844
|
+
}
|
|
845
|
+
function M(e) {
|
|
846
|
+
e && (e.stopPropagation(), e.preventDefault());
|
|
847
|
+
}
|
|
848
|
+
function N(e) {
|
|
849
|
+
var P;
|
|
850
|
+
const i = d.designerItemElementRef.value.querySelector(".farris-tabs-content"), h = i == null ? void 0 : i.querySelector(`#${e}-design-item`);
|
|
851
|
+
(P = h == null ? void 0 : h.componentInstance) != null && P.value.onRemoveComponent && h.componentInstance.value.onRemoveComponent(l);
|
|
852
|
+
}
|
|
853
|
+
function pe(e) {
|
|
854
|
+
var G, ue;
|
|
855
|
+
const i = l.formSchemaUtils.getExpressions();
|
|
856
|
+
if (!i || !i.length)
|
|
857
|
+
return;
|
|
858
|
+
const h = d.schema.contents, P = h == null ? void 0 : h.find((de) => de.id === e);
|
|
859
|
+
if (!P || !((ue = (G = P.toolbar) == null ? void 0 : G.buttons) != null && ue.length))
|
|
860
|
+
return;
|
|
861
|
+
const z = (de) => {
|
|
862
|
+
de.forEach((ee) => {
|
|
863
|
+
const Ie = i.findIndex((Te) => Te.target === ee.id);
|
|
864
|
+
Ie > -1 && i.splice(Ie, 1), ee.children && ee.children.length && z(ee.children);
|
|
865
|
+
});
|
|
866
|
+
};
|
|
867
|
+
z(P.toolbar.buttons);
|
|
868
|
+
}
|
|
869
|
+
function ye(e, i) {
|
|
870
|
+
var z;
|
|
871
|
+
M(e), pe(i), N(i);
|
|
872
|
+
const h = d.schema.contents, P = h == null ? void 0 : h.findIndex((G) => G.id === i);
|
|
873
|
+
P === -1 || P === void 0 || (h == null || h.splice(P, 1), X(i), k(), (z = d == null ? void 0 : d.setupContext) == null || z.emit("selectionChange"), Je.value++);
|
|
874
|
+
}
|
|
875
|
+
function ie() {
|
|
876
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
877
|
+
(i) => i.classList.remove("dgComponentFocused")
|
|
878
|
+
);
|
|
879
|
+
const e = document.getElementsByClassName("dgComponentSelected");
|
|
880
|
+
Array.from(e).forEach((i) => i.classList.remove("dgComponentSelected"));
|
|
881
|
+
}
|
|
882
|
+
function ne(e) {
|
|
883
|
+
e.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
884
|
+
}
|
|
885
|
+
function W(e, i) {
|
|
886
|
+
var G;
|
|
887
|
+
const { contents: h = [] } = d.schema, P = h == null ? void 0 : h.findIndex((ue) => ue.id === e), z = h[P];
|
|
888
|
+
(G = d == null ? void 0 : d.setupContext) == null || G.emit("selectionChange", z.type, z, a.componentId, i);
|
|
889
|
+
}
|
|
890
|
+
function be(e, i) {
|
|
891
|
+
const h = i.getBoundingClientRect(), P = e.getBoundingClientRect(), z = P.left + P.width <= h.left + h.width, G = P.left + P.width >= h.left;
|
|
892
|
+
return z && G;
|
|
893
|
+
}
|
|
894
|
+
function J(e, i) {
|
|
895
|
+
if (e || (e = m.value.querySelector(".farris-tabs-header").querySelector(".dgComponentSelected")), i || (i = m.value.querySelector(".farris-nav-tabs")), e && i) {
|
|
896
|
+
const h = e.querySelector(".component-btn-group");
|
|
897
|
+
be(e, i) ? At(e) : h && (h.style.display = "none");
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
function ce() {
|
|
901
|
+
s && s.value && s.value.addEventListener("scroll", (e) => {
|
|
902
|
+
const i = e.target.querySelector(".dgComponentSelected");
|
|
903
|
+
J(i, e.target);
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
function $(e) {
|
|
907
|
+
if (e && e.parentElement) {
|
|
908
|
+
let i = e.getBoundingClientRect(), h = e.parentElement.getBoundingClientRect();
|
|
909
|
+
(i.left < h.left || i.right > h.right) && (s.value.scrollLeft = 0, i = e.getBoundingClientRect(), h = e.parentElement.getBoundingClientRect(), s.value.scrollLeft = i.left - h.left), $t(e);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
function ae(e, i, h) {
|
|
913
|
+
var G, ue, de;
|
|
914
|
+
ie(), M(e), ne(e), W(i, h);
|
|
915
|
+
const P = e.currentTarget;
|
|
916
|
+
$(P);
|
|
917
|
+
const z = (ue = (G = h.schema) == null ? void 0 : G.contents) == null ? void 0 : ue.find((ee) => ee.id === i);
|
|
918
|
+
if (z && (!z.toolbar || ((de = z.toolbar.buttons) == null ? void 0 : de.length) === 0)) {
|
|
919
|
+
const ee = e.currentTarget;
|
|
920
|
+
te(() => {
|
|
921
|
+
ie(), ee == null || ee.classList.add("dgComponentFocused", "dgComponentSelected"), $(ee);
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
function se(e, i) {
|
|
926
|
+
M(e);
|
|
927
|
+
const h = d.schema.contents, P = h == null ? void 0 : h.find((G) => G.id === i);
|
|
928
|
+
if (!P)
|
|
929
|
+
return;
|
|
930
|
+
(!P.toolbar || !P.toolbar.buttons) && (P.toolbar = { id: `${P.id}_toolbar`, buttons: [] }), P.toolbar.id || (P.toolbar.id = `${P.id}_toolbar`);
|
|
931
|
+
const z = tt("tab-toolbar-item");
|
|
932
|
+
z.id = `tab_toolbar_item_${Math.random().toString().slice(2, 6)}`, P.toolbar.buttons.push(z), f.value = [...P.toolbar.buttons], p.value = P.toolbar, te(() => {
|
|
933
|
+
if (s && s.value) {
|
|
934
|
+
const G = s.value.querySelector(".f-state-active");
|
|
935
|
+
G && $(G);
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
function Y(e) {
|
|
940
|
+
}
|
|
941
|
+
return {
|
|
942
|
+
activeId: n,
|
|
943
|
+
addTab: _,
|
|
944
|
+
changeTitleStyle: O,
|
|
945
|
+
removeTab: H,
|
|
946
|
+
selectTab: S,
|
|
947
|
+
tabPages: c,
|
|
948
|
+
updateTab: R,
|
|
949
|
+
toolbarItems: f,
|
|
950
|
+
removeDesignTab: ye,
|
|
951
|
+
selectDesignTab: ae,
|
|
952
|
+
toolbarSchema: p,
|
|
953
|
+
changeToolbarItems: k,
|
|
954
|
+
addTabPageToolbar: se,
|
|
955
|
+
listenTabNavElementScroll: ce,
|
|
956
|
+
setHorizontalScrollbarPosition: $,
|
|
957
|
+
needUpdateNavigationLayout: u,
|
|
958
|
+
checkActiveIdAndSelect: j,
|
|
959
|
+
toggleShowTab: b,
|
|
960
|
+
hasInHeadClass: g,
|
|
961
|
+
emitSelectionChange: W,
|
|
962
|
+
resetPositionForSelectedElement: J,
|
|
963
|
+
setTabsRef: C,
|
|
964
|
+
setScrollToSelectedTabFunction: Y
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
function Tn(a, t, s, d, v) {
|
|
968
|
+
var g;
|
|
969
|
+
const {
|
|
970
|
+
toolbarItems: l,
|
|
971
|
+
toolbarSchema: c,
|
|
972
|
+
changeToolbarItems: n,
|
|
973
|
+
hasInHeadClass: r
|
|
974
|
+
} = a, p = `${((g = d == null ? void 0 : d.schema) == null ? void 0 : g.id) || ""}-toolbar`;
|
|
975
|
+
function f(m, C, T, k) {
|
|
976
|
+
var L;
|
|
977
|
+
(L = d.setupContext) == null || L.emit("selectionChange", m, C, T, k);
|
|
978
|
+
}
|
|
979
|
+
function u() {
|
|
980
|
+
n();
|
|
981
|
+
}
|
|
982
|
+
return F("div", {
|
|
983
|
+
class: "farris-tabs-toolbar",
|
|
984
|
+
style: "overflow:unset;"
|
|
985
|
+
}, [F("div", {
|
|
986
|
+
class: "farris-tabs-inline-flex w-100",
|
|
987
|
+
style: "flex:1"
|
|
988
|
+
}, [F(jt, {
|
|
989
|
+
modelValue: c.value,
|
|
990
|
+
"onUpdate:modelValue": (m) => c.value = m,
|
|
991
|
+
class: "w-100 position-relative",
|
|
992
|
+
canAdd: !1,
|
|
993
|
+
childType: "tab-toolbar-item",
|
|
994
|
+
childLabel: "按钮",
|
|
995
|
+
contentKey: "buttons",
|
|
996
|
+
id: p,
|
|
997
|
+
onSelectionChange: f,
|
|
998
|
+
componentId: v,
|
|
999
|
+
onAddComponent: u
|
|
1000
|
+
}, {
|
|
1001
|
+
default: () => [F(kt, {
|
|
1002
|
+
alignment: r.value ? "right" : "left",
|
|
1003
|
+
items: l.value,
|
|
1004
|
+
componentId: v
|
|
1005
|
+
}, null)]
|
|
1006
|
+
})])]);
|
|
1007
|
+
}
|
|
1008
|
+
var ge = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1009
|
+
function Cn(a) {
|
|
1010
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
1011
|
+
}
|
|
1012
|
+
function Se(a) {
|
|
1013
|
+
throw new Error('Could not dynamically require "' + a + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1014
|
+
}
|
|
1015
|
+
var at = { exports: {} };
|
|
1016
|
+
(function(a, t) {
|
|
1017
|
+
(function(s) {
|
|
1018
|
+
a.exports = s();
|
|
1019
|
+
})(function() {
|
|
1020
|
+
return (/* @__PURE__ */ function() {
|
|
1021
|
+
function s(d, v, l) {
|
|
1022
|
+
function c(p, f) {
|
|
1023
|
+
if (!v[p]) {
|
|
1024
|
+
if (!d[p]) {
|
|
1025
|
+
var u = typeof Se == "function" && Se;
|
|
1026
|
+
if (!f && u) return u(p, !0);
|
|
1027
|
+
if (n) return n(p, !0);
|
|
1028
|
+
var g = new Error("Cannot find module '" + p + "'");
|
|
1029
|
+
throw g.code = "MODULE_NOT_FOUND", g;
|
|
1030
|
+
}
|
|
1031
|
+
var m = v[p] = { exports: {} };
|
|
1032
|
+
d[p][0].call(m.exports, function(C) {
|
|
1033
|
+
var T = d[p][1][C];
|
|
1034
|
+
return c(T || C);
|
|
1035
|
+
}, m, m.exports, s, d, v, l);
|
|
1036
|
+
}
|
|
1037
|
+
return v[p].exports;
|
|
1038
|
+
}
|
|
1039
|
+
for (var n = typeof Se == "function" && Se, r = 0; r < l.length; r++) c(l[r]);
|
|
1040
|
+
return c;
|
|
1041
|
+
}
|
|
1042
|
+
return s;
|
|
1043
|
+
}())({
|
|
1044
|
+
1: [function(s, d, v) {
|
|
1045
|
+
var l = {}, c = "(?:^|\\s)", n = "(?:\\s|$)";
|
|
1046
|
+
function r(u) {
|
|
1047
|
+
var g = l[u];
|
|
1048
|
+
return g ? g.lastIndex = 0 : l[u] = g = new RegExp(c + u + n, "g"), g;
|
|
1049
|
+
}
|
|
1050
|
+
function p(u, g) {
|
|
1051
|
+
var m = u.className;
|
|
1052
|
+
m.length ? r(g).test(m) || (u.className += " " + g) : u.className = g;
|
|
1053
|
+
}
|
|
1054
|
+
function f(u, g) {
|
|
1055
|
+
u.className = u.className.replace(r(g), " ").trim();
|
|
1056
|
+
}
|
|
1057
|
+
d.exports = {
|
|
1058
|
+
add: p,
|
|
1059
|
+
rm: f
|
|
1060
|
+
};
|
|
1061
|
+
}, {}],
|
|
1062
|
+
2: [function(s, d, v) {
|
|
1063
|
+
(function(l) {
|
|
1064
|
+
var c = s("contra/emitter"), n = s("crossvent"), r = s("./classes"), p = document, f = p.documentElement;
|
|
1065
|
+
function u(b, S) {
|
|
1066
|
+
var _ = arguments.length;
|
|
1067
|
+
_ === 1 && Array.isArray(b) === !1 && (S = b, b = []);
|
|
1068
|
+
var R, M, N, pe, ye, ie, ne, W, be, J = null, ce, $, ae = !1, se = 0, Y, e = S || {};
|
|
1069
|
+
e.moves === void 0 && (e.moves = B), e.accepts === void 0 && (e.accepts = B), e.invalid === void 0 && (e.invalid = ut), e.containers === void 0 && (e.containers = b || []), e.isContainer === void 0 && (e.isContainer = L), e.copy === void 0 && (e.copy = !1), e.copySortSource === void 0 && (e.copySortSource = !1), e.revertOnSpill === void 0 && (e.revertOnSpill = !1), e.removeOnSpill === void 0 && (e.removeOnSpill = !1), e.direction === void 0 && (e.direction = "vertical"), e.ignoreInputTextSelection === void 0 && (e.ignoreInputTextSelection = !0), e.mirrorContainer === void 0 && (e.mirrorContainer = p.body);
|
|
1070
|
+
var i = c({
|
|
1071
|
+
containers: e.containers,
|
|
1072
|
+
start: ct,
|
|
1073
|
+
end: ke,
|
|
1074
|
+
cancel: Fe,
|
|
1075
|
+
remove: Me,
|
|
1076
|
+
destroy: ue,
|
|
1077
|
+
canMove: lt,
|
|
1078
|
+
dragging: !1
|
|
1079
|
+
});
|
|
1080
|
+
return e.removeOnSpill === !0 && i.on("over", ft).on("out", pt), P(), i;
|
|
1081
|
+
function h(o) {
|
|
1082
|
+
return i.containers.indexOf(o) !== -1 || e.isContainer(o);
|
|
1083
|
+
}
|
|
1084
|
+
function P(o) {
|
|
1085
|
+
var y = o ? "remove" : "add";
|
|
1086
|
+
C(f, y, "mousedown", ee), C(f, y, "mouseup", Ee);
|
|
1087
|
+
}
|
|
1088
|
+
function z(o) {
|
|
1089
|
+
var y = o ? "remove" : "add";
|
|
1090
|
+
C(f, y, "mousemove", Ie);
|
|
1091
|
+
}
|
|
1092
|
+
function G(o) {
|
|
1093
|
+
var y = o ? "remove" : "add";
|
|
1094
|
+
n[y](f, "selectstart", de), n[y](f, "click", de);
|
|
1095
|
+
}
|
|
1096
|
+
function ue() {
|
|
1097
|
+
P(!0), Ee({});
|
|
1098
|
+
}
|
|
1099
|
+
function de(o) {
|
|
1100
|
+
ce && o.preventDefault();
|
|
1101
|
+
}
|
|
1102
|
+
function ee(o) {
|
|
1103
|
+
pe = o.clientX, ye = o.clientY;
|
|
1104
|
+
var y = T(o) !== 1 || o.metaKey || o.ctrlKey;
|
|
1105
|
+
if (!y) {
|
|
1106
|
+
var w = o.target, x = Te(w);
|
|
1107
|
+
x && (ce = x, z(), o.type === "mousedown" && (D(w) ? w.focus() : o.preventDefault()));
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
function Ie(o) {
|
|
1111
|
+
if (ce) {
|
|
1112
|
+
if (T(o) === 0) {
|
|
1113
|
+
Ee({});
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
if (!(o.clientX !== void 0 && Math.abs(o.clientX - pe) <= (e.slideFactorX || 0) && o.clientY !== void 0 && Math.abs(o.clientY - ye) <= (e.slideFactorY || 0))) {
|
|
1117
|
+
if (e.ignoreInputTextSelection) {
|
|
1118
|
+
var y = H("clientX", o) || 0, w = H("clientY", o) || 0, x = p.elementFromPoint(y, w);
|
|
1119
|
+
if (D(x))
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
var q = ce;
|
|
1123
|
+
z(!0), G(), ke(), Le(q), r.add(W || N, "gu-transit"), mt(), vt(), se = 0, De(o);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
function Te(o) {
|
|
1128
|
+
if (!(i.dragging && R) && !h(o)) {
|
|
1129
|
+
for (var y = o; I(o) && h(I(o)) === !1; )
|
|
1130
|
+
if (e.invalid(o, y) || (o = I(o), !o))
|
|
1131
|
+
return;
|
|
1132
|
+
var w = I(o);
|
|
1133
|
+
if (w && !e.invalid(o, y)) {
|
|
1134
|
+
var x = e.moves(o, w, y, A(o));
|
|
1135
|
+
if (x)
|
|
1136
|
+
return {
|
|
1137
|
+
item: o,
|
|
1138
|
+
source: w
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
function lt(o) {
|
|
1144
|
+
return !!Te(o);
|
|
1145
|
+
}
|
|
1146
|
+
function ct(o) {
|
|
1147
|
+
var y = Te(o);
|
|
1148
|
+
y && Le(y);
|
|
1149
|
+
}
|
|
1150
|
+
function Le(o) {
|
|
1151
|
+
It(o.item, o.source) && (W = o.item.cloneNode(!0), i.emit("cloned", W, o.item, "copy")), M = o.source, N = o.item, ie = ne = A(o.item), i.dragging = !0, i.emit("drag", N, M);
|
|
1152
|
+
}
|
|
1153
|
+
function ut() {
|
|
1154
|
+
return !1;
|
|
1155
|
+
}
|
|
1156
|
+
function ke() {
|
|
1157
|
+
if (i.dragging) {
|
|
1158
|
+
var o = W || N;
|
|
1159
|
+
_e(o, I(o));
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
function He() {
|
|
1163
|
+
ce = !1, z(!0), G(!0);
|
|
1164
|
+
}
|
|
1165
|
+
function Ee(o) {
|
|
1166
|
+
if (He(), !!i.dragging) {
|
|
1167
|
+
var y = W || N, w = H("clientX", o) || 0, x = H("clientY", o) || 0, q = k(R, w, x), V = qe(q, w, x);
|
|
1168
|
+
V && (W && e.copySortSource || !W || V !== M) ? _e(y, V) : e.removeOnSpill ? Me() : Fe();
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
function _e(o, y) {
|
|
1172
|
+
var w = I(o);
|
|
1173
|
+
W && e.copySortSource && y === M && w.removeChild(N), Re(y) ? i.emit("cancel", o, M) : i.emit("drop", o, y, M, ne), Be();
|
|
1174
|
+
}
|
|
1175
|
+
function Me() {
|
|
1176
|
+
if (i.dragging) {
|
|
1177
|
+
var o = W || N, y = I(o);
|
|
1178
|
+
y && y.removeChild(o), i.emit(W ? "cancel" : "remove", o, y, M), Be();
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
function Fe(o) {
|
|
1182
|
+
if (i.dragging) {
|
|
1183
|
+
var y = arguments.length > 0 ? o : e.revertOnSpill, w = W || N, x = I(w), q = Re(x);
|
|
1184
|
+
q === !1 && y && (W ? x && x.removeChild(W) : M.insertBefore(w, ie)), q || y ? i.emit("cancel", w, M, M) : i.emit("drop", w, x, M, ne), Be();
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
function Be() {
|
|
1188
|
+
var o = W || N;
|
|
1189
|
+
He(), gt(), bt(), o && r.rm(o, "gu-transit"), be && clearTimeout(be), i.dragging = !1, J && i.emit("out", o, J, M), i.emit("dragend", o, se), M = N = W = ie = ne = be = J = null;
|
|
1190
|
+
}
|
|
1191
|
+
function Re(o, y) {
|
|
1192
|
+
var w;
|
|
1193
|
+
return y !== void 0 ? w = y : R ? w = ne : w = A(W || N), o === M && w === ie;
|
|
1194
|
+
}
|
|
1195
|
+
function qe(o, y, w) {
|
|
1196
|
+
for (var x = o; x && !q(); )
|
|
1197
|
+
x = I(x);
|
|
1198
|
+
return x;
|
|
1199
|
+
function q() {
|
|
1200
|
+
var V = h(x);
|
|
1201
|
+
if (V === !1)
|
|
1202
|
+
return !1;
|
|
1203
|
+
var fe = Ne(x, o), oe = Ve(x, fe, y, w), le = Re(x, oe);
|
|
1204
|
+
return le ? !0 : e.accepts(N, x, M, oe);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
function De(o) {
|
|
1208
|
+
if (!R)
|
|
1209
|
+
return;
|
|
1210
|
+
o.preventDefault();
|
|
1211
|
+
var y = H("clientX", o) || 0, w = H("clientY", o) || 0;
|
|
1212
|
+
R.style.left = y - 2 + "px", R.style.top = w - 2 + "px";
|
|
1213
|
+
var x = W || N, q = k(R, y, w), V = qe(q, y, w), fe = V !== null && V !== J;
|
|
1214
|
+
(fe || V === null) && (re(), J = V, me()), wt(q, w);
|
|
1215
|
+
var oe = I(x);
|
|
1216
|
+
if (V === M && W && !e.copySortSource) {
|
|
1217
|
+
oe && oe.removeChild(x);
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
var le, ve = Ne(V, q);
|
|
1221
|
+
if (ae = ht(ve, V), ve !== null)
|
|
1222
|
+
le = Ve(V, ve, y, w);
|
|
1223
|
+
else if (e.revertOnSpill === !0 && !W)
|
|
1224
|
+
le = ie, V = M;
|
|
1225
|
+
else {
|
|
1226
|
+
W && oe && oe.removeChild(x), W && $ && ($.style.display = "none");
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
$.style.display = "block", dt(le, x, fe), le ? Tt(ve, le) : Ct(V);
|
|
1230
|
+
function Q(Z) {
|
|
1231
|
+
i.emit(Z, x, J, M);
|
|
1232
|
+
}
|
|
1233
|
+
function me() {
|
|
1234
|
+
fe && Q("over");
|
|
1235
|
+
}
|
|
1236
|
+
function re() {
|
|
1237
|
+
J && Q("out");
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
function dt(o, y, w) {
|
|
1241
|
+
(o === y || o === A(y)) && (ne = A(y)), (o === null && w || o !== y && o !== A(y)) && (ne = o);
|
|
1242
|
+
}
|
|
1243
|
+
function ft(o) {
|
|
1244
|
+
r.rm(o, "gu-hide");
|
|
1245
|
+
}
|
|
1246
|
+
function pt(o) {
|
|
1247
|
+
i.dragging && r.add(o, "gu-hide");
|
|
1248
|
+
}
|
|
1249
|
+
function vt() {
|
|
1250
|
+
R || (R = document.createElement("div"), R.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;", R.innerHTML = e.getMirrorText && e.getMirrorText(N) || "控件", r.add(R, "gu-mirror"), e.mirrorContainer.appendChild(R), C(f, "add", "mousemove", De), r.add(e.mirrorContainer, "gu-unselectable"), i.emit("cloned", R, N, "mirror"));
|
|
1251
|
+
}
|
|
1252
|
+
function mt() {
|
|
1253
|
+
if ($ = document.createElement("div"), r.add($, "gu-insertion"), N) {
|
|
1254
|
+
var o = N.getBoundingClientRect();
|
|
1255
|
+
$.style.left = o.left + "px", $.style.top = o.top + "px";
|
|
1256
|
+
}
|
|
1257
|
+
ae = !1, e.mirrorContainer.appendChild($);
|
|
1258
|
+
}
|
|
1259
|
+
function gt() {
|
|
1260
|
+
R && (r.rm(e.mirrorContainer, "gu-unselectable"), C(f, "remove", "mousemove", De), I(R).removeChild(R), R = null);
|
|
1261
|
+
}
|
|
1262
|
+
function bt() {
|
|
1263
|
+
$ && (I($).removeChild($), $ = null);
|
|
1264
|
+
}
|
|
1265
|
+
function Ne(o, y) {
|
|
1266
|
+
for (var w = y; w !== o && I(w) !== o; )
|
|
1267
|
+
w = I(w);
|
|
1268
|
+
return w === f ? null : w;
|
|
1269
|
+
}
|
|
1270
|
+
function ht(o, y) {
|
|
1271
|
+
if (!y)
|
|
1272
|
+
return ae;
|
|
1273
|
+
var w = o || y && y.lastElementChild;
|
|
1274
|
+
if (!w)
|
|
1275
|
+
return !0;
|
|
1276
|
+
var x = getComputedStyle(o), q = /^inline/.test(x.getPropertyValue("display")) || /^(left|right)$/.test(x.getPropertyValue("float"));
|
|
1277
|
+
if (q)
|
|
1278
|
+
return !0;
|
|
1279
|
+
if (y) {
|
|
1280
|
+
var V = getComputedStyle(y), fe = V.getPropertyValue("display");
|
|
1281
|
+
if (/flex$/.test(fe)) {
|
|
1282
|
+
var oe = V.getPropertyValue("flex-direction") || "row";
|
|
1283
|
+
if (oe === "row" || oe === "row-reverse")
|
|
1284
|
+
return !yt(y);
|
|
1285
|
+
}
|
|
1286
|
+
return !1;
|
|
1287
|
+
}
|
|
1288
|
+
return !0;
|
|
1289
|
+
}
|
|
1290
|
+
function yt(o) {
|
|
1291
|
+
if (!o.children || !o.children.length)
|
|
1292
|
+
return !1;
|
|
1293
|
+
for (const y of Array.from(o.children)) {
|
|
1294
|
+
const x = (y.className && y.className.split(" ") || []).filter((q) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(q));
|
|
1295
|
+
if (!x.length)
|
|
1296
|
+
return !1;
|
|
1297
|
+
for (const q of x) {
|
|
1298
|
+
const V = q.slice(q.lastIndexOf("-") + 1);
|
|
1299
|
+
if (parseInt(V, 10) !== 12)
|
|
1300
|
+
return !1;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
return !0;
|
|
1304
|
+
}
|
|
1305
|
+
function Tt(o, y) {
|
|
1306
|
+
const w = y.getBoundingClientRect();
|
|
1307
|
+
if ($.style.left = w.left + "px", $.style.top = w.top + "px", ae) {
|
|
1308
|
+
if ($.style.height = w.height + "px", $.style.width = "4px", o) {
|
|
1309
|
+
const x = o.getBoundingClientRect();
|
|
1310
|
+
x.top !== w.top && ($.style.left = x.right + "px", $.style.top = x.top + "px", $.style.height = x.height + "px");
|
|
1311
|
+
}
|
|
1312
|
+
} else if ($.style.height = "4px", $.style.width = w.width + "px", Y) {
|
|
1313
|
+
const x = Y.getBoundingClientRect();
|
|
1314
|
+
w.top < x.top && ($.style.display = "none");
|
|
1315
|
+
}
|
|
1316
|
+
y === N && N && ($.style.display = "none");
|
|
1317
|
+
}
|
|
1318
|
+
function Ct(o) {
|
|
1319
|
+
ne = null;
|
|
1320
|
+
var y = o.lastElementChild;
|
|
1321
|
+
if (y) {
|
|
1322
|
+
var w = y.getBoundingClientRect();
|
|
1323
|
+
ae ? ($.style.left = w.right + "px", $.style.top = w.top + "px", $.style.height = w.height + "px", $.style.width = "4px") : ($.style.left = w.left + "px", $.style.top = w.bottom + "px", $.style.height = "4px", $.style.width = w.width + "px"), y === N && N && ($.style.display = "none");
|
|
1324
|
+
} else
|
|
1325
|
+
$.style.display = "none";
|
|
1326
|
+
}
|
|
1327
|
+
function wt(o, y) {
|
|
1328
|
+
if (!e.mirrorContainer.contains(o) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (Y = g(o), !Y || !Y.contains(o)))
|
|
1329
|
+
return;
|
|
1330
|
+
const w = document.querySelector(".dgComponentSelected"), x = Y.getBoundingClientRect();
|
|
1331
|
+
if (y - 30 < x.top && Y.scrollTop > 0) {
|
|
1332
|
+
let q = Y.scrollTop < 10 ? Y.scrollTop : 10;
|
|
1333
|
+
Y.scrollBy(0, -1 * q), w && Y.contains(w) && (se = se + -1 * q);
|
|
1334
|
+
}
|
|
1335
|
+
if (y + 30 > x.bottom && Y.scrollTop < Y.scrollHeight - Y.clientHeight) {
|
|
1336
|
+
const q = Y.scrollHeight - Y.clientHeight - Y.scrollTop;
|
|
1337
|
+
let V = q < 10 ? q : 10;
|
|
1338
|
+
Y.scrollBy(0, V), w && Y.contains(w) && (se = se + V);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
function Ve(o, y, w, x) {
|
|
1342
|
+
var q = e.direction === "horizontal", V = e.direction === "mixed", fe = y !== o ? le() : oe();
|
|
1343
|
+
return fe;
|
|
1344
|
+
function oe() {
|
|
1345
|
+
var Q = o.children.length, me, re, Z;
|
|
1346
|
+
for (me = 0; me < Q; me++)
|
|
1347
|
+
if (re = o.children[me], Z = re.getBoundingClientRect(), q && Z.left + Z.width / 2 > w || !V && !q && Z.top + Z.height / 2 > x || V && Z.left + Z.width > w && Z.top + Z.height > x)
|
|
1348
|
+
return re;
|
|
1349
|
+
return null;
|
|
1350
|
+
}
|
|
1351
|
+
function le() {
|
|
1352
|
+
var Q = y.getBoundingClientRect();
|
|
1353
|
+
if (V) {
|
|
1354
|
+
var me = x - Q.top, re = w - Q.left, Z = Q.bottom - x, Ae = Q.right - w, $e = Math.min(re, Ae, me, Z), je;
|
|
1355
|
+
return ae ? je = Ae < re : je = Z === $e || Ae === $e || re === $e, ve(je);
|
|
1356
|
+
}
|
|
1357
|
+
return ve(q ? w > Q.left + j(Q) / 2 : x > Q.top + E(Q) / 2);
|
|
1358
|
+
}
|
|
1359
|
+
function ve(Q) {
|
|
1360
|
+
return Q ? A(y) : y;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
function It(o, y) {
|
|
1364
|
+
return typeof e.copy == "boolean" ? e.copy : e.copy(o, y);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
function g(b) {
|
|
1368
|
+
const S = Array.from(window.scrollContainerList);
|
|
1369
|
+
if (S.length === 1) {
|
|
1370
|
+
const R = Array.from(window.scrollContainerList)[0];
|
|
1371
|
+
return document.getElementById(R);
|
|
1372
|
+
}
|
|
1373
|
+
const _ = m(S);
|
|
1374
|
+
for (const R of _)
|
|
1375
|
+
if (R.contains(b))
|
|
1376
|
+
return R;
|
|
1377
|
+
return null;
|
|
1378
|
+
}
|
|
1379
|
+
function m(b) {
|
|
1380
|
+
const S = [];
|
|
1381
|
+
return b.forEach((_) => {
|
|
1382
|
+
const R = document.getElementById(_);
|
|
1383
|
+
R && S.push(R);
|
|
1384
|
+
}), S.sort((_, R) => _.contains(R) ? 1 : R.contains(_) ? -1 : 0), S;
|
|
1385
|
+
}
|
|
1386
|
+
function C(b, S, _, R) {
|
|
1387
|
+
var M = {
|
|
1388
|
+
mouseup: "touchend",
|
|
1389
|
+
mousedown: "touchstart",
|
|
1390
|
+
mousemove: "touchmove"
|
|
1391
|
+
}, N = {
|
|
1392
|
+
mouseup: "pointerup",
|
|
1393
|
+
mousedown: "pointerdown",
|
|
1394
|
+
mousemove: "pointermove"
|
|
1395
|
+
}, pe = {
|
|
1396
|
+
mouseup: "MSPointerUp",
|
|
1397
|
+
mousedown: "MSPointerDown",
|
|
1398
|
+
mousemove: "MSPointerMove"
|
|
1399
|
+
};
|
|
1400
|
+
l.navigator.pointerEnabled ? n[S](b, N[_], R) : l.navigator.msPointerEnabled ? n[S](b, pe[_], R) : (n[S](b, M[_], R), n[S](b, _, R));
|
|
1401
|
+
}
|
|
1402
|
+
function T(b) {
|
|
1403
|
+
if (b.touches !== void 0)
|
|
1404
|
+
return b.touches.length;
|
|
1405
|
+
if (b.which !== void 0 && b.which !== 0)
|
|
1406
|
+
return b.which;
|
|
1407
|
+
if (b.buttons !== void 0)
|
|
1408
|
+
return b.buttons;
|
|
1409
|
+
var S = b.button;
|
|
1410
|
+
if (S !== void 0)
|
|
1411
|
+
return S & 1 ? 1 : S & 2 ? 3 : S & 4 ? 2 : 0;
|
|
1412
|
+
}
|
|
1413
|
+
function k(b, S, _) {
|
|
1414
|
+
b = b || {};
|
|
1415
|
+
var R = b.className || "", M;
|
|
1416
|
+
return b.className += " gu-hide", M = p.elementFromPoint(S, _), b.className = R, M;
|
|
1417
|
+
}
|
|
1418
|
+
function L() {
|
|
1419
|
+
return !1;
|
|
1420
|
+
}
|
|
1421
|
+
function B() {
|
|
1422
|
+
return !0;
|
|
1423
|
+
}
|
|
1424
|
+
function j(b) {
|
|
1425
|
+
return b.width || b.right - b.left;
|
|
1426
|
+
}
|
|
1427
|
+
function E(b) {
|
|
1428
|
+
return b.height || b.bottom - b.top;
|
|
1429
|
+
}
|
|
1430
|
+
function I(b) {
|
|
1431
|
+
return b.parentNode === p ? null : b.parentNode;
|
|
1432
|
+
}
|
|
1433
|
+
function D(b) {
|
|
1434
|
+
return b.tagName === "INPUT" || b.tagName === "TEXTAREA" || b.tagName === "SELECT" || O(b);
|
|
1435
|
+
}
|
|
1436
|
+
function O(b) {
|
|
1437
|
+
return !b || b.contentEditable === "false" ? !1 : b.contentEditable === "true" ? !0 : O(I(b));
|
|
1438
|
+
}
|
|
1439
|
+
function A(b) {
|
|
1440
|
+
return b.nextElementSibling || S();
|
|
1441
|
+
function S() {
|
|
1442
|
+
var _ = b;
|
|
1443
|
+
do
|
|
1444
|
+
_ = _.nextSibling;
|
|
1445
|
+
while (_ && _.nodeType !== 1);
|
|
1446
|
+
return _;
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
function X(b) {
|
|
1450
|
+
return b.targetTouches && b.targetTouches.length ? b.targetTouches[0] : b.changedTouches && b.changedTouches.length ? b.changedTouches[0] : b;
|
|
1451
|
+
}
|
|
1452
|
+
function H(b, S) {
|
|
1453
|
+
var _ = X(S), R = {
|
|
1454
|
+
pageX: "clientX",
|
|
1455
|
+
// IE8
|
|
1456
|
+
pageY: "clientY"
|
|
1457
|
+
// IE8
|
|
1458
|
+
};
|
|
1459
|
+
return b in R && !(b in _) && R[b] in _ && (b = R[b]), _[b];
|
|
1460
|
+
}
|
|
1461
|
+
d.exports = u;
|
|
1462
|
+
}).call(this, typeof ge < "u" ? ge : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1463
|
+
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
|
|
1464
|
+
3: [function(s, d, v) {
|
|
1465
|
+
d.exports = function(c, n) {
|
|
1466
|
+
return Array.prototype.slice.call(c, n);
|
|
1467
|
+
};
|
|
1468
|
+
}, {}],
|
|
1469
|
+
4: [function(s, d, v) {
|
|
1470
|
+
var l = s("ticky");
|
|
1471
|
+
d.exports = function(n, r, p) {
|
|
1472
|
+
n && l(function() {
|
|
1473
|
+
n.apply(p || null, r || []);
|
|
1474
|
+
});
|
|
1475
|
+
};
|
|
1476
|
+
}, { ticky: 10 }],
|
|
1477
|
+
5: [function(s, d, v) {
|
|
1478
|
+
var l = s("atoa"), c = s("./debounce");
|
|
1479
|
+
d.exports = function(r, p) {
|
|
1480
|
+
var f = p || {}, u = {};
|
|
1481
|
+
return r === void 0 && (r = {}), r.on = function(g, m) {
|
|
1482
|
+
return u[g] ? u[g].push(m) : u[g] = [m], r;
|
|
1483
|
+
}, r.once = function(g, m) {
|
|
1484
|
+
return m._once = !0, r.on(g, m), r;
|
|
1485
|
+
}, r.off = function(g, m) {
|
|
1486
|
+
var C = arguments.length;
|
|
1487
|
+
if (C === 1)
|
|
1488
|
+
delete u[g];
|
|
1489
|
+
else if (C === 0)
|
|
1490
|
+
u = {};
|
|
1491
|
+
else {
|
|
1492
|
+
var T = u[g];
|
|
1493
|
+
if (!T)
|
|
1494
|
+
return r;
|
|
1495
|
+
T.splice(T.indexOf(m), 1);
|
|
1496
|
+
}
|
|
1497
|
+
return r;
|
|
1498
|
+
}, r.emit = function() {
|
|
1499
|
+
var g = l(arguments);
|
|
1500
|
+
return r.emitterSnapshot(g.shift()).apply(this, g);
|
|
1501
|
+
}, r.emitterSnapshot = function(g) {
|
|
1502
|
+
var m = (u[g] || []).slice(0);
|
|
1503
|
+
return function() {
|
|
1504
|
+
var C = l(arguments), T = this || r;
|
|
1505
|
+
if (g === "error" && f.throws !== !1 && !m.length)
|
|
1506
|
+
throw C.length === 1 ? C[0] : C;
|
|
1507
|
+
return m.forEach(function(L) {
|
|
1508
|
+
f.async ? c(L, C, T) : L.apply(T, C), L._once && r.off(g, L);
|
|
1509
|
+
}), r;
|
|
1510
|
+
};
|
|
1511
|
+
}, r;
|
|
1512
|
+
};
|
|
1513
|
+
}, { "./debounce": 4, atoa: 3 }],
|
|
1514
|
+
6: [function(s, d, v) {
|
|
1515
|
+
(function(l) {
|
|
1516
|
+
var c = s("custom-event"), n = s("./eventmap"), r = l.document, p = g, f = C, u = [];
|
|
1517
|
+
l.addEventListener || (p = m, f = T), d.exports = {
|
|
1518
|
+
add: p,
|
|
1519
|
+
remove: f,
|
|
1520
|
+
fabricate: k
|
|
1521
|
+
};
|
|
1522
|
+
function g(I, D, O, A) {
|
|
1523
|
+
return I.addEventListener(D, O, A);
|
|
1524
|
+
}
|
|
1525
|
+
function m(I, D, O) {
|
|
1526
|
+
return I.attachEvent("on" + D, B(I, D, O));
|
|
1527
|
+
}
|
|
1528
|
+
function C(I, D, O, A) {
|
|
1529
|
+
return I.removeEventListener(D, O, A);
|
|
1530
|
+
}
|
|
1531
|
+
function T(I, D, O) {
|
|
1532
|
+
var A = j(I, D, O);
|
|
1533
|
+
if (A)
|
|
1534
|
+
return I.detachEvent("on" + D, A);
|
|
1535
|
+
}
|
|
1536
|
+
function k(I, D, O) {
|
|
1537
|
+
var A = n.indexOf(D) === -1 ? H() : X();
|
|
1538
|
+
I.dispatchEvent ? I.dispatchEvent(A) : I.fireEvent("on" + D, A);
|
|
1539
|
+
function X() {
|
|
1540
|
+
var b;
|
|
1541
|
+
return r.createEvent ? (b = r.createEvent("Event"), b.initEvent(D, !0, !0)) : r.createEventObject && (b = r.createEventObject()), b;
|
|
1542
|
+
}
|
|
1543
|
+
function H() {
|
|
1544
|
+
return new c(D, { detail: O });
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
function L(I, D, O) {
|
|
1548
|
+
return function(X) {
|
|
1549
|
+
var H = X || l.event;
|
|
1550
|
+
H.target = H.target || H.srcElement, H.preventDefault = H.preventDefault || function() {
|
|
1551
|
+
H.returnValue = !1;
|
|
1552
|
+
}, H.stopPropagation = H.stopPropagation || function() {
|
|
1553
|
+
H.cancelBubble = !0;
|
|
1554
|
+
}, H.which = H.which || H.keyCode, O.call(I, H);
|
|
1555
|
+
};
|
|
1556
|
+
}
|
|
1557
|
+
function B(I, D, O) {
|
|
1558
|
+
var A = j(I, D, O) || L(I, D, O);
|
|
1559
|
+
return u.push({
|
|
1560
|
+
wrapper: A,
|
|
1561
|
+
element: I,
|
|
1562
|
+
type: D,
|
|
1563
|
+
fn: O
|
|
1564
|
+
}), A;
|
|
1565
|
+
}
|
|
1566
|
+
function j(I, D, O) {
|
|
1567
|
+
var A = E(I, D, O);
|
|
1568
|
+
if (A) {
|
|
1569
|
+
var X = u[A].wrapper;
|
|
1570
|
+
return u.splice(A, 1), X;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
function E(I, D, O) {
|
|
1574
|
+
var A, X;
|
|
1575
|
+
for (A = 0; A < u.length; A++)
|
|
1576
|
+
if (X = u[A], X.element === I && X.type === D && X.fn === O)
|
|
1577
|
+
return A;
|
|
1578
|
+
}
|
|
1579
|
+
}).call(this, typeof ge < "u" ? ge : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1580
|
+
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
1581
|
+
7: [function(s, d, v) {
|
|
1582
|
+
(function(l) {
|
|
1583
|
+
var c = [], n = "", r = /^on/;
|
|
1584
|
+
for (n in l)
|
|
1585
|
+
r.test(n) && c.push(n.slice(2));
|
|
1586
|
+
d.exports = c;
|
|
1587
|
+
}).call(this, typeof ge < "u" ? ge : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1588
|
+
}, {}],
|
|
1589
|
+
8: [function(s, d, v) {
|
|
1590
|
+
(function(l) {
|
|
1591
|
+
var c = l.CustomEvent;
|
|
1592
|
+
function n() {
|
|
1593
|
+
try {
|
|
1594
|
+
var r = new c("cat", { detail: { foo: "bar" } });
|
|
1595
|
+
return r.type === "cat" && r.detail.foo === "bar";
|
|
1596
|
+
} catch {
|
|
1597
|
+
}
|
|
1598
|
+
return !1;
|
|
1599
|
+
}
|
|
1600
|
+
d.exports = n() ? c : (
|
|
1601
|
+
// IE >= 9
|
|
1602
|
+
typeof document < "u" && typeof document.createEvent == "function" ? function(p, f) {
|
|
1603
|
+
var u = document.createEvent("CustomEvent");
|
|
1604
|
+
return f ? u.initCustomEvent(p, f.bubbles, f.cancelable, f.detail) : u.initCustomEvent(p, !1, !1, void 0), u;
|
|
1605
|
+
} : (
|
|
1606
|
+
// IE <= 8
|
|
1607
|
+
function(p, f) {
|
|
1608
|
+
var u = document.createEventObject();
|
|
1609
|
+
return u.type = p, f ? (u.bubbles = !!f.bubbles, u.cancelable = !!f.cancelable, u.detail = f.detail) : (u.bubbles = !1, u.cancelable = !1, u.detail = void 0), u;
|
|
1610
|
+
}
|
|
1611
|
+
)
|
|
1612
|
+
);
|
|
1613
|
+
}).call(this, typeof ge < "u" ? ge : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1614
|
+
}, {}],
|
|
1615
|
+
9: [function(s, d, v) {
|
|
1616
|
+
var l = d.exports = {}, c, n;
|
|
1617
|
+
function r() {
|
|
1618
|
+
throw new Error("setTimeout has not been defined");
|
|
1619
|
+
}
|
|
1620
|
+
function p() {
|
|
1621
|
+
throw new Error("clearTimeout has not been defined");
|
|
1622
|
+
}
|
|
1623
|
+
(function() {
|
|
1624
|
+
try {
|
|
1625
|
+
typeof setTimeout == "function" ? c = setTimeout : c = r;
|
|
1626
|
+
} catch {
|
|
1627
|
+
c = r;
|
|
1628
|
+
}
|
|
1629
|
+
try {
|
|
1630
|
+
typeof clearTimeout == "function" ? n = clearTimeout : n = p;
|
|
1631
|
+
} catch {
|
|
1632
|
+
n = p;
|
|
1633
|
+
}
|
|
1634
|
+
})();
|
|
1635
|
+
function f(E) {
|
|
1636
|
+
if (c === setTimeout)
|
|
1637
|
+
return setTimeout(E, 0);
|
|
1638
|
+
if ((c === r || !c) && setTimeout)
|
|
1639
|
+
return c = setTimeout, setTimeout(E, 0);
|
|
1640
|
+
try {
|
|
1641
|
+
return c(E, 0);
|
|
1642
|
+
} catch {
|
|
1643
|
+
try {
|
|
1644
|
+
return c.call(null, E, 0);
|
|
1645
|
+
} catch {
|
|
1646
|
+
return c.call(this, E, 0);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
function u(E) {
|
|
1651
|
+
if (n === clearTimeout)
|
|
1652
|
+
return clearTimeout(E);
|
|
1653
|
+
if ((n === p || !n) && clearTimeout)
|
|
1654
|
+
return n = clearTimeout, clearTimeout(E);
|
|
1655
|
+
try {
|
|
1656
|
+
return n(E);
|
|
1657
|
+
} catch {
|
|
1658
|
+
try {
|
|
1659
|
+
return n.call(null, E);
|
|
1660
|
+
} catch {
|
|
1661
|
+
return n.call(this, E);
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
var g = [], m = !1, C, T = -1;
|
|
1666
|
+
function k() {
|
|
1667
|
+
!m || !C || (m = !1, C.length ? g = C.concat(g) : T = -1, g.length && L());
|
|
1668
|
+
}
|
|
1669
|
+
function L() {
|
|
1670
|
+
if (!m) {
|
|
1671
|
+
var E = f(k);
|
|
1672
|
+
m = !0;
|
|
1673
|
+
for (var I = g.length; I; ) {
|
|
1674
|
+
for (C = g, g = []; ++T < I; )
|
|
1675
|
+
C && C[T].run();
|
|
1676
|
+
T = -1, I = g.length;
|
|
1677
|
+
}
|
|
1678
|
+
C = null, m = !1, u(E);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
l.nextTick = function(E) {
|
|
1682
|
+
var I = new Array(arguments.length - 1);
|
|
1683
|
+
if (arguments.length > 1)
|
|
1684
|
+
for (var D = 1; D < arguments.length; D++)
|
|
1685
|
+
I[D - 1] = arguments[D];
|
|
1686
|
+
g.push(new B(E, I)), g.length === 1 && !m && f(L);
|
|
1687
|
+
};
|
|
1688
|
+
function B(E, I) {
|
|
1689
|
+
this.fun = E, this.array = I;
|
|
1690
|
+
}
|
|
1691
|
+
B.prototype.run = function() {
|
|
1692
|
+
this.fun.apply(null, this.array);
|
|
1693
|
+
}, l.title = "browser", l.browser = !0, l.env = {}, l.argv = [], l.version = "", l.versions = {};
|
|
1694
|
+
function j() {
|
|
1695
|
+
}
|
|
1696
|
+
l.on = j, l.addListener = j, l.once = j, l.off = j, l.removeListener = j, l.removeAllListeners = j, l.emit = j, l.prependListener = j, l.prependOnceListener = j, l.listeners = function(E) {
|
|
1697
|
+
return [];
|
|
1698
|
+
}, l.binding = function(E) {
|
|
1699
|
+
throw new Error("process.binding is not supported");
|
|
1700
|
+
}, l.cwd = function() {
|
|
1701
|
+
return "/";
|
|
1702
|
+
}, l.chdir = function(E) {
|
|
1703
|
+
throw new Error("process.chdir is not supported");
|
|
1704
|
+
}, l.umask = function() {
|
|
1705
|
+
return 0;
|
|
1706
|
+
};
|
|
1707
|
+
}, {}],
|
|
1708
|
+
10: [function(s, d, v) {
|
|
1709
|
+
(function(l) {
|
|
1710
|
+
var c = typeof l == "function", n;
|
|
1711
|
+
c ? n = function(r) {
|
|
1712
|
+
l(r);
|
|
1713
|
+
} : n = function(r) {
|
|
1714
|
+
setTimeout(r, 0);
|
|
1715
|
+
}, d.exports = n;
|
|
1716
|
+
}).call(this, s("timers").setImmediate);
|
|
1717
|
+
}, { timers: 11 }],
|
|
1718
|
+
11: [function(s, d, v) {
|
|
1719
|
+
(function(l, c) {
|
|
1720
|
+
var n = s("process/browser.js").nextTick, r = Function.prototype.apply, p = Array.prototype.slice, f = {}, u = 0;
|
|
1721
|
+
v.setTimeout = function() {
|
|
1722
|
+
return new g(r.call(setTimeout, window, arguments), clearTimeout);
|
|
1723
|
+
}, v.setInterval = function() {
|
|
1724
|
+
return new g(r.call(setInterval, window, arguments), clearInterval);
|
|
1725
|
+
}, v.clearTimeout = v.clearInterval = function(m) {
|
|
1726
|
+
m.close();
|
|
1727
|
+
};
|
|
1728
|
+
function g(m, C) {
|
|
1729
|
+
this._id = m, this._clearFn = C;
|
|
1730
|
+
}
|
|
1731
|
+
g.prototype.unref = g.prototype.ref = function() {
|
|
1732
|
+
}, g.prototype.close = function() {
|
|
1733
|
+
this._clearFn.call(window, this._id);
|
|
1734
|
+
}, v.enroll = function(m, C) {
|
|
1735
|
+
clearTimeout(m._idleTimeoutId), m._idleTimeout = C;
|
|
1736
|
+
}, v.unenroll = function(m) {
|
|
1737
|
+
clearTimeout(m._idleTimeoutId), m._idleTimeout = -1;
|
|
1738
|
+
}, v._unrefActive = v.active = function(m) {
|
|
1739
|
+
clearTimeout(m._idleTimeoutId);
|
|
1740
|
+
var C = m._idleTimeout;
|
|
1741
|
+
C >= 0 && (m._idleTimeoutId = setTimeout(function() {
|
|
1742
|
+
m._onTimeout && m._onTimeout();
|
|
1743
|
+
}, C));
|
|
1744
|
+
}, v.setImmediate = typeof l == "function" ? l : function(m) {
|
|
1745
|
+
var C = u++, T = arguments.length < 2 ? !1 : p.call(arguments, 1);
|
|
1746
|
+
return f[C] = !0, n(function() {
|
|
1747
|
+
f[C] && (T ? m.apply(null, T) : m.call(null), v.clearImmediate(C));
|
|
1748
|
+
}), C;
|
|
1749
|
+
}, v.clearImmediate = typeof c == "function" ? c : function(m) {
|
|
1750
|
+
delete f[m];
|
|
1751
|
+
};
|
|
1752
|
+
}).call(this, s("timers").setImmediate, s("timers").clearImmediate);
|
|
1753
|
+
}, { "process/browser.js": 9, timers: 11 }]
|
|
1754
|
+
}, {}, [2])(2);
|
|
1755
|
+
});
|
|
1756
|
+
})(at);
|
|
1757
|
+
var wn = at.exports;
|
|
1758
|
+
const Xe = /* @__PURE__ */ Cn(wn);
|
|
1759
|
+
function In(a, t) {
|
|
1760
|
+
let s;
|
|
1761
|
+
function d(n) {
|
|
1762
|
+
var f;
|
|
1763
|
+
const p = Array.from(n.children).find((u) => u.className.includes("add-nav-item"));
|
|
1764
|
+
p && !((f = p.className) != null && f.includes("d-none")) && (p.className += " d-none");
|
|
1765
|
+
}
|
|
1766
|
+
function v(n) {
|
|
1767
|
+
var f;
|
|
1768
|
+
const p = Array.from(n.children).find((u) => u.className.includes("add-nav-item"));
|
|
1769
|
+
p && ((f = p.className) != null && f.includes(" d-none")) && (p.className = p.className.replace(" d-none", ""));
|
|
1770
|
+
}
|
|
1771
|
+
function l(n, r, p) {
|
|
1772
|
+
v(r);
|
|
1773
|
+
const f = a.schema;
|
|
1774
|
+
if (!(f != null && f.contents))
|
|
1775
|
+
return;
|
|
1776
|
+
let u;
|
|
1777
|
+
if (p) {
|
|
1778
|
+
const T = p.getAttribute("pageId");
|
|
1779
|
+
u = Array.from(r.children).findIndex((k) => k.getAttribute("pageId") === T);
|
|
1780
|
+
} else
|
|
1781
|
+
u = Array.from(r.children).length;
|
|
1782
|
+
const g = n.getAttribute("pageId"), m = Array.from(r.children).findIndex((T) => T.getAttribute("pageId") === g), C = f.contents[m];
|
|
1783
|
+
if (m !== u && m > -1 && u > -1) {
|
|
1784
|
+
if (m < u && (u = u - 1), f.contents.splice(m, 1), f.contents.splice(u, 0, C), t.value) {
|
|
1785
|
+
const T = t.value[m];
|
|
1786
|
+
t.value.splice(m, 1), t.value.splice(u, 0, T);
|
|
1787
|
+
}
|
|
1788
|
+
te(() => {
|
|
1789
|
+
n.className.includes("dgComponentSelected") && (n.classList.remove("dgComponentSelected"), n.classList.remove("dgComponentFocused"), n.click()), Je.value++;
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
function c(n, r) {
|
|
1794
|
+
s && s.destroy(), !(!Xe || !n || !r) && (s = Xe([n], {
|
|
1795
|
+
mirrorContainer: r,
|
|
1796
|
+
direction: "horizontal",
|
|
1797
|
+
moves(p) {
|
|
1798
|
+
return !p.classList.contains("no-drag");
|
|
1799
|
+
},
|
|
1800
|
+
getMirrorText(p) {
|
|
1801
|
+
return p.innerText;
|
|
1802
|
+
},
|
|
1803
|
+
accepts(p, f, u, g) {
|
|
1804
|
+
return d(f), g && g.className.includes("nav-item");
|
|
1805
|
+
}
|
|
1806
|
+
}).on("drop", (p, f, u, g) => l(p, f, g)));
|
|
1807
|
+
}
|
|
1808
|
+
return {
|
|
1809
|
+
dragulaInstance: s,
|
|
1810
|
+
initHeaderDragula: c
|
|
1811
|
+
};
|
|
1812
|
+
}
|
|
1813
|
+
const Pe = /* @__PURE__ */ Ge({
|
|
1814
|
+
name: "FTabsDesign",
|
|
1815
|
+
props: it,
|
|
1816
|
+
emits: ["tabChange", "tabRemove"],
|
|
1817
|
+
setup(a, t) {
|
|
1818
|
+
const s = K(), d = Ce("designer-host-service"), v = Ce("design-item-context"), l = hn(v, d), c = Ze(s, v, l), n = K(a.tabType), r = We(), p = We(), f = {
|
|
1819
|
+
updateToolbarItems: function() {
|
|
1820
|
+
},
|
|
1821
|
+
// 与工具栏交互数据
|
|
1822
|
+
changeSelectedId: (e) => {
|
|
1823
|
+
}
|
|
1824
|
+
}, u = yn(a, t, r, v, f, d), {
|
|
1825
|
+
activeId: g,
|
|
1826
|
+
changeTitleStyle: m,
|
|
1827
|
+
tabPages: C,
|
|
1828
|
+
addTab: T,
|
|
1829
|
+
updateTab: k,
|
|
1830
|
+
toolbarItems: L,
|
|
1831
|
+
setTabsRef: B,
|
|
1832
|
+
checkActiveIdAndSelect: j,
|
|
1833
|
+
listenTabNavElementScroll: E,
|
|
1834
|
+
toolbarSchema: I,
|
|
1835
|
+
toggleShowTab: D,
|
|
1836
|
+
hasInHeadClass: O
|
|
1837
|
+
} = u;
|
|
1838
|
+
B(s);
|
|
1839
|
+
const A = mn(a, p, u), X = pn(a, r, A, u), {
|
|
1840
|
+
updateNavigationLayout: H
|
|
1841
|
+
} = X, b = vn(a, u), {
|
|
1842
|
+
hideDropDown: S
|
|
1843
|
+
} = b, _ = dn(a, r, X, A, u, c), R = _, M = fn(a, r, X, A, u), N = /* @__PURE__ */ new Map([["default", _], ["one-page", R], ["pills", M]]);
|
|
1844
|
+
U(() => {
|
|
1845
|
+
const e = C.value.find((i) => i.props.id === g.value);
|
|
1846
|
+
return e == null ? void 0 : e.slots;
|
|
1847
|
+
});
|
|
1848
|
+
function pe() {
|
|
1849
|
+
const e = c.value.schema.contents || [];
|
|
1850
|
+
return e.length < 1 ? null : e.find((h) => h.id === g.value);
|
|
1851
|
+
}
|
|
1852
|
+
f.updateToolbarItems = function() {
|
|
1853
|
+
var i, h;
|
|
1854
|
+
const e = pe();
|
|
1855
|
+
(i = e == null ? void 0 : e.toolbar) != null && i.buttons ? L.value = [...(h = e == null ? void 0 : e.toolbar) == null ? void 0 : h.buttons] : L.value = [], I.value = e == null ? void 0 : e.toolbar;
|
|
1856
|
+
}, Ue("tabs", {
|
|
1857
|
+
activeId: g,
|
|
1858
|
+
addTab: T,
|
|
1859
|
+
updateTab: k,
|
|
1860
|
+
tabPages: C,
|
|
1861
|
+
tabType: n,
|
|
1862
|
+
toggleShowTab: D
|
|
1863
|
+
}), Ue("toolbar-item-handler", f);
|
|
1864
|
+
const ye = U(() => a.fill), ie = U(() => ({
|
|
1865
|
+
"farris-tabs-header": !0,
|
|
1866
|
+
"farris-tabs-inHead": O.value,
|
|
1867
|
+
"farris-tabs-inContent": !O.value,
|
|
1868
|
+
"farris-tabs-nav-fill": a.tabType === "fill",
|
|
1869
|
+
"farris-tabs-nav-pills": a.tabType === "pills"
|
|
1870
|
+
})), ne = U(() => {
|
|
1871
|
+
const e = {
|
|
1872
|
+
width: O.value && a.titleWidth ? `${a.titleWidth}%` : ""
|
|
1873
|
+
};
|
|
1874
|
+
return e.width && (e.flex = "unset"), e;
|
|
1875
|
+
}), W = U(() => ({
|
|
1876
|
+
"farris-tabs": !0,
|
|
1877
|
+
"flex-column": a.position === "top",
|
|
1878
|
+
"flex-column-reverse": a.position === "bottom",
|
|
1879
|
+
"flex-row": a.position === "left",
|
|
1880
|
+
"flex-row-reverse": a.position === "right",
|
|
1881
|
+
"one-page": a.tabType === "one-page"
|
|
1882
|
+
})), {
|
|
1883
|
+
initHeaderDragula: be,
|
|
1884
|
+
dragulaInstance: J
|
|
1885
|
+
} = In(v, C);
|
|
1886
|
+
Oe(() => {
|
|
1887
|
+
C.value.length && j(a.activeId || C.value[0].props.id), te(() => {
|
|
1888
|
+
H();
|
|
1889
|
+
}), m(r), window.addEventListener("click", (e) => {
|
|
1890
|
+
var i;
|
|
1891
|
+
S.value || (i = s.value) != null && i.contains(e.target) || (S.value = !0);
|
|
1892
|
+
}), window.addEventListener("resize", () => {
|
|
1893
|
+
H();
|
|
1894
|
+
}), E(), s.value.componentInstance = c, a.tabType === "default" && be(r.value, r.value);
|
|
1895
|
+
}), Ke(() => {
|
|
1896
|
+
J && J.destroy && J.destroy();
|
|
1897
|
+
});
|
|
1898
|
+
function ce() {
|
|
1899
|
+
return !!L.value.length && Tn(u, c, l, v, a.componentId);
|
|
1900
|
+
}
|
|
1901
|
+
const $ = N.get(a.tabType) || N.get("default");
|
|
1902
|
+
function ae() {
|
|
1903
|
+
var e, i, h, P;
|
|
1904
|
+
return F("div", {
|
|
1905
|
+
class: ie.value
|
|
1906
|
+
}, [F("div", {
|
|
1907
|
+
class: "farris-tabs-header-pre"
|
|
1908
|
+
}, [(i = (e = t.slots).headerPrefix) == null ? void 0 : i.call(e)]), F("div", {
|
|
1909
|
+
class: "farris-tabs-title scroll-tabs",
|
|
1910
|
+
style: ne.value
|
|
1911
|
+
}, [$ && $()]), ce(), F("div", {
|
|
1912
|
+
class: "farris-tabs-header-post"
|
|
1913
|
+
}, [(P = (h = t.slots).headerSuffix) == null ? void 0 : P.call(h)])]);
|
|
1914
|
+
}
|
|
1915
|
+
const se = U(() => ({
|
|
1916
|
+
"farris-tabs-content": !0,
|
|
1917
|
+
"f-utils-fill-flex-column": ye.value
|
|
1918
|
+
}));
|
|
1919
|
+
function Y() {
|
|
1920
|
+
var e, i, h, P;
|
|
1921
|
+
return F("div", {
|
|
1922
|
+
class: se.value,
|
|
1923
|
+
ref: p
|
|
1924
|
+
}, [(i = (e = v == null ? void 0 : v.schema) == null ? void 0 : e.contents) != null && i.length ? (P = (h = t.slots).default) == null ? void 0 : P.call(h) : ""]);
|
|
1925
|
+
}
|
|
1926
|
+
return t.expose(c.value), c.value.updateToolbarItems = f.updateToolbarItems, () => F("div", {
|
|
1927
|
+
class: W.value,
|
|
1928
|
+
ref: s
|
|
1929
|
+
}, [ae(), Y()]);
|
|
1930
|
+
}
|
|
1931
|
+
});
|
|
1932
|
+
function Sn(a, t) {
|
|
1933
|
+
const s = new Qe(), { canAccept: d } = s.getTemplateRule(a, t);
|
|
1934
|
+
function v(n) {
|
|
1935
|
+
if (!Ot().basalDragulaRuleForContainer(n, t))
|
|
1936
|
+
return !1;
|
|
1937
|
+
const { schema: p } = a;
|
|
1938
|
+
return p.contents && p.contents.length > 0 ? !1 : d;
|
|
1939
|
+
}
|
|
1940
|
+
function l(n) {
|
|
1941
|
+
return null;
|
|
1942
|
+
}
|
|
1943
|
+
function c() {
|
|
1944
|
+
const { schema: n, parent: r } = a;
|
|
1945
|
+
r != null && r.schema.activeId && n.id === r.schema.activeId && (r.schema.activeId = "");
|
|
1946
|
+
}
|
|
1947
|
+
return { canAccepts: v, getDraggableDesignItemElement: l, onRemoveComponent: c };
|
|
1948
|
+
}
|
|
1949
|
+
function Pn(a) {
|
|
1950
|
+
return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !Rt(a);
|
|
1951
|
+
}
|
|
1952
|
+
const xn = /* @__PURE__ */ Ge({
|
|
1953
|
+
name: "FTabPageDesign",
|
|
1954
|
+
props: ze,
|
|
1955
|
+
emits: [],
|
|
1956
|
+
setup(a, t) {
|
|
1957
|
+
const s = K(), d = Ce("design-item-context"), v = Ce("designer-host-service"), l = Sn(d, v), c = Ze(s, d, l);
|
|
1958
|
+
c.value.canNested = !1, c.value.canDelete = !1, c.value.canMove = !1, t.expose(c.value);
|
|
1959
|
+
const n = Ce("tabs"), r = K(!0), p = {
|
|
1960
|
+
slots: t.slots,
|
|
1961
|
+
props: a
|
|
1962
|
+
}, f = K((n == null ? void 0 : n.tabType.value) || "default");
|
|
1963
|
+
Oe(() => {
|
|
1964
|
+
s.value.componentInstance = c;
|
|
1965
|
+
const B = n.tabPages.value.findIndex((j) => j.props.id === a.id);
|
|
1966
|
+
!B || B === -1 ? n == null || n.addTab(p) : B > -1 && (r.value = !1, console.warn(`已经存在id为${a.id}的页签啦`));
|
|
1967
|
+
}), Ke(() => {
|
|
1968
|
+
});
|
|
1969
|
+
const u = U(() => (a == null ? void 0 : a.id) === (n == null ? void 0 : n.activeId.value)), g = U(() => ({
|
|
1970
|
+
display: u.value ? "" : "none"
|
|
1971
|
+
}));
|
|
1972
|
+
he(() => a, (B) => {
|
|
1973
|
+
n == null || n.updateTab({
|
|
1974
|
+
props: B,
|
|
1975
|
+
slots: t.slots
|
|
1976
|
+
});
|
|
1977
|
+
}, {
|
|
1978
|
+
immediate: !0,
|
|
1979
|
+
deep: !0
|
|
1980
|
+
});
|
|
1981
|
+
function m() {
|
|
1982
|
+
var j, E;
|
|
1983
|
+
const B = (E = (j = t.slots).default) == null ? void 0 : E.call(j);
|
|
1984
|
+
return F(Mt, {
|
|
1985
|
+
"main-title": a.title,
|
|
1986
|
+
class: "farris-tab-page"
|
|
1987
|
+
}, Pn(B) ? B : {
|
|
1988
|
+
default: () => [B]
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
const C = U(() => ({
|
|
1992
|
+
"farris-tab-page": !0,
|
|
1993
|
+
"drag-container": !0,
|
|
1994
|
+
"farris-tab-page-active": u.value
|
|
1995
|
+
}));
|
|
1996
|
+
function T() {
|
|
1997
|
+
var j, E;
|
|
1998
|
+
const B = (E = (j = t.slots).default) == null ? void 0 : E.call(j);
|
|
1999
|
+
return F("div", {
|
|
2000
|
+
ref: s,
|
|
2001
|
+
class: C.value,
|
|
2002
|
+
"data-dragref": `${d.schema.id}-container`,
|
|
2003
|
+
style: g.value
|
|
2004
|
+
}, [B]);
|
|
2005
|
+
}
|
|
2006
|
+
const L = (/* @__PURE__ */ new Map([["default", T], ["one-page", m]])).get(f.value) || T;
|
|
2007
|
+
return () => r.value ? L() : null;
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
function En(a, t, s) {
|
|
2011
|
+
return t && t.contents && t.contents.length && (t.contents.forEach((d) => {
|
|
2012
|
+
d.title && (d.text = d.title);
|
|
2013
|
+
}), t.buttons = t.contents, delete t.contents), { toolbar: t };
|
|
2014
|
+
}
|
|
2015
|
+
const Bn = /* @__PURE__ */ new Map([
|
|
2016
|
+
["appearance", et],
|
|
2017
|
+
["toolbar", En]
|
|
2018
|
+
]), Rn = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-design.gitee.io/tab-page.schema.json", An = "tab-page", $n = "A Farris Container Component", jn = "object", On = {
|
|
2019
|
+
id: {
|
|
2020
|
+
description: "The unique identifier for a tab-page Item",
|
|
2021
|
+
type: "string"
|
|
2022
|
+
},
|
|
2023
|
+
type: {
|
|
2024
|
+
description: "The type string of tab-page Item component",
|
|
2025
|
+
type: "string",
|
|
2026
|
+
default: "tab-page"
|
|
2027
|
+
},
|
|
2028
|
+
contents: {
|
|
2029
|
+
description: "",
|
|
2030
|
+
type: "array",
|
|
2031
|
+
default: []
|
|
2032
|
+
},
|
|
2033
|
+
title: {
|
|
2034
|
+
description: "",
|
|
2035
|
+
type: "string",
|
|
2036
|
+
default: "标题"
|
|
2037
|
+
},
|
|
2038
|
+
disabled: {
|
|
2039
|
+
description: "",
|
|
2040
|
+
type: "boolean",
|
|
2041
|
+
default: !1
|
|
2042
|
+
},
|
|
2043
|
+
removeable: {
|
|
2044
|
+
description: "",
|
|
2045
|
+
type: "boolean",
|
|
2046
|
+
default: !1
|
|
2047
|
+
},
|
|
2048
|
+
show: {
|
|
2049
|
+
description: "",
|
|
2050
|
+
type: "boolean",
|
|
2051
|
+
default: !0
|
|
2052
|
+
},
|
|
2053
|
+
toolbar: {
|
|
2054
|
+
description: "",
|
|
2055
|
+
type: "object"
|
|
2056
|
+
},
|
|
2057
|
+
tabWidth: {
|
|
2058
|
+
description: "",
|
|
2059
|
+
type: "number"
|
|
2060
|
+
},
|
|
2061
|
+
toolbarPosition: {
|
|
2062
|
+
description: "",
|
|
2063
|
+
type: "string",
|
|
2064
|
+
default: "inHead"
|
|
2065
|
+
},
|
|
2066
|
+
customTitleClass: {
|
|
2067
|
+
description: "",
|
|
2068
|
+
type: "string",
|
|
2069
|
+
default: ""
|
|
2070
|
+
},
|
|
2071
|
+
onTabChange: {
|
|
2072
|
+
description: "",
|
|
2073
|
+
type: "切换标签页事件",
|
|
2074
|
+
default: ""
|
|
2075
|
+
},
|
|
2076
|
+
onTabRemove: {
|
|
2077
|
+
description: "",
|
|
2078
|
+
type: "string",
|
|
2079
|
+
default: "移除标签页事件"
|
|
2080
|
+
}
|
|
2081
|
+
}, Ln = [
|
|
2082
|
+
"id",
|
|
2083
|
+
"type",
|
|
2084
|
+
"contents"
|
|
2085
|
+
], kn = {
|
|
2086
|
+
$schema: Rn,
|
|
2087
|
+
$id: Dn,
|
|
2088
|
+
title: An,
|
|
2089
|
+
description: $n,
|
|
2090
|
+
type: jn,
|
|
2091
|
+
properties: On,
|
|
2092
|
+
required: Ln
|
|
2093
|
+
}, st = we(ze, kn, Bn), Hn = "https://json-schema.org/draft/2020-12/schema", _n = "https://farris-design.gitee.io/tab-toolbar-item.schema.json", Mn = "tab-toolbar-item", Fn = "A Farris Toolbar Item Component", qn = "object", Nn = {
|
|
2094
|
+
id: {
|
|
2095
|
+
description: "The unique identifier for a Response Toolbar",
|
|
2096
|
+
type: "string"
|
|
2097
|
+
},
|
|
2098
|
+
type: {
|
|
2099
|
+
description: "The type string of Response Toolbar",
|
|
2100
|
+
type: "string",
|
|
2101
|
+
default: "tab-toolbar-item"
|
|
2102
|
+
},
|
|
2103
|
+
appearance: {
|
|
2104
|
+
description: "",
|
|
2105
|
+
type: "object",
|
|
2106
|
+
properties: {
|
|
2107
|
+
class: {
|
|
2108
|
+
type: "string"
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
default: {}
|
|
2112
|
+
},
|
|
2113
|
+
text: {
|
|
2114
|
+
description: "按钮",
|
|
2115
|
+
type: "string",
|
|
2116
|
+
default: "按钮"
|
|
2117
|
+
},
|
|
2118
|
+
icon: {
|
|
2119
|
+
description: "图标",
|
|
2120
|
+
type: "string",
|
|
2121
|
+
default: ""
|
|
2122
|
+
},
|
|
2123
|
+
disabled: {
|
|
2124
|
+
description: "禁用",
|
|
2125
|
+
type: "boolean",
|
|
2126
|
+
default: !1
|
|
2127
|
+
},
|
|
2128
|
+
visible: {
|
|
2129
|
+
description: "是否可见",
|
|
2130
|
+
type: "boolean",
|
|
2131
|
+
default: !0
|
|
2132
|
+
},
|
|
2133
|
+
onClick: {
|
|
2134
|
+
description: "点击事件",
|
|
2135
|
+
type: "string",
|
|
2136
|
+
default: ""
|
|
2137
|
+
},
|
|
2138
|
+
tipsEnable: {
|
|
2139
|
+
description: "",
|
|
2140
|
+
type: "boolean",
|
|
2141
|
+
default: !1
|
|
2142
|
+
},
|
|
2143
|
+
tipsText: {
|
|
2144
|
+
description: "",
|
|
2145
|
+
type: "string",
|
|
2146
|
+
default: ""
|
|
2147
|
+
},
|
|
2148
|
+
dropdownClass: {
|
|
2149
|
+
description: "处于下拉菜单时的样式",
|
|
2150
|
+
type: "string",
|
|
2151
|
+
default: ""
|
|
2152
|
+
},
|
|
2153
|
+
split: {
|
|
2154
|
+
description: "",
|
|
2155
|
+
type: "boolean",
|
|
2156
|
+
default: !1
|
|
2157
|
+
}
|
|
2158
|
+
}, Vn = [
|
|
2159
|
+
"id",
|
|
2160
|
+
"type",
|
|
2161
|
+
"text"
|
|
2162
|
+
], Wn = {
|
|
2163
|
+
onClick: "点击事件"
|
|
2164
|
+
}, Un = {
|
|
2165
|
+
$schema: Hn,
|
|
2166
|
+
$id: _n,
|
|
2167
|
+
title: Mn,
|
|
2168
|
+
description: Fn,
|
|
2169
|
+
type: qn,
|
|
2170
|
+
properties: Nn,
|
|
2171
|
+
required: Vn,
|
|
2172
|
+
events: Wn
|
|
2173
|
+
}, Xn = {
|
|
2174
|
+
id: { type: String, default: "" },
|
|
2175
|
+
items: { type: Object, default: {} },
|
|
2176
|
+
class: { type: String, default: "" },
|
|
2177
|
+
text: { type: String, default: "" },
|
|
2178
|
+
disabled: { type: Boolean, default: !1 },
|
|
2179
|
+
icon: { type: String, default: "" },
|
|
2180
|
+
componentId: { type: String, default: "" },
|
|
2181
|
+
// 是否展开子级
|
|
2182
|
+
expanded: { type: Boolean, default: !1 },
|
|
2183
|
+
alignment: { Type: String, default: "right" },
|
|
2184
|
+
split: { type: Boolean, default: !1 },
|
|
2185
|
+
// 是否下拉
|
|
2186
|
+
isDP: { type: Boolean, default: !1 },
|
|
2187
|
+
// 是否下拉项
|
|
2188
|
+
isDPItem: { type: Boolean, default: !1 }
|
|
2189
|
+
}, Yn = we(Xn, Un, xe, qt);
|
|
2190
|
+
Pe.register = (a, t, s, d) => {
|
|
2191
|
+
a.tabs = Pt, a["tab-page"] = xt, t.tabs = an, t["tab-page"] = st, d.tabs = { eventHandlerResolver: ln };
|
|
2192
|
+
};
|
|
2193
|
+
Pe.registerDesigner = (a, t, s) => {
|
|
2194
|
+
a.tabs = Pe, a["tab-page"] = xn, t.tabs = sn, t["tab-page"] = st, t["tab-toolbar-item"] = Yn, a["tab-toolbar"] = Et, t["tab-toolbar"] = cn;
|
|
2195
|
+
};
|
|
2196
|
+
const ro = St(Pe);
|
|
2197
|
+
export {
|
|
2198
|
+
Pe as FTabsDesign,
|
|
2199
|
+
ro as default
|
|
2200
|
+
};
|