@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { defineComponent as B, ref as
|
|
1
|
+
import { defineComponent as B, ref as T, watch as $, computed as W, createVNode as c, 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:
|
|
6
|
-
return h.id = `${
|
|
5
|
+
const { properties: t, title: d, ignore: h } = e, y = h && Array.isArray(h), i = Object.keys(t).reduce((o, s) => ((!y || !h.find((k) => k == s)) && (o[s] = t[s].type === "object" && t[s].properties ? Q(t[s]) : se(t[s].default)), o), {});
|
|
6
|
+
return (!y || !h.find((o) => o == "id")) && (i.id = `${d}-${Date.now()}`), i;
|
|
7
7
|
}
|
|
8
|
-
function z(e, t = {}) {
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
8
|
+
function z(e, t = {}, d) {
|
|
9
|
+
const h = K[e];
|
|
10
|
+
if (h) {
|
|
11
|
+
let y = Q(h);
|
|
12
|
+
const i = ee[e];
|
|
13
|
+
return y = i ? i({ getSchemaByType: z }, y, t, d) : y, y;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function ce(e, t) {
|
|
18
|
-
const
|
|
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),
|
|
18
|
+
const d = Q(t);
|
|
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), d), d;
|
|
20
20
|
}
|
|
21
21
|
function le(e, t) {
|
|
22
22
|
return Object.keys(e).filter((h) => e[h] != null).reduce((h, y) => {
|
|
23
23
|
if (t.has(y)) {
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
h[
|
|
24
|
+
const i = t.get(y);
|
|
25
|
+
if (typeof i == "string")
|
|
26
|
+
h[i] = e[y];
|
|
27
27
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(h,
|
|
28
|
+
const o = i(y, e[y], e);
|
|
29
|
+
Object.assign(h, o);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
32
|
h[y] = e[y];
|
|
33
33
|
return h;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
|
-
function ue(e, t,
|
|
36
|
+
function ue(e, t, d = /* @__PURE__ */ new Map()) {
|
|
37
37
|
const h = ce(e, t);
|
|
38
|
-
return le(h,
|
|
38
|
+
return le(h, d);
|
|
39
39
|
}
|
|
40
40
|
function ie(e = {}) {
|
|
41
41
|
function t(n, m, g, M) {
|
|
@@ -52,12 +52,12 @@ function ie(e = {}) {
|
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function d(n, m, g, M) {
|
|
56
56
|
return M[n] && M[n].propertyValue && String(M[n].propertyValue.value) === String(g);
|
|
57
57
|
}
|
|
58
58
|
const h = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", t],
|
|
60
|
-
["getProperty",
|
|
60
|
+
["getProperty", d]
|
|
61
61
|
]);
|
|
62
62
|
Object.keys(e).reduce((n, m) => (n.set(m, e[m]), n), h);
|
|
63
63
|
function y(n, m) {
|
|
@@ -69,34 +69,34 @@ function ie(e = {}) {
|
|
|
69
69
|
return { target: g, operator: "getProperty", param: l, value: v };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function i(n) {
|
|
73
73
|
return Object.keys(n).reduce((g, M) => {
|
|
74
74
|
const l = y(M, n[M]);
|
|
75
75
|
return g.push(...l), g;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function o(n, m) {
|
|
79
79
|
if (h.has(n.operator)) {
|
|
80
80
|
const g = h.get(n.operator);
|
|
81
81
|
return g && g(n.target, n.param, n.value, m) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function s(n, m) {
|
|
86
|
+
return i(n).reduce((l, v) => l && o(v, m), !0);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
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) =>
|
|
88
|
+
function k(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) => s(r, m));
|
|
90
90
|
return M ? !u.includes(!1) : u.includes(!0);
|
|
91
91
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
92
|
+
return { parseValueSchema: k };
|
|
93
93
|
}
|
|
94
94
|
const de = {}, ye = {};
|
|
95
95
|
ie();
|
|
96
|
-
function ve(e, t,
|
|
97
|
-
return K[t.title] = t, ee[t.title] = h, de[t.title] = y, ye[t.title] =
|
|
98
|
-
const
|
|
99
|
-
return Object.assign(
|
|
96
|
+
function ve(e, t, d = /* @__PURE__ */ new Map(), h = (o, s, k) => s, y = {}, i = (o) => o) {
|
|
97
|
+
return K[t.title] = t, ee[t.title] = h, de[t.title] = y, ye[t.title] = i, (o = {}) => {
|
|
98
|
+
const s = ue(o, t, d), k = Object.keys(e).reduce((n, m) => (n[m] = e[m].default, n), {});
|
|
99
|
+
return Object.assign(k, s);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
function fe(e, t) {
|
|
@@ -105,7 +105,7 @@ function fe(e, t) {
|
|
|
105
105
|
const he = /* @__PURE__ */ new Map([
|
|
106
106
|
["appearance", fe]
|
|
107
107
|
]);
|
|
108
|
-
function me(e, t,
|
|
108
|
+
function me(e, t, d) {
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
111
111
|
const pe = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-design.gitee.io/calendar.schema.json", ge = "calendar", ke = "A Farris Input Component", De = "object", be = {
|
|
@@ -174,7 +174,7 @@ const pe = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-
|
|
|
174
174
|
firstDayOfTheWeek: { type: String, default: "Sun." }
|
|
175
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
|
-
function
|
|
177
|
+
function J() {
|
|
178
178
|
function e() {
|
|
179
179
|
return { year: 0, month: 0, day: 0 };
|
|
180
180
|
}
|
|
@@ -189,7 +189,7 @@ function L() {
|
|
|
189
189
|
0
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function d(n) {
|
|
193
193
|
const m = /* @__PURE__ */ new Date();
|
|
194
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,
|
|
@@ -215,17 +215,17 @@ function L() {
|
|
|
215
215
|
function y(n) {
|
|
216
216
|
return F.indexOf(n);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function i(n) {
|
|
219
219
|
return t(n).getTime();
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return Math.round(
|
|
221
|
+
function o(n) {
|
|
222
|
+
return Math.round(i(n) / 1e3);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
const M =
|
|
224
|
+
function s(n, m, g) {
|
|
225
|
+
const M = i(m), l = i(g), v = i(n);
|
|
226
226
|
return l - v > v - M ? m : g;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function k() {
|
|
229
229
|
const n = /* @__PURE__ */ new Date();
|
|
230
230
|
return {
|
|
231
231
|
year: n.getFullYear(),
|
|
@@ -236,79 +236,79 @@ function L() {
|
|
|
236
236
|
second: n.getSeconds()
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
return { emptyDate: e, getDate: t, getDate2:
|
|
239
|
+
return { emptyDate: e, getDate: t, getDate2: d, getDayNumber: h, getEpocTime: o, getNearDate: s, getWeekdayIndex: y, getTimeInMilliseconds: i, getToday: k };
|
|
240
240
|
}
|
|
241
241
|
function We() {
|
|
242
|
-
function e(
|
|
243
|
-
return new Date(
|
|
242
|
+
function e(i, o) {
|
|
243
|
+
return new Date(o, i, 0).getDate();
|
|
244
244
|
}
|
|
245
|
-
function t(
|
|
246
|
-
return new Date(
|
|
245
|
+
function t(i, o, s) {
|
|
246
|
+
return new Date(i, o - 1, s, 0, 0, 0, 0);
|
|
247
247
|
}
|
|
248
|
-
function i
|
|
249
|
-
const
|
|
250
|
-
return
|
|
248
|
+
function d(i, o) {
|
|
249
|
+
const s = t(o, i, 1);
|
|
250
|
+
return s.setMonth(s.getMonth() - 1), e(s.getMonth() + 1, s.getFullYear());
|
|
251
251
|
}
|
|
252
|
-
function h(
|
|
253
|
-
const
|
|
254
|
-
year:
|
|
255
|
-
},
|
|
256
|
-
return
|
|
252
|
+
function h(i, o) {
|
|
253
|
+
const s = {
|
|
254
|
+
year: i === 12 ? o + 1 : o
|
|
255
|
+
}, k = i === 12 ? 1 : i + 1;
|
|
256
|
+
return s.month = k, s;
|
|
257
257
|
}
|
|
258
|
-
function y(
|
|
259
|
-
const
|
|
260
|
-
year:
|
|
261
|
-
},
|
|
262
|
-
return
|
|
258
|
+
function y(i, o) {
|
|
259
|
+
const s = {
|
|
260
|
+
year: i === 1 ? o - 1 : o
|
|
261
|
+
}, k = i === 1 ? 12 : i - 1;
|
|
262
|
+
return s.month = k, s;
|
|
263
263
|
}
|
|
264
|
-
return { daysInMonth: e, daysInPreMonth:
|
|
264
|
+
return { daysInMonth: e, daysInPreMonth: d, getNextMonth: h, getPreviousMonth: y };
|
|
265
265
|
}
|
|
266
266
|
function te() {
|
|
267
|
-
const { getToday: e, getDayNumber: t } =
|
|
268
|
-
function
|
|
269
|
-
const
|
|
270
|
-
return
|
|
267
|
+
const { getToday: e, getDayNumber: t } = J(), { daysInMonth: d, daysInPreMonth: h, getNextMonth: y, getPreviousMonth: i } = We();
|
|
268
|
+
function o(f) {
|
|
269
|
+
const D = F.indexOf(f);
|
|
270
|
+
return D > 0 ? 7 - D : 0;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
const { day:
|
|
274
|
-
if (
|
|
272
|
+
function s(f) {
|
|
273
|
+
const { day: D, month: u, year: a } = f;
|
|
274
|
+
if (D === void 0 || u === void 0 || a === void 0)
|
|
275
275
|
throw new Error("invalided date.");
|
|
276
|
-
const r =
|
|
276
|
+
const r = D === 1, p = r ? h(u, a) : D - 1, b = r ? u - 1 : u, w = b < 1, C = w ? 12 : b;
|
|
277
277
|
return {
|
|
278
278
|
year: w ? a - 1 : a,
|
|
279
|
-
month:
|
|
279
|
+
month: C,
|
|
280
280
|
day: p
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const { day:
|
|
285
|
-
if (
|
|
283
|
+
function k(f) {
|
|
284
|
+
const { day: D, month: u, year: a } = f;
|
|
285
|
+
if (D === void 0 || u === void 0 || a === void 0)
|
|
286
286
|
throw new Error("invalided date.");
|
|
287
|
-
const r =
|
|
287
|
+
const r = d(u, a), p = D === r, b = p ? 1 : D + 1, w = p ? u + 1 : u, C = w > 12, V = C ? 1 : w;
|
|
288
288
|
return {
|
|
289
|
-
year:
|
|
289
|
+
year: C ? a + 1 : a,
|
|
290
290
|
month: V,
|
|
291
|
-
day:
|
|
291
|
+
day: b
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
function n(f) {
|
|
295
|
-
const
|
|
295
|
+
const D = i(f.month || 1, f.year || 1), u = d(D.month || 1, D.year || 1);
|
|
296
296
|
return {
|
|
297
297
|
day: (f.day || 1) <= u ? f.day : u,
|
|
298
|
-
month:
|
|
299
|
-
year:
|
|
298
|
+
month: D.month,
|
|
299
|
+
year: D.year
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
302
|
function m(f) {
|
|
303
|
-
const
|
|
303
|
+
const D = y(f.month || 1, f.year || 1), u = d(D.month || 1, D.year || 1);
|
|
304
304
|
return {
|
|
305
305
|
day: (f.day || 1) <= u ? f.day : u,
|
|
306
|
-
month:
|
|
307
|
-
year:
|
|
306
|
+
month: D.month,
|
|
307
|
+
year: D.year
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
function g(f) {
|
|
311
|
-
const u = (f.day || 1) - 7, a = u < 1, r = a ?
|
|
311
|
+
const u = (f.day || 1) - 7, a = u < 1, r = a ? d(f.month || 1, f.year || 1) + u : u, p = a ? i(f.month || 1, f.year || 1) : f;
|
|
312
312
|
return {
|
|
313
313
|
day: r,
|
|
314
314
|
month: p.month,
|
|
@@ -316,47 +316,47 @@ function te() {
|
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
318
|
function M(f) {
|
|
319
|
-
const u = (f.day || 1) + 7, a =
|
|
319
|
+
const u = (f.day || 1) + 7, a = d(f.month || 1, f.year || 1), r = u > a, p = r ? u - a : u, b = r ? y(f.month || 1, f.year || 1) : f;
|
|
320
320
|
return {
|
|
321
321
|
day: p,
|
|
322
|
-
month:
|
|
323
|
-
year:
|
|
322
|
+
month: b.month,
|
|
323
|
+
year: b.year
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function l(f,
|
|
327
|
-
const r = { day: f, month:
|
|
328
|
-
let V =
|
|
329
|
-
const
|
|
330
|
-
for (let
|
|
331
|
-
const R = V.month !== r.month ? E.previous : E.current, N = V.month ===
|
|
332
|
-
|
|
326
|
+
function l(f, D, u, a) {
|
|
327
|
+
const r = { day: f, month: D, year: u }, b = o(a) === 0 ? 1 : 0, w = t(r) + b, C = e();
|
|
328
|
+
let V = s(r);
|
|
329
|
+
const O = [];
|
|
330
|
+
for (let j = w - 1; j >= 1; j--) {
|
|
331
|
+
const R = V.month !== r.month ? E.previous : E.current, N = V.month === D && V.day === C.day && V.month === C.month && V.year === C.year;
|
|
332
|
+
O.push({ date: V, monthTag: R, isCurrent: N }), j > 1 && (V = s(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 S = k(r);
|
|
335
|
+
const A = [];
|
|
336
|
+
for (let j = w + 1; j <= 7; j++) {
|
|
337
|
+
const R = V.month !== r.month ? E.next : E.current, N = S.day === C.day && S.month === C.month && S.year === C.year;
|
|
338
|
+
A.push({ date: S, monthTag: R, isCurrent: N }), j < 7 && (S = k(S));
|
|
339
339
|
}
|
|
340
|
-
const P = f ===
|
|
340
|
+
const P = f === C.day && D === C.month && u === C.year;
|
|
341
341
|
return {
|
|
342
|
-
days: [...
|
|
342
|
+
days: [...O.reverse(), { date: r, monthTag: E.current, isCurrent: P }, ...A],
|
|
343
343
|
weekNumber: 0,
|
|
344
344
|
year: u
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function v(f,
|
|
348
|
-
const a = [], r =
|
|
347
|
+
function v(f, D, u) {
|
|
348
|
+
const a = [], r = d(f, D);
|
|
349
349
|
for (let p = 1; p <= r; p += 7) {
|
|
350
|
-
const
|
|
351
|
-
a.push(
|
|
350
|
+
const b = l(p, f, D, u);
|
|
351
|
+
a.push(b);
|
|
352
352
|
}
|
|
353
353
|
return a;
|
|
354
354
|
}
|
|
355
355
|
return {
|
|
356
356
|
getMonthlyCalendar: v,
|
|
357
357
|
getWeeklyCalendar: l,
|
|
358
|
-
getPreviousDay:
|
|
359
|
-
getNextDay:
|
|
358
|
+
getPreviousDay: s,
|
|
359
|
+
getNextDay: k,
|
|
360
360
|
getDayInPreviousWeek: g,
|
|
361
361
|
getDayInNextWeek: M,
|
|
362
362
|
getDayInPreviousMonth: n,
|
|
@@ -364,11 +364,11 @@ function te() {
|
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function x() {
|
|
367
|
-
const { getTimeInMilliseconds: e } =
|
|
367
|
+
const { getTimeInMilliseconds: e } = J();
|
|
368
368
|
function t(l) {
|
|
369
369
|
return l && l.year !== 0 && l.month !== 0 && l.day !== 0;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function d(l) {
|
|
372
372
|
return l && l.year !== 0 && l.month !== 0;
|
|
373
373
|
}
|
|
374
374
|
function h(l) {
|
|
@@ -377,18 +377,18 @@ function x() {
|
|
|
377
377
|
function y(l, v) {
|
|
378
378
|
return e(l) < e(v);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function i(l, v) {
|
|
381
381
|
return e(l) <= e(v);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function o(l, v) {
|
|
384
384
|
return e(l) === e(v);
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function s(l, v) {
|
|
387
387
|
const f = e(v);
|
|
388
388
|
return e(l.from) === f || e(l.to) === f;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
return !v || !t(v.to) || !t(v.from) ? !1 :
|
|
390
|
+
function k(l, v) {
|
|
391
|
+
return !v || !t(v.to) || !t(v.from) ? !1 : i(v.from, l) && i(l, v.to);
|
|
392
392
|
}
|
|
393
393
|
function n(l, v) {
|
|
394
394
|
return t(v) && e(l) >= e(v);
|
|
@@ -404,12 +404,12 @@ function x() {
|
|
|
404
404
|
}
|
|
405
405
|
return {
|
|
406
406
|
isDateEarlier: y,
|
|
407
|
-
equal:
|
|
408
|
-
inPeriod:
|
|
409
|
-
isPoint:
|
|
410
|
-
equalOrEarlier:
|
|
407
|
+
equal: o,
|
|
408
|
+
inPeriod: k,
|
|
409
|
+
isPoint: s,
|
|
410
|
+
equalOrEarlier: i,
|
|
411
411
|
isInitializedDate: t,
|
|
412
|
-
isInitializedMonth:
|
|
412
|
+
isInitializedMonth: d,
|
|
413
413
|
isInitializedYear: h,
|
|
414
414
|
isMonthDisabledByDisableSince: n,
|
|
415
415
|
isMonthDisabledByDisableUntil: m,
|
|
@@ -441,72 +441,72 @@ const Z = {
|
|
|
441
441
|
props: Se,
|
|
442
442
|
emits: ["ViewChange", "Previous", "Next", "ResetToToday"],
|
|
443
443
|
setup(e, t) {
|
|
444
|
-
const
|
|
444
|
+
const d = T(e.title), h = T(e.dailyViewTitle), y = T(e.weeklyViewTitle), i = T(e.monthlyViewTitle), o = 2, s = 62, k = T(e.activeView), n = T("Today");
|
|
445
445
|
$(() => e.title, () => {
|
|
446
|
-
|
|
446
|
+
d.value = e.title;
|
|
447
447
|
});
|
|
448
|
-
const m =
|
|
449
|
-
top: `${
|
|
450
|
-
left: `${
|
|
451
|
-
})), g =
|
|
448
|
+
const m = W(() => ({
|
|
449
|
+
top: `${o}px`,
|
|
450
|
+
left: `${k.value * (o + 1) + (k.value - 1) * (s + 1)}px`
|
|
451
|
+
})), g = W(() => k.value === 1 ? h.value : k.value === 2 ? y.value : i.value);
|
|
452
452
|
function M() {
|
|
453
|
-
|
|
453
|
+
k.value = 1, t.emit("ViewChange", 1);
|
|
454
454
|
}
|
|
455
455
|
function l() {
|
|
456
|
-
|
|
456
|
+
k.value = 2, t.emit("ViewChange", 2);
|
|
457
457
|
}
|
|
458
458
|
function v() {
|
|
459
|
-
|
|
459
|
+
k.value = 3, t.emit("ViewChange", 3);
|
|
460
460
|
}
|
|
461
461
|
function f() {
|
|
462
|
-
t.emit("Previous",
|
|
462
|
+
t.emit("Previous", k.value);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
t.emit("Next",
|
|
464
|
+
function D() {
|
|
465
|
+
t.emit("Next", k.value);
|
|
466
466
|
}
|
|
467
467
|
function u() {
|
|
468
468
|
t.emit("ResetToToday");
|
|
469
469
|
}
|
|
470
|
-
return () =>
|
|
470
|
+
return () => c("div", {
|
|
471
471
|
class: "f-calendar-header"
|
|
472
|
-
}, [
|
|
472
|
+
}, [c("div", {
|
|
473
473
|
class: "f-calendar-title"
|
|
474
|
-
}, [
|
|
474
|
+
}, [d.value]), c("div", {
|
|
475
475
|
class: "f-calendar-navigator"
|
|
476
|
-
}, [
|
|
476
|
+
}, [c("div", {
|
|
477
477
|
class: "f-calendar-navigator-today btn btn-default",
|
|
478
478
|
onClick: () => u()
|
|
479
|
-
}, [n.value]),
|
|
479
|
+
}, [n.value]), c("div", {
|
|
480
480
|
class: "f-calendar-navigator-button-group"
|
|
481
|
-
}, [
|
|
481
|
+
}, [c("div", {
|
|
482
482
|
class: "f-calendar-navigator-previous btn btn-default",
|
|
483
483
|
onClick: () => f()
|
|
484
|
-
}, [
|
|
484
|
+
}, [c("i", {
|
|
485
485
|
class: "f-icon f-icon-arrow-chevron-left"
|
|
486
|
-
}, null)]),
|
|
486
|
+
}, null)]), c("div", {
|
|
487
487
|
class: "f-calendar-navigator-next btn btn-default",
|
|
488
|
-
onClick: () =>
|
|
489
|
-
}, [
|
|
488
|
+
onClick: () => D()
|
|
489
|
+
}, [c("i", {
|
|
490
490
|
class: "f-icon f-icon-arrow-chevron-right"
|
|
491
|
-
}, null)])])]),
|
|
491
|
+
}, null)])])]), c("div", {
|
|
492
492
|
class: "f-calendar-view-switch"
|
|
493
|
-
}, [
|
|
493
|
+
}, [c("div", {
|
|
494
494
|
class: "f-calendar-view-switch-panel"
|
|
495
|
-
}, [
|
|
495
|
+
}, [c("span", {
|
|
496
496
|
class: "f-calendar-view-switch-daily",
|
|
497
497
|
onClick: (a) => M()
|
|
498
|
-
}, [h.value]),
|
|
498
|
+
}, [h.value]), c("span", {
|
|
499
499
|
class: "f-calendar-view-switch-weekly",
|
|
500
500
|
onClick: (a) => l()
|
|
501
|
-
}, [y.value]),
|
|
501
|
+
}, [y.value]), c("span", {
|
|
502
502
|
class: "f-calendar-view-switch-monthly",
|
|
503
503
|
onClick: (a) => v()
|
|
504
|
-
}, [
|
|
504
|
+
}, [i.value])]), c("div", {
|
|
505
505
|
class: "f-calendar-view-switch-active-view",
|
|
506
506
|
style: m.value
|
|
507
507
|
}, [g.value])])]);
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
509
|
+
}), Ae = {
|
|
510
510
|
dates: { Type: Array, default: [] },
|
|
511
511
|
daysInWeek: { Type: Array, default: F },
|
|
512
512
|
enableKeyboadNavigate: { Type: Boolean, default: !0 },
|
|
@@ -515,52 +515,52 @@ 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 je() {
|
|
519
519
|
function e(t) {
|
|
520
|
-
const
|
|
521
|
-
return
|
|
520
|
+
const d = t.key || t.keyCode;
|
|
521
|
+
return d === "Enter" || d === 13 ? 13 : d === "Escape" || d === 27 ? 27 : d === " " || d === 32 ? 32 : d === "ArrowLeft" || d === 37 ? 37 : d === "ArrowUp" || d === 38 ? 38 : d === "ArrowRight" || d === 39 ? 39 : d === "ArrowDown" || d === 40 ? 40 : d === "Tab" || d === 9 ? 9 : d === "Shift" || d === 16 ? 16 : -1;
|
|
522
522
|
}
|
|
523
523
|
return { getKeyCodeFromEvent: e };
|
|
524
524
|
}
|
|
525
525
|
const _ = /* @__PURE__ */ B({
|
|
526
526
|
name: "FCalendarMonthView",
|
|
527
|
-
props:
|
|
527
|
+
props: Ae,
|
|
528
528
|
emits: ["click", "keyDown"],
|
|
529
529
|
setup(e, t) {
|
|
530
|
-
const
|
|
531
|
-
equal:
|
|
532
|
-
sameDay:
|
|
530
|
+
const d = T(e.daysInWeek), h = T(e.enableKeyboadNavigate), y = T(e.enableMarkCurrent), i = T(e.activeDay), o = T(e.events), {
|
|
531
|
+
equal: s,
|
|
532
|
+
sameDay: k
|
|
533
533
|
} = x(), {
|
|
534
534
|
getKeyCodeFromEvent: n
|
|
535
|
-
} =
|
|
535
|
+
} = je();
|
|
536
536
|
function m(u, a) {
|
|
537
537
|
return u.forEach((r) => {
|
|
538
538
|
r.days.forEach((p) => {
|
|
539
|
-
const
|
|
540
|
-
|
|
539
|
+
const b = a.filter((w) => k(w.starts, p.date));
|
|
540
|
+
b && b.length && (p.events = [...b]);
|
|
541
541
|
});
|
|
542
542
|
}), u;
|
|
543
543
|
}
|
|
544
|
-
const g =
|
|
544
|
+
const g = T(m(e.dates, o.value));
|
|
545
545
|
$(() => e.dates, () => {
|
|
546
|
-
g.value = m(e.dates,
|
|
546
|
+
g.value = m(e.dates, o.value);
|
|
547
547
|
}), $(() => e.activeDay, () => {
|
|
548
|
-
|
|
548
|
+
i.value = e.activeDay;
|
|
549
549
|
}), $(() => e.events, () => {
|
|
550
|
-
|
|
550
|
+
o.value = e.events;
|
|
551
551
|
});
|
|
552
552
|
function M(u) {
|
|
553
|
-
return !!
|
|
554
|
-
year:
|
|
555
|
-
month:
|
|
556
|
-
day:
|
|
553
|
+
return !!i.value && s({
|
|
554
|
+
year: i.value.year,
|
|
555
|
+
month: i.value.month,
|
|
556
|
+
day: i.value.day
|
|
557
557
|
}, u);
|
|
558
558
|
}
|
|
559
559
|
const l = (u, a, r) => {
|
|
560
|
-
const
|
|
560
|
+
const b = {
|
|
561
561
|
"f-datepicker-no-currmonth": u.monthTag === E.previous || u.monthTag === E.next
|
|
562
562
|
}, w = `d_${a}_${r}`;
|
|
563
|
-
return
|
|
563
|
+
return b[w] = !0, b;
|
|
564
564
|
}, v = (u) => {
|
|
565
565
|
const a = u.monthTag === E.current && M(u.date), r = u.isCurrent && y.value;
|
|
566
566
|
return {
|
|
@@ -572,33 +572,33 @@ const _ = /* @__PURE__ */ B({
|
|
|
572
572
|
function f(u, a) {
|
|
573
573
|
u.stopPropagation(), t.emit("click", a.date);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function D(u, a) {
|
|
576
576
|
const r = n(u);
|
|
577
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
|
-
return () =>
|
|
579
|
+
return () => c("div", {
|
|
580
580
|
class: "f-calendar-month-view"
|
|
581
|
-
}, [
|
|
581
|
+
}, [c("table", {
|
|
582
582
|
class: "f-datepicker-table",
|
|
583
583
|
cellpadding: "0"
|
|
584
|
-
}, [
|
|
584
|
+
}, [c("thead", null, [c("tr", null, [d.value && d.value.map((u) => c("th", {
|
|
585
585
|
scope: "col",
|
|
586
586
|
style: "padding: 4px 4px 8px"
|
|
587
|
-
}, [u]))])]),
|
|
587
|
+
}, [u]))])]), c("tbody", null, [g.value && g.value.map((u, a) => c("tr", null, [u.days && u.days.map((r, p) => c("td", {
|
|
588
588
|
id: `d_${a}_${p}`,
|
|
589
589
|
tabindex: "0",
|
|
590
590
|
class: l(r, a, p),
|
|
591
|
-
onClick: (
|
|
592
|
-
onKeydown: (
|
|
593
|
-
}, [
|
|
591
|
+
onClick: (b) => f(b, r),
|
|
592
|
+
onKeydown: (b) => D(b, r)
|
|
593
|
+
}, [c("div", {
|
|
594
594
|
class: "f-calendar-month-view-title"
|
|
595
|
-
}, [
|
|
595
|
+
}, [c("div", {
|
|
596
596
|
class: v(r)
|
|
597
|
-
}, [r.date.day]),
|
|
597
|
+
}, [r.date.day]), c("div", {
|
|
598
598
|
class: "f-calendar-month-view-date-month"
|
|
599
|
-
}, [r.date.day === 1 ? Z[r.date.month || 1] : ""])]), r.events && r.events.length && r.events.map((
|
|
599
|
+
}, [r.date.day === 1 ? Z[r.date.month || 1] : ""])]), r.events && r.events.length && r.events.map((b) => c("div", {
|
|
600
600
|
class: "f-calendar-month-view-event-item"
|
|
601
|
-
}, [
|
|
601
|
+
}, [b.title]))]))]))])])]);
|
|
602
602
|
}
|
|
603
603
|
}), Ee = {
|
|
604
604
|
daysInWeek: { Type: Array, default: F },
|
|
@@ -610,21 +610,21 @@ const _ = /* @__PURE__ */ B({
|
|
|
610
610
|
props: Ee,
|
|
611
611
|
emits: [],
|
|
612
612
|
setup(e) {
|
|
613
|
-
const t =
|
|
614
|
-
equal:
|
|
613
|
+
const t = T(), d = T(), h = T(e.daysInWeek), y = T(e.week), i = T(e.enableMarkCurrent), o = T(e.events), s = T([]), {
|
|
614
|
+
equal: k
|
|
615
615
|
} = x();
|
|
616
616
|
function n(a) {
|
|
617
617
|
return y.value.days.map((p) => {
|
|
618
|
-
const
|
|
618
|
+
const b = {
|
|
619
619
|
year: p.date.year,
|
|
620
620
|
month: p.date.month,
|
|
621
621
|
day: p.date.day,
|
|
622
622
|
hour: a.hour,
|
|
623
623
|
minute: a.minute,
|
|
624
624
|
second: a.second
|
|
625
|
-
}, w =
|
|
625
|
+
}, w = o.value.filter((C) => k(C.starts, b));
|
|
626
626
|
return {
|
|
627
|
-
day:
|
|
627
|
+
day: b,
|
|
628
628
|
events: w
|
|
629
629
|
};
|
|
630
630
|
});
|
|
@@ -636,57 +636,57 @@ const _ = /* @__PURE__ */ B({
|
|
|
636
636
|
hour: r,
|
|
637
637
|
minute: 0,
|
|
638
638
|
second: 0
|
|
639
|
-
},
|
|
639
|
+
}, b = {
|
|
640
640
|
hour: r,
|
|
641
641
|
minute: 30,
|
|
642
642
|
second: 0
|
|
643
|
-
}, w = n(p),
|
|
643
|
+
}, w = n(p), C = n(b);
|
|
644
644
|
a.push({
|
|
645
645
|
time: p,
|
|
646
646
|
events: w,
|
|
647
647
|
title: r > 0 ? `${r}:00` : "",
|
|
648
648
|
part: "upper"
|
|
649
649
|
}), a.push({
|
|
650
|
-
time:
|
|
651
|
-
events:
|
|
650
|
+
time: b,
|
|
651
|
+
events: C,
|
|
652
652
|
title: `${r}:30`,
|
|
653
653
|
part: "lower"
|
|
654
654
|
});
|
|
655
655
|
}
|
|
656
|
-
|
|
656
|
+
s.value = a;
|
|
657
657
|
}
|
|
658
658
|
m(), $(() => e.week, () => {
|
|
659
659
|
y.value = e.week, m();
|
|
660
660
|
}), $(() => e.events, () => {
|
|
661
|
-
|
|
661
|
+
o.value = e.events, m();
|
|
662
662
|
});
|
|
663
663
|
const g = (a) => ({
|
|
664
664
|
"f-calendar-week-view-date": !0,
|
|
665
|
-
"f-calendar-week-view-current": a.isCurrent &&
|
|
665
|
+
"f-calendar-week-view-current": a.isCurrent && i.value
|
|
666
666
|
});
|
|
667
667
|
function M() {
|
|
668
|
-
return
|
|
668
|
+
return c("div", {
|
|
669
669
|
class: "f-calendar-week-view-header"
|
|
670
|
-
}, [
|
|
670
|
+
}, [c("div", {
|
|
671
671
|
class: "f-calendar-week-view-header-corner"
|
|
672
|
-
}, null),
|
|
672
|
+
}, null), c("div", {
|
|
673
673
|
class: "f-calendar-week-view-header-primary"
|
|
674
|
-
}, [
|
|
674
|
+
}, [c("div", {
|
|
675
675
|
class: "f-calendar-week-view-header-columns"
|
|
676
|
-
}, [h.value.map((a, r) =>
|
|
676
|
+
}, [h.value.map((a, r) => c("div", {
|
|
677
677
|
class: "f-calendar-week-view-header-cell"
|
|
678
|
-
}, [
|
|
678
|
+
}, [c("div", {
|
|
679
679
|
class: g(y.value.days[r])
|
|
680
|
-
}, [y.value.days[r].date.day]),
|
|
680
|
+
}, [y.value.days[r].date.day]), c("span", null, [a])]))])])]);
|
|
681
681
|
}
|
|
682
682
|
function l() {
|
|
683
|
-
return
|
|
683
|
+
return c("div", {
|
|
684
684
|
class: "f-calendar-week-view-content-side"
|
|
685
|
-
}, [
|
|
685
|
+
}, [c("div", {
|
|
686
686
|
class: "f-calendar-side"
|
|
687
|
-
}, [
|
|
687
|
+
}, [s.value.map((a) => c("div", {
|
|
688
688
|
class: "f-calendar-side-row"
|
|
689
|
-
}, [
|
|
689
|
+
}, [c("div", {
|
|
690
690
|
class: "f-calendar-side-row-number"
|
|
691
691
|
}, [a.part === "upper" ? a.title : ""])]))])]);
|
|
692
692
|
}
|
|
@@ -703,29 +703,29 @@ const _ = /* @__PURE__ */ B({
|
|
|
703
703
|
height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - V) - 2 - 2 - 1 - 1}px`
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
function
|
|
707
|
-
return
|
|
706
|
+
function D() {
|
|
707
|
+
return s.value.map((a) => c("div", {
|
|
708
708
|
class: v(a)
|
|
709
|
-
}, [a.events.map((r) =>
|
|
709
|
+
}, [a.events.map((r) => c("div", {
|
|
710
710
|
class: "f-calendar-week-view-item-cell"
|
|
711
|
-
}, [r.events.length > 0 && r.events.map((p) =>
|
|
711
|
+
}, [r.events.length > 0 && r.events.map((p) => c("div", {
|
|
712
712
|
class: "f-calendar-event",
|
|
713
713
|
style: f(p)
|
|
714
714
|
}, [p.title]))]))]));
|
|
715
715
|
}
|
|
716
716
|
function u() {
|
|
717
|
-
return
|
|
718
|
-
ref:
|
|
717
|
+
return c("div", {
|
|
718
|
+
ref: d,
|
|
719
719
|
class: "f-calendar-content-primary"
|
|
720
|
-
}, [
|
|
720
|
+
}, [c("div", {
|
|
721
721
|
class: "f-calendar-content-data"
|
|
722
|
-
}, [
|
|
722
|
+
}, [D()])]);
|
|
723
723
|
}
|
|
724
724
|
return U(() => {
|
|
725
725
|
t.value && t.value.scrollTo(0, 250);
|
|
726
|
-
}), () =>
|
|
726
|
+
}), () => c("div", {
|
|
727
727
|
class: "f-calendar-week-view"
|
|
728
|
-
}, [M(),
|
|
728
|
+
}, [M(), c("div", {
|
|
729
729
|
class: "f-calendar-week-view-content",
|
|
730
730
|
ref: t
|
|
731
731
|
}, [l(), u()])]);
|
|
@@ -735,13 +735,13 @@ const _ = /* @__PURE__ */ B({
|
|
|
735
735
|
dayInWeek: { Type: String, default: "" },
|
|
736
736
|
enableMarkCurrent: { Type: Boolean, default: !0 },
|
|
737
737
|
events: { Type: Array, default: [] }
|
|
738
|
-
},
|
|
738
|
+
}, L = /* @__PURE__ */ B({
|
|
739
739
|
name: "FCalendarDayView",
|
|
740
740
|
props: $e,
|
|
741
741
|
emits: [],
|
|
742
742
|
setup(e) {
|
|
743
|
-
const t =
|
|
744
|
-
equal:
|
|
743
|
+
const t = T(), d = T(), h = T(e.dayInWeek), y = T(e.day), i = T(e.enableMarkCurrent), o = T(e.events), s = T([]), {
|
|
744
|
+
equal: k
|
|
745
745
|
} = x();
|
|
746
746
|
function n(a) {
|
|
747
747
|
const r = {
|
|
@@ -751,7 +751,7 @@ const _ = /* @__PURE__ */ B({
|
|
|
751
751
|
hour: a.hour,
|
|
752
752
|
minute: a.minute,
|
|
753
753
|
second: a.second
|
|
754
|
-
}, p =
|
|
754
|
+
}, p = o.value.filter((b) => k(b.starts, r));
|
|
755
755
|
return [{
|
|
756
756
|
day: r,
|
|
757
757
|
events: p
|
|
@@ -764,57 +764,57 @@ const _ = /* @__PURE__ */ B({
|
|
|
764
764
|
hour: r,
|
|
765
765
|
minute: 0,
|
|
766
766
|
second: 0
|
|
767
|
-
},
|
|
767
|
+
}, b = {
|
|
768
768
|
hour: r,
|
|
769
769
|
minute: 30,
|
|
770
770
|
second: 0
|
|
771
|
-
}, w = n(p),
|
|
771
|
+
}, w = n(p), C = n(b);
|
|
772
772
|
a.push({
|
|
773
773
|
time: p,
|
|
774
774
|
events: w,
|
|
775
775
|
title: r > 0 ? `${r}:00` : "",
|
|
776
776
|
part: "upper"
|
|
777
777
|
}), a.push({
|
|
778
|
-
time:
|
|
779
|
-
events:
|
|
778
|
+
time: b,
|
|
779
|
+
events: C,
|
|
780
780
|
title: `${r}:30`,
|
|
781
781
|
part: "lower"
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
|
-
|
|
784
|
+
s.value = a;
|
|
785
785
|
}
|
|
786
786
|
m(), $(() => e.day, () => {
|
|
787
787
|
y.value = e.day, m();
|
|
788
788
|
}), $(() => e.events, () => {
|
|
789
|
-
|
|
789
|
+
o.value = e.events, m();
|
|
790
790
|
});
|
|
791
791
|
const g = (a) => ({
|
|
792
792
|
"f-calendar-day-view-date": !0,
|
|
793
|
-
"f-calendar-day-view-current": a.isCurrent &&
|
|
793
|
+
"f-calendar-day-view-current": a.isCurrent && i.value
|
|
794
794
|
});
|
|
795
795
|
function M() {
|
|
796
|
-
return
|
|
796
|
+
return c("div", {
|
|
797
797
|
class: "f-calendar-day-view-header"
|
|
798
|
-
}, [
|
|
798
|
+
}, [c("div", {
|
|
799
799
|
class: "f-calendar-day-view-header-corner"
|
|
800
|
-
}, null),
|
|
800
|
+
}, null), c("div", {
|
|
801
801
|
class: "f-calendar-day-view-header-primary"
|
|
802
|
-
}, [
|
|
802
|
+
}, [c("div", {
|
|
803
803
|
class: "f-calendar-day-view-header-columns"
|
|
804
|
-
}, [
|
|
804
|
+
}, [c("div", {
|
|
805
805
|
class: "f-calendar-day-view-header-cell"
|
|
806
|
-
}, [
|
|
806
|
+
}, [c("div", {
|
|
807
807
|
class: g(y.value)
|
|
808
|
-
}, [y.value.date.day]),
|
|
808
|
+
}, [y.value.date.day]), c("span", null, [h.value])])])])]);
|
|
809
809
|
}
|
|
810
810
|
function l() {
|
|
811
|
-
return
|
|
811
|
+
return c("div", {
|
|
812
812
|
class: "f-calendar-day-view-content-side"
|
|
813
|
-
}, [
|
|
813
|
+
}, [c("div", {
|
|
814
814
|
class: "f-calendar-side"
|
|
815
|
-
}, [
|
|
815
|
+
}, [s.value.map((a) => c("div", {
|
|
816
816
|
class: "f-calendar-side-row"
|
|
817
|
-
}, [
|
|
817
|
+
}, [c("div", {
|
|
818
818
|
class: "f-calendar-side-row-number"
|
|
819
819
|
}, [a.part === "upper" ? a.title : ""])]))])]);
|
|
820
820
|
}
|
|
@@ -831,29 +831,29 @@ const _ = /* @__PURE__ */ B({
|
|
|
831
831
|
height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - V) - 2 - 2 - 1 - 1}px`
|
|
832
832
|
};
|
|
833
833
|
}
|
|
834
|
-
function
|
|
835
|
-
return
|
|
834
|
+
function D() {
|
|
835
|
+
return s.value.map((a) => c("div", {
|
|
836
836
|
class: v(a)
|
|
837
|
-
}, [a.events.map((r) =>
|
|
837
|
+
}, [a.events.map((r) => c("div", {
|
|
838
838
|
class: "f-calendar-day-view-item-cell"
|
|
839
|
-
}, [r.events.length > 0 && r.events.map((p) =>
|
|
839
|
+
}, [r.events.length > 0 && r.events.map((p) => c("div", {
|
|
840
840
|
class: "f-calendar-event",
|
|
841
841
|
style: f(p)
|
|
842
842
|
}, [p.title]))]))]));
|
|
843
843
|
}
|
|
844
844
|
function u() {
|
|
845
|
-
return
|
|
846
|
-
ref:
|
|
845
|
+
return c("div", {
|
|
846
|
+
ref: d,
|
|
847
847
|
class: "f-calendar-content-primary"
|
|
848
|
-
}, [
|
|
848
|
+
}, [c("div", {
|
|
849
849
|
class: "f-calendar-content-data"
|
|
850
|
-
}, [
|
|
850
|
+
}, [D()])]);
|
|
851
851
|
}
|
|
852
852
|
return U(() => {
|
|
853
853
|
t.value && t.value.scrollTo(0, 250);
|
|
854
|
-
}), () =>
|
|
854
|
+
}), () => c("div", {
|
|
855
855
|
class: "f-calendar-day-view"
|
|
856
|
-
}, [M(),
|
|
856
|
+
}, [M(), c("div", {
|
|
857
857
|
class: "f-calendar-day-view-content",
|
|
858
858
|
ref: t
|
|
859
859
|
}, [l(), u()])]);
|
|
@@ -866,13 +866,13 @@ const _ = /* @__PURE__ */ B({
|
|
|
866
866
|
const {
|
|
867
867
|
sameDay: t
|
|
868
868
|
} = x(), {
|
|
869
|
-
getToday:
|
|
870
|
-
} =
|
|
871
|
-
year:
|
|
872
|
-
month:
|
|
873
|
-
day:
|
|
874
|
-
}),
|
|
875
|
-
getMonthlyCalendar:
|
|
869
|
+
getToday: d
|
|
870
|
+
} = J(), h = T(e.firstDayOfTheWeek), y = T(e.events), i = d(), o = T({
|
|
871
|
+
year: i.year || 1,
|
|
872
|
+
month: i.month || 1,
|
|
873
|
+
day: i.day || 1
|
|
874
|
+
}), s = T(3), {
|
|
875
|
+
getMonthlyCalendar: k,
|
|
876
876
|
getWeeklyCalendar: n,
|
|
877
877
|
getPreviousDay: m,
|
|
878
878
|
getNextDay: g,
|
|
@@ -880,58 +880,58 @@ const _ = /* @__PURE__ */ B({
|
|
|
880
880
|
getDayInNextWeek: l,
|
|
881
881
|
getDayInPreviousMonth: v,
|
|
882
882
|
getDayInNextMonth: f
|
|
883
|
-
} = te(),
|
|
884
|
-
const P = a.value.days.findIndex((
|
|
883
|
+
} = te(), D = W(() => `${Z[o.value.month || 1]} ${o.value.year}`), u = W(() => k(o.value.month || 1, o.value.year || 1, h.value)), a = W(() => n(o.value.day || 1, o.value.month || 1, o.value.year || 1, h.value)), r = W(() => a.value.days.find((P) => t(P.date, o.value)) || a.value.days[1]), p = W(() => {
|
|
884
|
+
const P = a.value.days.findIndex((j) => t(j.date, o.value)), H = P > -1 ? P : 1;
|
|
885
885
|
return F[H];
|
|
886
|
-
}),
|
|
886
|
+
}), b = W(() => s.value === 3), w = W(() => s.value === 2), C = W(() => s.value === 1);
|
|
887
887
|
function V(P) {
|
|
888
|
-
|
|
888
|
+
s.value = P;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
891
|
-
P === 1 && (
|
|
890
|
+
function O(P) {
|
|
891
|
+
P === 1 && (o.value = m(o.value)), P === 2 && (o.value = M(o.value)), P === 3 && (o.value = v(o.value));
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
P === 1 && (
|
|
893
|
+
function S(P) {
|
|
894
|
+
P === 1 && (o.value = g(o.value)), P === 2 && (o.value = l(o.value)), P === 3 && (o.value = f(o.value));
|
|
895
895
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
year:
|
|
899
|
-
month:
|
|
900
|
-
day:
|
|
896
|
+
function A() {
|
|
897
|
+
o.value = {
|
|
898
|
+
year: i.year || 1,
|
|
899
|
+
month: i.month || 1,
|
|
900
|
+
day: i.day || 1
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
|
-
return () =>
|
|
903
|
+
return () => c("div", {
|
|
904
904
|
class: "f-calendar"
|
|
905
|
-
}, [
|
|
906
|
-
activeView:
|
|
907
|
-
title:
|
|
905
|
+
}, [c(G, {
|
|
906
|
+
activeView: s.value,
|
|
907
|
+
title: D.value,
|
|
908
908
|
onViewChange: (P) => V(P),
|
|
909
|
-
onPrevious: (P) =>
|
|
910
|
-
onNext: (P) =>
|
|
911
|
-
onResetToToday: () =>
|
|
912
|
-
}, null),
|
|
909
|
+
onPrevious: (P) => O(P),
|
|
910
|
+
onNext: (P) => S(P),
|
|
911
|
+
onResetToToday: () => A()
|
|
912
|
+
}, null), c("div", null, [C.value && c(L, {
|
|
913
913
|
day: r.value,
|
|
914
914
|
dayInWeek: p.value,
|
|
915
915
|
events: y.value
|
|
916
|
-
}, null), w.value &&
|
|
916
|
+
}, null), w.value && c(Y, {
|
|
917
917
|
week: a.value,
|
|
918
918
|
events: y.value
|
|
919
|
-
}, null),
|
|
920
|
-
activeDay:
|
|
919
|
+
}, null), b.value && c(_, {
|
|
920
|
+
activeDay: o.value,
|
|
921
921
|
dates: u.value,
|
|
922
922
|
events: y.value
|
|
923
923
|
}, null)])]);
|
|
924
924
|
}
|
|
925
925
|
});
|
|
926
|
-
function Ie(e, t,
|
|
927
|
-
var
|
|
926
|
+
function Ie(e, t, d) {
|
|
927
|
+
var b;
|
|
928
928
|
function h() {
|
|
929
929
|
}
|
|
930
|
-
const y = "",
|
|
931
|
-
function
|
|
930
|
+
const y = "", i = "", o = T();
|
|
931
|
+
function s() {
|
|
932
932
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function k() {
|
|
935
935
|
return !1;
|
|
936
936
|
}
|
|
937
937
|
function n() {
|
|
@@ -945,65 +945,65 @@ function Ie(e, t, i) {
|
|
|
945
945
|
return null;
|
|
946
946
|
if (w.value.schema && w.value.schema.type === "component")
|
|
947
947
|
return w.value;
|
|
948
|
-
const
|
|
948
|
+
const C = T(w == null ? void 0 : w.value.parent), V = g(C);
|
|
949
949
|
return V || null;
|
|
950
950
|
}
|
|
951
951
|
function M(w = t) {
|
|
952
|
-
const { componentInstance:
|
|
953
|
-
return !
|
|
952
|
+
const { componentInstance: C, designerItemElementRef: V } = w;
|
|
953
|
+
return !C || !C.value ? null : C.value.canMove ? V : M(w.parent);
|
|
954
954
|
}
|
|
955
955
|
function l(w) {
|
|
956
|
-
return !!
|
|
956
|
+
return !!d;
|
|
957
957
|
}
|
|
958
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() {
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function D(w, C) {
|
|
964
964
|
}
|
|
965
|
-
function u(w) {
|
|
966
|
-
const { componentType:
|
|
967
|
-
let
|
|
968
|
-
const S =
|
|
969
|
-
return
|
|
965
|
+
function u(w, C) {
|
|
966
|
+
const { componentType: V } = w;
|
|
967
|
+
let O = z(V, w, C);
|
|
968
|
+
const S = V.toLowerCase().replace("-", "_");
|
|
969
|
+
return O && !O.id && O.type === V && (O.id = `${S}_${Math.random().toString().slice(2, 6)}`), O;
|
|
970
970
|
}
|
|
971
|
-
function a(w,
|
|
972
|
-
const V = String(w.getAttribute("data-controltype")),
|
|
973
|
-
|
|
974
|
-
let
|
|
971
|
+
function a(w, C) {
|
|
972
|
+
const V = String(w.getAttribute("data-controltype")), O = w.getAttribute("data-feature"), S = O ? JSON.parse(O) : {};
|
|
973
|
+
S.parentComponentInstance = o.value;
|
|
974
|
+
let A = z(V, S);
|
|
975
975
|
const P = V.toLowerCase().replace("-", "_");
|
|
976
|
-
return
|
|
976
|
+
return A && !A.id && A.type === V && (A.id = `${P}_${Math.random().toString().slice(2, 6)}`), A;
|
|
977
977
|
}
|
|
978
978
|
function r(w) {
|
|
979
979
|
}
|
|
980
980
|
function p(...w) {
|
|
981
981
|
}
|
|
982
|
-
return
|
|
983
|
-
canMove:
|
|
984
|
-
canSelectParent:
|
|
982
|
+
return o.value = {
|
|
983
|
+
canMove: s(),
|
|
984
|
+
canSelectParent: k(),
|
|
985
985
|
canDelete: n(),
|
|
986
986
|
canNested: !m(),
|
|
987
987
|
contents: t == null ? void 0 : t.schema.contents,
|
|
988
988
|
elementRef: e,
|
|
989
|
-
parent: (
|
|
989
|
+
parent: (b = t == null ? void 0 : t.parent) == null ? void 0 : b.componentInstance,
|
|
990
990
|
schema: t == null ? void 0 : t.schema,
|
|
991
991
|
styles: y,
|
|
992
|
-
designerClass:
|
|
992
|
+
designerClass: i,
|
|
993
993
|
canAccepts: l,
|
|
994
994
|
getBelongedComponentInstance: g,
|
|
995
995
|
getDraggableDesignItemElement: M,
|
|
996
996
|
getDraggingDisplayText: v,
|
|
997
997
|
getPropConfig: p,
|
|
998
998
|
getDragScopeElement: f,
|
|
999
|
-
onAcceptMovedChildElement:
|
|
999
|
+
onAcceptMovedChildElement: D,
|
|
1000
1000
|
onAcceptNewChildElement: a,
|
|
1001
1001
|
onChildElementMovedOut: r,
|
|
1002
1002
|
addNewChildComponentSchema: u,
|
|
1003
1003
|
updateDragAndDropRules: h,
|
|
1004
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1005
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1006
|
-
},
|
|
1004
|
+
triggerBelongedComponentToMoveWhenMoved: T(!1),
|
|
1005
|
+
triggerBelongedComponentToDeleteWhenDeleted: T(!1)
|
|
1006
|
+
}, o;
|
|
1007
1007
|
}
|
|
1008
1008
|
const Be = /* @__PURE__ */ B({
|
|
1009
1009
|
name: "FCalendarDesign",
|
|
@@ -1011,14 +1011,14 @@ const Be = /* @__PURE__ */ B({
|
|
|
1011
1011
|
emits: [],
|
|
1012
1012
|
setup(e, t) {
|
|
1013
1013
|
const {
|
|
1014
|
-
sameDay:
|
|
1014
|
+
sameDay: d
|
|
1015
1015
|
} = x(), {
|
|
1016
1016
|
getToday: h
|
|
1017
|
-
} =
|
|
1018
|
-
year:
|
|
1019
|
-
month:
|
|
1020
|
-
day:
|
|
1021
|
-
}),
|
|
1017
|
+
} = J(), y = T(e.firstDayOfTheWeek), i = T(e.events), o = h(), s = T({
|
|
1018
|
+
year: o.year || 1,
|
|
1019
|
+
month: o.month || 1,
|
|
1020
|
+
day: o.day || 1
|
|
1021
|
+
}), k = T(3), n = T(), m = oe("design-item-context"), g = Ie(n, m);
|
|
1022
1022
|
U(() => {
|
|
1023
1023
|
n.value.componentInstance = g;
|
|
1024
1024
|
}), t.expose(g.value);
|
|
@@ -1027,66 +1027,66 @@ const Be = /* @__PURE__ */ B({
|
|
|
1027
1027
|
getWeeklyCalendar: l,
|
|
1028
1028
|
getPreviousDay: v,
|
|
1029
1029
|
getNextDay: f,
|
|
1030
|
-
getDayInPreviousWeek:
|
|
1030
|
+
getDayInPreviousWeek: D,
|
|
1031
1031
|
getDayInNextWeek: u,
|
|
1032
1032
|
getDayInPreviousMonth: a,
|
|
1033
1033
|
getDayInNextMonth: r
|
|
1034
|
-
} = te(), p =
|
|
1035
|
-
const N = w.value.days.findIndex((re) =>
|
|
1034
|
+
} = te(), p = W(() => `${Z[s.value.month || 1]} ${s.value.year}`), b = W(() => M(s.value.month || 1, s.value.year || 1, y.value)), w = W(() => l(s.value.day || 1, s.value.month || 1, s.value.year || 1, y.value)), C = W(() => w.value.days.find((N) => d(N.date, s.value)) || w.value.days[1]), V = W(() => {
|
|
1035
|
+
const N = w.value.days.findIndex((re) => d(re.date, s.value)), ae = N > -1 ? N : 1;
|
|
1036
1036
|
return F[ae];
|
|
1037
|
-
}),
|
|
1037
|
+
}), O = W(() => k.value === 3), S = W(() => k.value === 2), A = W(() => k.value === 1);
|
|
1038
1038
|
function P(N) {
|
|
1039
|
-
|
|
1039
|
+
k.value = N;
|
|
1040
1040
|
}
|
|
1041
1041
|
function H(N) {
|
|
1042
|
-
N === 1 && (
|
|
1042
|
+
N === 1 && (s.value = v(s.value)), N === 2 && (s.value = D(s.value)), N === 3 && (s.value = a(s.value));
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
N === 1 && (
|
|
1044
|
+
function j(N) {
|
|
1045
|
+
N === 1 && (s.value = f(s.value)), N === 2 && (s.value = u(s.value)), N === 3 && (s.value = r(s.value));
|
|
1046
1046
|
}
|
|
1047
1047
|
function R() {
|
|
1048
|
-
|
|
1049
|
-
year:
|
|
1050
|
-
month:
|
|
1051
|
-
day:
|
|
1048
|
+
s.value = {
|
|
1049
|
+
year: o.year || 1,
|
|
1050
|
+
month: o.month || 1,
|
|
1051
|
+
day: o.day || 1
|
|
1052
1052
|
};
|
|
1053
1053
|
}
|
|
1054
|
-
return () =>
|
|
1054
|
+
return () => c("div", {
|
|
1055
1055
|
ref: n,
|
|
1056
1056
|
class: "f-calendar"
|
|
1057
|
-
}, [
|
|
1058
|
-
activeView:
|
|
1057
|
+
}, [c(G, {
|
|
1058
|
+
activeView: k.value,
|
|
1059
1059
|
title: p.value,
|
|
1060
1060
|
onViewChange: (N) => P(N),
|
|
1061
1061
|
onPrevious: (N) => H(N),
|
|
1062
|
-
onNext: (N) =>
|
|
1062
|
+
onNext: (N) => j(N),
|
|
1063
1063
|
onResetToToday: () => R()
|
|
1064
|
-
}, null),
|
|
1065
|
-
day:
|
|
1064
|
+
}, null), c("div", null, [A.value && c(L, {
|
|
1065
|
+
day: C.value,
|
|
1066
1066
|
dayInWeek: V.value,
|
|
1067
|
-
events:
|
|
1068
|
-
}, null),
|
|
1067
|
+
events: i.value
|
|
1068
|
+
}, null), S.value && c(Y, {
|
|
1069
1069
|
week: w.value,
|
|
1070
|
-
events:
|
|
1071
|
-
}, null),
|
|
1072
|
-
activeDay:
|
|
1073
|
-
dates:
|
|
1074
|
-
events:
|
|
1070
|
+
events: i.value
|
|
1071
|
+
}, null), O.value && c(_, {
|
|
1072
|
+
activeDay: s.value,
|
|
1073
|
+
dates: b.value,
|
|
1074
|
+
events: i.value
|
|
1075
1075
|
}, null)])]);
|
|
1076
1076
|
}
|
|
1077
1077
|
});
|
|
1078
1078
|
I.install = (e) => {
|
|
1079
|
-
e.component(I.name, I).component(
|
|
1079
|
+
e.component(I.name, I).component(L.name, L).component(G.name, G).component(_.name, _).component(Y.name, Y);
|
|
1080
1080
|
};
|
|
1081
|
-
I.register = (e, t,
|
|
1081
|
+
I.register = (e, t, d, h) => {
|
|
1082
1082
|
e.calendar = I, t.calendar = ne;
|
|
1083
1083
|
};
|
|
1084
|
-
I.registerDesigner = (e, t,
|
|
1084
|
+
I.registerDesigner = (e, t, d) => {
|
|
1085
1085
|
e.calendar = Be, t.calendar = ne;
|
|
1086
1086
|
};
|
|
1087
1087
|
export {
|
|
1088
1088
|
I as FCalendar,
|
|
1089
|
-
|
|
1089
|
+
L as FCalendarDayView,
|
|
1090
1090
|
G as FCalendarHeader,
|
|
1091
1091
|
_ as FCalendarMonthView,
|
|
1092
1092
|
Y as FCalendarWeekView,
|
|
@@ -1096,7 +1096,7 @@ export {
|
|
|
1096
1096
|
I as default,
|
|
1097
1097
|
Z as defaultNameOfMonths,
|
|
1098
1098
|
Se as headerProps,
|
|
1099
|
-
|
|
1099
|
+
Ae as monthViewProps,
|
|
1100
1100
|
ne as propsResolver,
|
|
1101
1101
|
F as weekDays,
|
|
1102
1102
|
Ee as weekViewProps
|