ep-craft 0.1.24 → 0.1.26
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/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/advancedFormat.js +4 -0
- package/dist/_virtual/customParseFormat.js +4 -0
- package/dist/_virtual/dayOfYear.js +4 -0
- package/dist/_virtual/isSameOrAfter.js +4 -0
- package/dist/_virtual/isSameOrBefore.js +4 -0
- package/dist/_virtual/localeData.js +4 -0
- package/dist/_virtual/weekOfYear.js +4 -0
- package/dist/_virtual/weekYear.js +4 -0
- package/dist/components/button/index.js +2 -1
- package/dist/components/date-picker/index.d.ts +4 -2
- package/dist/components/date-picker/index.js +9 -4
- package/dist/components/date-picker/src/date-picker.d.ts +435 -0
- package/dist/components/date-picker/src/date-picker.js +68 -0
- package/dist/components/date-picker/src/instance.d.ts +8 -0
- package/dist/components/date-picker/src/props.d.ts +205 -0
- package/dist/components/date-picker/src/props.js +21 -0
- package/dist/components/date-picker-panel/index.d.ts +8 -0
- package/dist/components/date-picker-panel/index.js +11 -0
- package/dist/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +187 -0
- package/dist/components/date-picker-panel/src/composables/use-basic-date-table.js +195 -0
- package/dist/components/date-picker-panel/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/date-picker-panel/src/composables/use-month-range-header.js +41 -0
- package/dist/components/date-picker-panel/src/composables/use-panel-date-range.d.ts +29 -0
- package/dist/components/date-picker-panel/src/composables/use-panel-date-range.js +86 -0
- package/dist/components/date-picker-panel/src/composables/use-range-picker.d.ts +209 -0
- package/dist/components/date-picker-panel/src/composables/use-range-picker.js +102 -0
- package/dist/components/date-picker-panel/src/composables/use-shortcut.d.ts +9 -0
- package/dist/components/date-picker-panel/src/composables/use-shortcut.js +27 -0
- package/dist/components/date-picker-panel/src/composables/use-year-range-header.d.ts +16 -0
- package/dist/components/date-picker-panel/src/composables/use-year-range-header.js +35 -0
- package/dist/components/date-picker-panel/src/constants.d.ts +9 -0
- package/dist/components/date-picker-panel/src/constants.js +5 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-cell-render.d.ts +18 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-cell-render.js +39 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-date-table.vue.d.ts +100 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-date-table.vue.js +92 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-date-table2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-month-table.vue.d.ts +106 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-month-table.vue.js +164 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-month-table2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-year-table.vue.d.ts +106 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-year-table.vue.js +153 -0
- package/dist/components/date-picker-panel/src/date-picker-com/basic-year-table2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +89 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.js +550 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-date-pick2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +104 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.js +698 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-date-range2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +59 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.js +255 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-month-range2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +59 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.js +268 -0
- package/dist/components/date-picker-panel/src/date-picker-com/panel-year-range2.vue.js +4 -0
- package/dist/components/date-picker-panel/src/date-picker-panel.d.ts +143 -0
- package/dist/components/date-picker-panel/src/date-picker-panel.js +90 -0
- package/dist/components/date-picker-panel/src/instance.d.ts +2 -0
- package/dist/components/date-picker-panel/src/panel-utils.d.ts +414 -0
- package/dist/components/date-picker-panel/src/panel-utils.js +20 -0
- package/dist/components/date-picker-panel/src/props/basic-cell.d.ts +12 -0
- package/dist/components/date-picker-panel/src/props/basic-cell.js +14 -0
- package/dist/components/date-picker-panel/src/props/basic-date-table.d.ts +66 -0
- package/dist/components/date-picker-panel/src/props/basic-date-table.js +16 -0
- package/dist/components/date-picker-panel/src/props/basic-month-table.d.ts +47 -0
- package/dist/components/date-picker-panel/src/props/basic-month-table.js +14 -0
- package/dist/components/date-picker-panel/src/props/basic-year-table.d.ts +47 -0
- package/dist/components/date-picker-panel/src/props/basic-year-table.js +14 -0
- package/dist/components/date-picker-panel/src/props/date-picker-panel.d.ts +66 -0
- package/dist/components/date-picker-panel/src/props/date-picker-panel.js +129 -0
- package/dist/components/date-picker-panel/src/props/panel-date-pick.d.ts +29 -0
- package/dist/components/date-picker-panel/src/props/panel-date-pick.js +24 -0
- package/dist/components/date-picker-panel/src/props/panel-date-range.d.ts +29 -0
- package/dist/components/date-picker-panel/src/props/panel-date-range.js +14 -0
- package/dist/components/date-picker-panel/src/props/panel-month-range.d.ts +19 -0
- package/dist/components/date-picker-panel/src/props/panel-month-range.js +18 -0
- package/dist/components/date-picker-panel/src/props/panel-year-range.d.ts +19 -0
- package/dist/components/date-picker-panel/src/props/panel-year-range.js +18 -0
- package/dist/components/date-picker-panel/src/props/shared.d.ts +97 -0
- package/dist/components/date-picker-panel/src/props/shared.js +96 -0
- package/dist/components/date-picker-panel/src/types.d.ts +22 -0
- package/dist/components/date-picker-panel/src/utils.d.ts +38 -0
- package/dist/components/date-picker-panel/src/utils.js +84 -0
- package/dist/components/icon/index.js +6 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +142 -140
- package/dist/components/input/EpInput.vue.d.ts +89 -0
- package/dist/components/input/EpInput.vue.js +553 -0
- package/dist/components/input/EpInput2.vue.js +4 -0
- package/dist/components/input/index.d.ts +5 -2
- package/dist/components/input/index.js +8 -4
- package/dist/components/input/input.d.ts +287 -0
- package/dist/components/input/input.js +249 -0
- package/dist/components/input/instance.d.ts +2 -0
- package/dist/components/input/utils.d.ts +7 -0
- package/dist/components/input/utils.js +74 -0
- package/dist/components/option/index.d.ts +3 -2
- package/dist/components/option/index.js +7 -4
- package/dist/components/option-group/index.d.ts +2 -2
- package/dist/components/option-group/index.js +3 -3
- package/dist/components/scrollbar/index.d.ts +2 -0
- package/dist/components/scrollbar/index.js +9 -3
- package/dist/components/scrollbar/src/scrollbar.d.ts +25 -0
- package/dist/components/scrollbar/src/scrollbar.js +16 -0
- package/dist/components/select/index.d.ts +4 -2
- package/dist/components/select/index.js +7 -4
- package/dist/components/select/select.d.ts +132 -0
- package/dist/components/select/select.js +316 -0
- package/dist/components/select/select.vue.d.ts +979 -0
- package/dist/components/select/select.vue.js +401 -0
- package/dist/components/select/select2.vue.js +155 -0
- package/dist/components/select/src/option-group.vue.d.ts +43 -0
- package/dist/components/select/src/option-group.vue.js +26 -0
- package/dist/components/select/src/option-group2.vue.js +65 -0
- package/dist/components/select/src/option.d.ts +17 -0
- package/dist/components/select/src/option.js +30 -0
- package/dist/components/select/src/option.vue.d.ts +73 -0
- package/dist/components/select/src/option.vue.js +28 -0
- package/dist/components/select/src/option2.vue.js +81 -0
- package/dist/components/select/src/options.d.ts +5 -0
- package/dist/components/select/src/options.js +30 -0
- package/dist/components/select/src/select-dropdown.vue.d.ts +25 -0
- package/dist/components/select/src/select-dropdown.vue.js +27 -0
- package/dist/components/select/src/select-dropdown2.vue.js +39 -0
- package/dist/components/select/src/token.d.ts +4 -0
- package/dist/components/select/src/token.js +5 -0
- package/dist/components/select/src/type.d.ts +67 -0
- package/dist/components/select/src/useOption.d.ts +10 -0
- package/dist/components/select/src/useOption.js +64 -0
- package/dist/components/select/src/useSelect.d.ts +159 -0
- package/dist/components/select/src/useSelect.js +483 -0
- package/dist/components/select-v2/src/select.types.d.ts +25 -0
- package/dist/components/select-v2/src/useProps.d.ts +32 -0
- package/dist/components/select-v2/src/useProps.js +29 -0
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +4 -3
- package/dist/components/time-picker/index.d.ts +15 -2
- package/dist/components/time-picker/index.js +32 -4
- package/dist/components/time-picker/src/common/picker-range-trigger.vue.d.ts +92 -0
- package/dist/components/time-picker/src/common/picker-range-trigger.vue.js +141 -0
- package/dist/components/time-picker/src/common/picker-range-trigger2.vue.js +4 -0
- package/dist/components/time-picker/src/common/picker.vue.d.ts +510 -0
- package/dist/components/time-picker/src/common/picker.vue.js +463 -0
- package/dist/components/time-picker/src/common/picker2.vue.js +4 -0
- package/dist/components/time-picker/src/common/props.d.ts +280 -0
- package/dist/components/time-picker/src/common/props.js +282 -0
- package/dist/components/time-picker/src/composables/use-common-picker.d.ts +42 -0
- package/dist/components/time-picker/src/composables/use-common-picker.js +62 -0
- package/dist/components/time-picker/src/composables/use-time-panel.d.ts +13 -0
- package/dist/components/time-picker/src/composables/use-time-panel.js +60 -0
- package/dist/components/time-picker/src/composables/use-time-picker.d.ts +300 -0
- package/dist/components/time-picker/src/composables/use-time-picker.js +45 -0
- package/dist/components/time-picker/src/constants.d.ts +23 -0
- package/dist/components/time-picker/src/constants.js +23 -0
- package/dist/components/time-picker/src/props/basic-time-spinner.d.ts +39 -0
- package/dist/components/time-picker/src/props/basic-time-spinner.js +31 -0
- package/dist/components/time-picker/src/props/panel-time-picker.d.ts +16 -0
- package/dist/components/time-picker/src/props/panel-time-picker.js +17 -0
- package/dist/components/time-picker/src/props/panel-time-range.d.ts +15 -0
- package/dist/components/time-picker/src/props/panel-time-range.js +16 -0
- package/dist/components/time-picker/src/props/shared.d.ts +31 -0
- package/dist/components/time-picker/src/props/shared.js +40 -0
- package/dist/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +82 -0
- package/dist/components/time-picker/src/time-picker-com/basic-time-spinner.vue.js +253 -0
- package/dist/components/time-picker/src/time-picker-com/basic-time-spinner2.vue.js +4 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +37 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-pick.vue.js +127 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-pick2.vue.js +4 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +35 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-range.vue.js +206 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-range2.vue.js +4 -0
- package/dist/components/time-picker/src/time-picker.d.ts +440 -0
- package/dist/components/time-picker/src/time-picker.js +68 -0
- package/dist/components/time-picker/src/utils.d.ts +14 -0
- package/dist/components/time-picker/src/utils.js +40 -0
- package/dist/components/tooltip/index.js +8 -7
- package/dist/constants/date.js +17 -0
- package/dist/constants/event.js +3 -2
- package/dist/constants/form.js +5 -0
- package/dist/directives/repeat-click/index.js +33 -0
- package/dist/ep-craft.js +150 -148
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/use-attrs/index.d.ts +7 -0
- package/dist/hooks/use-attrs/index.js +25 -0
- package/dist/hooks/use-calc-input-width/index.d.ts +7 -0
- package/dist/hooks/use-calc-input-width/index.js +19 -0
- package/dist/hooks/use-composition/index.d.ts +12 -0
- package/dist/hooks/use-composition/index.js +25 -0
- package/dist/hooks/use-cursor/index.d.ts +2 -0
- package/dist/hooks/use-cursor/index.js +36 -0
- package/dist/hooks/use-empty-values/index.js +29 -8
- package/dist/hooks/use-float-label/index.d.ts +29 -0
- package/dist/hooks/use-float-label/index.js +19 -0
- package/dist/hooks/use-focus-controller/index.d.ts +26 -0
- package/dist/hooks/use-focus-controller/index.js +41 -0
- package/dist/index.css +1 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/advancedFormat.js +54 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/customParseFormat.js +127 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/dayOfYear.js +19 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/isSameOrAfter.js +18 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/isSameOrBefore.js +18 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/localeData.js +82 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/weekOfYear.js +29 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/weekYear.js +19 -0
- package/dist/utils/arrays.js +5 -4
- package/dist/utils/dom/scroll.js +49 -35
- package/dist/utils/strings.js +7 -6
- package/dist/utils/types.js +19 -18
- package/dist/utils/vue/icon.js +15 -10
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +13 -5
- package/package.json +2 -1
- package/theme-chalk/src/float-label.scss +207 -0
- package/theme-chalk/src/index.scss +1 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { DatePickerType } from '@element-plus/components/date-picker-panel/src/types';
|
|
3
|
+
export declare const datePickerProps: {
|
|
4
|
+
readonly type: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => DatePickerType) | (((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => DatePickerType)) | null)[], unknown, unknown, "date", boolean>;
|
|
5
|
+
readonly floatLabel: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
6
|
+
readonly showNow: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
7
|
+
readonly showConfirm: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
8
|
+
readonly showFooter: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
9
|
+
readonly showWeekNumber: BooleanConstructor;
|
|
10
|
+
readonly ariaLabel: StringConstructor;
|
|
11
|
+
readonly emptyValues: ArrayConstructor;
|
|
12
|
+
readonly valueOnClear: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
13
|
+
readonly disabledDate: {
|
|
14
|
+
readonly type: import("vue").PropType<Function>;
|
|
15
|
+
readonly required: false;
|
|
16
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
|
+
__epPropKey: true;
|
|
18
|
+
};
|
|
19
|
+
readonly cellClassName: {
|
|
20
|
+
readonly type: import("vue").PropType<Function>;
|
|
21
|
+
readonly required: false;
|
|
22
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
23
|
+
__epPropKey: true;
|
|
24
|
+
};
|
|
25
|
+
readonly shortcuts: import("@element-plus/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
26
|
+
readonly arrowControl: BooleanConstructor;
|
|
27
|
+
readonly tabindex: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown, 0, boolean>;
|
|
28
|
+
readonly validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
29
|
+
readonly unlinkPanels: BooleanConstructor;
|
|
30
|
+
readonly singlePanel: BooleanConstructor;
|
|
31
|
+
readonly placement: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | (((new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement)) | null)[], import("element-plus").Placement, unknown, "bottom", boolean>;
|
|
32
|
+
readonly fallbackPlacements: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | (((new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[])) | null)[], unknown, unknown, readonly ["bottom", "top", "right", "left"], boolean>;
|
|
33
|
+
readonly disabledHours: {
|
|
34
|
+
readonly type: import("vue").PropType<import("@element-plus/components/time-picker").GetDisabledHours>;
|
|
35
|
+
readonly required: false;
|
|
36
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
37
|
+
__epPropKey: true;
|
|
38
|
+
};
|
|
39
|
+
readonly disabledMinutes: {
|
|
40
|
+
readonly type: import("vue").PropType<import("@element-plus/components/time-picker").GetDisabledMinutes>;
|
|
41
|
+
readonly required: false;
|
|
42
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
43
|
+
__epPropKey: true;
|
|
44
|
+
};
|
|
45
|
+
readonly disabledSeconds: {
|
|
46
|
+
readonly type: import("vue").PropType<import("@element-plus/components/time-picker").GetDisabledSeconds>;
|
|
47
|
+
readonly required: false;
|
|
48
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
49
|
+
__epPropKey: true;
|
|
50
|
+
};
|
|
51
|
+
readonly automaticDropdown: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
52
|
+
readonly id: {
|
|
53
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => import("@element-plus/components/time-picker").SingleOrRange<string>) | (((new (...args: any[]) => string | [string, string]) | (() => import("@element-plus/components/time-picker").SingleOrRange<string>)) | null)[], unknown, unknown>>;
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
56
|
+
__epPropKey: true;
|
|
57
|
+
};
|
|
58
|
+
readonly name: {
|
|
59
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => import("@element-plus/components/time-picker").SingleOrRange<string>) | (((new (...args: any[]) => string | [string, string]) | (() => import("@element-plus/components/time-picker").SingleOrRange<string>)) | null)[], unknown, unknown>>;
|
|
60
|
+
readonly required: false;
|
|
61
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
62
|
+
__epPropKey: true;
|
|
63
|
+
};
|
|
64
|
+
readonly popperClass: {
|
|
65
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | {
|
|
66
|
+
[x: string]: boolean;
|
|
67
|
+
} | (string | {
|
|
68
|
+
[x: string]: boolean;
|
|
69
|
+
} | (string | {
|
|
70
|
+
[x: string]: boolean;
|
|
71
|
+
} | (string | {
|
|
72
|
+
[x: string]: boolean;
|
|
73
|
+
} | (string | {
|
|
74
|
+
[x: string]: boolean;
|
|
75
|
+
} | (string | {
|
|
76
|
+
[x: string]: boolean;
|
|
77
|
+
} | (string | {
|
|
78
|
+
[x: string]: boolean;
|
|
79
|
+
} | (string | {
|
|
80
|
+
[x: string]: boolean;
|
|
81
|
+
} | (string | {
|
|
82
|
+
[x: string]: boolean;
|
|
83
|
+
} | (string | {
|
|
84
|
+
[x: string]: boolean;
|
|
85
|
+
} | (string | {
|
|
86
|
+
[x: string]: boolean;
|
|
87
|
+
} | (string | {
|
|
88
|
+
[x: string]: boolean;
|
|
89
|
+
} | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[]) | (() => string | {
|
|
90
|
+
[x: string]: boolean;
|
|
91
|
+
} | (string | {
|
|
92
|
+
[x: string]: boolean;
|
|
93
|
+
} | (string | {
|
|
94
|
+
[x: string]: boolean;
|
|
95
|
+
} | (string | {
|
|
96
|
+
[x: string]: boolean;
|
|
97
|
+
} | (string | {
|
|
98
|
+
[x: string]: boolean;
|
|
99
|
+
} | (string | {
|
|
100
|
+
[x: string]: boolean;
|
|
101
|
+
} | (string | {
|
|
102
|
+
[x: string]: boolean;
|
|
103
|
+
} | (string | {
|
|
104
|
+
[x: string]: boolean;
|
|
105
|
+
} | (string | {
|
|
106
|
+
[x: string]: boolean;
|
|
107
|
+
} | (string | {
|
|
108
|
+
[x: string]: boolean;
|
|
109
|
+
} | (string | {
|
|
110
|
+
[x: string]: boolean;
|
|
111
|
+
} | (string | {
|
|
112
|
+
[x: string]: boolean;
|
|
113
|
+
} | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[]) | (((new (...args: any[]) => string | {
|
|
114
|
+
[x: string]: boolean;
|
|
115
|
+
} | (string | {
|
|
116
|
+
[x: string]: boolean;
|
|
117
|
+
} | (string | {
|
|
118
|
+
[x: string]: boolean;
|
|
119
|
+
} | (string | {
|
|
120
|
+
[x: string]: boolean;
|
|
121
|
+
} | (string | {
|
|
122
|
+
[x: string]: boolean;
|
|
123
|
+
} | (string | {
|
|
124
|
+
[x: string]: boolean;
|
|
125
|
+
} | (string | {
|
|
126
|
+
[x: string]: boolean;
|
|
127
|
+
} | (string | {
|
|
128
|
+
[x: string]: boolean;
|
|
129
|
+
} | (string | {
|
|
130
|
+
[x: string]: boolean;
|
|
131
|
+
} | (string | {
|
|
132
|
+
[x: string]: boolean;
|
|
133
|
+
} | (string | {
|
|
134
|
+
[x: string]: boolean;
|
|
135
|
+
} | (string | {
|
|
136
|
+
[x: string]: boolean;
|
|
137
|
+
} | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[]) | (() => string | {
|
|
138
|
+
[x: string]: boolean;
|
|
139
|
+
} | (string | {
|
|
140
|
+
[x: string]: boolean;
|
|
141
|
+
} | (string | {
|
|
142
|
+
[x: string]: boolean;
|
|
143
|
+
} | (string | {
|
|
144
|
+
[x: string]: boolean;
|
|
145
|
+
} | (string | {
|
|
146
|
+
[x: string]: boolean;
|
|
147
|
+
} | (string | {
|
|
148
|
+
[x: string]: boolean;
|
|
149
|
+
} | (string | {
|
|
150
|
+
[x: string]: boolean;
|
|
151
|
+
} | (string | {
|
|
152
|
+
[x: string]: boolean;
|
|
153
|
+
} | (string | {
|
|
154
|
+
[x: string]: boolean;
|
|
155
|
+
} | (string | {
|
|
156
|
+
[x: string]: boolean;
|
|
157
|
+
} | (string | {
|
|
158
|
+
[x: string]: boolean;
|
|
159
|
+
} | (string | {
|
|
160
|
+
[x: string]: boolean;
|
|
161
|
+
} | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[])) | null)[], unknown, unknown>>;
|
|
162
|
+
readonly required: false;
|
|
163
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
164
|
+
__epPropKey: true;
|
|
165
|
+
};
|
|
166
|
+
readonly popperStyle: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | (((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
|
167
|
+
readonly format: StringConstructor;
|
|
168
|
+
readonly valueFormat: StringConstructor;
|
|
169
|
+
readonly dateFormat: StringConstructor;
|
|
170
|
+
readonly timeFormat: StringConstructor;
|
|
171
|
+
readonly clearable: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
172
|
+
readonly clearIcon: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
173
|
+
readonly editable: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
174
|
+
readonly saveOnBlur: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
175
|
+
readonly prefixIcon: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, "", boolean>;
|
|
176
|
+
readonly size: {
|
|
177
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
178
|
+
readonly required: false;
|
|
179
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
180
|
+
__epPropKey: true;
|
|
181
|
+
};
|
|
182
|
+
readonly readonly: BooleanConstructor;
|
|
183
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
184
|
+
readonly placeholder: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
185
|
+
readonly popperOptions: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | (((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>)) | null)[], unknown, unknown, () => {}, boolean>;
|
|
186
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import("@element-plus/components/time-picker").ModelValueType | null) | (((new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import("@element-plus/components/time-picker").ModelValueType | null)) | null)[], unknown, unknown, "", boolean>;
|
|
187
|
+
readonly rangeSeparator: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
188
|
+
readonly startPlaceholder: StringConstructor;
|
|
189
|
+
readonly endPlaceholder: StringConstructor;
|
|
190
|
+
readonly defaultValue: {
|
|
191
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("@element-plus/components/time-picker").SingleOrRange<Date>) | (((new (...args: any[]) => Date | [Date, Date]) | (() => import("@element-plus/components/time-picker").SingleOrRange<Date>)) | null)[], unknown, unknown>>;
|
|
192
|
+
readonly required: false;
|
|
193
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
194
|
+
__epPropKey: true;
|
|
195
|
+
};
|
|
196
|
+
readonly defaultTime: {
|
|
197
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("@element-plus/components/time-picker").SingleOrRange<Date>) | (((new (...args: any[]) => Date | [Date, Date]) | (() => import("@element-plus/components/time-picker").SingleOrRange<Date>)) | null)[], unknown, unknown>>;
|
|
198
|
+
readonly required: false;
|
|
199
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
200
|
+
__epPropKey: true;
|
|
201
|
+
};
|
|
202
|
+
readonly isRange: BooleanConstructor;
|
|
203
|
+
};
|
|
204
|
+
export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
|
|
205
|
+
export type DatePickerPropsPublic = ExtractPublicPropTypes<typeof datePickerProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "../../time-picker/index.js";
|
|
2
|
+
import "@vue/shared";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import "@element-plus/icons-vue";
|
|
6
|
+
import { buildProps as r, definePropType as t } from "../../../utils/vue/props/runtime.js";
|
|
7
|
+
import "vue";
|
|
8
|
+
import { timePickerDefaultProps as o } from "../../time-picker/src/common/props.js";
|
|
9
|
+
const s = r({
|
|
10
|
+
...o,
|
|
11
|
+
/**
|
|
12
|
+
* @description type of the picker
|
|
13
|
+
*/
|
|
14
|
+
type: {
|
|
15
|
+
type: t(String),
|
|
16
|
+
default: "date"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
s as datePickerProps
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Plugin } from 'vue';
|
|
2
|
+
import _DatePickerPanel from './src/date-picker-panel';
|
|
3
|
+
export declare const EpDatePickerPanel: typeof _DatePickerPanel & Plugin;
|
|
4
|
+
export default EpDatePickerPanel;
|
|
5
|
+
export * from './src/constants';
|
|
6
|
+
export * from './src/props/date-picker-panel';
|
|
7
|
+
export * from './src/types';
|
|
8
|
+
export type { DatePickerPanelInstance } from './src/instance';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { withInstall as e } from "../../utils/with-install.js";
|
|
2
|
+
import r from "./src/date-picker-panel.js";
|
|
3
|
+
import { datePickerPanelProps as P } from "./src/props/date-picker-panel.js";
|
|
4
|
+
const o = e(
|
|
5
|
+
r,
|
|
6
|
+
"ep-date-picker-panel"
|
|
7
|
+
);
|
|
8
|
+
export {
|
|
9
|
+
o as EpDatePickerPanel,
|
|
10
|
+
P as datePickerPanelProps
|
|
11
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import type { SetupContext } from 'vue';
|
|
3
|
+
import type { Dayjs } from 'dayjs';
|
|
4
|
+
import type { DateCell } from '../types';
|
|
5
|
+
import type { BasicDateTableEmits, BasicDateTableProps } from '../props/basic-date-table';
|
|
6
|
+
export declare const useBasicDateTable: (props: BasicDateTableProps, emit: SetupContext<BasicDateTableEmits>["emit"]) => {
|
|
7
|
+
WEEKS: import("vue").ComputedRef<string[]>;
|
|
8
|
+
rows: import("vue").ComputedRef<DateCell[][] | {
|
|
9
|
+
column?: number | undefined;
|
|
10
|
+
customClass?: string | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
end?: boolean | undefined;
|
|
13
|
+
inRange?: boolean | undefined;
|
|
14
|
+
row?: number | undefined;
|
|
15
|
+
selected?: {
|
|
16
|
+
clone: () => Dayjs;
|
|
17
|
+
isValid: () => boolean;
|
|
18
|
+
year: {
|
|
19
|
+
(): number;
|
|
20
|
+
(value: number): Dayjs;
|
|
21
|
+
};
|
|
22
|
+
month: {
|
|
23
|
+
(): number;
|
|
24
|
+
(value: number): Dayjs;
|
|
25
|
+
};
|
|
26
|
+
date: {
|
|
27
|
+
(): number;
|
|
28
|
+
(value: number): Dayjs;
|
|
29
|
+
};
|
|
30
|
+
day: {
|
|
31
|
+
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
32
|
+
(value: number): Dayjs;
|
|
33
|
+
};
|
|
34
|
+
hour: {
|
|
35
|
+
(): number;
|
|
36
|
+
(value: number): Dayjs;
|
|
37
|
+
};
|
|
38
|
+
minute: {
|
|
39
|
+
(): number;
|
|
40
|
+
(value: number): Dayjs;
|
|
41
|
+
};
|
|
42
|
+
second: {
|
|
43
|
+
(): number;
|
|
44
|
+
(value: number): Dayjs;
|
|
45
|
+
};
|
|
46
|
+
millisecond: {
|
|
47
|
+
(): number;
|
|
48
|
+
(value: number): Dayjs;
|
|
49
|
+
};
|
|
50
|
+
set: (unit: dayjs.UnitType, value: number) => Dayjs;
|
|
51
|
+
get: (unit: dayjs.UnitType) => number;
|
|
52
|
+
add: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
|
|
53
|
+
subtract: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
|
|
54
|
+
startOf: (unit: dayjs.OpUnitType) => Dayjs;
|
|
55
|
+
endOf: (unit: dayjs.OpUnitType) => Dayjs;
|
|
56
|
+
format: (template?: string) => string;
|
|
57
|
+
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
|
|
58
|
+
valueOf: () => number;
|
|
59
|
+
unix: () => number;
|
|
60
|
+
daysInMonth: () => number;
|
|
61
|
+
toDate: () => Date;
|
|
62
|
+
toJSON: () => string;
|
|
63
|
+
toISOString: () => string;
|
|
64
|
+
toString: () => string;
|
|
65
|
+
utcOffset: () => number;
|
|
66
|
+
isBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
67
|
+
isSame: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
68
|
+
isAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
69
|
+
locale: {
|
|
70
|
+
(): string;
|
|
71
|
+
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
|
|
72
|
+
};
|
|
73
|
+
localeData: () => dayjs.InstanceLocaleDataReturn;
|
|
74
|
+
week: {
|
|
75
|
+
(): number;
|
|
76
|
+
(value: number): Dayjs;
|
|
77
|
+
};
|
|
78
|
+
weekYear: () => number;
|
|
79
|
+
dayOfYear: {
|
|
80
|
+
(): number;
|
|
81
|
+
(value: number): Dayjs;
|
|
82
|
+
};
|
|
83
|
+
isSameOrAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
84
|
+
isSameOrBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
85
|
+
} | undefined;
|
|
86
|
+
isCurrent?: boolean | undefined;
|
|
87
|
+
isSelected?: boolean | undefined;
|
|
88
|
+
start?: boolean | undefined;
|
|
89
|
+
text?: number | undefined;
|
|
90
|
+
renderText?: string | undefined;
|
|
91
|
+
timestamp?: number | undefined;
|
|
92
|
+
date?: Date | undefined;
|
|
93
|
+
dayjs?: {
|
|
94
|
+
clone: () => Dayjs;
|
|
95
|
+
isValid: () => boolean;
|
|
96
|
+
year: {
|
|
97
|
+
(): number;
|
|
98
|
+
(value: number): Dayjs;
|
|
99
|
+
};
|
|
100
|
+
month: {
|
|
101
|
+
(): number;
|
|
102
|
+
(value: number): Dayjs;
|
|
103
|
+
};
|
|
104
|
+
date: {
|
|
105
|
+
(): number;
|
|
106
|
+
(value: number): Dayjs;
|
|
107
|
+
};
|
|
108
|
+
day: {
|
|
109
|
+
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
110
|
+
(value: number): Dayjs;
|
|
111
|
+
};
|
|
112
|
+
hour: {
|
|
113
|
+
(): number;
|
|
114
|
+
(value: number): Dayjs;
|
|
115
|
+
};
|
|
116
|
+
minute: {
|
|
117
|
+
(): number;
|
|
118
|
+
(value: number): Dayjs;
|
|
119
|
+
};
|
|
120
|
+
second: {
|
|
121
|
+
(): number;
|
|
122
|
+
(value: number): Dayjs;
|
|
123
|
+
};
|
|
124
|
+
millisecond: {
|
|
125
|
+
(): number;
|
|
126
|
+
(value: number): Dayjs;
|
|
127
|
+
};
|
|
128
|
+
set: (unit: dayjs.UnitType, value: number) => Dayjs;
|
|
129
|
+
get: (unit: dayjs.UnitType) => number;
|
|
130
|
+
add: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
|
|
131
|
+
subtract: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
|
|
132
|
+
startOf: (unit: dayjs.OpUnitType) => Dayjs;
|
|
133
|
+
endOf: (unit: dayjs.OpUnitType) => Dayjs;
|
|
134
|
+
format: (template?: string) => string;
|
|
135
|
+
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
|
|
136
|
+
valueOf: () => number;
|
|
137
|
+
unix: () => number;
|
|
138
|
+
daysInMonth: () => number;
|
|
139
|
+
toDate: () => Date;
|
|
140
|
+
toJSON: () => string;
|
|
141
|
+
toISOString: () => string;
|
|
142
|
+
toString: () => string;
|
|
143
|
+
utcOffset: () => number;
|
|
144
|
+
isBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
145
|
+
isSame: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
146
|
+
isAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
147
|
+
locale: {
|
|
148
|
+
(): string;
|
|
149
|
+
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
|
|
150
|
+
};
|
|
151
|
+
localeData: () => dayjs.InstanceLocaleDataReturn;
|
|
152
|
+
week: {
|
|
153
|
+
(): number;
|
|
154
|
+
(value: number): Dayjs;
|
|
155
|
+
};
|
|
156
|
+
weekYear: () => number;
|
|
157
|
+
dayOfYear: {
|
|
158
|
+
(): number;
|
|
159
|
+
(value: number): Dayjs;
|
|
160
|
+
};
|
|
161
|
+
isSameOrAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
162
|
+
isSameOrBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
|
|
163
|
+
} | undefined;
|
|
164
|
+
type?: ("normal" | "week" | "today" | "next-month" | "prev-month") | undefined;
|
|
165
|
+
}[][]>;
|
|
166
|
+
tbodyRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
167
|
+
currentCellRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
168
|
+
focus: () => Promise<void | undefined>;
|
|
169
|
+
isCurrent: (cell: DateCell) => boolean;
|
|
170
|
+
isWeekActive: (cell: DateCell) => boolean;
|
|
171
|
+
isSelectedCell: (cell: DateCell) => boolean | undefined;
|
|
172
|
+
handlePickDate: (event: FocusEvent | MouseEvent, isKeyboardMovement?: boolean) => void;
|
|
173
|
+
handleMouseUp: (event: MouseEvent) => void;
|
|
174
|
+
handleMouseDown: (event: MouseEvent) => void;
|
|
175
|
+
handleMouseMove: (event: MouseEvent) => void;
|
|
176
|
+
handleFocus: (event: FocusEvent) => void;
|
|
177
|
+
};
|
|
178
|
+
export declare const useBasicDateTableDOM: (props: BasicDateTableProps, { isCurrent, isWeekActive, }: Pick<ReturnType<typeof useBasicDateTable>, "isCurrent" | "isWeekActive">) => {
|
|
179
|
+
tableKls: import("vue").ComputedRef<string[]>;
|
|
180
|
+
tableLabel: import("vue").ComputedRef<string>;
|
|
181
|
+
weekHeaderClass: string;
|
|
182
|
+
getCellClasses: (cell: DateCell) => string;
|
|
183
|
+
getRowKls: (cell: DateCell) => (string | {
|
|
184
|
+
current: boolean;
|
|
185
|
+
})[];
|
|
186
|
+
t: import("@element-plus/hooks").Translator;
|
|
187
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { ref as b, computed as m, unref as r, watch as Z, nextTick as p } from "vue";
|
|
2
|
+
import j from "dayjs";
|
|
3
|
+
import { flatten as tt } from "lodash-unified";
|
|
4
|
+
import { useNamespace as et } from "../../../../hooks/use-namespace/index.js";
|
|
5
|
+
import { castArray as v } from "../../../../utils/arrays.js";
|
|
6
|
+
import "@vueuse/core";
|
|
7
|
+
import { isArray as at } from "@vue/shared";
|
|
8
|
+
import "@element-plus/icons-vue";
|
|
9
|
+
import { useLocale as A } from "../../../../hooks/use-locale/index.js";
|
|
10
|
+
import "../../../../hooks/use-size/index.js";
|
|
11
|
+
import "@popperjs/core";
|
|
12
|
+
import "../../../../hooks/use-z-index/index.js";
|
|
13
|
+
import "../../../../hooks/use-delayed-toggle/index.js";
|
|
14
|
+
import "../../../../hooks/use-aria/index.js";
|
|
15
|
+
import "../../../../hooks/use-model-toggle/index.js";
|
|
16
|
+
import "../../../../hooks/use-empty-values/index.js";
|
|
17
|
+
import { buildPickerTable as nt } from "../utils.js";
|
|
18
|
+
const C = (a = "") => ["normal", "today"].includes(a), Mt = (a, l) => {
|
|
19
|
+
const { lang: g } = A(), h = b(), k = b(), w = b(), M = b(), x = b([[], [], [], [], [], []]);
|
|
20
|
+
let D = !1;
|
|
21
|
+
const o = a.date.$locale().weekStart || 7, u = a.date.locale("en").localeData().weekdaysShort().map((t) => t.toLowerCase()), N = m(() => o > 3 ? 7 - o : -o), E = m(() => {
|
|
22
|
+
const t = a.date.startOf("month");
|
|
23
|
+
return t.subtract(t.day() || 7, "day");
|
|
24
|
+
}), L = m(() => u.concat(u).slice(
|
|
25
|
+
o,
|
|
26
|
+
o + 7
|
|
27
|
+
)), S = m(() => tt(r(O)).some((t) => t.isCurrent)), R = m(() => {
|
|
28
|
+
const t = a.date.startOf("month"), e = t.day() || 7, n = t.daysInMonth(), s = t.subtract(1, "month").daysInMonth();
|
|
29
|
+
return {
|
|
30
|
+
startOfMonthDay: e,
|
|
31
|
+
dateCountOfMonth: n,
|
|
32
|
+
dateCountOfLastMonth: s
|
|
33
|
+
};
|
|
34
|
+
}), F = m(() => a.selectionMode === "dates" ? v(a.parsedValue) : []), K = (t, { count: e, rowIndex: n, columnIndex: s }) => {
|
|
35
|
+
const { startOfMonthDay: d, dateCountOfMonth: c, dateCountOfLastMonth: f } = r(R), y = r(N);
|
|
36
|
+
if (n >= 0 && n <= 1) {
|
|
37
|
+
const i = d + y < 0 ? 7 + d + y : d + y;
|
|
38
|
+
if (s + n * 7 >= i)
|
|
39
|
+
return t.text = e, !0;
|
|
40
|
+
t.text = f - (i - s % 7) + 1 + n * 7, t.type = "prev-month";
|
|
41
|
+
} else
|
|
42
|
+
return e <= c ? t.text = e : (t.text = e - c, t.type = "next-month"), !0;
|
|
43
|
+
return !1;
|
|
44
|
+
}, _ = (t, { columnIndex: e, rowIndex: n }, s) => {
|
|
45
|
+
const { disabledDate: d, cellClassName: c } = a, f = r(F), y = K(t, { count: s, rowIndex: n, columnIndex: e }), i = t.dayjs.toDate();
|
|
46
|
+
return t.selected = f.find((Y) => Y.isSame(t.dayjs, "day")), t.isSelected = !!t.selected, t.isCurrent = P(t), t.disabled = d == null ? void 0 : d(i), t.customClass = c == null ? void 0 : c(i), y;
|
|
47
|
+
}, $ = (t) => {
|
|
48
|
+
if (a.selectionMode === "week") {
|
|
49
|
+
const [e, n] = a.showWeekNumber ? [1, 7] : [0, 6], s = I(t[e + 1]);
|
|
50
|
+
t[e].inRange = s, t[e].start = s, t[n].inRange = s, t[n].end = s;
|
|
51
|
+
}
|
|
52
|
+
}, O = m(() => {
|
|
53
|
+
const { minDate: t, maxDate: e, rangeState: n, showWeekNumber: s } = a, d = r(N), c = r(x), f = "day";
|
|
54
|
+
let y = 1;
|
|
55
|
+
if (nt({ row: 6, column: 7 }, c, {
|
|
56
|
+
startDate: t,
|
|
57
|
+
columnIndexOffset: s ? 1 : 0,
|
|
58
|
+
nextEndDate: n.endDate || e || n.selecting && t || null,
|
|
59
|
+
now: j().locale(r(g)).startOf(f),
|
|
60
|
+
unit: f,
|
|
61
|
+
relativeDateGetter: (i) => r(E).add(i - d, f),
|
|
62
|
+
setCellMetadata: (...i) => {
|
|
63
|
+
_(...i, y) && (y += 1);
|
|
64
|
+
},
|
|
65
|
+
setRowMetadata: $
|
|
66
|
+
}), s)
|
|
67
|
+
for (let i = 0; i < 6; i++)
|
|
68
|
+
c[i][1].dayjs && (c[i][0] = {
|
|
69
|
+
type: "week",
|
|
70
|
+
text: c[i][1].dayjs.week()
|
|
71
|
+
});
|
|
72
|
+
return c;
|
|
73
|
+
});
|
|
74
|
+
Z(
|
|
75
|
+
() => a.date,
|
|
76
|
+
async () => {
|
|
77
|
+
var t;
|
|
78
|
+
(t = r(h)) != null && t.contains(document.activeElement) && (await p(), await V());
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
const V = async () => {
|
|
82
|
+
var t;
|
|
83
|
+
return (t = r(k)) == null ? void 0 : t.focus();
|
|
84
|
+
}, P = (t) => a.selectionMode === "date" && C(t.type) && B(t, a.parsedValue), B = (t, e) => e ? j(e).locale(r(g)).isSame(a.date.date(Number(t.text)), "day") : !1, T = (t, e) => {
|
|
85
|
+
const n = r(R).startOfMonthDay, s = r(N), d = n + s < 0 ? 7 + n + s : n + s, c = t * 7 + (e - (a.showWeekNumber ? 1 : 0));
|
|
86
|
+
return a.date.startOf("month").subtract(d, "day").add(c, "day");
|
|
87
|
+
}, U = (t) => {
|
|
88
|
+
var d;
|
|
89
|
+
if (!a.rangeState.selecting) return;
|
|
90
|
+
let e = t.target;
|
|
91
|
+
if (e.tagName === "SPAN" && (e = (d = e.parentNode) == null ? void 0 : d.parentNode), e.tagName === "DIV" && (e = e.parentNode), e.tagName !== "TD") return;
|
|
92
|
+
const n = e.parentNode.rowIndex - 1, s = e.cellIndex;
|
|
93
|
+
r(O)[n][s].disabled || (n !== r(w) || s !== r(M)) && (w.value = n, M.value = s, l("changerange", {
|
|
94
|
+
selecting: !0,
|
|
95
|
+
endDate: T(n, s)
|
|
96
|
+
}));
|
|
97
|
+
}, G = (t) => !r(S) && (t == null ? void 0 : t.text) === 1 && C(t.type) || t.isCurrent, H = (t) => {
|
|
98
|
+
D || r(S) || a.selectionMode !== "date" || W(t, !0);
|
|
99
|
+
}, q = (t) => {
|
|
100
|
+
t.target.closest("td") && (D = !0);
|
|
101
|
+
}, z = (t) => {
|
|
102
|
+
t.target.closest("td") && (D = !1);
|
|
103
|
+
}, J = (t) => {
|
|
104
|
+
!a.rangeState.selecting || !a.minDate ? (l("pick", { minDate: t, maxDate: null }), l("select", !0)) : (t >= a.minDate ? l("pick", { minDate: a.minDate, maxDate: t }) : l("pick", { minDate: t, maxDate: a.minDate }), l("select", !1));
|
|
105
|
+
}, Q = (t) => {
|
|
106
|
+
const e = t.week(), n = `${t.year()}w${e}`;
|
|
107
|
+
l("pick", {
|
|
108
|
+
year: t.year(),
|
|
109
|
+
week: e,
|
|
110
|
+
value: n,
|
|
111
|
+
date: t.startOf("week")
|
|
112
|
+
});
|
|
113
|
+
}, X = (t, e) => {
|
|
114
|
+
const n = e ? v(a.parsedValue).filter(
|
|
115
|
+
(s) => (s == null ? void 0 : s.valueOf()) !== t.valueOf()
|
|
116
|
+
) : v(a.parsedValue).concat([t]);
|
|
117
|
+
l("pick", n);
|
|
118
|
+
}, W = (t, e = !1) => {
|
|
119
|
+
if (a.disabled) return;
|
|
120
|
+
const n = t.target.closest("td");
|
|
121
|
+
if (!n) return;
|
|
122
|
+
const s = n.parentNode.rowIndex - 1, d = n.cellIndex, c = r(O)[s][d];
|
|
123
|
+
if (c.disabled || c.type === "week") return;
|
|
124
|
+
const f = T(s, d);
|
|
125
|
+
switch (a.selectionMode) {
|
|
126
|
+
case "range": {
|
|
127
|
+
J(f);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
case "date": {
|
|
131
|
+
l("pick", f, e);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case "week": {
|
|
135
|
+
Q(f);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
case "dates": {
|
|
139
|
+
X(f, !!c.selected);
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}, I = (t) => {
|
|
144
|
+
if (a.selectionMode !== "week") return !1;
|
|
145
|
+
let e = a.date.startOf("day");
|
|
146
|
+
if (t.type === "prev-month" && (e = e.subtract(1, "month")), t.type === "next-month" && (e = e.add(1, "month")), e = e.date(Number.parseInt(t.text, 10)), a.parsedValue && !at(a.parsedValue)) {
|
|
147
|
+
const n = (a.parsedValue.day() - o + 7) % 7 - 1;
|
|
148
|
+
return a.parsedValue.subtract(n, "day").isSame(e, "day");
|
|
149
|
+
}
|
|
150
|
+
return !1;
|
|
151
|
+
};
|
|
152
|
+
return {
|
|
153
|
+
WEEKS: L,
|
|
154
|
+
rows: O,
|
|
155
|
+
tbodyRef: h,
|
|
156
|
+
currentCellRef: k,
|
|
157
|
+
// cellMatchesDate,
|
|
158
|
+
// getDateOfCell,
|
|
159
|
+
focus: V,
|
|
160
|
+
isCurrent: P,
|
|
161
|
+
isWeekActive: I,
|
|
162
|
+
isSelectedCell: G,
|
|
163
|
+
handlePickDate: W,
|
|
164
|
+
handleMouseUp: z,
|
|
165
|
+
handleMouseDown: q,
|
|
166
|
+
handleMouseMove: U,
|
|
167
|
+
handleFocus: H
|
|
168
|
+
};
|
|
169
|
+
}, Ot = (a, {
|
|
170
|
+
isCurrent: l,
|
|
171
|
+
isWeekActive: g
|
|
172
|
+
}) => {
|
|
173
|
+
const h = et("date-table"), { t: k } = A(), w = m(() => [
|
|
174
|
+
h.b(),
|
|
175
|
+
h.is("week-mode", a.selectionMode === "week" && !a.disabled)
|
|
176
|
+
]), M = m(() => k("el.datepicker.dateTablePrompt")), x = (o) => {
|
|
177
|
+
const u = [];
|
|
178
|
+
return C(o.type) && !o.disabled ? (u.push("available"), o.type === "today" && u.push("today")) : u.push(o.type), l(o) && u.push("current"), o.inRange && (C(o.type) || a.selectionMode === "week") && (u.push("in-range"), o.start && u.push("start-date"), o.end && u.push("end-date")), (o.disabled || a.disabled) && u.push("disabled"), o.selected && u.push("selected"), o.customClass && u.push(o.customClass), u.join(" ");
|
|
179
|
+
}, D = (o) => [
|
|
180
|
+
h.e("row"),
|
|
181
|
+
{ current: g(o) }
|
|
182
|
+
];
|
|
183
|
+
return {
|
|
184
|
+
tableKls: w,
|
|
185
|
+
tableLabel: M,
|
|
186
|
+
weekHeaderClass: h.e("week-header"),
|
|
187
|
+
getCellClasses: x,
|
|
188
|
+
getRowKls: D,
|
|
189
|
+
t: k
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
export {
|
|
193
|
+
Mt as useBasicDateTable,
|
|
194
|
+
Ot as useBasicDateTableDOM
|
|
195
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Ref, ToRef } from 'vue';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
export declare const useMonthRangeHeader: ({ unlinkPanels, leftDate, rightDate, }: {
|
|
4
|
+
unlinkPanels: ToRef<boolean>;
|
|
5
|
+
leftDate: Ref<Dayjs>;
|
|
6
|
+
rightDate: Ref<Dayjs>;
|
|
7
|
+
}) => {
|
|
8
|
+
leftPrevYear: () => void;
|
|
9
|
+
rightNextYear: () => void;
|
|
10
|
+
leftNextYear: () => void;
|
|
11
|
+
rightPrevYear: () => void;
|
|
12
|
+
leftLabel: import("vue").ComputedRef<string>;
|
|
13
|
+
rightLabel: import("vue").ComputedRef<string>;
|
|
14
|
+
leftYear: import("vue").ComputedRef<number>;
|
|
15
|
+
rightYear: import("vue").ComputedRef<number>;
|
|
16
|
+
};
|