@farris/ui-vue 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +150 -142
- package/components/avatar/index.esm.js +393 -457
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +453 -516
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +27221 -26804
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import { defineComponent as B, ref as C, watch as $, computed as
|
|
1
|
+
import { defineComponent as B, ref as C, watch as $, computed as O, createVNode as o, onMounted as U, inject as oe } from "vue";
|
|
2
2
|
import { cloneDeep as se } from "lodash-es";
|
|
3
3
|
const K = {}, ee = {};
|
|
4
4
|
function Q(e) {
|
|
5
|
-
const { properties: t, title: i } = e,
|
|
6
|
-
return
|
|
5
|
+
const { properties: t, title: i } = e, h = Object.keys(t).reduce((y, d) => (y[d] = t[d].type === "object" && t[d].properties ? Q(t[d]) : se(t[d].default), y), {});
|
|
6
|
+
return h.id = `${i}-${Date.now()}`, h;
|
|
7
7
|
}
|
|
8
8
|
function z(e, t = {}) {
|
|
9
9
|
const i = K[e];
|
|
10
10
|
if (i) {
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
11
|
+
let h = Q(i);
|
|
12
|
+
const y = ee[e];
|
|
13
|
+
return h = y ? y({ getSchemaByType: z }, h, t) : h, h;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function ce(e, t) {
|
|
18
18
|
const i = Q(t);
|
|
19
|
-
return Object.keys(e).reduce((
|
|
19
|
+
return Object.keys(e).reduce((h, y) => (h[y] && typeof h[y] == "object" ? Object.assign(h[y], e[y]) : h[y] = e[y], h), i), i;
|
|
20
20
|
}
|
|
21
21
|
function le(e, t) {
|
|
22
|
-
return Object.keys(e).filter((
|
|
23
|
-
if (t.has(
|
|
24
|
-
const d = t.get(
|
|
22
|
+
return Object.keys(e).filter((h) => e[h] != null).reduce((h, y) => {
|
|
23
|
+
if (t.has(y)) {
|
|
24
|
+
const d = t.get(y);
|
|
25
25
|
if (typeof d == "string")
|
|
26
|
-
|
|
26
|
+
h[d] = e[y];
|
|
27
27
|
else {
|
|
28
|
-
const s = d(
|
|
29
|
-
Object.assign(
|
|
28
|
+
const s = d(y, e[y], e);
|
|
29
|
+
Object.assign(h, s);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
|
|
33
|
-
return
|
|
32
|
+
h[y] = e[y];
|
|
33
|
+
return h;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
36
|
function ue(e, t, i = /* @__PURE__ */ new Map()) {
|
|
37
|
-
const
|
|
38
|
-
return le(
|
|
37
|
+
const h = ce(e, t);
|
|
38
|
+
return le(h, i);
|
|
39
39
|
}
|
|
40
40
|
function ie(e = {}) {
|
|
41
|
-
function t(n,
|
|
41
|
+
function t(n, m, g, M) {
|
|
42
42
|
if (typeof g == "number")
|
|
43
43
|
return M[n].length === g;
|
|
44
44
|
if (typeof g == "object") {
|
|
45
|
-
const l = Object.keys(g)[0],
|
|
45
|
+
const l = Object.keys(g)[0], v = g[l];
|
|
46
46
|
if (l === "not")
|
|
47
|
-
return Number(M[n].length) !== Number(
|
|
47
|
+
return Number(M[n].length) !== Number(v);
|
|
48
48
|
if (l === "moreThan")
|
|
49
|
-
return Number(M[n].length) >= Number(
|
|
49
|
+
return Number(M[n].length) >= Number(v);
|
|
50
50
|
if (l === "lessThan")
|
|
51
|
-
return Number(M[n].length) <= Number(
|
|
51
|
+
return Number(M[n].length) <= Number(v);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function i(n,
|
|
55
|
+
function i(n, m, g, M) {
|
|
56
56
|
return M[n] && M[n].propertyValue && String(M[n].propertyValue.value) === String(g);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const h = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", t],
|
|
60
60
|
["getProperty", i]
|
|
61
61
|
]);
|
|
62
|
-
Object.keys(e).reduce((n,
|
|
63
|
-
function
|
|
62
|
+
Object.keys(e).reduce((n, m) => (n.set(m, e[m]), n), h);
|
|
63
|
+
function y(n, m) {
|
|
64
64
|
const g = n;
|
|
65
|
-
return typeof
|
|
65
|
+
return typeof m == "number" ? [{ target: g, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: g, operator: "getProperty", param: n, value: !!m }] : typeof m == "object" ? Object.keys(m).map((M) => {
|
|
66
66
|
if (M === "length")
|
|
67
|
-
return { target: g, operator: "length", param: null, value:
|
|
68
|
-
const l = M,
|
|
69
|
-
return { target: g, operator: "getProperty", param: l, value:
|
|
67
|
+
return { target: g, operator: "length", param: null, value: m[M] };
|
|
68
|
+
const l = M, v = m[M];
|
|
69
|
+
return { target: g, operator: "getProperty", param: l, value: v };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
72
|
function d(n) {
|
|
73
73
|
return Object.keys(n).reduce((g, M) => {
|
|
74
|
-
const l =
|
|
74
|
+
const l = y(M, n[M]);
|
|
75
75
|
return g.push(...l), g;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function s(n,
|
|
79
|
-
if (
|
|
80
|
-
const g =
|
|
81
|
-
return g && g(n.target, n.param, n.value,
|
|
78
|
+
function s(n, m) {
|
|
79
|
+
if (h.has(n.operator)) {
|
|
80
|
+
const g = h.get(n.operator);
|
|
81
|
+
return g && g(n.target, n.param, n.value, m) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
|
-
function c(n,
|
|
86
|
-
return d(n).reduce((l,
|
|
85
|
+
function c(n, m) {
|
|
86
|
+
return d(n).reduce((l, v) => l && s(v, m), !0);
|
|
87
87
|
}
|
|
88
|
-
function b(n,
|
|
89
|
-
const g = Object.keys(n), M = g.includes("allOf"), l = g.includes("anyOf"),
|
|
88
|
+
function b(n, m) {
|
|
89
|
+
const g = Object.keys(n), M = g.includes("allOf"), l = g.includes("anyOf"), v = M || l, u = (v ? n[v ? M ? "allOf" : "anyOf" : "allOf"] : [n]).map((r) => c(r, m));
|
|
90
90
|
return M ? !u.includes(!1) : u.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: b };
|
|
93
93
|
}
|
|
94
94
|
const de = {}, ye = {};
|
|
95
95
|
ie();
|
|
96
|
-
function ve(e, t, i = /* @__PURE__ */ new Map(),
|
|
97
|
-
return K[t.title] = t, ee[t.title] =
|
|
98
|
-
const c = ue(s, t, i), b = Object.keys(e).reduce((n,
|
|
96
|
+
function ve(e, t, i = /* @__PURE__ */ new Map(), h = (s, c, b) => c, y = {}, d = (s) => s) {
|
|
97
|
+
return K[t.title] = t, ee[t.title] = h, de[t.title] = y, ye[t.title] = d, (s = {}) => {
|
|
98
|
+
const c = ue(s, t, i), b = Object.keys(e).reduce((n, m) => (n[m] = e[m].default, n), {});
|
|
99
99
|
return Object.assign(b, c);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
@@ -164,7 +164,7 @@ const pe = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
},
|
|
167
|
+
}, Oe = {
|
|
168
168
|
title: Ce,
|
|
169
169
|
description: Ve,
|
|
170
170
|
type: Pe,
|
|
@@ -172,7 +172,7 @@ const pe = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-
|
|
|
172
172
|
}, X = {
|
|
173
173
|
events: { Type: Array, default: [] },
|
|
174
174
|
firstDayOfTheWeek: { type: String, default: "Sun." }
|
|
175
|
-
}, ne = ve(X, Te, he, me,
|
|
175
|
+
}, ne = ve(X, Te, he, me, Oe), F = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
176
176
|
var E = /* @__PURE__ */ ((e) => (e[e.previous = 1] = "previous", e[e.current = 2] = "current", e[e.next = 3] = "next", e))(E || {});
|
|
177
177
|
function L() {
|
|
178
178
|
function e() {
|
|
@@ -190,8 +190,8 @@ function L() {
|
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
function i(n) {
|
|
193
|
-
const
|
|
194
|
-
return n.year || (n.year =
|
|
193
|
+
const m = /* @__PURE__ */ new Date();
|
|
194
|
+
return n.year || (n.year = m.getFullYear()), n.month || (n.month = m.getMonth() + 1), n.day || (n.day = 1), new Date(
|
|
195
195
|
n.year,
|
|
196
196
|
n.month - 1,
|
|
197
197
|
n.day,
|
|
@@ -201,7 +201,7 @@ function L() {
|
|
|
201
201
|
0
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function h(n) {
|
|
205
205
|
return new Date(
|
|
206
206
|
n.year || 1,
|
|
207
207
|
(n.month || 1) - 1,
|
|
@@ -212,7 +212,7 @@ function L() {
|
|
|
212
212
|
0
|
|
213
213
|
).getDay();
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function y(n) {
|
|
216
216
|
return F.indexOf(n);
|
|
217
217
|
}
|
|
218
218
|
function d(n) {
|
|
@@ -221,9 +221,9 @@ function L() {
|
|
|
221
221
|
function s(n) {
|
|
222
222
|
return Math.round(d(n) / 1e3);
|
|
223
223
|
}
|
|
224
|
-
function c(n,
|
|
225
|
-
const M = d(
|
|
226
|
-
return l -
|
|
224
|
+
function c(n, m, g) {
|
|
225
|
+
const M = d(m), l = d(g), v = d(n);
|
|
226
|
+
return l - v > v - M ? m : g;
|
|
227
227
|
}
|
|
228
228
|
function b() {
|
|
229
229
|
const n = /* @__PURE__ */ new Date();
|
|
@@ -236,9 +236,9 @@ function L() {
|
|
|
236
236
|
second: n.getSeconds()
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
return { emptyDate: e, getDate: t, getDate2: i, getDayNumber:
|
|
239
|
+
return { emptyDate: e, getDate: t, getDate2: i, getDayNumber: h, getEpocTime: s, getNearDate: c, getWeekdayIndex: y, getTimeInMilliseconds: d, getToday: b };
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function We() {
|
|
242
242
|
function e(d, s) {
|
|
243
243
|
return new Date(s, d, 0).getDate();
|
|
244
244
|
}
|
|
@@ -249,22 +249,22 @@ function Oe() {
|
|
|
249
249
|
const c = t(s, d, 1);
|
|
250
250
|
return c.setMonth(c.getMonth() - 1), e(c.getMonth() + 1, c.getFullYear());
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function h(d, s) {
|
|
253
253
|
const c = {
|
|
254
254
|
year: d === 12 ? s + 1 : s
|
|
255
255
|
}, b = d === 12 ? 1 : d + 1;
|
|
256
256
|
return c.month = b, c;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function y(d, s) {
|
|
259
259
|
const c = {
|
|
260
260
|
year: d === 1 ? s - 1 : s
|
|
261
261
|
}, b = d === 1 ? 12 : d - 1;
|
|
262
262
|
return c.month = b, c;
|
|
263
263
|
}
|
|
264
|
-
return { daysInMonth: e, daysInPreMonth: i, getNextMonth:
|
|
264
|
+
return { daysInMonth: e, daysInPreMonth: i, getNextMonth: h, getPreviousMonth: y };
|
|
265
265
|
}
|
|
266
266
|
function te() {
|
|
267
|
-
const { getToday: e, getDayNumber: t } = L(), { daysInMonth: i, daysInPreMonth:
|
|
267
|
+
const { getToday: e, getDayNumber: t } = L(), { daysInMonth: i, daysInPreMonth: h, getNextMonth: y, getPreviousMonth: d } = We();
|
|
268
268
|
function s(f) {
|
|
269
269
|
const k = F.indexOf(f);
|
|
270
270
|
return k > 0 ? 7 - k : 0;
|
|
@@ -273,7 +273,7 @@ function te() {
|
|
|
273
273
|
const { day: k, month: u, year: a } = f;
|
|
274
274
|
if (k === void 0 || u === void 0 || a === void 0)
|
|
275
275
|
throw new Error("invalided date.");
|
|
276
|
-
const r = k === 1, p = r ?
|
|
276
|
+
const r = k === 1, p = r ? h(u, a) : k - 1, D = r ? u - 1 : u, w = D < 1, T = w ? 12 : D;
|
|
277
277
|
return {
|
|
278
278
|
year: w ? a - 1 : a,
|
|
279
279
|
month: T,
|
|
@@ -299,8 +299,8 @@ function te() {
|
|
|
299
299
|
year: k.year
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
const k =
|
|
302
|
+
function m(f) {
|
|
303
|
+
const k = y(f.month || 1, f.year || 1), u = i(k.month || 1, k.year || 1);
|
|
304
304
|
return {
|
|
305
305
|
day: (f.day || 1) <= u ? f.day : u,
|
|
306
306
|
month: k.month,
|
|
@@ -316,7 +316,7 @@ function te() {
|
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
318
|
function M(f) {
|
|
319
|
-
const u = (f.day || 1) + 7, a = i(f.month || 1, f.year || 1), r = u > a, p = r ? u - a : u, D = r ?
|
|
319
|
+
const u = (f.day || 1) + 7, a = i(f.month || 1, f.year || 1), r = u > a, p = r ? u - a : u, D = r ? y(f.month || 1, f.year || 1) : f;
|
|
320
320
|
return {
|
|
321
321
|
day: p,
|
|
322
322
|
month: D.month,
|
|
@@ -327,24 +327,24 @@ function te() {
|
|
|
327
327
|
const r = { day: f, month: k, year: u }, D = s(a) === 0 ? 1 : 0, w = t(r) + D, T = e();
|
|
328
328
|
let V = c(r);
|
|
329
329
|
const S = [];
|
|
330
|
-
for (let
|
|
330
|
+
for (let A = w - 1; A >= 1; A--) {
|
|
331
331
|
const R = V.month !== r.month ? E.previous : E.current, N = V.month === k && V.day === T.day && V.month === T.month && V.year === T.year;
|
|
332
|
-
S.push({ date: V, monthTag: R, isCurrent: N }),
|
|
332
|
+
S.push({ date: V, monthTag: R, isCurrent: N }), A > 1 && (V = c(V));
|
|
333
333
|
}
|
|
334
|
-
let
|
|
335
|
-
const
|
|
336
|
-
for (let
|
|
337
|
-
const R = V.month !== r.month ? E.next : E.current, N =
|
|
338
|
-
|
|
334
|
+
let W = b(r);
|
|
335
|
+
const j = [];
|
|
336
|
+
for (let A = w + 1; A <= 7; A++) {
|
|
337
|
+
const R = V.month !== r.month ? E.next : E.current, N = W.day === T.day && W.month === T.month && W.year === T.year;
|
|
338
|
+
j.push({ date: W, monthTag: R, isCurrent: N }), A < 7 && (W = b(W));
|
|
339
339
|
}
|
|
340
340
|
const P = f === T.day && k === T.month && u === T.year;
|
|
341
341
|
return {
|
|
342
|
-
days: [...S.reverse(), { date: r, monthTag: E.current, isCurrent: P }, ...
|
|
342
|
+
days: [...S.reverse(), { date: r, monthTag: E.current, isCurrent: P }, ...j],
|
|
343
343
|
weekNumber: 0,
|
|
344
344
|
year: u
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function v(f, k, u) {
|
|
348
348
|
const a = [], r = i(f, k);
|
|
349
349
|
for (let p = 1; p <= r; p += 7) {
|
|
350
350
|
const D = l(p, f, k, u);
|
|
@@ -353,14 +353,14 @@ function te() {
|
|
|
353
353
|
return a;
|
|
354
354
|
}
|
|
355
355
|
return {
|
|
356
|
-
getMonthlyCalendar:
|
|
356
|
+
getMonthlyCalendar: v,
|
|
357
357
|
getWeeklyCalendar: l,
|
|
358
358
|
getPreviousDay: c,
|
|
359
359
|
getNextDay: b,
|
|
360
360
|
getDayInPreviousWeek: g,
|
|
361
361
|
getDayInNextWeek: M,
|
|
362
362
|
getDayInPreviousMonth: n,
|
|
363
|
-
getDayInNextMonth:
|
|
363
|
+
getDayInNextMonth: m
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function x() {
|
|
@@ -371,48 +371,48 @@ function x() {
|
|
|
371
371
|
function i(l) {
|
|
372
372
|
return l && l.year !== 0 && l.month !== 0;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function h(l) {
|
|
375
375
|
return l && l.year !== 0;
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
return e(l) < e(
|
|
377
|
+
function y(l, v) {
|
|
378
|
+
return e(l) < e(v);
|
|
379
379
|
}
|
|
380
|
-
function d(l,
|
|
381
|
-
return e(l) <= e(
|
|
380
|
+
function d(l, v) {
|
|
381
|
+
return e(l) <= e(v);
|
|
382
382
|
}
|
|
383
|
-
function s(l,
|
|
384
|
-
return e(l) === e(
|
|
383
|
+
function s(l, v) {
|
|
384
|
+
return e(l) === e(v);
|
|
385
385
|
}
|
|
386
|
-
function c(l,
|
|
387
|
-
const f = e(
|
|
386
|
+
function c(l, v) {
|
|
387
|
+
const f = e(v);
|
|
388
388
|
return e(l.from) === f || e(l.to) === f;
|
|
389
389
|
}
|
|
390
|
-
function b(l,
|
|
391
|
-
return !
|
|
390
|
+
function b(l, v) {
|
|
391
|
+
return !v || !t(v.to) || !t(v.from) ? !1 : d(v.from, l) && d(l, v.to);
|
|
392
392
|
}
|
|
393
|
-
function n(l,
|
|
394
|
-
return t(
|
|
393
|
+
function n(l, v) {
|
|
394
|
+
return t(v) && e(l) >= e(v);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
return t(
|
|
396
|
+
function m(l, v) {
|
|
397
|
+
return t(v) && e(l) <= e(v);
|
|
398
398
|
}
|
|
399
|
-
function g(l,
|
|
400
|
-
return e({ year: l.year, month: l.month, day: l.day }) === e({ year:
|
|
399
|
+
function g(l, v) {
|
|
400
|
+
return e({ year: l.year, month: l.month, day: l.day }) === e({ year: v.year, month: v.month, day: v.day });
|
|
401
401
|
}
|
|
402
|
-
function M(l,
|
|
403
|
-
return e({ hour: l.hour, minute: l.minute, second: l.second }) === e({ hour:
|
|
402
|
+
function M(l, v) {
|
|
403
|
+
return e({ hour: l.hour, minute: l.minute, second: l.second }) === e({ hour: v.hour, minute: v.minute, second: v.second });
|
|
404
404
|
}
|
|
405
405
|
return {
|
|
406
|
-
isDateEarlier:
|
|
406
|
+
isDateEarlier: y,
|
|
407
407
|
equal: s,
|
|
408
408
|
inPeriod: b,
|
|
409
409
|
isPoint: c,
|
|
410
410
|
equalOrEarlier: d,
|
|
411
411
|
isInitializedDate: t,
|
|
412
412
|
isInitializedMonth: i,
|
|
413
|
-
isInitializedYear:
|
|
413
|
+
isInitializedYear: h,
|
|
414
414
|
isMonthDisabledByDisableSince: n,
|
|
415
|
-
isMonthDisabledByDisableUntil:
|
|
415
|
+
isMonthDisabledByDisableUntil: m,
|
|
416
416
|
sameTime: M,
|
|
417
417
|
sameDay: g
|
|
418
418
|
};
|
|
@@ -441,21 +441,21 @@ const Z = {
|
|
|
441
441
|
props: Se,
|
|
442
442
|
emits: ["ViewChange", "Previous", "Next", "ResetToToday"],
|
|
443
443
|
setup(e, t) {
|
|
444
|
-
const i = C(e.title),
|
|
444
|
+
const i = C(e.title), h = C(e.dailyViewTitle), y = C(e.weeklyViewTitle), d = C(e.monthlyViewTitle), s = 2, c = 62, b = C(e.activeView), n = C("Today");
|
|
445
445
|
$(() => e.title, () => {
|
|
446
446
|
i.value = e.title;
|
|
447
447
|
});
|
|
448
|
-
const
|
|
448
|
+
const m = O(() => ({
|
|
449
449
|
top: `${s}px`,
|
|
450
450
|
left: `${b.value * (s + 1) + (b.value - 1) * (c + 1)}px`
|
|
451
|
-
})), g =
|
|
451
|
+
})), g = O(() => b.value === 1 ? h.value : b.value === 2 ? y.value : d.value);
|
|
452
452
|
function M() {
|
|
453
453
|
b.value = 1, t.emit("ViewChange", 1);
|
|
454
454
|
}
|
|
455
455
|
function l() {
|
|
456
456
|
b.value = 2, t.emit("ViewChange", 2);
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function v() {
|
|
459
459
|
b.value = 3, t.emit("ViewChange", 3);
|
|
460
460
|
}
|
|
461
461
|
function f() {
|
|
@@ -495,18 +495,18 @@ const Z = {
|
|
|
495
495
|
}, [o("span", {
|
|
496
496
|
class: "f-calendar-view-switch-daily",
|
|
497
497
|
onClick: (a) => M()
|
|
498
|
-
}, [
|
|
498
|
+
}, [h.value]), o("span", {
|
|
499
499
|
class: "f-calendar-view-switch-weekly",
|
|
500
500
|
onClick: (a) => l()
|
|
501
|
-
}, [
|
|
501
|
+
}, [y.value]), o("span", {
|
|
502
502
|
class: "f-calendar-view-switch-monthly",
|
|
503
|
-
onClick: (a) =>
|
|
503
|
+
onClick: (a) => v()
|
|
504
504
|
}, [d.value])]), o("div", {
|
|
505
505
|
class: "f-calendar-view-switch-active-view",
|
|
506
|
-
style:
|
|
506
|
+
style: m.value
|
|
507
507
|
}, [g.value])])]);
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
509
|
+
}), je = {
|
|
510
510
|
dates: { Type: Array, default: [] },
|
|
511
511
|
daysInWeek: { Type: Array, default: F },
|
|
512
512
|
enableKeyboadNavigate: { Type: Boolean, default: !0 },
|
|
@@ -515,7 +515,7 @@ const Z = {
|
|
|
515
515
|
activeDay: { Type: Object, default: null }
|
|
516
516
|
};
|
|
517
517
|
var q = /* @__PURE__ */ ((e) => (e[e.enter = 13] = "enter", e[e.esc = 27] = "esc", e[e.space = 32] = "space", e[e.leftArrow = 37] = "leftArrow", e[e.upArrow = 38] = "upArrow", e[e.rightArrow = 39] = "rightArrow", e[e.downArrow = 40] = "downArrow", e[e.tab = 9] = "tab", e[e.shift = 16] = "shift", e))(q || {});
|
|
518
|
-
function
|
|
518
|
+
function Ae() {
|
|
519
519
|
function e(t) {
|
|
520
520
|
const i = t.key || t.keyCode;
|
|
521
521
|
return i === "Enter" || i === 13 ? 13 : i === "Escape" || i === 27 ? 27 : i === " " || i === 32 ? 32 : i === "ArrowLeft" || i === 37 ? 37 : i === "ArrowUp" || i === 38 ? 38 : i === "ArrowRight" || i === 39 ? 39 : i === "ArrowDown" || i === 40 ? 40 : i === "Tab" || i === 9 ? 9 : i === "Shift" || i === 16 ? 16 : -1;
|
|
@@ -524,16 +524,16 @@ function je() {
|
|
|
524
524
|
}
|
|
525
525
|
const _ = /* @__PURE__ */ B({
|
|
526
526
|
name: "FCalendarMonthView",
|
|
527
|
-
props:
|
|
527
|
+
props: je,
|
|
528
528
|
emits: ["click", "keyDown"],
|
|
529
529
|
setup(e, t) {
|
|
530
|
-
const i = C(e.daysInWeek),
|
|
530
|
+
const i = C(e.daysInWeek), h = C(e.enableKeyboadNavigate), y = C(e.enableMarkCurrent), d = C(e.activeDay), s = C(e.events), {
|
|
531
531
|
equal: c,
|
|
532
532
|
sameDay: b
|
|
533
533
|
} = x(), {
|
|
534
534
|
getKeyCodeFromEvent: n
|
|
535
|
-
} =
|
|
536
|
-
function
|
|
535
|
+
} = Ae();
|
|
536
|
+
function m(u, a) {
|
|
537
537
|
return u.forEach((r) => {
|
|
538
538
|
r.days.forEach((p) => {
|
|
539
539
|
const D = a.filter((w) => b(w.starts, p.date));
|
|
@@ -541,9 +541,9 @@ const _ = /* @__PURE__ */ B({
|
|
|
541
541
|
});
|
|
542
542
|
}), u;
|
|
543
543
|
}
|
|
544
|
-
const g = C(
|
|
544
|
+
const g = C(m(e.dates, s.value));
|
|
545
545
|
$(() => e.dates, () => {
|
|
546
|
-
g.value =
|
|
546
|
+
g.value = m(e.dates, s.value);
|
|
547
547
|
}), $(() => e.activeDay, () => {
|
|
548
548
|
d.value = e.activeDay;
|
|
549
549
|
}), $(() => e.events, () => {
|
|
@@ -561,8 +561,8 @@ const _ = /* @__PURE__ */ B({
|
|
|
561
561
|
"f-datepicker-no-currmonth": u.monthTag === E.previous || u.monthTag === E.next
|
|
562
562
|
}, w = `d_${a}_${r}`;
|
|
563
563
|
return D[w] = !0, D;
|
|
564
|
-
},
|
|
565
|
-
const a = u.monthTag === E.current && M(u.date), r = u.isCurrent &&
|
|
564
|
+
}, v = (u) => {
|
|
565
|
+
const a = u.monthTag === E.current && M(u.date), r = u.isCurrent && y.value;
|
|
566
566
|
return {
|
|
567
567
|
"f-calendar-month-view-date": !0,
|
|
568
568
|
"f-calendar-month-view-selected": a,
|
|
@@ -574,7 +574,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
574
574
|
}
|
|
575
575
|
function k(u, a) {
|
|
576
576
|
const r = n(u);
|
|
577
|
-
r !== q.tab && (u.preventDefault(), r === q.enter || r === q.space ? f(u, a) :
|
|
577
|
+
r !== q.tab && (u.preventDefault(), r === q.enter || r === q.space ? f(u, a) : h.value && t.emit("keyDown", a.date));
|
|
578
578
|
}
|
|
579
579
|
return () => o("div", {
|
|
580
580
|
class: "f-calendar-month-view"
|
|
@@ -593,7 +593,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
593
593
|
}, [o("div", {
|
|
594
594
|
class: "f-calendar-month-view-title"
|
|
595
595
|
}, [o("div", {
|
|
596
|
-
class:
|
|
596
|
+
class: v(r)
|
|
597
597
|
}, [r.date.day]), o("div", {
|
|
598
598
|
class: "f-calendar-month-view-date-month"
|
|
599
599
|
}, [r.date.day === 1 ? Z[r.date.month || 1] : ""])]), r.events && r.events.length && r.events.map((D) => o("div", {
|
|
@@ -610,11 +610,11 @@ const _ = /* @__PURE__ */ B({
|
|
|
610
610
|
props: Ee,
|
|
611
611
|
emits: [],
|
|
612
612
|
setup(e) {
|
|
613
|
-
const t = C(), i = C(),
|
|
613
|
+
const t = C(), i = C(), h = C(e.daysInWeek), y = C(e.week), d = C(e.enableMarkCurrent), s = C(e.events), c = C([]), {
|
|
614
614
|
equal: b
|
|
615
615
|
} = x();
|
|
616
616
|
function n(a) {
|
|
617
|
-
return
|
|
617
|
+
return y.value.days.map((p) => {
|
|
618
618
|
const D = {
|
|
619
619
|
year: p.date.year,
|
|
620
620
|
month: p.date.month,
|
|
@@ -629,7 +629,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
629
629
|
};
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function m() {
|
|
633
633
|
const a = [];
|
|
634
634
|
for (let r = 0; r < 24; r++) {
|
|
635
635
|
const p = {
|
|
@@ -655,10 +655,10 @@ const _ = /* @__PURE__ */ B({
|
|
|
655
655
|
}
|
|
656
656
|
c.value = a;
|
|
657
657
|
}
|
|
658
|
-
|
|
659
|
-
|
|
658
|
+
m(), $(() => e.week, () => {
|
|
659
|
+
y.value = e.week, m();
|
|
660
660
|
}), $(() => e.events, () => {
|
|
661
|
-
s.value = e.events,
|
|
661
|
+
s.value = e.events, m();
|
|
662
662
|
});
|
|
663
663
|
const g = (a) => ({
|
|
664
664
|
"f-calendar-week-view-date": !0,
|
|
@@ -673,11 +673,11 @@ const _ = /* @__PURE__ */ B({
|
|
|
673
673
|
class: "f-calendar-week-view-header-primary"
|
|
674
674
|
}, [o("div", {
|
|
675
675
|
class: "f-calendar-week-view-header-columns"
|
|
676
|
-
}, [
|
|
676
|
+
}, [h.value.map((a, r) => o("div", {
|
|
677
677
|
class: "f-calendar-week-view-header-cell"
|
|
678
678
|
}, [o("div", {
|
|
679
|
-
class: g(
|
|
680
|
-
}, [
|
|
679
|
+
class: g(y.value.days[r])
|
|
680
|
+
}, [y.value.days[r].date.day]), o("span", null, [a])]))])])]);
|
|
681
681
|
}
|
|
682
682
|
function l() {
|
|
683
683
|
return o("div", {
|
|
@@ -690,7 +690,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
690
690
|
class: "f-calendar-side-row-number"
|
|
691
691
|
}, [a.part === "upper" ? a.title : ""])]))])]);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function v(a) {
|
|
694
694
|
return {
|
|
695
695
|
"f-calendar-week-view-item": !0,
|
|
696
696
|
"f-calendar-week-view-item-upper": a.part === "upper",
|
|
@@ -705,7 +705,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
705
705
|
}
|
|
706
706
|
function k() {
|
|
707
707
|
return c.value.map((a) => o("div", {
|
|
708
|
-
class:
|
|
708
|
+
class: v(a)
|
|
709
709
|
}, [a.events.map((r) => o("div", {
|
|
710
710
|
class: "f-calendar-week-view-item-cell"
|
|
711
711
|
}, [r.events.length > 0 && r.events.map((p) => o("div", {
|
|
@@ -740,14 +740,14 @@ const _ = /* @__PURE__ */ B({
|
|
|
740
740
|
props: $e,
|
|
741
741
|
emits: [],
|
|
742
742
|
setup(e) {
|
|
743
|
-
const t = C(), i = C(),
|
|
743
|
+
const t = C(), i = C(), h = C(e.dayInWeek), y = C(e.day), d = C(e.enableMarkCurrent), s = C(e.events), c = C([]), {
|
|
744
744
|
equal: b
|
|
745
745
|
} = x();
|
|
746
746
|
function n(a) {
|
|
747
747
|
const r = {
|
|
748
|
-
year:
|
|
749
|
-
month:
|
|
750
|
-
day:
|
|
748
|
+
year: y.value.date.year,
|
|
749
|
+
month: y.value.date.month,
|
|
750
|
+
day: y.value.date.day,
|
|
751
751
|
hour: a.hour,
|
|
752
752
|
minute: a.minute,
|
|
753
753
|
second: a.second
|
|
@@ -757,7 +757,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
757
757
|
events: p
|
|
758
758
|
}];
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function m() {
|
|
761
761
|
const a = [];
|
|
762
762
|
for (let r = 0; r < 24; r++) {
|
|
763
763
|
const p = {
|
|
@@ -783,10 +783,10 @@ const _ = /* @__PURE__ */ B({
|
|
|
783
783
|
}
|
|
784
784
|
c.value = a;
|
|
785
785
|
}
|
|
786
|
-
|
|
787
|
-
|
|
786
|
+
m(), $(() => e.day, () => {
|
|
787
|
+
y.value = e.day, m();
|
|
788
788
|
}), $(() => e.events, () => {
|
|
789
|
-
s.value = e.events,
|
|
789
|
+
s.value = e.events, m();
|
|
790
790
|
});
|
|
791
791
|
const g = (a) => ({
|
|
792
792
|
"f-calendar-day-view-date": !0,
|
|
@@ -804,8 +804,8 @@ const _ = /* @__PURE__ */ B({
|
|
|
804
804
|
}, [o("div", {
|
|
805
805
|
class: "f-calendar-day-view-header-cell"
|
|
806
806
|
}, [o("div", {
|
|
807
|
-
class: g(
|
|
808
|
-
}, [
|
|
807
|
+
class: g(y.value)
|
|
808
|
+
}, [y.value.date.day]), o("span", null, [h.value])])])])]);
|
|
809
809
|
}
|
|
810
810
|
function l() {
|
|
811
811
|
return o("div", {
|
|
@@ -818,7 +818,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
818
818
|
class: "f-calendar-side-row-number"
|
|
819
819
|
}, [a.part === "upper" ? a.title : ""])]))])]);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function v(a) {
|
|
822
822
|
return {
|
|
823
823
|
"f-calendar-day-view-item": !0,
|
|
824
824
|
"f-calendar-day-view-item-upper": a.part === "upper",
|
|
@@ -833,7 +833,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
833
833
|
}
|
|
834
834
|
function k() {
|
|
835
835
|
return c.value.map((a) => o("div", {
|
|
836
|
-
class:
|
|
836
|
+
class: v(a)
|
|
837
837
|
}, [a.events.map((r) => o("div", {
|
|
838
838
|
class: "f-calendar-day-view-item-cell"
|
|
839
839
|
}, [r.events.length > 0 && r.events.map((p) => o("div", {
|
|
@@ -867,33 +867,33 @@ const _ = /* @__PURE__ */ B({
|
|
|
867
867
|
sameDay: t
|
|
868
868
|
} = x(), {
|
|
869
869
|
getToday: i
|
|
870
|
-
} = L(),
|
|
870
|
+
} = L(), h = C(e.firstDayOfTheWeek), y = C(e.events), d = i(), s = C({
|
|
871
871
|
year: d.year || 1,
|
|
872
872
|
month: d.month || 1,
|
|
873
873
|
day: d.day || 1
|
|
874
874
|
}), c = C(3), {
|
|
875
875
|
getMonthlyCalendar: b,
|
|
876
876
|
getWeeklyCalendar: n,
|
|
877
|
-
getPreviousDay:
|
|
877
|
+
getPreviousDay: m,
|
|
878
878
|
getNextDay: g,
|
|
879
879
|
getDayInPreviousWeek: M,
|
|
880
880
|
getDayInNextWeek: l,
|
|
881
|
-
getDayInPreviousMonth:
|
|
881
|
+
getDayInPreviousMonth: v,
|
|
882
882
|
getDayInNextMonth: f
|
|
883
|
-
} = te(), k =
|
|
884
|
-
const P = a.value.days.findIndex((
|
|
883
|
+
} = te(), k = O(() => `${Z[s.value.month || 1]} ${s.value.year}`), u = O(() => b(s.value.month || 1, s.value.year || 1, h.value)), a = O(() => n(s.value.day || 1, s.value.month || 1, s.value.year || 1, h.value)), r = O(() => a.value.days.find((P) => t(P.date, s.value)) || a.value.days[1]), p = O(() => {
|
|
884
|
+
const P = a.value.days.findIndex((A) => t(A.date, s.value)), H = P > -1 ? P : 1;
|
|
885
885
|
return F[H];
|
|
886
|
-
}), D =
|
|
886
|
+
}), D = O(() => c.value === 3), w = O(() => c.value === 2), T = O(() => c.value === 1);
|
|
887
887
|
function V(P) {
|
|
888
888
|
c.value = P;
|
|
889
889
|
}
|
|
890
890
|
function S(P) {
|
|
891
|
-
P === 1 && (s.value =
|
|
891
|
+
P === 1 && (s.value = m(s.value)), P === 2 && (s.value = M(s.value)), P === 3 && (s.value = v(s.value));
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function W(P) {
|
|
894
894
|
P === 1 && (s.value = g(s.value)), P === 2 && (s.value = l(s.value)), P === 3 && (s.value = f(s.value));
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function j() {
|
|
897
897
|
s.value = {
|
|
898
898
|
year: d.year || 1,
|
|
899
899
|
month: d.month || 1,
|
|
@@ -907,27 +907,27 @@ const _ = /* @__PURE__ */ B({
|
|
|
907
907
|
title: k.value,
|
|
908
908
|
onViewChange: (P) => V(P),
|
|
909
909
|
onPrevious: (P) => S(P),
|
|
910
|
-
onNext: (P) =>
|
|
911
|
-
onResetToToday: () =>
|
|
910
|
+
onNext: (P) => W(P),
|
|
911
|
+
onResetToToday: () => j()
|
|
912
912
|
}, null), o("div", null, [T.value && o(J, {
|
|
913
913
|
day: r.value,
|
|
914
914
|
dayInWeek: p.value,
|
|
915
|
-
events:
|
|
915
|
+
events: y.value
|
|
916
916
|
}, null), w.value && o(Y, {
|
|
917
917
|
week: a.value,
|
|
918
|
-
events:
|
|
918
|
+
events: y.value
|
|
919
919
|
}, null), D.value && o(_, {
|
|
920
920
|
activeDay: s.value,
|
|
921
921
|
dates: u.value,
|
|
922
|
-
events:
|
|
922
|
+
events: y.value
|
|
923
923
|
}, null)])]);
|
|
924
924
|
}
|
|
925
925
|
});
|
|
926
926
|
function Ie(e, t, i) {
|
|
927
927
|
var D;
|
|
928
|
-
function
|
|
928
|
+
function h() {
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const y = "", d = "", s = C();
|
|
931
931
|
function c() {
|
|
932
932
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
933
933
|
}
|
|
@@ -937,7 +937,7 @@ function Ie(e, t, i) {
|
|
|
937
937
|
function n() {
|
|
938
938
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function m() {
|
|
941
941
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
942
942
|
}
|
|
943
943
|
function g(w) {
|
|
@@ -955,7 +955,7 @@ function Ie(e, t, i) {
|
|
|
955
955
|
function l(w) {
|
|
956
956
|
return !!i;
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function v() {
|
|
959
959
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
960
960
|
}
|
|
961
961
|
function f() {
|
|
@@ -969,11 +969,11 @@ function Ie(e, t, i) {
|
|
|
969
969
|
return V && !V.id && V.type === T && (V.id = `${S}_${Math.random().toString().slice(2, 6)}`), V;
|
|
970
970
|
}
|
|
971
971
|
function a(w, T) {
|
|
972
|
-
const V = String(w.getAttribute("data-controltype")), S = w.getAttribute("data-feature"),
|
|
973
|
-
|
|
974
|
-
let
|
|
972
|
+
const V = String(w.getAttribute("data-controltype")), S = w.getAttribute("data-feature"), W = S ? JSON.parse(S) : {};
|
|
973
|
+
W.parentComponentInstance = s.value;
|
|
974
|
+
let j = z(V, W);
|
|
975
975
|
const P = V.toLowerCase().replace("-", "_");
|
|
976
|
-
return
|
|
976
|
+
return j && !j.id && j.type === V && (j.id = `${P}_${Math.random().toString().slice(2, 6)}`), j;
|
|
977
977
|
}
|
|
978
978
|
function r(w) {
|
|
979
979
|
}
|
|
@@ -983,24 +983,24 @@ function Ie(e, t, i) {
|
|
|
983
983
|
canMove: c(),
|
|
984
984
|
canSelectParent: b(),
|
|
985
985
|
canDelete: n(),
|
|
986
|
-
canNested: !
|
|
986
|
+
canNested: !m(),
|
|
987
987
|
contents: t == null ? void 0 : t.schema.contents,
|
|
988
988
|
elementRef: e,
|
|
989
989
|
parent: (D = t == null ? void 0 : t.parent) == null ? void 0 : D.componentInstance,
|
|
990
990
|
schema: t == null ? void 0 : t.schema,
|
|
991
|
-
styles:
|
|
991
|
+
styles: y,
|
|
992
992
|
designerClass: d,
|
|
993
993
|
canAccepts: l,
|
|
994
994
|
getBelongedComponentInstance: g,
|
|
995
995
|
getDraggableDesignItemElement: M,
|
|
996
|
-
getDraggingDisplayText:
|
|
996
|
+
getDraggingDisplayText: v,
|
|
997
997
|
getPropConfig: p,
|
|
998
998
|
getDragScopeElement: f,
|
|
999
999
|
onAcceptMovedChildElement: k,
|
|
1000
1000
|
onAcceptNewChildElement: a,
|
|
1001
1001
|
onChildElementMovedOut: r,
|
|
1002
1002
|
addNewChildComponentSchema: u,
|
|
1003
|
-
updateDragAndDropRules:
|
|
1003
|
+
updateDragAndDropRules: h,
|
|
1004
1004
|
triggerBelongedComponentToMoveWhenMoved: C(!1),
|
|
1005
1005
|
triggerBelongedComponentToDeleteWhenDeleted: C(!1)
|
|
1006
1006
|
}, s;
|
|
@@ -1013,35 +1013,35 @@ const Be = /* @__PURE__ */ B({
|
|
|
1013
1013
|
const {
|
|
1014
1014
|
sameDay: i
|
|
1015
1015
|
} = x(), {
|
|
1016
|
-
getToday:
|
|
1017
|
-
} = L(),
|
|
1016
|
+
getToday: h
|
|
1017
|
+
} = L(), y = C(e.firstDayOfTheWeek), d = C(e.events), s = h(), c = C({
|
|
1018
1018
|
year: s.year || 1,
|
|
1019
1019
|
month: s.month || 1,
|
|
1020
1020
|
day: s.day || 1
|
|
1021
|
-
}), b = C(3), n = C(),
|
|
1021
|
+
}), b = C(3), n = C(), m = oe("design-item-context"), g = Ie(n, m);
|
|
1022
1022
|
U(() => {
|
|
1023
1023
|
n.value.componentInstance = g;
|
|
1024
1024
|
}), t.expose(g.value);
|
|
1025
1025
|
const {
|
|
1026
1026
|
getMonthlyCalendar: M,
|
|
1027
1027
|
getWeeklyCalendar: l,
|
|
1028
|
-
getPreviousDay:
|
|
1028
|
+
getPreviousDay: v,
|
|
1029
1029
|
getNextDay: f,
|
|
1030
1030
|
getDayInPreviousWeek: k,
|
|
1031
1031
|
getDayInNextWeek: u,
|
|
1032
1032
|
getDayInPreviousMonth: a,
|
|
1033
1033
|
getDayInNextMonth: r
|
|
1034
|
-
} = te(), p =
|
|
1034
|
+
} = te(), p = O(() => `${Z[c.value.month || 1]} ${c.value.year}`), D = O(() => M(c.value.month || 1, c.value.year || 1, y.value)), w = O(() => l(c.value.day || 1, c.value.month || 1, c.value.year || 1, y.value)), T = O(() => w.value.days.find((N) => i(N.date, c.value)) || w.value.days[1]), V = O(() => {
|
|
1035
1035
|
const N = w.value.days.findIndex((re) => i(re.date, c.value)), ae = N > -1 ? N : 1;
|
|
1036
1036
|
return F[ae];
|
|
1037
|
-
}), S =
|
|
1037
|
+
}), S = O(() => b.value === 3), W = O(() => b.value === 2), j = O(() => b.value === 1);
|
|
1038
1038
|
function P(N) {
|
|
1039
1039
|
b.value = N;
|
|
1040
1040
|
}
|
|
1041
1041
|
function H(N) {
|
|
1042
|
-
N === 1 && (c.value =
|
|
1042
|
+
N === 1 && (c.value = v(c.value)), N === 2 && (c.value = k(c.value)), N === 3 && (c.value = a(c.value));
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function A(N) {
|
|
1045
1045
|
N === 1 && (c.value = f(c.value)), N === 2 && (c.value = u(c.value)), N === 3 && (c.value = r(c.value));
|
|
1046
1046
|
}
|
|
1047
1047
|
function R() {
|
|
@@ -1059,13 +1059,13 @@ const Be = /* @__PURE__ */ B({
|
|
|
1059
1059
|
title: p.value,
|
|
1060
1060
|
onViewChange: (N) => P(N),
|
|
1061
1061
|
onPrevious: (N) => H(N),
|
|
1062
|
-
onNext: (N) =>
|
|
1062
|
+
onNext: (N) => A(N),
|
|
1063
1063
|
onResetToToday: () => R()
|
|
1064
|
-
}, null), o("div", null, [
|
|
1064
|
+
}, null), o("div", null, [j.value && o(J, {
|
|
1065
1065
|
day: T.value,
|
|
1066
1066
|
dayInWeek: V.value,
|
|
1067
1067
|
events: d.value
|
|
1068
|
-
}, null),
|
|
1068
|
+
}, null), W.value && o(Y, {
|
|
1069
1069
|
week: w.value,
|
|
1070
1070
|
events: d.value
|
|
1071
1071
|
}, null), S.value && o(_, {
|
|
@@ -1078,7 +1078,7 @@ const Be = /* @__PURE__ */ B({
|
|
|
1078
1078
|
I.install = (e) => {
|
|
1079
1079
|
e.component(I.name, I).component(J.name, J).component(G.name, G).component(_.name, _).component(Y.name, Y);
|
|
1080
1080
|
};
|
|
1081
|
-
I.register = (e, t, i,
|
|
1081
|
+
I.register = (e, t, i, h) => {
|
|
1082
1082
|
e.calendar = I, t.calendar = ne;
|
|
1083
1083
|
};
|
|
1084
1084
|
I.registerDesigner = (e, t, i) => {
|
|
@@ -1096,7 +1096,7 @@ export {
|
|
|
1096
1096
|
I as default,
|
|
1097
1097
|
Z as defaultNameOfMonths,
|
|
1098
1098
|
Se as headerProps,
|
|
1099
|
-
|
|
1099
|
+
je as monthViewProps,
|
|
1100
1100
|
ne as propsResolver,
|
|
1101
1101
|
F as weekDays,
|
|
1102
1102
|
Ee as weekViewProps
|