@farris/ui-vue 1.3.0 → 1.3.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/accordion/index.esm.js +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,114 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var de = Object.defineProperty;
|
|
2
|
+
var fe = (a, e, t) => e in a ? de(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var P = (a, e, t) => fe(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ref as S, watch as N, createVNode as f, computed as w, defineComponent as R, watchEffect as me, Fragment as $, createTextVNode as G, nextTick as ve, inject as ge, onMounted as he } from "vue";
|
|
5
|
+
import { isPlainObject as Z, cloneDeep as K } from "lodash-es";
|
|
6
|
+
import { DgControl as x } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { withInstall as ye } from "../common/index.esm.js";
|
|
8
|
+
const H = {}, ee = {};
|
|
9
|
+
function X(a) {
|
|
10
|
+
const { properties: e, title: t, ignore: r } = a, l = r && Array.isArray(r), c = Object.keys(e).reduce((n, p) => ((!l || !r.find((u) => u == p)) && (n[p] = e[p].type === "object" && e[p].properties ? X(e[p]) : K(e[p].default)), n), {});
|
|
11
|
+
return t && (!l || !r.find((n) => n == "id")) && (c.id = `${t}-${Date.now()}`), c;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
let
|
|
16
|
-
const
|
|
17
|
-
return
|
|
13
|
+
function _(a, e = {}, t) {
|
|
14
|
+
const r = H[a];
|
|
15
|
+
if (r) {
|
|
16
|
+
let l = X(r);
|
|
17
|
+
const c = ee[a];
|
|
18
|
+
return l = c ? c({ getSchemaByType: _ }, l, e, t) : l, l;
|
|
18
19
|
}
|
|
19
20
|
return null;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
const t =
|
|
23
|
-
return Object.keys(
|
|
22
|
+
function Ce(a, e) {
|
|
23
|
+
const t = X(e);
|
|
24
|
+
return Object.keys(a).reduce((r, l) => (r[l] && Z(r[l]) && Z(a[l]) ? Object.assign(r[l], a[l]) : r[l] = a[l], r), t), t;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return Object.keys(
|
|
27
|
-
if (e.has(
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
|
|
26
|
+
function be(a, e) {
|
|
27
|
+
return Object.keys(a).filter((r) => a[r] != null).reduce((r, l) => {
|
|
28
|
+
if (e.has(l)) {
|
|
29
|
+
const c = e.get(l);
|
|
30
|
+
if (typeof c == "string")
|
|
31
|
+
r[c] = a[l];
|
|
31
32
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
33
|
+
const n = c(l, a[l], a);
|
|
34
|
+
Object.assign(r, n);
|
|
34
35
|
}
|
|
35
36
|
} else
|
|
36
|
-
|
|
37
|
-
return
|
|
37
|
+
r[l] = a[l];
|
|
38
|
+
return r;
|
|
38
39
|
}, {});
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
41
|
+
function Me(a, e, t = /* @__PURE__ */ new Map()) {
|
|
42
|
+
const r = Ce(a, e);
|
|
43
|
+
return be(r, t);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
function e(
|
|
46
|
-
if (typeof
|
|
47
|
-
return
|
|
48
|
-
if (typeof
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
45
|
+
function we(a = {}) {
|
|
46
|
+
function e(s, i, o, d) {
|
|
47
|
+
if (typeof o == "number")
|
|
48
|
+
return d[s].length === o;
|
|
49
|
+
if (typeof o == "object") {
|
|
50
|
+
const m = Object.keys(o)[0], C = o[m];
|
|
51
|
+
if (m === "not")
|
|
52
|
+
return Number(d[s].length) !== Number(C);
|
|
53
|
+
if (m === "moreThan")
|
|
54
|
+
return Number(d[s].length) >= Number(C);
|
|
55
|
+
if (m === "lessThan")
|
|
56
|
+
return Number(d[s].length) <= Number(C);
|
|
56
57
|
}
|
|
57
58
|
return !1;
|
|
58
59
|
}
|
|
59
|
-
function t(
|
|
60
|
-
return
|
|
60
|
+
function t(s, i, o, d) {
|
|
61
|
+
return d[s] && d[s].propertyValue && String(d[s].propertyValue.value) === String(o);
|
|
61
62
|
}
|
|
62
|
-
const
|
|
63
|
+
const r = /* @__PURE__ */ new Map([
|
|
63
64
|
["length", e],
|
|
64
65
|
["getProperty", t]
|
|
65
66
|
]);
|
|
66
|
-
Object.keys(
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const
|
|
73
|
-
return { target:
|
|
67
|
+
Object.keys(a).reduce((s, i) => (s.set(i, a[i]), s), r);
|
|
68
|
+
function l(s, i) {
|
|
69
|
+
const o = s;
|
|
70
|
+
return typeof i == "number" ? [{ target: o, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!i }] : typeof i == "object" ? Object.keys(i).map((d) => {
|
|
71
|
+
if (d === "length")
|
|
72
|
+
return { target: o, operator: "length", param: null, value: i[d] };
|
|
73
|
+
const m = d, C = i[d];
|
|
74
|
+
return { target: o, operator: "getProperty", param: m, value: C };
|
|
74
75
|
}) : [];
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(
|
|
78
|
-
const
|
|
79
|
-
return
|
|
77
|
+
function c(s) {
|
|
78
|
+
return Object.keys(s).reduce((o, d) => {
|
|
79
|
+
const m = l(d, s[d]);
|
|
80
|
+
return o.push(...m), o;
|
|
80
81
|
}, []);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
return
|
|
83
|
+
function n(s, i) {
|
|
84
|
+
if (r.has(s.operator)) {
|
|
85
|
+
const o = r.get(s.operator);
|
|
86
|
+
return o && o(s.target, s.param, s.value, i) || !1;
|
|
86
87
|
}
|
|
87
88
|
return !1;
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
90
|
+
function p(s, i) {
|
|
91
|
+
return c(s).reduce((m, C) => m && n(C, i), !0);
|
|
91
92
|
}
|
|
92
|
-
function s
|
|
93
|
-
const
|
|
94
|
-
return
|
|
93
|
+
function u(s, i) {
|
|
94
|
+
const o = Object.keys(s), d = o.includes("allOf"), m = o.includes("anyOf"), C = d || m, b = (C ? s[C ? d ? "allOf" : "anyOf" : "allOf"] : [s]).map((M) => p(M, i));
|
|
95
|
+
return d ? !b.includes(!1) : b.includes(!0);
|
|
95
96
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
97
|
+
return { parseValueSchema: u };
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
const F = {
|
|
100
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
101
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
102
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
103
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
104
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
105
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
106
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
107
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
108
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
109
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
110
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
111
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
112
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
113
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
114
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
115
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
116
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
117
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
118
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
119
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
120
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
121
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
122
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
123
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
124
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
125
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
126
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
127
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
128
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
129
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
130
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
131
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
132
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
133
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
134
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
135
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
136
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
137
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
138
|
+
}, Le = {}, Ie = {};
|
|
139
|
+
we();
|
|
140
|
+
function Pe(a, e, t = /* @__PURE__ */ new Map(), r = (n, p, u) => p, l = {}, c = (n) => n) {
|
|
141
|
+
return H[e.title] = e, ee[e.title] = r, Le[e.title] = l, Ie[e.title] = c, (n = {}) => {
|
|
142
|
+
const p = Me(n, e, t), u = Object.keys(a).reduce((s, i) => (s[i] = a[i].default, s), {});
|
|
143
|
+
return Object.assign(u, p);
|
|
104
144
|
};
|
|
105
145
|
}
|
|
106
|
-
function
|
|
146
|
+
function Se(a, e) {
|
|
107
147
|
return { customClass: e.class, customStyle: e.style };
|
|
108
148
|
}
|
|
109
|
-
const
|
|
110
|
-
["appearance",
|
|
111
|
-
]),
|
|
149
|
+
const ke = /* @__PURE__ */ new Map([
|
|
150
|
+
["appearance", Se]
|
|
151
|
+
]), Te = "https://json-schema.org/draft/2020-12/schema", De = "https://farris-design.gitee.io/pagination.schema.json", Ne = "pagination", Be = "A Farris Component", Fe = "object", Ee = {
|
|
112
152
|
id: {
|
|
113
153
|
description: "The unique identifier for a pagination",
|
|
114
154
|
type: "string"
|
|
@@ -200,18 +240,18 @@ const Se = /* @__PURE__ */ new Map([
|
|
|
200
240
|
type: "sting",
|
|
201
241
|
default: ""
|
|
202
242
|
}
|
|
203
|
-
},
|
|
243
|
+
}, je = [
|
|
204
244
|
"id",
|
|
205
245
|
"type"
|
|
206
|
-
],
|
|
207
|
-
$schema:
|
|
208
|
-
$id:
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
211
|
-
type:
|
|
212
|
-
properties:
|
|
213
|
-
required:
|
|
214
|
-
},
|
|
246
|
+
], Ae = {
|
|
247
|
+
$schema: Te,
|
|
248
|
+
$id: De,
|
|
249
|
+
title: Ne,
|
|
250
|
+
description: Be,
|
|
251
|
+
type: Fe,
|
|
252
|
+
properties: Ee,
|
|
253
|
+
required: je
|
|
254
|
+
}, Oe = "pagination", Ve = "A Farris Component", $e = "object", Ge = {
|
|
215
255
|
basic: {
|
|
216
256
|
description: "Basic Infomation",
|
|
217
257
|
title: "基本信息",
|
|
@@ -293,16 +333,16 @@ const Se = /* @__PURE__ */ new Map([
|
|
|
293
333
|
}
|
|
294
334
|
}
|
|
295
335
|
}
|
|
296
|
-
},
|
|
297
|
-
title:
|
|
336
|
+
}, Ue = {
|
|
337
|
+
title: Oe,
|
|
298
338
|
description: Ve,
|
|
299
|
-
type:
|
|
300
|
-
categories:
|
|
339
|
+
type: $e,
|
|
340
|
+
categories: Ge
|
|
301
341
|
};
|
|
302
|
-
function We(
|
|
342
|
+
function We(a, e, t) {
|
|
303
343
|
return e;
|
|
304
344
|
}
|
|
305
|
-
const
|
|
345
|
+
const J = {
|
|
306
346
|
/**
|
|
307
347
|
* 当前页码
|
|
308
348
|
*/
|
|
@@ -335,59 +375,71 @@ const Z = {
|
|
|
335
375
|
* 自定义每页数量
|
|
336
376
|
*/
|
|
337
377
|
pageList: { type: Array, default: [20, 50, 100] }
|
|
338
|
-
},
|
|
339
|
-
function
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}),
|
|
344
|
-
|
|
378
|
+
}, te = Pe(J, Ae, ke, We, Ue);
|
|
379
|
+
function ne(a, e, t, r) {
|
|
380
|
+
const l = S("跳转至"), c = S(""), n = S(a.value);
|
|
381
|
+
N(n, (i, o) => {
|
|
382
|
+
i >= 1 && i <= e.value ? a.value = i : n.value = o;
|
|
383
|
+
}), N(a, (i) => {
|
|
384
|
+
n.value !== i && (n.value = i);
|
|
345
385
|
});
|
|
346
|
-
function
|
|
347
|
-
|
|
386
|
+
function p(i) {
|
|
387
|
+
n.value = i.target.valueAsNumber, r.emit("change", {
|
|
388
|
+
pageIndex: n.value,
|
|
389
|
+
pageSize: t.value
|
|
390
|
+
});
|
|
348
391
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
392
|
+
function u(i) {
|
|
393
|
+
i.key === "Enter" && (n.value = i.target.valueAsNumber, r.emit("change", {
|
|
394
|
+
pageIndex: n.value,
|
|
395
|
+
pageSize: t.value
|
|
396
|
+
}));
|
|
351
397
|
}
|
|
352
|
-
function
|
|
398
|
+
function s() {
|
|
353
399
|
return f("li", {
|
|
354
400
|
class: "page-goto-input d-flex flex-row",
|
|
355
401
|
style: "padding-left: 10px; white-space: nowrap;"
|
|
356
402
|
}, [f("span", {
|
|
357
403
|
class: "pg-message-text"
|
|
358
|
-
}, [
|
|
404
|
+
}, [l.value]), f("input", {
|
|
359
405
|
type: "number",
|
|
360
406
|
class: "form-control farris-gotopagenumber",
|
|
361
|
-
value:
|
|
407
|
+
value: n.value,
|
|
362
408
|
min: "1",
|
|
363
409
|
max: e.value,
|
|
364
410
|
style: "display: inline-block;margin-left:3px;",
|
|
365
|
-
onBlur: (
|
|
366
|
-
onKeyup: (
|
|
367
|
-
}, null),
|
|
411
|
+
onBlur: (i) => p(i),
|
|
412
|
+
onKeyup: (i) => u(i)
|
|
413
|
+
}, null), c.value]);
|
|
368
414
|
}
|
|
369
415
|
return {
|
|
370
|
-
renderGotoButton:
|
|
416
|
+
renderGotoButton: s
|
|
371
417
|
};
|
|
372
418
|
}
|
|
373
|
-
function ae(
|
|
374
|
-
const
|
|
419
|
+
function ae(a, e, t, r, l) {
|
|
420
|
+
const c = w(() => ({
|
|
375
421
|
"page-item": !0,
|
|
376
422
|
disabled: e.value
|
|
377
423
|
}));
|
|
378
|
-
function
|
|
379
|
-
|
|
424
|
+
function n(i) {
|
|
425
|
+
a.value = a.value < t.value ? a.value + 1 : t.value, l.emit("change", {
|
|
426
|
+
pageIndex: a.value,
|
|
427
|
+
pageSize: r.value
|
|
428
|
+
});
|
|
380
429
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
430
|
+
function p(i) {
|
|
431
|
+
a.value = t.value, l.emit("change", {
|
|
432
|
+
pageIndex: a.value,
|
|
433
|
+
pageSize: r.value
|
|
434
|
+
});
|
|
383
435
|
}
|
|
384
|
-
function
|
|
436
|
+
function u() {
|
|
385
437
|
return f("li", {
|
|
386
|
-
class:
|
|
438
|
+
class: c.value
|
|
387
439
|
}, [!e.value && f("a", {
|
|
388
440
|
class: "page-link",
|
|
389
441
|
tabindex: "0",
|
|
390
|
-
onClick: (
|
|
442
|
+
onClick: (i) => n()
|
|
391
443
|
}, [f("span", {
|
|
392
444
|
class: "f-icon f-page-next"
|
|
393
445
|
}, null)]), e.value && f("span", {
|
|
@@ -396,13 +448,13 @@ function ae(n, e, t) {
|
|
|
396
448
|
class: "f-icon f-page-next"
|
|
397
449
|
}, null)])]);
|
|
398
450
|
}
|
|
399
|
-
function
|
|
451
|
+
function s() {
|
|
400
452
|
return f("li", {
|
|
401
|
-
class:
|
|
453
|
+
class: c.value
|
|
402
454
|
}, [!e.value && f("a", {
|
|
403
455
|
class: "page-link",
|
|
404
456
|
tabindex: "0",
|
|
405
|
-
onClick: (
|
|
457
|
+
onClick: (i) => p()
|
|
406
458
|
}, [f("span", {
|
|
407
459
|
class: "f-icon f-page-last"
|
|
408
460
|
}, null)]), e.value && f("span", {
|
|
@@ -412,21 +464,21 @@ function ae(n, e, t) {
|
|
|
412
464
|
}, null)])]);
|
|
413
465
|
}
|
|
414
466
|
return {
|
|
415
|
-
renderLastPage:
|
|
416
|
-
renderNextPage:
|
|
467
|
+
renderLastPage: s,
|
|
468
|
+
renderNextPage: u
|
|
417
469
|
};
|
|
418
470
|
}
|
|
419
|
-
function
|
|
420
|
-
const t =
|
|
471
|
+
function oe(a, e) {
|
|
472
|
+
const t = S("共"), r = S("条"), l = w(() => ({
|
|
421
473
|
"pagination-message": !0,
|
|
422
474
|
"text-truncate": !0,
|
|
423
475
|
"d-flex": !0,
|
|
424
|
-
"ml-auto":
|
|
425
|
-
"flex-fill":
|
|
476
|
+
"ml-auto": a.value === "right",
|
|
477
|
+
"flex-fill": a.value === "right"
|
|
426
478
|
}));
|
|
427
|
-
function
|
|
479
|
+
function c() {
|
|
428
480
|
return f("li", {
|
|
429
|
-
class:
|
|
481
|
+
class: l.value
|
|
430
482
|
}, [f("div", {
|
|
431
483
|
class: "text-truncate",
|
|
432
484
|
style: "line-height: 26px"
|
|
@@ -436,119 +488,131 @@ function re(n, e) {
|
|
|
436
488
|
class: "pg-message-total"
|
|
437
489
|
}, [e.value]), f("span", {
|
|
438
490
|
class: "pg-message-text"
|
|
439
|
-
}, [
|
|
491
|
+
}, [r.value])])]);
|
|
440
492
|
}
|
|
441
493
|
return {
|
|
442
|
-
renderPageInfo:
|
|
494
|
+
renderPageInfo: c
|
|
443
495
|
};
|
|
444
496
|
}
|
|
445
|
-
function
|
|
446
|
-
const c =
|
|
497
|
+
function le(a, e, t, r, l) {
|
|
498
|
+
const c = S(!1), n = S("显示"), p = S("条"), u = w(() => ({
|
|
447
499
|
dropup: !0,
|
|
448
500
|
"dropdown-right": !0,
|
|
449
501
|
"pg-pagelist": !0,
|
|
450
|
-
"pagelist-disabled":
|
|
502
|
+
"pagelist-disabled": r.value === 0,
|
|
451
503
|
show: c.value
|
|
452
|
-
})), s =
|
|
504
|
+
})), s = w(() => ({
|
|
453
505
|
"dropdown-menu": !0,
|
|
454
506
|
show: c.value
|
|
455
|
-
})),
|
|
507
|
+
})), i = (h) => ({
|
|
456
508
|
"w-100": !0,
|
|
457
509
|
"dropdown-item": !0,
|
|
458
|
-
active: e.value ===
|
|
510
|
+
active: e.value === h
|
|
459
511
|
});
|
|
460
|
-
function
|
|
512
|
+
function o(h) {
|
|
461
513
|
c.value = !0;
|
|
462
514
|
}
|
|
463
|
-
function d(
|
|
515
|
+
function d(h) {
|
|
464
516
|
c.value = !1;
|
|
465
517
|
}
|
|
466
|
-
function m(
|
|
467
|
-
const
|
|
468
|
-
return Math.ceil(
|
|
518
|
+
function m(h, b, g) {
|
|
519
|
+
const I = h * b - b + 1;
|
|
520
|
+
return Math.ceil(I / g);
|
|
469
521
|
}
|
|
470
|
-
function C(
|
|
471
|
-
|
|
522
|
+
function C(h, b) {
|
|
523
|
+
a.value = m(a.value, e.value, b), e.value = b, c.value = !1, l.emit("change", {
|
|
524
|
+
pageIndex: a.value,
|
|
525
|
+
pageSize: e.value
|
|
526
|
+
});
|
|
472
527
|
}
|
|
473
|
-
function
|
|
528
|
+
function v() {
|
|
474
529
|
return f("li", {
|
|
475
530
|
class: "pagination-pagelist"
|
|
476
531
|
}, [f("div", {
|
|
477
|
-
class:
|
|
478
|
-
onMouseenter: (
|
|
479
|
-
onMouseleave: (
|
|
532
|
+
class: u.value,
|
|
533
|
+
onMouseenter: (h) => o(),
|
|
534
|
+
onMouseleave: (h) => d()
|
|
480
535
|
}, [f("div", {
|
|
481
536
|
class: "pg-pagelist-info"
|
|
482
537
|
}, [f("span", {
|
|
483
538
|
class: "pagelist-text"
|
|
484
|
-
}, [
|
|
539
|
+
}, [n.value]), f("b", {
|
|
485
540
|
class: "cur-pagesize"
|
|
486
541
|
}, [e.value]), f("span", {
|
|
487
542
|
class: "pagelist-text"
|
|
488
|
-
}, [
|
|
543
|
+
}, [p.value]), f("i", {
|
|
489
544
|
class: "f-icon f-icon-dropdown"
|
|
490
545
|
}, null)]), f("div", {
|
|
491
546
|
class: s.value,
|
|
492
547
|
style: "margin-bottom: -1px;"
|
|
493
|
-
}, [t.value.map((
|
|
494
|
-
class:
|
|
495
|
-
onClick: (
|
|
496
|
-
}, [f("span", null, [
|
|
548
|
+
}, [t.value.map((h) => f("li", {
|
|
549
|
+
class: i(h),
|
|
550
|
+
onClick: (b) => C(b, h)
|
|
551
|
+
}, [f("span", null, [h])]))])])]);
|
|
497
552
|
}
|
|
498
553
|
return {
|
|
499
|
-
renderPageList:
|
|
554
|
+
renderPageList: v
|
|
500
555
|
};
|
|
501
556
|
}
|
|
502
|
-
function
|
|
503
|
-
const
|
|
557
|
+
function se(a, e, t, r) {
|
|
558
|
+
const l = (u) => ({
|
|
504
559
|
"page-item": !0,
|
|
505
|
-
current:
|
|
506
|
-
ellipsis:
|
|
507
|
-
}),
|
|
560
|
+
current: a.value === u.value,
|
|
561
|
+
ellipsis: u.label === "..."
|
|
562
|
+
}), c = (u) => ({
|
|
508
563
|
"f-icon": !0,
|
|
509
|
-
"f-icon-arrow-seek-left":
|
|
510
|
-
"f-icon-arrow-seek-right":
|
|
564
|
+
"f-icon-arrow-seek-left": u.value < a.value,
|
|
565
|
+
"f-icon-arrow-seek-right": u.value > a.value
|
|
511
566
|
});
|
|
512
|
-
function
|
|
513
|
-
|
|
567
|
+
function n(u, s) {
|
|
568
|
+
a.value = s, r.emit("change", {
|
|
569
|
+
pageIndex: a.value,
|
|
570
|
+
pageSize: t.value
|
|
571
|
+
});
|
|
514
572
|
}
|
|
515
|
-
function
|
|
516
|
-
return e.value.map((
|
|
517
|
-
class:
|
|
518
|
-
}, [
|
|
573
|
+
function p() {
|
|
574
|
+
return e.value.map((u) => f("li", {
|
|
575
|
+
class: l(u)
|
|
576
|
+
}, [a.value !== u.value && f("a", {
|
|
519
577
|
class: "page-link",
|
|
520
578
|
tabindex: "0",
|
|
521
|
-
onClick: (
|
|
579
|
+
onClick: (s) => n(s, u.value)
|
|
522
580
|
}, [f("span", {
|
|
523
581
|
class: "page-link-label"
|
|
524
|
-
}, [
|
|
525
|
-
class:
|
|
526
|
-
}, null)]),
|
|
582
|
+
}, [u.label]), u.label === "..." && f("i", {
|
|
583
|
+
class: c(u)
|
|
584
|
+
}, null)]), a.value === u.value && f("span", {
|
|
527
585
|
class: "page-link"
|
|
528
|
-
}, [
|
|
586
|
+
}, [u.label])]));
|
|
529
587
|
}
|
|
530
588
|
return {
|
|
531
|
-
renderPageNumbers:
|
|
589
|
+
renderPageNumbers: p
|
|
532
590
|
};
|
|
533
591
|
}
|
|
534
|
-
function ie(
|
|
535
|
-
const
|
|
592
|
+
function ie(a, e, t, r, l) {
|
|
593
|
+
const c = w(() => ({
|
|
536
594
|
"page-item": !0,
|
|
537
595
|
disabled: e.value
|
|
538
596
|
}));
|
|
539
|
-
function
|
|
540
|
-
|
|
597
|
+
function n(i) {
|
|
598
|
+
a.value = 1, l.emit("change", {
|
|
599
|
+
pageIndex: a.value,
|
|
600
|
+
pageSize: r.value
|
|
601
|
+
});
|
|
541
602
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
603
|
+
function p(i) {
|
|
604
|
+
a.value = a.value > 2 ? a.value - 1 : 1, l.emit("change", {
|
|
605
|
+
pageIndex: a.value,
|
|
606
|
+
pageSize: r.value
|
|
607
|
+
});
|
|
544
608
|
}
|
|
545
|
-
function
|
|
609
|
+
function u() {
|
|
546
610
|
return f("li", {
|
|
547
|
-
class:
|
|
611
|
+
class: c.value
|
|
548
612
|
}, [t.value && f("a", {
|
|
549
613
|
tabindex: "0",
|
|
550
614
|
class: "page-link",
|
|
551
|
-
onClick: (
|
|
615
|
+
onClick: (i) => n()
|
|
552
616
|
}, [f("span", {
|
|
553
617
|
class: "f-icon f-page-first"
|
|
554
618
|
}, null)]), e.value && f("span", {
|
|
@@ -557,13 +621,13 @@ function ie(n, e, t) {
|
|
|
557
621
|
class: "f-icon f-page-first"
|
|
558
622
|
}, null)])]);
|
|
559
623
|
}
|
|
560
|
-
function
|
|
624
|
+
function s() {
|
|
561
625
|
return f("li", {
|
|
562
|
-
class:
|
|
626
|
+
class: c.value
|
|
563
627
|
}, [t.value && f("a", {
|
|
564
628
|
tabindex: "0",
|
|
565
629
|
class: "page-link",
|
|
566
|
-
onClick: (
|
|
630
|
+
onClick: (i) => p()
|
|
567
631
|
}, [f("span", {
|
|
568
632
|
class: "f-icon f-page-pre"
|
|
569
633
|
}, null)]), e.value && f("span", {
|
|
@@ -573,1221 +637,729 @@ function ie(n, e, t) {
|
|
|
573
637
|
}, null)])]);
|
|
574
638
|
}
|
|
575
639
|
return {
|
|
576
|
-
renderFirstPage:
|
|
577
|
-
renderPreviousPage:
|
|
640
|
+
renderFirstPage: u,
|
|
641
|
+
renderPreviousPage: s
|
|
578
642
|
};
|
|
579
643
|
}
|
|
580
|
-
function
|
|
581
|
-
const e =
|
|
582
|
-
function t(
|
|
583
|
-
const
|
|
584
|
-
return
|
|
585
|
-
}
|
|
586
|
-
function
|
|
587
|
-
const
|
|
588
|
-
let
|
|
589
|
-
for (;
|
|
590
|
-
const
|
|
591
|
-
|
|
644
|
+
function re(a) {
|
|
645
|
+
const e = S([]);
|
|
646
|
+
function t(l, c, n, p) {
|
|
647
|
+
const u = Math.ceil(n / 2);
|
|
648
|
+
return l === n ? p : l === 1 ? l : n < p ? p - u < c ? p - n + l : u < c ? c - u + l : l : l;
|
|
649
|
+
}
|
|
650
|
+
function r(l, c, n, p) {
|
|
651
|
+
const u = [], s = Math.ceil(n / c), i = Math.ceil(p / 2), o = l <= i, d = s - i < l, m = !o && !d, C = p < s;
|
|
652
|
+
let v = 1;
|
|
653
|
+
for (; v <= s && v <= p; ) {
|
|
654
|
+
const h = t(v, l, p, s), b = v === 2 && (m || d), g = v === p - 1 && (m || o), M = C && (b || g) ? "..." : "" + h;
|
|
655
|
+
u.push({ label: M, value: h }), v++;
|
|
592
656
|
}
|
|
593
|
-
e.value =
|
|
657
|
+
e.value = u;
|
|
594
658
|
}
|
|
595
|
-
return { pages: e, updatePages:
|
|
659
|
+
return { pages: e, updatePages: r };
|
|
596
660
|
}
|
|
597
|
-
const
|
|
661
|
+
const U = /* @__PURE__ */ R({
|
|
598
662
|
name: "FPagination",
|
|
599
|
-
props:
|
|
600
|
-
emits: ["pageIndexChanged", "pageSizeChanged", "update:currentPage", "update:pageSize"],
|
|
601
|
-
setup(
|
|
602
|
-
const t =
|
|
603
|
-
pages:
|
|
604
|
-
updatePages:
|
|
605
|
-
} =
|
|
606
|
-
renderFirstPage:
|
|
607
|
-
renderPreviousPage:
|
|
608
|
-
} = ie(
|
|
609
|
-
renderLastPage:
|
|
610
|
-
renderNextPage:
|
|
611
|
-
} = ae(
|
|
612
|
-
renderPageInfo:
|
|
613
|
-
} =
|
|
614
|
-
renderPageList:
|
|
615
|
-
} =
|
|
616
|
-
renderPageNumbers:
|
|
617
|
-
} =
|
|
618
|
-
renderGotoButton:
|
|
619
|
-
} =
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
}),
|
|
623
|
-
|
|
624
|
-
}),
|
|
625
|
-
e.emit("update:currentPage",
|
|
626
|
-
pageIndex:
|
|
627
|
-
pageSize:
|
|
663
|
+
props: J,
|
|
664
|
+
emits: ["change", "pageIndexChanged", "pageSizeChanged", "update:currentPage", "update:pageSize"],
|
|
665
|
+
setup(a, e) {
|
|
666
|
+
const t = S(!1), r = S(a.mode), l = S(""), c = S(!1), n = S(a.pageSize), p = S(a.currentPage), u = S(a.totalItems), {
|
|
667
|
+
pages: s,
|
|
668
|
+
updatePages: i
|
|
669
|
+
} = re(), o = w(() => p.value === 1), d = w(() => a.pageList), m = w(() => Math.ceil(u.value / n.value)), C = w(() => p.value === m.value), v = w(() => a.showGoButton), h = w(() => p.value > 1), b = w(() => !(c.value && s.value.length <= 1)), g = w(() => !0), M = w(() => a.showPageList), I = w(() => a.showPageNumbers), y = w(() => !0), {
|
|
670
|
+
renderFirstPage: L,
|
|
671
|
+
renderPreviousPage: T
|
|
672
|
+
} = ie(p, o, h, n, e), {
|
|
673
|
+
renderLastPage: k,
|
|
674
|
+
renderNextPage: D
|
|
675
|
+
} = ae(p, C, m, n, e), {
|
|
676
|
+
renderPageInfo: E
|
|
677
|
+
} = oe(l, u), {
|
|
678
|
+
renderPageList: A
|
|
679
|
+
} = le(p, n, d, u, e), {
|
|
680
|
+
renderPageNumbers: O
|
|
681
|
+
} = se(p, s, n, e), {
|
|
682
|
+
renderGotoButton: j
|
|
683
|
+
} = ne(p, m, n, e);
|
|
684
|
+
i(p.value, n.value, u.value, 7), N(() => a.totalItems, (B) => {
|
|
685
|
+
u.value = B;
|
|
686
|
+
}), N([p, n, u], () => {
|
|
687
|
+
i(p.value, n.value, u.value, 7);
|
|
688
|
+
}), N(p, () => {
|
|
689
|
+
e.emit("update:currentPage", p.value), e.emit("pageIndexChanged", {
|
|
690
|
+
pageIndex: p.value,
|
|
691
|
+
pageSize: n.value
|
|
628
692
|
});
|
|
629
|
-
}),
|
|
630
|
-
e.emit("update:pageSize",
|
|
631
|
-
pageIndex:
|
|
632
|
-
pageSize:
|
|
693
|
+
}), N(n, () => {
|
|
694
|
+
e.emit("update:pageSize", n.value), e.emit("pageSizeChanged", {
|
|
695
|
+
pageIndex: p.value,
|
|
696
|
+
pageSize: n.value
|
|
633
697
|
});
|
|
634
|
-
}),
|
|
635
|
-
|
|
636
|
-
}),
|
|
637
|
-
const
|
|
638
|
-
|
|
698
|
+
}), N(() => a.totalItems, (B) => {
|
|
699
|
+
u.value = B, i(p.value, n.value, u.value, 7);
|
|
700
|
+
}), me(() => {
|
|
701
|
+
const B = d.value.includes(n.value);
|
|
702
|
+
n.value = B ? n.value : d.value[0];
|
|
639
703
|
})();
|
|
640
|
-
const
|
|
704
|
+
const W = w(() => ({
|
|
641
705
|
"ngx-pagination": !0,
|
|
642
706
|
pagination: !0,
|
|
643
707
|
responsive: t.value,
|
|
644
|
-
"pager-viewmode-default":
|
|
645
|
-
"pager-viewmode-simple":
|
|
646
|
-
})),
|
|
708
|
+
"pager-viewmode-default": r.value === "default",
|
|
709
|
+
"pager-viewmode-simple": r.value === "simple"
|
|
710
|
+
})), z = w(() => ({
|
|
647
711
|
position: "relative",
|
|
648
|
-
"justify-content":
|
|
712
|
+
"justify-content": l.value === "center" ? "center" : "start"
|
|
649
713
|
}));
|
|
650
|
-
function $() {
|
|
651
|
-
return f(W, null, [w.value && A(), j.value && T(), L.value && v(), L.value && O(), N.value && M(), L.value && h(), L.value && S(), i.value && D()]);
|
|
652
|
-
}
|
|
653
714
|
function V() {
|
|
654
|
-
return f(
|
|
715
|
+
return f($, null, [g.value && E(), M.value && A(), y.value && L(), y.value && T(), I.value && O(), y.value && D(), y.value && k(), v.value && j()]);
|
|
716
|
+
}
|
|
717
|
+
function q() {
|
|
718
|
+
return f($, null, [f("li", {
|
|
655
719
|
class: "page-item d-flex flex-fill"
|
|
656
|
-
}, null),
|
|
720
|
+
}, null), y.value && L(), y.value && T(), j(), f("li", {
|
|
657
721
|
class: "page-item page-separator",
|
|
658
722
|
style: "margin-left: 10px"
|
|
659
723
|
}, [f("span", {
|
|
660
724
|
style: "font-size: 15px; font-weight: 200;"
|
|
661
|
-
}, [
|
|
725
|
+
}, [G(" /")])]), f("li", {
|
|
662
726
|
class: "page-item page-total",
|
|
663
727
|
style: "margin-left: 5px"
|
|
664
728
|
}, [f("span", {
|
|
665
729
|
style: "font-size: 16px; font-weight: 600;"
|
|
666
|
-
}, [
|
|
730
|
+
}, [G(" "), m.value])]), y.value && D(), y.value && k()]);
|
|
667
731
|
}
|
|
668
732
|
return () => f("div", {
|
|
669
733
|
class: "pagination-container"
|
|
670
734
|
}, [b.value && f("ul", {
|
|
671
735
|
role: "navigation",
|
|
672
|
-
class:
|
|
673
|
-
style:
|
|
674
|
-
}, [
|
|
736
|
+
class: W.value,
|
|
737
|
+
style: z.value
|
|
738
|
+
}, [r.value === "default" ? V() : q()])]);
|
|
675
739
|
}
|
|
676
740
|
});
|
|
677
|
-
function
|
|
678
|
-
var
|
|
679
|
-
function
|
|
741
|
+
function ze(a, e, t) {
|
|
742
|
+
var I;
|
|
743
|
+
function r() {
|
|
680
744
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
681
745
|
}
|
|
682
|
-
|
|
683
|
-
const
|
|
684
|
-
function
|
|
746
|
+
r();
|
|
747
|
+
const l = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", n = S();
|
|
748
|
+
function p() {
|
|
685
749
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
686
750
|
}
|
|
687
|
-
function
|
|
751
|
+
function u() {
|
|
688
752
|
return !1;
|
|
689
753
|
}
|
|
690
|
-
function
|
|
754
|
+
function s() {
|
|
691
755
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
692
756
|
}
|
|
693
|
-
function
|
|
757
|
+
function i() {
|
|
694
758
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
695
759
|
}
|
|
696
|
-
function
|
|
697
|
-
if (!
|
|
760
|
+
function o(y) {
|
|
761
|
+
if (!y || !y.value)
|
|
698
762
|
return null;
|
|
699
|
-
if (
|
|
700
|
-
return
|
|
701
|
-
const
|
|
702
|
-
return
|
|
763
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
764
|
+
return y.value;
|
|
765
|
+
const L = S(y == null ? void 0 : y.value.parent), T = o(L);
|
|
766
|
+
return T || null;
|
|
703
767
|
}
|
|
704
|
-
function
|
|
705
|
-
const { componentInstance:
|
|
706
|
-
return !
|
|
768
|
+
function d(y = e) {
|
|
769
|
+
const { componentInstance: L, designerItemElementRef: T } = y;
|
|
770
|
+
return !L || !L.value ? null : L.value.canMove ? T : d(y.parent);
|
|
707
771
|
}
|
|
708
|
-
function
|
|
709
|
-
return !!t && t.canAccepts(
|
|
772
|
+
function m(y) {
|
|
773
|
+
return !!t && t.canAccepts(y);
|
|
710
774
|
}
|
|
711
|
-
function
|
|
775
|
+
function C() {
|
|
712
776
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
713
777
|
}
|
|
714
|
-
function
|
|
715
|
-
}
|
|
716
|
-
function u(v, O) {
|
|
717
|
-
O && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(O);
|
|
778
|
+
function v() {
|
|
718
779
|
}
|
|
719
|
-
function
|
|
720
|
-
|
|
721
|
-
let h = q(S, v, O);
|
|
722
|
-
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(v, h));
|
|
723
|
-
const A = S.toLowerCase().replace("-", "_");
|
|
724
|
-
return h && !h.id && h.type === S && (h.id = `${A}_${Math.random().toString().slice(2, 6)}`), h;
|
|
780
|
+
function h(y, L) {
|
|
781
|
+
L && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(L);
|
|
725
782
|
}
|
|
726
|
-
function
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
return T && !T.id && T.type === S && (T.id = `${M}_${Math.random().toString().slice(2, 6)}`), T;
|
|
783
|
+
function b(y, L) {
|
|
784
|
+
const { componentType: T } = y;
|
|
785
|
+
let k = _(T, y, L);
|
|
786
|
+
t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(y, k));
|
|
787
|
+
const D = T.toLowerCase().replace("-", "_");
|
|
788
|
+
return k && !k.id && k.type === T && (k.id = `${D}_${Math.random().toString().slice(2, 6)}`), k;
|
|
733
789
|
}
|
|
734
|
-
function
|
|
790
|
+
function g(y) {
|
|
735
791
|
}
|
|
736
|
-
function
|
|
792
|
+
function M(...y) {
|
|
737
793
|
if (t && t.getPropsConfig)
|
|
738
|
-
return t.getPropsConfig(...
|
|
794
|
+
return t.getPropsConfig(...y);
|
|
739
795
|
}
|
|
740
|
-
return
|
|
741
|
-
canMove:
|
|
742
|
-
canSelectParent:
|
|
743
|
-
canDelete:
|
|
744
|
-
canNested: !
|
|
796
|
+
return n.value = {
|
|
797
|
+
canMove: p(),
|
|
798
|
+
canSelectParent: u(),
|
|
799
|
+
canDelete: s(),
|
|
800
|
+
canNested: !i(),
|
|
745
801
|
contents: e == null ? void 0 : e.schema.contents,
|
|
746
|
-
elementRef:
|
|
747
|
-
parent: (
|
|
802
|
+
elementRef: a,
|
|
803
|
+
parent: (I = e == null ? void 0 : e.parent) == null ? void 0 : I.componentInstance,
|
|
748
804
|
schema: e == null ? void 0 : e.schema,
|
|
749
|
-
styles:
|
|
750
|
-
designerClass:
|
|
751
|
-
canAccepts:
|
|
752
|
-
getBelongedComponentInstance:
|
|
753
|
-
getDraggableDesignItemElement:
|
|
754
|
-
getDraggingDisplayText:
|
|
755
|
-
getPropConfig:
|
|
756
|
-
getDragScopeElement:
|
|
757
|
-
onAcceptMovedChildElement:
|
|
758
|
-
|
|
759
|
-
onChildElementMovedOut: j,
|
|
805
|
+
styles: l,
|
|
806
|
+
designerClass: c,
|
|
807
|
+
canAccepts: m,
|
|
808
|
+
getBelongedComponentInstance: o,
|
|
809
|
+
getDraggableDesignItemElement: d,
|
|
810
|
+
getDraggingDisplayText: C,
|
|
811
|
+
getPropConfig: M,
|
|
812
|
+
getDragScopeElement: v,
|
|
813
|
+
onAcceptMovedChildElement: h,
|
|
814
|
+
onChildElementMovedOut: g,
|
|
760
815
|
addNewChildComponentSchema: b,
|
|
761
|
-
updateDragAndDropRules:
|
|
762
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
763
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
764
|
-
},
|
|
816
|
+
updateDragAndDropRules: r,
|
|
817
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
|
|
818
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
|
|
819
|
+
}, n;
|
|
765
820
|
}
|
|
766
|
-
function
|
|
767
|
-
function
|
|
768
|
-
var
|
|
821
|
+
function qe() {
|
|
822
|
+
function a(e, t) {
|
|
823
|
+
var n;
|
|
769
824
|
if (!e)
|
|
770
825
|
return !1;
|
|
771
|
-
const
|
|
772
|
-
if (!
|
|
826
|
+
const r = ((n = e.targetContainer) == null ? void 0 : n.componentInstance) && e.targetContainer.componentInstance.value;
|
|
827
|
+
if (!r)
|
|
773
828
|
return !1;
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
const o = t.schema.type, a = (o === "response-form" || o === "content-container") && p && p.includes("farris-form");
|
|
777
|
-
if (t.schema.type !== "response-layout-item" && !a)
|
|
778
|
-
return !1;
|
|
779
|
-
}
|
|
780
|
-
return e.controlType !== "field-set";
|
|
829
|
+
const l = r.schema.type, c = t == null ? void 0 : t.formSchemaUtils.getComponentById(r.belongedComponentId);
|
|
830
|
+
return !((e.controlCategory === "input" || e.controlType === "form-group") && ![F["response-layout-item"].type, F["response-form"].type].includes(l) || (e.controlType === F.tabs.type || e.controlType === F.section.type) && ((c == null ? void 0 : c.componentType) !== "frame" || ![F["content-container"].type, F["splitter-pane"].type, F["response-layout-item"].type].includes(l)));
|
|
781
831
|
}
|
|
782
832
|
return {
|
|
783
|
-
basalDragulaRuleForContainer:
|
|
833
|
+
basalDragulaRuleForContainer: a
|
|
784
834
|
};
|
|
785
835
|
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
"f-struct-form": {
|
|
813
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
814
|
-
type: "object",
|
|
815
|
-
properties: {
|
|
816
|
-
contents: {
|
|
817
|
-
type: "object",
|
|
818
|
-
properties: {
|
|
819
|
-
"f-section-form": {
|
|
820
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
821
|
-
type: "object",
|
|
822
|
-
properties: {
|
|
823
|
-
contents: {
|
|
824
|
-
type: "object",
|
|
825
|
-
properties: {
|
|
826
|
-
"f-form-layout": {
|
|
827
|
-
description: "The class of reponse form",
|
|
828
|
-
type: "object",
|
|
829
|
-
properties: {
|
|
830
|
-
rules: {
|
|
831
|
-
type: "object",
|
|
832
|
-
properties: {
|
|
833
|
-
canAccept: {
|
|
834
|
-
type: "boolean",
|
|
835
|
-
const: !0
|
|
836
|
-
},
|
|
837
|
-
fixed: {
|
|
838
|
-
type: "boolean",
|
|
839
|
-
const: !0
|
|
840
|
-
},
|
|
841
|
-
hidePadding: {
|
|
842
|
-
type: "boolean",
|
|
843
|
-
const: !1
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
},
|
|
851
|
-
rules: {
|
|
852
|
-
type: "object",
|
|
853
|
-
properties: {
|
|
854
|
-
canAccept: {
|
|
855
|
-
type: "boolean",
|
|
856
|
-
const: !1
|
|
857
|
-
},
|
|
858
|
-
fixed: {
|
|
859
|
-
type: "boolean",
|
|
860
|
-
const: !0
|
|
861
|
-
},
|
|
862
|
-
hidePadding: {
|
|
863
|
-
type: "boolean",
|
|
864
|
-
const: !0
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
},
|
|
872
|
-
rules: {
|
|
873
|
-
type: "object",
|
|
874
|
-
properties: {
|
|
875
|
-
canAccept: {
|
|
876
|
-
type: "boolean",
|
|
877
|
-
const: !1
|
|
878
|
-
},
|
|
879
|
-
fixed: {
|
|
880
|
-
type: "boolean",
|
|
881
|
-
const: !1
|
|
882
|
-
},
|
|
883
|
-
hidePadding: {
|
|
884
|
-
type: "boolean",
|
|
885
|
-
const: !0
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
},
|
|
891
|
-
"f-struct-wrapper": {
|
|
892
|
-
description: "",
|
|
893
|
-
type: "object",
|
|
894
|
-
properties: {
|
|
895
|
-
contents: {
|
|
896
|
-
type: "object",
|
|
897
|
-
properties: {
|
|
898
|
-
"f-section-tabs": {
|
|
899
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
900
|
-
type: "object",
|
|
901
|
-
properties: {
|
|
902
|
-
contents: {
|
|
903
|
-
type: "object",
|
|
904
|
-
properties: {
|
|
905
|
-
"f-tabs-in-card": {
|
|
906
|
-
description: "The class of tabs which contains sub-grid.",
|
|
907
|
-
type: "object",
|
|
908
|
-
properties: {
|
|
909
|
-
contents: {
|
|
910
|
-
type: "object",
|
|
911
|
-
properties: {
|
|
912
|
-
"f-struct-data-grid-in-card": {
|
|
913
|
-
description: "The class of sub-grid component",
|
|
914
|
-
type: "object",
|
|
915
|
-
properties: {
|
|
916
|
-
contents: {
|
|
917
|
-
type: "object",
|
|
918
|
-
properties: {
|
|
919
|
-
"f-grid-is-sub": {
|
|
920
|
-
description: "The class of sub-grid",
|
|
921
|
-
type: "object",
|
|
922
|
-
properties: {
|
|
923
|
-
rules: {
|
|
924
|
-
type: "object",
|
|
925
|
-
properties: {
|
|
926
|
-
canAccept: {
|
|
927
|
-
type: "boolean",
|
|
928
|
-
const: !0
|
|
929
|
-
},
|
|
930
|
-
fixed: {
|
|
931
|
-
type: "boolean",
|
|
932
|
-
const: !0
|
|
933
|
-
},
|
|
934
|
-
hidePadding: {
|
|
935
|
-
type: "boolean",
|
|
936
|
-
const: !1
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
},
|
|
944
|
-
rules: {
|
|
945
|
-
type: "object",
|
|
946
|
-
properties: {
|
|
947
|
-
canAccept: {
|
|
948
|
-
type: "boolean",
|
|
949
|
-
const: !1
|
|
950
|
-
},
|
|
951
|
-
fixed: {
|
|
952
|
-
type: "boolean",
|
|
953
|
-
const: !1
|
|
954
|
-
},
|
|
955
|
-
hidePadding: {
|
|
956
|
-
type: "boolean",
|
|
957
|
-
const: !0
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
},
|
|
965
|
-
rules: {
|
|
966
|
-
type: "object",
|
|
967
|
-
properties: {
|
|
968
|
-
canAccept: {
|
|
969
|
-
type: "boolean",
|
|
970
|
-
const: !1
|
|
971
|
-
},
|
|
972
|
-
fixed: {
|
|
973
|
-
type: "boolean",
|
|
974
|
-
const: !0
|
|
975
|
-
},
|
|
976
|
-
hidePadding: {
|
|
977
|
-
type: "boolean",
|
|
978
|
-
const: !0
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
rules: {
|
|
987
|
-
type: "object",
|
|
988
|
-
properties: {
|
|
989
|
-
canAccept: {
|
|
990
|
-
type: "boolean",
|
|
991
|
-
const: !1
|
|
992
|
-
},
|
|
993
|
-
fixed: {
|
|
994
|
-
type: "boolean",
|
|
995
|
-
const: !0
|
|
996
|
-
},
|
|
997
|
-
hidePadding: {
|
|
998
|
-
type: "boolean",
|
|
999
|
-
const: !0
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
},
|
|
1005
|
-
"f-section-in-main": {
|
|
1006
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1007
|
-
type: "object",
|
|
1008
|
-
properties: {
|
|
1009
|
-
rules: {
|
|
1010
|
-
type: "object",
|
|
1011
|
-
properties: {
|
|
1012
|
-
canAccept: {
|
|
1013
|
-
type: "boolean",
|
|
1014
|
-
const: !0
|
|
1015
|
-
},
|
|
1016
|
-
fixed: {
|
|
1017
|
-
type: "boolean",
|
|
1018
|
-
const: !0
|
|
1019
|
-
},
|
|
1020
|
-
hidePadding: {
|
|
1021
|
-
type: "boolean",
|
|
1022
|
-
const: !1
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
|
-
rules: {
|
|
1031
|
-
type: "object",
|
|
1032
|
-
properties: {
|
|
1033
|
-
canAccept: {
|
|
1034
|
-
type: "boolean",
|
|
1035
|
-
const: !1
|
|
1036
|
-
},
|
|
1037
|
-
fixed: {
|
|
1038
|
-
type: "boolean",
|
|
1039
|
-
const: !1
|
|
1040
|
-
},
|
|
1041
|
-
hidePadding: {
|
|
1042
|
-
type: "boolean",
|
|
1043
|
-
const: !0
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
},
|
|
1051
|
-
rules: {
|
|
1052
|
-
type: "object",
|
|
1053
|
-
properties: {
|
|
1054
|
-
canAccept: {
|
|
1055
|
-
type: "boolean",
|
|
1056
|
-
const: !0
|
|
1057
|
-
},
|
|
1058
|
-
fixed: {
|
|
1059
|
-
type: "boolean",
|
|
1060
|
-
const: !0
|
|
1061
|
-
},
|
|
1062
|
-
hidePadding: {
|
|
1063
|
-
type: "object",
|
|
1064
|
-
const: {
|
|
1065
|
-
allOf: [
|
|
1066
|
-
{
|
|
1067
|
-
sibling: 0,
|
|
1068
|
-
parent: {
|
|
1069
|
-
"f-page-main": !0
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
]
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
},
|
|
1079
|
-
"f-struct-data-grid": {
|
|
1080
|
-
description: "",
|
|
1081
|
-
type: "object",
|
|
1082
|
-
properties: {
|
|
1083
|
-
rules: {
|
|
1084
|
-
type: "object",
|
|
1085
|
-
properties: {
|
|
1086
|
-
canAccept: {
|
|
1087
|
-
type: "object",
|
|
1088
|
-
const: !0
|
|
1089
|
-
},
|
|
1090
|
-
fixed: {
|
|
1091
|
-
type: "boolean",
|
|
1092
|
-
const: !0
|
|
1093
|
-
},
|
|
1094
|
-
hidePadding: {
|
|
1095
|
-
type: "boolean",
|
|
1096
|
-
const: !0
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
},
|
|
1102
|
-
"f-page-main-content": {
|
|
1103
|
-
description: "",
|
|
1104
|
-
type: "object",
|
|
1105
|
-
properties: {
|
|
1106
|
-
contents: {
|
|
1107
|
-
type: "object",
|
|
1108
|
-
properties: {
|
|
1109
|
-
"f-page-content-nav": {
|
|
1110
|
-
description: "",
|
|
1111
|
-
type: "object",
|
|
1112
|
-
properties: {
|
|
1113
|
-
contents: {
|
|
1114
|
-
type: "object",
|
|
1115
|
-
properties: {
|
|
1116
|
-
"f-struct-data-grid-in-nav": {
|
|
1117
|
-
description: "",
|
|
1118
|
-
type: "object",
|
|
1119
|
-
properties: {
|
|
1120
|
-
contents: {
|
|
1121
|
-
type: "object",
|
|
1122
|
-
properties: {
|
|
1123
|
-
"f-page-content-nav-extend": {
|
|
1124
|
-
description: "",
|
|
1125
|
-
type: "object"
|
|
1126
|
-
},
|
|
1127
|
-
"f-section-in-nav": {
|
|
1128
|
-
description: "",
|
|
1129
|
-
type: "object",
|
|
1130
|
-
properties: {
|
|
1131
|
-
rules: {
|
|
1132
|
-
type: "object",
|
|
1133
|
-
properties: {
|
|
1134
|
-
canAccept: {
|
|
1135
|
-
type: "boolean",
|
|
1136
|
-
const: !1
|
|
1137
|
-
},
|
|
1138
|
-
fixed: {
|
|
1139
|
-
type: "boolean",
|
|
1140
|
-
const: !0
|
|
1141
|
-
},
|
|
1142
|
-
hidePadding: {
|
|
1143
|
-
type: "boolean",
|
|
1144
|
-
const: !1
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
rules: {
|
|
1153
|
-
type: "object",
|
|
1154
|
-
properties: {
|
|
1155
|
-
canAccept: {
|
|
1156
|
-
type: "boolean",
|
|
1157
|
-
const: !0
|
|
1158
|
-
},
|
|
1159
|
-
fixed: {
|
|
1160
|
-
type: "boolean",
|
|
1161
|
-
const: !1
|
|
1162
|
-
},
|
|
1163
|
-
hidePadding: {
|
|
1164
|
-
type: "boolean",
|
|
1165
|
-
const: !0
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
},
|
|
1175
|
-
"f-page-content-main": {
|
|
1176
|
-
description: "",
|
|
1177
|
-
type: "object",
|
|
1178
|
-
properties: {}
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
},
|
|
1184
|
-
"f-page-content": {
|
|
1185
|
-
description: "",
|
|
1186
|
-
type: "object",
|
|
1187
|
-
properties: {
|
|
1188
|
-
contents: {
|
|
1189
|
-
type: "object",
|
|
1190
|
-
properties: {
|
|
1191
|
-
"f-page-content-nav": {
|
|
1192
|
-
description: "",
|
|
1193
|
-
type: "object",
|
|
1194
|
-
properties: {
|
|
1195
|
-
contents: {
|
|
1196
|
-
type: "object",
|
|
1197
|
-
properties: {
|
|
1198
|
-
"f-list-nav": {
|
|
1199
|
-
description: "",
|
|
1200
|
-
type: "object"
|
|
1201
|
-
},
|
|
1202
|
-
"f-list-nav-left": {
|
|
1203
|
-
description: "",
|
|
1204
|
-
type: "object"
|
|
1205
|
-
},
|
|
1206
|
-
"f-struct-data-grid-in-nav": {
|
|
1207
|
-
description: "",
|
|
1208
|
-
type: "object",
|
|
1209
|
-
properties: {
|
|
1210
|
-
contents: {
|
|
1211
|
-
type: "object",
|
|
1212
|
-
properties: {
|
|
1213
|
-
"f-section-form": {
|
|
1214
|
-
description: "",
|
|
1215
|
-
type: "object",
|
|
1216
|
-
properties: {
|
|
1217
|
-
rules: {
|
|
1218
|
-
type: "object",
|
|
1219
|
-
properties: {
|
|
1220
|
-
canAccept: {
|
|
1221
|
-
type: "boolean",
|
|
1222
|
-
const: !1
|
|
1223
|
-
},
|
|
1224
|
-
fixed: {
|
|
1225
|
-
type: "boolean",
|
|
1226
|
-
const: !0
|
|
1227
|
-
},
|
|
1228
|
-
hidePadding: {
|
|
1229
|
-
type: "boolean",
|
|
1230
|
-
const: !0
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
},
|
|
1236
|
-
"f-section-grid": {
|
|
1237
|
-
description: "",
|
|
1238
|
-
type: "object",
|
|
1239
|
-
properties: {
|
|
1240
|
-
rules: {
|
|
1241
|
-
type: "object",
|
|
1242
|
-
properties: {
|
|
1243
|
-
canAccept: {
|
|
1244
|
-
type: "boolean",
|
|
1245
|
-
const: !1
|
|
1246
|
-
},
|
|
1247
|
-
fixed: {
|
|
1248
|
-
type: "boolean",
|
|
1249
|
-
const: !0
|
|
1250
|
-
},
|
|
1251
|
-
hidePadding: {
|
|
1252
|
-
type: "boolean",
|
|
1253
|
-
const: !0
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
},
|
|
1261
|
-
rules: {
|
|
1262
|
-
type: "object",
|
|
1263
|
-
properties: {
|
|
1264
|
-
canAccept: {
|
|
1265
|
-
type: "boolean",
|
|
1266
|
-
const: !1
|
|
1267
|
-
},
|
|
1268
|
-
fixed: {
|
|
1269
|
-
type: "boolean",
|
|
1270
|
-
const: !0
|
|
1271
|
-
},
|
|
1272
|
-
hidePadding: {
|
|
1273
|
-
type: "boolean",
|
|
1274
|
-
const: !0
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
},
|
|
1283
|
-
rules: {
|
|
1284
|
-
type: "object",
|
|
1285
|
-
properties: {
|
|
1286
|
-
canAccept: {
|
|
1287
|
-
type: "boolean",
|
|
1288
|
-
const: !1
|
|
1289
|
-
},
|
|
1290
|
-
fixed: {
|
|
1291
|
-
type: "boolean",
|
|
1292
|
-
const: !0
|
|
1293
|
-
},
|
|
1294
|
-
hidePadding: {
|
|
1295
|
-
type: "boolean",
|
|
1296
|
-
const: !0
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
"f-page-content-main": {
|
|
1302
|
-
description: "",
|
|
1303
|
-
type: "object",
|
|
1304
|
-
properties: {
|
|
1305
|
-
rules: {
|
|
1306
|
-
type: "object",
|
|
1307
|
-
properties: {
|
|
1308
|
-
canAccept: {
|
|
1309
|
-
type: "boolean",
|
|
1310
|
-
const: !1
|
|
1311
|
-
},
|
|
1312
|
-
fixed: {
|
|
1313
|
-
type: "boolean",
|
|
1314
|
-
const: !1
|
|
1315
|
-
},
|
|
1316
|
-
hidePadding: {
|
|
1317
|
-
type: "boolean",
|
|
1318
|
-
const: !0
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
},
|
|
1326
|
-
rules: {
|
|
1327
|
-
type: "object",
|
|
1328
|
-
properties: {
|
|
1329
|
-
canAccept: {
|
|
1330
|
-
type: "boolean",
|
|
1331
|
-
const: !1
|
|
1332
|
-
},
|
|
1333
|
-
fixed: {
|
|
1334
|
-
type: "boolean",
|
|
1335
|
-
const: !0
|
|
1336
|
-
},
|
|
1337
|
-
hidePadding: {
|
|
1338
|
-
type: "boolean",
|
|
1339
|
-
const: !0
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
},
|
|
1347
|
-
rules: {
|
|
1348
|
-
type: "object",
|
|
1349
|
-
properties: {
|
|
1350
|
-
canAccept: {
|
|
1351
|
-
type: "object",
|
|
1352
|
-
const: {
|
|
1353
|
-
anyOf: [
|
|
1354
|
-
{
|
|
1355
|
-
children: 0
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
children: {
|
|
1359
|
-
length: {
|
|
1360
|
-
not: 1
|
|
1361
|
-
},
|
|
1362
|
-
"f-struct-like-card": !0
|
|
1363
|
-
}
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
children: {
|
|
1367
|
-
"scroll-spy": !1,
|
|
1368
|
-
"f-page-content": !1,
|
|
1369
|
-
"f-struct-like-card": !1
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
]
|
|
1373
|
-
}
|
|
1374
|
-
},
|
|
1375
|
-
fixed: {
|
|
1376
|
-
type: "boolean",
|
|
1377
|
-
const: !0
|
|
1378
|
-
},
|
|
1379
|
-
hidePadding: {
|
|
1380
|
-
type: "boolean",
|
|
1381
|
-
const: !0
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
},
|
|
1387
|
-
"f-page-footer": {
|
|
1388
|
-
description: "The class of page footer designed by farris.",
|
|
1389
|
-
type: "string"
|
|
836
|
+
class xe {
|
|
837
|
+
getTemplateRule(e, t) {
|
|
838
|
+
const r = t == null ? void 0 : t.formSchemaUtils, l = r == null ? void 0 : r.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
839
|
+
if (!l)
|
|
840
|
+
return c;
|
|
841
|
+
const n = this.getComponentContext(e);
|
|
842
|
+
return n.componentClassList.forEach((u) => {
|
|
843
|
+
if (!u || !l[u])
|
|
844
|
+
return;
|
|
845
|
+
const { canMove: s, canDelete: i, canAccept: o } = l[u];
|
|
846
|
+
c.canMove = c.canMove && this.resolveRuleValue(s, n), c.canDelete = c.canDelete && this.resolveRuleValue(i, n), c.canAccept = c.canAccept && this.resolveRuleValue(o, n);
|
|
847
|
+
}), c;
|
|
848
|
+
}
|
|
849
|
+
resolveRuleValue(e, t) {
|
|
850
|
+
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
|
|
851
|
+
}
|
|
852
|
+
parseRuleValueSchema(e, t) {
|
|
853
|
+
const r = e.invalidContext || [];
|
|
854
|
+
let l = !0;
|
|
855
|
+
for (const c of r) {
|
|
856
|
+
if (c.firstLevelChild) {
|
|
857
|
+
if (c.firstLevelChild.class) {
|
|
858
|
+
const n = t.firstLevelChildClassList;
|
|
859
|
+
if (n && !n.includes(c.firstLevelChild.class)) {
|
|
860
|
+
l = !1;
|
|
861
|
+
continue;
|
|
1390
862
|
}
|
|
1391
863
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
type: "boolean",
|
|
1398
|
-
const: !1
|
|
1399
|
-
},
|
|
1400
|
-
fixed: {
|
|
1401
|
-
type: "boolean",
|
|
1402
|
-
const: !0
|
|
1403
|
-
},
|
|
1404
|
-
hidePadding: {
|
|
1405
|
-
type: "boolean",
|
|
1406
|
-
const: !0
|
|
864
|
+
if (c.firstLevelChild.type) {
|
|
865
|
+
const n = t.firstLevelChildSchema;
|
|
866
|
+
if (n && n.type !== c.firstLevelChild.type) {
|
|
867
|
+
l = !1;
|
|
868
|
+
continue;
|
|
1407
869
|
}
|
|
1408
870
|
}
|
|
1409
871
|
}
|
|
872
|
+
if (c.secondLevelChild) {
|
|
873
|
+
if (c.secondLevelChild.class) {
|
|
874
|
+
const n = t.secondLevelChildClassList;
|
|
875
|
+
if (n && !n.includes(c.secondLevelChild.class)) {
|
|
876
|
+
l = !1;
|
|
877
|
+
continue;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if (c.secondLevelChild.type) {
|
|
881
|
+
const n = t.secondLevelChildSchema;
|
|
882
|
+
if (n && n.type !== c.secondLevelChild.type) {
|
|
883
|
+
l = !1;
|
|
884
|
+
continue;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
if (c.parent) {
|
|
889
|
+
if (c.parent.class) {
|
|
890
|
+
const n = t.parentClassList;
|
|
891
|
+
if (n && !n.includes(c.parent.class)) {
|
|
892
|
+
l = !1;
|
|
893
|
+
continue;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
if (c.parent.type) {
|
|
897
|
+
const n = t.parentSchema;
|
|
898
|
+
if (n && n.type !== c.parent.type) {
|
|
899
|
+
l = !1;
|
|
900
|
+
continue;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
l = !0;
|
|
905
|
+
break;
|
|
1410
906
|
}
|
|
1411
|
-
|
|
1412
|
-
"f-page-is-managelist": {
|
|
1413
|
-
description: "The root class of mangement list page.",
|
|
1414
|
-
type: "string"
|
|
1415
|
-
},
|
|
1416
|
-
"f-page-card": {
|
|
1417
|
-
description: "",
|
|
1418
|
-
type: "object"
|
|
1419
|
-
},
|
|
1420
|
-
"f-page-is-mainsubcard": {
|
|
1421
|
-
description: "",
|
|
1422
|
-
type: "object"
|
|
1423
|
-
}
|
|
1424
|
-
}, Re = {
|
|
1425
|
-
$schema: Xe,
|
|
1426
|
-
$id: He,
|
|
1427
|
-
title: Je,
|
|
1428
|
-
description: Qe,
|
|
1429
|
-
type: Ye,
|
|
1430
|
-
properties: Ze
|
|
1431
|
-
}, Q = /* @__PURE__ */ new Map();
|
|
1432
|
-
function Ke() {
|
|
1433
|
-
function n(l, i, u, b) {
|
|
1434
|
-
var w;
|
|
1435
|
-
if (typeof u == "number")
|
|
1436
|
-
return ((w = b[l]) == null ? void 0 : w.length) === u;
|
|
1437
|
-
if (typeof u == "object") {
|
|
1438
|
-
const j = Object.keys(u)[0], N = u[j];
|
|
1439
|
-
if (j === "not")
|
|
1440
|
-
return Number(b[l].length) !== Number(N);
|
|
1441
|
-
if (j === "moreThan")
|
|
1442
|
-
return Number(b[l].length) >= Number(N);
|
|
1443
|
-
if (j === "lessThan")
|
|
1444
|
-
return Number(b[l].length) <= Number(N);
|
|
1445
|
-
}
|
|
1446
|
-
return !1;
|
|
1447
|
-
}
|
|
1448
|
-
function e(l, i, u, b) {
|
|
1449
|
-
return typeof u == "boolean" ? b.childrenClassList.includes(i) === !!u : !1;
|
|
1450
|
-
}
|
|
1451
|
-
function t(l, i, u, b) {
|
|
1452
|
-
return typeof u == "boolean" ? b.parentClassList.includes(i) === !!u : !1;
|
|
907
|
+
return !l;
|
|
1453
908
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
}
|
|
909
|
+
getComponentContext(e) {
|
|
910
|
+
var v, h, b, g;
|
|
911
|
+
const t = e.schema, r = t.appearance && t.appearance.class || "", l = r.split(" ") || [], c = t.contents || [], n = c.length ? c[0] : null, p = n && n.appearance ? n.appearance.class : "", u = p ? p.split(" ") : [], s = (v = n == null ? void 0 : n.contents) != null && v.length ? n == null ? void 0 : n.contents[0] : null, i = s && s.appearance ? s.appearance.class : "", o = i ? i.split(" ") : [], d = t.type === "component" ? (b = (h = e.parent) == null ? void 0 : h.parent) == null ? void 0 : b.schema : (g = e.parent) == null ? void 0 : g.schema, m = d && d.appearance && d.appearance.class || "", C = m ? m.split(" ") : [];
|
|
912
|
+
return {
|
|
913
|
+
componentClass: r,
|
|
914
|
+
componentClassList: l,
|
|
915
|
+
childContents: c,
|
|
916
|
+
firstLevelChildSchema: n,
|
|
917
|
+
firstLevelChildClass: p,
|
|
918
|
+
firstLevelChildClassList: u,
|
|
919
|
+
secondLevelChildSchema: s,
|
|
920
|
+
secondLevelChildClass: i,
|
|
921
|
+
secondLevelChildClassList: o,
|
|
922
|
+
parentSchema: d,
|
|
923
|
+
parentClass: m,
|
|
924
|
+
parentClassList: C
|
|
925
|
+
};
|
|
1471
926
|
}
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
927
|
+
}
|
|
928
|
+
class Xe {
|
|
929
|
+
constructor(e, t) {
|
|
930
|
+
P(this, "componentId");
|
|
931
|
+
P(this, "viewModelId");
|
|
932
|
+
P(this, "eventsEditorUtils");
|
|
933
|
+
P(this, "formSchemaUtils");
|
|
934
|
+
P(this, "formMetadataConverter");
|
|
935
|
+
P(this, "designViewModelUtils");
|
|
936
|
+
P(this, "designViewModelField");
|
|
937
|
+
P(this, "controlCreatorUtils");
|
|
938
|
+
P(this, "designerHostService");
|
|
939
|
+
P(this, "schemaService", null);
|
|
940
|
+
P(this, "metadataService", null);
|
|
941
|
+
P(this, "propertyConfig", {
|
|
942
|
+
type: "object",
|
|
943
|
+
categories: {}
|
|
944
|
+
});
|
|
945
|
+
var r;
|
|
946
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
947
|
+
}
|
|
948
|
+
getTableInfo() {
|
|
949
|
+
var e;
|
|
950
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
951
|
+
}
|
|
952
|
+
setDesignViewModelField(e) {
|
|
953
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
954
|
+
if (t) {
|
|
955
|
+
if (!this.designViewModelField) {
|
|
956
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
957
|
+
this.designViewModelField = r.fields.find((l) => l.id === t);
|
|
958
|
+
}
|
|
959
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
1476
960
|
}
|
|
1477
|
-
return !1;
|
|
1478
961
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
962
|
+
changeFieldEditorType(e, t) {
|
|
963
|
+
}
|
|
964
|
+
getBasicPropConfig(e) {
|
|
965
|
+
return {
|
|
966
|
+
description: "Basic Information",
|
|
967
|
+
title: "基本信息",
|
|
968
|
+
properties: {
|
|
969
|
+
id: {
|
|
970
|
+
description: "组件标识",
|
|
971
|
+
title: "标识",
|
|
972
|
+
type: "string",
|
|
973
|
+
readonly: !0
|
|
974
|
+
},
|
|
975
|
+
type: {
|
|
976
|
+
description: "组件类型",
|
|
977
|
+
title: "控件类型",
|
|
978
|
+
type: "select",
|
|
979
|
+
editor: {
|
|
980
|
+
type: "combo-list",
|
|
981
|
+
textField: "name",
|
|
982
|
+
valueField: "value",
|
|
983
|
+
data: [{ value: e.type, name: F[e.type].name }]
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
1500
987
|
};
|
|
1501
988
|
}
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
989
|
+
getAppearanceConfig(e = null) {
|
|
990
|
+
return {
|
|
991
|
+
title: "样式",
|
|
992
|
+
description: "Appearance",
|
|
993
|
+
properties: {
|
|
994
|
+
class: {
|
|
995
|
+
title: "class样式",
|
|
996
|
+
type: "string",
|
|
997
|
+
description: "组件的CSS样式",
|
|
998
|
+
$converter: "/converter/appearance.converter"
|
|
999
|
+
},
|
|
1000
|
+
style: {
|
|
1001
|
+
title: "style样式",
|
|
1002
|
+
type: "string",
|
|
1003
|
+
description: "组件的样式",
|
|
1004
|
+
$converter: "/converter/appearance.converter"
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1509
1008
|
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1009
|
+
/**
|
|
1010
|
+
*
|
|
1011
|
+
* @param propertyId
|
|
1012
|
+
* @param componentInstance
|
|
1013
|
+
* @returns
|
|
1014
|
+
*/
|
|
1015
|
+
updateElementByParentContainer(e, t) {
|
|
1016
|
+
const r = t && t.parent && t.parent.schema;
|
|
1017
|
+
if (!r)
|
|
1018
|
+
return;
|
|
1019
|
+
const l = r.contents.findIndex((n) => n.id === e), c = K(r.contents[l]);
|
|
1020
|
+
r.contents.splice(l, 1), r.contents.splice(l, 0, c);
|
|
1515
1021
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1022
|
+
}
|
|
1023
|
+
class _e {
|
|
1024
|
+
constructor() {
|
|
1025
|
+
/** 控件标题 */
|
|
1026
|
+
P(this, "label", "");
|
|
1027
|
+
/** 控件id */
|
|
1028
|
+
P(this, "id", "");
|
|
1029
|
+
/** 每个控件占用的栅格数 */
|
|
1030
|
+
P(this, "columnInSM", 12);
|
|
1031
|
+
P(this, "columnInMD", 6);
|
|
1032
|
+
P(this, "columnInLG", 3);
|
|
1033
|
+
P(this, "columnInEL", 2);
|
|
1034
|
+
/** 每个控件占用的列数 */
|
|
1035
|
+
P(this, "displayWidthInSM", 1);
|
|
1036
|
+
P(this, "displayWidthInMD", 1);
|
|
1037
|
+
P(this, "displayWidthInLG", 1);
|
|
1038
|
+
P(this, "displayWidthInEL", 1);
|
|
1039
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1040
|
+
P(this, "displayColumnCountAtBreakPoint", "md");
|
|
1041
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1042
|
+
P(this, "tagRow", 0);
|
|
1043
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1044
|
+
P(this, "showTopBorder", 0);
|
|
1045
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1046
|
+
P(this, "group", 1);
|
|
1047
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1048
|
+
P(this, "isSupportedClass", !0);
|
|
1049
|
+
/** 控件所在分组id(设计器用的) */
|
|
1050
|
+
P(this, "fieldSetId", "");
|
|
1519
1051
|
}
|
|
1520
|
-
return m(), { getRuleValue: C };
|
|
1521
1052
|
}
|
|
1522
|
-
function
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1053
|
+
function Je(a) {
|
|
1054
|
+
let e, t;
|
|
1055
|
+
const r = /* @__PURE__ */ new Map();
|
|
1056
|
+
let l = [];
|
|
1057
|
+
function c(i, o) {
|
|
1058
|
+
const m = i.split(" ").filter((g) => g.startsWith("col-"));
|
|
1059
|
+
if (m.length === 0) {
|
|
1060
|
+
o.isSupportedClass = !1;
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
let C = m.find((g) => /^col-([1-9]|10|11|12)$/.test(g)), v = m.find((g) => /^col-md-([1-9]|10|11|12)$/.test(g)), h = m.find((g) => /^col-xl-([1-9]|10|11|12)$/.test(g)), b = m.find((g) => /^col-el-([1-9]|10|11|12)$/.test(g));
|
|
1064
|
+
C = C || "col-12", o.columnInSM = parseInt(C.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), v = v || "col-md-" + o.columnInSM, o.columnInMD = parseInt(v.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), h = h || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(h.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
1065
|
+
}
|
|
1066
|
+
function n(i, o, d, m = !1) {
|
|
1067
|
+
let C = !1;
|
|
1068
|
+
i.contents.forEach((v) => {
|
|
1069
|
+
if (v.type === "fieldset") {
|
|
1070
|
+
d += 1, n(v, o, d, !0), C = !0;
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
C && (d += 1, C = !1);
|
|
1074
|
+
const h = v.appearance && v.appearance.class, b = new _e();
|
|
1075
|
+
h ? c(h, b) : b.isSupportedClass = !1, b.label = v.label || v.id, b.id = v.id, b.group = d, m && (b.fieldSetId = i.id), t === v.id && (e = d), r.set(v.id, v), o.push(b);
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
function p(i) {
|
|
1079
|
+
const o = a.getComponentById(i);
|
|
1080
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1081
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1082
|
+
const d = a.selectNode(o, (m) => m.type === x["response-form"].type);
|
|
1083
|
+
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
1084
|
+
}
|
|
1085
|
+
function u(i, o) {
|
|
1086
|
+
o = o || i.id;
|
|
1087
|
+
const { result: d, message: m, formNode: C } = p(o);
|
|
1088
|
+
if (!d)
|
|
1089
|
+
return { result: d, message: m };
|
|
1090
|
+
t = i.id, l = [], r.clear();
|
|
1091
|
+
const v = C.contents[0].type === x.fieldset.type ? 0 : 1;
|
|
1092
|
+
n(C, l, v);
|
|
1093
|
+
const h = l.find((g) => !g.isSupportedClass);
|
|
1094
|
+
return {
|
|
1095
|
+
defaultState: {
|
|
1096
|
+
defaultGroupNumber: e || 1,
|
|
1097
|
+
model: h ? "customize" : "standard"
|
|
1098
|
+
},
|
|
1099
|
+
importData: l
|
|
1100
|
+
};
|
|
1527
1101
|
}
|
|
1528
|
-
function
|
|
1529
|
-
|
|
1530
|
-
|
|
1102
|
+
function s(i, o) {
|
|
1103
|
+
o = o;
|
|
1104
|
+
const { result: d, formNode: m } = p(o);
|
|
1105
|
+
if (!d)
|
|
1106
|
+
return "";
|
|
1107
|
+
const C = [];
|
|
1108
|
+
return i.forEach((v) => {
|
|
1109
|
+
var g;
|
|
1110
|
+
const h = r.get(v.id), b = h.appearance && h.appearance.class;
|
|
1111
|
+
if (b) {
|
|
1112
|
+
const I = b.split(" ").filter((E) => !E.startsWith("col-")), y = "col-" + v.columnInSM, L = "col-md-" + v.columnInMD, T = "col-xl-" + v.columnInLG, k = "col-el-" + v.columnInEL, D = [y, L, T, k].concat(I);
|
|
1113
|
+
h.appearance.class = D.join(" ");
|
|
1114
|
+
}
|
|
1115
|
+
if (v.fieldSetId) {
|
|
1116
|
+
const M = m.contents.find((y) => y.id === v.fieldSetId), I = C.find((y) => y.id === v.fieldSetId);
|
|
1117
|
+
I ? (g = I.contents) == null || g.push(h) : (C.push(M), M.contents = [h]);
|
|
1118
|
+
} else
|
|
1119
|
+
C.push(h);
|
|
1120
|
+
}), m.contents = C, m.id;
|
|
1531
1121
|
}
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1122
|
+
return {
|
|
1123
|
+
checkCanFindFormNode: p,
|
|
1124
|
+
checkCanOpenLayoutEditor: u,
|
|
1125
|
+
changeFormControlsByResponseLayoutConfig: s,
|
|
1126
|
+
getResonseFormLayoutConfig: n
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
function Qe(a, e) {
|
|
1130
|
+
function t(u, s = null) {
|
|
1131
|
+
if (s) return s;
|
|
1132
|
+
const i = a.getComponentById(e);
|
|
1133
|
+
return a.selectNode(i, (o) => o.id === u);
|
|
1134
|
+
}
|
|
1135
|
+
function r(u) {
|
|
1136
|
+
const s = a.getComponentById(u);
|
|
1137
|
+
return !(!s || !s.componentType || !s.componentType.startsWith("form"));
|
|
1138
|
+
}
|
|
1139
|
+
function l(u) {
|
|
1140
|
+
const s = t(u.id), i = Je(a), o = [];
|
|
1141
|
+
i.getResonseFormLayoutConfig(s, o, 1);
|
|
1142
|
+
const d = o.map((I) => I.columnInSM), m = o.map((I) => I.columnInMD), C = o.map((I) => I.columnInLG), v = o.map((I) => I.columnInEL), h = c(d) ? d[0] : 0, b = c(m) ? m[0] : 0, g = c(C) ? C[0] : 0, M = c(v) ? v[0] : 0;
|
|
1536
1143
|
return {
|
|
1537
|
-
uniqueColClassInSM:
|
|
1144
|
+
uniqueColClassInSM: h,
|
|
1538
1145
|
uniqueColClassInMD: b,
|
|
1539
|
-
uniqueColClassInLG:
|
|
1540
|
-
uniqueColClassInEL:
|
|
1146
|
+
uniqueColClassInLG: g,
|
|
1147
|
+
uniqueColClassInEL: M
|
|
1541
1148
|
};
|
|
1542
1149
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const
|
|
1545
|
-
return Array.from(
|
|
1150
|
+
function c(u) {
|
|
1151
|
+
const s = new Set(u);
|
|
1152
|
+
return Array.from(s).length === 1;
|
|
1546
1153
|
}
|
|
1547
|
-
function
|
|
1548
|
-
|
|
1549
|
-
if (
|
|
1550
|
-
o
|
|
1154
|
+
function n(u, s, i) {
|
|
1155
|
+
u = t(i, u), u.contents.forEach((o) => {
|
|
1156
|
+
if (o.type === x.fieldset.type) {
|
|
1157
|
+
n(o, s, o.id);
|
|
1551
1158
|
return;
|
|
1552
1159
|
}
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1160
|
+
o.appearance || (o.appearance = {});
|
|
1161
|
+
const d = o.appearance.class;
|
|
1162
|
+
o.appearance.class = p(d, s);
|
|
1556
1163
|
});
|
|
1557
1164
|
}
|
|
1558
|
-
function
|
|
1559
|
-
let
|
|
1560
|
-
if (
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1165
|
+
function p(u, s) {
|
|
1166
|
+
let i, o, d, m, C = [];
|
|
1167
|
+
if (u) {
|
|
1168
|
+
const I = u.split(" "), y = I.filter((L) => L.startsWith("col-"));
|
|
1169
|
+
i = y.find((L) => /^col-([1-9]|10|11|12)$/.test(L)), o = y.find((L) => /^col-md-([1-9]|10|11|12)$/.test(L)), d = y.find((L) => /^col-xl-([1-9]|10|11|12)$/.test(L)), m = y.find((L) => /^col-el-([1-9]|10|11|12)$/.test(L)), C = I.filter((L) => !L.startsWith("col-"));
|
|
1563
1170
|
}
|
|
1564
|
-
const
|
|
1565
|
-
return [
|
|
1171
|
+
const v = s.uniqueColClassInSM ? "col-" + s.uniqueColClassInSM : i, h = s.uniqueColClassInMD ? "col-md-" + s.uniqueColClassInMD : o, b = s.uniqueColClassInLG ? "col-xl-" + s.uniqueColClassInLG : d, g = s.uniqueColClassInEL ? "col-el-" + s.uniqueColClassInEL : m;
|
|
1172
|
+
return [v, h, b, g].concat(C).join(" ");
|
|
1566
1173
|
}
|
|
1567
|
-
return { checkIsInFormComponent:
|
|
1174
|
+
return { checkIsInFormComponent: r, assembleUnifiedLayoutContext: l, changeFormControlsByUnifiedLayoutConfig: n };
|
|
1568
1175
|
}
|
|
1569
|
-
class
|
|
1176
|
+
class Ye extends Xe {
|
|
1570
1177
|
constructor(e, t) {
|
|
1571
1178
|
super(e, t);
|
|
1572
1179
|
}
|
|
1573
1180
|
getPropertyConfig(e, t) {
|
|
1574
|
-
var
|
|
1181
|
+
var r = this;
|
|
1575
1182
|
this.propertyConfig.categories.basic = this.getBasicPropConfig(e);
|
|
1576
|
-
const { checkIsInFormComponent:
|
|
1577
|
-
return
|
|
1183
|
+
const { checkIsInFormComponent: l, assembleUnifiedLayoutContext: c, changeFormControlsByUnifiedLayoutConfig: n } = Qe(this.formSchemaUtils, this.componentId), p = this.getAppearanceConfig(e);
|
|
1184
|
+
return p.properties.unifiedLayout = {
|
|
1578
1185
|
title: "统一布局配置",
|
|
1579
1186
|
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
1580
|
-
visible:
|
|
1187
|
+
visible: l(this.componentId),
|
|
1581
1188
|
refreshPanelAfterChanged: !0,
|
|
1582
1189
|
editor: {
|
|
1583
1190
|
type: "response-form-layout-setting",
|
|
1584
|
-
initialState:
|
|
1191
|
+
initialState: c(e)
|
|
1585
1192
|
}
|
|
1586
|
-
},
|
|
1587
|
-
if (
|
|
1588
|
-
switch (
|
|
1193
|
+
}, p.setPropertyRelates = function(u, s) {
|
|
1194
|
+
if (u)
|
|
1195
|
+
switch (u && u.propertyID) {
|
|
1589
1196
|
case "unifiedLayout": {
|
|
1590
|
-
|
|
1197
|
+
n(null, u.propertyValue, e.id), r.updateElementByParentContainer(e.id, t);
|
|
1591
1198
|
break;
|
|
1592
1199
|
}
|
|
1593
1200
|
}
|
|
1594
|
-
}, this.propertyConfig.categories.appearance =
|
|
1201
|
+
}, this.propertyConfig.categories.appearance = p, this.propertyConfig;
|
|
1595
1202
|
}
|
|
1596
1203
|
}
|
|
1597
|
-
function
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
return r && r.componentClassList && r.componentClassList.includes("f-form-layout") && r.componentClassList.includes("farris-form") ? h.sourceType === "control" && h.controlCategory === "input" || h.sourceType === "move" && h.controlType === "form-group" : !0;
|
|
1204
|
+
function Ze(a, e) {
|
|
1205
|
+
const t = a.schema, r = new xe(), { canMove: l, canAccept: c, canDelete: n } = r.getTemplateRule(a, e);
|
|
1206
|
+
function p(g) {
|
|
1207
|
+
const M = r.getComponentContext(a);
|
|
1208
|
+
return M && M.componentClassList && M.componentClassList.includes("f-form-layout") && M.componentClassList.includes("farris-form") ? g.sourceType === "control" && g.controlCategory === "input" || g.sourceType === "move" && g.controlType === "form-group" : !0;
|
|
1603
1209
|
}
|
|
1604
|
-
function
|
|
1605
|
-
return !(!
|
|
1210
|
+
function u(g) {
|
|
1211
|
+
return !(!qe().basalDragulaRuleForContainer(g, e) || !c || !p(g));
|
|
1606
1212
|
}
|
|
1607
|
-
function
|
|
1608
|
-
|
|
1609
|
-
const h = t, A = h.appearance && h.appearance.class || "", T = A.split(" "), M = h.contents || [], D = M.length ? M[0] : null, F = D && D.appearance ? D.appearance.class : "", x = F ? F.split(" ") : [], I = M.length ? M.reduce((G, J) => {
|
|
1610
|
-
const R = J && J.appearance ? J.appearance.class : "", ue = R ? R.split(" ") : [];
|
|
1611
|
-
return G.push(...ue), G;
|
|
1612
|
-
}, []) : [], $ = p, V = $ && $.appearance && $.appearance.class || "", E = V ? V.split(" ") : [];
|
|
1613
|
-
r = {
|
|
1614
|
-
componentClass: A,
|
|
1615
|
-
componentClassList: T,
|
|
1616
|
-
childContents: M,
|
|
1617
|
-
firstChildContent: D,
|
|
1618
|
-
firstChildClass: F,
|
|
1619
|
-
firstChildClassList: x,
|
|
1620
|
-
parent: $,
|
|
1621
|
-
parentClass: V,
|
|
1622
|
-
parentClassList: E,
|
|
1623
|
-
children: M,
|
|
1624
|
-
childrenClassList: I
|
|
1625
|
-
};
|
|
1626
|
-
const { canAccept: X, fixed: H, hidePadding: z } = c.getRuleValue(T[0], r);
|
|
1627
|
-
return a = X, s = z, g = H, !0;
|
|
1628
|
-
}
|
|
1629
|
-
function l(h) {
|
|
1630
|
-
de();
|
|
1213
|
+
function s(g) {
|
|
1214
|
+
ve();
|
|
1631
1215
|
}
|
|
1632
1216
|
function i() {
|
|
1633
1217
|
return t.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
1634
1218
|
}
|
|
1635
|
-
function
|
|
1636
|
-
const
|
|
1637
|
-
if ((
|
|
1638
|
-
const { label:
|
|
1639
|
-
return
|
|
1219
|
+
function o(g, M) {
|
|
1220
|
+
const I = t;
|
|
1221
|
+
if ((I.appearance && I.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1222
|
+
const { label: T } = g, k = _("form-group");
|
|
1223
|
+
return k.editor = M, k.label = T, d(k), delete k.editor.id, delete k.editor.binding, delete k.editor.appearance, delete k.editor.visible, k;
|
|
1640
1224
|
}
|
|
1641
|
-
return
|
|
1642
|
-
}
|
|
1643
|
-
function
|
|
1644
|
-
const
|
|
1645
|
-
if (
|
|
1646
|
-
const
|
|
1647
|
-
let
|
|
1648
|
-
|
|
1225
|
+
return M;
|
|
1226
|
+
}
|
|
1227
|
+
function d(g) {
|
|
1228
|
+
const M = a.componentInstance.value.getBelongedComponentInstance(a.componentInstance);
|
|
1229
|
+
if (M && M.schema && M.schema.componentType) {
|
|
1230
|
+
const I = M.schema.formColumns;
|
|
1231
|
+
let y = m(I);
|
|
1232
|
+
y = e == null ? void 0 : e.formSchemaUtils.getControlClassByFormUnifiedLayout(y, "", a.schema), g.appearance || (g.appearance = {}), g.appearance.class = y;
|
|
1649
1233
|
}
|
|
1650
1234
|
}
|
|
1651
|
-
function
|
|
1652
|
-
let
|
|
1653
|
-
switch (
|
|
1235
|
+
function m(g) {
|
|
1236
|
+
let M = "";
|
|
1237
|
+
switch (g) {
|
|
1654
1238
|
case 1: {
|
|
1655
|
-
|
|
1239
|
+
M = "col-12";
|
|
1656
1240
|
break;
|
|
1657
1241
|
}
|
|
1658
1242
|
case 2: {
|
|
1659
|
-
|
|
1243
|
+
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1660
1244
|
break;
|
|
1661
1245
|
}
|
|
1662
1246
|
case 3: {
|
|
1663
|
-
|
|
1247
|
+
M = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1664
1248
|
break;
|
|
1665
1249
|
}
|
|
1666
1250
|
case 4: {
|
|
1667
|
-
|
|
1251
|
+
M = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1668
1252
|
break;
|
|
1669
1253
|
}
|
|
1670
1254
|
}
|
|
1671
|
-
return
|
|
1672
|
-
}
|
|
1673
|
-
function j(h, A, T) {
|
|
1674
|
-
const M = t;
|
|
1675
|
-
if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1676
|
-
const x = String(h.innerText), I = q("form-group");
|
|
1677
|
-
return I.editor = T, I.label = x, I;
|
|
1678
|
-
}
|
|
1679
|
-
return T;
|
|
1255
|
+
return M;
|
|
1680
1256
|
}
|
|
1681
|
-
function
|
|
1682
|
-
return
|
|
1683
|
-
}
|
|
1684
|
-
function L() {
|
|
1685
|
-
return !g;
|
|
1257
|
+
function C() {
|
|
1258
|
+
return l;
|
|
1686
1259
|
}
|
|
1687
1260
|
function v() {
|
|
1688
|
-
return
|
|
1261
|
+
return n;
|
|
1262
|
+
}
|
|
1263
|
+
function h() {
|
|
1264
|
+
return !1;
|
|
1689
1265
|
}
|
|
1690
|
-
function
|
|
1691
|
-
return new
|
|
1266
|
+
function b(g) {
|
|
1267
|
+
return new Ye(g, e).getPropertyConfig(t, a.componentInstance.value);
|
|
1692
1268
|
}
|
|
1693
1269
|
return {
|
|
1694
|
-
canAccepts:
|
|
1695
|
-
checkCanDeleteComponent:
|
|
1696
|
-
checkCanMoveComponent:
|
|
1270
|
+
canAccepts: u,
|
|
1271
|
+
checkCanDeleteComponent: v,
|
|
1272
|
+
checkCanMoveComponent: C,
|
|
1697
1273
|
getStyles: i,
|
|
1698
|
-
getPropsConfig:
|
|
1699
|
-
hideNestedPaddingInDesginerView:
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
resolveComponentContext: C,
|
|
1703
|
-
onResolveNewComponentSchema: u,
|
|
1704
|
-
triggerBelongedComponentToMoveWhenMoved: y,
|
|
1705
|
-
triggerBelongedComponentToDeleteWhenDeleted: o
|
|
1274
|
+
getPropsConfig: b,
|
|
1275
|
+
hideNestedPaddingInDesginerView: h,
|
|
1276
|
+
onAcceptMovedChildElement: s,
|
|
1277
|
+
onResolveNewComponentSchema: o
|
|
1706
1278
|
};
|
|
1707
1279
|
}
|
|
1708
|
-
const
|
|
1280
|
+
const Re = /* @__PURE__ */ R({
|
|
1709
1281
|
name: "FPagination",
|
|
1710
|
-
props:
|
|
1282
|
+
props: J,
|
|
1711
1283
|
emits: ["pageIndexChanged", "pageSizeChanged"],
|
|
1712
|
-
setup(
|
|
1713
|
-
var
|
|
1714
|
-
const t =
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
}), e.expose(
|
|
1284
|
+
setup(a, e) {
|
|
1285
|
+
var Y;
|
|
1286
|
+
const t = S(!1), r = S(a.mode), l = S(""), c = S(!1), n = S(a.pageSize), p = S(a.currentPage), u = S(a.totalItems), s = S(), i = ge("design-item-context"), o = Ze(i.schema, (Y = i.parent) == null ? void 0 : Y.schema), d = ze(s, i, o);
|
|
1287
|
+
he(() => {
|
|
1288
|
+
s.value.componentInstance = d;
|
|
1289
|
+
}), e.expose(d.value);
|
|
1718
1290
|
const {
|
|
1719
|
-
pages:
|
|
1720
|
-
updatePages:
|
|
1721
|
-
} =
|
|
1722
|
-
renderFirstPage:
|
|
1723
|
-
renderPreviousPage:
|
|
1724
|
-
} = ie(
|
|
1725
|
-
renderLastPage:
|
|
1726
|
-
renderNextPage:
|
|
1727
|
-
} = ae(
|
|
1728
|
-
renderPageInfo:
|
|
1729
|
-
} =
|
|
1730
|
-
renderPageList:
|
|
1731
|
-
} =
|
|
1732
|
-
renderPageNumbers:
|
|
1733
|
-
} =
|
|
1734
|
-
renderGotoButton:
|
|
1735
|
-
} =
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
}),
|
|
1739
|
-
e.emit("pageIndexChanged",
|
|
1740
|
-
}),
|
|
1741
|
-
e.emit("pageSizeChanged",
|
|
1291
|
+
pages: m,
|
|
1292
|
+
updatePages: C
|
|
1293
|
+
} = re(), v = w(() => p.value === 1), h = w(() => [20, 50, 100]), b = w(() => Math.ceil(u.value / n.value)), g = w(() => p.value === b.value), M = w(() => !0), I = w(() => p.value > 1), y = w(() => !(c.value && m.value.length <= 1)), L = w(() => !0), T = w(() => !0), k = w(() => !0), D = w(() => !0), {
|
|
1294
|
+
renderFirstPage: E,
|
|
1295
|
+
renderPreviousPage: A
|
|
1296
|
+
} = ie(p, v, I, n, e), {
|
|
1297
|
+
renderLastPage: O,
|
|
1298
|
+
renderNextPage: j
|
|
1299
|
+
} = ae(p, g, b, n, e), {
|
|
1300
|
+
renderPageInfo: Q
|
|
1301
|
+
} = oe(l, u), {
|
|
1302
|
+
renderPageList: W
|
|
1303
|
+
} = le(p, n, h, u, e), {
|
|
1304
|
+
renderPageNumbers: z
|
|
1305
|
+
} = se(p, m, n, e), {
|
|
1306
|
+
renderGotoButton: V
|
|
1307
|
+
} = ne(p, b, n, e);
|
|
1308
|
+
C(p.value, n.value, u.value, 7), N([p, n], () => {
|
|
1309
|
+
C(p.value, n.value, u.value, 7);
|
|
1310
|
+
}), N(p, () => {
|
|
1311
|
+
e.emit("pageIndexChanged", p.value);
|
|
1312
|
+
}), N(n, () => {
|
|
1313
|
+
e.emit("pageSizeChanged", n.value);
|
|
1742
1314
|
});
|
|
1743
|
-
const
|
|
1315
|
+
const q = w(() => ({
|
|
1744
1316
|
"ngx-pagination": !0,
|
|
1745
1317
|
pagination: !0,
|
|
1746
1318
|
responsive: t.value,
|
|
1747
|
-
"pager-viewmode-default":
|
|
1748
|
-
"pager-viewmode-simple":
|
|
1749
|
-
})),
|
|
1319
|
+
"pager-viewmode-default": r.value === "default",
|
|
1320
|
+
"pager-viewmode-simple": r.value === "simple"
|
|
1321
|
+
})), B = w(() => ({
|
|
1750
1322
|
position: "relative",
|
|
1751
|
-
"justify-content":
|
|
1323
|
+
"justify-content": l.value === "center" ? "center" : "start"
|
|
1752
1324
|
}));
|
|
1753
|
-
function
|
|
1754
|
-
return f(
|
|
1325
|
+
function ce() {
|
|
1326
|
+
return f($, null, [L.value && Q(), T.value && W(), D.value && E(), D.value && A(), k.value && z(), D.value && j(), D.value && O(), M.value && V()]);
|
|
1755
1327
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return f(
|
|
1328
|
+
function ue() {
|
|
1329
|
+
return f($, null, [f("li", {
|
|
1758
1330
|
class: "page-item d-flex flex-fill"
|
|
1759
|
-
}, null),
|
|
1331
|
+
}, null), D.value && E(), D.value && A(), V(), f("li", {
|
|
1760
1332
|
class: "page-item page-separator",
|
|
1761
1333
|
style: "margin-left: 10px"
|
|
1762
1334
|
}, [f("span", {
|
|
1763
1335
|
style: "font-size: 15px; font-weight: 200;"
|
|
1764
|
-
}, [
|
|
1336
|
+
}, [G(" /")])]), f("li", {
|
|
1765
1337
|
class: "page-item page-total",
|
|
1766
1338
|
style: "margin-left: 5px"
|
|
1767
1339
|
}, [f("span", {
|
|
1768
1340
|
style: "font-size: 16px; font-weight: 600;"
|
|
1769
|
-
}, [
|
|
1341
|
+
}, [G(" "), b.value])]), D.value && j(), D.value && O()]);
|
|
1770
1342
|
}
|
|
1771
1343
|
return () => f("div", {
|
|
1772
|
-
ref:
|
|
1344
|
+
ref: s,
|
|
1773
1345
|
class: "pagination-container"
|
|
1774
|
-
}, [
|
|
1346
|
+
}, [y.value && f("ul", {
|
|
1775
1347
|
role: "navigation",
|
|
1776
|
-
class:
|
|
1777
|
-
style:
|
|
1778
|
-
}, [
|
|
1348
|
+
class: q.value,
|
|
1349
|
+
style: B.value
|
|
1350
|
+
}, [r.value === "default" ? ce() : ue()])]);
|
|
1779
1351
|
}
|
|
1780
1352
|
});
|
|
1781
|
-
|
|
1782
|
-
|
|
1353
|
+
U.register = (a, e, t) => {
|
|
1354
|
+
a.pagination = U, e.pagination = te;
|
|
1783
1355
|
};
|
|
1784
|
-
|
|
1785
|
-
|
|
1356
|
+
U.registerDesigner = (a, e, t) => {
|
|
1357
|
+
a.pagination = Re, e.pagination = te;
|
|
1786
1358
|
};
|
|
1787
|
-
const
|
|
1359
|
+
const at = ye(U);
|
|
1788
1360
|
export {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1361
|
+
U as FPagination,
|
|
1362
|
+
at as default,
|
|
1363
|
+
J as paginationProps,
|
|
1364
|
+
te as propsResolver
|
|
1793
1365
|
};
|