@farris/ui-vue 1.2.4 → 1.2.6
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 +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +219 -209
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +36 -28
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +406 -402
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +4439 -4273
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2904 -2892
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.css +1 -0
- package/components/designer-canvas/index.esm.js +24 -21
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +984 -928
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +281 -277
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1917 -1901
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +4185 -4023
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +595 -581
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.css +1 -0
- package/components/flow-canvas/index.esm.js +38 -35
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +256 -248
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1522 -1519
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4629 -4410
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4454 -4255
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +972 -920
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +917 -893
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +361 -349
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +72 -64
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +452 -439
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +610 -592
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +4041 -3749
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +159 -178
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1450 -1408
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +86 -78
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +387 -379
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +4437 -4271
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +1989 -1985
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12989 -12513
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/condition/index.d.ts +60 -1
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/message-box/index.d.ts +84 -1
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/notify/index.d.ts +84 -1
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
- package/components/button-edit/style.css +0 -1
- package/components/designer-canvas/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/flow-canvas/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const { properties: e, title: t } = n,
|
|
7
|
-
return
|
|
1
|
+
import { ref as N, watch as B, createVNode as i, computed as w, defineComponent as K, watchEffect as pe, Fragment as _, createTextVNode as H, nextTick as ue, inject as fe, onMounted as de } from "vue";
|
|
2
|
+
import { cloneDeep as ge } from "lodash-es";
|
|
3
|
+
import { withInstall as be } from "@farris/ui-vue/components/common";
|
|
4
|
+
const R = {}, ee = {};
|
|
5
|
+
function Y(n) {
|
|
6
|
+
const { properties: e, title: t } = n, u = Object.keys(e).reduce((a, g) => (a[g] = e[g].type === "object" && e[g].properties ? Y(e[g]) : ge(e[g].default), a), {});
|
|
7
|
+
return u.id = `${t}-${Date.now()}`, u;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
const t =
|
|
9
|
+
function q(n, e = {}) {
|
|
10
|
+
const t = R[n];
|
|
11
11
|
if (t) {
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
return
|
|
12
|
+
let u = Y(t);
|
|
13
|
+
const a = ee[n];
|
|
14
|
+
return u = a ? a({ getSchemaByType: q }, u, e) : u, u;
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
function ge(n, e) {
|
|
19
|
-
const t = Q(e);
|
|
20
|
-
return Object.keys(n).reduce((p, s) => (p[s] = n[s], p), t), t;
|
|
21
|
-
}
|
|
22
18
|
function ye(n, e) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const t = Y(e);
|
|
20
|
+
return Object.keys(n).reduce((u, a) => (u[a] = n[a], u), t), t;
|
|
21
|
+
}
|
|
22
|
+
function me(n, e) {
|
|
23
|
+
return Object.keys(n).filter((u) => n[u] != null).reduce((u, a) => {
|
|
24
|
+
if (e.has(a)) {
|
|
25
|
+
const g = e.get(a);
|
|
26
26
|
if (typeof g == "string")
|
|
27
|
-
|
|
27
|
+
u[g] = n[a];
|
|
28
28
|
else {
|
|
29
|
-
const o = g(
|
|
30
|
-
Object.assign(
|
|
29
|
+
const o = g(a, n[a], n);
|
|
30
|
+
Object.assign(u, o);
|
|
31
31
|
}
|
|
32
32
|
} else
|
|
33
|
-
|
|
34
|
-
return
|
|
33
|
+
u[a] = n[a];
|
|
34
|
+
return u;
|
|
35
35
|
}, {});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const
|
|
39
|
-
return
|
|
37
|
+
function he(n, e, t = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const u = ye(n, e);
|
|
39
|
+
return me(u, t);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
function e(f,
|
|
43
|
-
if (typeof
|
|
44
|
-
return m[f].length ===
|
|
45
|
-
if (typeof
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return Number(m[f].length) !== Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(m[f].length) >= Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(m[f].length) <= Number(
|
|
41
|
+
function ve(n = {}) {
|
|
42
|
+
function e(f, b, h, m) {
|
|
43
|
+
if (typeof h == "number")
|
|
44
|
+
return m[f].length === h;
|
|
45
|
+
if (typeof h == "object") {
|
|
46
|
+
const P = Object.keys(h)[0], c = h[P];
|
|
47
|
+
if (P === "not")
|
|
48
|
+
return Number(m[f].length) !== Number(c);
|
|
49
|
+
if (P === "moreThan")
|
|
50
|
+
return Number(m[f].length) >= Number(c);
|
|
51
|
+
if (P === "lessThan")
|
|
52
|
+
return Number(m[f].length) <= Number(c);
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
56
|
-
function t(f,
|
|
57
|
-
return m[f] && m[f].propertyValue && String(m[f].propertyValue.value) === String(
|
|
56
|
+
function t(f, b, h, m) {
|
|
57
|
+
return m[f] && m[f].propertyValue && String(m[f].propertyValue.value) === String(h);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const u = /* @__PURE__ */ new Map([
|
|
60
60
|
["length", e],
|
|
61
61
|
["getProperty", t]
|
|
62
62
|
]);
|
|
63
|
-
Object.keys(n).reduce((f,
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
63
|
+
Object.keys(n).reduce((f, b) => (f.set(b, n[b]), f), u);
|
|
64
|
+
function a(f, b) {
|
|
65
|
+
const h = f;
|
|
66
|
+
return typeof b == "number" ? [{ target: h, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: h, operator: "getProperty", param: f, value: !!b }] : typeof b == "object" ? Object.keys(b).map((m) => {
|
|
67
67
|
if (m === "length")
|
|
68
|
-
return { target:
|
|
69
|
-
const
|
|
70
|
-
return { target:
|
|
68
|
+
return { target: h, operator: "length", param: null, value: b[m] };
|
|
69
|
+
const P = m, c = b[m];
|
|
70
|
+
return { target: h, operator: "getProperty", param: P, value: c };
|
|
71
71
|
}) : [];
|
|
72
72
|
}
|
|
73
73
|
function g(f) {
|
|
74
|
-
return Object.keys(f).reduce((
|
|
75
|
-
const
|
|
76
|
-
return
|
|
74
|
+
return Object.keys(f).reduce((h, m) => {
|
|
75
|
+
const P = a(m, f[m]);
|
|
76
|
+
return h.push(...P), h;
|
|
77
77
|
}, []);
|
|
78
78
|
}
|
|
79
|
-
function o(f,
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
82
|
-
return
|
|
79
|
+
function o(f, b) {
|
|
80
|
+
if (u.has(f.operator)) {
|
|
81
|
+
const h = u.get(f.operator);
|
|
82
|
+
return h && h(f.target, f.param, f.value, b) || !1;
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return g(f).reduce((
|
|
86
|
+
function s(f, b) {
|
|
87
|
+
return g(f).reduce((P, c) => P && o(c, b), !0);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const
|
|
89
|
+
function l(f, b) {
|
|
90
|
+
const h = Object.keys(f), m = h.includes("allOf"), P = h.includes("anyOf"), c = m || P, y = (c ? f[c ? m ? "allOf" : "anyOf" : "allOf"] : [f]).map((C) => s(C, b));
|
|
91
91
|
return m ? !y.includes(!1) : y.includes(!0);
|
|
92
92
|
}
|
|
93
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: l };
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
return
|
|
99
|
-
const
|
|
100
|
-
return Object.assign(
|
|
95
|
+
const je = {}, Ce = {};
|
|
96
|
+
ve();
|
|
97
|
+
function Pe(n, e, t = /* @__PURE__ */ new Map(), u = (o, s, l) => s, a = {}, g = (o) => o) {
|
|
98
|
+
return R[e.title] = e, ee[e.title] = u, je[e.title] = a, Ce[e.title] = g, (o = {}) => {
|
|
99
|
+
const s = he(o, e, t), l = Object.keys(n).reduce((f, b) => (f[b] = n[b].default, f), {});
|
|
100
|
+
return Object.assign(l, s);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function we(n, e) {
|
|
104
104
|
return { customClass: e.class, customStyle: e.style };
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
["appearance",
|
|
108
|
-
]),
|
|
106
|
+
const Ne = /* @__PURE__ */ new Map([
|
|
107
|
+
["appearance", we]
|
|
108
|
+
]), Te = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/pagination.schema.json", Oe = "pagination", Se = "A Farris Component", Ae = "object", Me = {
|
|
109
109
|
id: {
|
|
110
110
|
description: "The unique identifier for a pagination",
|
|
111
111
|
type: "string"
|
|
@@ -197,18 +197,18 @@ const Ce = /* @__PURE__ */ new Map([
|
|
|
197
197
|
type: "sting",
|
|
198
198
|
default: ""
|
|
199
199
|
}
|
|
200
|
-
},
|
|
200
|
+
}, Le = [
|
|
201
201
|
"id",
|
|
202
202
|
"type"
|
|
203
|
-
],
|
|
204
|
-
$schema:
|
|
205
|
-
$id:
|
|
203
|
+
], De = {
|
|
204
|
+
$schema: Te,
|
|
205
|
+
$id: ke,
|
|
206
206
|
title: Oe,
|
|
207
|
-
description:
|
|
208
|
-
type:
|
|
209
|
-
properties:
|
|
210
|
-
required:
|
|
211
|
-
},
|
|
207
|
+
description: Se,
|
|
208
|
+
type: Ae,
|
|
209
|
+
properties: Me,
|
|
210
|
+
required: Le
|
|
211
|
+
}, xe = "pagination", Ee = "A Farris Component", Be = "object", $e = {
|
|
212
212
|
basic: {
|
|
213
213
|
description: "Basic Infomation",
|
|
214
214
|
title: "基本信息",
|
|
@@ -290,16 +290,16 @@ const Ce = /* @__PURE__ */ new Map([
|
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
},
|
|
294
|
-
title:
|
|
295
|
-
description:
|
|
296
|
-
type:
|
|
297
|
-
categories:
|
|
293
|
+
}, Fe = {
|
|
294
|
+
title: xe,
|
|
295
|
+
description: Ee,
|
|
296
|
+
type: Be,
|
|
297
|
+
categories: $e
|
|
298
298
|
};
|
|
299
|
-
function
|
|
299
|
+
function Ve(n, e, t) {
|
|
300
300
|
return e;
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const Z = {
|
|
303
303
|
/**
|
|
304
304
|
* 当前页码
|
|
305
305
|
*/
|
|
@@ -332,21 +332,21 @@ const U = {
|
|
|
332
332
|
* 自定义每页数量
|
|
333
333
|
*/
|
|
334
334
|
pageList: { type: Array, default: [20, 50, 100] }
|
|
335
|
-
},
|
|
336
|
-
function
|
|
337
|
-
const t =
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}),
|
|
341
|
-
|
|
335
|
+
}, te = Pe(Z, De, Ne, Ve, Fe);
|
|
336
|
+
function ne(n, e) {
|
|
337
|
+
const t = N("跳转至"), u = N(""), a = N(n.value);
|
|
338
|
+
B(a, (l, f) => {
|
|
339
|
+
l >= 1 && l <= e.value ? n.value = l : a.value = f;
|
|
340
|
+
}), B(n, (l) => {
|
|
341
|
+
a.value !== l && (a.value = l);
|
|
342
342
|
});
|
|
343
|
-
function g(
|
|
344
|
-
|
|
343
|
+
function g(l) {
|
|
344
|
+
a.value = l.target.valueAsNumber;
|
|
345
345
|
}
|
|
346
|
-
function o(
|
|
347
|
-
|
|
346
|
+
function o(l) {
|
|
347
|
+
l.key === "Enter" && (a.value = l.target.valueAsNumber);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function s() {
|
|
350
350
|
return i("li", {
|
|
351
351
|
class: "page-goto-input d-flex flex-row",
|
|
352
352
|
style: "padding-left: 10px; white-space: nowrap;"
|
|
@@ -355,36 +355,36 @@ function R(n, e) {
|
|
|
355
355
|
}, [t.value]), i("input", {
|
|
356
356
|
type: "number",
|
|
357
357
|
class: "form-control farris-gotopagenumber",
|
|
358
|
-
value:
|
|
358
|
+
value: a.value,
|
|
359
359
|
min: "1",
|
|
360
360
|
max: e.value,
|
|
361
361
|
style: "display: inline-block;margin-left:3px;",
|
|
362
|
-
onBlur: (
|
|
363
|
-
onKeyup: (
|
|
364
|
-
}, null),
|
|
362
|
+
onBlur: (l) => g(l),
|
|
363
|
+
onKeyup: (l) => o(l)
|
|
364
|
+
}, null), u.value]);
|
|
365
365
|
}
|
|
366
366
|
return {
|
|
367
|
-
renderGotoButton:
|
|
367
|
+
renderGotoButton: s
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
const
|
|
370
|
+
function oe(n, e, t) {
|
|
371
|
+
const u = w(() => ({
|
|
372
372
|
"page-item": !0,
|
|
373
373
|
disabled: e.value
|
|
374
374
|
}));
|
|
375
|
-
function
|
|
375
|
+
function a(l) {
|
|
376
376
|
n.value = n.value < t.value ? n.value + 1 : t.value;
|
|
377
377
|
}
|
|
378
|
-
function g(
|
|
378
|
+
function g(l) {
|
|
379
379
|
n.value = t.value;
|
|
380
380
|
}
|
|
381
381
|
function o() {
|
|
382
382
|
return i("li", {
|
|
383
|
-
class:
|
|
383
|
+
class: u.value
|
|
384
384
|
}, [!e.value && i("a", {
|
|
385
385
|
class: "page-link",
|
|
386
386
|
tabindex: "0",
|
|
387
|
-
onClick: (
|
|
387
|
+
onClick: (l) => a()
|
|
388
388
|
}, [i("span", {
|
|
389
389
|
class: "f-icon f-page-next"
|
|
390
390
|
}, null)]), e.value && i("span", {
|
|
@@ -393,13 +393,13 @@ function ee(n, e, t) {
|
|
|
393
393
|
class: "f-icon f-page-next"
|
|
394
394
|
}, null)])]);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function s() {
|
|
397
397
|
return i("li", {
|
|
398
|
-
class:
|
|
398
|
+
class: u.value
|
|
399
399
|
}, [!e.value && i("a", {
|
|
400
400
|
class: "page-link",
|
|
401
401
|
tabindex: "0",
|
|
402
|
-
onClick: (
|
|
402
|
+
onClick: (l) => g()
|
|
403
403
|
}, [i("span", {
|
|
404
404
|
class: "f-icon f-page-last"
|
|
405
405
|
}, null)]), e.value && i("span", {
|
|
@@ -409,12 +409,12 @@ function ee(n, e, t) {
|
|
|
409
409
|
}, null)])]);
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
|
-
renderLastPage:
|
|
412
|
+
renderLastPage: s,
|
|
413
413
|
renderNextPage: o
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
const t =
|
|
416
|
+
function ae(n, e) {
|
|
417
|
+
const t = N("共"), u = N("条"), a = w(() => ({
|
|
418
418
|
"pagination-message": !0,
|
|
419
419
|
"text-truncate": !0,
|
|
420
420
|
"d-flex": !0,
|
|
@@ -423,7 +423,7 @@ function te(n, e) {
|
|
|
423
423
|
}));
|
|
424
424
|
function g() {
|
|
425
425
|
return i("li", {
|
|
426
|
-
class:
|
|
426
|
+
class: a.value
|
|
427
427
|
}, [i("div", {
|
|
428
428
|
class: "text-truncate",
|
|
429
429
|
style: "line-height: 26px"
|
|
@@ -433,47 +433,47 @@ function te(n, e) {
|
|
|
433
433
|
class: "pg-message-total"
|
|
434
434
|
}, [e.value]), i("span", {
|
|
435
435
|
class: "pg-message-text"
|
|
436
|
-
}, [
|
|
436
|
+
}, [u.value])])]);
|
|
437
437
|
}
|
|
438
438
|
return {
|
|
439
439
|
renderPageInfo: g
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const
|
|
442
|
+
function se(n, e, t, u) {
|
|
443
|
+
const a = N(!1), g = N("显示"), o = N("条"), s = w(() => ({
|
|
444
444
|
dropup: !0,
|
|
445
445
|
"dropdown-right": !0,
|
|
446
446
|
"pg-pagelist": !0,
|
|
447
|
-
"pagelist-disabled":
|
|
448
|
-
show:
|
|
449
|
-
})),
|
|
447
|
+
"pagelist-disabled": u.value === 0,
|
|
448
|
+
show: a.value
|
|
449
|
+
})), l = w(() => ({
|
|
450
450
|
"dropdown-menu": !0,
|
|
451
|
-
show:
|
|
451
|
+
show: a.value
|
|
452
452
|
})), f = (r) => ({
|
|
453
453
|
"w-100": !0,
|
|
454
454
|
"dropdown-item": !0,
|
|
455
455
|
active: e.value === r
|
|
456
456
|
});
|
|
457
|
-
function
|
|
458
|
-
|
|
457
|
+
function b(r) {
|
|
458
|
+
a.value = !0;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
|
|
460
|
+
function h(r) {
|
|
461
|
+
a.value = !1;
|
|
462
462
|
}
|
|
463
|
-
function m(r,
|
|
464
|
-
const
|
|
465
|
-
return Math.ceil(
|
|
463
|
+
function m(r, p, y) {
|
|
464
|
+
const C = r * p - p + 1;
|
|
465
|
+
return Math.ceil(C / y);
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
n.value = m(n.value, e.value,
|
|
467
|
+
function P(r, p) {
|
|
468
|
+
n.value = m(n.value, e.value, p), e.value = p, a.value = !1;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function c() {
|
|
471
471
|
return i("li", {
|
|
472
472
|
class: "pagination-pagelist"
|
|
473
473
|
}, [i("div", {
|
|
474
|
-
class:
|
|
475
|
-
onMouseenter: (r) =>
|
|
476
|
-
onMouseleave: (r) =>
|
|
474
|
+
class: s.value,
|
|
475
|
+
onMouseenter: (r) => b(),
|
|
476
|
+
onMouseleave: (r) => h()
|
|
477
477
|
}, [i("div", {
|
|
478
478
|
class: "pg-pagelist-info"
|
|
479
479
|
}, [i("span", {
|
|
@@ -485,29 +485,29 @@ function ne(n, e, t, p) {
|
|
|
485
485
|
}, [o.value]), i("i", {
|
|
486
486
|
class: "f-icon f-icon-dropdown"
|
|
487
487
|
}, null)]), i("div", {
|
|
488
|
-
class:
|
|
488
|
+
class: l.value,
|
|
489
489
|
style: "margin-bottom: -1px;"
|
|
490
490
|
}, [t.value.map((r) => i("li", {
|
|
491
491
|
class: f(r),
|
|
492
|
-
onClick: (
|
|
492
|
+
onClick: (p) => P(p, r)
|
|
493
493
|
}, [i("span", null, [r])]))])])]);
|
|
494
494
|
}
|
|
495
495
|
return {
|
|
496
|
-
renderPageList:
|
|
496
|
+
renderPageList: c
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function re(n, e) {
|
|
500
500
|
const t = (o) => ({
|
|
501
501
|
"page-item": !0,
|
|
502
502
|
current: n.value === o.value,
|
|
503
503
|
ellipsis: o.label === "..."
|
|
504
|
-
}),
|
|
504
|
+
}), u = (o) => ({
|
|
505
505
|
"f-icon": !0,
|
|
506
506
|
"f-icon-arrow-seek-left": o.value < n.value,
|
|
507
507
|
"f-icon-arrow-seek-right": o.value > n.value
|
|
508
508
|
});
|
|
509
|
-
function
|
|
510
|
-
n.value =
|
|
509
|
+
function a(o, s) {
|
|
510
|
+
n.value = s;
|
|
511
511
|
}
|
|
512
512
|
function g() {
|
|
513
513
|
return e.value.map((o) => i("li", {
|
|
@@ -515,11 +515,11 @@ function oe(n, e) {
|
|
|
515
515
|
}, [n.value !== o.value && i("a", {
|
|
516
516
|
class: "page-link",
|
|
517
517
|
tabindex: "0",
|
|
518
|
-
onClick: (
|
|
518
|
+
onClick: (s) => a(s, o.value)
|
|
519
519
|
}, [i("span", {
|
|
520
520
|
class: "page-link-label"
|
|
521
521
|
}, [o.label]), o.label === "..." && i("i", {
|
|
522
|
-
class:
|
|
522
|
+
class: u(o)
|
|
523
523
|
}, null)]), n.value === o.value && i("span", {
|
|
524
524
|
class: "page-link"
|
|
525
525
|
}, [o.label])]));
|
|
@@ -528,24 +528,24 @@ function oe(n, e) {
|
|
|
528
528
|
renderPageNumbers: g
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
const
|
|
531
|
+
function ce(n, e, t) {
|
|
532
|
+
const u = w(() => ({
|
|
533
533
|
"page-item": !0,
|
|
534
534
|
disabled: e.value
|
|
535
535
|
}));
|
|
536
|
-
function
|
|
536
|
+
function a(l) {
|
|
537
537
|
n.value = 1;
|
|
538
538
|
}
|
|
539
|
-
function g(
|
|
539
|
+
function g(l) {
|
|
540
540
|
n.value = n.value > 2 ? n.value - 1 : 1;
|
|
541
541
|
}
|
|
542
542
|
function o() {
|
|
543
543
|
return i("li", {
|
|
544
|
-
class:
|
|
544
|
+
class: u.value
|
|
545
545
|
}, [t.value && i("a", {
|
|
546
546
|
tabindex: "0",
|
|
547
547
|
class: "page-link",
|
|
548
|
-
onClick: (
|
|
548
|
+
onClick: (l) => a()
|
|
549
549
|
}, [i("span", {
|
|
550
550
|
class: "f-icon f-page-first"
|
|
551
551
|
}, null)]), e.value && i("span", {
|
|
@@ -554,13 +554,13 @@ function ae(n, e, t) {
|
|
|
554
554
|
class: "f-icon f-page-first"
|
|
555
555
|
}, null)])]);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function s() {
|
|
558
558
|
return i("li", {
|
|
559
|
-
class:
|
|
559
|
+
class: u.value
|
|
560
560
|
}, [t.value && i("a", {
|
|
561
561
|
tabindex: "0",
|
|
562
562
|
class: "page-link",
|
|
563
|
-
onClick: (
|
|
563
|
+
onClick: (l) => g()
|
|
564
564
|
}, [i("span", {
|
|
565
565
|
class: "f-icon f-page-pre"
|
|
566
566
|
}, null)]), e.value && i("span", {
|
|
@@ -571,201 +571,201 @@ function ae(n, e, t) {
|
|
|
571
571
|
}
|
|
572
572
|
return {
|
|
573
573
|
renderFirstPage: o,
|
|
574
|
-
renderPreviousPage:
|
|
574
|
+
renderPreviousPage: s
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
const e =
|
|
579
|
-
function t(
|
|
580
|
-
const
|
|
581
|
-
return
|
|
582
|
-
}
|
|
583
|
-
function
|
|
584
|
-
const
|
|
577
|
+
function le(n) {
|
|
578
|
+
const e = N([]);
|
|
579
|
+
function t(a, g, o, s) {
|
|
580
|
+
const l = Math.ceil(o / 2);
|
|
581
|
+
return a === o ? s : a === 1 ? a : o < s ? s - l < g ? s - o + a : l < g ? g - l + a : a : a;
|
|
582
|
+
}
|
|
583
|
+
function u(a, g, o, s) {
|
|
584
|
+
const l = [], f = Math.ceil(o / g), b = Math.ceil(s / 2), h = a <= b, m = f - b < a, P = !h && !m, c = s < f;
|
|
585
585
|
let r = 1;
|
|
586
|
-
for (; r <= f && r <=
|
|
587
|
-
const
|
|
588
|
-
|
|
586
|
+
for (; r <= f && r <= s; ) {
|
|
587
|
+
const p = t(r, a, s, f), y = r === 2 && (P || m), T = r === s - 1 && (P || h), C = c && (y || T) ? "..." : "" + p;
|
|
588
|
+
l.push({ label: C, value: p }), r++;
|
|
589
589
|
}
|
|
590
|
-
e.value =
|
|
590
|
+
e.value = l;
|
|
591
591
|
}
|
|
592
|
-
return { pages: e, updatePages:
|
|
592
|
+
return { pages: e, updatePages: u };
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const J = /* @__PURE__ */ K({
|
|
595
595
|
name: "FPagination",
|
|
596
|
-
props:
|
|
596
|
+
props: Z,
|
|
597
597
|
emits: ["pageIndexChanged", "pageSizeChanged", "update:currentPage", "update:pageSize"],
|
|
598
598
|
setup(n, e) {
|
|
599
|
-
const t =
|
|
599
|
+
const t = N(!1), u = N(n.mode), a = N(""), g = N(!1), o = N(n.pageSize), s = N(n.currentPage), l = N(n.totalItems), {
|
|
600
600
|
pages: f,
|
|
601
|
-
updatePages:
|
|
602
|
-
} =
|
|
603
|
-
renderFirstPage:
|
|
604
|
-
renderPreviousPage:
|
|
605
|
-
} =
|
|
606
|
-
renderLastPage:
|
|
607
|
-
renderNextPage:
|
|
608
|
-
} =
|
|
601
|
+
updatePages: b
|
|
602
|
+
} = le(), h = w(() => s.value === 1), m = w(() => n.pageList), P = w(() => Math.ceil(l.value / o.value)), c = w(() => s.value === P.value), r = w(() => n.showGoButton), p = w(() => s.value > 1), y = w(() => !(g.value && f.value.length <= 1)), T = w(() => !0), C = w(() => n.showPageList), S = w(() => n.showPageNumbers), A = w(() => !0), {
|
|
603
|
+
renderFirstPage: j,
|
|
604
|
+
renderPreviousPage: O
|
|
605
|
+
} = ce(s, h, p), {
|
|
606
|
+
renderLastPage: d,
|
|
607
|
+
renderNextPage: v
|
|
608
|
+
} = oe(s, c, P), {
|
|
609
609
|
renderPageInfo: M
|
|
610
|
-
} =
|
|
611
|
-
renderPageList:
|
|
612
|
-
} =
|
|
610
|
+
} = ae(a, l), {
|
|
611
|
+
renderPageList: k
|
|
612
|
+
} = se(s, o, m, l), {
|
|
613
613
|
renderPageNumbers: D
|
|
614
|
-
} =
|
|
614
|
+
} = re(s, f), {
|
|
615
615
|
renderGotoButton: x
|
|
616
|
-
} =
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
}),
|
|
620
|
-
|
|
621
|
-
}),
|
|
622
|
-
e.emit("update:currentPage",
|
|
623
|
-
}),
|
|
616
|
+
} = ne(s, P);
|
|
617
|
+
b(s.value, o.value, l.value, 7), B(() => n.totalItems, (E) => {
|
|
618
|
+
l.value = E;
|
|
619
|
+
}), B([s, o, l], () => {
|
|
620
|
+
b(s.value, o.value, l.value, 7);
|
|
621
|
+
}), B(s, () => {
|
|
622
|
+
e.emit("update:currentPage", s.value), e.emit("pageIndexChanged", s.value);
|
|
623
|
+
}), B(o, () => {
|
|
624
624
|
e.emit("update:pageSize", o.value), e.emit("pageSizeChanged", o.value);
|
|
625
|
-
}),
|
|
626
|
-
|
|
627
|
-
}),
|
|
628
|
-
const
|
|
629
|
-
o.value =
|
|
625
|
+
}), B(() => n.totalItems, (E) => {
|
|
626
|
+
l.value = E, b(s.value, o.value, l.value, 7);
|
|
627
|
+
}), pe(() => {
|
|
628
|
+
const E = m.value.includes(o.value);
|
|
629
|
+
o.value = E ? o.value : m.value[0];
|
|
630
630
|
})();
|
|
631
|
-
const
|
|
631
|
+
const $ = w(() => ({
|
|
632
632
|
"ngx-pagination": !0,
|
|
633
633
|
pagination: !0,
|
|
634
634
|
responsive: t.value,
|
|
635
|
-
"pager-viewmode-default":
|
|
636
|
-
"pager-viewmode-simple":
|
|
637
|
-
})),
|
|
635
|
+
"pager-viewmode-default": u.value === "default",
|
|
636
|
+
"pager-viewmode-simple": u.value === "simple"
|
|
637
|
+
})), F = w(() => ({
|
|
638
638
|
position: "relative",
|
|
639
|
-
"justify-content":
|
|
639
|
+
"justify-content": a.value === "center" ? "center" : "start"
|
|
640
640
|
}));
|
|
641
|
-
function
|
|
642
|
-
return i(
|
|
641
|
+
function V() {
|
|
642
|
+
return i(_, null, [T.value && M(), C.value && k(), A.value && j(), A.value && O(), S.value && D(), A.value && v(), A.value && d(), r.value && x()]);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return i(
|
|
644
|
+
function z() {
|
|
645
|
+
return i(_, null, [i("li", {
|
|
646
646
|
class: "page-item d-flex flex-fill"
|
|
647
|
-
}, null),
|
|
647
|
+
}, null), A.value && j(), A.value && O(), x(), i("li", {
|
|
648
648
|
class: "page-item page-separator",
|
|
649
649
|
style: "margin-left: 10px"
|
|
650
650
|
}, [i("span", {
|
|
651
651
|
style: "font-size: 15px; font-weight: 200;"
|
|
652
|
-
}, [
|
|
652
|
+
}, [H(" /")])]), i("li", {
|
|
653
653
|
class: "page-item page-total",
|
|
654
654
|
style: "margin-left: 5px"
|
|
655
655
|
}, [i("span", {
|
|
656
656
|
style: "font-size: 16px; font-weight: 600;"
|
|
657
|
-
}, [
|
|
657
|
+
}, [H(" "), P.value])]), A.value && v(), A.value && d()]);
|
|
658
658
|
}
|
|
659
659
|
return () => i("div", {
|
|
660
660
|
class: "pagination-container"
|
|
661
661
|
}, [y.value && i("ul", {
|
|
662
662
|
role: "navigation",
|
|
663
|
-
class:
|
|
664
|
-
style:
|
|
665
|
-
}, [
|
|
663
|
+
class: $.value,
|
|
664
|
+
style: F.value
|
|
665
|
+
}, [u.value === "default" ? V() : z()])]);
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
|
-
function
|
|
669
|
-
var
|
|
670
|
-
function
|
|
668
|
+
function ze(n, e, t) {
|
|
669
|
+
var A;
|
|
670
|
+
function u() {
|
|
671
671
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
672
672
|
}
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
function
|
|
673
|
+
u();
|
|
674
|
+
const a = t && t.getStyles && t.getStyles() || "", g = t && t.getDesignerClass && t.getDesignerClass() || "", o = N();
|
|
675
|
+
function s() {
|
|
676
676
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function l() {
|
|
679
679
|
return !1;
|
|
680
680
|
}
|
|
681
681
|
function f() {
|
|
682
682
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function b() {
|
|
685
685
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
if (!
|
|
687
|
+
function h(j) {
|
|
688
|
+
if (!j || !j.value)
|
|
689
689
|
return null;
|
|
690
|
-
if (
|
|
691
|
-
return
|
|
692
|
-
const
|
|
693
|
-
return
|
|
690
|
+
if (j.value.schema && j.value.schema.type === "component")
|
|
691
|
+
return j.value;
|
|
692
|
+
const O = N(j == null ? void 0 : j.value.parent), d = h(O);
|
|
693
|
+
return d || null;
|
|
694
694
|
}
|
|
695
|
-
function m(
|
|
696
|
-
const { componentInstance:
|
|
697
|
-
return !
|
|
695
|
+
function m(j = e) {
|
|
696
|
+
const { componentInstance: O, designerItemElementRef: d } = j;
|
|
697
|
+
return !O || !O.value ? null : O.value.canMove ? d : m(j.parent);
|
|
698
698
|
}
|
|
699
|
-
function j
|
|
700
|
-
return !!t && t.canAccepts(
|
|
699
|
+
function P(j) {
|
|
700
|
+
return !!t && t.canAccepts(j);
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function c() {
|
|
703
703
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
704
704
|
}
|
|
705
705
|
function r() {
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
|
|
707
|
+
function p(j, O) {
|
|
708
|
+
O && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(O);
|
|
709
709
|
}
|
|
710
|
-
function y(
|
|
711
|
-
const { componentType:
|
|
712
|
-
let
|
|
713
|
-
t && t.onResolveNewComponentSchema && (
|
|
714
|
-
const
|
|
715
|
-
return
|
|
710
|
+
function y(j) {
|
|
711
|
+
const { componentType: O } = j;
|
|
712
|
+
let d = q(O, j);
|
|
713
|
+
t && t.onResolveNewComponentSchema && (d = t.onResolveNewComponentSchema(j, d));
|
|
714
|
+
const v = O.toLowerCase().replace("-", "_");
|
|
715
|
+
return d && !d.id && d.type === O && (d.id = `${v}_${Math.random().toString().slice(2, 6)}`), d;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
const
|
|
717
|
+
function T(j, O) {
|
|
718
|
+
const d = String(j.getAttribute("data-controltype")), v = j.getAttribute("data-feature"), M = v ? JSON.parse(v) : {};
|
|
719
719
|
M.parentComponentInstance = o.value;
|
|
720
|
-
let
|
|
721
|
-
t && t.onAcceptNewChildElement && (
|
|
722
|
-
const D =
|
|
723
|
-
return
|
|
720
|
+
let k = q(d, M);
|
|
721
|
+
t && t.onAcceptNewChildElement && (k = t.onAcceptNewChildElement(j, O, k));
|
|
722
|
+
const D = d.toLowerCase().replace("-", "_");
|
|
723
|
+
return k && !k.id && k.type === d && (k.id = `${D}_${Math.random().toString().slice(2, 6)}`), k;
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function C(j) {
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function S(...j) {
|
|
728
728
|
if (t && t.getPropsConfig)
|
|
729
|
-
return t.getPropsConfig(...
|
|
729
|
+
return t.getPropsConfig(...j);
|
|
730
730
|
}
|
|
731
731
|
return o.value = {
|
|
732
|
-
canMove:
|
|
733
|
-
canSelectParent:
|
|
732
|
+
canMove: s(),
|
|
733
|
+
canSelectParent: l(),
|
|
734
734
|
canDelete: f(),
|
|
735
|
-
canNested: !
|
|
735
|
+
canNested: !b(),
|
|
736
736
|
contents: e == null ? void 0 : e.schema.contents,
|
|
737
737
|
elementRef: n,
|
|
738
|
-
parent: (
|
|
738
|
+
parent: (A = e == null ? void 0 : e.parent) == null ? void 0 : A.componentInstance,
|
|
739
739
|
schema: e == null ? void 0 : e.schema,
|
|
740
|
-
styles:
|
|
740
|
+
styles: a,
|
|
741
741
|
designerClass: g,
|
|
742
|
-
canAccepts:
|
|
743
|
-
getBelongedComponentInstance:
|
|
742
|
+
canAccepts: P,
|
|
743
|
+
getBelongedComponentInstance: h,
|
|
744
744
|
getDraggableDesignItemElement: m,
|
|
745
|
-
getDraggingDisplayText:
|
|
746
|
-
getPropConfig:
|
|
745
|
+
getDraggingDisplayText: c,
|
|
746
|
+
getPropConfig: S,
|
|
747
747
|
getDragScopeElement: r,
|
|
748
|
-
onAcceptMovedChildElement:
|
|
749
|
-
onAcceptNewChildElement:
|
|
750
|
-
onChildElementMovedOut:
|
|
748
|
+
onAcceptMovedChildElement: p,
|
|
749
|
+
onAcceptNewChildElement: T,
|
|
750
|
+
onChildElementMovedOut: C,
|
|
751
751
|
addNewChildComponentSchema: y,
|
|
752
|
-
updateDragAndDropRules:
|
|
753
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
754
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
752
|
+
updateDragAndDropRules: u,
|
|
753
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || N(!1),
|
|
754
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || N(!1)
|
|
755
755
|
}, o;
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function We() {
|
|
758
758
|
function n(e) {
|
|
759
|
-
var
|
|
759
|
+
var a, g;
|
|
760
760
|
if (!e)
|
|
761
761
|
return !1;
|
|
762
|
-
const t = ((
|
|
762
|
+
const t = ((a = e.targetContainer) == null ? void 0 : a.componentInstance) && e.targetContainer.componentInstance.value;
|
|
763
763
|
if (!t)
|
|
764
764
|
return !1;
|
|
765
|
-
const
|
|
765
|
+
const u = (g = t.schema.appearance) == null ? void 0 : g.class;
|
|
766
766
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
767
|
-
const o = t.schema.type,
|
|
768
|
-
if (t.schema.type !== "response-layout-item" && !
|
|
767
|
+
const o = t.schema.type, s = (o === "response-form" || o === "content-container") && u && u.includes("farris-form");
|
|
768
|
+
if (t.schema.type !== "response-layout-item" && !s)
|
|
769
769
|
return !1;
|
|
770
770
|
}
|
|
771
771
|
return e.controlType !== "field-set";
|
|
@@ -774,7 +774,7 @@ function Ve() {
|
|
|
774
774
|
basalDragulaRuleForContainer: n
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
const
|
|
777
|
+
const Ge = "https://json-schema.org/draft/2020-12/schema", qe = "https://farris-design.gitee.io/dragging-rules.schema.json", _e = "Dragging Rules", He = "The rules of designer canvas", Je = "object", Qe = {
|
|
778
778
|
"f-page": {
|
|
779
779
|
description: "The root class of page designed by farris.",
|
|
780
780
|
type: "object",
|
|
@@ -1338,264 +1338,306 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-
|
|
|
1338
1338
|
description: "",
|
|
1339
1339
|
type: "object"
|
|
1340
1340
|
}
|
|
1341
|
-
},
|
|
1342
|
-
$schema:
|
|
1343
|
-
$id:
|
|
1344
|
-
title:
|
|
1345
|
-
description:
|
|
1346
|
-
type:
|
|
1347
|
-
properties:
|
|
1348
|
-
required:
|
|
1349
|
-
},
|
|
1350
|
-
function
|
|
1351
|
-
function n(
|
|
1352
|
-
var
|
|
1353
|
-
if (typeof
|
|
1354
|
-
return ((
|
|
1355
|
-
if (typeof
|
|
1356
|
-
const
|
|
1357
|
-
if (
|
|
1358
|
-
return Number(y[
|
|
1359
|
-
if (
|
|
1360
|
-
return Number(y[
|
|
1361
|
-
if (
|
|
1362
|
-
return Number(y[
|
|
1341
|
+
}, Ue = [], Xe = {
|
|
1342
|
+
$schema: Ge,
|
|
1343
|
+
$id: qe,
|
|
1344
|
+
title: _e,
|
|
1345
|
+
description: He,
|
|
1346
|
+
type: Je,
|
|
1347
|
+
properties: Qe,
|
|
1348
|
+
required: Ue
|
|
1349
|
+
}, X = /* @__PURE__ */ new Map();
|
|
1350
|
+
function Ye() {
|
|
1351
|
+
function n(c, r, p, y) {
|
|
1352
|
+
var T;
|
|
1353
|
+
if (typeof p == "number")
|
|
1354
|
+
return ((T = y[c]) == null ? void 0 : T.length) === p;
|
|
1355
|
+
if (typeof p == "object") {
|
|
1356
|
+
const C = Object.keys(p)[0], S = p[C];
|
|
1357
|
+
if (C === "not")
|
|
1358
|
+
return Number(y[c].length) !== Number(S);
|
|
1359
|
+
if (C === "moreThan")
|
|
1360
|
+
return Number(y[c].length) >= Number(S);
|
|
1361
|
+
if (C === "lessThan")
|
|
1362
|
+
return Number(y[c].length) <= Number(S);
|
|
1363
1363
|
}
|
|
1364
1364
|
return !1;
|
|
1365
1365
|
}
|
|
1366
|
-
function e(
|
|
1367
|
-
return typeof
|
|
1366
|
+
function e(c, r, p, y) {
|
|
1367
|
+
return typeof p == "boolean" ? y.childrenClassList.includes(r) === !!p : !1;
|
|
1368
1368
|
}
|
|
1369
|
-
function t(
|
|
1370
|
-
return typeof
|
|
1369
|
+
function t(c, r, p, y) {
|
|
1370
|
+
return typeof p == "boolean" ? y.parentClassList.includes(r) === !!p : !1;
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return typeof
|
|
1372
|
+
function u(c, r, p, y) {
|
|
1373
|
+
return typeof p == "boolean" ? y.parentClassList.includes(r) === !!p : !1;
|
|
1374
1374
|
}
|
|
1375
|
-
const
|
|
1375
|
+
const a = /* @__PURE__ */ new Map([
|
|
1376
1376
|
["length", n],
|
|
1377
1377
|
["hasChildren", e],
|
|
1378
|
-
["hasSibling",
|
|
1378
|
+
["hasSibling", u],
|
|
1379
1379
|
["hasParent", t]
|
|
1380
1380
|
]);
|
|
1381
|
-
function g(
|
|
1382
|
-
const
|
|
1383
|
-
return typeof r == "number" ? [{ target:
|
|
1381
|
+
function g(c, r) {
|
|
1382
|
+
const p = c;
|
|
1383
|
+
return typeof r == "number" ? [{ target: p, operator: "length", param: null, value: Number(r) }] : typeof r == "object" ? Object.keys(r).map((y) => {
|
|
1384
1384
|
if (y === "length")
|
|
1385
|
-
return { target:
|
|
1386
|
-
const
|
|
1387
|
-
return { target:
|
|
1385
|
+
return { target: p, operator: "length", param: null, value: r[y] };
|
|
1386
|
+
const T = y, C = r[y];
|
|
1387
|
+
return { target: p, operator: c === "children" ? "hasChildren" : c === "parent" ? "hasParent" : "hasSibling", param: T, value: C };
|
|
1388
1388
|
}) : [];
|
|
1389
1389
|
}
|
|
1390
|
-
function o(
|
|
1391
|
-
if (
|
|
1392
|
-
const
|
|
1393
|
-
return
|
|
1390
|
+
function o(c, r) {
|
|
1391
|
+
if (a.has(c.operator)) {
|
|
1392
|
+
const p = a.get(c.operator);
|
|
1393
|
+
return p && p(c.target, c.param, c.value, r) || !1;
|
|
1394
1394
|
}
|
|
1395
1395
|
return !1;
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1398
|
-
return Object.keys(
|
|
1399
|
-
const
|
|
1400
|
-
return
|
|
1401
|
-
}, []).reduce((
|
|
1397
|
+
function s(c, r) {
|
|
1398
|
+
return Object.keys(c).reduce((C, S) => {
|
|
1399
|
+
const A = g(S, c[S]);
|
|
1400
|
+
return C.push(...A), C;
|
|
1401
|
+
}, []).reduce((C, S) => C && o(S, r), !0);
|
|
1402
1402
|
}
|
|
1403
|
-
function c
|
|
1404
|
-
const
|
|
1405
|
-
return y ? !
|
|
1403
|
+
function l(c, r) {
|
|
1404
|
+
const p = Object.keys(c), y = p.includes("allOf"), T = p.includes("anyOf"), C = y || T, j = (C ? c[C ? y ? "allOf" : "anyOf" : "allOf"] : [c]).map((d) => s(d, r));
|
|
1405
|
+
return y ? !j.includes(!1) : j.includes(!0);
|
|
1406
1406
|
}
|
|
1407
|
-
function f(
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
1407
|
+
function f(c, r) {
|
|
1408
|
+
const p = c.const;
|
|
1409
|
+
return p ? typeof p == "boolean" ? p : typeof p == "object" ? l(p, r) : !1 : !1;
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function b(c) {
|
|
1412
1412
|
return (r) => {
|
|
1413
|
-
const
|
|
1414
|
-
return
|
|
1415
|
-
const
|
|
1416
|
-
return y[
|
|
1417
|
-
},
|
|
1413
|
+
const p = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1414
|
+
return c && c.properties && Object.keys(c.properties).reduce((y, T) => {
|
|
1415
|
+
const C = c.properties[T];
|
|
1416
|
+
return y[T] = f(C, r), y;
|
|
1417
|
+
}, p), p;
|
|
1418
1418
|
};
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function h(c, r, p) {
|
|
1421
1421
|
if (r.type === "object" && r.properties) {
|
|
1422
|
-
const { rules: y, contents:
|
|
1423
|
-
|
|
1424
|
-
(
|
|
1422
|
+
const { rules: y, contents: T } = r.properties;
|
|
1423
|
+
p.set(c, b(y)), T && Object.keys(T.properties).forEach(
|
|
1424
|
+
(C) => h(C, T.properties[C], p)
|
|
1425
1425
|
);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
1428
|
function m() {
|
|
1429
|
-
const { properties:
|
|
1430
|
-
Object.keys(
|
|
1431
|
-
|
|
1429
|
+
const { properties: c } = Xe;
|
|
1430
|
+
Object.keys(c).forEach((r) => {
|
|
1431
|
+
h(r, c[r], X);
|
|
1432
1432
|
});
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1435
|
-
const
|
|
1436
|
-
return
|
|
1434
|
+
function P(c, r) {
|
|
1435
|
+
const p = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1436
|
+
return X.has(c) ? X.get(c)(r) : p;
|
|
1437
1437
|
}
|
|
1438
|
-
return m(), { getRuleValue:
|
|
1438
|
+
return m(), { getRuleValue: P };
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
return a && a.componentClassList && a.componentClassList.includes("f-form-layout") && a.componentClassList.includes("farris-form") ? d.sourceType === "control" && d.controlCategory === "input" || d.sourceType === "move" && d.controlType === "form-group" : !0;
|
|
1445
|
-
}
|
|
1440
|
+
function Ze(n, e) {
|
|
1441
|
+
var O;
|
|
1442
|
+
const t = n.schema, u = (O = n.parent) == null ? void 0 : O.schema, a = Ye(), g = N(!1), o = N(!1);
|
|
1443
|
+
let s = !0, l = !1, f, b = !1;
|
|
1446
1444
|
function h(d) {
|
|
1447
|
-
return
|
|
1448
|
-
}
|
|
1449
|
-
function v() {
|
|
1450
|
-
p.value = !1, s.value = !1;
|
|
1451
|
-
const d = n, T = d.appearance && d.appearance.class || "", S = T.split(" "), b = d.contents || [], N = b.length ? b[0] : null, C = N && N.appearance ? N.appearance.class : "", k = C ? C.split(" ") : [], M = b.length ? b.reduce((B, $) => {
|
|
1452
|
-
const L = $ && $.appearance ? $.appearance.class : "", H = L ? L.split(" ") : [];
|
|
1453
|
-
return B.push(...H), B;
|
|
1454
|
-
}, []) : [], A = e, D = A && A.appearance && A.appearance.class || "", x = D ? D.split(" ") : [];
|
|
1455
|
-
a = {
|
|
1456
|
-
componentClass: T,
|
|
1457
|
-
componentClassList: S,
|
|
1458
|
-
childContents: b,
|
|
1459
|
-
firstChildContent: N,
|
|
1460
|
-
firstChildClass: C,
|
|
1461
|
-
firstChildClassList: k,
|
|
1462
|
-
parent: A,
|
|
1463
|
-
parentClass: D,
|
|
1464
|
-
parentClassList: x,
|
|
1465
|
-
children: b,
|
|
1466
|
-
childrenClassList: M
|
|
1467
|
-
};
|
|
1468
|
-
const { canAccept: G, fixed: F, hidePadding: V } = t.getRuleValue(S[0], a);
|
|
1469
|
-
return g = G, o = V, c = F, !0;
|
|
1445
|
+
return f && f.componentClassList && f.componentClassList.includes("f-form-layout") && f.componentClassList.includes("farris-form") ? d.sourceType === "control" && d.controlCategory === "input" || d.sourceType === "move" && d.controlType === "form-group" : !0;
|
|
1470
1446
|
}
|
|
1471
1447
|
function m(d) {
|
|
1472
|
-
|
|
1448
|
+
return !(!We().basalDragulaRuleForContainer(d) || !s || !h(d));
|
|
1449
|
+
}
|
|
1450
|
+
function P() {
|
|
1451
|
+
g.value = !1, o.value = !1;
|
|
1452
|
+
const d = t, v = d.appearance && d.appearance.class || "", M = v.split(" "), k = d.contents || [], D = k.length ? k[0] : null, x = D && D.appearance ? D.appearance.class : "", L = x ? x.split(" ") : [], $ = k.length ? k.reduce((W, G) => {
|
|
1453
|
+
const I = G && G.appearance ? G.appearance.class : "", ie = I ? I.split(" ") : [];
|
|
1454
|
+
return W.push(...ie), W;
|
|
1455
|
+
}, []) : [], F = u, V = F && F.appearance && F.appearance.class || "", z = V ? V.split(" ") : [];
|
|
1456
|
+
f = {
|
|
1457
|
+
componentClass: v,
|
|
1458
|
+
componentClassList: M,
|
|
1459
|
+
childContents: k,
|
|
1460
|
+
firstChildContent: D,
|
|
1461
|
+
firstChildClass: x,
|
|
1462
|
+
firstChildClassList: L,
|
|
1463
|
+
parent: F,
|
|
1464
|
+
parentClass: V,
|
|
1465
|
+
parentClassList: z,
|
|
1466
|
+
children: k,
|
|
1467
|
+
childrenClassList: $
|
|
1468
|
+
};
|
|
1469
|
+
const { canAccept: E, fixed: Q, hidePadding: U } = a.getRuleValue(M[0], f);
|
|
1470
|
+
return s = E, l = U, b = Q, !0;
|
|
1473
1471
|
}
|
|
1474
|
-
function
|
|
1475
|
-
|
|
1472
|
+
function c(d) {
|
|
1473
|
+
ue();
|
|
1476
1474
|
}
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1475
|
+
function r() {
|
|
1476
|
+
return t.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
1477
|
+
}
|
|
1478
|
+
function p(d, v) {
|
|
1479
|
+
const M = t;
|
|
1480
|
+
if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1481
|
+
const { label: x } = d, L = q("form-group");
|
|
1482
|
+
return L.editor = v, L.label = x, y(L), delete L.editor.id, delete L.editor.binding, delete L.editor.appearance, delete L.editor.visible, L;
|
|
1482
1483
|
}
|
|
1483
|
-
return
|
|
1484
|
+
return v;
|
|
1484
1485
|
}
|
|
1485
|
-
function
|
|
1486
|
-
const
|
|
1487
|
-
if (
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1486
|
+
function y(d) {
|
|
1487
|
+
const v = n.componentInstance.value.getBelongedComponentInstance(n.componentInstance);
|
|
1488
|
+
if (v && v.schema && v.schema.componentType) {
|
|
1489
|
+
const M = v.schema.componentType, k = T(M);
|
|
1490
|
+
d.appearance || (d.appearance = {}), d.appearance.class = k;
|
|
1490
1491
|
}
|
|
1491
|
-
return S;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
|
|
1493
|
+
function T(d) {
|
|
1494
|
+
let v = "";
|
|
1495
|
+
switch (d) {
|
|
1496
|
+
case "form-col-1": {
|
|
1497
|
+
v = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
case "form-col-12": {
|
|
1501
|
+
v = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1502
|
+
break;
|
|
1503
|
+
}
|
|
1504
|
+
case "form-col-2": {
|
|
1505
|
+
v = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1506
|
+
break;
|
|
1507
|
+
}
|
|
1508
|
+
case "form-col-3": {
|
|
1509
|
+
v = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1510
|
+
break;
|
|
1511
|
+
}
|
|
1512
|
+
case "form-col-4": {
|
|
1513
|
+
v = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1514
|
+
break;
|
|
1515
|
+
}
|
|
1516
|
+
case "form-col-6": {
|
|
1517
|
+
v = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1518
|
+
break;
|
|
1519
|
+
}
|
|
1520
|
+
case "frame": {
|
|
1521
|
+
v = "col-12";
|
|
1522
|
+
break;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
return v;
|
|
1526
|
+
}
|
|
1527
|
+
function C(d, v, M) {
|
|
1528
|
+
const k = t;
|
|
1529
|
+
if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1530
|
+
const L = String(d.innerText), $ = q("form-group");
|
|
1531
|
+
return $.editor = M, $.label = L, $;
|
|
1532
|
+
}
|
|
1533
|
+
return M;
|
|
1534
|
+
}
|
|
1535
|
+
function S() {
|
|
1536
|
+
return !b;
|
|
1495
1537
|
}
|
|
1496
|
-
function
|
|
1497
|
-
return !
|
|
1538
|
+
function A() {
|
|
1539
|
+
return !b;
|
|
1498
1540
|
}
|
|
1499
|
-
function
|
|
1500
|
-
return
|
|
1541
|
+
function j() {
|
|
1542
|
+
return l;
|
|
1501
1543
|
}
|
|
1502
1544
|
return {
|
|
1503
|
-
canAccepts:
|
|
1504
|
-
checkCanDeleteComponent:
|
|
1505
|
-
checkCanMoveComponent:
|
|
1506
|
-
getStyles:
|
|
1507
|
-
hideNestedPaddingInDesginerView:
|
|
1508
|
-
onAcceptNewChildElement:
|
|
1509
|
-
onAcceptMovedChildElement:
|
|
1510
|
-
resolveComponentContext:
|
|
1511
|
-
onResolveNewComponentSchema:
|
|
1512
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1513
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1545
|
+
canAccepts: m,
|
|
1546
|
+
checkCanDeleteComponent: A,
|
|
1547
|
+
checkCanMoveComponent: S,
|
|
1548
|
+
getStyles: r,
|
|
1549
|
+
hideNestedPaddingInDesginerView: j,
|
|
1550
|
+
onAcceptNewChildElement: C,
|
|
1551
|
+
onAcceptMovedChildElement: c,
|
|
1552
|
+
resolveComponentContext: P,
|
|
1553
|
+
onResolveNewComponentSchema: p,
|
|
1554
|
+
triggerBelongedComponentToMoveWhenMoved: g,
|
|
1555
|
+
triggerBelongedComponentToDeleteWhenDeleted: o
|
|
1514
1556
|
};
|
|
1515
1557
|
}
|
|
1516
|
-
const
|
|
1558
|
+
const Ie = /* @__PURE__ */ K({
|
|
1517
1559
|
name: "FPagination",
|
|
1518
|
-
props:
|
|
1560
|
+
props: Z,
|
|
1519
1561
|
emits: ["pageIndexChanged", "pageSizeChanged"],
|
|
1520
1562
|
setup(n, e) {
|
|
1521
|
-
var
|
|
1522
|
-
const t =
|
|
1523
|
-
|
|
1563
|
+
var W;
|
|
1564
|
+
const t = N(!1), u = N(n.mode), a = N(""), g = N(!1), o = N(n.pageSize), s = N(n.currentPage), l = N(n.totalItems), f = N(), b = fe("design-item-context"), h = Ze(b.schema, (W = b.parent) == null ? void 0 : W.schema), m = ze(f, b, h);
|
|
1565
|
+
de(() => {
|
|
1524
1566
|
f.value.componentInstance = m;
|
|
1525
1567
|
}), e.expose(m.value);
|
|
1526
1568
|
const {
|
|
1527
|
-
pages:
|
|
1528
|
-
updatePages:
|
|
1529
|
-
} =
|
|
1569
|
+
pages: P,
|
|
1570
|
+
updatePages: c
|
|
1571
|
+
} = le(), r = w(() => s.value === 1), p = w(() => [20, 50, 100]), y = w(() => Math.ceil(l.value / o.value)), T = w(() => s.value === y.value), C = w(() => !0), S = w(() => s.value > 1), A = w(() => !(g.value && P.value.length <= 1)), j = w(() => !0), O = w(() => !0), d = w(() => !0), v = w(() => !0), {
|
|
1530
1572
|
renderFirstPage: M,
|
|
1531
|
-
renderPreviousPage:
|
|
1532
|
-
} =
|
|
1573
|
+
renderPreviousPage: k
|
|
1574
|
+
} = ce(s, r, S), {
|
|
1533
1575
|
renderLastPage: D,
|
|
1534
1576
|
renderNextPage: x
|
|
1535
|
-
} =
|
|
1536
|
-
renderPageInfo:
|
|
1537
|
-
} =
|
|
1538
|
-
renderPageList:
|
|
1539
|
-
} =
|
|
1540
|
-
renderPageNumbers:
|
|
1541
|
-
} =
|
|
1542
|
-
renderGotoButton:
|
|
1543
|
-
} =
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
}),
|
|
1547
|
-
e.emit("pageIndexChanged",
|
|
1548
|
-
}),
|
|
1577
|
+
} = oe(s, T, y), {
|
|
1578
|
+
renderPageInfo: L
|
|
1579
|
+
} = ae(a, l), {
|
|
1580
|
+
renderPageList: $
|
|
1581
|
+
} = se(s, o, p, l), {
|
|
1582
|
+
renderPageNumbers: F
|
|
1583
|
+
} = re(s, P), {
|
|
1584
|
+
renderGotoButton: V
|
|
1585
|
+
} = ne(s, y);
|
|
1586
|
+
c(s.value, o.value, l.value, 7), B([s, o], () => {
|
|
1587
|
+
c(s.value, o.value, l.value, 7);
|
|
1588
|
+
}), B(s, () => {
|
|
1589
|
+
e.emit("pageIndexChanged", s.value);
|
|
1590
|
+
}), B(o, () => {
|
|
1549
1591
|
e.emit("pageSizeChanged", o.value);
|
|
1550
1592
|
});
|
|
1551
|
-
const
|
|
1593
|
+
const z = w(() => ({
|
|
1552
1594
|
"ngx-pagination": !0,
|
|
1553
1595
|
pagination: !0,
|
|
1554
1596
|
responsive: t.value,
|
|
1555
|
-
"pager-viewmode-default":
|
|
1556
|
-
"pager-viewmode-simple":
|
|
1557
|
-
})),
|
|
1597
|
+
"pager-viewmode-default": u.value === "default",
|
|
1598
|
+
"pager-viewmode-simple": u.value === "simple"
|
|
1599
|
+
})), E = w(() => ({
|
|
1558
1600
|
position: "relative",
|
|
1559
|
-
"justify-content":
|
|
1601
|
+
"justify-content": a.value === "center" ? "center" : "start"
|
|
1560
1602
|
}));
|
|
1561
|
-
function
|
|
1562
|
-
return i(
|
|
1603
|
+
function Q() {
|
|
1604
|
+
return i(_, null, [j.value && L(), O.value && $(), v.value && M(), v.value && k(), d.value && F(), v.value && x(), v.value && D(), C.value && V()]);
|
|
1563
1605
|
}
|
|
1564
|
-
function
|
|
1565
|
-
return i(
|
|
1606
|
+
function U() {
|
|
1607
|
+
return i(_, null, [i("li", {
|
|
1566
1608
|
class: "page-item d-flex flex-fill"
|
|
1567
|
-
}, null),
|
|
1609
|
+
}, null), v.value && M(), v.value && k(), V(), i("li", {
|
|
1568
1610
|
class: "page-item page-separator",
|
|
1569
1611
|
style: "margin-left: 10px"
|
|
1570
1612
|
}, [i("span", {
|
|
1571
1613
|
style: "font-size: 15px; font-weight: 200;"
|
|
1572
|
-
}, [
|
|
1614
|
+
}, [H(" /")])]), i("li", {
|
|
1573
1615
|
class: "page-item page-total",
|
|
1574
1616
|
style: "margin-left: 5px"
|
|
1575
1617
|
}, [i("span", {
|
|
1576
1618
|
style: "font-size: 16px; font-weight: 600;"
|
|
1577
|
-
}, [
|
|
1619
|
+
}, [H(" "), y.value])]), v.value && x(), v.value && D()]);
|
|
1578
1620
|
}
|
|
1579
1621
|
return () => i("div", {
|
|
1580
1622
|
ref: f,
|
|
1581
1623
|
class: "pagination-container"
|
|
1582
|
-
}, [
|
|
1624
|
+
}, [A.value && i("ul", {
|
|
1583
1625
|
role: "navigation",
|
|
1584
|
-
class:
|
|
1585
|
-
style:
|
|
1586
|
-
}, [
|
|
1626
|
+
class: z.value,
|
|
1627
|
+
style: E.value
|
|
1628
|
+
}, [u.value === "default" ? Q() : U()])]);
|
|
1587
1629
|
}
|
|
1588
1630
|
});
|
|
1589
|
-
|
|
1590
|
-
n.pagination =
|
|
1631
|
+
J.register = (n, e, t) => {
|
|
1632
|
+
n.pagination = J, e.pagination = te;
|
|
1591
1633
|
};
|
|
1592
|
-
|
|
1593
|
-
n.pagination =
|
|
1634
|
+
J.registerDesigner = (n, e, t) => {
|
|
1635
|
+
n.pagination = Ie, e.pagination = te;
|
|
1594
1636
|
};
|
|
1595
|
-
const
|
|
1637
|
+
const tt = be(J);
|
|
1596
1638
|
export {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1639
|
+
J as FPagination,
|
|
1640
|
+
tt as default,
|
|
1641
|
+
Z as paginationProps,
|
|
1642
|
+
te as propsResolver
|
|
1601
1643
|
};
|