@farris/ui-vue 1.3.5 → 1.3.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 +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,59 +1,73 @@
|
|
|
1
|
-
import { ref as m, watch as M, createVNode as r, computed as d, defineComponent as J, watchEffect as
|
|
2
|
-
import { isPlainObject as H, cloneDeep as
|
|
1
|
+
import { ref as m, watch as M, createVNode as r, computed as d, defineComponent as J, watchEffect as re, Fragment as A, createTextVNode as R, inject as ie, onMounted as ue } from "vue";
|
|
2
|
+
import { isPlainObject as H, cloneDeep as Q } from "lodash-es";
|
|
3
3
|
import { withInstall as ce } from "../common/index.esm.js";
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const { properties: e, title: p, ignore: i } = t,
|
|
7
|
-
if (p && (!
|
|
4
|
+
const U = {}, X = {};
|
|
5
|
+
function G(t) {
|
|
6
|
+
const { properties: e, title: p, ignore: i } = t, n = i && Array.isArray(i), c = Object.keys(e).reduce((a, l) => ((!n || !i.find((u) => u === l)) && (a[l] = e[l].type === "object" && e[l].properties ? G(e[l]) : Q(e[l].default)), a), {});
|
|
7
|
+
if (p && (!n || !i.find((a) => a === "id"))) {
|
|
8
8
|
const a = p.toLowerCase().replace(/-/g, "_");
|
|
9
9
|
c.id = `${a}_${Math.random().toString().slice(2, 6)}`;
|
|
10
10
|
}
|
|
11
11
|
return c;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const i =
|
|
13
|
+
function pe(t) {
|
|
14
|
+
const { properties: e, title: p, required: i } = t;
|
|
15
|
+
if (i && Array.isArray(i)) {
|
|
16
|
+
const n = i.reduce((c, a) => (c[a] = e[a].type === "object" && e[a].properties ? G(e[a]) : Q(e[a].default), c), {});
|
|
17
|
+
if (p && i.find((c) => c === "id")) {
|
|
18
|
+
const c = p.toLowerCase().replace(/-/g, "_");
|
|
19
|
+
n.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
type: p
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function Y(t, e = {}, p) {
|
|
28
|
+
const i = U[t];
|
|
15
29
|
if (i) {
|
|
16
|
-
let
|
|
17
|
-
const c =
|
|
18
|
-
return
|
|
30
|
+
let n = pe(i);
|
|
31
|
+
const c = X[t];
|
|
32
|
+
return n = c ? c({ getSchemaByType: Y }, n, e, p) : n, n;
|
|
19
33
|
}
|
|
20
34
|
return null;
|
|
21
35
|
}
|
|
22
|
-
function pe(t, e) {
|
|
23
|
-
const p = q(e);
|
|
24
|
-
return Object.keys(p).reduce((i, l) => (i[l] && H(i[l]) && H(t[l] || !t[l]) ? Object.assign(i[l], t[l] || {}) : i[l] = t[l], i), p), p;
|
|
25
|
-
}
|
|
26
36
|
function fe(t, e) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
const p = G(e);
|
|
38
|
+
return Object.keys(p).reduce((i, n) => (Object.prototype.hasOwnProperty.call(t, n) && (i[n] && H(i[n]) && H(t[n] || !t[n]) ? Object.assign(i[n], t[n] || {}) : i[n] = t[n]), i), p), p;
|
|
39
|
+
}
|
|
40
|
+
function ve(t, e) {
|
|
41
|
+
return Object.keys(t).filter((i) => t[i] != null).reduce((i, n) => {
|
|
42
|
+
if (e.has(n)) {
|
|
43
|
+
const c = e.get(n);
|
|
30
44
|
if (typeof c == "string")
|
|
31
|
-
i[c] = t[
|
|
45
|
+
i[c] = t[n];
|
|
32
46
|
else {
|
|
33
|
-
const a = c(
|
|
47
|
+
const a = c(n, t[n], t);
|
|
34
48
|
Object.assign(i, a);
|
|
35
49
|
}
|
|
36
50
|
} else
|
|
37
|
-
i[
|
|
51
|
+
i[n] = t[n];
|
|
38
52
|
return i;
|
|
39
53
|
}, {});
|
|
40
54
|
}
|
|
41
|
-
function
|
|
42
|
-
const i =
|
|
43
|
-
return
|
|
55
|
+
function ge(t, e, p = /* @__PURE__ */ new Map()) {
|
|
56
|
+
const i = fe(t, e);
|
|
57
|
+
return ve(i, p);
|
|
44
58
|
}
|
|
45
|
-
function
|
|
59
|
+
function de(t = {}) {
|
|
46
60
|
function e(o, s, f, v) {
|
|
47
61
|
if (typeof f == "number")
|
|
48
62
|
return v[o].length === f;
|
|
49
63
|
if (typeof f == "object") {
|
|
50
|
-
const h = Object.keys(f)[0],
|
|
64
|
+
const h = Object.keys(f)[0], b = f[h];
|
|
51
65
|
if (h === "not")
|
|
52
|
-
return Number(v[o].length) !== Number(
|
|
66
|
+
return Number(v[o].length) !== Number(b);
|
|
53
67
|
if (h === "moreThan")
|
|
54
|
-
return Number(v[o].length) >= Number(
|
|
68
|
+
return Number(v[o].length) >= Number(b);
|
|
55
69
|
if (h === "lessThan")
|
|
56
|
-
return Number(v[o].length) <= Number(
|
|
70
|
+
return Number(v[o].length) <= Number(b);
|
|
57
71
|
}
|
|
58
72
|
return !1;
|
|
59
73
|
}
|
|
@@ -65,18 +79,18 @@ function ge(t = {}) {
|
|
|
65
79
|
["getProperty", p]
|
|
66
80
|
]);
|
|
67
81
|
Object.keys(t).reduce((o, s) => (o.set(s, t[s]), o), i);
|
|
68
|
-
function
|
|
82
|
+
function n(o, s) {
|
|
69
83
|
const f = o;
|
|
70
84
|
return typeof s == "number" ? [{ target: f, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: f, operator: "getProperty", param: o, value: !!s }] : typeof s == "object" ? Object.keys(s).map((v) => {
|
|
71
85
|
if (v === "length")
|
|
72
86
|
return { target: f, operator: "length", param: null, value: s[v] };
|
|
73
|
-
const h = v,
|
|
74
|
-
return { target: f, operator: "getProperty", param: h, value:
|
|
87
|
+
const h = v, b = s[v];
|
|
88
|
+
return { target: f, operator: "getProperty", param: h, value: b };
|
|
75
89
|
}) : [];
|
|
76
90
|
}
|
|
77
91
|
function c(o) {
|
|
78
92
|
return Object.keys(o).reduce((f, v) => {
|
|
79
|
-
const h =
|
|
93
|
+
const h = n(v, o[v]);
|
|
80
94
|
return f.push(...h), f;
|
|
81
95
|
}, []);
|
|
82
96
|
}
|
|
@@ -87,29 +101,29 @@ function ge(t = {}) {
|
|
|
87
101
|
}
|
|
88
102
|
return !1;
|
|
89
103
|
}
|
|
90
|
-
function
|
|
91
|
-
return c(o).reduce((h,
|
|
104
|
+
function l(o, s) {
|
|
105
|
+
return c(o).reduce((h, b) => h && a(b, s), !0);
|
|
92
106
|
}
|
|
93
107
|
function u(o, s) {
|
|
94
|
-
const f = Object.keys(o), v = f.includes("allOf"), h = f.includes("anyOf"),
|
|
108
|
+
const f = Object.keys(o), v = f.includes("allOf"), h = f.includes("anyOf"), b = v || h, w = (b ? o[b ? v ? "allOf" : "anyOf" : "allOf"] : [o]).map((O) => l(O, s));
|
|
95
109
|
return v ? !w.includes(!1) : w.includes(!0);
|
|
96
110
|
}
|
|
97
111
|
return { parseValueSchema: u };
|
|
98
112
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
return
|
|
103
|
-
const
|
|
104
|
-
return Object.assign(u,
|
|
113
|
+
const me = {}, he = {};
|
|
114
|
+
de();
|
|
115
|
+
function ye(t, e, p = /* @__PURE__ */ new Map(), i = (a, l, u, o) => l, n = {}, c = (a) => a) {
|
|
116
|
+
return U[e.title] = e, X[e.title] = i, me[e.title] = n, he[e.title] = c, (a = {}) => {
|
|
117
|
+
const l = ge(a, e, p), u = Object.keys(t).reduce((o, s) => (o[s] = t[s].default, o), {});
|
|
118
|
+
return Object.assign(u, l);
|
|
105
119
|
};
|
|
106
120
|
}
|
|
107
121
|
function be(t, e) {
|
|
108
122
|
return { customClass: e.class, customStyle: e.style };
|
|
109
123
|
}
|
|
110
|
-
const
|
|
124
|
+
const Pe = /* @__PURE__ */ new Map([
|
|
111
125
|
["appearance", be]
|
|
112
|
-
]),
|
|
126
|
+
]), we = "https://json-schema.org/draft/2020-12/schema", Se = "https://farris-design.gitee.io/pagination.schema.json", je = "pagination", ke = "A Farris Component", Ne = "object", Oe = {
|
|
113
127
|
id: {
|
|
114
128
|
description: "The unique identifier for a pagination",
|
|
115
129
|
type: "string"
|
|
@@ -201,18 +215,18 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
201
215
|
type: "sting",
|
|
202
216
|
default: ""
|
|
203
217
|
}
|
|
204
|
-
},
|
|
218
|
+
}, Me = [
|
|
205
219
|
"id",
|
|
206
220
|
"type"
|
|
207
|
-
],
|
|
208
|
-
$schema:
|
|
209
|
-
$id:
|
|
210
|
-
title:
|
|
211
|
-
description:
|
|
212
|
-
type:
|
|
213
|
-
properties:
|
|
214
|
-
required:
|
|
215
|
-
},
|
|
221
|
+
], Le = {
|
|
222
|
+
$schema: we,
|
|
223
|
+
$id: Se,
|
|
224
|
+
title: je,
|
|
225
|
+
description: ke,
|
|
226
|
+
type: Ne,
|
|
227
|
+
properties: Oe,
|
|
228
|
+
required: Me
|
|
229
|
+
}, Te = "pagination", Be = "A Farris Component", Ee = "object", $e = {
|
|
216
230
|
basic: {
|
|
217
231
|
description: "Basic Infomation",
|
|
218
232
|
title: "基本信息",
|
|
@@ -295,15 +309,15 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
295
309
|
}
|
|
296
310
|
}
|
|
297
311
|
}, ze = {
|
|
298
|
-
title:
|
|
299
|
-
description:
|
|
300
|
-
type:
|
|
301
|
-
categories:
|
|
312
|
+
title: Te,
|
|
313
|
+
description: Be,
|
|
314
|
+
type: Ee,
|
|
315
|
+
categories: $e
|
|
302
316
|
};
|
|
303
|
-
function
|
|
317
|
+
function De(t, e, p) {
|
|
304
318
|
return e;
|
|
305
319
|
}
|
|
306
|
-
const
|
|
320
|
+
const _ = {
|
|
307
321
|
/**
|
|
308
322
|
* 当前页码
|
|
309
323
|
*/
|
|
@@ -336,15 +350,15 @@ const W = {
|
|
|
336
350
|
* 自定义每页数量
|
|
337
351
|
*/
|
|
338
352
|
pageList: { type: Array, default: [20, 50, 100] }
|
|
339
|
-
},
|
|
340
|
-
function
|
|
341
|
-
const
|
|
353
|
+
}, Z = ye(_, Le, Pe, De, ze);
|
|
354
|
+
function I(t, e, p, i) {
|
|
355
|
+
const n = m("跳转至"), c = m(""), a = m(t.value);
|
|
342
356
|
M(a, (s, f) => {
|
|
343
357
|
s >= 1 && s <= e.value ? t.value = s : a.value = f;
|
|
344
358
|
}), M(t, (s) => {
|
|
345
359
|
a.value !== s && (a.value = s);
|
|
346
360
|
});
|
|
347
|
-
function
|
|
361
|
+
function l(s) {
|
|
348
362
|
a.value = s.target.valueAsNumber, i.emit("change", {
|
|
349
363
|
pageIndex: a.value,
|
|
350
364
|
pageSize: p.value
|
|
@@ -362,14 +376,14 @@ function Z(t, e, p, i) {
|
|
|
362
376
|
style: "padding-left: 10px; white-space: nowrap;"
|
|
363
377
|
}, [r("span", {
|
|
364
378
|
class: "pg-message-text"
|
|
365
|
-
}, [
|
|
379
|
+
}, [n.value]), r("input", {
|
|
366
380
|
type: "number",
|
|
367
381
|
class: "form-control farris-gotopagenumber",
|
|
368
382
|
value: a.value,
|
|
369
383
|
min: "1",
|
|
370
384
|
max: e.value,
|
|
371
385
|
style: "display: inline-block;margin-left:3px;",
|
|
372
|
-
onBlur: (s) =>
|
|
386
|
+
onBlur: (s) => l(s),
|
|
373
387
|
onKeyup: (s) => u(s)
|
|
374
388
|
}, null), c.value]);
|
|
375
389
|
}
|
|
@@ -377,19 +391,19 @@ function Z(t, e, p, i) {
|
|
|
377
391
|
renderGotoButton: o
|
|
378
392
|
};
|
|
379
393
|
}
|
|
380
|
-
function
|
|
394
|
+
function K(t, e, p, i, n) {
|
|
381
395
|
const c = d(() => ({
|
|
382
396
|
"page-item": !0,
|
|
383
397
|
disabled: e.value
|
|
384
398
|
}));
|
|
385
399
|
function a(s) {
|
|
386
|
-
t.value = t.value < p.value ? t.value + 1 : p.value,
|
|
400
|
+
t.value = t.value < p.value ? t.value + 1 : p.value, n.emit("change", {
|
|
387
401
|
pageIndex: t.value,
|
|
388
402
|
pageSize: i.value
|
|
389
403
|
});
|
|
390
404
|
}
|
|
391
|
-
function
|
|
392
|
-
t.value = p.value,
|
|
405
|
+
function l(s) {
|
|
406
|
+
t.value = p.value, n.emit("change", {
|
|
393
407
|
pageIndex: t.value,
|
|
394
408
|
pageSize: i.value
|
|
395
409
|
});
|
|
@@ -415,7 +429,7 @@ function I(t, e, p, i, l) {
|
|
|
415
429
|
}, [!e.value && r("a", {
|
|
416
430
|
class: "page-link",
|
|
417
431
|
tabindex: "0",
|
|
418
|
-
onClick: (s) =>
|
|
432
|
+
onClick: (s) => l()
|
|
419
433
|
}, [r("span", {
|
|
420
434
|
class: "f-icon f-page-last"
|
|
421
435
|
}, null)]), e.value && r("span", {
|
|
@@ -429,8 +443,8 @@ function I(t, e, p, i, l) {
|
|
|
429
443
|
renderNextPage: u
|
|
430
444
|
};
|
|
431
445
|
}
|
|
432
|
-
function
|
|
433
|
-
const p = m("共"), i = m("条"),
|
|
446
|
+
function ee(t, e) {
|
|
447
|
+
const p = m("共"), i = m("条"), n = d(() => ({
|
|
434
448
|
"pagination-message": !0,
|
|
435
449
|
"text-truncate": !0,
|
|
436
450
|
"d-flex": !0,
|
|
@@ -439,7 +453,7 @@ function K(t, e) {
|
|
|
439
453
|
}));
|
|
440
454
|
function c() {
|
|
441
455
|
return r("li", {
|
|
442
|
-
class:
|
|
456
|
+
class: n.value
|
|
443
457
|
}, [r("div", {
|
|
444
458
|
class: "text-truncate",
|
|
445
459
|
style: "line-height: 26px"
|
|
@@ -455,8 +469,8 @@ function K(t, e) {
|
|
|
455
469
|
renderPageInfo: c
|
|
456
470
|
};
|
|
457
471
|
}
|
|
458
|
-
function
|
|
459
|
-
const c = m(!1), a = m("显示"),
|
|
472
|
+
function te(t, e, p, i, n) {
|
|
473
|
+
const c = m(!1), a = m("显示"), l = m("条"), u = d(() => ({
|
|
460
474
|
dropup: !0,
|
|
461
475
|
"dropdown-right": !0,
|
|
462
476
|
"pg-pagelist": !0,
|
|
@@ -465,23 +479,23 @@ function ee(t, e, p, i, l) {
|
|
|
465
479
|
})), o = d(() => ({
|
|
466
480
|
"dropdown-menu": !0,
|
|
467
481
|
show: c.value
|
|
468
|
-
})), s = (
|
|
482
|
+
})), s = (y) => ({
|
|
469
483
|
"w-100": !0,
|
|
470
484
|
"dropdown-item": !0,
|
|
471
|
-
active: e.value ===
|
|
485
|
+
active: e.value === y
|
|
472
486
|
});
|
|
473
|
-
function f(
|
|
487
|
+
function f(y) {
|
|
474
488
|
c.value = !0;
|
|
475
489
|
}
|
|
476
|
-
function v(
|
|
490
|
+
function v(y) {
|
|
477
491
|
c.value = !1;
|
|
478
492
|
}
|
|
479
|
-
function h(
|
|
480
|
-
const T =
|
|
493
|
+
function h(y, w, N) {
|
|
494
|
+
const T = y * w - w + 1;
|
|
481
495
|
return Math.ceil(T / N);
|
|
482
496
|
}
|
|
483
|
-
function y
|
|
484
|
-
t.value = h(t.value, e.value, w), e.value = w, c.value = !1,
|
|
497
|
+
function b(y, w) {
|
|
498
|
+
t.value = h(t.value, e.value, w), e.value = w, c.value = !1, n.emit("change", {
|
|
485
499
|
pageIndex: t.value,
|
|
486
500
|
pageSize: e.value
|
|
487
501
|
});
|
|
@@ -491,8 +505,8 @@ function ee(t, e, p, i, l) {
|
|
|
491
505
|
class: "pagination-pagelist"
|
|
492
506
|
}, [r("div", {
|
|
493
507
|
class: u.value,
|
|
494
|
-
onMouseenter: (
|
|
495
|
-
onMouseleave: (
|
|
508
|
+
onMouseenter: (y) => f(),
|
|
509
|
+
onMouseleave: (y) => v()
|
|
496
510
|
}, [r("div", {
|
|
497
511
|
class: "pg-pagelist-info"
|
|
498
512
|
}, [r("span", {
|
|
@@ -501,22 +515,22 @@ function ee(t, e, p, i, l) {
|
|
|
501
515
|
class: "cur-pagesize"
|
|
502
516
|
}, [e.value]), r("span", {
|
|
503
517
|
class: "pagelist-text"
|
|
504
|
-
}, [
|
|
518
|
+
}, [l.value]), r("i", {
|
|
505
519
|
class: "f-icon f-icon-dropdown"
|
|
506
520
|
}, null)]), r("div", {
|
|
507
521
|
class: o.value,
|
|
508
522
|
style: "margin-bottom: -1px;"
|
|
509
|
-
}, [p.value.map((
|
|
510
|
-
class: s(
|
|
511
|
-
onClick: (w) =>
|
|
512
|
-
}, [r("span", null, [
|
|
523
|
+
}, [p.value.map((y) => r("li", {
|
|
524
|
+
class: s(y),
|
|
525
|
+
onClick: (w) => b(w, y)
|
|
526
|
+
}, [r("span", null, [y])]))])])]);
|
|
513
527
|
}
|
|
514
528
|
return {
|
|
515
529
|
renderPageList: k
|
|
516
530
|
};
|
|
517
531
|
}
|
|
518
|
-
function
|
|
519
|
-
const
|
|
532
|
+
function ae(t, e, p, i) {
|
|
533
|
+
const n = (u) => ({
|
|
520
534
|
"page-item": !0,
|
|
521
535
|
current: t.value === u.value,
|
|
522
536
|
ellipsis: u.label === "..."
|
|
@@ -531,9 +545,9 @@ function te(t, e, p, i) {
|
|
|
531
545
|
pageSize: p.value
|
|
532
546
|
});
|
|
533
547
|
}
|
|
534
|
-
function
|
|
548
|
+
function l() {
|
|
535
549
|
return e.value.map((u) => r("li", {
|
|
536
|
-
class:
|
|
550
|
+
class: n(u)
|
|
537
551
|
}, [t.value !== u.value && r("a", {
|
|
538
552
|
class: "page-link",
|
|
539
553
|
tabindex: "0",
|
|
@@ -547,22 +561,22 @@ function te(t, e, p, i) {
|
|
|
547
561
|
}, [u.label])]));
|
|
548
562
|
}
|
|
549
563
|
return {
|
|
550
|
-
renderPageNumbers:
|
|
564
|
+
renderPageNumbers: l
|
|
551
565
|
};
|
|
552
566
|
}
|
|
553
|
-
function
|
|
567
|
+
function ne(t, e, p, i, n) {
|
|
554
568
|
const c = d(() => ({
|
|
555
569
|
"page-item": !0,
|
|
556
570
|
disabled: e.value
|
|
557
571
|
}));
|
|
558
572
|
function a(s) {
|
|
559
|
-
t.value = 1,
|
|
573
|
+
t.value = 1, n.emit("change", {
|
|
560
574
|
pageIndex: t.value,
|
|
561
575
|
pageSize: i.value
|
|
562
576
|
});
|
|
563
577
|
}
|
|
564
|
-
function
|
|
565
|
-
t.value = t.value > 2 ? t.value - 1 : 1,
|
|
578
|
+
function l(s) {
|
|
579
|
+
t.value = t.value > 2 ? t.value - 1 : 1, n.emit("change", {
|
|
566
580
|
pageIndex: t.value,
|
|
567
581
|
pageSize: i.value
|
|
568
582
|
});
|
|
@@ -588,7 +602,7 @@ function ae(t, e, p, i, l) {
|
|
|
588
602
|
}, [p.value && r("a", {
|
|
589
603
|
tabindex: "0",
|
|
590
604
|
class: "page-link",
|
|
591
|
-
onClick: (s) =>
|
|
605
|
+
onClick: (s) => l()
|
|
592
606
|
}, [r("span", {
|
|
593
607
|
class: "f-icon f-page-pre"
|
|
594
608
|
}, null)]), e.value && r("span", {
|
|
@@ -602,18 +616,18 @@ function ae(t, e, p, i, l) {
|
|
|
602
616
|
renderPreviousPage: o
|
|
603
617
|
};
|
|
604
618
|
}
|
|
605
|
-
function
|
|
619
|
+
function le(t) {
|
|
606
620
|
const e = m([]);
|
|
607
|
-
function p(
|
|
621
|
+
function p(n, c, a, l) {
|
|
608
622
|
const u = Math.ceil(a / 2);
|
|
609
|
-
return
|
|
623
|
+
return n === a ? l : n === 1 ? n : a < l ? l - u < c ? l - a + n : u < c ? c - u + n : n : n;
|
|
610
624
|
}
|
|
611
|
-
function i(
|
|
612
|
-
const u = [], o = Math.ceil(a / c), s = Math.ceil(
|
|
625
|
+
function i(n, c, a, l) {
|
|
626
|
+
const u = [], o = Math.ceil(a / c), s = Math.ceil(l / 2), f = n <= s, v = o - s < n, h = !f && !v, b = l < o;
|
|
613
627
|
let k = 1;
|
|
614
|
-
for (; k <= o && k <=
|
|
615
|
-
const
|
|
616
|
-
u.push({ label: O, value:
|
|
628
|
+
for (; k <= o && k <= l; ) {
|
|
629
|
+
const y = p(k, n, l, o), w = k === 2 && (h || v), N = k === l - 1 && (h || f), O = b && (w || N) ? "..." : "" + y;
|
|
630
|
+
u.push({ label: O, value: y }), k++;
|
|
617
631
|
}
|
|
618
632
|
e.value = u;
|
|
619
633
|
}
|
|
@@ -621,48 +635,48 @@ function ne(t) {
|
|
|
621
635
|
}
|
|
622
636
|
const V = /* @__PURE__ */ J({
|
|
623
637
|
name: "FPagination",
|
|
624
|
-
props:
|
|
638
|
+
props: _,
|
|
625
639
|
emits: ["change", "pageIndexChanged", "pageSizeChanged", "update:currentPage", "update:pageSize"],
|
|
626
640
|
setup(t, e) {
|
|
627
|
-
const p = m(!1), i = m(t.mode),
|
|
641
|
+
const p = m(!1), i = m(t.mode), n = m(""), c = m(!1), a = m(t.pageSize), l = m(t.currentPage), u = m(t.totalItems), {
|
|
628
642
|
pages: o,
|
|
629
643
|
updatePages: s
|
|
630
|
-
} =
|
|
644
|
+
} = le(), f = d(() => l.value === 1), v = d(() => t.pageList), h = d(() => Math.ceil(u.value / a.value)), b = d(() => l.value === h.value), k = d(() => t.showGoButton), y = d(() => l.value > 1), w = d(() => !(c.value && o.value.length <= 1)), N = d(() => !0), O = d(() => t.showPageList), T = d(() => t.showPageNumbers), g = d(() => !0), {
|
|
631
645
|
renderFirstPage: j,
|
|
632
646
|
renderPreviousPage: S
|
|
633
|
-
} =
|
|
647
|
+
} = ne(l, f, y, a, e), {
|
|
634
648
|
renderLastPage: P,
|
|
635
649
|
renderNextPage: B
|
|
636
|
-
} =
|
|
650
|
+
} = K(l, b, h, a, e), {
|
|
637
651
|
renderPageInfo: E
|
|
638
|
-
} =
|
|
639
|
-
renderPageList:
|
|
640
|
-
} =
|
|
641
|
-
renderPageNumbers:
|
|
642
|
-
} =
|
|
652
|
+
} = ee(n, u), {
|
|
653
|
+
renderPageList: $
|
|
654
|
+
} = te(l, a, v, u, e), {
|
|
655
|
+
renderPageNumbers: z
|
|
656
|
+
} = ae(l, o, a, e), {
|
|
643
657
|
renderGotoButton: D
|
|
644
|
-
} =
|
|
645
|
-
s(
|
|
658
|
+
} = I(l, h, a, e);
|
|
659
|
+
s(l.value, a.value, u.value, 7), M(() => t.totalItems, (L) => {
|
|
646
660
|
u.value = L;
|
|
647
|
-
}), M([
|
|
648
|
-
s(
|
|
649
|
-
}), M(
|
|
650
|
-
e.emit("update:currentPage",
|
|
651
|
-
pageIndex:
|
|
661
|
+
}), M([l, a, u], () => {
|
|
662
|
+
s(l.value, a.value, u.value, 7);
|
|
663
|
+
}), M(l, () => {
|
|
664
|
+
e.emit("update:currentPage", l.value), e.emit("pageIndexChanged", {
|
|
665
|
+
pageIndex: l.value,
|
|
652
666
|
pageSize: a.value
|
|
653
667
|
});
|
|
654
668
|
}), M(a, () => {
|
|
655
669
|
e.emit("update:pageSize", a.value), e.emit("pageSizeChanged", {
|
|
656
|
-
pageIndex:
|
|
670
|
+
pageIndex: l.value,
|
|
657
671
|
pageSize: a.value
|
|
658
672
|
});
|
|
659
673
|
}), M(() => t.totalItems, (L) => {
|
|
660
|
-
u.value = L, s(
|
|
661
|
-
}),
|
|
674
|
+
u.value = L, s(l.value, a.value, u.value, 7);
|
|
675
|
+
}), re(() => {
|
|
662
676
|
const L = v.value.includes(a.value);
|
|
663
677
|
a.value = L ? a.value : v.value[0];
|
|
664
678
|
})();
|
|
665
|
-
const
|
|
679
|
+
const q = d(() => ({
|
|
666
680
|
"ngx-pagination": !0,
|
|
667
681
|
pagination: !0,
|
|
668
682
|
responsive: p.value,
|
|
@@ -670,12 +684,12 @@ const V = /* @__PURE__ */ J({
|
|
|
670
684
|
"pager-viewmode-simple": i.value === "simple"
|
|
671
685
|
})), F = d(() => ({
|
|
672
686
|
position: "relative",
|
|
673
|
-
"justify-content":
|
|
687
|
+
"justify-content": n.value === "center" ? "center" : "start"
|
|
674
688
|
}));
|
|
675
|
-
function
|
|
676
|
-
return r(A, null, [N.value && E(), O.value &&
|
|
689
|
+
function x() {
|
|
690
|
+
return r(A, null, [N.value && E(), O.value && $(), g.value && j(), g.value && S(), T.value && z(), g.value && B(), g.value && P(), k.value && D()]);
|
|
677
691
|
}
|
|
678
|
-
function
|
|
692
|
+
function C() {
|
|
679
693
|
return r(A, null, [r("li", {
|
|
680
694
|
class: "page-item d-flex flex-fill"
|
|
681
695
|
}, null), g.value && j(), g.value && S(), D(), r("li", {
|
|
@@ -694,18 +708,18 @@ const V = /* @__PURE__ */ J({
|
|
|
694
708
|
class: "pagination-container"
|
|
695
709
|
}, [w.value && r("ul", {
|
|
696
710
|
role: "navigation",
|
|
697
|
-
class:
|
|
711
|
+
class: q.value,
|
|
698
712
|
style: F.value
|
|
699
|
-
}, [i.value === "default" ?
|
|
713
|
+
}, [i.value === "default" ? x() : C()])]);
|
|
700
714
|
}
|
|
701
715
|
});
|
|
702
|
-
function
|
|
716
|
+
function Fe(t, e, p) {
|
|
703
717
|
var T;
|
|
704
|
-
const i = "",
|
|
718
|
+
const i = "", n = "", c = m();
|
|
705
719
|
function a() {
|
|
706
720
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
707
721
|
}
|
|
708
|
-
function
|
|
722
|
+
function l() {
|
|
709
723
|
return !1;
|
|
710
724
|
}
|
|
711
725
|
function u() {
|
|
@@ -732,13 +746,13 @@ function De(t, e, p) {
|
|
|
732
746
|
function h() {
|
|
733
747
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
734
748
|
}
|
|
735
|
-
function
|
|
749
|
+
function b() {
|
|
736
750
|
}
|
|
737
751
|
function k(g, j) {
|
|
738
752
|
}
|
|
739
|
-
function
|
|
753
|
+
function y(g, j) {
|
|
740
754
|
const { componentType: S } = g;
|
|
741
|
-
let P =
|
|
755
|
+
let P = Y(S, g, j);
|
|
742
756
|
const B = S.toLowerCase().replace(/-/g, "_");
|
|
743
757
|
return P && !P.id && P.type === S && (P.id = `${B}_${Math.random().toString().slice(2, 6)}`), P;
|
|
744
758
|
}
|
|
@@ -757,7 +771,7 @@ function De(t, e, p) {
|
|
|
757
771
|
}
|
|
758
772
|
return c.value = {
|
|
759
773
|
canMove: a(),
|
|
760
|
-
canSelectParent:
|
|
774
|
+
canSelectParent: l(),
|
|
761
775
|
canDelete: u(),
|
|
762
776
|
canNested: !o(),
|
|
763
777
|
contents: e == null ? void 0 : e.schema.contents,
|
|
@@ -765,69 +779,69 @@ function De(t, e, p) {
|
|
|
765
779
|
parent: (T = e == null ? void 0 : e.parent) == null ? void 0 : T.componentInstance,
|
|
766
780
|
schema: e == null ? void 0 : e.schema,
|
|
767
781
|
styles: i,
|
|
768
|
-
designerClass:
|
|
782
|
+
designerClass: n,
|
|
769
783
|
canAccepts: v,
|
|
770
784
|
getBelongedComponentInstance: s,
|
|
771
785
|
getDraggableDesignItemElement: f,
|
|
772
786
|
getDraggingDisplayText: h,
|
|
773
787
|
getPropConfig: N,
|
|
774
|
-
getDragScopeElement:
|
|
788
|
+
getDragScopeElement: b,
|
|
775
789
|
onAcceptMovedChildElement: k,
|
|
776
790
|
onChildElementMovedOut: w,
|
|
777
|
-
addNewChildComponentSchema:
|
|
791
|
+
addNewChildComponentSchema: y,
|
|
778
792
|
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
779
793
|
triggerBelongedComponentToDeleteWhenDeleted: m(!1),
|
|
780
794
|
onRemoveComponent: O
|
|
781
795
|
}, c;
|
|
782
796
|
}
|
|
783
|
-
const
|
|
797
|
+
const Ae = /* @__PURE__ */ J({
|
|
784
798
|
name: "FPagination",
|
|
785
|
-
props:
|
|
799
|
+
props: _,
|
|
786
800
|
emits: ["pageIndexChanged", "pageSizeChanged"],
|
|
787
801
|
setup(t, e) {
|
|
788
|
-
const p = m(!1), i = m(t.mode),
|
|
789
|
-
|
|
802
|
+
const p = m(!1), i = m(t.mode), n = m(""), c = m(!1), a = m(t.pageSize), l = m(t.currentPage), u = m(t.totalItems), o = m(), s = ie("design-item-context"), f = Fe(o, s);
|
|
803
|
+
ue(() => {
|
|
790
804
|
o.value.componentInstance = f;
|
|
791
805
|
}), e.expose(f.value);
|
|
792
806
|
const {
|
|
793
807
|
pages: v,
|
|
794
808
|
updatePages: h
|
|
795
|
-
} =
|
|
809
|
+
} = le(), b = d(() => l.value === 1), k = d(() => [20, 50, 100]), y = d(() => Math.ceil(u.value / a.value)), w = d(() => l.value === y.value), N = d(() => !0), O = d(() => l.value > 1), T = d(() => !(c.value && v.value.length <= 1)), g = d(() => !0), j = d(() => !0), S = d(() => !0), P = d(() => !0), {
|
|
796
810
|
renderFirstPage: B,
|
|
797
811
|
renderPreviousPage: E
|
|
798
|
-
} =
|
|
799
|
-
renderLastPage:
|
|
800
|
-
renderNextPage:
|
|
801
|
-
} =
|
|
812
|
+
} = ne(l, b, O, a, e), {
|
|
813
|
+
renderLastPage: $,
|
|
814
|
+
renderNextPage: z
|
|
815
|
+
} = K(l, w, y, a, e), {
|
|
802
816
|
renderPageInfo: D
|
|
803
|
-
} =
|
|
804
|
-
renderPageList:
|
|
805
|
-
} =
|
|
806
|
-
renderPageNumbers:
|
|
807
|
-
} =
|
|
817
|
+
} = ee(n, u), {
|
|
818
|
+
renderPageList: W
|
|
819
|
+
} = te(l, a, k, u, e), {
|
|
820
|
+
renderPageNumbers: q
|
|
821
|
+
} = ae(l, v, a, e), {
|
|
808
822
|
renderGotoButton: F
|
|
809
|
-
} =
|
|
810
|
-
h(
|
|
811
|
-
h(
|
|
812
|
-
}), M(
|
|
813
|
-
e.emit("pageIndexChanged",
|
|
823
|
+
} = I(l, y, a, e);
|
|
824
|
+
h(l.value, a.value, u.value, 7), M([l, a], () => {
|
|
825
|
+
h(l.value, a.value, u.value, 7);
|
|
826
|
+
}), M(l, () => {
|
|
827
|
+
e.emit("pageIndexChanged", l.value);
|
|
814
828
|
}), M(a, () => {
|
|
815
829
|
e.emit("pageSizeChanged", a.value);
|
|
816
830
|
});
|
|
817
|
-
const
|
|
831
|
+
const x = d(() => ({
|
|
818
832
|
"ngx-pagination": !0,
|
|
819
833
|
pagination: !0,
|
|
820
834
|
responsive: p.value,
|
|
821
835
|
"pager-viewmode-default": i.value === "default",
|
|
822
836
|
"pager-viewmode-simple": i.value === "simple"
|
|
823
|
-
})),
|
|
837
|
+
})), C = d(() => ({
|
|
824
838
|
position: "relative",
|
|
825
|
-
"justify-content":
|
|
839
|
+
"justify-content": n.value === "center" ? "center" : "start"
|
|
826
840
|
}));
|
|
827
841
|
function L() {
|
|
828
|
-
return r(A, null, [g.value && D(), j.value &&
|
|
842
|
+
return r(A, null, [g.value && D(), j.value && W(), P.value && B(), P.value && E(), S.value && q(), P.value && z(), P.value && $(), N.value && F()]);
|
|
829
843
|
}
|
|
830
|
-
function
|
|
844
|
+
function se() {
|
|
831
845
|
return r(A, null, [r("li", {
|
|
832
846
|
class: "page-item d-flex flex-fill"
|
|
833
847
|
}, null), P.value && B(), P.value && E(), F(), r("li", {
|
|
@@ -840,28 +854,28 @@ const Fe = /* @__PURE__ */ J({
|
|
|
840
854
|
style: "margin-left: 5px"
|
|
841
855
|
}, [r("span", {
|
|
842
856
|
style: "font-size: 16px; font-weight: 600;"
|
|
843
|
-
}, [R(" "),
|
|
857
|
+
}, [R(" "), y.value])]), P.value && z(), P.value && $()]);
|
|
844
858
|
}
|
|
845
859
|
return () => r("div", {
|
|
846
860
|
ref: o,
|
|
847
861
|
class: "pagination-container"
|
|
848
862
|
}, [T.value && r("ul", {
|
|
849
863
|
role: "navigation",
|
|
850
|
-
class:
|
|
851
|
-
style:
|
|
852
|
-
}, [i.value === "default" ? L() :
|
|
864
|
+
class: x.value,
|
|
865
|
+
style: C.value
|
|
866
|
+
}, [i.value === "default" ? L() : se()])]);
|
|
853
867
|
}
|
|
854
868
|
});
|
|
855
869
|
V.register = (t, e, p) => {
|
|
856
|
-
t.pagination = V, e.pagination =
|
|
870
|
+
t.pagination = V, e.pagination = Z;
|
|
857
871
|
};
|
|
858
872
|
V.registerDesigner = (t, e, p) => {
|
|
859
|
-
t.pagination =
|
|
873
|
+
t.pagination = Ae, e.pagination = Z;
|
|
860
874
|
};
|
|
861
875
|
const xe = ce(V);
|
|
862
876
|
export {
|
|
863
877
|
V as FPagination,
|
|
864
878
|
xe as default,
|
|
865
|
-
|
|
866
|
-
|
|
879
|
+
_ as paginationProps,
|
|
880
|
+
Z as propsResolver
|
|
867
881
|
};
|