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