@mobileaction/action-kit 1.38.0 → 1.38.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ declare const DateTypes: string[];
2
+ interface MonthSelectProps {
3
+ updateMonthYear: (month: number, year: number, fromNav?: boolean) => void;
4
+ month: number;
5
+ year: number;
6
+ options: Array<{
7
+ text: string;
8
+ value: number;
9
+ }>;
10
+ dateType: (typeof DateTypes)[number];
11
+ }
12
+ declare const _default: import("vue").DefineComponent<MonthSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MonthSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { WritableComputedRef } from 'vue';
2
+ import { MaDatePickerProps } from '../types';
3
+ import { ModelValue } from '@vuepic/vue-datepicker';
4
+ export declare function useDatePickerFormat(props: MaDatePickerProps, emit: any): {
5
+ modelValue: WritableComputedRef<ModelValue, ModelValue>;
6
+ visibleFormat: import("vue").ComputedRef<string | ((date: Date) => string) | ((dates: Date[]) => string)>;
7
+ formatQuarter: (quarterDate: Date) => string;
8
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Converts a date format string from Day.js format to date-fns format.
3
+ *
4
+ * @param dayjsFormat - The date format string in Day.js format.
5
+ * @returns The date format string converted to date-fns format.
6
+ *
7
+ * @throws Will throw an error if a token in the Day.js format string is not found in the format map.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const dayjsFormat = 'YYYY-MM-DD';
12
+ * const dateFnsFormat = convertDayjsToDateFnsFormat(dayjsFormat);
13
+ * console.log(dateFnsFormat); // Output: 'yyyy-MM-dd'
14
+ * ```
15
+ */
16
+ export declare const convertDayjsToDateFnsFormat: (dayjsFormat: string) => string;
@@ -0,0 +1,137 @@
1
+ import { MaDatePickerProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ "ma-calendar-preset"?(_: {
6
+ label: any;
7
+ value: any;
8
+ presetDate: any;
9
+ }): any;
10
+ description?(_: {}): any;
11
+ "action-buttons"?(_: {
12
+ value: Date | Date[];
13
+ }): any;
14
+ "menu-header"?(_: {}): any;
15
+ };
16
+ refs: {
17
+ datepickerInput: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<string[]> | import("vue").ExtractPropTypes<import("vue").ComponentObjectPropsOptions<import("@vuepic/vue-datepicker").VueDatePickerProps>>> & {
18
+ onFocus?: (...args: any[]) => any;
19
+ onBlur?: (...args: any[]) => any;
20
+ onOpen?: (...args: any[]) => any;
21
+ onClosed?: (...args: any[]) => any;
22
+ onCleared?: (...args: any[]) => any;
23
+ "onUpdate:model-value"?: (...args: any[]) => any;
24
+ "onUpdate:model-timezone-value"?: (...args: any[]) => any;
25
+ "onText-submit"?: (...args: any[]) => any;
26
+ "onInternal-model-change"?: (...args: any[]) => any;
27
+ "onRecalculate-position"?: (...args: any[]) => any;
28
+ "onFlow-step"?: (...args: any[]) => any;
29
+ "onUpdate-month-year"?: (...args: any[]) => any;
30
+ "onInvalid-select"?: (...args: any[]) => any;
31
+ "onTooltip-open"?: (...args: any[]) => any;
32
+ "onTooltip-close"?: (...args: any[]) => any;
33
+ "onInvalid-fixed-range"?: (...args: any[]) => any;
34
+ "onTime-picker-open"?: (...args: any[]) => any;
35
+ "onTime-picker-close"?: (...args: any[]) => any;
36
+ "onAm-pm-change"?: (...args: any[]) => any;
37
+ "onRange-start"?: (...args: any[]) => any;
38
+ "onRange-end"?: (...args: any[]) => any;
39
+ "onDate-update"?: (...args: any[]) => any;
40
+ "onInvalid-date"?: (...args: any[]) => any;
41
+ "onOverlay-toggle"?: (...args: any[]) => any;
42
+ "onText-input"?: (...args: any[]) => any;
43
+ }, {}, {}, import("vue").ComputedOptions, import("@vuepic/vue-datepicker").PublicMethods, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("@vuepic/vue-datepicker").EmitEvents[], import("@vuepic/vue-datepicker").VueDatePickerProps, {
44
+ [x: number]: string;
45
+ } | {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
46
+ P: {};
47
+ B: {};
48
+ D: {};
49
+ C: {};
50
+ M: {};
51
+ Defaults: {};
52
+ }, {} & (Readonly<import("vue").ExtractPropTypes<string[]> | import("vue").ExtractPropTypes<import("vue").ComponentObjectPropsOptions<import("@vuepic/vue-datepicker").VueDatePickerProps>>> & {
53
+ onFocus?: (...args: any[]) => any;
54
+ onBlur?: (...args: any[]) => any;
55
+ onOpen?: (...args: any[]) => any;
56
+ onClosed?: (...args: any[]) => any;
57
+ onCleared?: (...args: any[]) => any;
58
+ "onUpdate:model-value"?: (...args: any[]) => any;
59
+ "onUpdate:model-timezone-value"?: (...args: any[]) => any;
60
+ "onText-submit"?: (...args: any[]) => any;
61
+ "onInternal-model-change"?: (...args: any[]) => any;
62
+ "onRecalculate-position"?: (...args: any[]) => any;
63
+ "onFlow-step"?: (...args: any[]) => any;
64
+ "onUpdate-month-year"?: (...args: any[]) => any;
65
+ "onInvalid-select"?: (...args: any[]) => any;
66
+ "onTooltip-open"?: (...args: any[]) => any;
67
+ "onTooltip-close"?: (...args: any[]) => any;
68
+ "onInvalid-fixed-range"?: (...args: any[]) => any;
69
+ "onTime-picker-open"?: (...args: any[]) => any;
70
+ "onTime-picker-close"?: (...args: any[]) => any;
71
+ "onAm-pm-change"?: (...args: any[]) => any;
72
+ "onRange-start"?: (...args: any[]) => any;
73
+ "onRange-end"?: (...args: any[]) => any;
74
+ "onDate-update"?: (...args: any[]) => any;
75
+ "onInvalid-date"?: (...args: any[]) => any;
76
+ "onOverlay-toggle"?: (...args: any[]) => any;
77
+ "onText-input"?: (...args: any[]) => any;
78
+ }), {}, {}, import("vue").ComputedOptions, import("@vuepic/vue-datepicker").PublicMethods, {
79
+ [x: number]: string;
80
+ } | {}> & {
81
+ $slots: Readonly<import("@vuepic/vue-datepicker").Slots> & import("@vuepic/vue-datepicker").Slots;
82
+ };
83
+ };
84
+ rootEl: any;
85
+ };
86
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
87
+ declare const __VLS_component: import("vue").DefineComponent<MaDatePickerProps, {
88
+ open: () => any;
89
+ close: () => any;
90
+ toggle: () => any;
91
+ clear: () => any;
92
+ selectDate: () => any;
93
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
94
+ blur: (...args: any[]) => void;
95
+ change: (...args: any[]) => void;
96
+ focus: (...args: any[]) => void;
97
+ open: (...args: any[]) => void;
98
+ "update:value": (...args: any[]) => void;
99
+ openChange: (...args: any[]) => void;
100
+ closed: (...args: any[]) => void;
101
+ cleared: (...args: any[]) => void;
102
+ rangeStart: (...args: any[]) => void;
103
+ rangeEnd: (...args: any[]) => void;
104
+ }, string, import("vue").PublicProps, Readonly<MaDatePickerProps> & Readonly<{
105
+ onBlur?: (...args: any[]) => any;
106
+ onChange?: (...args: any[]) => any;
107
+ onFocus?: (...args: any[]) => any;
108
+ onOpen?: (...args: any[]) => any;
109
+ "onUpdate:value"?: (...args: any[]) => any;
110
+ onOpenChange?: (...args: any[]) => any;
111
+ onClosed?: (...args: any[]) => any;
112
+ onCleared?: (...args: any[]) => any;
113
+ onRangeStart?: (...args: any[]) => any;
114
+ onRangeEnd?: (...args: any[]) => any;
115
+ }>, {
116
+ size: typeof import("./types").MaDatePickerSizes[number];
117
+ disabled: boolean;
118
+ value: import("@vuepic/vue-datepicker").ModelValue;
119
+ position: typeof import("./types").MaDatePickerPositions[number];
120
+ format: string | ((date: Date) => string) | ((dates: Date[]) => string);
121
+ valueFormat: string;
122
+ presetDates: import("./types").MaPresetDate[];
123
+ teleport: boolean | string | HTMLElement;
124
+ presetLocation: typeof import("./types").MaDatePickerPresetLocations[number];
125
+ autoPosition: typeof import("./types").MaDatePickerVerticalPositions[number];
126
+ preventMinMaxNavigation: boolean;
127
+ clearable: boolean;
128
+ applyButtonText: string;
129
+ multiCalendars: boolean;
130
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
131
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
132
+ export default _default;
133
+ type __VLS_WithTemplateSlots<T, S> = T & {
134
+ new (): {
135
+ $slots: S;
136
+ };
137
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryFn } from '@storybook/vue3';
2
+ import { MaDatePicker2 } from '@/index';
3
+ export declare const baseConfig: Meta<typeof MaDatePicker2>;
4
+ export declare const Template: StoryFn;
5
+ export declare const TemplateCustomPresetSlot: StoryFn;
6
+ export declare const TemplateCustomSlots: StoryFn;
@@ -0,0 +1,26 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import { MaDatePicker2 } from '@/index';
3
+ declare const meta: Meta<typeof MaDatePicker2>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MaDatePicker2>;
6
+ export declare const Default: Story;
7
+ export declare const Disabled: Story;
8
+ export declare const ReadOnly: Story;
9
+ export declare const DisabledDates: Story;
10
+ export declare const WithoutTeleport: Story;
11
+ export declare const DateFormat: Story;
12
+ export declare const ValueFormat: Story;
13
+ export declare const WithoutValueFormat: Story;
14
+ export declare const WeekPicker: Story;
15
+ export declare const MonthPicker: Story;
16
+ export declare const QuarterPicker: Story;
17
+ export declare const YearPicker: Story;
18
+ export declare const AutoApply: Story;
19
+ export declare const Borderless: Story;
20
+ export declare const PresetDates: Story;
21
+ export declare const PresetBottom: Story;
22
+ export declare const MinMaxDates: Story;
23
+ export declare const CustomPresetSlot: Story;
24
+ export declare const MultiCalendars: Story;
25
+ export declare const FocusStartDate: Story;
26
+ export declare const CustomSlots: Story;
@@ -0,0 +1,27 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import { MaDatePicker2 } from '@/index';
3
+ declare const meta: Meta<typeof MaDatePicker2>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MaDatePicker2>;
6
+ export declare const Default: Story;
7
+ export declare const Disabled: Story;
8
+ export declare const ReadOnly: Story;
9
+ export declare const DisabledDates: Story;
10
+ export declare const WithoutTeleport: Story;
11
+ export declare const DateFormat: Story;
12
+ export declare const ValueFormat: Story;
13
+ export declare const WithoutValueFormat: Story;
14
+ export declare const WeekPicker: Story;
15
+ export declare const MonthPicker: Story;
16
+ export declare const QuarterPicker: Story;
17
+ export declare const YearPicker: Story;
18
+ export declare const AutoApply: Story;
19
+ export declare const Borderless: Story;
20
+ export declare const PresetDates: Story;
21
+ export declare const PresetBottom: Story;
22
+ export declare const MinMaxDates: Story;
23
+ export declare const AutoRange: Story;
24
+ export declare const CustomPresetSlot: Story;
25
+ export declare const MultiCalendars: Story;
26
+ export declare const FocusStartDate: Story;
27
+ export declare const CustomSlots: Story;
@@ -0,0 +1,58 @@
1
+ import { GeneralConfig, ModelValue, UIOptions } from '@vuepic/vue-datepicker';
2
+ export interface MaPresetDate {
3
+ label: string;
4
+ value: Date[] | string[] | Date | string;
5
+ slot?: string;
6
+ }
7
+ export declare const MaDatePickerSizes: readonly ["small", "medium"];
8
+ export declare const MaDatePickerPresetLocations: readonly ["left", "bottom"];
9
+ export declare const MaDatePickerPositions: readonly ["left", "center", "right"];
10
+ export declare const MaDatePickerVerticalPositions: readonly ["top", "bottom"];
11
+ export interface RangeConfig {
12
+ noDisabledRange?: boolean;
13
+ showLastInRange?: boolean;
14
+ minMaxRawRange?: boolean;
15
+ partialRange?: boolean;
16
+ disableTimeRangeValidation?: boolean;
17
+ fixedStart?: boolean;
18
+ fixedEnd?: boolean;
19
+ maxRange?: string | number;
20
+ minRange?: string | number;
21
+ autoRange?: string | number;
22
+ }
23
+ export interface MaDatePickerProps {
24
+ teleport?: boolean | string | HTMLElement;
25
+ disabled?: boolean;
26
+ readonly?: boolean;
27
+ disabledDates?: Date[] | string[] | ((date: Date) => boolean);
28
+ allowedDates?: string[] | Date[];
29
+ format?: string | ((date: Date) => string) | ((dates: Date[]) => string);
30
+ valueFormat?: string;
31
+ value?: ModelValue;
32
+ weekPicker?: boolean;
33
+ monthPicker?: boolean;
34
+ yearPicker?: boolean;
35
+ quarterPicker?: boolean;
36
+ autoApply?: boolean;
37
+ borderless?: boolean;
38
+ placeholder?: string;
39
+ locale?: string;
40
+ range?: boolean | RangeConfig;
41
+ presetDates?: MaPresetDate[];
42
+ size?: (typeof MaDatePickerSizes)[number];
43
+ presetLocation?: (typeof MaDatePickerPresetLocations)[number];
44
+ position?: (typeof MaDatePickerPositions)[number];
45
+ autoPosition?: (typeof MaDatePickerVerticalPositions)[number];
46
+ minDate?: Date | string;
47
+ maxDate?: Date | string;
48
+ preventMinMaxNavigation?: boolean;
49
+ startDate?: Date | string;
50
+ focusStartDate?: boolean;
51
+ clearable?: boolean;
52
+ applyButtonText?: string;
53
+ multiCalendars?: boolean;
54
+ }
55
+ export declare const MaDefaultVisibleDateFormat = "MMM D, YYYY";
56
+ export declare const MaDefaultDateFormat = "YYYY-MM-DD";
57
+ export declare const UI: UIOptions;
58
+ export declare const DatePickerConfig: GeneralConfig;
@@ -94,6 +94,7 @@ export { default as MaStepItems } from './components/step-items/index.vue';
94
94
  export { default as MaStepItem } from './components/step-items/components/index.vue';
95
95
  export { default as MaRadioCard } from './components/radio-card/index.vue';
96
96
  export { default as MaDatePicker } from './components/date-picker/index.vue';
97
+ export { default as MaDatePicker2 } from './components/date-picker-2/index.vue';
97
98
  export { default as MaEllipsis } from './components/ellipsis/index.vue';
98
99
  export { default as MaTypography } from './components/typography/index.vue';
99
100
  export * from './components/typography/types';