@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var L = Object.defineProperty;
|
|
2
|
-
var _ = (
|
|
3
|
-
var m = (
|
|
4
|
-
import { defineComponent as
|
|
2
|
+
var _ = (s, e, t) => e in s ? L(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var m = (s, e, t) => _(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as j, ref as I, computed as b, watch as D, createVNode as u, createTextVNode as k, inject as H, onMounted as K } from "vue";
|
|
5
5
|
import { resolveAppearance as J, resolveToolbar as Q, createPropsResolver as $, createPageHeaderEventHandlerResolver as W, getPropsResolverGenerator as q } from "../dynamic-resolver/index.esm.js";
|
|
6
6
|
import X from "../response-toolbar/index.esm.js";
|
|
7
7
|
import { getCustomClass as y } from "../common/index.esm.js";
|
|
8
|
-
import Y, { responseToolbarResolver as
|
|
9
|
-
import { DgControl as
|
|
10
|
-
import { cloneDeep as
|
|
8
|
+
import Y, { responseToolbarResolver as N } from "../../designer/response-toolbar/index.esm.js";
|
|
9
|
+
import { DgControl as A, canvasChanged as Z, refreshCanvas as ee, UseTemplateDragAndDropRules as te, useDesignerComponent as ne, FDesignerInnerItem as ie } from "../designer-canvas/index.esm.js";
|
|
10
|
+
import { cloneDeep as se } from "lodash-es";
|
|
11
11
|
const V = /* @__PURE__ */ new Map([
|
|
12
12
|
["appearance", J],
|
|
13
13
|
["toolbar", Q]
|
|
14
|
-
]),
|
|
14
|
+
]), oe = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/page-header.schema.json", ae = "page-header", le = "A Farris Container Component", ce = "object", de = {
|
|
15
15
|
id: {
|
|
16
16
|
description: "The unique identifier for a Page Header",
|
|
17
17
|
type: "string"
|
|
@@ -164,22 +164,28 @@ const V = /* @__PURE__ */ new Map([
|
|
|
164
164
|
type: "function",
|
|
165
165
|
default: null
|
|
166
166
|
}
|
|
167
|
-
},
|
|
167
|
+
}, ue = [
|
|
168
168
|
"id",
|
|
169
169
|
"type"
|
|
170
170
|
], S = {
|
|
171
|
-
$schema:
|
|
172
|
-
$id:
|
|
173
|
-
title:
|
|
174
|
-
description:
|
|
175
|
-
type:
|
|
171
|
+
$schema: oe,
|
|
172
|
+
$id: re,
|
|
173
|
+
title: ae,
|
|
174
|
+
description: le,
|
|
175
|
+
type: ce,
|
|
176
176
|
properties: de,
|
|
177
|
-
required:
|
|
177
|
+
required: ue
|
|
178
178
|
};
|
|
179
|
-
function M(
|
|
180
|
-
return e.title = "标题", e
|
|
179
|
+
function M(s, e, t) {
|
|
180
|
+
return e.title = "标题", e.appearance = {
|
|
181
|
+
class: "f-page-header"
|
|
182
|
+
}, e.toolbar = {
|
|
183
|
+
id: `${e.id}-toolbar`,
|
|
184
|
+
type: "response-toolbar",
|
|
185
|
+
buttons: []
|
|
186
|
+
}, e;
|
|
181
187
|
}
|
|
182
|
-
const
|
|
188
|
+
const T = {
|
|
183
189
|
/** 组件自定义样式 */
|
|
184
190
|
customClass: { type: String, default: "" },
|
|
185
191
|
/** 是否显示图标 */
|
|
@@ -222,147 +228,147 @@ const R = {
|
|
|
222
228
|
contentRenderFunction: { type: Function },
|
|
223
229
|
/** 下方扩展区域 */
|
|
224
230
|
downContentRenderFunction: { type: Function }
|
|
225
|
-
},
|
|
231
|
+
}, B = Object.assign({}, T, {
|
|
226
232
|
componentId: { type: String, default: "" },
|
|
227
233
|
titleContentHtml: { type: String, default: "" },
|
|
228
234
|
contentHtml: { type: String, default: "" },
|
|
229
235
|
downContentHtml: { type: String, default: "" }
|
|
230
|
-
}),
|
|
231
|
-
|
|
236
|
+
}), Te = $(T, S, V, M), Re = $(B, S, V, M), pe = W(), ge = q(
|
|
237
|
+
T,
|
|
232
238
|
S,
|
|
233
239
|
V,
|
|
234
240
|
M
|
|
235
|
-
),
|
|
236
|
-
|
|
241
|
+
), fe = q(
|
|
242
|
+
B,
|
|
237
243
|
S,
|
|
238
244
|
V,
|
|
239
245
|
M
|
|
240
|
-
), O = /* @__PURE__ */
|
|
246
|
+
), O = /* @__PURE__ */ j({
|
|
241
247
|
name: "FPageHeader",
|
|
242
|
-
props:
|
|
248
|
+
props: T,
|
|
243
249
|
emits: ["click", "prePaginationClick", "nextPaginationClick"],
|
|
244
|
-
setup(
|
|
245
|
-
const t = I(
|
|
250
|
+
setup(s, e) {
|
|
251
|
+
const t = I(s.buttons), n = (h, F) => {
|
|
246
252
|
e.emit("click", h, F);
|
|
247
253
|
}, i = b(() => {
|
|
248
254
|
const h = {
|
|
249
255
|
"f-page-header": !0,
|
|
250
|
-
"d-none": !
|
|
256
|
+
"d-none": !s.visible
|
|
251
257
|
};
|
|
252
|
-
return y(h,
|
|
258
|
+
return y(h, s.customClass);
|
|
253
259
|
}), r = b(() => y({
|
|
254
260
|
"f-title-icon": !0
|
|
255
|
-
},
|
|
261
|
+
}, s.iconClass)), o = b(() => y({
|
|
256
262
|
"f-icon": !0
|
|
257
|
-
},
|
|
263
|
+
}, s.icon)), l = b(() => y({
|
|
258
264
|
"f-title": !0
|
|
259
|
-
},
|
|
265
|
+
}, s.titleContentClass)), a = b(() => y({
|
|
260
266
|
"f-content": !0
|
|
261
|
-
},
|
|
267
|
+
}, s.contentClass)), c = b(() => y({
|
|
262
268
|
"f-page-header-extend": !0
|
|
263
|
-
},
|
|
269
|
+
}, s.downContentClass)), d = b(() => ({
|
|
264
270
|
"f-icon f-icon-arrow-w": !0,
|
|
265
|
-
"f-state-disabled":
|
|
271
|
+
"f-state-disabled": s.prePaginationDisabled
|
|
266
272
|
})), p = b(() => ({
|
|
267
273
|
"f-icon f-icon-arrow-e": !0,
|
|
268
|
-
"f-state-disabled":
|
|
274
|
+
"f-state-disabled": s.nextPaginationDisabled
|
|
269
275
|
}));
|
|
270
276
|
function f(h) {
|
|
271
|
-
|
|
277
|
+
s.prePaginationDisabled || e.emit("prePaginationClick", h);
|
|
272
278
|
}
|
|
273
279
|
function x(h) {
|
|
274
|
-
|
|
280
|
+
s.nextPaginationDisabled || e.emit("nextPaginationClick", h);
|
|
275
281
|
}
|
|
276
282
|
function C() {
|
|
277
|
-
return e.slots.titleContent ?
|
|
283
|
+
return e.slots.titleContent ? u("div", {
|
|
278
284
|
class: l.value
|
|
279
|
-
}, [k(" "), e.slots.titleContent()]) :
|
|
285
|
+
}, [k(" "), e.slots.titleContent()]) : s.titleRenderFunction ? u("div", {
|
|
280
286
|
class: l.value
|
|
281
|
-
}, [
|
|
287
|
+
}, [s.titleRenderFunction()]) : u("div", {
|
|
282
288
|
class: "f-title"
|
|
283
|
-
}, [
|
|
289
|
+
}, [s.showIcon && s.icon ? u("span", {
|
|
284
290
|
class: r.value
|
|
285
|
-
}, [
|
|
286
|
-
class:
|
|
287
|
-
}, null)]) : "",
|
|
291
|
+
}, [u("i", {
|
|
292
|
+
class: o.value
|
|
293
|
+
}, null)]) : "", u("h4", {
|
|
288
294
|
class: "f-title-text"
|
|
289
|
-
}, [
|
|
295
|
+
}, [s.title]), s.subTitle ? u("h5", {
|
|
290
296
|
class: "f-title-subtitle"
|
|
291
|
-
}, [
|
|
297
|
+
}, [s.subTitle]) : "", s.showPagination ? u("div", {
|
|
292
298
|
class: "f-title-pagination"
|
|
293
|
-
}, [
|
|
294
|
-
class:
|
|
299
|
+
}, [u("span", {
|
|
300
|
+
class: d.value,
|
|
295
301
|
onClick: f
|
|
296
|
-
}, null),
|
|
302
|
+
}, null), u("span", {
|
|
297
303
|
class: p.value,
|
|
298
304
|
onClick: x
|
|
299
305
|
}, null)]) : ""]);
|
|
300
306
|
}
|
|
301
307
|
function w() {
|
|
302
|
-
return e.slots.content ?
|
|
308
|
+
return e.slots.content ? u("div", {
|
|
303
309
|
class: a.value
|
|
304
|
-
}, [k(" "), e.slots.content()]) :
|
|
310
|
+
}, [k(" "), e.slots.content()]) : s.contentRenderFunction ? u("div", {
|
|
305
311
|
class: a.value
|
|
306
|
-
}, [
|
|
312
|
+
}, [s.contentRenderFunction()]) : null;
|
|
307
313
|
}
|
|
308
314
|
function v() {
|
|
309
|
-
if (
|
|
310
|
-
return
|
|
311
|
-
id:
|
|
312
|
-
customClass:
|
|
313
|
-
visible:
|
|
315
|
+
if (s.buttons && s.buttons.length > 0)
|
|
316
|
+
return u(X, {
|
|
317
|
+
id: s.toolbarId,
|
|
318
|
+
customClass: s.buttonClass,
|
|
319
|
+
visible: s.buttonsVisible,
|
|
314
320
|
items: t.value,
|
|
315
321
|
onClick: n,
|
|
316
|
-
buttonSize:
|
|
322
|
+
buttonSize: s.buttonSize
|
|
317
323
|
}, null);
|
|
318
324
|
}
|
|
319
|
-
function
|
|
320
|
-
return e.slots.downContent ?
|
|
321
|
-
class:
|
|
322
|
-
}, [k(" "), e.slots.downContent()]) :
|
|
323
|
-
class:
|
|
324
|
-
}, [
|
|
325
|
+
function R() {
|
|
326
|
+
return e.slots.downContent ? u("div", {
|
|
327
|
+
class: c.value
|
|
328
|
+
}, [k(" "), e.slots.downContent()]) : s.downContentRenderFunction ? u("div", {
|
|
329
|
+
class: c.value
|
|
330
|
+
}, [s.downContentRenderFunction()]) : null;
|
|
325
331
|
}
|
|
326
|
-
return D(() =>
|
|
332
|
+
return D(() => s.buttons, (h) => {
|
|
327
333
|
t.value = h;
|
|
328
334
|
}, {
|
|
329
335
|
deep: !0
|
|
330
|
-
}), () =>
|
|
336
|
+
}), () => s.visible ? u("div", {
|
|
331
337
|
class: i.value
|
|
332
|
-
}, [
|
|
338
|
+
}, [u("nav", {
|
|
333
339
|
class: "f-page-header-base"
|
|
334
|
-
}, [C(), w(), v()]),
|
|
340
|
+
}, [C(), w(), v()]), R()]) : null;
|
|
335
341
|
}
|
|
336
342
|
});
|
|
337
|
-
function
|
|
338
|
-
const { formSchemaUtils: e, formStateMachineUtils: t } =
|
|
339
|
-
function n(a,
|
|
343
|
+
function me(s) {
|
|
344
|
+
const { formSchemaUtils: e, formStateMachineUtils: t } = s;
|
|
345
|
+
function n(a, c = "") {
|
|
340
346
|
return {
|
|
341
|
-
path:
|
|
347
|
+
path: c + a.code,
|
|
342
348
|
field: a.id,
|
|
343
349
|
fullPath: a.code
|
|
344
350
|
};
|
|
345
351
|
}
|
|
346
|
-
function i(a,
|
|
347
|
-
const
|
|
348
|
-
return
|
|
352
|
+
function i(a, c = "") {
|
|
353
|
+
const d = e.getViewModelById(a);
|
|
354
|
+
return d ? d.states.map((p) => n(p, c)) : [];
|
|
349
355
|
}
|
|
350
356
|
function r(a) {
|
|
351
|
-
const
|
|
352
|
-
if (a ===
|
|
353
|
-
return
|
|
354
|
-
const p = i(
|
|
355
|
-
return [...
|
|
357
|
+
const c = e.getRootViewModelId(), d = i(a);
|
|
358
|
+
if (a === c)
|
|
359
|
+
return d;
|
|
360
|
+
const p = i(c, "root-component.");
|
|
361
|
+
return [...d, ...p];
|
|
356
362
|
}
|
|
357
|
-
function
|
|
363
|
+
function o(a) {
|
|
358
364
|
return a.binding && a.binding.path || a.id || "";
|
|
359
365
|
}
|
|
360
366
|
function l() {
|
|
361
367
|
return t && t.getRenderStates() || [];
|
|
362
368
|
}
|
|
363
|
-
return { getVariables: r, getControlName:
|
|
369
|
+
return { getVariables: r, getControlName: o, getStateMachines: l };
|
|
364
370
|
}
|
|
365
|
-
class
|
|
371
|
+
class he {
|
|
366
372
|
constructor(e) {
|
|
367
373
|
m(this, "sessionVariables", [
|
|
368
374
|
{
|
|
@@ -411,19 +417,19 @@ class me {
|
|
|
411
417
|
required: "必填表达式"
|
|
412
418
|
});
|
|
413
419
|
m(this, "getExpressionConverter", (e, t) => ({
|
|
414
|
-
convertFrom: (n, i, r,
|
|
420
|
+
convertFrom: (n, i, r, o) => {
|
|
415
421
|
const l = r.getExpressionRuleValue(e, t || i);
|
|
416
422
|
return l && l.value || "";
|
|
417
423
|
},
|
|
418
|
-
convertTo: (n, i, r,
|
|
424
|
+
convertTo: (n, i, r, o, l) => {
|
|
419
425
|
var a;
|
|
420
426
|
if (i === "dataPicking" && (r != null && r.target)) {
|
|
421
|
-
const
|
|
427
|
+
const c = `${r.target}_dataPicking`;
|
|
422
428
|
((a = r.rules) == null ? void 0 : a.some(
|
|
423
|
-
(p) => p.id ===
|
|
424
|
-
)) ? n.dictPickingExpressionId =
|
|
429
|
+
(p) => p.id === c && p.value
|
|
430
|
+
)) ? n.dictPickingExpressionId = c : delete n.dictPickingExpressionId;
|
|
425
431
|
}
|
|
426
|
-
|
|
432
|
+
o.updateExpression(r);
|
|
427
433
|
}
|
|
428
434
|
}));
|
|
429
435
|
this.formSchemaService = e;
|
|
@@ -432,10 +438,10 @@ class me {
|
|
|
432
438
|
const n = this.formSchemaService.getExpressions();
|
|
433
439
|
if (!n)
|
|
434
440
|
return "";
|
|
435
|
-
const i = n.find((
|
|
441
|
+
const i = n.find((o) => o.target === e);
|
|
436
442
|
if (!i)
|
|
437
443
|
return "";
|
|
438
|
-
const r = i.rules.find((
|
|
444
|
+
const r = i.rules.find((o) => o.type === t);
|
|
439
445
|
return r || "";
|
|
440
446
|
}
|
|
441
447
|
// 获取上下文表单变量
|
|
@@ -470,10 +476,10 @@ class me {
|
|
|
470
476
|
return e == null || e.forEach((i) => {
|
|
471
477
|
var l;
|
|
472
478
|
const r = this.createTreeNode(i, t);
|
|
473
|
-
let
|
|
474
|
-
(l = i.type) != null && l.fields && (
|
|
479
|
+
let o = [];
|
|
480
|
+
(l = i.type) != null && l.fields && (o = this.buildEntityFieldsTreeData(i.type.fields, [...t, i.label])), n.push({
|
|
475
481
|
data: r,
|
|
476
|
-
children:
|
|
482
|
+
children: o,
|
|
477
483
|
expanded: !0
|
|
478
484
|
});
|
|
479
485
|
}), n;
|
|
@@ -481,13 +487,13 @@ class me {
|
|
|
481
487
|
buildChildEntityTreeData(e = null, t) {
|
|
482
488
|
const n = [];
|
|
483
489
|
return e == null || e.forEach((i) => {
|
|
484
|
-
var a,
|
|
490
|
+
var a, c;
|
|
485
491
|
const r = this.createTreeNode(i, t);
|
|
486
492
|
r.type = "entity";
|
|
487
|
-
const
|
|
488
|
-
l != null && l.length && (
|
|
493
|
+
const o = this.buildEntityFieldsTreeData((a = i.type) == null ? void 0 : a.fields, [...t, i.label]), l = this.buildChildEntityTreeData((c = i.type) == null ? void 0 : c.entities, [...t, i.label]);
|
|
494
|
+
l != null && l.length && (o == null || o.push(...l)), n.push({
|
|
489
495
|
data: r,
|
|
490
|
-
children:
|
|
496
|
+
children: o || [],
|
|
491
497
|
// 空值回退
|
|
492
498
|
expanded: !0
|
|
493
499
|
});
|
|
@@ -527,70 +533,70 @@ class me {
|
|
|
527
533
|
};
|
|
528
534
|
}
|
|
529
535
|
onBeforeOpenExpression(e, t, n) {
|
|
530
|
-
const i = n === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(i, t),
|
|
536
|
+
const i = n === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(i, t), o = this.getEntitiesAndVariables(), l = {
|
|
531
537
|
message: ["validate", "required", "dataPicking"].includes(t) && r ? r.message : "",
|
|
532
|
-
...
|
|
538
|
+
...o
|
|
533
539
|
};
|
|
534
540
|
return r.messageType != null && (l.messageType = r.messageType), l;
|
|
535
541
|
}
|
|
536
542
|
buildRule(e, t, n, i) {
|
|
537
|
-
const { expression: r, message:
|
|
543
|
+
const { expression: r, message: o, messageType: l } = t, a = {
|
|
538
544
|
id: `${e}_${n}`,
|
|
539
545
|
type: n,
|
|
540
546
|
value: r
|
|
541
547
|
};
|
|
542
|
-
return (n === "validate" || n === "dataPicking" || n === "required") && (a.message =
|
|
548
|
+
return (n === "validate" || n === "dataPicking" || n === "required") && (a.message = o), n === "dataPicking" && (a.messageType = l), n === "validate" && i && (a.elementId = i), a;
|
|
543
549
|
}
|
|
544
550
|
getExpressionData() {
|
|
545
551
|
const { expressions: e } = this.formSchemaService.getFormSchema().module;
|
|
546
552
|
return e || [];
|
|
547
553
|
}
|
|
548
554
|
updateExpression(e, t, n, i) {
|
|
549
|
-
const r = t === "Field" ? e.binding.field : e.id,
|
|
550
|
-
let a = this.getExpressionData().find((
|
|
551
|
-
const
|
|
555
|
+
const r = t === "Field" ? e.binding.field : e.id, o = this.buildRule(r, n, i, e.type === "form-group" ? e.id : "");
|
|
556
|
+
let a = this.getExpressionData().find((d) => d.targetType === t && d.target === r);
|
|
557
|
+
const c = (d) => d.value.trim() === "";
|
|
552
558
|
if (a) {
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
555
|
-
|
|
559
|
+
const d = a.rules.find((p) => p.id === o.id);
|
|
560
|
+
if (d)
|
|
561
|
+
c(o) ? a.rules = a.rules.filter((p) => p.id !== o.id) : (Object.assign(d, o), i === "validate" && e.type === "form-group" && (d.elementId = e.id));
|
|
556
562
|
else {
|
|
557
|
-
if (
|
|
563
|
+
if (c(o))
|
|
558
564
|
return null;
|
|
559
|
-
a.rules = a.rules || [], a.rules.push(
|
|
565
|
+
a.rules = a.rules || [], a.rules.push(o);
|
|
560
566
|
}
|
|
561
567
|
} else {
|
|
562
|
-
if (
|
|
568
|
+
if (c(o))
|
|
563
569
|
return null;
|
|
564
570
|
a = {
|
|
565
571
|
target: `${r}`,
|
|
566
|
-
rules: [
|
|
572
|
+
rules: [o],
|
|
567
573
|
targetType: t
|
|
568
574
|
};
|
|
569
575
|
}
|
|
570
576
|
return a;
|
|
571
577
|
}
|
|
572
578
|
getExpressionEditorOptions(e, t, n, i) {
|
|
573
|
-
return n.reduce((r,
|
|
574
|
-
var a,
|
|
579
|
+
return n.reduce((r, o) => {
|
|
580
|
+
var a, c;
|
|
575
581
|
const l = t === "Field" ? (a = e == null ? void 0 : e.binding) == null ? void 0 : a.field : e.id;
|
|
576
|
-
return r[
|
|
577
|
-
hide: t === "Field" ? !!((
|
|
582
|
+
return r[o] = {
|
|
583
|
+
hide: t === "Field" ? !!((c = e == null ? void 0 : e.binding) != null && c.field) : !1,
|
|
578
584
|
description: "",
|
|
579
|
-
title: this.expressionNames[
|
|
585
|
+
title: this.expressionNames[o],
|
|
580
586
|
type: "string",
|
|
581
587
|
$converter: this.getExpressionConverter(l),
|
|
582
588
|
refreshPanelAfterChanged: !0,
|
|
583
589
|
editor: {
|
|
584
590
|
type: "expression-editor",
|
|
585
591
|
singleExpand: !1,
|
|
586
|
-
dialogTitle: `${this.expressionNames[
|
|
587
|
-
showMessage:
|
|
588
|
-
showMessageType:
|
|
589
|
-
beforeOpen: () => this.onBeforeOpenExpression(e,
|
|
590
|
-
onSubmitModal: (
|
|
591
|
-
const p = this.updateExpression(e, t,
|
|
592
|
+
dialogTitle: `${this.expressionNames[o]}编辑器`,
|
|
593
|
+
showMessage: o === "validate" || o === "dataPicking" || o === "required",
|
|
594
|
+
showMessageType: o === "dataPicking",
|
|
595
|
+
beforeOpen: () => this.onBeforeOpenExpression(e, o, t),
|
|
596
|
+
onSubmitModal: (d) => {
|
|
597
|
+
const p = this.updateExpression(e, t, d, o);
|
|
592
598
|
if (i) {
|
|
593
|
-
const f = this.buildRule(l,
|
|
599
|
+
const f = this.buildRule(l, d, o);
|
|
594
600
|
i(f);
|
|
595
601
|
}
|
|
596
602
|
return p;
|
|
@@ -600,13 +606,13 @@ class me {
|
|
|
600
606
|
}, {});
|
|
601
607
|
}
|
|
602
608
|
getExpressionInfo(e, t, n) {
|
|
603
|
-
const i = t === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(i, n),
|
|
609
|
+
const i = t === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(i, n), o = {
|
|
604
610
|
value: r && r.value,
|
|
605
611
|
targetId: i,
|
|
606
612
|
targetType: t,
|
|
607
613
|
expressionType: n
|
|
608
614
|
};
|
|
609
|
-
return r && r.message && (
|
|
615
|
+
return r && r.message && (o.message = r.message), o;
|
|
610
616
|
}
|
|
611
617
|
getExpressionConfig(e, t, n = ["compute", "dependency", "validate"], i) {
|
|
612
618
|
return {
|
|
@@ -629,7 +635,7 @@ class me {
|
|
|
629
635
|
};
|
|
630
636
|
}
|
|
631
637
|
}
|
|
632
|
-
class
|
|
638
|
+
class be {
|
|
633
639
|
constructor(e, t) {
|
|
634
640
|
m(this, "componentId");
|
|
635
641
|
m(this, "viewModelId");
|
|
@@ -690,7 +696,7 @@ class he {
|
|
|
690
696
|
valueField: "value",
|
|
691
697
|
idField: "value",
|
|
692
698
|
editable: !1,
|
|
693
|
-
data: [{ value: e.type, name:
|
|
699
|
+
data: [{ value: e.type, name: A[e.type] && A[e.type].name }]
|
|
694
700
|
}
|
|
695
701
|
}
|
|
696
702
|
}
|
|
@@ -716,21 +722,21 @@ class he {
|
|
|
716
722
|
parentPropertyID: "appearance"
|
|
717
723
|
}
|
|
718
724
|
};
|
|
719
|
-
for (const
|
|
720
|
-
r[
|
|
725
|
+
for (const o in t)
|
|
726
|
+
r[o] = Object.assign(r[o] || {}, t[o]);
|
|
721
727
|
return {
|
|
722
728
|
...i,
|
|
723
729
|
properties: { ...r },
|
|
724
|
-
setPropertyRelates(
|
|
725
|
-
if (
|
|
726
|
-
switch (
|
|
730
|
+
setPropertyRelates(o, l) {
|
|
731
|
+
if (o) {
|
|
732
|
+
switch (o && o.propertyID) {
|
|
727
733
|
case "class":
|
|
728
734
|
case "style": {
|
|
729
735
|
Z.value++;
|
|
730
736
|
break;
|
|
731
737
|
}
|
|
732
738
|
}
|
|
733
|
-
n && n(
|
|
739
|
+
n && n(o, e, l);
|
|
734
740
|
}
|
|
735
741
|
}
|
|
736
742
|
};
|
|
@@ -745,8 +751,8 @@ class he {
|
|
|
745
751
|
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
746
752
|
* @returns
|
|
747
753
|
*/
|
|
748
|
-
getPropertyEditorParams(e, t = [], n = "visible", i = {}, r = {},
|
|
749
|
-
const { getVariables: l, getControlName: a, getStateMachines:
|
|
754
|
+
getPropertyEditorParams(e, t = [], n = "visible", i = {}, r = {}, o = "") {
|
|
755
|
+
const { getVariables: l, getControlName: a, getStateMachines: c } = me(this.designerHostService), d = this.getRealTargetType(e), p = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], f = {
|
|
750
756
|
type: "property-editor",
|
|
751
757
|
propertyTypes: p
|
|
752
758
|
};
|
|
@@ -759,10 +765,10 @@ class he {
|
|
|
759
765
|
}, i);
|
|
760
766
|
break;
|
|
761
767
|
case "Expression":
|
|
762
|
-
f.expressionConfig = this.getExpressionOptions(e,
|
|
768
|
+
f.expressionConfig = this.getExpressionOptions(e, d, o || n);
|
|
763
769
|
break;
|
|
764
770
|
case "StateMachine":
|
|
765
|
-
f.stateMachines =
|
|
771
|
+
f.stateMachines = c();
|
|
766
772
|
break;
|
|
767
773
|
case "Variable":
|
|
768
774
|
Object.assign(f, {
|
|
@@ -801,14 +807,14 @@ class he {
|
|
|
801
807
|
const r = {
|
|
802
808
|
title: "行为",
|
|
803
809
|
description: ""
|
|
804
|
-
},
|
|
810
|
+
}, o = this.getVisibleProperty(e, t);
|
|
805
811
|
for (const a in n)
|
|
806
|
-
|
|
812
|
+
o[a] = Object.assign(o[a] || {}, n[a]);
|
|
807
813
|
const l = this;
|
|
808
814
|
return {
|
|
809
815
|
...r,
|
|
810
|
-
properties: { ...
|
|
811
|
-
setPropertyRelates(a,
|
|
816
|
+
properties: { ...o },
|
|
817
|
+
setPropertyRelates(a, c) {
|
|
812
818
|
if (a) {
|
|
813
819
|
switch (a.propertyID) {
|
|
814
820
|
case "disabled":
|
|
@@ -817,7 +823,7 @@ class he {
|
|
|
817
823
|
l.afterMutilEditorChanged(e, a);
|
|
818
824
|
break;
|
|
819
825
|
}
|
|
820
|
-
i && i(a,
|
|
826
|
+
i && i(a, c);
|
|
821
827
|
}
|
|
822
828
|
}
|
|
823
829
|
};
|
|
@@ -840,7 +846,7 @@ class he {
|
|
|
840
846
|
const n = t && t.parent && t.parent.schema;
|
|
841
847
|
if (!n)
|
|
842
848
|
return;
|
|
843
|
-
const i = n.contents.findIndex((
|
|
849
|
+
const i = n.contents.findIndex((o) => o.id === e), r = se(n.contents[i]);
|
|
844
850
|
n.contents.splice(i, 1), n.contents.splice(i, 0, r), ee();
|
|
845
851
|
}
|
|
846
852
|
/**
|
|
@@ -853,7 +859,7 @@ class he {
|
|
|
853
859
|
const n = e.propertyValue;
|
|
854
860
|
if (!(n && typeof n == "object") || !(n.type === "Variable" && n.isNewVariable))
|
|
855
861
|
return;
|
|
856
|
-
const
|
|
862
|
+
const o = {
|
|
857
863
|
id: n.field,
|
|
858
864
|
category: "locale",
|
|
859
865
|
code: n.fullPath,
|
|
@@ -861,7 +867,7 @@ class he {
|
|
|
861
867
|
type: n.newVariableType || "String",
|
|
862
868
|
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
|
|
863
869
|
};
|
|
864
|
-
delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(
|
|
870
|
+
delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(o.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(o);
|
|
865
871
|
}
|
|
866
872
|
/**
|
|
867
873
|
* 更新表达式到expressions节点
|
|
@@ -871,16 +877,16 @@ class he {
|
|
|
871
877
|
const t = e.propertyValue;
|
|
872
878
|
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
873
879
|
return;
|
|
874
|
-
const { expressionId: r, expressionInfo:
|
|
880
|
+
const { expressionId: r, expressionInfo: o } = t, { targetId: l, targetType: a, expressionType: c, value: d, message: p } = o, f = this.formSchemaUtils.getModule();
|
|
875
881
|
f.expressions = f.expressions || [];
|
|
876
882
|
const { expressions: x } = f;
|
|
877
883
|
let C = x.find((v) => v.target === l);
|
|
878
884
|
C || (C = { target: l, rules: [], targetType: a }, x.push(C));
|
|
879
|
-
const w = C.rules.find((v) => v.type ===
|
|
885
|
+
const w = C.rules.find((v) => v.type === c);
|
|
880
886
|
if (w)
|
|
881
|
-
w.value =
|
|
887
|
+
w.value = d, w.message = p;
|
|
882
888
|
else {
|
|
883
|
-
const v = { id: r, type:
|
|
889
|
+
const v = { id: r, type: c, value: d, message: p };
|
|
884
890
|
C.rules.push(v);
|
|
885
891
|
}
|
|
886
892
|
delete t.expressionInfo;
|
|
@@ -895,11 +901,11 @@ class he {
|
|
|
895
901
|
const n = e.propertyValue;
|
|
896
902
|
if (n && n.type === "Expression")
|
|
897
903
|
return;
|
|
898
|
-
const r = e.propertyID,
|
|
899
|
-
!a || !a.rules || (a.rules = a.rules.filter((
|
|
904
|
+
const r = e.propertyID, o = this.formSchemaUtils.getExpressions(), l = t.binding ? t.binding.field : t.id, a = o.find((c) => c.target === l);
|
|
905
|
+
!a || !a.rules || (a.rules = a.rules.filter((c) => c.type !== r));
|
|
900
906
|
}
|
|
901
907
|
getExpressionOptions(e, t, n) {
|
|
902
|
-
return new
|
|
908
|
+
return new he(this.formSchemaUtils).getExpressionOptions(e, t, n);
|
|
903
909
|
}
|
|
904
910
|
getRealTargetType(e) {
|
|
905
911
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(e.type) > -1 ? "Button" : e.binding && e.binding.field ? "Field" : "Container";
|
|
@@ -918,7 +924,7 @@ class he {
|
|
|
918
924
|
}, t;
|
|
919
925
|
}
|
|
920
926
|
}
|
|
921
|
-
class
|
|
927
|
+
class Ce extends be {
|
|
922
928
|
constructor(e, t) {
|
|
923
929
|
super(e, t);
|
|
924
930
|
}
|
|
@@ -935,15 +941,47 @@ class be extends he {
|
|
|
935
941
|
type: "string",
|
|
936
942
|
description: "组件的CSS样式"
|
|
937
943
|
},
|
|
944
|
+
title: {
|
|
945
|
+
title: "主标题",
|
|
946
|
+
type: "string",
|
|
947
|
+
description: "标题"
|
|
948
|
+
},
|
|
949
|
+
subTitle: {
|
|
950
|
+
title: "副标题",
|
|
951
|
+
type: "string",
|
|
952
|
+
description: "副标题"
|
|
953
|
+
},
|
|
954
|
+
showIcon: {
|
|
955
|
+
title: "是否显示图标",
|
|
956
|
+
type: "boolean",
|
|
957
|
+
description: "是否显示图标",
|
|
958
|
+
refreshPanelAfterChanged: !0
|
|
959
|
+
},
|
|
938
960
|
icon: {
|
|
939
961
|
title: "图标",
|
|
940
962
|
type: "string",
|
|
941
|
-
description: "图标"
|
|
963
|
+
description: "图标",
|
|
964
|
+
visible: e.showIcon
|
|
942
965
|
},
|
|
943
|
-
|
|
944
|
-
title: "
|
|
966
|
+
iconClass: {
|
|
967
|
+
title: "图标所属单据类别",
|
|
945
968
|
type: "string",
|
|
946
|
-
description: "
|
|
969
|
+
description: "定义图标的样式,例如颜色、背景等",
|
|
970
|
+
editor: {
|
|
971
|
+
type: "combo-list",
|
|
972
|
+
textField: "value",
|
|
973
|
+
valueField: "key",
|
|
974
|
+
idField: "key",
|
|
975
|
+
editable: !1,
|
|
976
|
+
data: [
|
|
977
|
+
{ key: "f-title-icon f-text-orna-bill", value: "单据类" },
|
|
978
|
+
{ key: "f-title-icon f-text-orna-dict", value: "字典类" },
|
|
979
|
+
{ key: "f-title-icon f-text-orna-manage", value: "管理类" },
|
|
980
|
+
{ key: "f-title-icon f-text-orna-query", value: "查询报表类" },
|
|
981
|
+
{ key: "f-title-icon f-text-orna-param", value: "系统参数类" }
|
|
982
|
+
]
|
|
983
|
+
},
|
|
984
|
+
visible: e.showIcon
|
|
947
985
|
}
|
|
948
986
|
},
|
|
949
987
|
setPropertyRelates(t, n) {
|
|
@@ -1011,54 +1049,58 @@ class be extends he {
|
|
|
1011
1049
|
};
|
|
1012
1050
|
}
|
|
1013
1051
|
}
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
}
|
|
1018
|
-
function n() {
|
|
1052
|
+
function ve(s, e) {
|
|
1053
|
+
const t = new te();
|
|
1054
|
+
function n(a) {
|
|
1019
1055
|
return !1;
|
|
1020
1056
|
}
|
|
1021
1057
|
function i() {
|
|
1022
|
-
|
|
1058
|
+
const { canMove: a } = t.getTemplateRule(s, e);
|
|
1059
|
+
return a;
|
|
1023
1060
|
}
|
|
1024
1061
|
function r() {
|
|
1062
|
+
const { canDelete: a } = t.getTemplateRule(s, e);
|
|
1063
|
+
return a;
|
|
1064
|
+
}
|
|
1065
|
+
function o() {
|
|
1025
1066
|
return !0;
|
|
1026
1067
|
}
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1068
|
+
function l(a) {
|
|
1069
|
+
const c = new Ce(a, e), { schema: d } = s;
|
|
1070
|
+
return c.getPropertyConfig(d);
|
|
1029
1071
|
}
|
|
1030
1072
|
return {
|
|
1031
|
-
canAccepts:
|
|
1032
|
-
hideNestedPaddingInDesginerView:
|
|
1033
|
-
getPropsConfig:
|
|
1034
|
-
checkCanDeleteComponent:
|
|
1073
|
+
canAccepts: n,
|
|
1074
|
+
hideNestedPaddingInDesginerView: o,
|
|
1075
|
+
getPropsConfig: l,
|
|
1076
|
+
checkCanDeleteComponent: r,
|
|
1035
1077
|
checkCanMoveComponent: i
|
|
1036
1078
|
};
|
|
1037
1079
|
}
|
|
1038
|
-
const
|
|
1080
|
+
const ye = /* @__PURE__ */ j({
|
|
1039
1081
|
name: "FPageHeaderDesign",
|
|
1040
|
-
props:
|
|
1082
|
+
props: B,
|
|
1041
1083
|
emits: ["click"],
|
|
1042
|
-
setup(
|
|
1043
|
-
const t = I(), n =
|
|
1084
|
+
setup(s, e) {
|
|
1085
|
+
const t = I(), n = H("designer-host-service"), i = H("design-item-context"), r = ve(i, n), o = ne(t, i, r), l = I(i.schema.toolbar || {
|
|
1044
1086
|
type: "response-toolbar",
|
|
1045
1087
|
buttons: []
|
|
1046
|
-
}), a = I(
|
|
1088
|
+
}), a = I(N(l.value));
|
|
1047
1089
|
K(() => {
|
|
1048
|
-
t.value.componentInstance =
|
|
1090
|
+
t.value.componentInstance = o;
|
|
1049
1091
|
}), D(() => i.schema.toolbar, () => {
|
|
1050
1092
|
l.value = i.schema.toolbar || {
|
|
1051
1093
|
type: "response-toolbar",
|
|
1052
1094
|
buttons: []
|
|
1053
|
-
}, a.value =
|
|
1095
|
+
}, a.value = N(l.value);
|
|
1054
1096
|
}, {
|
|
1055
1097
|
deep: !0
|
|
1056
1098
|
});
|
|
1057
|
-
const
|
|
1058
|
-
function
|
|
1059
|
-
i && i.setupContext && i.setupContext.emit("selectionChange", g, P,
|
|
1099
|
+
const c = b(() => [...a.value.items]);
|
|
1100
|
+
function d(g, P, U, E) {
|
|
1101
|
+
i && i.setupContext && i.setupContext.emit("selectionChange", g, P, U, E);
|
|
1060
1102
|
}
|
|
1061
|
-
e.expose(
|
|
1103
|
+
e.expose(o.value);
|
|
1062
1104
|
function p(g, P) {
|
|
1063
1105
|
g && P && P.split(" ").reduce((E, G) => (E[G] = !0, E), g);
|
|
1064
1106
|
}
|
|
@@ -1066,56 +1108,58 @@ const ve = /* @__PURE__ */ A({
|
|
|
1066
1108
|
const g = {
|
|
1067
1109
|
"f-title-icon": !0
|
|
1068
1110
|
};
|
|
1069
|
-
return p(g,
|
|
1111
|
+
return p(g, s.iconClass), g;
|
|
1070
1112
|
}), x = b(() => {
|
|
1071
1113
|
const g = {
|
|
1072
1114
|
"f-icon": !0
|
|
1073
1115
|
};
|
|
1074
|
-
return p(g,
|
|
1116
|
+
return p(g, s.icon), g;
|
|
1075
1117
|
}), C = b(() => {
|
|
1076
1118
|
const g = {
|
|
1077
1119
|
"text-right": !0,
|
|
1078
1120
|
"col-6": !0
|
|
1079
1121
|
};
|
|
1080
|
-
return p(g,
|
|
1122
|
+
return p(g, s.buttonClass || ""), g;
|
|
1081
1123
|
}), w = b(() => y({
|
|
1082
1124
|
"f-title": !0
|
|
1083
|
-
},
|
|
1125
|
+
}, s.titleContentClass)), v = b(() => y({
|
|
1084
1126
|
"f-content": !0
|
|
1085
|
-
},
|
|
1127
|
+
}, s.contentClass)), R = b(() => y({
|
|
1086
1128
|
"f-page-header-extend": !0
|
|
1087
|
-
},
|
|
1129
|
+
}, s.downContentClass));
|
|
1088
1130
|
function h() {
|
|
1089
|
-
return
|
|
1131
|
+
return s.titleContentHtml ? u("div", {
|
|
1090
1132
|
class: w.value,
|
|
1091
|
-
innerHTML:
|
|
1092
|
-
}, null) :
|
|
1133
|
+
innerHTML: s.titleContentHtml
|
|
1134
|
+
}, null) : u("div", {
|
|
1093
1135
|
class: "f-title"
|
|
1094
|
-
}, [
|
|
1136
|
+
}, [s.showIcon && s.icon ? u("span", {
|
|
1095
1137
|
class: f.value
|
|
1096
|
-
}, [
|
|
1138
|
+
}, [u("i", {
|
|
1097
1139
|
class: x.value
|
|
1098
|
-
}, null)]) : "",
|
|
1140
|
+
}, null)]) : "", u("h4", {
|
|
1099
1141
|
class: "f-title-text"
|
|
1100
|
-
}, [
|
|
1142
|
+
}, [s.title]), s.subTitle ? u("h5", {
|
|
1143
|
+
class: "f-title-subtitle"
|
|
1144
|
+
}, [s.subTitle]) : ""]);
|
|
1101
1145
|
}
|
|
1102
1146
|
function F() {
|
|
1103
|
-
return
|
|
1147
|
+
return s.contentHtml ? u("div", {
|
|
1104
1148
|
class: v.value,
|
|
1105
|
-
innerHTML:
|
|
1149
|
+
innerHTML: s.contentHtml
|
|
1106
1150
|
}, null) : null;
|
|
1107
1151
|
}
|
|
1108
1152
|
function z() {
|
|
1109
|
-
return
|
|
1110
|
-
class:
|
|
1111
|
-
innerHTML:
|
|
1153
|
+
return s.downContentHtml ? u("div", {
|
|
1154
|
+
class: R.value,
|
|
1155
|
+
innerHTML: s.downContentHtml
|
|
1112
1156
|
}, null) : null;
|
|
1113
1157
|
}
|
|
1114
|
-
return () =>
|
|
1158
|
+
return () => u("div", {
|
|
1115
1159
|
ref: t
|
|
1116
|
-
}, [
|
|
1160
|
+
}, [u("nav", {
|
|
1117
1161
|
class: "f-page-header-base"
|
|
1118
|
-
}, [h(), F(),
|
|
1162
|
+
}, [h(), F(), u(ie, {
|
|
1119
1163
|
class: C.value,
|
|
1120
1164
|
modelValue: l.value,
|
|
1121
1165
|
"onUpdate:modelValue": (g) => l.value = g,
|
|
@@ -1124,37 +1168,37 @@ const ve = /* @__PURE__ */ A({
|
|
|
1124
1168
|
childLabel: "按钮",
|
|
1125
1169
|
contentKey: "buttons",
|
|
1126
1170
|
id: l.value.id,
|
|
1127
|
-
componentId:
|
|
1128
|
-
onSelectionChange:
|
|
1171
|
+
componentId: s.componentId,
|
|
1172
|
+
onSelectionChange: d
|
|
1129
1173
|
}, {
|
|
1130
|
-
default: () => [
|
|
1174
|
+
default: () => [u(Y, {
|
|
1131
1175
|
id: l.value.id,
|
|
1132
1176
|
customClass: "w-100",
|
|
1133
|
-
items:
|
|
1134
|
-
componentId:
|
|
1135
|
-
buttonSize:
|
|
1177
|
+
items: c.value,
|
|
1178
|
+
componentId: s.componentId,
|
|
1179
|
+
buttonSize: s.buttonSize
|
|
1136
1180
|
}, null)]
|
|
1137
1181
|
})]), z()]);
|
|
1138
1182
|
}
|
|
1139
|
-
}),
|
|
1140
|
-
install(
|
|
1141
|
-
|
|
1183
|
+
}), Fe = {
|
|
1184
|
+
install(s) {
|
|
1185
|
+
s.component(O.name, O);
|
|
1142
1186
|
},
|
|
1143
|
-
register(
|
|
1144
|
-
|
|
1187
|
+
register(s, e, t, n, i) {
|
|
1188
|
+
s["page-header"] = O, e["page-header"] = ge(i), n["page-header"] = { eventHandlerResolver: pe };
|
|
1145
1189
|
},
|
|
1146
|
-
registerDesigner(
|
|
1147
|
-
|
|
1190
|
+
registerDesigner(s, e, t, n) {
|
|
1191
|
+
s["page-header"] = ye, e["page-header"] = fe(n);
|
|
1148
1192
|
}
|
|
1149
1193
|
};
|
|
1150
1194
|
export {
|
|
1151
1195
|
O as PageHeader,
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1196
|
+
Fe as default,
|
|
1197
|
+
pe as eventHandlerResolver,
|
|
1198
|
+
B as pageHeaderDesignerProps,
|
|
1199
|
+
T as pageHeaderProps,
|
|
1156
1200
|
Re as propsDesignResolver,
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1201
|
+
fe as propsDesignResolverGenerator,
|
|
1202
|
+
Te as propsResolver,
|
|
1203
|
+
ge as propsResolverGenerator
|
|
1160
1204
|
};
|