Skip to content

Commit

Permalink
Merge pull request #1 from shubhadip/master
Browse files Browse the repository at this point in the history
update from source
  • Loading branch information
alesf authored Jul 21, 2023
2 parents 4021f05 + 72148c5 commit d2e56d5
Show file tree
Hide file tree
Showing 10 changed files with 1,991 additions and 16,017 deletions.
1 change: 0 additions & 1 deletion .eslintcache

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuejs3-datepicker",
"version": "1.0.11",
"version": "1.0.18",
"description": "Vue 3 datepicker",
"files": [
"dist/*",
Expand Down
17,711 changes: 1,707 additions & 16,004 deletions serve/datepicker.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/components/datepicker/DateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ export default defineComponent({
parseTypedDate,
inputBlurred,
inputRef,
clearDate,
};
},
});
Expand Down
7 changes: 2 additions & 5 deletions src/components/datepicker/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,8 @@ export default defineComponent({
selectedDate.value = date;
setPageDate(date);
emit('selected', date);
if (props.modelValue) {
emit('update:modelValue', date);
} else {
emit('input', date);
}
emit('update:modelValue', date);
emit('input', date);
}
/**
Expand Down
4 changes: 3 additions & 1 deletion src/components/datepicker/datepicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
margin-left: 10px;
font-size: 15px;
}

&__typeablecalendar{
position: absolute;
top: 10px;
Expand Down Expand Up @@ -187,6 +186,9 @@
&__clear-button, &__calendar-button{
cursor: pointer;
font-style: normal;
position: absolute;
top: 12px;
right:12px;
&.disabled {
color: #999;
cursor: default;
Expand Down
85 changes: 85 additions & 0 deletions src/components/datepicker/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,89 @@ export const tr = (): ILocale => {
};
};

export const vn = (): ILocale => {
const langName = 'Vietnamese';
const monthFullName = [
'Tháng 1',
'Tháng 2',
'Tháng 3',
'Tháng 4',
'Tháng 5',
'Tháng 6',
'Tháng 7',
'Tháng 8',
'Tháng 9',
'Tháng 10',
'Tháng 11',
'Tháng 12',
];
const shortName = [
'Tháng 1',
'Tháng 2',
'Tháng 3',
'Tháng 4',
'Tháng 5',
'Tháng 6',
'Tháng 7',
'Tháng 8',
'Tháng 9',
'Tháng 10',
'Tháng 11',
'Tháng 12',
];
const days = ['CN', 'H', 'B', 'T', 'N', 'S', 'B'];
const daysNames = ['CN', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'];
const rtl = false;
const ymd = false;
const yearSuffix = '';
return {
months: monthFullName,
monthsAbbr: shortName,
days,
language: langName,
yearSuffix,
ymd,
rtl,
langName,
daysNames,
};
};

const bg = (): ILocale => {
const langName = 'Bulgarian';
const monthFullName = [
'Януари',
'Февруари',
'Март',
'Април',
'Май',
'Юни',
'Юли',
'Август',
'Септември',
'Октомври',
'Ноември',
'Декември',
];
const shortName = ['Яну', 'Фев', 'Мар', 'Апр', 'Май', 'Юни', 'Юли', 'Авг', 'Сеп', 'Окт', 'Ное', 'Дек'];
const days = ['Нд', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'];
const daysNames = ['Неделя', 'Понеделник', 'Вторник', 'Сряда', 'Четвъртък', 'Петък', 'Събота'];
const rtl = false;
const ymd = false;
const yearSuffix = '';
return {
months: monthFullName,
monthsAbbr: shortName,
days,
language: langName,
yearSuffix,
ymd,
rtl,
langName,
daysNames,
};
};

export const data = {
af: af(),
hi: hi(),
Expand All @@ -472,4 +555,6 @@ export const data = {
pl: pl(),
ru: ru(),
tr: tr(),
vn: vn(),
bg: bg(),
};
4 changes: 2 additions & 2 deletions src/components/examples/Language.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default defineComponent({
placeholder="Select Date"
@input="dateSelected"
:value="defaultValue"
language="hi"
language="hi"
>
</appdate-picker>
</template>`;
Expand Down Expand Up @@ -61,7 +61,7 @@ export default defineComponent({
* Handler for select-day function
*/
function dateSelected(payload: Date): void {
console.log('dateSelected', payload);
console.log('dateSelected ', payload);
}
return {
Expand Down
19 changes: 16 additions & 3 deletions src/components/examples/VModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
</template>
<template v-slot:content>
<div class="flex-block">
<appdate-picker v-model="dateinput" @update:modelValue="dateSelected" />
<appdate-picker
v-model="dateinput"
@update:modelValue="dateSelected"
:clearButton="true"
@cleared="handleClearDate"
/>
<div class="change-btn">
<button @click="changeValue">Change Value</button>
<p>UpdateValue : {{ dateinput }}</p>
Expand All @@ -29,7 +34,7 @@ export default defineComponent({
setup() {
const dateinput = ref(new Date());
const template = `<appdate-picker
v-model="dateinput"
v-model="dateinput"
@update:modelValue="dateSelected"
/>`;
Expand All @@ -56,7 +61,14 @@ export default defineComponent({
* Handler for select-day function
*/
function dateSelected(payload: Date): void {
console.log(payload);
console.log(payload, dateinput.value);
}
/**
* clear date handler
*/
function handleClearDate(): void {
console.log('clear date event triggered', dateinput.value);
}
return {
Expand All @@ -65,6 +77,7 @@ export default defineComponent({
dateSelected,
template,
script,
handleClearDate,
};
},
});
Expand Down
174 changes: 174 additions & 0 deletions yarn-error.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
Arguments:
/Users/shubhadipmaity/.nvm/versions/node/v18.3.0/bin/node /opt/homebrew/Cellar/yarn/1.22.19/libexec/bin/yarn.js

PATH:
/Users/shubhadipmaity/.bun/bin:/Users/shubhadipmaity/.deno/bin:/opt/homebrew/opt/node@14/bin:/Users/shubhadipmaity/.amplify/bin:/Users/shubhadipmaity/.nvm/versions/node/v18.3.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/shubhadipmaity/.cargo/bin:/Users/shubhadipmaity/Library/Android/sdk/emulator:/Users/shubhadipmaity/Library/Android/sdk/tools:/Users/shubhadipmaity/Library/Android/sdk/tools/bin:/Users/shubhadipmaity/Library/Android/sdk/platform-tools:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Yarn version:
1.22.19

Node version:
18.3.0

Platform:
darwin x64

Trace:
Error: https://registry.npmjs.org/@semantic-release%2fcommit-analyzer: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.19/libexec/lib/cli.js:141517:19)
at Object.onceWrapper (node:events:641:28)
at ClientRequest.emit (node:events:527:28)
at TLSSocket.emitRequestTimeout (node:_http_client:778:9)
at Object.onceWrapper (node:events:641:28)
at TLSSocket.emit (node:events:539:35)
at Socket._onTimeout (node:net:523:8)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)

npm manifest:
{
"name": "vuejs3-datepicker",
"version": "1.0.16",
"description": "Vue 3 datepicker",
"files": [
"dist/*",
"src/*",
"types/*"
],
"main": "dist/datepicker.cjs.js",
"module": "dist/datepicker.esm.js",
"unpkg": "dist/datepicker.min.js",
"scripts": {
"cz": "git-cz",
"serve": "vue-cli-service serve",
"build:demo": "vue-cli-service build",
"lint": "vue-cli-service lint --fix",
"dev": "rollup -c build/rollup-dev.config.js --watch",
"build:lib": "rimraf dist && rollup --config ./build/rollup.config.js",
"test": "jest --config tests/unit/jest.conf.js --coverage ",
"prepublishOnly": "yarn lint && yarn build:lib",
"commit-message": "yarn commitlint -e -V",
"semantic-release:local": "yarn run build:lib && yarn build:demo && semantic-release --no-ci",
"semantic-release": "semantic-release"
},
"dependencies": {
"@babel/runtime": "^7.12.5",
"prismjs": "^1.22.0",
"vue": "^3.0.0"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.12.0",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@rollup/plugin-alias": "2.2.0",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-image": "^2.0.5",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-url": "^5.0.1",
"@types/jest": "^24.0.19",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.3.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-typescript": "~4.3.0",
"@vue/cli-plugin-unit-jest": "~4.5.0",
"@vue/cli-service": "~4.3.0",
"@vue/compiler-sfc": "^3.0.0-beta.1",
"@vue/eslint-config-airbnb": "^5.0.2",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^5.0.2",
"@vue/test-utils": "^2.0.0-beta.8",
"autoprefixer": "^9.8.6",
"cross-env": "7.0.2",
"cssnano": "^4.1.10",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^7.0.0-alpha.0",
"git-cz": "^4.7.3",
"husky": "^4.3.0",
"jest": "^26.6.3",
"lint-staged": ">=10",
"postcss": "^8.1.1",
"postcss-import": "^12.0.1",
"postcss-nested": "^4.2.1",
"postcss-simple-vars": "^5.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.30.0",
"rollup-plugin-analyzer": "^3.3.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-css-only": "^2.1.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-typescript2": "^0.28.0",
"rollup-plugin-vue": "^6.0.0-beta.10",
"typescript": "^3.9.5",
"url-loader": "^4.1.0",
"vue-cli-plugin-vue-next": "~0.1.4",
"vue-jest": "^5.0.0-alpha.5",
"vue-loader": "^15.9.3",
"webpack-cli": "^3.3.12",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.6",
"@semantic-release/release-notes-generator": "^9.0.1",
"semantic-release": "17.2.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -e -V"
}
},
"lint-staged": {
"*.ts": "eslint --cache --fix",
"*.vue": "eslint --cache --fix"
},
"types": "./types/index.d.ts",
"keywords": [
"vue",
"vuejs",
"vue 3",
"javascript",
"typescript",
"vue-component",
"date",
"library",
"month",
"picker",
"datepicker",
"monthpicker"
],
"repository": {
"type": "git",
"url": "git+https://github.com/shubhadip/vuejs3-datepicker.git"
},
"bugs": {
"url": "https://github.com/shubhadip/vuejs3-datepicker/issues"
},
"config": {
"commitizen": {
"path": "git-cz"
}
}
}

yarn manifest:
No manifest

Lockfile:
No lockfile

0 comments on commit d2e56d5

Please sign in to comment.