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