create-koa-boot 1.0.0
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/ai/generators.js +668 -0
- package/ai/metadata.js +107 -0
- package/ai/schema-parser.js +127 -0
- package/ai.js +95 -0
- package/bin/create-koa-boot.js +3 -0
- package/index.js +185 -0
- package/package.json +26 -0
- package/templates/.env.example +81 -0
- package/templates/AGENTS.md +60 -0
- package/templates/example/AGENTS.md +60 -0
- package/templates/example/backend/.env.example +81 -0
- package/templates/example/backend/package.json +38 -0
- package/templates/example/backend/prisma/schema.prisma +353 -0
- package/templates/example/backend/scripts/fix-routes-imports.js +23 -0
- package/templates/example/backend/scripts/switch-runtime-local.mjs +39 -0
- package/templates/example/backend/src/ai-tools.ts +32 -0
- package/templates/example/backend/src/app.ts +75 -0
- package/templates/example/backend/src/business/ai/ai.controller.ts +38 -0
- package/templates/example/backend/src/business/ai/ai.model.ts +37 -0
- package/templates/example/backend/src/business/ai/ai.service.ts +137 -0
- package/templates/example/backend/src/business/demo/demo.controller.ts +63 -0
- package/templates/example/backend/src/business/demo/demo.model.ts +93 -0
- package/templates/example/backend/src/business/demo/demo.service.ts +54 -0
- package/templates/example/backend/src/business/notification/channel.ts +273 -0
- package/templates/example/backend/src/business/notification/notification.controller.ts +175 -0
- package/templates/example/backend/src/business/notification/notification.model.ts +22 -0
- package/templates/example/backend/src/business/notification/notification.service.ts +579 -0
- package/templates/example/backend/src/business/notification/receivers.ts +44 -0
- package/templates/example/backend/src/business/notification/templates.ts +72 -0
- package/templates/example/backend/src/business/sysConfig/sysConfig.controller.ts +87 -0
- package/templates/example/backend/src/business/sysConfig/sysConfig.model.ts +44 -0
- package/templates/example/backend/src/business/sysConfig/sysConfig.service.ts +32 -0
- package/templates/example/backend/src/common/decorators.ts +1 -0
- package/templates/example/backend/src/common/index.ts +8 -0
- package/templates/example/backend/src/common/types.ts +51 -0
- package/templates/example/backend/src/config/database.ts +4 -0
- package/templates/example/backend/src/config/index.ts +2 -0
- package/templates/example/backend/src/index.ts +44 -0
- package/templates/example/backend/src/init/menu-seed.ts +77 -0
- package/templates/example/backend/src/utils/aiClient.ts +1 -0
- package/templates/example/backend/src/utils/banner.ts +1 -0
- package/templates/example/backend/src/utils/emailClient.ts +1 -0
- package/templates/example/backend/src/utils/logger.ts +1 -0
- package/templates/example/backend/src/utils/redisClient.ts +1 -0
- package/templates/example/backend/src/utils/smsClient.ts +1 -0
- package/templates/example/backend/src/utils/unipushClient.ts +1 -0
- package/templates/example/backend/src/utils/wecom.ts +1 -0
- package/templates/example/backend/tsconfig.build.json +11 -0
- package/templates/example/backend/tsconfig.json +21 -0
- package/templates/example/backend/tsoa.json +29 -0
- package/templates/example/frontend/.prettierignore +7 -0
- package/templates/example/frontend/.prettierrc +11 -0
- package/templates/example/frontend/.vscode/extensions.json +3 -0
- package/templates/example/frontend/README.md +5 -0
- package/templates/example/frontend/eslint.config.js +53 -0
- package/templates/example/frontend/index.html +13 -0
- package/templates/example/frontend/package.json +45 -0
- package/templates/example/frontend/public/geo/100000_full.json +1 -0
- package/templates/example/frontend/public/geo/520000_district.json +1 -0
- package/templates/example/frontend/public/geo/520000_full.json +1 -0
- package/templates/example/frontend/public/logo.ico +0 -0
- package/templates/example/frontend/public/vite.svg +1 -0
- package/templates/example/frontend/src/App.vue +45 -0
- package/templates/example/frontend/src/api/ai.ts +39 -0
- package/templates/example/frontend/src/api/auth.ts +25 -0
- package/templates/example/frontend/src/api/business/demo.ts +57 -0
- package/templates/example/frontend/src/api/business/logistics.ts +167 -0
- package/templates/example/frontend/src/api/business/notification.ts +54 -0
- package/templates/example/frontend/src/api/business/sysConfig.ts +54 -0
- package/templates/example/frontend/src/api/common.ts +23 -0
- package/templates/example/frontend/src/api/index.ts +31 -0
- package/templates/example/frontend/src/api/service.ts +47 -0
- package/templates/example/frontend/src/api/system/department.ts +40 -0
- package/templates/example/frontend/src/api/system/dict.ts +124 -0
- package/templates/example/frontend/src/api/system/fileUpload.ts +64 -0
- package/templates/example/frontend/src/api/system/log.ts +63 -0
- package/templates/example/frontend/src/api/system/menu.ts +50 -0
- package/templates/example/frontend/src/api/system/permission.ts +43 -0
- package/templates/example/frontend/src/api/system/role.ts +61 -0
- package/templates/example/frontend/src/api/system/user.ts +70 -0
- package/templates/example/frontend/src/assets/koa-boot-1.png +0 -0
- package/templates/example/frontend/src/assets/koa-boot-2.png +0 -0
- package/templates/example/frontend/src/assets/koa-boot-3.png +0 -0
- package/templates/example/frontend/src/assets/vue.svg +1 -0
- package/templates/example/frontend/src/components/AiAssistant.vue +640 -0
- package/templates/example/frontend/src/components/FileUpload.vue +408 -0
- package/templates/example/frontend/src/components/ImageUpload.vue +324 -0
- package/templates/example/frontend/src/components/MapView.vue +567 -0
- package/templates/example/frontend/src/components/MessageCenter.vue +344 -0
- package/templates/example/frontend/src/directives/permission.ts +117 -0
- package/templates/example/frontend/src/layout/index.vue +300 -0
- package/templates/example/frontend/src/main.ts +29 -0
- package/templates/example/frontend/src/router/componentMap.ts +136 -0
- package/templates/example/frontend/src/router/generateRoutes.ts +123 -0
- package/templates/example/frontend/src/router/index.ts +181 -0
- package/templates/example/frontend/src/stores/index.ts +5 -0
- package/templates/example/frontend/src/stores/user.ts +219 -0
- package/templates/example/frontend/src/style.css +79 -0
- package/templates/example/frontend/src/styles/index.scss +284 -0
- package/templates/example/frontend/src/types/index.ts +135 -0
- package/templates/example/frontend/src/utils/dateFormat.ts +39 -0
- package/templates/example/frontend/src/utils/echarts.ts +49 -0
- package/templates/example/frontend/src/views/ModulePlaceholder.vue +16 -0
- package/templates/example/frontend/src/views/ParentView.vue +19 -0
- package/templates/example/frontend/src/views/business/demo/index.vue +201 -0
- package/templates/example/frontend/src/views/business/notification/index.vue +179 -0
- package/templates/example/frontend/src/views/business/sysConfig/index.vue +140 -0
- package/templates/example/frontend/src/views/dashboard/index.vue +206 -0
- package/templates/example/frontend/src/views/login/index.vue +186 -0
- package/templates/example/frontend/src/views/system/department/index.vue +528 -0
- package/templates/example/frontend/src/views/system/dictItem/index.vue +405 -0
- package/templates/example/frontend/src/views/system/dictType/index.vue +318 -0
- package/templates/example/frontend/src/views/system/index.vue +30 -0
- package/templates/example/frontend/src/views/system/menu/index.vue +509 -0
- package/templates/example/frontend/src/views/system/permission/index.vue +270 -0
- package/templates/example/frontend/src/views/system/role/index.vue +590 -0
- package/templates/example/frontend/src/views/system/setting/index.vue +40 -0
- package/templates/example/frontend/src/views/system/user/index.vue +414 -0
- package/templates/example/frontend/src/vite-env.d.ts +6 -0
- package/templates/example/frontend/tsconfig.app.json +24 -0
- package/templates/example/frontend/tsconfig.json +7 -0
- package/templates/example/frontend/tsconfig.node.json +26 -0
- package/templates/example/frontend/vite.config.ts +23 -0
- package/templates/example/frontend/vitest.config.ts +30 -0
- package/templates/example/uniapp/.editorconfig +15 -0
- package/templates/example/uniapp/.eslintrc.js +0 -0
- package/templates/example/uniapp/.hbuilderx/launch.json +20 -0
- package/templates/example/uniapp/.prettierrc +13 -0
- package/templates/example/uniapp/App.vue +270 -0
- package/templates/example/uniapp/README.md +210 -0
- package/templates/example/uniapp/components/MapPicker.vue +793 -0
- package/templates/example/uniapp/components/MapView.vue +219 -0
- package/templates/example/uniapp/components/NavBar.vue +147 -0
- package/templates/example/uniapp/components/PageHeader.vue +153 -0
- package/templates/example/uniapp/components/TabBar.vue +116 -0
- package/templates/example/uniapp/components/empty-state.vue +82 -0
- package/templates/example/uniapp/components/loading-view.vue +77 -0
- package/templates/example/uniapp/composables/index.js +7 -0
- package/templates/example/uniapp/composables/useNetwork.js +56 -0
- package/templates/example/uniapp/composables/usePagination.js +96 -0
- package/templates/example/uniapp/composables/useRequest.js +73 -0
- package/templates/example/uniapp/config/enums.js +14 -0
- package/templates/example/uniapp/config/index.js +44 -0
- package/templates/example/uniapp/config/roleMenus.js +150 -0
- package/templates/example/uniapp/http/ajax.js +144 -0
- package/templates/example/uniapp/http/requestEnhancer.js +109 -0
- package/templates/example/uniapp/index.html +20 -0
- package/templates/example/uniapp/lint-staged.config.js +13 -0
- package/templates/example/uniapp/locales/en.js +48 -0
- package/templates/example/uniapp/locales/index.js +82 -0
- package/templates/example/uniapp/locales/zh-CN.js +48 -0
- package/templates/example/uniapp/main.js +18 -0
- package/templates/example/uniapp/manifest.json +99 -0
- package/templates/example/uniapp/mixins/unreadBadge.js +77 -0
- package/templates/example/uniapp/mock/index.js +92 -0
- package/templates/example/uniapp/package.json +49 -0
- package/templates/example/uniapp/pages/demo/detail.vue +523 -0
- package/templates/example/uniapp/pages/demo/index.vue +399 -0
- package/templates/example/uniapp/pages/home/index.vue +244 -0
- package/templates/example/uniapp/pages/index/index.vue +182 -0
- package/templates/example/uniapp/pages/login/index.vue +457 -0
- package/templates/example/uniapp/pages/message/index.vue +1052 -0
- package/templates/example/uniapp/pages/mine/about/index.vue +234 -0
- package/templates/example/uniapp/pages/mine/help/index.vue +607 -0
- package/templates/example/uniapp/pages/mine/index.vue +351 -0
- package/templates/example/uniapp/pages/mine/profile/index.vue +381 -0
- package/templates/example/uniapp/pages/mine/security/index.vue +336 -0
- package/templates/example/uniapp/pages.json +89 -0
- package/templates/example/uniapp/services/index.js +22 -0
- package/templates/example/uniapp/services/mock/goods.js +73 -0
- package/templates/example/uniapp/services/mock/index.js +1 -0
- package/templates/example/uniapp/services/mock/orders.js +153 -0
- package/templates/example/uniapp/services/modules/ai.js +17 -0
- package/templates/example/uniapp/services/modules/auth.js +76 -0
- package/templates/example/uniapp/services/modules/common.js +11 -0
- package/templates/example/uniapp/services/modules/demo.js +50 -0
- package/templates/example/uniapp/services/modules/fileUpload.js +261 -0
- package/templates/example/uniapp/services/modules/message.js +77 -0
- package/templates/example/uniapp/static/bg.png +0 -0
- package/templates/example/uniapp/static/koa-boot-1.png +0 -0
- package/templates/example/uniapp/static/koa-boot-2.png +0 -0
- package/templates/example/uniapp/static/koa-boot-3.png +0 -0
- package/templates/example/uniapp/static/location.png +0 -0
- package/templates/example/uniapp/static/tab-bar/icon-home.png +0 -0
- package/templates/example/uniapp/static/tab-bar/icon-home2.png +0 -0
- package/templates/example/uniapp/static/upload/icon_close.png +0 -0
- package/templates/example/uniapp/static/upload/icon_file.png +0 -0
- package/templates/example/uniapp/static/upload/icon_image.png +0 -0
- package/templates/example/uniapp/static/upload/icon_upload.png +0 -0
- package/templates/example/uniapp/static/upload/icon_video.png +0 -0
- package/templates/example/uniapp/stores/cart.js +126 -0
- package/templates/example/uniapp/stores/index.js +5 -0
- package/templates/example/uniapp/stores/user.js +272 -0
- package/templates/example/uniapp/styles/mixins.scss +84 -0
- package/templates/example/uniapp/styles/variables.scss +66 -0
- package/templates/example/uniapp/uni.scss +28 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/changelog.md +51 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/chuizi-file-upload/chuizi-file-upload.vue +447 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/chuizi-file-upload/uploadFile/icon_close.png +0 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/chuizi-file-upload/uploadFile/icon_file.png +0 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/chuizi-file-upload/uploadFile/icon_image.png +0 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/chuizi-file-upload/uploadFile/icon_upload.png +0 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/chuizi-file-upload/uploadFile/icon_video.png +0 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/components/xe-upload/xe-upload.vue +321 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/package.json +82 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/readme.md +1 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/tools/apis.js +177 -0
- package/templates/example/uniapp/uni_modules/chuizi-file-upload/tools/tools.js +180 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/CHANGELOG.md +200 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/README.md +595 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit.js +130 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl1/HasSIMD/Decoder.js +169 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl1/NoSIMD/Decoder.js +169 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.js +21 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.wasm +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.worker.js +1 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.js +21 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.wasm +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.worker.js +1 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/noWorker/Decoder.js +21 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/PlayCtrlWasm/playCtrl3/noWorker/Decoder.wasm +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/css/component.css +1257 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/css/inspectTheme.css +354 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/css/theme.css +144 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/imgs/bg.png +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/imgs/bg.svg +33 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/imgs/empty.png +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/imgs/end.png +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/imgs/fallback.svg +52 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/imgs/start.png +0 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/rec/datepicker.en-US.js +19 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/rec/datepicker.js +1523 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/rec/datepicker.min.css +36 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/rec/datepicker.zh-CN.js +19 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/rec/jquery.min.js +2 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/speed/speed.css +158 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/talk/adapeter.js +5497 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/talk/janus.js +3505 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/ezuikit_static/talk/tts-v4.js +343 -0
- package/templates/example/uniapp/uni_modules/ezuikit-js/package.json +29 -0
- package/templates/example/uniapp/uni_modules/heyuan-chooseFile/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/heyuan-chooseFile/components/heyuan-chooseFile/heyuan-chooseFile.vue +188 -0
- package/templates/example/uniapp/uni_modules/heyuan-chooseFile/package.json +87 -0
- package/templates/example/uniapp/uni_modules/heyuan-chooseFile/readme.md +32 -0
- package/templates/example/uniapp/uni_modules/u-ajax/README.md +83 -0
- package/templates/example/uniapp/uni_modules/u-ajax/changelog.md +35 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/index.d.ts +103 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/index.js +14 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/adapters/Fetcher.js +22 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/adapters/http.js +16 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/core/Ajax.js +72 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/core/InterceptorManager.js +32 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/core/dispatchRequest.js +29 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/core/handleCancel.js +35 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/defaults.js +16 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/helpers/buildURL.js +83 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/helpers/isCallback.js +8 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/helpers/mergeConfig.js +41 -0
- package/templates/example/uniapp/uni_modules/u-ajax/js_sdk/lib/utils.js +77 -0
- package/templates/example/uniapp/uni_modules/u-ajax/package.json +74 -0
- package/templates/example/uniapp/uni_modules/uni-badge/changelog.md +33 -0
- package/templates/example/uniapp/uni_modules/uni-badge/components/uni-badge/uni-badge.vue +268 -0
- package/templates/example/uniapp/uni_modules/uni-badge/package.json +85 -0
- package/templates/example/uniapp/uni_modules/uni-badge/readme.md +10 -0
- package/templates/example/uniapp/uni_modules/uni-data-select/changelog.md +43 -0
- package/templates/example/uniapp/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue +562 -0
- package/templates/example/uniapp/uni_modules/uni-data-select/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uni-data-select/readme.md +8 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/changelog.md +168 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue +177 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +947 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json +22 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js +8 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json +22 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json +22 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue +940 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +1064 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js +421 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uni-datetime-picker/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uni-easyinput/changelog.md +115 -0
- package/templates/example/uniapp/uni_modules/uni-easyinput/components/uni-easyinput/common.js +54 -0
- package/templates/example/uniapp/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue +676 -0
- package/templates/example/uniapp/uni_modules/uni-easyinput/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uni-easyinput/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uni-fab/changelog.md +25 -0
- package/templates/example/uniapp/uni_modules/uni-fab/components/uni-fab/uni-fab.vue +491 -0
- package/templates/example/uniapp/uni_modules/uni-fab/package.json +85 -0
- package/templates/example/uniapp/uni_modules/uni-fab/readme.md +9 -0
- package/templates/example/uniapp/uni_modules/uni-forms/changelog.md +100 -0
- package/templates/example/uniapp/uni_modules/uni-forms/components/uni-forms/uni-forms.vue +404 -0
- package/templates/example/uniapp/uni_modules/uni-forms/components/uni-forms/utils.js +293 -0
- package/templates/example/uniapp/uni_modules/uni-forms/components/uni-forms/validate.js +486 -0
- package/templates/example/uniapp/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue +632 -0
- package/templates/example/uniapp/uni_modules/uni-forms/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uni-forms/readme.md +23 -0
- package/templates/example/uniapp/uni_modules/uni-icons/changelog.md +42 -0
- package/templates/example/uniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue +91 -0
- package/templates/example/uniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +110 -0
- package/templates/example/uniapp/uni_modules/uni-icons/components/uni-icons/uniicons.css +664 -0
- package/templates/example/uniapp/uni_modules/uni-icons/components/uni-icons/uniicons.ttf +0 -0
- package/templates/example/uniapp/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts +664 -0
- package/templates/example/uniapp/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js +649 -0
- package/templates/example/uniapp/uni_modules/uni-icons/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uni-icons/readme.md +8 -0
- package/templates/example/uniapp/uni_modules/uni-list/changelog.md +48 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list/uni-list.vue +123 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list/uni-refresh.vue +65 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list/uni-refresh.wxs +87 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue +107 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss +58 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue +593 -0
- package/templates/example/uniapp/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue +534 -0
- package/templates/example/uniapp/uni_modules/uni-list/package.json +91 -0
- package/templates/example/uniapp/uni_modules/uni-list/readme.md +46 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/changelog.md +25 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json +5 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js +8 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json +5 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json +5 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue +404 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/package.json +84 -0
- package/templates/example/uniapp/uni_modules/uni-load-more/readme.md +14 -0
- package/templates/example/uniapp/uni_modules/uni-scss/changelog.md +8 -0
- package/templates/example/uniapp/uni_modules/uni-scss/index.scss +1 -0
- package/templates/example/uniapp/uni_modules/uni-scss/package.json +82 -0
- package/templates/example/uniapp/uni_modules/uni-scss/readme.md +4 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/index.scss +7 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_border.scss +3 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_color.scss +66 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_radius.scss +55 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_space.scss +56 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_styles.scss +167 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_text.scss +24 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/setting/_variables.scss +146 -0
- package/templates/example/uniapp/uni_modules/uni-scss/styles/tools/functions.scss +19 -0
- package/templates/example/uniapp/uni_modules/uni-scss/theme.scss +31 -0
- package/templates/example/uniapp/uni_modules/uni-scss/variables.scss +62 -0
- package/templates/example/uniapp/uni_modules/uni-section/changelog.md +2 -0
- package/templates/example/uniapp/uni_modules/uni-section/components/uni-section/uni-section.vue +167 -0
- package/templates/example/uniapp/uni_modules/uni-section/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uni-section/readme.md +8 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/changelog.md +47 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue +60 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js +302 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js +12 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js +195 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js +260 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js +84 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js +270 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue +348 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/components/uni-swipe-action-item/wx.wxs +341 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/package.json +84 -0
- package/templates/example/uniapp/uni_modules/uni-swipe-action/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uni-table/changelog.md +33 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-table/uni-table.vue +460 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-tbody/uni-tbody.vue +34 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-td/uni-td.vue +95 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-th/filter-dropdown.vue +511 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-th/uni-th.vue +295 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-thead/uni-thead.vue +137 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-tr/table-checkbox.vue +179 -0
- package/templates/example/uniapp/uni_modules/uni-table/components/uni-tr/uni-tr.vue +184 -0
- package/templates/example/uniapp/uni_modules/uni-table/i18n/en.json +9 -0
- package/templates/example/uniapp/uni_modules/uni-table/i18n/es.json +9 -0
- package/templates/example/uniapp/uni_modules/uni-table/i18n/fr.json +9 -0
- package/templates/example/uniapp/uni_modules/uni-table/i18n/index.js +12 -0
- package/templates/example/uniapp/uni_modules/uni-table/i18n/zh-Hans.json +9 -0
- package/templates/example/uniapp/uni_modules/uni-table/i18n/zh-Hant.json +9 -0
- package/templates/example/uniapp/uni_modules/uni-table/package.json +84 -0
- package/templates/example/uniapp/uni_modules/uni-table/readme.md +13 -0
- package/templates/example/uniapp/uni_modules/uni-tag/changelog.md +23 -0
- package/templates/example/uniapp/uni_modules/uni-tag/components/uni-tag/uni-tag.vue +252 -0
- package/templates/example/uniapp/uni_modules/uni-tag/package.json +84 -0
- package/templates/example/uniapp/uni_modules/uni-tag/readme.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-action-sheet/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-action-sheet/components/uv-action-sheet/props.js +50 -0
- package/templates/example/uniapp/uni_modules/uv-action-sheet/components/uv-action-sheet/uv-action-sheet.vue +280 -0
- package/templates/example/uniapp/uni_modules/uv-action-sheet/package.json +92 -0
- package/templates/example/uniapp/uni_modules/uv-action-sheet/readme.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-album/changelog.md +10 -0
- package/templates/example/uniapp/uni_modules/uv-album/components/uv-album/uv-album.vue +312 -0
- package/templates/example/uniapp/uni_modules/uv-album/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-album/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-alert/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-alert/components/uv-alert/props.js +45 -0
- package/templates/example/uniapp/uni_modules/uv-alert/components/uv-alert/uv-alert.vue +246 -0
- package/templates/example/uniapp/uni_modules/uv-alert/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-alert/readme.md +15 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/components/uv-avatar/props.js +80 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/components/uv-avatar/uv-avatar.vue +175 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/components/uv-avatar-group/props.js +53 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/components/uv-avatar-group/uv-avatar-group.vue +106 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-avatar/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-back-top/changelog.md +8 -0
- package/templates/example/uniapp/uni_modules/uv-back-top/components/uv-back-top/props.js +58 -0
- package/templates/example/uniapp/uni_modules/uv-back-top/components/uv-back-top/uv-back-top.vue +116 -0
- package/templates/example/uniapp/uni_modules/uv-back-top/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-back-top/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-badge/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-badge/components/uv-badge/props.js +73 -0
- package/templates/example/uniapp/uni_modules/uv-badge/components/uv-badge/uv-badge.vue +176 -0
- package/templates/example/uniapp/uni_modules/uv-badge/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-badge/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-button/changelog.md +33 -0
- package/templates/example/uniapp/uni_modules/uv-button/components/uv-button/nvue.scss +46 -0
- package/templates/example/uniapp/uni_modules/uv-button/components/uv-button/props.js +163 -0
- package/templates/example/uniapp/uni_modules/uv-button/components/uv-button/uv-button.vue +528 -0
- package/templates/example/uniapp/uni_modules/uv-button/components/uv-button/vue.scss +93 -0
- package/templates/example/uniapp/uni_modules/uv-button/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-button/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/changelog.md +16 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/components/uv-calendar/calendar.js +546 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/components/uv-calendar/header.vue +104 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/components/uv-calendar/month.vue +616 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/components/uv-calendar/props.js +145 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/components/uv-calendar/uv-calendar.vue +390 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-calendar/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/changelog.md +40 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/calendar-body.vue +376 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/calendar-item.vue +248 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/calendar.js +546 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/i18n/en.json +12 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/i18n/index.js +8 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/i18n/zh-Hans.json +12 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/i18n/zh-Hant.json +12 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/util.js +435 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/components/uv-calendars/uv-calendars.vue +452 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-calendars/readme.md +23 -0
- package/templates/example/uniapp/uni_modules/uv-cell/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-cell/components/uv-cell/props.js +116 -0
- package/templates/example/uniapp/uni_modules/uv-cell/components/uv-cell/uv-cell.vue +209 -0
- package/templates/example/uniapp/uni_modules/uv-cell/components/uv-cell-group/props.js +15 -0
- package/templates/example/uniapp/uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.vue +63 -0
- package/templates/example/uniapp/uni_modules/uv-cell/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-cell/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/changelog.md +34 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/components/uv-checkbox/props.js +70 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/components/uv-checkbox/uv-checkbox.vue +370 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/components/uv-checkbox-group/props.js +84 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/components/uv-checkbox-group/uv-checkbox-group.vue +119 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-checkbox/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-code/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-code/components/uv-code/props.js +35 -0
- package/templates/example/uniapp/uni_modules/uv-code/components/uv-code/uv-code.vue +136 -0
- package/templates/example/uniapp/uni_modules/uv-code/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-code/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-code-input/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-code-input/components/uv-code-input/props.js +83 -0
- package/templates/example/uniapp/uni_modules/uv-code-input/components/uv-code-input/uv-code-input.vue +272 -0
- package/templates/example/uniapp/uni_modules/uv-code-input/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-code-input/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/changelog.md +5 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/components/uv-collapse/props.js +20 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/components/uv-collapse/uv-collapse.vue +86 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/components/uv-collapse-item/props.js +60 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/components/uv-collapse-item/uv-collapse-item.vue +229 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-collapse/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-count-down/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-count-down/components/uv-count-down/props.js +25 -0
- package/templates/example/uniapp/uni_modules/uv-count-down/components/uv-count-down/utils.js +62 -0
- package/templates/example/uniapp/uni_modules/uv-count-down/components/uv-count-down/uv-count-down.vue +169 -0
- package/templates/example/uniapp/uni_modules/uv-count-down/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-count-down/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-count-to/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-count-to/components/uv-count-to/props.js +60 -0
- package/templates/example/uniapp/uni_modules/uv-count-to/components/uv-count-to/uv-count-to.vue +187 -0
- package/templates/example/uniapp/uni_modules/uv-count-to/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-count-to/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-datetime-picker/changelog.md +34 -0
- package/templates/example/uniapp/uni_modules/uv-datetime-picker/components/uv-datetime-picker/props.js +130 -0
- package/templates/example/uniapp/uni_modules/uv-datetime-picker/components/uv-datetime-picker/uv-datetime-picker.vue +360 -0
- package/templates/example/uniapp/uni_modules/uv-datetime-picker/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-datetime-picker/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-divider/changelog.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-divider/components/uv-divider/props.js +45 -0
- package/templates/example/uniapp/uni_modules/uv-divider/components/uv-divider/uv-divider.vue +113 -0
- package/templates/example/uniapp/uni_modules/uv-divider/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-divider/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-drop-down/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-drop-down/components/uv-drop-down/uv-drop-down.vue +135 -0
- package/templates/example/uniapp/uni_modules/uv-drop-down/components/uv-drop-down-item/uv-drop-down-item.vue +169 -0
- package/templates/example/uniapp/uni_modules/uv-drop-down/components/uv-drop-down-popup/uv-drop-down-popup.vue +242 -0
- package/templates/example/uniapp/uni_modules/uv-drop-down/package.json +91 -0
- package/templates/example/uniapp/uni_modules/uv-drop-down/readme.md +23 -0
- package/templates/example/uniapp/uni_modules/uv-empty/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-empty/components/uv-empty/props.js +60 -0
- package/templates/example/uniapp/uni_modules/uv-empty/components/uv-empty/uv-empty.vue +126 -0
- package/templates/example/uniapp/uni_modules/uv-empty/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-empty/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-form/changelog.md +23 -0
- package/templates/example/uniapp/uni_modules/uv-form/components/uv-form/props.js +46 -0
- package/templates/example/uniapp/uni_modules/uv-form/components/uv-form/uv-form.vue +209 -0
- package/templates/example/uniapp/uni_modules/uv-form/components/uv-form/valid.js +1343 -0
- package/templates/example/uniapp/uni_modules/uv-form/components/uv-form-item/props.js +49 -0
- package/templates/example/uniapp/uni_modules/uv-form/components/uv-form-item/uv-form-item.vue +226 -0
- package/templates/example/uniapp/uni_modules/uv-form/package.json +93 -0
- package/templates/example/uniapp/uni_modules/uv-form/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-gap/changelog.md +5 -0
- package/templates/example/uniapp/uni_modules/uv-gap/components/uv-gap/props.js +25 -0
- package/templates/example/uniapp/uni_modules/uv-gap/components/uv-gap/uv-gap.vue +36 -0
- package/templates/example/uniapp/uni_modules/uv-gap/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-gap/readme.md +12 -0
- package/templates/example/uniapp/uni_modules/uv-grid/changelog.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-grid/components/uv-grid/props.js +20 -0
- package/templates/example/uniapp/uni_modules/uv-grid/components/uv-grid/uv-grid.vue +100 -0
- package/templates/example/uniapp/uni_modules/uv-grid/components/uv-grid-item/props.js +15 -0
- package/templates/example/uniapp/uni_modules/uv-grid/components/uv-grid-item/uv-grid-item.vue +226 -0
- package/templates/example/uniapp/uni_modules/uv-grid/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-grid/readme.md +17 -0
- package/templates/example/uniapp/uni_modules/uv-icon/changelog.md +31 -0
- package/templates/example/uniapp/uni_modules/uv-icon/components/uv-icon/icons.js +160 -0
- package/templates/example/uniapp/uni_modules/uv-icon/components/uv-icon/props.js +90 -0
- package/templates/example/uniapp/uni_modules/uv-icon/components/uv-icon/uv-icon.vue +226 -0
- package/templates/example/uniapp/uni_modules/uv-icon/components/uv-icon/uvicons.ttf +0 -0
- package/templates/example/uniapp/uni_modules/uv-icon/package.json +83 -0
- package/templates/example/uniapp/uni_modules/uv-icon/readme.md +15 -0
- package/templates/example/uniapp/uni_modules/uv-image/changelog.md +36 -0
- package/templates/example/uniapp/uni_modules/uv-image/components/uv-image/props.js +95 -0
- package/templates/example/uniapp/uni_modules/uv-image/components/uv-image/uv-image.vue +287 -0
- package/templates/example/uniapp/uni_modules/uv-image/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-image/readme.md +15 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/changelog.md +18 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/components/uv-index-anchor/props.js +30 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/components/uv-index-anchor/uv-index-anchor.vue +98 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/components/uv-index-item/uv-index-item.vue +87 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/components/uv-index-list/props.js +30 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/components/uv-index-list/uv-index-list.vue +461 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-index-list/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-input/changelog.md +29 -0
- package/templates/example/uniapp/uni_modules/uv-input/components/uv-input/props.js +175 -0
- package/templates/example/uniapp/uni_modules/uv-input/components/uv-input/uv-input.vue +348 -0
- package/templates/example/uniapp/uni_modules/uv-input/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-input/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/changelog.md +17 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/components/uv-keyboard/props.js +95 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/components/uv-keyboard/uv-keyboard.vue +180 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/components/uv-keyboard-car/props.js +24 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/components/uv-keyboard-car/uv-keyboard-car.vue +347 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/components/uv-keyboard-number/props.js +19 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/components/uv-keyboard-number/uv-keyboard-number.vue +201 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-keyboard/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-line/changelog.md +5 -0
- package/templates/example/uniapp/uni_modules/uv-line/components/uv-line/props.js +34 -0
- package/templates/example/uniapp/uni_modules/uv-line/components/uv-line/uv-line.vue +60 -0
- package/templates/example/uniapp/uni_modules/uv-line/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-line/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-line-progress/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-line-progress/components/uv-line-progress/props.js +29 -0
- package/templates/example/uniapp/uni_modules/uv-line-progress/components/uv-line-progress/uv-line-progress.vue +146 -0
- package/templates/example/uniapp/uni_modules/uv-line-progress/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-line-progress/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-link/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-link/components/uv-link/props.js +40 -0
- package/templates/example/uniapp/uni_modules/uv-link/components/uv-link/uv-link.vue +83 -0
- package/templates/example/uniapp/uni_modules/uv-link/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-link/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-list/changelog.md +25 -0
- package/templates/example/uniapp/uni_modules/uv-list/components/uv-list/uv-list.vue +147 -0
- package/templates/example/uniapp/uni_modules/uv-list/components/uv-list-item/uv-list-item.vue +535 -0
- package/templates/example/uniapp/uni_modules/uv-list/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-list/readme.md +27 -0
- package/templates/example/uniapp/uni_modules/uv-load-more/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-load-more/components/uv-load-more/props.js +95 -0
- package/templates/example/uniapp/uni_modules/uv-load-more/components/uv-load-more/uv-load-more.vue +152 -0
- package/templates/example/uniapp/uni_modules/uv-load-more/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-load-more/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-loading-icon/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-loading-icon/components/uv-loading-icon/props.js +67 -0
- package/templates/example/uniapp/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue +347 -0
- package/templates/example/uniapp/uni_modules/uv-loading-icon/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-loading-icon/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-loading-page/changelog.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-loading-page/components/uv-loading-page/props.js +55 -0
- package/templates/example/uniapp/uni_modules/uv-loading-page/components/uv-loading-page/uv-loading-page.vue +96 -0
- package/templates/example/uniapp/uni_modules/uv-loading-page/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-loading-page/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-modal/changelog.md +28 -0
- package/templates/example/uniapp/uni_modules/uv-modal/components/uv-modal/props.js +90 -0
- package/templates/example/uniapp/uni_modules/uv-modal/components/uv-modal/uv-modal.vue +245 -0
- package/templates/example/uniapp/uni_modules/uv-modal/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-modal/readme.md +23 -0
- package/templates/example/uniapp/uni_modules/uv-navbar/changelog.md +17 -0
- package/templates/example/uniapp/uni_modules/uv-navbar/components/uv-navbar/props.js +89 -0
- package/templates/example/uniapp/uni_modules/uv-navbar/components/uv-navbar/uv-navbar.vue +245 -0
- package/templates/example/uniapp/uni_modules/uv-navbar/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-navbar/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-no-network/changelog.md +5 -0
- package/templates/example/uniapp/uni_modules/uv-no-network/components/uv-no-network/props.js +20 -0
- package/templates/example/uniapp/uni_modules/uv-no-network/components/uv-no-network/uv-no-network.vue +222 -0
- package/templates/example/uniapp/uni_modules/uv-no-network/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-no-network/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/changelog.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/components/uv-column-notice/props.js +61 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue +176 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/components/uv-notice-bar/props.js +76 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/components/uv-notice-bar/uv-notice-bar.vue +110 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/components/uv-row-notice/props.js +40 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue +341 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-notice-bar/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-notify/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-notify/components/uv-notify/props.js +45 -0
- package/templates/example/uniapp/uni_modules/uv-notify/components/uv-notify/uv-notify.vue +220 -0
- package/templates/example/uniapp/uni_modules/uv-notify/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-notify/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-number-box/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-number-box/components/uv-number-box/props.js +113 -0
- package/templates/example/uniapp/uni_modules/uv-number-box/components/uv-number-box/uv-number-box.vue +395 -0
- package/templates/example/uniapp/uni_modules/uv-number-box/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-number-box/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-overlay/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-overlay/components/uv-overlay/props.js +25 -0
- package/templates/example/uniapp/uni_modules/uv-overlay/components/uv-overlay/uv-overlay.vue +85 -0
- package/templates/example/uniapp/uni_modules/uv-overlay/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-overlay/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-parse/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-parse/components/uv-parse/node/node.vue +576 -0
- package/templates/example/uniapp/uni_modules/uv-parse/components/uv-parse/parser.js +1335 -0
- package/templates/example/uniapp/uni_modules/uv-parse/components/uv-parse/uv-parse.vue +498 -0
- package/templates/example/uniapp/uni_modules/uv-parse/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-parse/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-parse/static/app-plus/uv-parse/js/handler.js +224 -0
- package/templates/example/uniapp/uni_modules/uv-parse/static/app-plus/uv-parse/js/uni.webview.min.js +19 -0
- package/templates/example/uniapp/uni_modules/uv-parse/static/app-plus/uv-parse/local.html +1 -0
- package/templates/example/uniapp/uni_modules/uv-pick-color/changelog.md +18 -0
- package/templates/example/uniapp/uni_modules/uv-pick-color/components/uv-pick-color/colors.js +217 -0
- package/templates/example/uniapp/uni_modules/uv-pick-color/components/uv-pick-color/props.js +47 -0
- package/templates/example/uniapp/uni_modules/uv-pick-color/components/uv-pick-color/uv-pick-color.vue +551 -0
- package/templates/example/uniapp/uni_modules/uv-pick-color/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-pick-color/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-picker/changelog.md +33 -0
- package/templates/example/uniapp/uni_modules/uv-picker/components/uv-picker/props.js +95 -0
- package/templates/example/uniapp/uni_modules/uv-picker/components/uv-picker/uv-picker.vue +330 -0
- package/templates/example/uniapp/uni_modules/uv-picker/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-picker/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-popup/changelog.md +18 -0
- package/templates/example/uniapp/uni_modules/uv-popup/components/uv-popup/keypress.js +45 -0
- package/templates/example/uniapp/uni_modules/uv-popup/components/uv-popup/uv-popup.vue +539 -0
- package/templates/example/uniapp/uni_modules/uv-popup/package.json +92 -0
- package/templates/example/uniapp/uni_modules/uv-popup/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/cache.js +1 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/bridge/bridge-weex.js +241 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-2d/FillStyleLinearGradient.js +18 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-2d/FillStylePattern.js +8 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-2d/FillStyleRadialGradient.js +17 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-2d/RenderingContext.js +666 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/ActiveInfo.js +11 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Buffer.js +21 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Framebuffer.js +21 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/GLenum.js +298 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/GLmethod.js +142 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/GLtype.js +23 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Program.js +21 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Renderbuffer.js +21 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/RenderingContext.js +1191 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Shader.js +22 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/ShaderPrecisionFormat.js +11 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Texture.js +22 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/UniformLocation.js +22 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/classUtils.js +3 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/env/canvas.js +74 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/env/image.js +96 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/env/tool.js +24 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/index.js +39 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/props.js +85 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/qrcode.js +34 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/queue.js +41 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.vue +1038 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-qrcode/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-radio/changelog.md +31 -0
- package/templates/example/uniapp/uni_modules/uv-radio/components/uv-radio/props.js +65 -0
- package/templates/example/uniapp/uni_modules/uv-radio/components/uv-radio/uv-radio.vue +348 -0
- package/templates/example/uniapp/uni_modules/uv-radio/components/uv-radio-group/props.js +89 -0
- package/templates/example/uniapp/uni_modules/uv-radio/components/uv-radio-group/uv-radio-group.vue +115 -0
- package/templates/example/uniapp/uni_modules/uv-radio/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-radio/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-rate/changelog.md +17 -0
- package/templates/example/uniapp/uni_modules/uv-rate/components/uv-rate/props.js +73 -0
- package/templates/example/uniapp/uni_modules/uv-rate/components/uv-rate/uv-rate.vue +274 -0
- package/templates/example/uniapp/uni_modules/uv-rate/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-rate/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-read-more/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-read-more/components/uv-read-more/props.js +62 -0
- package/templates/example/uniapp/uni_modules/uv-read-more/components/uv-read-more/uv-read-more.vue +162 -0
- package/templates/example/uniapp/uni_modules/uv-read-more/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-read-more/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-row/changelog.md +5 -0
- package/templates/example/uniapp/uni_modules/uv-row/components/uv-col/props.js +30 -0
- package/templates/example/uniapp/uni_modules/uv-row/components/uv-col/uv-col.vue +165 -0
- package/templates/example/uniapp/uni_modules/uv-row/components/uv-row/props.js +20 -0
- package/templates/example/uniapp/uni_modules/uv-row/components/uv-row/uv-row.vue +95 -0
- package/templates/example/uniapp/uni_modules/uv-row/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-row/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-safe-bottom/changelog.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-safe-bottom/components/uv-safe-bottom/uv-safe-bottom.vue +67 -0
- package/templates/example/uniapp/uni_modules/uv-safe-bottom/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-safe-bottom/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/changelog.md +12 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/components/uv-scroll-list/nvue.js +29 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/components/uv-scroll-list/props.js +35 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/components/uv-scroll-list/scrollWxs.wxs +51 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/components/uv-scroll-list/uv-scroll-list.vue +218 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-scroll-list/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-search/changelog.md +25 -0
- package/templates/example/uniapp/uni_modules/uv-search/components/uv-search/props.js +127 -0
- package/templates/example/uniapp/uni_modules/uv-search/components/uv-search/uv-search.vue +311 -0
- package/templates/example/uniapp/uni_modules/uv-search/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-search/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-skeleton/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-skeleton/components/uv-skeleton/props.js +65 -0
- package/templates/example/uniapp/uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.vue +250 -0
- package/templates/example/uniapp/uni_modules/uv-skeleton/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-skeleton/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-skeletons/changelog.md +4 -0
- package/templates/example/uniapp/uni_modules/uv-skeletons/components/uv-skeletons/uv-skeletons.vue +247 -0
- package/templates/example/uniapp/uni_modules/uv-skeletons/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-skeletons/readme.md +23 -0
- package/templates/example/uniapp/uni_modules/uv-slider/changelog.md +9 -0
- package/templates/example/uniapp/uni_modules/uv-slider/components/uv-slider/props.js +58 -0
- package/templates/example/uniapp/uni_modules/uv-slider/components/uv-slider/uv-slider.vue +58 -0
- package/templates/example/uniapp/uni_modules/uv-slider/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-slider/readme.md +15 -0
- package/templates/example/uniapp/uni_modules/uv-status-bar/changelog.md +7 -0
- package/templates/example/uniapp/uni_modules/uv-status-bar/components/uv-status-bar/props.js +8 -0
- package/templates/example/uniapp/uni_modules/uv-status-bar/components/uv-status-bar/uv-status-bar.vue +54 -0
- package/templates/example/uniapp/uni_modules/uv-status-bar/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-status-bar/readme.md +10 -0
- package/templates/example/uniapp/uni_modules/uv-steps/changelog.md +10 -0
- package/templates/example/uniapp/uni_modules/uv-steps/components/uv-steps/props.js +40 -0
- package/templates/example/uniapp/uni_modules/uv-steps/components/uv-steps/uv-steps.vue +83 -0
- package/templates/example/uniapp/uni_modules/uv-steps/components/uv-steps-item/props.js +25 -0
- package/templates/example/uniapp/uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.vue +347 -0
- package/templates/example/uniapp/uni_modules/uv-steps/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-steps/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-sticky/changelog.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-sticky/components/uv-sticky/props.js +41 -0
- package/templates/example/uniapp/uni_modules/uv-sticky/components/uv-sticky/uv-sticky.vue +223 -0
- package/templates/example/uniapp/uni_modules/uv-sticky/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-sticky/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-subsection/changelog.md +10 -0
- package/templates/example/uniapp/uni_modules/uv-subsection/components/uv-subsection/props.js +54 -0
- package/templates/example/uniapp/uni_modules/uv-subsection/components/uv-subsection/uv-subsection.vue +269 -0
- package/templates/example/uniapp/uni_modules/uv-subsection/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-subsection/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/changelog.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action/props.js +10 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action/uv-swipe-action.vue +65 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/index - backup.wxs +256 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/index.wxs +225 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/nvue - backup.js +264 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/nvue.js +182 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/props.js +40 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/uv-swipe-action-item.vue +200 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/components/uv-swipe-action-item/wxs.js +15 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-swipe-action/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/changelog.md +16 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/components/uv-swiper/props.js +136 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/components/uv-swiper/uv-swiper.vue +263 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/components/uv-swiper-indicator/props.js +30 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/components/uv-swiper-indicator/uv-swiper-indicator.vue +112 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-swiper/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-switch/changelog.md +14 -0
- package/templates/example/uniapp/uni_modules/uv-switch/components/uv-switch/props.js +58 -0
- package/templates/example/uniapp/uni_modules/uv-switch/components/uv-switch/uv-switch.vue +192 -0
- package/templates/example/uniapp/uni_modules/uv-switch/package.json +88 -0
- package/templates/example/uniapp/uni_modules/uv-switch/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/changelog.md +14 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/components/uv-tabbar/props.js +50 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/components/uv-tabbar/uv-tabbar.vue +146 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/components/uv-tabbar-item/props.js +40 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/components/uv-tabbar-item/uv-tabbar-item.vue +146 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-tabbar/readme.md +21 -0
- package/templates/example/uniapp/uni_modules/uv-tabs/changelog.md +22 -0
- package/templates/example/uniapp/uni_modules/uv-tabs/components/uv-tabs/props.js +71 -0
- package/templates/example/uniapp/uni_modules/uv-tabs/components/uv-tabs/uv-tabs.vue +390 -0
- package/templates/example/uniapp/uni_modules/uv-tabs/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-tabs/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-tags/changelog.md +10 -0
- package/templates/example/uniapp/uni_modules/uv-tags/components/uv-tags/props.js +95 -0
- package/templates/example/uniapp/uni_modules/uv-tags/components/uv-tags/uv-tags.vue +379 -0
- package/templates/example/uniapp/uni_modules/uv-tags/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-tags/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-text/changelog.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-text/components/uv-text/props.js +113 -0
- package/templates/example/uniapp/uni_modules/uv-text/components/uv-text/uv-text.vue +218 -0
- package/templates/example/uniapp/uni_modules/uv-text/components/uv-text/value.js +87 -0
- package/templates/example/uniapp/uni_modules/uv-text/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-text/readme.md +17 -0
- package/templates/example/uniapp/uni_modules/uv-textarea/changelog.md +28 -0
- package/templates/example/uniapp/uni_modules/uv-textarea/components/uv-textarea/props.js +138 -0
- package/templates/example/uniapp/uni_modules/uv-textarea/components/uv-textarea/uv-textarea.vue +238 -0
- package/templates/example/uniapp/uni_modules/uv-textarea/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-textarea/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-toast/changelog.md +10 -0
- package/templates/example/uniapp/uni_modules/uv-toast/components/uv-toast/uv-toast.vue +333 -0
- package/templates/example/uniapp/uni_modules/uv-toast/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-toast/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-toolbar/changelog.md +2 -0
- package/templates/example/uniapp/uni_modules/uv-toolbar/components/uv-toolbar/props.js +40 -0
- package/templates/example/uniapp/uni_modules/uv-toolbar/components/uv-toolbar/uv-toolbar.vue +109 -0
- package/templates/example/uniapp/uni_modules/uv-toolbar/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-toolbar/readme.md +31 -0
- package/templates/example/uniapp/uni_modules/uv-tooltip/changelog.md +13 -0
- package/templates/example/uniapp/uni_modules/uv-tooltip/components/uv-tooltip/props.js +60 -0
- package/templates/example/uniapp/uni_modules/uv-tooltip/components/uv-tooltip/uv-tooltip.vue +372 -0
- package/templates/example/uniapp/uni_modules/uv-tooltip/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-tooltip/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-transition/changelog.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-transition/components/uv-transition/createAnimation.js +131 -0
- package/templates/example/uniapp/uni_modules/uv-transition/components/uv-transition/props.js +31 -0
- package/templates/example/uniapp/uni_modules/uv-transition/components/uv-transition/uv-transition.vue +320 -0
- package/templates/example/uniapp/uni_modules/uv-transition/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-transition/readme.md +15 -0
- package/templates/example/uniapp/uni_modules/uv-ui/changelog.md +353 -0
- package/templates/example/uniapp/uni_modules/uv-ui/components/uv-ui/uv-ui.vue +7 -0
- package/templates/example/uniapp/uni_modules/uv-ui/package.json +162 -0
- package/templates/example/uniapp/uni_modules/uv-ui/readme.md +164 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/changelog.md +76 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/components/uv-ui-tools/uv-ui-tools.vue +6 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/index.js +79 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/index.scss +7 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/config/config.js +34 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/css/color.scss +32 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/css/common.scss +100 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/css/components.scss +23 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/css/variable.scss +111 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/css/vue.scss +40 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/colorGradient.js +134 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/debounce.js +29 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/digit.js +167 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/index.js +734 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/platform.js +75 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/test.js +287 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/function/throttle.js +30 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/adapters/index.js +132 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/InterceptorManager.js +51 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/Request.js +201 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/buildFullPath.js +20 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/defaults.js +33 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/dispatchRequest.js +6 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/mergeConfig.js +126 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/core/settle.js +16 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/helpers/buildURL.js +64 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/helpers/combineURLs.js +14 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/helpers/isAbsoluteURL.js +14 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/index.d.ts +197 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/index.js +2 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/utils/clone.js +264 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/luch-request/utils.js +135 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/mixin/button.js +13 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/mixin/mixin.js +172 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js +8 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/mixin/mpShare.js +13 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/mixin/openType.js +47 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/mixin/touch.js +59 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/util/dayjs.js +216 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/libs/util/route.js +126 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/package.json +81 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/readme.md +23 -0
- package/templates/example/uniapp/uni_modules/uv-ui-tools/theme.scss +43 -0
- package/templates/example/uniapp/uni_modules/uv-upload/changelog.md +17 -0
- package/templates/example/uniapp/uni_modules/uv-upload/components/uv-preview-video/uv-preview-video.vue +52 -0
- package/templates/example/uniapp/uni_modules/uv-upload/components/uv-upload/mixin.js +22 -0
- package/templates/example/uniapp/uni_modules/uv-upload/components/uv-upload/props.js +130 -0
- package/templates/example/uniapp/uni_modules/uv-upload/components/uv-upload/utils.js +151 -0
- package/templates/example/uniapp/uni_modules/uv-upload/components/uv-upload/uv-upload.vue +488 -0
- package/templates/example/uniapp/uni_modules/uv-upload/package.json +90 -0
- package/templates/example/uniapp/uni_modules/uv-upload/readme.md +11 -0
- package/templates/example/uniapp/uni_modules/uv-vtabs/changelog.md +20 -0
- package/templates/example/uniapp/uni_modules/uv-vtabs/components/uv-vtabs/props.js +79 -0
- package/templates/example/uniapp/uni_modules/uv-vtabs/components/uv-vtabs/uv-vtabs.vue +438 -0
- package/templates/example/uniapp/uni_modules/uv-vtabs/components/uv-vtabs-item/uv-vtabs-item.vue +68 -0
- package/templates/example/uniapp/uni_modules/uv-vtabs/package.json +87 -0
- package/templates/example/uniapp/uni_modules/uv-vtabs/readme.md +19 -0
- package/templates/example/uniapp/uni_modules/uv-waterfall/changelog.md +24 -0
- package/templates/example/uniapp/uni_modules/uv-waterfall/components/uv-waterfall/props.js +69 -0
- package/templates/example/uniapp/uni_modules/uv-waterfall/components/uv-waterfall/uv-waterfall.vue +265 -0
- package/templates/example/uniapp/uni_modules/uv-waterfall/package.json +89 -0
- package/templates/example/uniapp/uni_modules/uv-waterfall/readme.md +19 -0
- package/templates/example/uniapp/utils/eventBus.js +55 -0
- package/templates/example/uniapp/utils/index.js +304 -0
- package/templates/example/uniapp/utils/markdown.js +139 -0
- package/templates/example/uniapp/utils/push.js +54 -0
- package/templates/package.json +38 -0
- package/templates/prisma/schema.business.prisma +72 -0
- package/templates/scripts/fix-routes-imports.js +23 -0
- package/templates/src/ai-tools.ts +32 -0
- package/templates/src/app.ts +75 -0
- package/templates/src/business/ai/ai.controller.ts +38 -0
- package/templates/src/business/ai/ai.model.ts +37 -0
- package/templates/src/business/ai/ai.service.ts +137 -0
- package/templates/src/business/demo/demo.controller.ts +63 -0
- package/templates/src/business/demo/demo.model.ts +93 -0
- package/templates/src/business/demo/demo.service.ts +54 -0
- package/templates/src/business/notification/channel.ts +273 -0
- package/templates/src/business/notification/notification.controller.ts +175 -0
- package/templates/src/business/notification/notification.model.ts +22 -0
- package/templates/src/business/notification/notification.service.ts +579 -0
- package/templates/src/business/notification/receivers.ts +44 -0
- package/templates/src/business/notification/templates.ts +72 -0
- package/templates/src/business/sysConfig/sysConfig.controller.ts +87 -0
- package/templates/src/business/sysConfig/sysConfig.model.ts +44 -0
- package/templates/src/business/sysConfig/sysConfig.service.ts +32 -0
- package/templates/src/common/decorators.ts +1 -0
- package/templates/src/common/index.ts +8 -0
- package/templates/src/common/types.ts +51 -0
- package/templates/src/config/database.ts +4 -0
- package/templates/src/config/index.ts +2 -0
- package/templates/src/index.ts +40 -0
- package/templates/src/utils/aiClient.ts +1 -0
- package/templates/src/utils/banner.ts +1 -0
- package/templates/src/utils/emailClient.ts +1 -0
- package/templates/src/utils/logger.ts +1 -0
- package/templates/src/utils/redisClient.ts +1 -0
- package/templates/src/utils/smsClient.ts +1 -0
- package/templates/src/utils/unipushClient.ts +1 -0
- package/templates/src/utils/wecom.ts +1 -0
- package/templates/tsconfig.build.json +11 -0
- package/templates/tsconfig.json +21 -0
- package/templates/tsoa.json +29 -0
|
@@ -0,0 +1,1523 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Datepicker v1.0.10
|
|
3
|
+
* https://fengyuanchen.github.io/datepicker
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2014-present Chen Fengyuan
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
*
|
|
8
|
+
* Date: 2020-09-29T14:46:10.983Z
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
(function (global, factory) {
|
|
12
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
|
13
|
+
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
|
14
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
|
|
15
|
+
}(this, (function ($) {
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
|
19
|
+
|
|
20
|
+
function _classCallCheck(instance, Constructor) {
|
|
21
|
+
if (!(instance instanceof Constructor)) {
|
|
22
|
+
throw new TypeError("Cannot call a class as a function");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function _defineProperties(target, props) {
|
|
27
|
+
for (var i = 0; i < props.length; i++) {
|
|
28
|
+
var descriptor = props[i];
|
|
29
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
30
|
+
descriptor.configurable = true;
|
|
31
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
32
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
37
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
38
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
+
return Constructor;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var DEFAULTS = {
|
|
43
|
+
// Show the datepicker automatically when initialized
|
|
44
|
+
autoShow: false,
|
|
45
|
+
// Hide the datepicker automatically when picked
|
|
46
|
+
autoHide: false,
|
|
47
|
+
// Pick the initial date automatically when initialized
|
|
48
|
+
autoPick: false,
|
|
49
|
+
// Enable inline mode
|
|
50
|
+
inline: false,
|
|
51
|
+
// A element (or selector) for putting the datepicker
|
|
52
|
+
container: null,
|
|
53
|
+
// A element (or selector) for triggering the datepicker
|
|
54
|
+
trigger: null,
|
|
55
|
+
// The ISO language code (built-in: en-US)
|
|
56
|
+
language: '',
|
|
57
|
+
// The date string format
|
|
58
|
+
format: 'mm/dd/yyyy',
|
|
59
|
+
// The initial date
|
|
60
|
+
date: null,
|
|
61
|
+
// The start view date
|
|
62
|
+
startDate: null,
|
|
63
|
+
// The end view date
|
|
64
|
+
endDate: null,
|
|
65
|
+
// The start view when initialized
|
|
66
|
+
startView: 0,
|
|
67
|
+
// 0 for days, 1 for months, 2 for years
|
|
68
|
+
// The start day of the week
|
|
69
|
+
// 0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday,
|
|
70
|
+
// 4 for Thursday, 5 for Friday, 6 for Saturday
|
|
71
|
+
weekStart: 0,
|
|
72
|
+
// Show year before month on the datepicker header
|
|
73
|
+
yearFirst: false,
|
|
74
|
+
// A string suffix to the year number.
|
|
75
|
+
yearSuffix: '',
|
|
76
|
+
// Days' name of the week.
|
|
77
|
+
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
78
|
+
// Shorter days' name
|
|
79
|
+
daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
80
|
+
// Shortest days' name
|
|
81
|
+
daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
82
|
+
// Months' name
|
|
83
|
+
months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
84
|
+
// Shorter months' name
|
|
85
|
+
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
86
|
+
// A element tag for each item of years, months and days
|
|
87
|
+
itemTag: 'li',
|
|
88
|
+
// A class (CSS) for muted date item
|
|
89
|
+
mutedClass: 'muted',
|
|
90
|
+
// A class (CSS) for picked date item
|
|
91
|
+
pickedClass: 'picked',
|
|
92
|
+
// A class (CSS) for disabled date item
|
|
93
|
+
disabledClass: 'disabled',
|
|
94
|
+
// A class (CSS) for highlight date item
|
|
95
|
+
highlightedClass: 'highlighted',
|
|
96
|
+
// The template of the datepicker
|
|
97
|
+
template: '<div class="datepicker-container">' + '<div class="datepicker-panel" data-view="years picker">' + '<ul>' + '<li data-view="years prev">‹</li>' + '<li data-view="years current"></li>' + '<li data-view="years next">›</li>' + '</ul>' + '<ul data-view="years"></ul>' + '</div>' + '<div class="datepicker-panel" data-view="months picker">' + '<ul>' + '<li data-view="year prev">‹</li>' + '<li data-view="year current"></li>' + '<li data-view="year next">›</li>' + '</ul>' + '<ul data-view="months"></ul>' + '</div>' + '<div class="datepicker-panel" data-view="days picker">' + '<ul>' + '<li data-view="month prev">‹</li>' + '<li data-view="month current"></li>' + '<li data-view="month next">›</li>' + '</ul>' + '<ul data-view="week"></ul>' + '<ul data-view="days"></ul>' + '</div>' + '</div>',
|
|
98
|
+
// The offset top or bottom of the datepicker from the element
|
|
99
|
+
offset: 10,
|
|
100
|
+
// The `z-index` of the datepicker
|
|
101
|
+
zIndex: 1000,
|
|
102
|
+
// Filter each date item (return `false` to disable a date item)
|
|
103
|
+
filter: null,
|
|
104
|
+
// Event shortcuts
|
|
105
|
+
show: null,
|
|
106
|
+
hide: null,
|
|
107
|
+
pick: null
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var IS_BROWSER = typeof window !== 'undefined';
|
|
111
|
+
var WINDOW = IS_BROWSER ? window : {};
|
|
112
|
+
var IS_TOUCH_DEVICE = IS_BROWSER ? 'ontouchstart' in WINDOW.document.documentElement : false;
|
|
113
|
+
var NAMESPACE = 'datepicker';
|
|
114
|
+
var EVENT_CLICK = "click.".concat(NAMESPACE);
|
|
115
|
+
var EVENT_FOCUS = "focus.".concat(NAMESPACE);
|
|
116
|
+
var EVENT_HIDE = "hide.".concat(NAMESPACE);
|
|
117
|
+
var EVENT_KEYUP = "keyup.".concat(NAMESPACE);
|
|
118
|
+
var EVENT_PICK = "pick.".concat(NAMESPACE);
|
|
119
|
+
var EVENT_RESIZE = "resize.".concat(NAMESPACE);
|
|
120
|
+
var EVENT_SCROLL = "scroll.".concat(NAMESPACE);
|
|
121
|
+
var EVENT_SHOW = "show.".concat(NAMESPACE);
|
|
122
|
+
var EVENT_TOUCH_START = "touchstart.".concat(NAMESPACE);
|
|
123
|
+
var CLASS_HIDE = "".concat(NAMESPACE, "-hide");
|
|
124
|
+
var LANGUAGES = {};
|
|
125
|
+
var VIEWS = {
|
|
126
|
+
DAYS: 0,
|
|
127
|
+
MONTHS: 1,
|
|
128
|
+
YEARS: 2
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var toString = Object.prototype.toString;
|
|
132
|
+
function typeOf(obj) {
|
|
133
|
+
return toString.call(obj).slice(8, -1).toLowerCase();
|
|
134
|
+
}
|
|
135
|
+
function isString(value) {
|
|
136
|
+
return typeof value === 'string';
|
|
137
|
+
}
|
|
138
|
+
var isNaN = Number.isNaN || WINDOW.isNaN;
|
|
139
|
+
function isNumber(value) {
|
|
140
|
+
return typeof value === 'number' && !isNaN(value);
|
|
141
|
+
}
|
|
142
|
+
function isUndefined(value) {
|
|
143
|
+
return typeof value === 'undefined';
|
|
144
|
+
}
|
|
145
|
+
function isDate(value) {
|
|
146
|
+
return typeOf(value) === 'date' && !isNaN(value.getTime());
|
|
147
|
+
}
|
|
148
|
+
function proxy(fn, context) {
|
|
149
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
150
|
+
args[_key - 2] = arguments[_key];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return function () {
|
|
154
|
+
for (var _len2 = arguments.length, args2 = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
155
|
+
args2[_key2] = arguments[_key2];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return fn.apply(context, args.concat(args2));
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function selectorOf(view) {
|
|
162
|
+
return "[data-view=\"".concat(view, "\"]");
|
|
163
|
+
}
|
|
164
|
+
function isLeapYear(year) {
|
|
165
|
+
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
|
166
|
+
}
|
|
167
|
+
function getDaysInMonth(year, month) {
|
|
168
|
+
return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
|
|
169
|
+
}
|
|
170
|
+
function getMinDay(year, month, day) {
|
|
171
|
+
return Math.min(day, getDaysInMonth(year, month));
|
|
172
|
+
}
|
|
173
|
+
var formatParts = /(y|m|d)+/g;
|
|
174
|
+
function parseFormat(format) {
|
|
175
|
+
var source = String(format).toLowerCase();
|
|
176
|
+
var parts = source.match(formatParts);
|
|
177
|
+
|
|
178
|
+
if (!parts || parts.length === 0) {
|
|
179
|
+
throw new Error('Invalid date format.');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
format = {
|
|
183
|
+
source: source,
|
|
184
|
+
parts: parts
|
|
185
|
+
};
|
|
186
|
+
$.each(parts, function (i, part) {
|
|
187
|
+
switch (part) {
|
|
188
|
+
case 'dd':
|
|
189
|
+
case 'd':
|
|
190
|
+
format.hasDay = true;
|
|
191
|
+
break;
|
|
192
|
+
|
|
193
|
+
case 'mm':
|
|
194
|
+
case 'm':
|
|
195
|
+
format.hasMonth = true;
|
|
196
|
+
break;
|
|
197
|
+
|
|
198
|
+
case 'yyyy':
|
|
199
|
+
case 'yy':
|
|
200
|
+
format.hasYear = true;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
return format;
|
|
205
|
+
}
|
|
206
|
+
function getScrollParent(element) {
|
|
207
|
+
var includeHidden = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
208
|
+
var $element = $(element);
|
|
209
|
+
var position = $element.css('position');
|
|
210
|
+
var excludeStaticParent = position === 'absolute';
|
|
211
|
+
var overflowRegex = includeHidden ? /auto|scroll|hidden/ : /auto|scroll/;
|
|
212
|
+
var scrollParent = $element.parents().filter(function (index, parent) {
|
|
213
|
+
var $parent = $(parent);
|
|
214
|
+
|
|
215
|
+
if (excludeStaticParent && $parent.css('position') === 'static') {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return overflowRegex.test($parent.css('overflow') + $parent.css('overflow-y') + $parent.css('overflow-x'));
|
|
220
|
+
}).eq(0);
|
|
221
|
+
return position === 'fixed' || !scrollParent.length ? $(element.ownerDocument || document) : scrollParent;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Add leading zeroes to the given value
|
|
225
|
+
* @param {number} value - The value to add.
|
|
226
|
+
* @param {number} [length=1] - The expected value length.
|
|
227
|
+
* @returns {string} Returns converted value.
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
function addLeadingZero(value) {
|
|
231
|
+
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
232
|
+
var str = String(Math.abs(value));
|
|
233
|
+
var i = str.length;
|
|
234
|
+
var result = '';
|
|
235
|
+
|
|
236
|
+
if (value < 0) {
|
|
237
|
+
result += '-';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
while (i < length) {
|
|
241
|
+
i += 1;
|
|
242
|
+
result += '0';
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return result + str;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
var REGEXP_DIGITS = /\d+/g;
|
|
249
|
+
var methods = {
|
|
250
|
+
// Show the datepicker
|
|
251
|
+
show: function show() {
|
|
252
|
+
if (!this.built) {
|
|
253
|
+
this.build();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (this.shown) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (this.trigger(EVENT_SHOW).isDefaultPrevented()) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
this.shown = true;
|
|
265
|
+
this.$picker.removeClass(CLASS_HIDE).on(EVENT_CLICK, $.proxy(this.click, this));
|
|
266
|
+
this.showView(this.options.startView);
|
|
267
|
+
|
|
268
|
+
if (!this.inline) {
|
|
269
|
+
this.$scrollParent.on(EVENT_SCROLL, $.proxy(this.place, this));
|
|
270
|
+
$(window).on(EVENT_RESIZE, this.onResize = proxy(this.place, this));
|
|
271
|
+
$(document).on(EVENT_CLICK, this.onGlobalClick = proxy(this.globalClick, this));
|
|
272
|
+
$(document).on(EVENT_KEYUP, this.onGlobalKeyup = proxy(this.globalKeyup, this));
|
|
273
|
+
|
|
274
|
+
if (IS_TOUCH_DEVICE) {
|
|
275
|
+
$(document).on(EVENT_TOUCH_START, this.onTouchStart = proxy(this.touchstart, this));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
this.place();
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
// Hide the datepicker
|
|
282
|
+
hide: function hide() {
|
|
283
|
+
if (!this.shown) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (this.trigger(EVENT_HIDE).isDefaultPrevented()) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
this.shown = false;
|
|
292
|
+
this.$picker.addClass(CLASS_HIDE).off(EVENT_CLICK, this.click);
|
|
293
|
+
|
|
294
|
+
if (!this.inline) {
|
|
295
|
+
this.$scrollParent.off(EVENT_SCROLL, this.place);
|
|
296
|
+
$(window).off(EVENT_RESIZE, this.onResize);
|
|
297
|
+
$(document).off(EVENT_CLICK, this.onGlobalClick);
|
|
298
|
+
$(document).off(EVENT_KEYUP, this.onGlobalKeyup);
|
|
299
|
+
|
|
300
|
+
if (IS_TOUCH_DEVICE) {
|
|
301
|
+
$(document).off(EVENT_TOUCH_START, this.onTouchStart);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
toggle: function toggle() {
|
|
306
|
+
if (this.shown) {
|
|
307
|
+
this.hide();
|
|
308
|
+
} else {
|
|
309
|
+
this.show();
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
// Update the datepicker with the current input value
|
|
313
|
+
update: function update() {
|
|
314
|
+
var value = this.getValue();
|
|
315
|
+
|
|
316
|
+
if (value === this.oldValue) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
this.setDate(value, true);
|
|
321
|
+
this.oldValue = value;
|
|
322
|
+
},
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Pick the current date to the element
|
|
326
|
+
*
|
|
327
|
+
* @param {String} _view (private)
|
|
328
|
+
*/
|
|
329
|
+
pick: function pick(_view) {
|
|
330
|
+
var $this = this.$element;
|
|
331
|
+
var date = this.date;
|
|
332
|
+
|
|
333
|
+
if (this.trigger(EVENT_PICK, {
|
|
334
|
+
view: _view || '',
|
|
335
|
+
date: date
|
|
336
|
+
}).isDefaultPrevented()) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
date = this.formatDate(this.date);
|
|
341
|
+
this.setValue(date);
|
|
342
|
+
|
|
343
|
+
if (this.isInput) {
|
|
344
|
+
$this.trigger('input');
|
|
345
|
+
$this.trigger('change');
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
// Reset the datepicker
|
|
349
|
+
reset: function reset() {
|
|
350
|
+
this.setDate(this.initialDate, true);
|
|
351
|
+
this.setValue(this.initialValue);
|
|
352
|
+
|
|
353
|
+
if (this.shown) {
|
|
354
|
+
this.showView(this.options.startView);
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Get the month name with given argument or the current date
|
|
360
|
+
*
|
|
361
|
+
* @param {Number} month (optional)
|
|
362
|
+
* @param {Boolean} shortForm (optional)
|
|
363
|
+
* @return {String} (month name)
|
|
364
|
+
*/
|
|
365
|
+
getMonthName: function getMonthName(month, shortForm) {
|
|
366
|
+
var options = this.options;
|
|
367
|
+
var monthsShort = options.monthsShort;
|
|
368
|
+
var months = options.months;
|
|
369
|
+
|
|
370
|
+
if ($.isNumeric(month)) {
|
|
371
|
+
month = Number(month);
|
|
372
|
+
} else if (isUndefined(shortForm)) {
|
|
373
|
+
shortForm = month;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (shortForm === true) {
|
|
377
|
+
months = monthsShort;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return months[isNumber(month) ? month : this.date.getMonth()];
|
|
381
|
+
},
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Get the day name with given argument or the current date
|
|
385
|
+
*
|
|
386
|
+
* @param {Number} day (optional)
|
|
387
|
+
* @param {Boolean} shortForm (optional)
|
|
388
|
+
* @param {Boolean} min (optional)
|
|
389
|
+
* @return {String} (day name)
|
|
390
|
+
*/
|
|
391
|
+
getDayName: function getDayName(day, shortForm, min) {
|
|
392
|
+
var options = this.options;
|
|
393
|
+
var days = options.days;
|
|
394
|
+
|
|
395
|
+
if ($.isNumeric(day)) {
|
|
396
|
+
day = Number(day);
|
|
397
|
+
} else {
|
|
398
|
+
if (isUndefined(min)) {
|
|
399
|
+
min = shortForm;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if (isUndefined(shortForm)) {
|
|
403
|
+
shortForm = day;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (min) {
|
|
408
|
+
days = options.daysMin;
|
|
409
|
+
} else if (shortForm) {
|
|
410
|
+
days = options.daysShort;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return days[isNumber(day) ? day : this.date.getDay()];
|
|
414
|
+
},
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Get the current date
|
|
418
|
+
*
|
|
419
|
+
* @param {Boolean} formatted (optional)
|
|
420
|
+
* @return {Date|String} (date)
|
|
421
|
+
*/
|
|
422
|
+
getDate: function getDate(formatted) {
|
|
423
|
+
var date = this.date;
|
|
424
|
+
return formatted ? this.formatDate(date) : new Date(date);
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Set the current date with a new date
|
|
429
|
+
*
|
|
430
|
+
* @param {Date} date
|
|
431
|
+
* @param {Boolean} _updated (private)
|
|
432
|
+
*/
|
|
433
|
+
setDate: function setDate(date, _updated) {
|
|
434
|
+
var filter = this.options.filter;
|
|
435
|
+
|
|
436
|
+
if (isDate(date) || isString(date)) {
|
|
437
|
+
date = this.parseDate(date);
|
|
438
|
+
|
|
439
|
+
if ($.isFunction(filter) && filter.call(this.$element, date, 'day') === false) {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
this.date = date;
|
|
444
|
+
this.viewDate = new Date(date);
|
|
445
|
+
|
|
446
|
+
if (!_updated) {
|
|
447
|
+
this.pick();
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (this.built) {
|
|
451
|
+
this.render();
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Set the start view date with a new date
|
|
458
|
+
*
|
|
459
|
+
* @param {Date|string|null} date
|
|
460
|
+
*/
|
|
461
|
+
setStartDate: function setStartDate(date) {
|
|
462
|
+
if (isDate(date) || isString(date)) {
|
|
463
|
+
this.startDate = this.parseDate(date);
|
|
464
|
+
} else {
|
|
465
|
+
this.startDate = null;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (this.built) {
|
|
469
|
+
this.render();
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Set the end view date with a new date
|
|
475
|
+
*
|
|
476
|
+
* @param {Date|string|null} date
|
|
477
|
+
*/
|
|
478
|
+
setEndDate: function setEndDate(date) {
|
|
479
|
+
if (isDate(date) || isString(date)) {
|
|
480
|
+
this.endDate = this.parseDate(date);
|
|
481
|
+
} else {
|
|
482
|
+
this.endDate = null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
if (this.built) {
|
|
486
|
+
this.render();
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Parse a date string with the set date format
|
|
492
|
+
*
|
|
493
|
+
* @param {String} date
|
|
494
|
+
* @return {Date} (parsed date)
|
|
495
|
+
*/
|
|
496
|
+
parseDate: function parseDate(date) {
|
|
497
|
+
var format = this.format;
|
|
498
|
+
var parts = [];
|
|
499
|
+
|
|
500
|
+
if (!isDate(date)) {
|
|
501
|
+
if (isString(date)) {
|
|
502
|
+
parts = date.match(REGEXP_DIGITS) || [];
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
date = date ? new Date(date) : new Date();
|
|
506
|
+
|
|
507
|
+
if (!isDate(date)) {
|
|
508
|
+
date = new Date();
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if (parts.length === format.parts.length) {
|
|
512
|
+
// Set year and month first
|
|
513
|
+
$.each(parts, function (i, part) {
|
|
514
|
+
var value = parseInt(part, 10);
|
|
515
|
+
|
|
516
|
+
switch (format.parts[i]) {
|
|
517
|
+
case 'yy':
|
|
518
|
+
date.setFullYear(2000 + value);
|
|
519
|
+
break;
|
|
520
|
+
|
|
521
|
+
case 'yyyy':
|
|
522
|
+
// Converts 2-digit year to 2000+
|
|
523
|
+
date.setFullYear(part.length === 2 ? 2000 + value : value);
|
|
524
|
+
break;
|
|
525
|
+
|
|
526
|
+
case 'mm':
|
|
527
|
+
case 'm':
|
|
528
|
+
date.setMonth(value - 1);
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
531
|
+
}); // Set day in the last to avoid converting `31/10/2019` to `01/10/2019`
|
|
532
|
+
|
|
533
|
+
$.each(parts, function (i, part) {
|
|
534
|
+
var value = parseInt(part, 10);
|
|
535
|
+
|
|
536
|
+
switch (format.parts[i]) {
|
|
537
|
+
case 'dd':
|
|
538
|
+
case 'd':
|
|
539
|
+
date.setDate(value);
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
} // Ignore hours, minutes, seconds and milliseconds to avoid side effect (#192)
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
548
|
+
},
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Format a date object to a string with the set date format
|
|
552
|
+
*
|
|
553
|
+
* @param {Date} date
|
|
554
|
+
* @return {String} (formatted date)
|
|
555
|
+
*/
|
|
556
|
+
formatDate: function formatDate(date) {
|
|
557
|
+
var format = this.format;
|
|
558
|
+
var formatted = '';
|
|
559
|
+
|
|
560
|
+
if (isDate(date)) {
|
|
561
|
+
var year = date.getFullYear();
|
|
562
|
+
var month = date.getMonth();
|
|
563
|
+
var day = date.getDate();
|
|
564
|
+
var values = {
|
|
565
|
+
d: day,
|
|
566
|
+
dd: addLeadingZero(day, 2),
|
|
567
|
+
m: month + 1,
|
|
568
|
+
mm: addLeadingZero(month + 1, 2),
|
|
569
|
+
yy: String(year).substring(2),
|
|
570
|
+
yyyy: addLeadingZero(year, 4)
|
|
571
|
+
};
|
|
572
|
+
formatted = format.source;
|
|
573
|
+
$.each(format.parts, function (i, part) {
|
|
574
|
+
formatted = formatted.replace(part, values[part]);
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return formatted;
|
|
579
|
+
},
|
|
580
|
+
// Destroy the datepicker and remove the instance from the target element
|
|
581
|
+
destroy: function destroy() {
|
|
582
|
+
this.unbind();
|
|
583
|
+
this.unbuild();
|
|
584
|
+
this.$element.removeData(NAMESPACE);
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
var handlers = {
|
|
589
|
+
click: function click(e) {
|
|
590
|
+
var $target = $(e.target);
|
|
591
|
+
var options = this.options,
|
|
592
|
+
date = this.date,
|
|
593
|
+
viewDate = this.viewDate,
|
|
594
|
+
format = this.format;
|
|
595
|
+
e.stopPropagation();
|
|
596
|
+
e.preventDefault();
|
|
597
|
+
|
|
598
|
+
if ($target.hasClass('disabled')) {
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
var view = $target.data('view');
|
|
603
|
+
var viewYear = viewDate.getFullYear();
|
|
604
|
+
var viewMonth = viewDate.getMonth();
|
|
605
|
+
var viewDay = viewDate.getDate();
|
|
606
|
+
|
|
607
|
+
switch (view) {
|
|
608
|
+
case 'years prev':
|
|
609
|
+
case 'years next':
|
|
610
|
+
{
|
|
611
|
+
viewYear = view === 'years prev' ? viewYear - 10 : viewYear + 10;
|
|
612
|
+
viewDate.setFullYear(viewYear);
|
|
613
|
+
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
614
|
+
this.renderYears();
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
case 'year prev':
|
|
619
|
+
case 'year next':
|
|
620
|
+
viewYear = view === 'year prev' ? viewYear - 1 : viewYear + 1;
|
|
621
|
+
viewDate.setFullYear(viewYear);
|
|
622
|
+
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
623
|
+
this.renderMonths();
|
|
624
|
+
break;
|
|
625
|
+
|
|
626
|
+
case 'year current':
|
|
627
|
+
if (format.hasYear) {
|
|
628
|
+
this.showView(VIEWS.YEARS);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
break;
|
|
632
|
+
|
|
633
|
+
case 'year picked':
|
|
634
|
+
if (format.hasMonth) {
|
|
635
|
+
this.showView(VIEWS.MONTHS);
|
|
636
|
+
} else {
|
|
637
|
+
$target.siblings(".".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'year');
|
|
638
|
+
this.hideView();
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
this.pick('year');
|
|
642
|
+
break;
|
|
643
|
+
|
|
644
|
+
case 'year':
|
|
645
|
+
viewYear = parseInt($target.text(), 10); // Set date first to avoid month changing (#195)
|
|
646
|
+
|
|
647
|
+
date.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
648
|
+
date.setFullYear(viewYear);
|
|
649
|
+
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
650
|
+
viewDate.setFullYear(viewYear);
|
|
651
|
+
|
|
652
|
+
if (format.hasMonth) {
|
|
653
|
+
this.showView(VIEWS.MONTHS);
|
|
654
|
+
} else {
|
|
655
|
+
$target.addClass(options.pickedClass).data('view', 'year picked').siblings(".".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'year');
|
|
656
|
+
this.hideView();
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
this.pick('year');
|
|
660
|
+
break;
|
|
661
|
+
|
|
662
|
+
case 'month prev':
|
|
663
|
+
case 'month next':
|
|
664
|
+
viewMonth = view === 'month prev' ? viewMonth - 1 : viewMonth + 1;
|
|
665
|
+
|
|
666
|
+
if (viewMonth < 0) {
|
|
667
|
+
viewYear -= 1;
|
|
668
|
+
viewMonth += 12;
|
|
669
|
+
} else if (viewMonth > 11) {
|
|
670
|
+
viewYear += 1;
|
|
671
|
+
viewMonth -= 12;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
viewDate.setFullYear(viewYear);
|
|
675
|
+
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
676
|
+
viewDate.setMonth(viewMonth);
|
|
677
|
+
this.renderDays();
|
|
678
|
+
break;
|
|
679
|
+
|
|
680
|
+
case 'month current':
|
|
681
|
+
if (format.hasMonth) {
|
|
682
|
+
this.showView(VIEWS.MONTHS);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
break;
|
|
686
|
+
|
|
687
|
+
case 'month picked':
|
|
688
|
+
if (format.hasDay) {
|
|
689
|
+
this.showView(VIEWS.DAYS);
|
|
690
|
+
} else {
|
|
691
|
+
$target.siblings(".".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'month');
|
|
692
|
+
this.hideView();
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
this.pick('month');
|
|
696
|
+
break;
|
|
697
|
+
|
|
698
|
+
case 'month':
|
|
699
|
+
viewMonth = $.inArray($target.text(), options.monthsShort);
|
|
700
|
+
date.setFullYear(viewYear); // Set date before month to avoid month changing (#195)
|
|
701
|
+
|
|
702
|
+
date.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
703
|
+
date.setMonth(viewMonth);
|
|
704
|
+
viewDate.setFullYear(viewYear);
|
|
705
|
+
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
|
|
706
|
+
viewDate.setMonth(viewMonth);
|
|
707
|
+
|
|
708
|
+
if (format.hasDay) {
|
|
709
|
+
this.showView(VIEWS.DAYS);
|
|
710
|
+
} else {
|
|
711
|
+
$target.addClass(options.pickedClass).data('view', 'month picked').siblings(".".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'month');
|
|
712
|
+
this.hideView();
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
this.pick('month');
|
|
716
|
+
break;
|
|
717
|
+
|
|
718
|
+
case 'day prev':
|
|
719
|
+
case 'day next':
|
|
720
|
+
case 'day':
|
|
721
|
+
if (view === 'day prev') {
|
|
722
|
+
viewMonth -= 1;
|
|
723
|
+
} else if (view === 'day next') {
|
|
724
|
+
viewMonth += 1;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
viewDay = parseInt($target.text(), 10); // Set date to 1 to avoid month changing (#195)
|
|
728
|
+
|
|
729
|
+
date.setDate(1);
|
|
730
|
+
date.setFullYear(viewYear);
|
|
731
|
+
date.setMonth(viewMonth);
|
|
732
|
+
date.setDate(viewDay);
|
|
733
|
+
viewDate.setDate(1);
|
|
734
|
+
viewDate.setFullYear(viewYear);
|
|
735
|
+
viewDate.setMonth(viewMonth);
|
|
736
|
+
viewDate.setDate(viewDay);
|
|
737
|
+
this.renderDays();
|
|
738
|
+
|
|
739
|
+
if (view === 'day') {
|
|
740
|
+
this.hideView();
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
this.pick('day');
|
|
744
|
+
break;
|
|
745
|
+
|
|
746
|
+
case 'day picked':
|
|
747
|
+
this.hideView();
|
|
748
|
+
this.pick('day');
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
globalClick: function globalClick(_ref) {
|
|
753
|
+
var target = _ref.target;
|
|
754
|
+
var element = this.element,
|
|
755
|
+
$trigger = this.$trigger;
|
|
756
|
+
var trigger = $trigger[0];
|
|
757
|
+
var hidden = true;
|
|
758
|
+
|
|
759
|
+
while (target !== document) {
|
|
760
|
+
if (target === trigger || target === element) {
|
|
761
|
+
hidden = false;
|
|
762
|
+
break;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
target = target.parentNode;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
if (hidden) {
|
|
769
|
+
this.hide();
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
keyup: function keyup() {
|
|
773
|
+
this.update();
|
|
774
|
+
},
|
|
775
|
+
globalKeyup: function globalKeyup(_ref2) {
|
|
776
|
+
var target = _ref2.target,
|
|
777
|
+
key = _ref2.key,
|
|
778
|
+
keyCode = _ref2.keyCode;
|
|
779
|
+
|
|
780
|
+
if (this.isInput && target !== this.element && this.shown && (key === 'Tab' || keyCode === 9)) {
|
|
781
|
+
this.hide();
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
touchstart: function touchstart(_ref3) {
|
|
785
|
+
var target = _ref3.target;
|
|
786
|
+
|
|
787
|
+
// Emulate click in touch devices to support hiding the picker automatically (#197).
|
|
788
|
+
if (this.isInput && target !== this.element && !$.contains(this.$picker[0], target)) {
|
|
789
|
+
this.hide();
|
|
790
|
+
this.element.blur();
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
var render = {
|
|
796
|
+
render: function render() {
|
|
797
|
+
this.renderYears();
|
|
798
|
+
this.renderMonths();
|
|
799
|
+
this.renderDays();
|
|
800
|
+
},
|
|
801
|
+
renderWeek: function renderWeek() {
|
|
802
|
+
var _this = this;
|
|
803
|
+
|
|
804
|
+
var items = [];
|
|
805
|
+
var _this$options = this.options,
|
|
806
|
+
weekStart = _this$options.weekStart,
|
|
807
|
+
daysMin = _this$options.daysMin;
|
|
808
|
+
weekStart = parseInt(weekStart, 10) % 7;
|
|
809
|
+
daysMin = daysMin.slice(weekStart).concat(daysMin.slice(0, weekStart));
|
|
810
|
+
$.each(daysMin, function (i, day) {
|
|
811
|
+
items.push(_this.createItem({
|
|
812
|
+
text: day
|
|
813
|
+
}));
|
|
814
|
+
});
|
|
815
|
+
this.$week.html(items.join(''));
|
|
816
|
+
},
|
|
817
|
+
renderYears: function renderYears() {
|
|
818
|
+
var options = this.options,
|
|
819
|
+
startDate = this.startDate,
|
|
820
|
+
endDate = this.endDate;
|
|
821
|
+
var disabledClass = options.disabledClass,
|
|
822
|
+
filter = options.filter,
|
|
823
|
+
yearSuffix = options.yearSuffix;
|
|
824
|
+
var viewYear = this.viewDate.getFullYear();
|
|
825
|
+
var now = new Date();
|
|
826
|
+
var thisYear = now.getFullYear();
|
|
827
|
+
var year = this.date.getFullYear();
|
|
828
|
+
var start = -5;
|
|
829
|
+
var end = 6;
|
|
830
|
+
var items = [];
|
|
831
|
+
var prevDisabled = false;
|
|
832
|
+
var nextDisabled = false;
|
|
833
|
+
var i;
|
|
834
|
+
|
|
835
|
+
for (i = start; i <= end; i += 1) {
|
|
836
|
+
var date = new Date(viewYear + i, 1, 1);
|
|
837
|
+
var disabled = false;
|
|
838
|
+
|
|
839
|
+
if (startDate) {
|
|
840
|
+
disabled = date.getFullYear() < startDate.getFullYear();
|
|
841
|
+
|
|
842
|
+
if (i === start) {
|
|
843
|
+
prevDisabled = disabled;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
if (!disabled && endDate) {
|
|
848
|
+
disabled = date.getFullYear() > endDate.getFullYear();
|
|
849
|
+
|
|
850
|
+
if (i === end) {
|
|
851
|
+
nextDisabled = disabled;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
if (!disabled && filter) {
|
|
856
|
+
disabled = filter.call(this.$element, date, 'year') === false;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
var picked = viewYear + i === year;
|
|
860
|
+
var view = picked ? 'year picked' : 'year';
|
|
861
|
+
items.push(this.createItem({
|
|
862
|
+
picked: picked,
|
|
863
|
+
disabled: disabled,
|
|
864
|
+
text: viewYear + i,
|
|
865
|
+
view: disabled ? 'year disabled' : view,
|
|
866
|
+
highlighted: date.getFullYear() === thisYear
|
|
867
|
+
}));
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
this.$yearsPrev.toggleClass(disabledClass, prevDisabled);
|
|
871
|
+
this.$yearsNext.toggleClass(disabledClass, nextDisabled);
|
|
872
|
+
this.$yearsCurrent.toggleClass(disabledClass, true).html("".concat(viewYear + start + yearSuffix, " - ").concat(viewYear + end).concat(yearSuffix));
|
|
873
|
+
this.$years.html(items.join(''));
|
|
874
|
+
},
|
|
875
|
+
renderMonths: function renderMonths() {
|
|
876
|
+
var options = this.options,
|
|
877
|
+
startDate = this.startDate,
|
|
878
|
+
endDate = this.endDate,
|
|
879
|
+
viewDate = this.viewDate;
|
|
880
|
+
var disabledClass = options.disabledClass || '';
|
|
881
|
+
var months = options.monthsShort;
|
|
882
|
+
var filter = $.isFunction(options.filter) && options.filter;
|
|
883
|
+
var viewYear = viewDate.getFullYear();
|
|
884
|
+
var now = new Date();
|
|
885
|
+
var thisYear = now.getFullYear();
|
|
886
|
+
var thisMonth = now.getMonth();
|
|
887
|
+
var year = this.date.getFullYear();
|
|
888
|
+
var month = this.date.getMonth();
|
|
889
|
+
var items = [];
|
|
890
|
+
var prevDisabled = false;
|
|
891
|
+
var nextDisabled = false;
|
|
892
|
+
var i;
|
|
893
|
+
|
|
894
|
+
for (i = 0; i <= 11; i += 1) {
|
|
895
|
+
var date = new Date(viewYear, i, 1);
|
|
896
|
+
var disabled = false;
|
|
897
|
+
|
|
898
|
+
if (startDate) {
|
|
899
|
+
prevDisabled = date.getFullYear() === startDate.getFullYear();
|
|
900
|
+
disabled = prevDisabled && date.getMonth() < startDate.getMonth();
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
if (!disabled && endDate) {
|
|
904
|
+
nextDisabled = date.getFullYear() === endDate.getFullYear();
|
|
905
|
+
disabled = nextDisabled && date.getMonth() > endDate.getMonth();
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
if (!disabled && filter) {
|
|
909
|
+
disabled = filter.call(this.$element, date, 'month') === false;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
var picked = viewYear === year && i === month;
|
|
913
|
+
var view = picked ? 'month picked' : 'month';
|
|
914
|
+
items.push(this.createItem({
|
|
915
|
+
disabled: disabled,
|
|
916
|
+
picked: picked,
|
|
917
|
+
highlighted: viewYear === thisYear && date.getMonth() === thisMonth,
|
|
918
|
+
index: i,
|
|
919
|
+
text: months[i],
|
|
920
|
+
view: disabled ? 'month disabled' : view
|
|
921
|
+
}));
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
this.$yearPrev.toggleClass(disabledClass, prevDisabled);
|
|
925
|
+
this.$yearNext.toggleClass(disabledClass, nextDisabled);
|
|
926
|
+
this.$yearCurrent.toggleClass(disabledClass, prevDisabled && nextDisabled).html(viewYear + options.yearSuffix || '');
|
|
927
|
+
this.$months.html(items.join(''));
|
|
928
|
+
},
|
|
929
|
+
renderDays: function renderDays() {
|
|
930
|
+
var $element = this.$element,
|
|
931
|
+
options = this.options,
|
|
932
|
+
startDate = this.startDate,
|
|
933
|
+
endDate = this.endDate,
|
|
934
|
+
viewDate = this.viewDate,
|
|
935
|
+
currentDate = this.date;
|
|
936
|
+
var disabledClass = options.disabledClass,
|
|
937
|
+
filter = options.filter,
|
|
938
|
+
months = options.months,
|
|
939
|
+
weekStart = options.weekStart,
|
|
940
|
+
yearSuffix = options.yearSuffix;
|
|
941
|
+
var viewYear = viewDate.getFullYear();
|
|
942
|
+
var viewMonth = viewDate.getMonth();
|
|
943
|
+
var now = new Date();
|
|
944
|
+
var thisYear = now.getFullYear();
|
|
945
|
+
var thisMonth = now.getMonth();
|
|
946
|
+
var thisDay = now.getDate();
|
|
947
|
+
var year = currentDate.getFullYear();
|
|
948
|
+
var month = currentDate.getMonth();
|
|
949
|
+
var day = currentDate.getDate();
|
|
950
|
+
var length;
|
|
951
|
+
var i;
|
|
952
|
+
var n; // Days of prev month
|
|
953
|
+
// -----------------------------------------------------------------------
|
|
954
|
+
|
|
955
|
+
var prevItems = [];
|
|
956
|
+
var prevViewYear = viewYear;
|
|
957
|
+
var prevViewMonth = viewMonth;
|
|
958
|
+
var prevDisabled = false;
|
|
959
|
+
|
|
960
|
+
if (viewMonth === 0) {
|
|
961
|
+
prevViewYear -= 1;
|
|
962
|
+
prevViewMonth = 11;
|
|
963
|
+
} else {
|
|
964
|
+
prevViewMonth -= 1;
|
|
965
|
+
} // The length of the days of prev month
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
length = getDaysInMonth(prevViewYear, prevViewMonth); // The first day of current month
|
|
969
|
+
|
|
970
|
+
var firstDay = new Date(viewYear, viewMonth, 1); // The visible length of the days of prev month
|
|
971
|
+
// [0,1,2,3,4,5,6] - [0,1,2,3,4,5,6] => [-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6]
|
|
972
|
+
|
|
973
|
+
n = firstDay.getDay() - parseInt(weekStart, 10) % 7; // [-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6] => [1,2,3,4,5,6,7]
|
|
974
|
+
|
|
975
|
+
if (n <= 0) {
|
|
976
|
+
n += 7;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
if (startDate) {
|
|
980
|
+
prevDisabled = firstDay.getTime() <= startDate.getTime();
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
for (i = length - (n - 1); i <= length; i += 1) {
|
|
984
|
+
var prevViewDate = new Date(prevViewYear, prevViewMonth, i);
|
|
985
|
+
var disabled = false;
|
|
986
|
+
|
|
987
|
+
if (startDate) {
|
|
988
|
+
disabled = prevViewDate.getTime() < startDate.getTime();
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
if (!disabled && filter) {
|
|
992
|
+
disabled = filter.call($element, prevViewDate, 'day') === false;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
prevItems.push(this.createItem({
|
|
996
|
+
disabled: disabled,
|
|
997
|
+
highlighted: prevViewYear === thisYear && prevViewMonth === thisMonth && prevViewDate.getDate() === thisDay,
|
|
998
|
+
muted: true,
|
|
999
|
+
picked: prevViewYear === year && prevViewMonth === month && i === day,
|
|
1000
|
+
text: i,
|
|
1001
|
+
view: 'day prev'
|
|
1002
|
+
}));
|
|
1003
|
+
} // Days of next month
|
|
1004
|
+
// -----------------------------------------------------------------------
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
var nextItems = [];
|
|
1008
|
+
var nextViewYear = viewYear;
|
|
1009
|
+
var nextViewMonth = viewMonth;
|
|
1010
|
+
var nextDisabled = false;
|
|
1011
|
+
|
|
1012
|
+
if (viewMonth === 11) {
|
|
1013
|
+
nextViewYear += 1;
|
|
1014
|
+
nextViewMonth = 0;
|
|
1015
|
+
} else {
|
|
1016
|
+
nextViewMonth += 1;
|
|
1017
|
+
} // The length of the days of current month
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
length = getDaysInMonth(viewYear, viewMonth); // The visible length of next month (42 means 6 rows and 7 columns)
|
|
1021
|
+
|
|
1022
|
+
n = 42 - (prevItems.length + length); // The last day of current month
|
|
1023
|
+
|
|
1024
|
+
var lastDate = new Date(viewYear, viewMonth, length);
|
|
1025
|
+
|
|
1026
|
+
if (endDate) {
|
|
1027
|
+
nextDisabled = lastDate.getTime() >= endDate.getTime();
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
for (i = 1; i <= n; i += 1) {
|
|
1031
|
+
var date = new Date(nextViewYear, nextViewMonth, i);
|
|
1032
|
+
var picked = nextViewYear === year && nextViewMonth === month && i === day;
|
|
1033
|
+
var _disabled = false;
|
|
1034
|
+
|
|
1035
|
+
if (endDate) {
|
|
1036
|
+
_disabled = date.getTime() > endDate.getTime();
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
if (!_disabled && filter) {
|
|
1040
|
+
_disabled = filter.call($element, date, 'day') === false;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
nextItems.push(this.createItem({
|
|
1044
|
+
disabled: _disabled,
|
|
1045
|
+
picked: picked,
|
|
1046
|
+
highlighted: nextViewYear === thisYear && nextViewMonth === thisMonth && date.getDate() === thisDay,
|
|
1047
|
+
muted: true,
|
|
1048
|
+
text: i,
|
|
1049
|
+
view: 'day next'
|
|
1050
|
+
}));
|
|
1051
|
+
} // Days of current month
|
|
1052
|
+
// -----------------------------------------------------------------------
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
var items = [];
|
|
1056
|
+
|
|
1057
|
+
for (i = 1; i <= length; i += 1) {
|
|
1058
|
+
var _date = new Date(viewYear, viewMonth, i);
|
|
1059
|
+
|
|
1060
|
+
var _disabled2 = false;
|
|
1061
|
+
|
|
1062
|
+
if (startDate) {
|
|
1063
|
+
_disabled2 = _date.getTime() < startDate.getTime();
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
if (!_disabled2 && endDate) {
|
|
1067
|
+
_disabled2 = _date.getTime() > endDate.getTime();
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
if (!_disabled2 && filter) {
|
|
1071
|
+
_disabled2 = filter.call($element, _date, 'day') === false;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
var _picked = viewYear === year && viewMonth === month && i === day;
|
|
1075
|
+
|
|
1076
|
+
var view = _picked ? 'day picked' : 'day';
|
|
1077
|
+
items.push(this.createItem({
|
|
1078
|
+
disabled: _disabled2,
|
|
1079
|
+
picked: _picked,
|
|
1080
|
+
highlighted: viewYear === thisYear && viewMonth === thisMonth && _date.getDate() === thisDay,
|
|
1081
|
+
text: i,
|
|
1082
|
+
view: _disabled2 ? 'day disabled' : view
|
|
1083
|
+
}));
|
|
1084
|
+
} // Render days picker
|
|
1085
|
+
// -----------------------------------------------------------------------
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
this.$monthPrev.toggleClass(disabledClass, prevDisabled);
|
|
1089
|
+
this.$monthNext.toggleClass(disabledClass, nextDisabled);
|
|
1090
|
+
this.$monthCurrent.toggleClass(disabledClass, prevDisabled && nextDisabled).html(options.yearFirst ? "".concat(viewYear + yearSuffix, " ").concat(months[viewMonth]) : "".concat(months[viewMonth], " ").concat(viewYear).concat(yearSuffix));
|
|
1091
|
+
this.$days.html(prevItems.join('') + items.join('') + nextItems.join(''));
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
var CLASS_TOP_LEFT = "".concat(NAMESPACE, "-top-left");
|
|
1096
|
+
var CLASS_TOP_RIGHT = "".concat(NAMESPACE, "-top-right");
|
|
1097
|
+
var CLASS_BOTTOM_LEFT = "".concat(NAMESPACE, "-bottom-left");
|
|
1098
|
+
var CLASS_BOTTOM_RIGHT = "".concat(NAMESPACE, "-bottom-right");
|
|
1099
|
+
var CLASS_PLACEMENTS = [CLASS_TOP_LEFT, CLASS_TOP_RIGHT, CLASS_BOTTOM_LEFT, CLASS_BOTTOM_RIGHT].join(' ');
|
|
1100
|
+
|
|
1101
|
+
var Datepicker = /*#__PURE__*/function () {
|
|
1102
|
+
function Datepicker(element) {
|
|
1103
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1104
|
+
|
|
1105
|
+
_classCallCheck(this, Datepicker);
|
|
1106
|
+
|
|
1107
|
+
this.$element = $(element);
|
|
1108
|
+
this.element = element;
|
|
1109
|
+
this.options = $.extend({}, DEFAULTS, LANGUAGES[options.language], $.isPlainObject(options) && options);
|
|
1110
|
+
this.$scrollParent = getScrollParent(element, true);
|
|
1111
|
+
this.built = false;
|
|
1112
|
+
this.shown = false;
|
|
1113
|
+
this.isInput = false;
|
|
1114
|
+
this.inline = false;
|
|
1115
|
+
this.initialValue = '';
|
|
1116
|
+
this.initialDate = null;
|
|
1117
|
+
this.startDate = null;
|
|
1118
|
+
this.endDate = null;
|
|
1119
|
+
this.init();
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
_createClass(Datepicker, [{
|
|
1123
|
+
key: "init",
|
|
1124
|
+
value: function init() {
|
|
1125
|
+
var $this = this.$element,
|
|
1126
|
+
options = this.options;
|
|
1127
|
+
var startDate = options.startDate,
|
|
1128
|
+
endDate = options.endDate,
|
|
1129
|
+
date = options.date;
|
|
1130
|
+
this.$trigger = $(options.trigger);
|
|
1131
|
+
this.isInput = $this.is('input') || $this.is('textarea');
|
|
1132
|
+
this.inline = options.inline && (options.container || !this.isInput);
|
|
1133
|
+
this.format = parseFormat(options.format);
|
|
1134
|
+
var initialValue = this.getValue();
|
|
1135
|
+
this.initialValue = initialValue;
|
|
1136
|
+
this.oldValue = initialValue;
|
|
1137
|
+
date = this.parseDate(date || initialValue);
|
|
1138
|
+
|
|
1139
|
+
if (startDate) {
|
|
1140
|
+
startDate = this.parseDate(startDate);
|
|
1141
|
+
|
|
1142
|
+
if (date.getTime() < startDate.getTime()) {
|
|
1143
|
+
date = new Date(startDate);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
this.startDate = startDate;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
if (endDate) {
|
|
1150
|
+
endDate = this.parseDate(endDate);
|
|
1151
|
+
|
|
1152
|
+
if (startDate && endDate.getTime() < startDate.getTime()) {
|
|
1153
|
+
endDate = new Date(startDate);
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (date.getTime() > endDate.getTime()) {
|
|
1157
|
+
date = new Date(endDate);
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
this.endDate = endDate;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
this.date = date;
|
|
1164
|
+
this.viewDate = new Date(date);
|
|
1165
|
+
this.initialDate = new Date(this.date);
|
|
1166
|
+
this.bind();
|
|
1167
|
+
|
|
1168
|
+
if (options.autoShow || this.inline) {
|
|
1169
|
+
this.show();
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
if (options.autoPick) {
|
|
1173
|
+
this.pick();
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
}, {
|
|
1177
|
+
key: "build",
|
|
1178
|
+
value: function build() {
|
|
1179
|
+
if (this.built) {
|
|
1180
|
+
return;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
this.built = true;
|
|
1184
|
+
var $this = this.$element,
|
|
1185
|
+
options = this.options;
|
|
1186
|
+
var $picker = $(options.template);
|
|
1187
|
+
this.$picker = $picker;
|
|
1188
|
+
this.$week = $picker.find(selectorOf('week')); // Years view
|
|
1189
|
+
|
|
1190
|
+
this.$yearsPicker = $picker.find(selectorOf('years picker'));
|
|
1191
|
+
this.$yearsPrev = $picker.find(selectorOf('years prev'));
|
|
1192
|
+
this.$yearsNext = $picker.find(selectorOf('years next'));
|
|
1193
|
+
this.$yearsCurrent = $picker.find(selectorOf('years current'));
|
|
1194
|
+
this.$years = $picker.find(selectorOf('years')); // Months view
|
|
1195
|
+
|
|
1196
|
+
this.$monthsPicker = $picker.find(selectorOf('months picker'));
|
|
1197
|
+
this.$yearPrev = $picker.find(selectorOf('year prev'));
|
|
1198
|
+
this.$yearNext = $picker.find(selectorOf('year next'));
|
|
1199
|
+
this.$yearCurrent = $picker.find(selectorOf('year current'));
|
|
1200
|
+
this.$months = $picker.find(selectorOf('months')); // Days view
|
|
1201
|
+
|
|
1202
|
+
this.$daysPicker = $picker.find(selectorOf('days picker'));
|
|
1203
|
+
this.$monthPrev = $picker.find(selectorOf('month prev'));
|
|
1204
|
+
this.$monthNext = $picker.find(selectorOf('month next'));
|
|
1205
|
+
this.$monthCurrent = $picker.find(selectorOf('month current'));
|
|
1206
|
+
this.$days = $picker.find(selectorOf('days'));
|
|
1207
|
+
|
|
1208
|
+
if (this.inline) {
|
|
1209
|
+
$(options.container || $this).append($picker.addClass("".concat(NAMESPACE, "-inline")));
|
|
1210
|
+
} else {
|
|
1211
|
+
$(document.body).append($picker.addClass("".concat(NAMESPACE, "-dropdown")));
|
|
1212
|
+
$picker.addClass(CLASS_HIDE).css({
|
|
1213
|
+
zIndex: parseInt(options.zIndex, 10)
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
this.renderWeek();
|
|
1218
|
+
}
|
|
1219
|
+
}, {
|
|
1220
|
+
key: "unbuild",
|
|
1221
|
+
value: function unbuild() {
|
|
1222
|
+
if (!this.built) {
|
|
1223
|
+
return;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
this.built = false;
|
|
1227
|
+
this.$picker.remove();
|
|
1228
|
+
}
|
|
1229
|
+
}, {
|
|
1230
|
+
key: "bind",
|
|
1231
|
+
value: function bind() {
|
|
1232
|
+
var options = this.options,
|
|
1233
|
+
$this = this.$element;
|
|
1234
|
+
|
|
1235
|
+
if ($.isFunction(options.show)) {
|
|
1236
|
+
$this.on(EVENT_SHOW, options.show);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if ($.isFunction(options.hide)) {
|
|
1240
|
+
$this.on(EVENT_HIDE, options.hide);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
if ($.isFunction(options.pick)) {
|
|
1244
|
+
$this.on(EVENT_PICK, options.pick);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
if (this.isInput) {
|
|
1248
|
+
$this.on(EVENT_KEYUP, $.proxy(this.keyup, this));
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
if (!this.inline) {
|
|
1252
|
+
if (options.trigger) {
|
|
1253
|
+
this.$trigger.on(EVENT_CLICK, $.proxy(this.toggle, this));
|
|
1254
|
+
} else if (this.isInput) {
|
|
1255
|
+
$this.on(EVENT_FOCUS, $.proxy(this.show, this));
|
|
1256
|
+
} else {
|
|
1257
|
+
$this.on(EVENT_CLICK, $.proxy(this.show, this));
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}, {
|
|
1262
|
+
key: "unbind",
|
|
1263
|
+
value: function unbind() {
|
|
1264
|
+
var $this = this.$element,
|
|
1265
|
+
options = this.options;
|
|
1266
|
+
|
|
1267
|
+
if ($.isFunction(options.show)) {
|
|
1268
|
+
$this.off(EVENT_SHOW, options.show);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
if ($.isFunction(options.hide)) {
|
|
1272
|
+
$this.off(EVENT_HIDE, options.hide);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
if ($.isFunction(options.pick)) {
|
|
1276
|
+
$this.off(EVENT_PICK, options.pick);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
if (this.isInput) {
|
|
1280
|
+
$this.off(EVENT_KEYUP, this.keyup);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
if (!this.inline) {
|
|
1284
|
+
if (options.trigger) {
|
|
1285
|
+
this.$trigger.off(EVENT_CLICK, this.toggle);
|
|
1286
|
+
} else if (this.isInput) {
|
|
1287
|
+
$this.off(EVENT_FOCUS, this.show);
|
|
1288
|
+
} else {
|
|
1289
|
+
$this.off(EVENT_CLICK, this.show);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}, {
|
|
1294
|
+
key: "showView",
|
|
1295
|
+
value: function showView(view) {
|
|
1296
|
+
var $yearsPicker = this.$yearsPicker,
|
|
1297
|
+
$monthsPicker = this.$monthsPicker,
|
|
1298
|
+
$daysPicker = this.$daysPicker,
|
|
1299
|
+
format = this.format;
|
|
1300
|
+
|
|
1301
|
+
if (format.hasYear || format.hasMonth || format.hasDay) {
|
|
1302
|
+
switch (Number(view)) {
|
|
1303
|
+
case VIEWS.YEARS:
|
|
1304
|
+
$monthsPicker.addClass(CLASS_HIDE);
|
|
1305
|
+
$daysPicker.addClass(CLASS_HIDE);
|
|
1306
|
+
|
|
1307
|
+
if (format.hasYear) {
|
|
1308
|
+
this.renderYears();
|
|
1309
|
+
$yearsPicker.removeClass(CLASS_HIDE);
|
|
1310
|
+
this.place();
|
|
1311
|
+
} else {
|
|
1312
|
+
this.showView(VIEWS.DAYS);
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
break;
|
|
1316
|
+
|
|
1317
|
+
case VIEWS.MONTHS:
|
|
1318
|
+
$yearsPicker.addClass(CLASS_HIDE);
|
|
1319
|
+
$daysPicker.addClass(CLASS_HIDE);
|
|
1320
|
+
|
|
1321
|
+
if (format.hasMonth) {
|
|
1322
|
+
this.renderMonths();
|
|
1323
|
+
$monthsPicker.removeClass(CLASS_HIDE);
|
|
1324
|
+
this.place();
|
|
1325
|
+
} else {
|
|
1326
|
+
this.showView(VIEWS.YEARS);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
break;
|
|
1330
|
+
// case VIEWS.DAYS:
|
|
1331
|
+
|
|
1332
|
+
default:
|
|
1333
|
+
$yearsPicker.addClass(CLASS_HIDE);
|
|
1334
|
+
$monthsPicker.addClass(CLASS_HIDE);
|
|
1335
|
+
|
|
1336
|
+
if (format.hasDay) {
|
|
1337
|
+
this.renderDays();
|
|
1338
|
+
$daysPicker.removeClass(CLASS_HIDE);
|
|
1339
|
+
this.place();
|
|
1340
|
+
} else {
|
|
1341
|
+
this.showView(VIEWS.MONTHS);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
}, {
|
|
1348
|
+
key: "hideView",
|
|
1349
|
+
value: function hideView() {
|
|
1350
|
+
if (!this.inline && this.options.autoHide) {
|
|
1351
|
+
this.hide();
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}, {
|
|
1355
|
+
key: "place",
|
|
1356
|
+
value: function place() {
|
|
1357
|
+
if (this.inline) {
|
|
1358
|
+
return;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
var $this = this.$element,
|
|
1362
|
+
options = this.options,
|
|
1363
|
+
$picker = this.$picker;
|
|
1364
|
+
var containerWidth = $(document).outerWidth();
|
|
1365
|
+
var containerHeight = $(document).outerHeight();
|
|
1366
|
+
var elementWidth = $this.outerWidth();
|
|
1367
|
+
var elementHeight = $this.outerHeight();
|
|
1368
|
+
var width = $picker.width();
|
|
1369
|
+
var height = $picker.height();
|
|
1370
|
+
|
|
1371
|
+
var _$this$offset = $this.offset(),
|
|
1372
|
+
left = _$this$offset.left,
|
|
1373
|
+
top = _$this$offset.top;
|
|
1374
|
+
|
|
1375
|
+
var offset = parseFloat(options.offset);
|
|
1376
|
+
var placement = CLASS_TOP_LEFT;
|
|
1377
|
+
|
|
1378
|
+
if (isNaN(offset)) {
|
|
1379
|
+
offset = 10;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
if (top > height && top + elementHeight + height > containerHeight) {
|
|
1383
|
+
top -= height + offset;
|
|
1384
|
+
placement = CLASS_BOTTOM_LEFT;
|
|
1385
|
+
} else {
|
|
1386
|
+
top += elementHeight + offset;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
if (left + width > containerWidth) {
|
|
1390
|
+
left += elementWidth - width;
|
|
1391
|
+
placement = placement.replace('left', 'right');
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
$picker.removeClass(CLASS_PLACEMENTS).addClass(placement).css({
|
|
1395
|
+
top: top,
|
|
1396
|
+
left: left
|
|
1397
|
+
});
|
|
1398
|
+
} // A shortcut for triggering custom events
|
|
1399
|
+
|
|
1400
|
+
}, {
|
|
1401
|
+
key: "trigger",
|
|
1402
|
+
value: function trigger(type, data) {
|
|
1403
|
+
var e = $.Event(type, data);
|
|
1404
|
+
this.$element.trigger(e);
|
|
1405
|
+
return e;
|
|
1406
|
+
}
|
|
1407
|
+
}, {
|
|
1408
|
+
key: "createItem",
|
|
1409
|
+
value: function createItem(data) {
|
|
1410
|
+
var options = this.options;
|
|
1411
|
+
var itemTag = options.itemTag;
|
|
1412
|
+
var item = {
|
|
1413
|
+
text: '',
|
|
1414
|
+
view: '',
|
|
1415
|
+
muted: false,
|
|
1416
|
+
picked: false,
|
|
1417
|
+
disabled: false,
|
|
1418
|
+
highlighted: false
|
|
1419
|
+
};
|
|
1420
|
+
var classes = [];
|
|
1421
|
+
$.extend(item, data);
|
|
1422
|
+
|
|
1423
|
+
if (item.muted) {
|
|
1424
|
+
classes.push(options.mutedClass);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
if (item.highlighted) {
|
|
1428
|
+
classes.push(options.highlightedClass);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
if (item.picked) {
|
|
1432
|
+
classes.push(options.pickedClass);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
if (item.disabled) {
|
|
1436
|
+
classes.push(options.disabledClass);
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
return "<".concat(itemTag, " class=\"").concat(classes.join(' '), "\" data-view=\"").concat(item.view, "\">").concat(item.text, "</").concat(itemTag, ">");
|
|
1440
|
+
}
|
|
1441
|
+
}, {
|
|
1442
|
+
key: "getValue",
|
|
1443
|
+
value: function getValue() {
|
|
1444
|
+
var $this = this.$element;
|
|
1445
|
+
return this.isInput ? $this.val() : $this.text();
|
|
1446
|
+
}
|
|
1447
|
+
}, {
|
|
1448
|
+
key: "setValue",
|
|
1449
|
+
value: function setValue() {
|
|
1450
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
1451
|
+
var $this = this.$element;
|
|
1452
|
+
|
|
1453
|
+
if (this.isInput) {
|
|
1454
|
+
$this.val(value);
|
|
1455
|
+
} else if (!this.inline || this.options.container) {
|
|
1456
|
+
$this.text(value);
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
}], [{
|
|
1460
|
+
key: "setDefaults",
|
|
1461
|
+
value: function setDefaults() {
|
|
1462
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1463
|
+
$.extend(DEFAULTS, LANGUAGES[options.language], $.isPlainObject(options) && options);
|
|
1464
|
+
}
|
|
1465
|
+
}]);
|
|
1466
|
+
|
|
1467
|
+
return Datepicker;
|
|
1468
|
+
}();
|
|
1469
|
+
|
|
1470
|
+
if ($.extend) {
|
|
1471
|
+
$.extend(Datepicker.prototype, render, handlers, methods);
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
if ($.fn) {
|
|
1475
|
+
var AnotherDatepicker = $.fn.datepicker;
|
|
1476
|
+
|
|
1477
|
+
$.fn.datepicker = function jQueryDatepicker(option) {
|
|
1478
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1479
|
+
args[_key - 1] = arguments[_key];
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
var result;
|
|
1483
|
+
this.each(function (i, element) {
|
|
1484
|
+
var $element = $(element);
|
|
1485
|
+
var isDestroy = option === 'destroy';
|
|
1486
|
+
var datepicker = $element.data(NAMESPACE);
|
|
1487
|
+
|
|
1488
|
+
if (!datepicker) {
|
|
1489
|
+
if (isDestroy) {
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
|
|
1494
|
+
datepicker = new Datepicker(element, options);
|
|
1495
|
+
$element.data(NAMESPACE, datepicker);
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
if (isString(option)) {
|
|
1499
|
+
var fn = datepicker[option];
|
|
1500
|
+
|
|
1501
|
+
if ($.isFunction(fn)) {
|
|
1502
|
+
result = fn.apply(datepicker, args);
|
|
1503
|
+
|
|
1504
|
+
if (isDestroy) {
|
|
1505
|
+
$element.removeData(NAMESPACE);
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
return !isUndefined(result) ? result : this;
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
$.fn.datepicker.Constructor = Datepicker;
|
|
1514
|
+
$.fn.datepicker.languages = LANGUAGES;
|
|
1515
|
+
$.fn.datepicker.setDefaults = Datepicker.setDefaults;
|
|
1516
|
+
|
|
1517
|
+
$.fn.datepicker.noConflict = function noConflict() {
|
|
1518
|
+
$.fn.datepicker = AnotherDatepicker;
|
|
1519
|
+
return this;
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
})));
|