@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,118 +1,132 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isPlainObject as Z, cloneDeep as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as R, ref as P, watch as $, computed as W, createVNode as c, onMounted as J, inject as ce } from "vue";
|
|
2
|
+
import { isPlainObject as Z, cloneDeep as K } from "lodash-es";
|
|
3
|
+
const ee = {}, ne = {};
|
|
4
4
|
function U(e) {
|
|
5
|
-
const { properties:
|
|
6
|
-
if (
|
|
7
|
-
const
|
|
8
|
-
|
|
5
|
+
const { properties: n, title: u, ignore: f } = e, i = f && Array.isArray(f), l = Object.keys(n).reduce((r, s) => ((!i || !f.find((k) => k === s)) && (r[s] = n[s].type === "object" && n[s].properties ? U(n[s]) : K(n[s].default)), r), {});
|
|
6
|
+
if (u && (!i || !f.find((r) => r === "id"))) {
|
|
7
|
+
const r = u.toLowerCase().replace(/-/g, "_");
|
|
8
|
+
l.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return l;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
function le(e) {
|
|
13
|
+
const { properties: n, title: u, required: f } = e;
|
|
14
|
+
if (f && Array.isArray(f)) {
|
|
15
|
+
const i = f.reduce((l, r) => (l[r] = n[r].type === "object" && n[r].properties ? U(n[r]) : K(n[r].default), l), {});
|
|
16
|
+
if (u && f.find((l) => l === "id")) {
|
|
17
|
+
const l = u.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return i;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
type: u
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function te(e, n = {}, u) {
|
|
27
|
+
const f = ee[e];
|
|
28
|
+
if (f) {
|
|
29
|
+
let i = le(f);
|
|
30
|
+
const l = ne[e];
|
|
31
|
+
return i = l ? l({ getSchemaByType: te }, i, n, u) : i, i;
|
|
18
32
|
}
|
|
19
33
|
return null;
|
|
20
34
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
return Object.keys(
|
|
35
|
+
function ue(e, n) {
|
|
36
|
+
const u = U(n);
|
|
37
|
+
return Object.keys(u).reduce((f, i) => (Object.prototype.hasOwnProperty.call(e, i) && (f[i] && Z(f[i]) && Z(e[i] || !e[i]) ? Object.assign(f[i], e[i] || {}) : f[i] = e[i]), f), u), u;
|
|
24
38
|
}
|
|
25
|
-
function
|
|
26
|
-
return Object.keys(e).filter((
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
|
|
39
|
+
function ie(e, n) {
|
|
40
|
+
return Object.keys(e).filter((f) => e[f] != null).reduce((f, i) => {
|
|
41
|
+
if (n.has(i)) {
|
|
42
|
+
const l = n.get(i);
|
|
43
|
+
if (typeof l == "string")
|
|
44
|
+
f[l] = e[i];
|
|
31
45
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
46
|
+
const r = l(i, e[i], e);
|
|
47
|
+
Object.assign(f, r);
|
|
34
48
|
}
|
|
35
49
|
} else
|
|
36
|
-
|
|
37
|
-
return
|
|
50
|
+
f[i] = e[i];
|
|
51
|
+
return f;
|
|
38
52
|
}, {});
|
|
39
53
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
54
|
+
function de(e, n, u = /* @__PURE__ */ new Map()) {
|
|
55
|
+
const f = ue(e, n);
|
|
56
|
+
return ie(f, u);
|
|
43
57
|
}
|
|
44
|
-
function
|
|
45
|
-
function t
|
|
58
|
+
function ye(e = {}) {
|
|
59
|
+
function n(t, p, g, b) {
|
|
46
60
|
if (typeof g == "number")
|
|
47
|
-
return b[
|
|
61
|
+
return b[t].length === g;
|
|
48
62
|
if (typeof g == "object") {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return Number(b[
|
|
52
|
-
if (
|
|
53
|
-
return Number(b[
|
|
54
|
-
if (
|
|
55
|
-
return Number(b[
|
|
63
|
+
const d = Object.keys(g)[0], h = g[d];
|
|
64
|
+
if (d === "not")
|
|
65
|
+
return Number(b[t].length) !== Number(h);
|
|
66
|
+
if (d === "moreThan")
|
|
67
|
+
return Number(b[t].length) >= Number(h);
|
|
68
|
+
if (d === "lessThan")
|
|
69
|
+
return Number(b[t].length) <= Number(h);
|
|
56
70
|
}
|
|
57
71
|
return !1;
|
|
58
72
|
}
|
|
59
|
-
function
|
|
60
|
-
return b[
|
|
73
|
+
function u(t, p, g, b) {
|
|
74
|
+
return b[t] && b[t].propertyValue && String(b[t].propertyValue.value) === String(g);
|
|
61
75
|
}
|
|
62
|
-
const
|
|
63
|
-
["length",
|
|
64
|
-
["getProperty",
|
|
76
|
+
const f = /* @__PURE__ */ new Map([
|
|
77
|
+
["length", n],
|
|
78
|
+
["getProperty", u]
|
|
65
79
|
]);
|
|
66
|
-
Object.keys(e).reduce((
|
|
67
|
-
function
|
|
68
|
-
const g =
|
|
69
|
-
return typeof p == "number" ? [{ target: g, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: g, operator: "getProperty", param:
|
|
80
|
+
Object.keys(e).reduce((t, p) => (t.set(p, e[p]), t), f);
|
|
81
|
+
function i(t, p) {
|
|
82
|
+
const g = t;
|
|
83
|
+
return typeof p == "number" ? [{ target: g, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: g, operator: "getProperty", param: t, value: !!p }] : typeof p == "object" ? Object.keys(p).map((b) => {
|
|
70
84
|
if (b === "length")
|
|
71
85
|
return { target: g, operator: "length", param: null, value: p[b] };
|
|
72
|
-
const
|
|
73
|
-
return { target: g, operator: "getProperty", param:
|
|
86
|
+
const d = b, h = p[b];
|
|
87
|
+
return { target: g, operator: "getProperty", param: d, value: h };
|
|
74
88
|
}) : [];
|
|
75
89
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(
|
|
78
|
-
const
|
|
79
|
-
return g.push(...
|
|
90
|
+
function l(t) {
|
|
91
|
+
return Object.keys(t).reduce((g, b) => {
|
|
92
|
+
const d = i(b, t[b]);
|
|
93
|
+
return g.push(...d), g;
|
|
80
94
|
}, []);
|
|
81
95
|
}
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
84
|
-
const g =
|
|
85
|
-
return g && g(
|
|
96
|
+
function r(t, p) {
|
|
97
|
+
if (f.has(t.operator)) {
|
|
98
|
+
const g = f.get(t.operator);
|
|
99
|
+
return g && g(t.target, t.param, t.value, p) || !1;
|
|
86
100
|
}
|
|
87
101
|
return !1;
|
|
88
102
|
}
|
|
89
|
-
function s(
|
|
90
|
-
return
|
|
103
|
+
function s(t, p) {
|
|
104
|
+
return l(t).reduce((d, h) => d && r(h, p), !0);
|
|
91
105
|
}
|
|
92
|
-
function k(
|
|
93
|
-
const g = Object.keys(
|
|
94
|
-
return b ? !
|
|
106
|
+
function k(t, p) {
|
|
107
|
+
const g = Object.keys(t), b = g.includes("allOf"), d = g.includes("anyOf"), h = b || d, y = (h ? t[h ? b ? "allOf" : "anyOf" : "allOf"] : [t]).map((o) => s(o, p));
|
|
108
|
+
return b ? !y.includes(!1) : y.includes(!0);
|
|
95
109
|
}
|
|
96
110
|
return { parseValueSchema: k };
|
|
97
111
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const s =
|
|
112
|
+
const ve = {}, fe = {};
|
|
113
|
+
ye();
|
|
114
|
+
function he(e, n, u = /* @__PURE__ */ new Map(), f = (r, s, k, t) => s, i = {}, l = (r) => r) {
|
|
115
|
+
return ee[n.title] = n, ne[n.title] = f, ve[n.title] = i, fe[n.title] = l, (r = {}) => {
|
|
116
|
+
const s = de(r, n, u), k = Object.keys(e).reduce((t, p) => (t[p] = e[p].default, t), {});
|
|
103
117
|
return Object.assign(k, s);
|
|
104
118
|
};
|
|
105
119
|
}
|
|
106
|
-
function
|
|
107
|
-
return { customClass:
|
|
120
|
+
function me(e, n) {
|
|
121
|
+
return { customClass: n.class, customStyle: n.style };
|
|
108
122
|
}
|
|
109
|
-
const
|
|
110
|
-
["appearance",
|
|
123
|
+
const pe = /* @__PURE__ */ new Map([
|
|
124
|
+
["appearance", me]
|
|
111
125
|
]);
|
|
112
|
-
function
|
|
113
|
-
return
|
|
126
|
+
function we(e, n, u) {
|
|
127
|
+
return n;
|
|
114
128
|
}
|
|
115
|
-
const
|
|
129
|
+
const ge = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/calendar.schema.json", De = "calendar", be = "A Farris Input Component", Me = "object", Te = {
|
|
116
130
|
id: {
|
|
117
131
|
description: "The unique identifier for calendar",
|
|
118
132
|
type: "string"
|
|
@@ -135,18 +149,18 @@ const we = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
|
|
|
135
149
|
},
|
|
136
150
|
default: {}
|
|
137
151
|
}
|
|
138
|
-
},
|
|
152
|
+
}, Pe = [
|
|
139
153
|
"id",
|
|
140
154
|
"type"
|
|
141
155
|
], Ve = {
|
|
142
|
-
$schema:
|
|
143
|
-
$id:
|
|
144
|
-
title:
|
|
145
|
-
description:
|
|
146
|
-
type:
|
|
147
|
-
properties:
|
|
148
|
-
required:
|
|
149
|
-
},
|
|
156
|
+
$schema: ge,
|
|
157
|
+
$id: ke,
|
|
158
|
+
title: De,
|
|
159
|
+
description: be,
|
|
160
|
+
type: Me,
|
|
161
|
+
properties: Te,
|
|
162
|
+
required: Pe
|
|
163
|
+
}, Ne = "calendar", Oe = "A Farris Component", We = "object", Ce = {
|
|
150
164
|
basic: {
|
|
151
165
|
description: "Basic Infomation",
|
|
152
166
|
title: "基本信息",
|
|
@@ -168,254 +182,254 @@ const we = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
|
|
|
168
182
|
}
|
|
169
183
|
}
|
|
170
184
|
}
|
|
171
|
-
},
|
|
172
|
-
title:
|
|
173
|
-
description:
|
|
174
|
-
type:
|
|
175
|
-
categories:
|
|
185
|
+
}, Se = {
|
|
186
|
+
title: Ne,
|
|
187
|
+
description: Oe,
|
|
188
|
+
type: We,
|
|
189
|
+
categories: Ce
|
|
176
190
|
}, Q = {
|
|
177
191
|
events: { Type: Array, default: [] },
|
|
178
192
|
firstDayOfTheWeek: { type: String, default: "Sun." }
|
|
179
|
-
},
|
|
193
|
+
}, ae = he(Q, Ve, pe, we, Se), F = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
180
194
|
var A = /* @__PURE__ */ ((e) => (e[e.previous = 1] = "previous", e[e.current = 2] = "current", e[e.next = 3] = "next", e))(A || {});
|
|
181
195
|
function z() {
|
|
182
196
|
function e() {
|
|
183
197
|
return { year: 0, month: 0, day: 0 };
|
|
184
198
|
}
|
|
185
|
-
function t
|
|
199
|
+
function n(t) {
|
|
186
200
|
return new Date(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
201
|
+
t.year || 0,
|
|
202
|
+
t.month ? t.month - 1 : 0,
|
|
203
|
+
t.day || 0,
|
|
204
|
+
t.hour ? t.hour : 0,
|
|
205
|
+
t.minute ? t.minute : 0,
|
|
206
|
+
t.second ? t.second : 0,
|
|
193
207
|
0
|
|
194
208
|
);
|
|
195
209
|
}
|
|
196
|
-
function
|
|
210
|
+
function u(t) {
|
|
197
211
|
const p = /* @__PURE__ */ new Date();
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
212
|
+
return t.year || (t.year = p.getFullYear()), t.month || (t.month = p.getMonth() + 1), t.day || (t.day = 1), new Date(
|
|
213
|
+
t.year,
|
|
214
|
+
t.month - 1,
|
|
215
|
+
t.day,
|
|
216
|
+
t.hour ? t.hour : 0,
|
|
217
|
+
t.minute ? t.minute : 0,
|
|
218
|
+
t.second ? t.second : 0,
|
|
205
219
|
0
|
|
206
220
|
);
|
|
207
221
|
}
|
|
208
|
-
function
|
|
222
|
+
function f(t) {
|
|
209
223
|
return new Date(
|
|
210
|
-
|
|
211
|
-
(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
224
|
+
t.year || 1,
|
|
225
|
+
(t.month || 1) - 1,
|
|
226
|
+
t.day,
|
|
227
|
+
t.hour ? t.hour : 0,
|
|
228
|
+
t.minute ? t.minute : 0,
|
|
229
|
+
t.second ? t.second : 0,
|
|
216
230
|
0
|
|
217
231
|
).getDay();
|
|
218
232
|
}
|
|
219
|
-
function
|
|
220
|
-
return
|
|
233
|
+
function i(t) {
|
|
234
|
+
return F.indexOf(t);
|
|
221
235
|
}
|
|
222
|
-
function
|
|
223
|
-
return t
|
|
236
|
+
function l(t) {
|
|
237
|
+
return n(t).getTime();
|
|
224
238
|
}
|
|
225
|
-
function
|
|
226
|
-
return Math.round(
|
|
239
|
+
function r(t) {
|
|
240
|
+
return Math.round(l(t) / 1e3);
|
|
227
241
|
}
|
|
228
|
-
function s(
|
|
229
|
-
const b =
|
|
230
|
-
return
|
|
242
|
+
function s(t, p, g) {
|
|
243
|
+
const b = l(p), d = l(g), h = l(t);
|
|
244
|
+
return d - h > h - b ? p : g;
|
|
231
245
|
}
|
|
232
246
|
function k() {
|
|
233
|
-
const
|
|
247
|
+
const t = /* @__PURE__ */ new Date();
|
|
234
248
|
return {
|
|
235
|
-
year:
|
|
236
|
-
month:
|
|
237
|
-
day:
|
|
238
|
-
hour:
|
|
239
|
-
minute:
|
|
240
|
-
second:
|
|
249
|
+
year: t.getFullYear(),
|
|
250
|
+
month: t.getMonth() + 1,
|
|
251
|
+
day: t.getDate(),
|
|
252
|
+
hour: t.getHours(),
|
|
253
|
+
minute: t.getMinutes(),
|
|
254
|
+
second: t.getSeconds()
|
|
241
255
|
};
|
|
242
256
|
}
|
|
243
|
-
return { emptyDate: e, getDate:
|
|
257
|
+
return { emptyDate: e, getDate: n, getDate2: u, getDayNumber: f, getEpocTime: r, getNearDate: s, getWeekdayIndex: i, getTimeInMilliseconds: l, getToday: k };
|
|
244
258
|
}
|
|
245
|
-
function
|
|
246
|
-
function e(
|
|
247
|
-
return new Date(
|
|
259
|
+
function je() {
|
|
260
|
+
function e(l, r) {
|
|
261
|
+
return new Date(r, l, 0).getDate();
|
|
248
262
|
}
|
|
249
|
-
function
|
|
250
|
-
return new Date(
|
|
263
|
+
function n(l, r, s) {
|
|
264
|
+
return new Date(l, r - 1, s, 0, 0, 0, 0);
|
|
251
265
|
}
|
|
252
|
-
function l
|
|
253
|
-
const s =
|
|
266
|
+
function u(l, r) {
|
|
267
|
+
const s = n(r, l, 1);
|
|
254
268
|
return s.setMonth(s.getMonth() - 1), e(s.getMonth() + 1, s.getFullYear());
|
|
255
269
|
}
|
|
256
|
-
function
|
|
270
|
+
function f(l, r) {
|
|
257
271
|
const s = {
|
|
258
|
-
year:
|
|
259
|
-
}, k =
|
|
272
|
+
year: l === 12 ? r + 1 : r
|
|
273
|
+
}, k = l === 12 ? 1 : l + 1;
|
|
260
274
|
return s.month = k, s;
|
|
261
275
|
}
|
|
262
|
-
function
|
|
276
|
+
function i(l, r) {
|
|
263
277
|
const s = {
|
|
264
|
-
year:
|
|
265
|
-
}, k =
|
|
278
|
+
year: l === 1 ? r - 1 : r
|
|
279
|
+
}, k = l === 1 ? 12 : l - 1;
|
|
266
280
|
return s.month = k, s;
|
|
267
281
|
}
|
|
268
|
-
return { daysInMonth: e, daysInPreMonth:
|
|
282
|
+
return { daysInMonth: e, daysInPreMonth: u, getNextMonth: f, getPreviousMonth: i };
|
|
269
283
|
}
|
|
270
|
-
function
|
|
271
|
-
const { getToday: e, getDayNumber:
|
|
272
|
-
function
|
|
273
|
-
const D =
|
|
284
|
+
function re() {
|
|
285
|
+
const { getToday: e, getDayNumber: n } = z(), { daysInMonth: u, daysInPreMonth: f, getNextMonth: i, getPreviousMonth: l } = je();
|
|
286
|
+
function r(m) {
|
|
287
|
+
const D = F.indexOf(m);
|
|
274
288
|
return D > 0 ? 7 - D : 0;
|
|
275
289
|
}
|
|
276
|
-
function s(
|
|
277
|
-
const { day: D, month:
|
|
278
|
-
if (D === void 0 ||
|
|
290
|
+
function s(m) {
|
|
291
|
+
const { day: D, month: y, year: a } = m;
|
|
292
|
+
if (D === void 0 || y === void 0 || a === void 0)
|
|
279
293
|
throw new Error("invalided date.");
|
|
280
|
-
const
|
|
294
|
+
const o = D === 1, w = o ? f(y, a) : D - 1, v = o ? y - 1 : y, M = v < 1, T = M ? 12 : v;
|
|
281
295
|
return {
|
|
282
296
|
year: M ? a - 1 : a,
|
|
283
297
|
month: T,
|
|
284
298
|
day: w
|
|
285
299
|
};
|
|
286
300
|
}
|
|
287
|
-
function k(
|
|
288
|
-
const { day: D, month:
|
|
289
|
-
if (D === void 0 ||
|
|
301
|
+
function k(m) {
|
|
302
|
+
const { day: D, month: y, year: a } = m;
|
|
303
|
+
if (D === void 0 || y === void 0 || a === void 0)
|
|
290
304
|
throw new Error("invalided date.");
|
|
291
|
-
const
|
|
305
|
+
const o = u(y, a), w = D === o, v = w ? 1 : D + 1, M = w ? y + 1 : y, T = M > 12, V = T ? 1 : M;
|
|
292
306
|
return {
|
|
293
307
|
year: T ? a + 1 : a,
|
|
294
|
-
month:
|
|
308
|
+
month: V,
|
|
295
309
|
day: v
|
|
296
310
|
};
|
|
297
311
|
}
|
|
298
|
-
function
|
|
299
|
-
const D =
|
|
312
|
+
function t(m) {
|
|
313
|
+
const D = l(m.month || 1, m.year || 1), y = u(D.month || 1, D.year || 1);
|
|
300
314
|
return {
|
|
301
|
-
day: (
|
|
315
|
+
day: (m.day || 1) <= y ? m.day : y,
|
|
302
316
|
month: D.month,
|
|
303
317
|
year: D.year
|
|
304
318
|
};
|
|
305
319
|
}
|
|
306
|
-
function p(
|
|
307
|
-
const D =
|
|
320
|
+
function p(m) {
|
|
321
|
+
const D = i(m.month || 1, m.year || 1), y = u(D.month || 1, D.year || 1);
|
|
308
322
|
return {
|
|
309
|
-
day: (
|
|
323
|
+
day: (m.day || 1) <= y ? m.day : y,
|
|
310
324
|
month: D.month,
|
|
311
325
|
year: D.year
|
|
312
326
|
};
|
|
313
327
|
}
|
|
314
|
-
function g(
|
|
315
|
-
const
|
|
328
|
+
function g(m) {
|
|
329
|
+
const y = (m.day || 1) - 7, a = y < 1, o = a ? u(m.month || 1, m.year || 1) + y : y, w = a ? l(m.month || 1, m.year || 1) : m;
|
|
316
330
|
return {
|
|
317
|
-
day:
|
|
331
|
+
day: o,
|
|
318
332
|
month: w.month,
|
|
319
333
|
year: w.year
|
|
320
334
|
};
|
|
321
335
|
}
|
|
322
|
-
function b(
|
|
323
|
-
const
|
|
336
|
+
function b(m) {
|
|
337
|
+
const y = (m.day || 1) + 7, a = u(m.month || 1, m.year || 1), o = y > a, w = o ? y - a : y, v = o ? i(m.month || 1, m.year || 1) : m;
|
|
324
338
|
return {
|
|
325
339
|
day: w,
|
|
326
340
|
month: v.month,
|
|
327
341
|
year: v.year
|
|
328
342
|
};
|
|
329
343
|
}
|
|
330
|
-
function
|
|
331
|
-
const
|
|
332
|
-
let
|
|
344
|
+
function d(m, D, y, a) {
|
|
345
|
+
const o = { day: m, month: D, year: y }, v = r(a) === 0 ? 1 : 0, M = n(o) + v, T = e();
|
|
346
|
+
let V = s(o);
|
|
333
347
|
const S = [];
|
|
334
348
|
for (let j = M - 1; j >= 1; j--) {
|
|
335
|
-
const
|
|
336
|
-
S.push({ date:
|
|
349
|
+
const I = V.month !== o.month ? A.previous : A.current, O = V.month === D && V.day === T.day && V.month === T.month && V.year === T.year;
|
|
350
|
+
S.push({ date: V, monthTag: I, isCurrent: O }), j > 1 && (V = s(V));
|
|
337
351
|
}
|
|
338
|
-
let C = k(
|
|
352
|
+
let C = k(o);
|
|
339
353
|
const E = [];
|
|
340
354
|
for (let j = M + 1; j <= 7; j++) {
|
|
341
|
-
const
|
|
342
|
-
E.push({ date: C, monthTag:
|
|
355
|
+
const I = V.month !== o.month ? A.next : A.current, O = C.day === T.day && C.month === T.month && C.year === T.year;
|
|
356
|
+
E.push({ date: C, monthTag: I, isCurrent: O }), j < 7 && (C = k(C));
|
|
343
357
|
}
|
|
344
|
-
const N =
|
|
358
|
+
const N = m === T.day && D === T.month && y === T.year;
|
|
345
359
|
return {
|
|
346
|
-
days: [...S.reverse(), { date:
|
|
360
|
+
days: [...S.reverse(), { date: o, monthTag: A.current, isCurrent: N }, ...E],
|
|
347
361
|
weekNumber: 0,
|
|
348
|
-
year:
|
|
362
|
+
year: y
|
|
349
363
|
};
|
|
350
364
|
}
|
|
351
|
-
function
|
|
352
|
-
const a = [],
|
|
353
|
-
for (let w = 1; w <=
|
|
354
|
-
const v =
|
|
365
|
+
function h(m, D, y) {
|
|
366
|
+
const a = [], o = u(m, D);
|
|
367
|
+
for (let w = 1; w <= o; w += 7) {
|
|
368
|
+
const v = d(w, m, D, y);
|
|
355
369
|
a.push(v);
|
|
356
370
|
}
|
|
357
371
|
return a;
|
|
358
372
|
}
|
|
359
373
|
return {
|
|
360
|
-
getMonthlyCalendar:
|
|
361
|
-
getWeeklyCalendar:
|
|
374
|
+
getMonthlyCalendar: h,
|
|
375
|
+
getWeeklyCalendar: d,
|
|
362
376
|
getPreviousDay: s,
|
|
363
377
|
getNextDay: k,
|
|
364
378
|
getDayInPreviousWeek: g,
|
|
365
379
|
getDayInNextWeek: b,
|
|
366
|
-
getDayInPreviousMonth:
|
|
380
|
+
getDayInPreviousMonth: t,
|
|
367
381
|
getDayInNextMonth: p
|
|
368
382
|
};
|
|
369
383
|
}
|
|
370
|
-
function
|
|
384
|
+
function q() {
|
|
371
385
|
const { getTimeInMilliseconds: e } = z();
|
|
372
|
-
function
|
|
373
|
-
return
|
|
386
|
+
function n(d) {
|
|
387
|
+
return d && d.year !== 0 && d.month !== 0 && d.day !== 0;
|
|
374
388
|
}
|
|
375
|
-
function
|
|
376
|
-
return
|
|
389
|
+
function u(d) {
|
|
390
|
+
return d && d.year !== 0 && d.month !== 0;
|
|
377
391
|
}
|
|
378
|
-
function
|
|
379
|
-
return
|
|
392
|
+
function f(d) {
|
|
393
|
+
return d && d.year !== 0;
|
|
380
394
|
}
|
|
381
|
-
function
|
|
382
|
-
return e(
|
|
395
|
+
function i(d, h) {
|
|
396
|
+
return e(d) < e(h);
|
|
383
397
|
}
|
|
384
|
-
function
|
|
385
|
-
return e(
|
|
398
|
+
function l(d, h) {
|
|
399
|
+
return e(d) <= e(h);
|
|
386
400
|
}
|
|
387
|
-
function
|
|
388
|
-
return e(
|
|
401
|
+
function r(d, h) {
|
|
402
|
+
return e(d) === e(h);
|
|
389
403
|
}
|
|
390
|
-
function s(
|
|
391
|
-
const
|
|
392
|
-
return e(
|
|
404
|
+
function s(d, h) {
|
|
405
|
+
const m = e(h);
|
|
406
|
+
return e(d.from) === m || e(d.to) === m;
|
|
393
407
|
}
|
|
394
|
-
function k(
|
|
395
|
-
return !
|
|
408
|
+
function k(d, h) {
|
|
409
|
+
return !h || !n(h.to) || !n(h.from) ? !1 : l(h.from, d) && l(d, h.to);
|
|
396
410
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
411
|
+
function t(d, h) {
|
|
412
|
+
return n(h) && e(d) >= e(h);
|
|
399
413
|
}
|
|
400
|
-
function p(
|
|
401
|
-
return
|
|
414
|
+
function p(d, h) {
|
|
415
|
+
return n(h) && e(d) <= e(h);
|
|
402
416
|
}
|
|
403
|
-
function g(
|
|
404
|
-
return e({ year:
|
|
417
|
+
function g(d, h) {
|
|
418
|
+
return e({ year: d.year, month: d.month, day: d.day }) === e({ year: h.year, month: h.month, day: h.day });
|
|
405
419
|
}
|
|
406
|
-
function b(
|
|
407
|
-
return e({ hour:
|
|
420
|
+
function b(d, h) {
|
|
421
|
+
return e({ hour: d.hour, minute: d.minute, second: d.second }) === e({ hour: h.hour, minute: h.minute, second: h.second });
|
|
408
422
|
}
|
|
409
423
|
return {
|
|
410
|
-
isDateEarlier:
|
|
411
|
-
equal:
|
|
424
|
+
isDateEarlier: i,
|
|
425
|
+
equal: r,
|
|
412
426
|
inPeriod: k,
|
|
413
427
|
isPoint: s,
|
|
414
|
-
equalOrEarlier:
|
|
415
|
-
isInitializedDate:
|
|
416
|
-
isInitializedMonth:
|
|
417
|
-
isInitializedYear:
|
|
418
|
-
isMonthDisabledByDisableSince:
|
|
428
|
+
equalOrEarlier: l,
|
|
429
|
+
isInitializedDate: n,
|
|
430
|
+
isInitializedMonth: u,
|
|
431
|
+
isInitializedYear: f,
|
|
432
|
+
isMonthDisabledByDisableSince: t,
|
|
419
433
|
isMonthDisabledByDisableUntil: p,
|
|
420
434
|
sameTime: b,
|
|
421
435
|
sameDay: g
|
|
@@ -434,57 +448,57 @@ const X = {
|
|
|
434
448
|
10: "Oct",
|
|
435
449
|
11: "Nov",
|
|
436
450
|
12: "Dec"
|
|
437
|
-
},
|
|
451
|
+
}, Ae = {
|
|
438
452
|
activeView: { Type: Number, default: 3 },
|
|
439
453
|
title: { Type: String, default: "" },
|
|
440
454
|
dailyViewTitle: { Type: String, default: "Day" },
|
|
441
455
|
weeklyViewTitle: { Type: String, default: "Week" },
|
|
442
456
|
monthlyViewTitle: { Type: String, default: "Month" }
|
|
443
|
-
},
|
|
457
|
+
}, x = /* @__PURE__ */ R({
|
|
444
458
|
name: "FCalendarHeader",
|
|
445
|
-
props:
|
|
459
|
+
props: Ae,
|
|
446
460
|
emits: ["ViewChange", "Previous", "Next", "ResetToToday"],
|
|
447
|
-
setup(e,
|
|
448
|
-
const
|
|
461
|
+
setup(e, n) {
|
|
462
|
+
const u = P(e.title), f = P(e.dailyViewTitle), i = P(e.weeklyViewTitle), l = P(e.monthlyViewTitle), r = 2, s = 62, k = P(e.activeView), t = P("Today");
|
|
449
463
|
$(() => e.title, () => {
|
|
450
|
-
|
|
464
|
+
u.value = e.title;
|
|
451
465
|
});
|
|
452
466
|
const p = W(() => ({
|
|
453
|
-
top: `${
|
|
454
|
-
left: `${k.value * (
|
|
455
|
-
})), g = W(() => k.value === 1 ?
|
|
467
|
+
top: `${r}px`,
|
|
468
|
+
left: `${k.value * (r + 1) + (k.value - 1) * (s + 1)}px`
|
|
469
|
+
})), g = W(() => k.value === 1 ? f.value : k.value === 2 ? i.value : l.value);
|
|
456
470
|
function b() {
|
|
457
|
-
k.value = 1,
|
|
471
|
+
k.value = 1, n.emit("ViewChange", 1);
|
|
458
472
|
}
|
|
459
|
-
function
|
|
460
|
-
k.value = 2,
|
|
461
|
-
}
|
|
462
|
-
function f() {
|
|
463
|
-
k.value = 3, t.emit("ViewChange", 3);
|
|
473
|
+
function d() {
|
|
474
|
+
k.value = 2, n.emit("ViewChange", 2);
|
|
464
475
|
}
|
|
465
476
|
function h() {
|
|
466
|
-
|
|
477
|
+
k.value = 3, n.emit("ViewChange", 3);
|
|
478
|
+
}
|
|
479
|
+
function m() {
|
|
480
|
+
n.emit("Previous", k.value);
|
|
467
481
|
}
|
|
468
482
|
function D() {
|
|
469
|
-
|
|
483
|
+
n.emit("Next", k.value);
|
|
470
484
|
}
|
|
471
|
-
function
|
|
472
|
-
|
|
485
|
+
function y() {
|
|
486
|
+
n.emit("ResetToToday");
|
|
473
487
|
}
|
|
474
488
|
return () => c("div", {
|
|
475
489
|
class: "f-calendar-header"
|
|
476
490
|
}, [c("div", {
|
|
477
491
|
class: "f-calendar-title"
|
|
478
|
-
}, [
|
|
492
|
+
}, [u.value]), c("div", {
|
|
479
493
|
class: "f-calendar-navigator"
|
|
480
494
|
}, [c("div", {
|
|
481
495
|
class: "f-calendar-navigator-today btn btn-default",
|
|
482
|
-
onClick: () =>
|
|
483
|
-
}, [
|
|
496
|
+
onClick: () => y()
|
|
497
|
+
}, [t.value]), c("div", {
|
|
484
498
|
class: "f-calendar-navigator-button-group"
|
|
485
499
|
}, [c("div", {
|
|
486
500
|
class: "f-calendar-navigator-previous btn btn-default",
|
|
487
|
-
onClick: () =>
|
|
501
|
+
onClick: () => m()
|
|
488
502
|
}, [c("i", {
|
|
489
503
|
class: "f-icon f-icon-arrow-chevron-left"
|
|
490
504
|
}, null)]), c("div", {
|
|
@@ -499,126 +513,126 @@ const X = {
|
|
|
499
513
|
}, [c("span", {
|
|
500
514
|
class: "f-calendar-view-switch-daily",
|
|
501
515
|
onClick: (a) => b()
|
|
502
|
-
}, [
|
|
516
|
+
}, [f.value]), c("span", {
|
|
503
517
|
class: "f-calendar-view-switch-weekly",
|
|
504
|
-
onClick: (a) =>
|
|
505
|
-
}, [
|
|
518
|
+
onClick: (a) => d()
|
|
519
|
+
}, [i.value]), c("span", {
|
|
506
520
|
class: "f-calendar-view-switch-monthly",
|
|
507
|
-
onClick: (a) =>
|
|
508
|
-
}, [
|
|
521
|
+
onClick: (a) => h()
|
|
522
|
+
}, [l.value])]), c("div", {
|
|
509
523
|
class: "f-calendar-view-switch-active-view",
|
|
510
524
|
style: p.value
|
|
511
525
|
}, [g.value])])]);
|
|
512
526
|
}
|
|
513
|
-
}),
|
|
527
|
+
}), Ee = {
|
|
514
528
|
dates: { Type: Array, default: [] },
|
|
515
|
-
daysInWeek: { Type: Array, default:
|
|
529
|
+
daysInWeek: { Type: Array, default: F },
|
|
516
530
|
enableKeyboadNavigate: { Type: Boolean, default: !0 },
|
|
517
531
|
enableMarkCurrent: { Type: Boolean, default: !0 },
|
|
518
532
|
events: { Type: Array, default: [] },
|
|
519
533
|
activeDay: { Type: Object, default: null }
|
|
520
534
|
};
|
|
521
|
-
var
|
|
522
|
-
function
|
|
523
|
-
function e(
|
|
524
|
-
const
|
|
525
|
-
return
|
|
535
|
+
var _ = /* @__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))(_ || {});
|
|
536
|
+
function $e() {
|
|
537
|
+
function e(n) {
|
|
538
|
+
const u = n.key || n.keyCode;
|
|
539
|
+
return u === "Enter" || u === 13 ? 13 : u === "Escape" || u === 27 ? 27 : u === " " || u === 32 ? 32 : u === "ArrowLeft" || u === 37 ? 37 : u === "ArrowUp" || u === 38 ? 38 : u === "ArrowRight" || u === 39 ? 39 : u === "ArrowDown" || u === 40 ? 40 : u === "Tab" || u === 9 ? 9 : u === "Shift" || u === 16 ? 16 : -1;
|
|
526
540
|
}
|
|
527
541
|
return { getKeyCodeFromEvent: e };
|
|
528
542
|
}
|
|
529
|
-
const
|
|
543
|
+
const G = /* @__PURE__ */ R({
|
|
530
544
|
name: "FCalendarMonthView",
|
|
531
|
-
props:
|
|
545
|
+
props: Ee,
|
|
532
546
|
emits: ["click", "keyDown"],
|
|
533
|
-
setup(e,
|
|
534
|
-
const
|
|
547
|
+
setup(e, n) {
|
|
548
|
+
const u = P(e.daysInWeek), f = P(e.enableKeyboadNavigate), i = P(e.enableMarkCurrent), l = P(e.activeDay), r = P(e.events), {
|
|
535
549
|
equal: s,
|
|
536
550
|
sameDay: k
|
|
537
|
-
} =
|
|
538
|
-
getKeyCodeFromEvent:
|
|
539
|
-
} =
|
|
540
|
-
function p(
|
|
541
|
-
return
|
|
542
|
-
|
|
551
|
+
} = q(), {
|
|
552
|
+
getKeyCodeFromEvent: t
|
|
553
|
+
} = $e();
|
|
554
|
+
function p(y, a) {
|
|
555
|
+
return y.forEach((o) => {
|
|
556
|
+
o.days.forEach((w) => {
|
|
543
557
|
const v = a.filter((M) => k(M.starts, w.date));
|
|
544
558
|
v && v.length && (w.events = [...v]);
|
|
545
559
|
});
|
|
546
|
-
}),
|
|
560
|
+
}), y;
|
|
547
561
|
}
|
|
548
|
-
const g =
|
|
562
|
+
const g = P(p(e.dates, r.value));
|
|
549
563
|
$(() => e.dates, () => {
|
|
550
|
-
g.value = p(e.dates,
|
|
564
|
+
g.value = p(e.dates, r.value);
|
|
551
565
|
}), $(() => e.activeDay, () => {
|
|
552
|
-
|
|
566
|
+
l.value = e.activeDay;
|
|
553
567
|
}), $(() => e.events, () => {
|
|
554
|
-
|
|
568
|
+
r.value = e.events;
|
|
555
569
|
});
|
|
556
|
-
function b(
|
|
557
|
-
return !!
|
|
558
|
-
year:
|
|
559
|
-
month:
|
|
560
|
-
day:
|
|
561
|
-
},
|
|
570
|
+
function b(y) {
|
|
571
|
+
return !!l.value && s({
|
|
572
|
+
year: l.value.year,
|
|
573
|
+
month: l.value.month,
|
|
574
|
+
day: l.value.day
|
|
575
|
+
}, y);
|
|
562
576
|
}
|
|
563
|
-
const
|
|
577
|
+
const d = (y, a, o) => {
|
|
564
578
|
const v = {
|
|
565
|
-
"f-datepicker-no-currmonth":
|
|
566
|
-
}, M = `d_${a}_${
|
|
579
|
+
"f-datepicker-no-currmonth": y.monthTag === A.previous || y.monthTag === A.next
|
|
580
|
+
}, M = `d_${a}_${o}`;
|
|
567
581
|
return v[M] = !0, v;
|
|
568
|
-
},
|
|
569
|
-
const a =
|
|
582
|
+
}, h = (y) => {
|
|
583
|
+
const a = y.monthTag === A.current && b(y.date), o = y.isCurrent && i.value;
|
|
570
584
|
return {
|
|
571
585
|
"f-calendar-month-view-date": !0,
|
|
572
586
|
"f-calendar-month-view-selected": a,
|
|
573
|
-
"f-calendar-month-view-current":
|
|
587
|
+
"f-calendar-month-view-current": o
|
|
574
588
|
};
|
|
575
589
|
};
|
|
576
|
-
function
|
|
577
|
-
|
|
590
|
+
function m(y, a) {
|
|
591
|
+
y.stopPropagation(), n.emit("click", a.date);
|
|
578
592
|
}
|
|
579
|
-
function D(
|
|
580
|
-
const
|
|
581
|
-
|
|
593
|
+
function D(y, a) {
|
|
594
|
+
const o = t(y);
|
|
595
|
+
o !== _.tab && (y.preventDefault(), o === _.enter || o === _.space ? m(y, a) : f.value && n.emit("keyDown", a.date));
|
|
582
596
|
}
|
|
583
597
|
return () => c("div", {
|
|
584
598
|
class: "f-calendar-month-view"
|
|
585
599
|
}, [c("table", {
|
|
586
600
|
class: "f-datepicker-table",
|
|
587
601
|
cellpadding: "0"
|
|
588
|
-
}, [c("thead", null, [c("tr", null, [
|
|
602
|
+
}, [c("thead", null, [c("tr", null, [u.value && u.value.map((y) => c("th", {
|
|
589
603
|
scope: "col",
|
|
590
604
|
style: "padding: 4px 4px 8px"
|
|
591
|
-
}, [
|
|
605
|
+
}, [y]))])]), c("tbody", null, [g.value && g.value.map((y, a) => c("tr", null, [y.days && y.days.map((o, w) => c("td", {
|
|
592
606
|
id: `d_${a}_${w}`,
|
|
593
607
|
tabindex: "0",
|
|
594
|
-
class:
|
|
595
|
-
onClick: (v) =>
|
|
596
|
-
onKeydown: (v) => D(v,
|
|
608
|
+
class: d(o, a, w),
|
|
609
|
+
onClick: (v) => m(v, o),
|
|
610
|
+
onKeydown: (v) => D(v, o)
|
|
597
611
|
}, [c("div", {
|
|
598
612
|
class: "f-calendar-month-view-title"
|
|
599
613
|
}, [c("div", {
|
|
600
|
-
class:
|
|
601
|
-
}, [
|
|
614
|
+
class: h(o)
|
|
615
|
+
}, [o.date.day]), c("div", {
|
|
602
616
|
class: "f-calendar-month-view-date-month"
|
|
603
|
-
}, [
|
|
617
|
+
}, [o.date.day === 1 ? X[o.date.month || 1] : ""])]), o.events && o.events.length && o.events.map((v) => c("div", {
|
|
604
618
|
class: "f-calendar-month-view-event-item"
|
|
605
619
|
}, [v.title]))]))]))])])]);
|
|
606
620
|
}
|
|
607
|
-
}),
|
|
608
|
-
daysInWeek: { Type: Array, default:
|
|
621
|
+
}), Be = {
|
|
622
|
+
daysInWeek: { Type: Array, default: F },
|
|
609
623
|
enableMarkCurrent: { Type: Boolean, default: !0 },
|
|
610
624
|
events: { Type: Array, default: [] },
|
|
611
625
|
week: { Type: Object, default: { days: [], weekNumber: 0, year: 0 } }
|
|
612
|
-
},
|
|
626
|
+
}, L = /* @__PURE__ */ R({
|
|
613
627
|
name: "FCalendarWeekView",
|
|
614
|
-
props:
|
|
628
|
+
props: Be,
|
|
615
629
|
emits: [],
|
|
616
630
|
setup(e) {
|
|
617
|
-
const
|
|
631
|
+
const n = P(), u = P(), f = P(e.daysInWeek), i = P(e.week), l = P(e.enableMarkCurrent), r = P(e.events), s = P([]), {
|
|
618
632
|
equal: k
|
|
619
|
-
} =
|
|
620
|
-
function
|
|
621
|
-
return
|
|
633
|
+
} = q();
|
|
634
|
+
function t(a) {
|
|
635
|
+
return i.value.days.map((w) => {
|
|
622
636
|
const v = {
|
|
623
637
|
year: w.date.year,
|
|
624
638
|
month: w.date.month,
|
|
@@ -626,7 +640,7 @@ const x = /* @__PURE__ */ F({
|
|
|
626
640
|
hour: a.hour,
|
|
627
641
|
minute: a.minute,
|
|
628
642
|
second: a.second
|
|
629
|
-
}, M =
|
|
643
|
+
}, M = r.value.filter((T) => k(T.starts, v));
|
|
630
644
|
return {
|
|
631
645
|
day: v,
|
|
632
646
|
events: M
|
|
@@ -635,38 +649,38 @@ const x = /* @__PURE__ */ F({
|
|
|
635
649
|
}
|
|
636
650
|
function p() {
|
|
637
651
|
const a = [];
|
|
638
|
-
for (let
|
|
652
|
+
for (let o = 0; o < 24; o++) {
|
|
639
653
|
const w = {
|
|
640
|
-
hour:
|
|
654
|
+
hour: o,
|
|
641
655
|
minute: 0,
|
|
642
656
|
second: 0
|
|
643
657
|
}, v = {
|
|
644
|
-
hour:
|
|
658
|
+
hour: o,
|
|
645
659
|
minute: 30,
|
|
646
660
|
second: 0
|
|
647
|
-
}, M =
|
|
661
|
+
}, M = t(w), T = t(v);
|
|
648
662
|
a.push({
|
|
649
663
|
time: w,
|
|
650
664
|
events: M,
|
|
651
|
-
title:
|
|
665
|
+
title: o > 0 ? `${o}:00` : "",
|
|
652
666
|
part: "upper"
|
|
653
667
|
}), a.push({
|
|
654
668
|
time: v,
|
|
655
669
|
events: T,
|
|
656
|
-
title: `${
|
|
670
|
+
title: `${o}:30`,
|
|
657
671
|
part: "lower"
|
|
658
672
|
});
|
|
659
673
|
}
|
|
660
674
|
s.value = a;
|
|
661
675
|
}
|
|
662
676
|
p(), $(() => e.week, () => {
|
|
663
|
-
|
|
677
|
+
i.value = e.week, p();
|
|
664
678
|
}), $(() => e.events, () => {
|
|
665
|
-
|
|
679
|
+
r.value = e.events, p();
|
|
666
680
|
});
|
|
667
681
|
const g = (a) => ({
|
|
668
682
|
"f-calendar-week-view-date": !0,
|
|
669
|
-
"f-calendar-week-view-current": a.isCurrent &&
|
|
683
|
+
"f-calendar-week-view-current": a.isCurrent && l.value
|
|
670
684
|
});
|
|
671
685
|
function b() {
|
|
672
686
|
return c("div", {
|
|
@@ -677,13 +691,13 @@ const x = /* @__PURE__ */ F({
|
|
|
677
691
|
class: "f-calendar-week-view-header-primary"
|
|
678
692
|
}, [c("div", {
|
|
679
693
|
class: "f-calendar-week-view-header-columns"
|
|
680
|
-
}, [
|
|
694
|
+
}, [f.value.map((a, o) => c("div", {
|
|
681
695
|
class: "f-calendar-week-view-header-cell"
|
|
682
696
|
}, [c("div", {
|
|
683
|
-
class: g(
|
|
684
|
-
}, [
|
|
697
|
+
class: g(i.value.days[o])
|
|
698
|
+
}, [i.value.days[o].date.day]), c("span", null, [a])]))])])]);
|
|
685
699
|
}
|
|
686
|
-
function
|
|
700
|
+
function d() {
|
|
687
701
|
return c("div", {
|
|
688
702
|
class: "f-calendar-week-view-content-side"
|
|
689
703
|
}, [c("div", {
|
|
@@ -694,107 +708,107 @@ const x = /* @__PURE__ */ F({
|
|
|
694
708
|
class: "f-calendar-side-row-number"
|
|
695
709
|
}, [a.part === "upper" ? a.title : ""])]))])]);
|
|
696
710
|
}
|
|
697
|
-
function
|
|
711
|
+
function h(a) {
|
|
698
712
|
return {
|
|
699
713
|
"f-calendar-week-view-item": !0,
|
|
700
714
|
"f-calendar-week-view-item-upper": a.part === "upper",
|
|
701
715
|
"f-calendar-week-view-item-lower": a.part === "lower"
|
|
702
716
|
};
|
|
703
717
|
}
|
|
704
|
-
function
|
|
705
|
-
const
|
|
718
|
+
function m(a) {
|
|
719
|
+
const V = (a.starts.hour || 0) + (a.starts.minute || 0) / 60;
|
|
706
720
|
return {
|
|
707
|
-
height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 -
|
|
721
|
+
height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - V) - 2 - 2 - 1 - 1}px`
|
|
708
722
|
};
|
|
709
723
|
}
|
|
710
724
|
function D() {
|
|
711
725
|
return s.value.map((a) => c("div", {
|
|
712
|
-
class:
|
|
713
|
-
}, [a.events.map((
|
|
726
|
+
class: h(a)
|
|
727
|
+
}, [a.events.map((o) => c("div", {
|
|
714
728
|
class: "f-calendar-week-view-item-cell"
|
|
715
|
-
}, [
|
|
729
|
+
}, [o.events.length > 0 && o.events.map((w) => c("div", {
|
|
716
730
|
class: "f-calendar-event",
|
|
717
|
-
style:
|
|
731
|
+
style: m(w)
|
|
718
732
|
}, [w.title]))]))]));
|
|
719
733
|
}
|
|
720
|
-
function
|
|
734
|
+
function y() {
|
|
721
735
|
return c("div", {
|
|
722
|
-
ref:
|
|
736
|
+
ref: u,
|
|
723
737
|
class: "f-calendar-content-primary"
|
|
724
738
|
}, [c("div", {
|
|
725
739
|
class: "f-calendar-content-data"
|
|
726
740
|
}, [D()])]);
|
|
727
741
|
}
|
|
728
742
|
return J(() => {
|
|
729
|
-
|
|
743
|
+
n.value && n.value.scrollTo(0, 250);
|
|
730
744
|
}), () => c("div", {
|
|
731
745
|
class: "f-calendar-week-view"
|
|
732
746
|
}, [b(), c("div", {
|
|
733
747
|
class: "f-calendar-week-view-content",
|
|
734
|
-
ref:
|
|
735
|
-
}, [
|
|
748
|
+
ref: n
|
|
749
|
+
}, [d(), y()])]);
|
|
736
750
|
}
|
|
737
|
-
}),
|
|
751
|
+
}), Re = {
|
|
738
752
|
day: { Type: Object, default: {} },
|
|
739
753
|
dayInWeek: { Type: String, default: "" },
|
|
740
754
|
enableMarkCurrent: { Type: Boolean, default: !0 },
|
|
741
755
|
events: { Type: Array, default: [] }
|
|
742
|
-
},
|
|
756
|
+
}, Y = /* @__PURE__ */ R({
|
|
743
757
|
name: "FCalendarDayView",
|
|
744
|
-
props:
|
|
758
|
+
props: Re,
|
|
745
759
|
emits: [],
|
|
746
760
|
setup(e) {
|
|
747
|
-
const
|
|
761
|
+
const n = P(), u = P(), f = P(e.dayInWeek), i = P(e.day), l = P(e.enableMarkCurrent), r = P(e.events), s = P([]), {
|
|
748
762
|
equal: k
|
|
749
|
-
} =
|
|
750
|
-
function
|
|
751
|
-
const
|
|
752
|
-
year:
|
|
753
|
-
month:
|
|
754
|
-
day:
|
|
763
|
+
} = q();
|
|
764
|
+
function t(a) {
|
|
765
|
+
const o = {
|
|
766
|
+
year: i.value.date.year,
|
|
767
|
+
month: i.value.date.month,
|
|
768
|
+
day: i.value.date.day,
|
|
755
769
|
hour: a.hour,
|
|
756
770
|
minute: a.minute,
|
|
757
771
|
second: a.second
|
|
758
|
-
}, w =
|
|
772
|
+
}, w = r.value.filter((v) => k(v.starts, o));
|
|
759
773
|
return [{
|
|
760
|
-
day:
|
|
774
|
+
day: o,
|
|
761
775
|
events: w
|
|
762
776
|
}];
|
|
763
777
|
}
|
|
764
778
|
function p() {
|
|
765
779
|
const a = [];
|
|
766
|
-
for (let
|
|
780
|
+
for (let o = 0; o < 24; o++) {
|
|
767
781
|
const w = {
|
|
768
|
-
hour:
|
|
782
|
+
hour: o,
|
|
769
783
|
minute: 0,
|
|
770
784
|
second: 0
|
|
771
785
|
}, v = {
|
|
772
|
-
hour:
|
|
786
|
+
hour: o,
|
|
773
787
|
minute: 30,
|
|
774
788
|
second: 0
|
|
775
|
-
}, M =
|
|
789
|
+
}, M = t(w), T = t(v);
|
|
776
790
|
a.push({
|
|
777
791
|
time: w,
|
|
778
792
|
events: M,
|
|
779
|
-
title:
|
|
793
|
+
title: o > 0 ? `${o}:00` : "",
|
|
780
794
|
part: "upper"
|
|
781
795
|
}), a.push({
|
|
782
796
|
time: v,
|
|
783
797
|
events: T,
|
|
784
|
-
title: `${
|
|
798
|
+
title: `${o}:30`,
|
|
785
799
|
part: "lower"
|
|
786
800
|
});
|
|
787
801
|
}
|
|
788
802
|
s.value = a;
|
|
789
803
|
}
|
|
790
804
|
p(), $(() => e.day, () => {
|
|
791
|
-
|
|
805
|
+
i.value = e.day, p();
|
|
792
806
|
}), $(() => e.events, () => {
|
|
793
|
-
|
|
807
|
+
r.value = e.events, p();
|
|
794
808
|
});
|
|
795
809
|
const g = (a) => ({
|
|
796
810
|
"f-calendar-day-view-date": !0,
|
|
797
|
-
"f-calendar-day-view-current": a.isCurrent &&
|
|
811
|
+
"f-calendar-day-view-current": a.isCurrent && l.value
|
|
798
812
|
});
|
|
799
813
|
function b() {
|
|
800
814
|
return c("div", {
|
|
@@ -808,10 +822,10 @@ const x = /* @__PURE__ */ F({
|
|
|
808
822
|
}, [c("div", {
|
|
809
823
|
class: "f-calendar-day-view-header-cell"
|
|
810
824
|
}, [c("div", {
|
|
811
|
-
class: g(
|
|
812
|
-
}, [
|
|
825
|
+
class: g(i.value)
|
|
826
|
+
}, [i.value.date.day]), c("span", null, [f.value])])])])]);
|
|
813
827
|
}
|
|
814
|
-
function
|
|
828
|
+
function d() {
|
|
815
829
|
return c("div", {
|
|
816
830
|
class: "f-calendar-day-view-content-side"
|
|
817
831
|
}, [c("div", {
|
|
@@ -822,285 +836,285 @@ const x = /* @__PURE__ */ F({
|
|
|
822
836
|
class: "f-calendar-side-row-number"
|
|
823
837
|
}, [a.part === "upper" ? a.title : ""])]))])]);
|
|
824
838
|
}
|
|
825
|
-
function
|
|
839
|
+
function h(a) {
|
|
826
840
|
return {
|
|
827
841
|
"f-calendar-day-view-item": !0,
|
|
828
842
|
"f-calendar-day-view-item-upper": a.part === "upper",
|
|
829
843
|
"f-calendar-day-view-item-lower": a.part === "lower"
|
|
830
844
|
};
|
|
831
845
|
}
|
|
832
|
-
function
|
|
833
|
-
const
|
|
846
|
+
function m(a) {
|
|
847
|
+
const V = (a.starts.hour || 0) + (a.starts.minute || 0) / 60;
|
|
834
848
|
return {
|
|
835
|
-
height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 -
|
|
849
|
+
height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - V) - 2 - 2 - 1 - 1}px`
|
|
836
850
|
};
|
|
837
851
|
}
|
|
838
852
|
function D() {
|
|
839
853
|
return s.value.map((a) => c("div", {
|
|
840
|
-
class:
|
|
841
|
-
}, [a.events.map((
|
|
854
|
+
class: h(a)
|
|
855
|
+
}, [a.events.map((o) => c("div", {
|
|
842
856
|
class: "f-calendar-day-view-item-cell"
|
|
843
|
-
}, [
|
|
857
|
+
}, [o.events.length > 0 && o.events.map((w) => c("div", {
|
|
844
858
|
class: "f-calendar-event",
|
|
845
|
-
style:
|
|
859
|
+
style: m(w)
|
|
846
860
|
}, [w.title]))]))]));
|
|
847
861
|
}
|
|
848
|
-
function
|
|
862
|
+
function y() {
|
|
849
863
|
return c("div", {
|
|
850
|
-
ref:
|
|
864
|
+
ref: u,
|
|
851
865
|
class: "f-calendar-content-primary"
|
|
852
866
|
}, [c("div", {
|
|
853
867
|
class: "f-calendar-content-data"
|
|
854
868
|
}, [D()])]);
|
|
855
869
|
}
|
|
856
870
|
return J(() => {
|
|
857
|
-
|
|
871
|
+
n.value && n.value.scrollTo(0, 250);
|
|
858
872
|
}), () => c("div", {
|
|
859
873
|
class: "f-calendar-day-view"
|
|
860
874
|
}, [b(), c("div", {
|
|
861
875
|
class: "f-calendar-day-view-content",
|
|
862
|
-
ref:
|
|
863
|
-
}, [
|
|
876
|
+
ref: n
|
|
877
|
+
}, [d(), y()])]);
|
|
864
878
|
}
|
|
865
|
-
}), B = /* @__PURE__ */
|
|
879
|
+
}), B = /* @__PURE__ */ R({
|
|
866
880
|
name: "FCalendar",
|
|
867
881
|
props: Q,
|
|
868
882
|
emits: [],
|
|
869
883
|
setup(e) {
|
|
870
884
|
const {
|
|
871
|
-
sameDay:
|
|
872
|
-
} =
|
|
873
|
-
getToday:
|
|
874
|
-
} = z(),
|
|
875
|
-
year:
|
|
876
|
-
month:
|
|
877
|
-
day:
|
|
878
|
-
}), s =
|
|
885
|
+
sameDay: n
|
|
886
|
+
} = q(), {
|
|
887
|
+
getToday: u
|
|
888
|
+
} = z(), f = P(e.firstDayOfTheWeek), i = P(e.events), l = u(), r = P({
|
|
889
|
+
year: l.year || 1,
|
|
890
|
+
month: l.month || 1,
|
|
891
|
+
day: l.day || 1
|
|
892
|
+
}), s = P(3), {
|
|
879
893
|
getMonthlyCalendar: k,
|
|
880
|
-
getWeeklyCalendar:
|
|
894
|
+
getWeeklyCalendar: t,
|
|
881
895
|
getPreviousDay: p,
|
|
882
896
|
getNextDay: g,
|
|
883
897
|
getDayInPreviousWeek: b,
|
|
884
|
-
getDayInNextWeek:
|
|
885
|
-
getDayInPreviousMonth:
|
|
886
|
-
getDayInNextMonth:
|
|
887
|
-
} =
|
|
888
|
-
const N = a.value.days.findIndex((j) =>
|
|
889
|
-
return
|
|
898
|
+
getDayInNextWeek: d,
|
|
899
|
+
getDayInPreviousMonth: h,
|
|
900
|
+
getDayInNextMonth: m
|
|
901
|
+
} = re(), D = W(() => `${X[r.value.month || 1]} ${r.value.year}`), y = W(() => k(r.value.month || 1, r.value.year || 1, f.value)), a = W(() => t(r.value.day || 1, r.value.month || 1, r.value.year || 1, f.value)), o = W(() => a.value.days.find((N) => n(N.date, r.value)) || a.value.days[1]), w = W(() => {
|
|
902
|
+
const N = a.value.days.findIndex((j) => n(j.date, r.value)), H = N > -1 ? N : 1;
|
|
903
|
+
return F[H];
|
|
890
904
|
}), v = W(() => s.value === 3), M = W(() => s.value === 2), T = W(() => s.value === 1);
|
|
891
|
-
function
|
|
905
|
+
function V(N) {
|
|
892
906
|
s.value = N;
|
|
893
907
|
}
|
|
894
908
|
function S(N) {
|
|
895
|
-
N === 1 && (
|
|
909
|
+
N === 1 && (r.value = p(r.value)), N === 2 && (r.value = b(r.value)), N === 3 && (r.value = h(r.value));
|
|
896
910
|
}
|
|
897
911
|
function C(N) {
|
|
898
|
-
N === 1 && (
|
|
912
|
+
N === 1 && (r.value = g(r.value)), N === 2 && (r.value = d(r.value)), N === 3 && (r.value = m(r.value));
|
|
899
913
|
}
|
|
900
914
|
function E() {
|
|
901
|
-
|
|
902
|
-
year:
|
|
903
|
-
month:
|
|
904
|
-
day:
|
|
915
|
+
r.value = {
|
|
916
|
+
year: l.year || 1,
|
|
917
|
+
month: l.month || 1,
|
|
918
|
+
day: l.day || 1
|
|
905
919
|
};
|
|
906
920
|
}
|
|
907
921
|
return () => c("div", {
|
|
908
922
|
class: "f-calendar"
|
|
909
|
-
}, [c(
|
|
923
|
+
}, [c(x, {
|
|
910
924
|
activeView: s.value,
|
|
911
925
|
title: D.value,
|
|
912
|
-
onViewChange: (N) =>
|
|
926
|
+
onViewChange: (N) => V(N),
|
|
913
927
|
onPrevious: (N) => S(N),
|
|
914
928
|
onNext: (N) => C(N),
|
|
915
929
|
onResetToToday: () => E()
|
|
916
|
-
}, null), c("div", null, [T.value && c(
|
|
917
|
-
day:
|
|
930
|
+
}, null), c("div", null, [T.value && c(Y, {
|
|
931
|
+
day: o.value,
|
|
918
932
|
dayInWeek: w.value,
|
|
919
|
-
events:
|
|
920
|
-
}, null), M.value && c(
|
|
933
|
+
events: i.value
|
|
934
|
+
}, null), M.value && c(L, {
|
|
921
935
|
week: a.value,
|
|
922
|
-
events:
|
|
923
|
-
}, null), v.value && c(
|
|
924
|
-
activeDay:
|
|
925
|
-
dates:
|
|
926
|
-
events:
|
|
936
|
+
events: i.value
|
|
937
|
+
}, null), v.value && c(G, {
|
|
938
|
+
activeDay: r.value,
|
|
939
|
+
dates: y.value,
|
|
940
|
+
events: i.value
|
|
927
941
|
}, null)])]);
|
|
928
942
|
}
|
|
929
943
|
});
|
|
930
|
-
function Fe(e,
|
|
944
|
+
function Fe(e, n, u) {
|
|
931
945
|
var w;
|
|
932
|
-
const
|
|
933
|
-
function
|
|
934
|
-
return (
|
|
946
|
+
const f = "", i = "", l = P();
|
|
947
|
+
function r() {
|
|
948
|
+
return (n == null ? void 0 : n.schema.componentType) !== "frame";
|
|
935
949
|
}
|
|
936
950
|
function s() {
|
|
937
951
|
return !1;
|
|
938
952
|
}
|
|
939
953
|
function k() {
|
|
940
|
-
return (
|
|
954
|
+
return (n == null ? void 0 : n.schema.componentType) !== "frame";
|
|
941
955
|
}
|
|
942
|
-
function
|
|
943
|
-
return (
|
|
956
|
+
function t() {
|
|
957
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame";
|
|
944
958
|
}
|
|
945
959
|
function p(v) {
|
|
946
960
|
if (!v || !v.value)
|
|
947
961
|
return null;
|
|
948
962
|
if (v.value.schema && v.value.schema.type === "component")
|
|
949
963
|
return v.value;
|
|
950
|
-
const M =
|
|
964
|
+
const M = P(v == null ? void 0 : v.value.parent), T = p(M);
|
|
951
965
|
return T || null;
|
|
952
966
|
}
|
|
953
|
-
function g(v =
|
|
967
|
+
function g(v = n) {
|
|
954
968
|
const { componentInstance: M, designerItemElementRef: T } = v;
|
|
955
969
|
return !M || !M.value ? null : M.value.canMove ? T : g(v.parent);
|
|
956
970
|
}
|
|
957
971
|
function b(v) {
|
|
958
|
-
return !!
|
|
972
|
+
return !!u;
|
|
959
973
|
}
|
|
960
|
-
function
|
|
961
|
-
return (
|
|
974
|
+
function d() {
|
|
975
|
+
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
962
976
|
}
|
|
963
|
-
function
|
|
977
|
+
function h() {
|
|
964
978
|
}
|
|
965
|
-
function
|
|
979
|
+
function m(v, M) {
|
|
966
980
|
}
|
|
967
981
|
function D(v, M) {
|
|
968
982
|
const { componentType: T } = v;
|
|
969
|
-
let
|
|
983
|
+
let V = te(T, v, M);
|
|
970
984
|
const S = T.toLowerCase().replace(/-/g, "_");
|
|
971
|
-
return
|
|
985
|
+
return V && !V.id && V.type === T && (V.id = `${S}_${Math.random().toString().slice(2, 6)}`), V;
|
|
972
986
|
}
|
|
973
|
-
function
|
|
987
|
+
function y(v) {
|
|
974
988
|
}
|
|
975
989
|
function a(...v) {
|
|
976
990
|
}
|
|
977
|
-
function
|
|
978
|
-
|
|
979
|
-
var
|
|
991
|
+
function o() {
|
|
992
|
+
n != null && n.schema.contents && n.schema.contents.map((v) => {
|
|
993
|
+
var V;
|
|
980
994
|
let M = v.id;
|
|
981
995
|
v.type === "component-ref" && (M = v.component);
|
|
982
996
|
const T = e.value.querySelector(`#${M}-design-item`);
|
|
983
|
-
(
|
|
997
|
+
(V = T == null ? void 0 : T.componentInstance) != null && V.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
|
|
984
998
|
});
|
|
985
999
|
}
|
|
986
|
-
return
|
|
987
|
-
canMove:
|
|
1000
|
+
return l.value = {
|
|
1001
|
+
canMove: r(),
|
|
988
1002
|
canSelectParent: s(),
|
|
989
1003
|
canDelete: k(),
|
|
990
|
-
canNested: !
|
|
991
|
-
contents:
|
|
1004
|
+
canNested: !t(),
|
|
1005
|
+
contents: n == null ? void 0 : n.schema.contents,
|
|
992
1006
|
elementRef: e,
|
|
993
|
-
parent: (w =
|
|
994
|
-
schema:
|
|
995
|
-
styles:
|
|
996
|
-
designerClass:
|
|
1007
|
+
parent: (w = n == null ? void 0 : n.parent) == null ? void 0 : w.componentInstance,
|
|
1008
|
+
schema: n == null ? void 0 : n.schema,
|
|
1009
|
+
styles: f,
|
|
1010
|
+
designerClass: i,
|
|
997
1011
|
canAccepts: b,
|
|
998
1012
|
getBelongedComponentInstance: p,
|
|
999
1013
|
getDraggableDesignItemElement: g,
|
|
1000
|
-
getDraggingDisplayText:
|
|
1014
|
+
getDraggingDisplayText: d,
|
|
1001
1015
|
getPropConfig: a,
|
|
1002
|
-
getDragScopeElement:
|
|
1003
|
-
onAcceptMovedChildElement:
|
|
1004
|
-
onChildElementMovedOut:
|
|
1016
|
+
getDragScopeElement: h,
|
|
1017
|
+
onAcceptMovedChildElement: m,
|
|
1018
|
+
onChildElementMovedOut: y,
|
|
1005
1019
|
addNewChildComponentSchema: D,
|
|
1006
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1007
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1008
|
-
onRemoveComponent:
|
|
1009
|
-
},
|
|
1020
|
+
triggerBelongedComponentToMoveWhenMoved: P(!1),
|
|
1021
|
+
triggerBelongedComponentToDeleteWhenDeleted: P(!1),
|
|
1022
|
+
onRemoveComponent: o
|
|
1023
|
+
}, l;
|
|
1010
1024
|
}
|
|
1011
|
-
const Ie = /* @__PURE__ */
|
|
1025
|
+
const Ie = /* @__PURE__ */ R({
|
|
1012
1026
|
name: "FCalendarDesign",
|
|
1013
1027
|
props: Q,
|
|
1014
1028
|
emits: [],
|
|
1015
|
-
setup(e,
|
|
1029
|
+
setup(e, n) {
|
|
1016
1030
|
const {
|
|
1017
|
-
sameDay:
|
|
1018
|
-
} =
|
|
1019
|
-
getToday:
|
|
1020
|
-
} = z(),
|
|
1021
|
-
year:
|
|
1022
|
-
month:
|
|
1023
|
-
day:
|
|
1024
|
-
}), k =
|
|
1031
|
+
sameDay: u
|
|
1032
|
+
} = q(), {
|
|
1033
|
+
getToday: f
|
|
1034
|
+
} = z(), i = P(e.firstDayOfTheWeek), l = P(e.events), r = f(), s = P({
|
|
1035
|
+
year: r.year || 1,
|
|
1036
|
+
month: r.month || 1,
|
|
1037
|
+
day: r.day || 1
|
|
1038
|
+
}), k = P(3), t = P(), p = ce("design-item-context"), g = Fe(t, p);
|
|
1025
1039
|
J(() => {
|
|
1026
|
-
|
|
1027
|
-
}),
|
|
1040
|
+
t.value.componentInstance = g;
|
|
1041
|
+
}), n.expose(g.value);
|
|
1028
1042
|
const {
|
|
1029
1043
|
getMonthlyCalendar: b,
|
|
1030
|
-
getWeeklyCalendar:
|
|
1031
|
-
getPreviousDay:
|
|
1032
|
-
getNextDay:
|
|
1044
|
+
getWeeklyCalendar: d,
|
|
1045
|
+
getPreviousDay: h,
|
|
1046
|
+
getNextDay: m,
|
|
1033
1047
|
getDayInPreviousWeek: D,
|
|
1034
|
-
getDayInNextWeek:
|
|
1048
|
+
getDayInNextWeek: y,
|
|
1035
1049
|
getDayInPreviousMonth: a,
|
|
1036
|
-
getDayInNextMonth:
|
|
1037
|
-
} =
|
|
1038
|
-
const O = M.value.days.findIndex((
|
|
1039
|
-
return
|
|
1050
|
+
getDayInNextMonth: o
|
|
1051
|
+
} = re(), w = W(() => `${X[s.value.month || 1]} ${s.value.year}`), v = W(() => b(s.value.month || 1, s.value.year || 1, i.value)), M = W(() => d(s.value.day || 1, s.value.month || 1, s.value.year || 1, i.value)), T = W(() => M.value.days.find((O) => u(O.date, s.value)) || M.value.days[1]), V = W(() => {
|
|
1052
|
+
const O = M.value.days.findIndex((se) => u(se.date, s.value)), oe = O > -1 ? O : 1;
|
|
1053
|
+
return F[oe];
|
|
1040
1054
|
}), S = W(() => k.value === 3), C = W(() => k.value === 2), E = W(() => k.value === 1);
|
|
1041
1055
|
function N(O) {
|
|
1042
1056
|
k.value = O;
|
|
1043
1057
|
}
|
|
1044
|
-
function
|
|
1045
|
-
O === 1 && (s.value =
|
|
1058
|
+
function H(O) {
|
|
1059
|
+
O === 1 && (s.value = h(s.value)), O === 2 && (s.value = D(s.value)), O === 3 && (s.value = a(s.value));
|
|
1046
1060
|
}
|
|
1047
1061
|
function j(O) {
|
|
1048
|
-
O === 1 && (s.value =
|
|
1062
|
+
O === 1 && (s.value = m(s.value)), O === 2 && (s.value = y(s.value)), O === 3 && (s.value = o(s.value));
|
|
1049
1063
|
}
|
|
1050
|
-
function
|
|
1064
|
+
function I() {
|
|
1051
1065
|
s.value = {
|
|
1052
|
-
year:
|
|
1053
|
-
month:
|
|
1054
|
-
day:
|
|
1066
|
+
year: r.year || 1,
|
|
1067
|
+
month: r.month || 1,
|
|
1068
|
+
day: r.day || 1
|
|
1055
1069
|
};
|
|
1056
1070
|
}
|
|
1057
1071
|
return () => c("div", {
|
|
1058
|
-
ref:
|
|
1072
|
+
ref: t,
|
|
1059
1073
|
class: "f-calendar"
|
|
1060
|
-
}, [c(
|
|
1074
|
+
}, [c(x, {
|
|
1061
1075
|
activeView: k.value,
|
|
1062
1076
|
title: w.value,
|
|
1063
1077
|
onViewChange: (O) => N(O),
|
|
1064
|
-
onPrevious: (O) =>
|
|
1078
|
+
onPrevious: (O) => H(O),
|
|
1065
1079
|
onNext: (O) => j(O),
|
|
1066
|
-
onResetToToday: () =>
|
|
1067
|
-
}, null), c("div", null, [E.value && c(
|
|
1080
|
+
onResetToToday: () => I()
|
|
1081
|
+
}, null), c("div", null, [E.value && c(Y, {
|
|
1068
1082
|
day: T.value,
|
|
1069
|
-
dayInWeek:
|
|
1070
|
-
events:
|
|
1071
|
-
}, null), C.value && c(
|
|
1083
|
+
dayInWeek: V.value,
|
|
1084
|
+
events: l.value
|
|
1085
|
+
}, null), C.value && c(L, {
|
|
1072
1086
|
week: M.value,
|
|
1073
|
-
events:
|
|
1074
|
-
}, null), S.value && c(
|
|
1087
|
+
events: l.value
|
|
1088
|
+
}, null), S.value && c(G, {
|
|
1075
1089
|
activeDay: s.value,
|
|
1076
1090
|
dates: v.value,
|
|
1077
|
-
events:
|
|
1091
|
+
events: l.value
|
|
1078
1092
|
}, null)])]);
|
|
1079
1093
|
}
|
|
1080
1094
|
});
|
|
1081
1095
|
B.install = (e) => {
|
|
1082
|
-
e.component(B.name, B).component(
|
|
1096
|
+
e.component(B.name, B).component(Y.name, Y).component(x.name, x).component(G.name, G).component(L.name, L);
|
|
1083
1097
|
};
|
|
1084
|
-
B.register = (e,
|
|
1085
|
-
e.calendar = B,
|
|
1098
|
+
B.register = (e, n, u, f) => {
|
|
1099
|
+
e.calendar = B, n.calendar = ae;
|
|
1086
1100
|
};
|
|
1087
|
-
B.registerDesigner = (e,
|
|
1088
|
-
e.calendar = Ie,
|
|
1101
|
+
B.registerDesigner = (e, n, u) => {
|
|
1102
|
+
e.calendar = Ie, n.calendar = ae;
|
|
1089
1103
|
};
|
|
1090
1104
|
export {
|
|
1091
1105
|
B as FCalendar,
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1106
|
+
Y as FCalendarDayView,
|
|
1107
|
+
x as FCalendarHeader,
|
|
1108
|
+
G as FCalendarMonthView,
|
|
1109
|
+
L as FCalendarWeekView,
|
|
1096
1110
|
A as MonthTag,
|
|
1097
1111
|
Q as calendarProps,
|
|
1098
|
-
|
|
1112
|
+
Re as dayViewProps,
|
|
1099
1113
|
B as default,
|
|
1100
1114
|
X as defaultNameOfMonths,
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1115
|
+
Ae as headerProps,
|
|
1116
|
+
Ee as monthViewProps,
|
|
1117
|
+
ae as propsResolver,
|
|
1118
|
+
F as weekDays,
|
|
1119
|
+
Be as weekViewProps
|
|
1106
1120
|
};
|