Skip to content

Commit a3fe429

Browse files
committed
Output: Version 1.0.0
1 parent d7a3cbc commit a3fe429

23 files changed

+13765
-10663
lines changed

dist/module.d.mts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as _nuxt_schema from '@nuxt/schema';
2+
3+
interface ModuleOptions {
4+
persianEvent?: boolean;
5+
hijriEvent?: boolean;
6+
officialWorldEvent?: boolean;
7+
unofficialWorldEvent?: boolean;
8+
updateToday?: boolean;
9+
updateTodayTimeout?: number;
10+
selectable?: boolean;
11+
}
12+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
13+
14+
export { _default as default };
15+
export type { ModuleOptions };

dist/module.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "nuxt-persian-calendar",
3+
"configKey": "persianCalendar",
4+
"compatibility": {
5+
"nuxt": "^3.0.0"
6+
},
7+
"version": "1.0.0",
8+
"builder": {
9+
"@nuxt/module-builder": "1.0.2",
10+
"unbuild": "3.6.1"
11+
}
12+
}

dist/module.mjs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { defineNuxtModule, createResolver, addImports, addComponent, addPlugin } from '@nuxt/kit';
2+
3+
const module = defineNuxtModule({
4+
meta: {
5+
name: "nuxt-persian-calendar",
6+
configKey: "persianCalendar",
7+
compatibility: {
8+
nuxt: "^3.0.0"
9+
}
10+
},
11+
defaults: {
12+
persianEvent: true,
13+
hijriEvent: true,
14+
officialWorldEvent: true,
15+
unofficialWorldEvent: true,
16+
updateToday: true,
17+
updateTodayTimeout: 5e3,
18+
selectable: true
19+
},
20+
setup(options, nuxt) {
21+
const resolver = createResolver(import.meta.url);
22+
nuxt.options.runtimeConfig.public.persianCalendar = options;
23+
addImports({
24+
name: "usePersianCalendar",
25+
as: "usePersianCalendar",
26+
from: resolver.resolve("./runtime/composables/usePersianCalendar")
27+
});
28+
addComponent({
29+
name: "PersianCalendar",
30+
filePath: resolver.resolve("./runtime/components/PersianCalendar.vue")
31+
});
32+
addComponent({
33+
name: "PersianDatePicker",
34+
filePath: resolver.resolve("./runtime/components/PersianDatePicker.vue")
35+
});
36+
addPlugin(resolver.resolve("./runtime/plugin"));
37+
}
38+
});
39+
40+
export { module as default };
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
interface CalendarDay {
2+
day: number;
3+
display: string;
4+
title: string;
5+
isToday: boolean;
6+
isSelected: boolean;
7+
isFriday: boolean;
8+
isHoliday: boolean;
9+
isDisabled: boolean;
10+
weekDay: number;
11+
events?: {
12+
persianEvents: string[];
13+
hijriEvents: string[];
14+
};
15+
}
16+
interface ColorScheme {
17+
background?: string;
18+
text?: string;
19+
navButton?: string;
20+
navButtonHover?: string;
21+
dayNameBg?: string;
22+
dayNameText?: string;
23+
dayBg?: string;
24+
dayText?: string;
25+
dayHover?: string;
26+
todayBg?: string;
27+
todayText?: string;
28+
selectedBg?: string;
29+
selectedText?: string;
30+
fridayBg?: string;
31+
fridayText?: string;
32+
infoBg?: string;
33+
infoText?: string;
34+
border?: string;
35+
disabledOpacity?: number;
36+
}
37+
interface Props {
38+
from?: number[];
39+
to?: number[];
40+
showInfo?: boolean;
41+
showEvents?: boolean;
42+
fontFamily?: string;
43+
defaultDate?: number[] | string | null;
44+
showOccasions?: boolean;
45+
theme?: 'light' | 'dark' | 'auto';
46+
lightColors?: ColorScheme;
47+
darkColors?: ColorScheme;
48+
}
49+
declare var __VLS_1: {
50+
selectedDay: any;
51+
persianMonthName: any;
52+
handleNextYear: () => void;
53+
handlePrevYear: () => void;
54+
handleNextMonth: () => void;
55+
handlePrevMonth: () => void;
56+
}, __VLS_3: {
57+
year: any;
58+
handleNextYear: () => void;
59+
handlePrevYear: () => void;
60+
}, __VLS_5: {}, __VLS_7: {
61+
year: any;
62+
}, __VLS_9: {}, __VLS_11: {
63+
month: any;
64+
monthName: any;
65+
handleNextMonth: () => void;
66+
handlePrevMonth: () => void;
67+
}, __VLS_13: {}, __VLS_15: {
68+
month: any;
69+
monthName: any;
70+
}, __VLS_17: {}, __VLS_19: {
71+
dayNames: string[];
72+
}, __VLS_21: {
73+
day: string;
74+
index: number;
75+
}, __VLS_23: {
76+
calendarDays: CalendarDay[];
77+
selectDay: (day: CalendarDay) => void;
78+
getDayClasses: (day: CalendarDay) => {
79+
'calendar-day': boolean;
80+
today: boolean;
81+
selected: boolean;
82+
friday: boolean;
83+
holiday: boolean;
84+
disabled: boolean;
85+
'has-event': boolean | undefined;
86+
};
87+
}, __VLS_25: {
88+
day: CalendarDay;
89+
index: number;
90+
}, __VLS_27: {
91+
persianInfo: any;
92+
hijriInfo: any;
93+
gregorianInfo: any;
94+
selectedDay: any;
95+
}, __VLS_29: {
96+
info: any;
97+
}, __VLS_31: {
98+
info: any;
99+
}, __VLS_33: {
100+
info: any;
101+
}, __VLS_35: {
102+
events: any;
103+
}, __VLS_37: {
104+
events: any;
105+
}, __VLS_39: {
106+
event: any;
107+
index: number;
108+
}, __VLS_41: {
109+
events: any;
110+
}, __VLS_43: {
111+
event: any;
112+
index: number;
113+
}, __VLS_45: {
114+
selectedDay: any;
115+
currentEvents: any;
116+
};
117+
type __VLS_Slots = {} & {
118+
header?: (props: typeof __VLS_1) => any;
119+
} & {
120+
'year-selector'?: (props: typeof __VLS_3) => any;
121+
} & {
122+
'next-year-icon'?: (props: typeof __VLS_5) => any;
123+
} & {
124+
'year-display'?: (props: typeof __VLS_7) => any;
125+
} & {
126+
'prev-year-icon'?: (props: typeof __VLS_9) => any;
127+
} & {
128+
'month-selector'?: (props: typeof __VLS_11) => any;
129+
} & {
130+
'next-month-icon'?: (props: typeof __VLS_13) => any;
131+
} & {
132+
'month-display'?: (props: typeof __VLS_15) => any;
133+
} & {
134+
'prev-month-icon'?: (props: typeof __VLS_17) => any;
135+
} & {
136+
'day-names'?: (props: typeof __VLS_19) => any;
137+
} & {
138+
'day-name'?: (props: typeof __VLS_21) => any;
139+
} & {
140+
'calendar-grid'?: (props: typeof __VLS_23) => any;
141+
} & {
142+
'day-cell'?: (props: typeof __VLS_25) => any;
143+
} & {
144+
'day-info'?: (props: typeof __VLS_27) => any;
145+
} & {
146+
'persian-info'?: (props: typeof __VLS_29) => any;
147+
} & {
148+
'hijri-info'?: (props: typeof __VLS_31) => any;
149+
} & {
150+
'gregorian-info'?: (props: typeof __VLS_33) => any;
151+
} & {
152+
events?: (props: typeof __VLS_35) => any;
153+
} & {
154+
'persian-events'?: (props: typeof __VLS_37) => any;
155+
} & {
156+
'persian-event'?: (props: typeof __VLS_39) => any;
157+
} & {
158+
'hijri-events'?: (props: typeof __VLS_41) => any;
159+
} & {
160+
'hijri-event'?: (props: typeof __VLS_43) => any;
161+
} & {
162+
footer?: (props: typeof __VLS_45) => any;
163+
};
164+
declare const __VLS_base: import("vue").DefineComponent<Props, {
165+
setDate: (date: number[] | string | null) => void;
166+
setDateFromGregorian: (gregorianDate: number[] | string) => void;
167+
getSelectedDate: () => number[];
168+
goToToday: () => void;
169+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
170+
"select-date": (date: any) => any;
171+
"update-today": () => any;
172+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
173+
"onSelect-date"?: ((date: any) => any) | undefined;
174+
"onUpdate-today"?: (() => any) | undefined;
175+
}>, {
176+
showInfo: boolean;
177+
showEvents: boolean;
178+
fontFamily: string;
179+
defaultDate: number[] | string | null;
180+
showOccasions: boolean;
181+
theme: "light" | "dark" | "auto";
182+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
183+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
184+
declare const _default: typeof __VLS_export;
185+
export default _default;
186+
type __VLS_WithSlots<T, S> = T & {
187+
new (): {
188+
$slots: S;
189+
};
190+
};

0 commit comments

Comments
 (0)