Skip to content

Commit

Permalink
Merge pull request #74 from shubhadip/semantic-release-changes
Browse files Browse the repository at this point in the history
fix: semantic config changes
  • Loading branch information
shubhadip authored Nov 4, 2023
2 parents a8c5ef8 + a62c029 commit 32827f1
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@semantic-release/npm",
{
"npmPublish": true,
"pkgRoot": "./build"
"pkgRoot": "./"
}
],
[
Expand Down
39 changes: 33 additions & 6 deletions build/vuejs3-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1433,8 +1433,35 @@ const wt = /* @__PURE__ */ W(mt, [["render", bt]]), pt = () => {
langName: e,
daysNames: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]
};
}, At = {
}, At = () => {
const e = "Arabic-Tunisia", t = [
"جانفي",
"فيفري",
"مارس",
"أفريل",
"ماي",
"جوان",
"جويلية",
"أوت",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر"
];
return {
months: t,
monthsAbbr: t,
days: ["أحد", "أثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
language: e,
yearSuffix: "",
ymd: !1,
rtl: !0,
langName: e,
daysNames: ["الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"]
};
}, It = {
af: pt(),
arTn: At(),
hi: Mt(),
ja: Vt(),
de: Nt(),
Expand All @@ -1449,7 +1476,7 @@ const wt = /* @__PURE__ */ W(mt, [["render", bt]]), pt = () => {
tr: Yt(),
vn: jt(),
bg: Ot()
}, It = q({
}, Ht = q({
name: "Datepicker",
components: {
DateInput: Ze,
Expand Down Expand Up @@ -1596,7 +1623,7 @@ const wt = /* @__PURE__ */ W(mt, [["render", bt]]), pt = () => {
setup(e, { emit: t }) {
const o = new Date(e.modelValue), i = R(0), r = R(null);
e.modelValue && Ae(o) && (i.value = o.getTime(), r.value = o), e.openDate && (i.value = ie(new Date(e.openDate), 1));
const y = R(!1), n = R(!1), c = R(!1), M = R(0), $ = R(/* @__PURE__ */ new Date()), V = h(() => e.initialView ? e.initialView : e.minimumView), k = h(() => new Date(i.value)), T = h(() => At[e.language]), C = h(() => !!e.inline), H = h(() => ({
const y = R(!1), n = R(!1), c = R(!1), M = R(0), $ = R(/* @__PURE__ */ new Date()), V = h(() => e.initialView ? e.initialView : e.minimumView), k = h(() => new Date(i.value)), T = h(() => It[e.language]), C = h(() => !!e.inline), H = h(() => ({
position: C.value ? "static" : void 0
})), I = h(() => y.value || n.value || c.value), P = h(() => T.value && T.value.rtl === !0);
function F(f) {
Expand Down Expand Up @@ -1742,7 +1769,7 @@ const wt = /* @__PURE__ */ W(mt, [["render", bt]]), pt = () => {
};
}
});
function Ht(e, t, o, i, r, y) {
function Pt(e, t, o, i, r, y) {
const n = Z("date-input"), c = Z("picker-day"), M = Z("picker-month"), $ = Z("picker-year"), V = Me("clickoutside");
return le((g(), b("div", {
class: S(["vuejs3-datepicker", [e.isRtl ? "rtl" : "", `vuejs3-${e.theme}`, e.wrapperClass]])
Expand Down Expand Up @@ -1872,7 +1899,7 @@ function Ht(e, t, o, i, r, y) {
}]
]);
}
const Jt = /* @__PURE__ */ W(It, [["render", Ht]]);
const zt = /* @__PURE__ */ W(Ht, [["render", Pt]]);
export {
Jt as default
zt as default
};
2 changes: 1 addition & 1 deletion build/vuejs3-datepicker.umd.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/components/datepicker/DateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ export default defineComponent({
type: Boolean,
default: false,
required: false,
validator: (value: boolean) => {
return !!value;
},
},
useUtc: {
type: Boolean,
Expand Down
9 changes: 9 additions & 0 deletions src/components/datepicker/DatePickerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
<template v-slot:customCalendarHeader>
<slot name="customCalendarHeader"></slot>
</template>
<template v-slot:formatDateTopBar>
<slot name="formatDateTopBar"></slot>
</template>
</picker-day>

<!--Month View -->
Expand All @@ -100,6 +103,9 @@
<template v-slot:customCalendarHeader>
<slot name="customCalendarHeader"></slot>
</template>
<template v-slot:formatDateTopBar>
<slot name="formatDateTopBar"></slot>
</template>
</picker-month>

<!-- Year View -->
Expand All @@ -125,6 +131,9 @@
<template v-slot:customCalendarHeader>
<slot name="customCalendarHeader"></slot>
</template>
<template v-slot:formatDateTopBar>
<slot name="formatDateTopBar"></slot>
</template>
</picker-year>
</div>
</template>
Expand Down
9 changes: 5 additions & 4 deletions src/components/datepicker/PickerDay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
<slot name="customCalendarHeader"></slot>
<section v-if="ifDifferentViews && selectedDate" class="vuejs3-datepicker__calendar-topbar">
<p class="vuejs3-datepicker__calendar-topbar-year" @click="showYearCalendar">{{ currYearName }}</p>
<p class="vuejs3-datepicker__calendar-topbar-day">{{ getDayName }} {{ getDisplayDate }} {{ monthName }}</p>
<slot name="formatDateTopBar">
<p class="vuejs3-datepicker__calendar-topbar-day" v-if="selectedDate">
{{ getDayName }} {{ getDisplayDate }} {{ monthName }}
</p>
</slot>
</section>
<div class="vuejs3-datepicker__calendar-actionarea">
<header>
Expand Down Expand Up @@ -81,9 +85,6 @@ export default defineComponent({
type: [String, Date],
required: false,
default: null,
validator: (p) => {
return ['string', 'number'].indexOf(typeof p) !== -1 || p === null;
},
},
pageDate: {
type: Date as PropType<Date>,
Expand Down
11 changes: 5 additions & 6 deletions src/components/datepicker/PickerMonth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<slot name="customCalendarHeader"></slot>
<section v-if="ifDifferentViews" class="vuejs3-datepicker__calendar-topbar">
<p class="vuejs3-datepicker__calendar-topbar-year" @click="showYearCalendar">{{ currYearName }}</p>
<p class="vuejs3-datepicker__calendar-topbar-day" v-if="selectedDate">
{{ getDayName }} {{ getDisplayDate }} {{ monthName }}
</p>
<slot name="formatDateTopBar">
<p class="vuejs3-datepicker__calendar-topbar-day" v-if="selectedDate">
{{ getDayName }} {{ getDisplayDate }} {{ monthName }}
</p>
</slot>
</section>
<div class="vuejs3-datepicker__calendar-actionarea">
<header>
Expand Down Expand Up @@ -66,9 +68,6 @@ export default defineComponent({
type: [String, Date],
required: false,
default: null,
validator: (p) => {
return ['string', 'number'].indexOf(typeof p) !== -1 || p === null;
},
},
pageDate: {
type: Date as PropType<Date>,
Expand Down
11 changes: 5 additions & 6 deletions src/components/datepicker/PickerYear.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<slot name="customCalendarHeader"></slot>
<section v-if="ifDifferentViews && selectedDate" class="vuejs3-datepicker__calendar-topbar">
<p class="vuejs3-datepicker__calendar-topbar-year">{{ currYearName }}</p>
<p class="vuejs3-datepicker__calendar-topbar-day" v-if="selectedDate">
{{ getDayName }} {{ getDisplayDate }} {{ monthName }}
</p>
<slot name="formatDateTopBar">
<p class="vuejs3-datepicker__calendar-topbar-day" v-if="selectedDate">
{{ getDayName }} {{ getDisplayDate }} {{ monthName }}
</p>
</slot>
</section>
<div class="vuejs3-datepicker__calendar-actionarea">
<header>
Expand Down Expand Up @@ -56,9 +58,6 @@ export default defineComponent({
type: [String, Date],
required: false,
default: null,
validator: (p) => {
return ['string', 'number'].indexOf(typeof p) !== -1 || p === null;
},
},
pageDate: {
type: Date as PropType<Date>,
Expand Down
1 change: 1 addition & 0 deletions src/components/datepicker/datepicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
border-radius: 4px 4px 0px 0px;
padding: 25px;
&-year{
cursor: pointer;
font-size: 30px;
margin: 0px;
padding-bottom: 10px;
Expand Down
30 changes: 27 additions & 3 deletions src/components/examples/Slotview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
<template v-slot:customCalendarHeader>
<p>Custom Calendar Header</p>
</template>
<template v-slot:formatDateTopBar>
<p>{{ formattedDate }}</p>
</template>
</appdate-picker>
</div>
</template>
</Wrapper>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import { defineComponent, ref, computed } from 'vue';
import Wrapper from '../wrapper/Wrapper.vue';
import Datepicker from '../datepicker/DatePickerComponent.vue';
Expand All @@ -41,6 +44,9 @@ export default defineComponent({
<template v-slot:customCalendarHeader>
<p>Before Calendar Header Slot</p>
</template>
<template v-slot:formatDateTopBar>
<p>{{formattedDate}}</p>
</template>
</appdate-picker>
</template>`;
Expand All @@ -52,9 +58,22 @@ export default defineComponent({
function dateSelected(payload: Date): void {
console.log('dateSelected', payload)
}
/**
* Handler for select-day function
*/
function dateSelected(payload: Date): void {
defaultValue.value = payload
}
const formattedDate = computed(() => {
return defaultValue.value.toString();
})
return {
...
defaultValue,
dateSelected,
defaultValue
changeDefaultValue,
formattedDate
}
}
}
Expand All @@ -69,15 +88,20 @@ export default defineComponent({
* Handler for select-day function
*/
function dateSelected(payload: Date): void {
console.log('dateSelected', payload);
defaultValue.value = payload;
}
const formattedDate = computed(() => {
return defaultValue.value.toString();
});
return {
script,
template,
defaultValue,
dateSelected,
changeDefaultValue,
formattedDate,
};
},
});
Expand Down

0 comments on commit 32827f1

Please sign in to comment.