easy-component-ui 2.1.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +162 -90
- package/dist/assets/icon.css +1 -0
- package/dist/components/Base.js +872 -0
- package/dist/components/ea-alert.js +196 -0
- package/dist/components/ea-avatar.js +159 -0
- package/dist/components/ea-backtop.js +136 -0
- package/dist/components/ea-badge.js +144 -0
- package/dist/components/ea-breadcrumb.js +148 -0
- package/dist/components/ea-button.js +261 -0
- package/dist/components/ea-calendar.js +10 -0
- package/dist/components/ea-calendar2.js +673 -0
- package/dist/components/ea-card.js +85 -0
- package/dist/components/ea-carousel.js +374 -0
- package/dist/components/ea-checkbox.js +446 -0
- package/dist/components/ea-collapse.js +293 -0
- package/dist/components/ea-color-picker.js +888 -0
- package/dist/components/ea-container.js +177 -0
- package/dist/components/ea-countdown.js +121 -0
- package/dist/components/ea-date-picker.js +649 -0
- package/dist/components/ea-descriptions.js +411 -0
- package/dist/components/ea-dialog.js +249 -0
- package/dist/components/ea-drawer.js +194 -0
- package/dist/components/ea-dropdown.js +228 -0
- package/dist/components/ea-empty.js +85 -0
- package/dist/components/ea-icon.js +68 -0
- package/dist/components/ea-image-preview.js +488 -0
- package/dist/components/ea-image.js +302 -0
- package/dist/components/ea-infinite-scroll.js +109 -0
- package/dist/components/ea-input-number.js +367 -0
- package/dist/components/ea-input.js +588 -0
- package/dist/components/ea-layout.js +125 -0
- package/dist/components/ea-link.js +95 -0
- package/dist/components/ea-loading.js +151 -0
- package/dist/components/ea-menu.js +417 -0
- package/dist/components/ea-message-box.js +624 -0
- package/dist/components/ea-message.js +251 -0
- package/dist/components/ea-notification.js +331 -0
- package/dist/components/ea-overlay.js +161 -0
- package/dist/components/ea-page-header.js +108 -0
- package/dist/components/ea-pagination.js +480 -0
- package/dist/components/ea-popconfirm.js +220 -0
- package/dist/components/ea-popover.js +123 -0
- package/dist/components/ea-popper.js +203 -0
- package/dist/components/ea-progress.js +269 -0
- package/dist/components/ea-radio.js +364 -0
- package/dist/components/ea-rate.js +241 -0
- package/dist/components/ea-result.js +100 -0
- package/dist/components/ea-scrollbar.js +235 -0
- package/dist/components/ea-segmented.js +215 -0
- package/dist/components/ea-select.js +598 -0
- package/dist/components/ea-skeleton.js +246 -0
- package/dist/components/ea-slider.js +421 -0
- package/dist/components/ea-space.js +109 -0
- package/dist/components/ea-splitter.js +217 -0
- package/dist/components/ea-statistic.js +6 -0
- package/dist/components/ea-statistic2.js +83 -0
- package/dist/components/ea-steps.js +312 -0
- package/dist/components/ea-switch.js +271 -0
- package/dist/components/ea-table.js +1007 -0
- package/dist/components/ea-tabs.js +501 -0
- package/dist/components/ea-tag.js +234 -0
- package/dist/components/ea-text.js +103 -0
- package/dist/components/ea-time-picker.js +514 -0
- package/dist/components/ea-timeline.js +186 -0
- package/dist/components/ea-tooltip.js +121 -0
- package/dist/components/ea-tour.js +544 -0
- package/dist/components/ea-transfer.js +949 -0
- package/dist/components/ea-tree.js +1088 -0
- package/dist/components/index.js +61 -0
- package/dist/core/FormBase.js +238 -0
- package/dist/css/ea-alert.style.js +4 -0
- package/dist/css/ea-aside.style.js +4 -0
- package/dist/css/ea-avatar.style.js +4 -0
- package/dist/css/ea-backtop.style.js +4 -0
- package/dist/css/ea-badge.style.js +4 -0
- package/dist/css/ea-breadcrumb-item.style.js +4 -0
- package/dist/css/ea-breadcrumb.style.js +4 -0
- package/dist/css/ea-button-group.style.js +4 -0
- package/dist/css/ea-button.style.js +4 -0
- package/dist/css/ea-calendar.style.js +4 -0
- package/dist/css/ea-card.style.js +4 -0
- package/dist/css/ea-carousel-item.style.js +4 -0
- package/dist/css/ea-carousel.style.js +4 -0
- package/dist/css/ea-check-tag.style.js +4 -0
- package/dist/css/ea-checkbox-group.style.js +4 -0
- package/dist/css/ea-checkbox.style.js +4 -0
- package/dist/css/ea-col.style.js +4 -0
- package/dist/css/ea-collapse-item.style.js +4 -0
- package/dist/css/ea-collapse.style.js +4 -0
- package/dist/css/ea-color-picker-panel.style.js +4 -0
- package/dist/css/ea-color-picker.style.js +4 -0
- package/dist/css/ea-container.style.js +4 -0
- package/dist/css/ea-date-picker.style.js +4 -0
- package/dist/css/ea-descriptions-item.style.js +4 -0
- package/dist/css/ea-descriptions.style.js +4 -0
- package/dist/css/ea-dialog.style.js +4 -0
- package/dist/css/ea-drawer.style.js +4 -0
- package/dist/css/ea-dropdown-item.style.js +4 -0
- package/dist/css/ea-dropdown-menu.style.js +4 -0
- package/dist/css/ea-dropdown.style.js +4 -0
- package/dist/css/ea-empty.style.js +4 -0
- package/dist/css/ea-footer.style.js +4 -0
- package/dist/css/ea-header.style.js +4 -0
- package/dist/css/ea-icon.style.js +4 -0
- package/dist/css/ea-image-preview.style.js +4 -0
- package/dist/css/ea-image.style.js +4 -0
- package/dist/css/ea-infinite-scroll.style.js +4 -0
- package/dist/css/ea-input-number.style.js +4 -0
- package/dist/css/ea-input.style.js +4 -0
- package/dist/css/ea-link.style.js +4 -0
- package/dist/css/ea-main.style.js +4 -0
- package/dist/css/ea-menu-item-group.style.js +4 -0
- package/dist/css/ea-menu-item.style.js +4 -0
- package/dist/css/ea-menu.style.js +4 -0
- package/dist/css/ea-message-box.style.js +4 -0
- package/dist/css/ea-message.style.js +4 -0
- package/dist/css/ea-notification.style.js +4 -0
- package/dist/css/ea-option-gropu.style.js +4 -0
- package/dist/css/ea-option.style.js +4 -0
- package/dist/css/ea-overlay.style.js +4 -0
- package/dist/css/ea-page-header.style.js +4 -0
- package/dist/css/ea-pagination.style.js +4 -0
- package/dist/css/ea-popconfirm.style.js +4 -0
- package/dist/css/ea-popover.style.js +4 -0
- package/dist/css/ea-popper.style.js +4 -0
- package/dist/css/ea-progress.style.js +4 -0
- package/dist/css/ea-radio-group.style.js +4 -0
- package/dist/css/ea-radio.style.js +4 -0
- package/dist/css/ea-rate.style.js +4 -0
- package/dist/css/ea-result.style.js +4 -0
- package/dist/css/ea-row.style.js +4 -0
- package/dist/css/ea-scrollbar.style.js +4 -0
- package/dist/css/ea-segmented.style.js +4 -0
- package/dist/css/ea-select.style.js +4 -0
- package/dist/css/ea-skeleton-item.style.js +4 -0
- package/dist/css/ea-skeleton.style.js +4 -0
- package/dist/css/ea-slider.style.js +4 -0
- package/dist/css/ea-space.style.js +4 -0
- package/dist/css/ea-splitter-bar.style.js +4 -0
- package/dist/css/ea-splitter-panel.style.js +4 -0
- package/dist/css/ea-splitter.style.js +4 -0
- package/dist/css/ea-statistic.style.js +4 -0
- package/dist/css/ea-step.style.js +4 -0
- package/dist/css/ea-steps.style.js +4 -0
- package/dist/css/ea-sub-menu.style.js +4 -0
- package/dist/css/ea-switch.style.js +4 -0
- package/dist/css/ea-tab-panel.style.js +4 -0
- package/dist/css/ea-tab.style.js +4 -0
- package/dist/css/ea-table.style.js +4 -0
- package/dist/css/ea-tabs.style.js +4 -0
- package/dist/css/ea-tag.style.js +4 -0
- package/dist/css/ea-text.style.js +4 -0
- package/dist/css/ea-time-picker.style.js +4 -0
- package/dist/css/ea-timeline-item.style.js +4 -0
- package/dist/css/ea-timeline.style.js +4 -0
- package/dist/css/ea-tooltip.style.js +4 -0
- package/dist/css/ea-tour-step.style.js +4 -0
- package/dist/css/ea-tour.style.js +4 -0
- package/dist/css/ea-transfer.style.js +5 -0
- package/dist/css/ea-tree.style.js +6 -0
- package/dist/css/ea-ui-component.style.js +4 -0
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +439 -0
- package/dist/utils/I18nManager.js +218 -0
- package/dist/utils/Utils.js +65 -0
- package/dist/utils/Variables.js +19 -0
- package/dist/utils/timeout.js +9 -0
- package/package.json +301 -12
- package/build/components/Base.js +0 -1
- package/build/components/ea-alert/index.js +0 -1
- package/build/components/ea-alert/src/style/stylesheet.js +0 -1
- package/build/components/ea-aside/index.js +0 -1
- package/build/components/ea-avatar/index.js +0 -1
- package/build/components/ea-avatar/src/assets/defaultAvatar.js +0 -1
- package/build/components/ea-avatar/src/assets/errorAvatar.js +0 -1
- package/build/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -1
- package/build/components/ea-avatar/src/style/stylesheet.js +0 -1
- package/build/components/ea-backtop/index.js +0 -1
- package/build/components/ea-backtop/src/style/stylesheet.js +0 -1
- package/build/components/ea-badge/index.js +0 -1
- package/build/components/ea-badge/src/style/stylesheet.js +0 -1
- package/build/components/ea-breadcrumb/index.js +0 -1
- package/build/components/ea-breadcrumb/src/style/stylesheet.js +0 -1
- package/build/components/ea-breadcrumb-item/index.js +0 -1
- package/build/components/ea-breadcrumb-item/src/style/style.js +0 -1
- package/build/components/ea-button/index.js +0 -1
- package/build/components/ea-button/src/components/ButtonComm.js +0 -1
- package/build/components/ea-button/src/components/HrefComm.js +0 -1
- package/build/components/ea-button/src/style/stylesheet.js +0 -1
- package/build/components/ea-button-group/index.js +0 -1
- package/build/components/ea-button-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-calendar/index.js +0 -1
- package/build/components/ea-calendar/src/style/stylesheet.js +0 -1
- package/build/components/ea-calendar/src/utils/createChangerElement.js +0 -1
- package/build/components/ea-calendar/src/utils/createThead.js +0 -1
- package/build/components/ea-calendar/src/utils/getDate.js +0 -1
- package/build/components/ea-calendar/src/utils/getUserWeekStart.js +0 -1
- package/build/components/ea-card/index.js +0 -1
- package/build/components/ea-card/src/style/stylesheet.js +0 -1
- package/build/components/ea-carousel/index.js +0 -1
- package/build/components/ea-carousel/src/style/stylesheet.js +0 -1
- package/build/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -1
- package/build/components/ea-carousel-item/index.js +0 -1
- package/build/components/ea-carousel-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-checkbox/index.js +0 -1
- package/build/components/ea-checkbox/src/style/stylesheet.js +0 -1
- package/build/components/ea-checkbox-group/index.js +0 -1
- package/build/components/ea-checkbox-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-collapse/index.js +0 -1
- package/build/components/ea-collapse-item/index.js +0 -1
- package/build/components/ea-collapse-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-container/index.js +0 -1
- package/build/components/ea-date-picker/index.js +0 -1
- package/build/components/ea-date-picker/src/style/stylesheet.js +0 -1
- package/build/components/ea-descriptions/index.js +0 -1
- package/build/components/ea-descriptions/src/components/contentTemplate.js +0 -1
- package/build/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -1
- package/build/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -1
- package/build/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -1
- package/build/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -1
- package/build/components/ea-descriptions/src/style/stylesheet.js +0 -1
- package/build/components/ea-descriptions-item/index.js +0 -1
- package/build/components/ea-descriptions-item/src/stylesheet.js +0 -1
- package/build/components/ea-drawer/index.js +0 -1
- package/build/components/ea-drawer/src/style/stylesheet.js +0 -1
- package/build/components/ea-empty/index.js +0 -1
- package/build/components/ea-empty/src/assets/emptyStatusSVG.js +0 -1
- package/build/components/ea-empty/src/style/stylesheet.js +0 -1
- package/build/components/ea-footer/index.js +0 -1
- package/build/components/ea-form/index.js +0 -1
- package/build/components/ea-form-item/index.js +0 -1
- package/build/components/ea-form-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-header/index.js +0 -1
- package/build/components/ea-icon/config.json +0 -1030
- package/build/components/ea-icon/css/fontello.css +0 -312
- package/build/components/ea-icon/font/fontello.eot +0 -0
- package/build/components/ea-icon/font/fontello.svg +0 -350
- package/build/components/ea-icon/font/fontello.ttf +0 -0
- package/build/components/ea-icon/font/fontello.woff +0 -0
- package/build/components/ea-icon/font/fontello.woff2 +0 -0
- package/build/components/ea-icon/index.css +0 -1
- package/build/components/ea-icon/index.js +0 -1
- package/build/components/ea-image/index.js +0 -1
- package/build/components/ea-image/src/assets/errorImage.js +0 -1
- package/build/components/ea-image/src/style/stylesheet.js +0 -1
- package/build/components/ea-image/src/utils/createPreviewTools.js +0 -1
- package/build/components/ea-infinite-scroll/index.js +0 -1
- package/build/components/ea-infinite-scroll-item/index.js +0 -1
- package/build/components/ea-input/index.js +0 -1
- package/build/components/ea-input/src/components/createFixIcon.js +0 -1
- package/build/components/ea-input/src/components/createSuggestionBoard.js +0 -1
- package/build/components/ea-input/src/components/createWordLimitElement.js +0 -1
- package/build/components/ea-input/src/style/stylesheet.js +0 -1
- package/build/components/ea-input/src/utils/dispatchEvent.js +0 -1
- package/build/components/ea-input/src/utils/handleSearchResult.js +0 -1
- package/build/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -1
- package/build/components/ea-input-number/index.js +0 -1
- package/build/components/ea-input-number/src/style/stylesheet.js +0 -1
- package/build/components/ea-input-number/src/utils/handleCustomEvent.js +0 -1
- package/build/components/ea-link/index.js +0 -1
- package/build/components/ea-link/src/style/stylesheet.js +0 -1
- package/build/components/ea-loading/index.js +0 -1
- package/build/components/ea-loading/src/style/stylesheet.js +0 -1
- package/build/components/ea-main/index.js +0 -1
- package/build/components/ea-menu/index.js +0 -1
- package/build/components/ea-menu/src/style/stylesheet.js +0 -1
- package/build/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -1
- package/build/components/ea-menu-item/index.js +0 -1
- package/build/components/ea-menu-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-menu-item-group/index.js +0 -1
- package/build/components/ea-menu-item-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-message/index.js +0 -1
- package/build/components/ea-message/src/style/stylesheet.js +0 -1
- package/build/components/ea-message/src/utils/MessageClass.js +0 -1
- package/build/components/ea-message-box/index.js +0 -1
- package/build/components/ea-message-box/src/style/stylesheet.js +0 -1
- package/build/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -1
- package/build/components/ea-option/index.js +0 -1
- package/build/components/ea-option/src/style/stylesheet.js +0 -1
- package/build/components/ea-option-gropu/index.js +0 -1
- package/build/components/ea-page-header/index.js +0 -1
- package/build/components/ea-page-header/src/style/stylesheet.js +0 -1
- package/build/components/ea-pagination/index.js +0 -1
- package/build/components/ea-pagination/src/components/getMoreItem.js +0 -1
- package/build/components/ea-pagination/src/components/getPageItem.js +0 -1
- package/build/components/ea-pagination/src/components/getShowTotalItem.js +0 -1
- package/build/components/ea-pagination/src/style/stylesheet.js +0 -1
- package/build/components/ea-pane/index.js +0 -1
- package/build/components/ea-pane/src/stylesheet.js +0 -1
- package/build/components/ea-progress/index.js +0 -1
- package/build/components/ea-progress/src/components/SVGComm.js +0 -1
- package/build/components/ea-progress/src/style/stylesheet.js +0 -1
- package/build/components/ea-radio/index.js +0 -1
- package/build/components/ea-radio/src/style/stylesheet.js +0 -1
- package/build/components/ea-radio-group/index.js +0 -1
- package/build/components/ea-rate/index.js +0 -1
- package/build/components/ea-rate/src/components/rateComm.js +0 -1
- package/build/components/ea-rate/src/style/stylesheet.js +0 -1
- package/build/components/ea-result/index.js +0 -1
- package/build/components/ea-result/src/style/stylesheet.js +0 -1
- package/build/components/ea-select/index.js +0 -1
- package/build/components/ea-select/src/style/stylesheet.js +0 -1
- package/build/components/ea-skeleton/index.js +0 -1
- package/build/components/ea-skeleton/src/style/stylesheet.js +0 -1
- package/build/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -1
- package/build/components/ea-skeleton-item/index.js +0 -1
- package/build/components/ea-skeleton-item/src/assets/imageSVG.js +0 -1
- package/build/components/ea-skeleton-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-step/index.js +0 -1
- package/build/components/ea-step/src/style/stylesheet.js +0 -1
- package/build/components/ea-steps/index.js +0 -1
- package/build/components/ea-steps/src/style/stylesheet.js +0 -1
- package/build/components/ea-submenu/index.js +0 -1
- package/build/components/ea-submenu/src/style/stylesheet.js +0 -1
- package/build/components/ea-switch/index.js +0 -1
- package/build/components/ea-switch/src/style/stylesheet.js +0 -1
- package/build/components/ea-tab/index.js +0 -1
- package/build/components/ea-tab/src/style/stylesheet.js +0 -1
- package/build/components/ea-table/index.js +0 -1
- package/build/components/ea-table/src/style/stylesheet.js +0 -1
- package/build/components/ea-table-column/index.js +0 -1
- package/build/components/ea-tabs/index.js +0 -1
- package/build/components/ea-tabs/src/style/stylesheet.js +0 -1
- package/build/components/ea-tag/index.js +0 -1
- package/build/components/ea-tag/src/style/stylesheet.js +0 -1
- package/build/components/ea-textarea/index.js +0 -1
- package/build/components/ea-textarea/src/style/stylesheet.js +0 -1
- package/build/components/ea-time-picker/index.js +0 -1
- package/build/components/ea-time-picker/src/style/stylesheet.js +0 -1
- package/build/components/ea-timeline/index.js +0 -1
- package/build/components/ea-timeline/style/stylesheet.js +0 -1
- package/build/components/ea-timeline-item/index.js +0 -1
- package/build/components/ea-timeline-item/src/style/stylesheet.js +0 -1
- package/build/components/globalConfig.js +0 -1
- package/build/components/index.js +0 -1
- package/build/utils/Validator.js +0 -1
- package/build/utils/createElement.js +0 -1
- package/build/utils/handleDefaultAttrIsTrue.js +0 -1
- package/build/utils/handleTemplate.js +0 -1
- package/build/utils/setStyle.js +0 -1
- package/build/utils/timeout.js +0 -1
- package/components/Base.js +0 -75
- package/components/ea-alert/index.css +0 -91
- package/components/ea-alert/index.js +0 -210
- package/components/ea-alert/index.scss +0 -108
- package/components/ea-alert/src/style/stylesheet.js +0 -85
- package/components/ea-aside/index.css +0 -9
- package/components/ea-aside/index.js +0 -54
- package/components/ea-aside/index.scss +0 -12
- package/components/ea-avatar/index.css +0 -66
- package/components/ea-avatar/index.js +0 -156
- package/components/ea-avatar/index.scss +0 -59
- package/components/ea-avatar/src/assets/defaultAvatar.js +0 -12
- package/components/ea-avatar/src/assets/errorAvatar.js +0 -9
- package/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -18
- package/components/ea-avatar/src/style/stylesheet.js +0 -61
- package/components/ea-backtop/index.css +0 -27
- package/components/ea-backtop/index.js +0 -167
- package/components/ea-backtop/index.scss +0 -29
- package/components/ea-backtop/src/style/stylesheet.js +0 -21
- package/components/ea-badge/index.css +0 -49
- package/components/ea-badge/index.js +0 -103
- package/components/ea-badge/index.scss +0 -56
- package/components/ea-badge/src/style/stylesheet.js +0 -43
- package/components/ea-breadcrumb/index.css +0 -6
- package/components/ea-breadcrumb/index.js +0 -90
- package/components/ea-breadcrumb/index.scss +0 -7
- package/components/ea-breadcrumb/src/style/stylesheet.js +0 -8
- package/components/ea-breadcrumb-item/index.css +0 -10
- package/components/ea-breadcrumb-item/index.js +0 -23
- package/components/ea-breadcrumb-item/index.scss +0 -12
- package/components/ea-breadcrumb-item/src/style/style.js +0 -12
- package/components/ea-button/index.css +0 -206
- package/components/ea-button/index.js +0 -198
- package/components/ea-button/index.scss +0 -143
- package/components/ea-button/src/components/ButtonComm.js +0 -5
- package/components/ea-button/src/components/HrefComm.js +0 -5
- package/components/ea-button/src/style/stylesheet.js +0 -208
- package/components/ea-button-group/index.css +0 -16
- package/components/ea-button-group/index.js +0 -44
- package/components/ea-button-group/index.scss +0 -20
- package/components/ea-button-group/src/style/stylesheet.js +0 -18
- package/components/ea-calendar/index.css +0 -72
- package/components/ea-calendar/index.js +0 -298
- package/components/ea-calendar/index.scss +0 -106
- package/components/ea-calendar/src/style/stylesheet.js +0 -74
- package/components/ea-calendar/src/utils/createChangerElement.js +0 -10
- package/components/ea-calendar/src/utils/createThead.js +0 -18
- package/components/ea-calendar/src/utils/getDate.js +0 -11
- package/components/ea-calendar/src/utils/getUserWeekStart.js +0 -11
- package/components/ea-card/index.css +0 -25
- package/components/ea-card/index.js +0 -51
- package/components/ea-card/index.scss +0 -24
- package/components/ea-card/src/style/stylesheet.js +0 -19
- package/components/ea-carousel/index.css +0 -103
- package/components/ea-carousel/index.js +0 -222
- package/components/ea-carousel/index.scss +0 -140
- package/components/ea-carousel/src/style/stylesheet.js +0 -105
- package/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -9
- package/components/ea-carousel-item/index.css +0 -20
- package/components/ea-carousel-item/index.js +0 -23
- package/components/ea-carousel-item/index.scss +0 -26
- package/components/ea-carousel-item/src/style/stylesheet.js +0 -22
- package/components/ea-checkbox/index.css +0 -108
- package/components/ea-checkbox/index.js +0 -160
- package/components/ea-checkbox/index.scss +0 -141
- package/components/ea-checkbox/src/style/stylesheet.js +0 -110
- package/components/ea-checkbox-group/index.css +0 -6
- package/components/ea-checkbox-group/index.js +0 -120
- package/components/ea-checkbox-group/index.scss +0 -7
- package/components/ea-checkbox-group/src/style/stylesheet.js +0 -8
- package/components/ea-collapse/index.css +0 -0
- package/components/ea-collapse/index.js +0 -109
- package/components/ea-collapse/index.scss +0 -4
- package/components/ea-collapse-item/index.css +0 -31
- package/components/ea-collapse-item/index.js +0 -111
- package/components/ea-collapse-item/index.scss +0 -46
- package/components/ea-collapse-item/src/style/stylesheet.js +0 -33
- package/components/ea-container/index.css +0 -14
- package/components/ea-container/index.js +0 -85
- package/components/ea-container/index.scss +0 -18
- package/components/ea-date-picker/index.css +0 -17
- package/components/ea-date-picker/index.js +0 -191
- package/components/ea-date-picker/index.scss +0 -29
- package/components/ea-date-picker/src/style/stylesheet.js +0 -19
- package/components/ea-descriptions/index.css +0 -33
- package/components/ea-descriptions/index.js +0 -171
- package/components/ea-descriptions/index.scss +0 -45
- package/components/ea-descriptions/src/components/contentTemplate.js +0 -11
- package/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -6
- package/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -7
- package/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -7
- package/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -8
- package/components/ea-descriptions/src/style/stylesheet.js +0 -35
- package/components/ea-descriptions-item/index.css +0 -21
- package/components/ea-descriptions-item/index.js +0 -71
- package/components/ea-descriptions-item/index.scss +0 -29
- package/components/ea-descriptions-item/src/stylesheet.js +0 -23
- package/components/ea-drawer/index.css +0 -138
- package/components/ea-drawer/index.js +0 -251
- package/components/ea-drawer/index.scss +0 -208
- package/components/ea-drawer/src/style/stylesheet.js +0 -141
- package/components/ea-empty/index.css +0 -30
- package/components/ea-empty/index.js +0 -93
- package/components/ea-empty/index.scss +0 -30
- package/components/ea-empty/src/assets/emptyStatusSVG.js +0 -6
- package/components/ea-empty/src/style/stylesheet.js +0 -24
- package/components/ea-footer/index.css +0 -7
- package/components/ea-footer/index.js +0 -57
- package/components/ea-footer/index.scss +0 -10
- package/components/ea-form/index.css +0 -0
- package/components/ea-form/index.js +0 -121
- package/components/ea-form/index.scss +0 -0
- package/components/ea-form-item/index.css +0 -62
- package/components/ea-form-item/index.js +0 -152
- package/components/ea-form-item/index.scss +0 -83
- package/components/ea-form-item/src/style/stylesheet.js +0 -64
- package/components/ea-header/index.css +0 -7
- package/components/ea-header/index.js +0 -55
- package/components/ea-header/index.scss +0 -10
- package/components/ea-icon/config.json +0 -1030
- package/components/ea-icon/css/fontello.css +0 -312
- package/components/ea-icon/font/fontello.eot +0 -0
- package/components/ea-icon/font/fontello.svg +0 -350
- package/components/ea-icon/font/fontello.ttf +0 -0
- package/components/ea-icon/font/fontello.woff +0 -0
- package/components/ea-icon/font/fontello.woff2 +0 -0
- package/components/ea-icon/index.css +0 -1
- package/components/ea-icon/index.js +0 -84
- package/components/ea-image/index.css +0 -84
- package/components/ea-image/index.js +0 -182
- package/components/ea-image/index.scss +0 -111
- package/components/ea-image/src/assets/errorImage.js +0 -9
- package/components/ea-image/src/assets/errorImage.svg +0 -7
- package/components/ea-image/src/style/stylesheet.js +0 -86
- package/components/ea-image/src/utils/createPreviewTools.js +0 -140
- package/components/ea-infinite-scroll/index.css +0 -0
- package/components/ea-infinite-scroll/index.js +0 -119
- package/components/ea-infinite-scroll/index.scss +0 -0
- package/components/ea-infinite-scroll-item/index.css +0 -0
- package/components/ea-infinite-scroll-item/index.js +0 -18
- package/components/ea-infinite-scroll-item/index.scss +0 -0
- package/components/ea-input/index.css +0 -139
- package/components/ea-input/index.js +0 -398
- package/components/ea-input/index.scss +0 -178
- package/components/ea-input/src/components/createFixIcon.js +0 -108
- package/components/ea-input/src/components/createSuggestionBoard.js +0 -43
- package/components/ea-input/src/components/createWordLimitElement.js +0 -18
- package/components/ea-input/src/style/stylesheet.js +0 -141
- package/components/ea-input/src/utils/dispatchEvent.js +0 -9
- package/components/ea-input/src/utils/handleSearchResult.js +0 -9
- package/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -31
- package/components/ea-input-number/index.css +0 -120
- package/components/ea-input-number/index.js +0 -308
- package/components/ea-input-number/index.scss +0 -132
- package/components/ea-input-number/src/style/stylesheet.js +0 -122
- package/components/ea-input-number/src/utils/handleCustomEvent.js +0 -5
- package/components/ea-link/index.css +0 -48
- package/components/ea-link/index.js +0 -122
- package/components/ea-link/index.scss +0 -36
- package/components/ea-link/src/style/stylesheet.js +0 -50
- package/components/ea-loading/index.css +0 -38
- package/components/ea-loading/index.js +0 -166
- package/components/ea-loading/index.scss +0 -55
- package/components/ea-loading/src/style/stylesheet.js +0 -40
- package/components/ea-main/index.css +0 -8
- package/components/ea-main/index.js +0 -32
- package/components/ea-main/index.scss +0 -11
- package/components/ea-menu/index.css +0 -19
- package/components/ea-menu/index.js +0 -131
- package/components/ea-menu/index.scss +0 -22
- package/components/ea-menu/src/style/stylesheet.js +0 -21
- package/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -32
- package/components/ea-menu-item/index.css +0 -48
- package/components/ea-menu-item/index.js +0 -130
- package/components/ea-menu-item/index.scss +0 -62
- package/components/ea-menu-item/src/style/stylesheet.js +0 -50
- package/components/ea-menu-item-group/index.css +0 -42
- package/components/ea-menu-item-group/index.js +0 -130
- package/components/ea-menu-item-group/index.scss +0 -60
- package/components/ea-menu-item-group/src/style/stylesheet.js +0 -44
- package/components/ea-message/index.css +0 -47
- package/components/ea-message/index.js +0 -171
- package/components/ea-message/index.scss +0 -70
- package/components/ea-message/src/style/stylesheet.js +0 -48
- package/components/ea-message/src/utils/MessageClass.js +0 -67
- package/components/ea-message-box/index.css +0 -85
- package/components/ea-message-box/index.js +0 -211
- package/components/ea-message-box/index.scss +0 -113
- package/components/ea-message-box/src/style/stylesheet.js +0 -87
- package/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -60
- package/components/ea-option/index.css +0 -24
- package/components/ea-option/index.js +0 -74
- package/components/ea-option/index.scss +0 -31
- package/components/ea-option/src/style/stylesheet.js +0 -26
- package/components/ea-option-gropu/index.css +0 -6
- package/components/ea-option-gropu/index.js +0 -57
- package/components/ea-option-gropu/index.scss +0 -8
- package/components/ea-page-header/index.css +0 -33
- package/components/ea-page-header/index.js +0 -91
- package/components/ea-page-header/index.scss +0 -44
- package/components/ea-page-header/src/style/stylesheet.js +0 -35
- package/components/ea-pagination/index.css +0 -69
- package/components/ea-pagination/index.js +0 -305
- package/components/ea-pagination/index.scss +0 -89
- package/components/ea-pagination/src/components/getMoreItem.js +0 -20
- package/components/ea-pagination/src/components/getPageItem.js +0 -11
- package/components/ea-pagination/src/components/getShowTotalItem.js +0 -7
- package/components/ea-pagination/src/style/stylesheet.js +0 -71
- package/components/ea-pane/index.css +0 -6
- package/components/ea-pane/index.js +0 -52
- package/components/ea-pane/index.scss +0 -7
- package/components/ea-pane/src/stylesheet.js +0 -8
- package/components/ea-progress/index.css +0 -61
- package/components/ea-progress/index.js +0 -249
- package/components/ea-progress/index.scss +0 -74
- package/components/ea-progress/src/components/SVGComm.js +0 -18
- package/components/ea-progress/src/style/stylesheet.js +0 -55
- package/components/ea-radio/index.css +0 -82
- package/components/ea-radio/index.js +0 -137
- package/components/ea-radio/index.scss +0 -119
- package/components/ea-radio/src/style/stylesheet.js +0 -84
- package/components/ea-radio-group/index.css +0 -3
- package/components/ea-radio-group/index.js +0 -96
- package/components/ea-radio-group/index.scss +0 -3
- package/components/ea-rate/index.css +0 -44
- package/components/ea-rate/index.js +0 -243
- package/components/ea-rate/index.scss +0 -55
- package/components/ea-rate/src/components/rateComm.js +0 -20
- package/components/ea-rate/src/style/stylesheet.js +0 -45
- package/components/ea-result/index.css +0 -37
- package/components/ea-result/index.js +0 -109
- package/components/ea-result/index.scss +0 -46
- package/components/ea-result/src/style/stylesheet.js +0 -39
- package/components/ea-select/index.css +0 -47
- package/components/ea-select/index.js +0 -312
- package/components/ea-select/index.scss +0 -70
- package/components/ea-select/src/style/stylesheet.js +0 -49
- package/components/ea-skeleton/index.css +0 -12
- package/components/ea-skeleton/index.js +0 -148
- package/components/ea-skeleton/index.scss +0 -16
- package/components/ea-skeleton/src/style/stylesheet.js +0 -14
- package/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -7
- package/components/ea-skeleton-item/index.css +0 -69
- package/components/ea-skeleton-item/index.js +0 -82
- package/components/ea-skeleton-item/index.scss +0 -107
- package/components/ea-skeleton-item/src/assets/imageSVG.js +0 -8
- package/components/ea-skeleton-item/src/style/stylesheet.js +0 -71
- package/components/ea-step/index.css +0 -84
- package/components/ea-step/index.js +0 -230
- package/components/ea-step/index.scss +0 -110
- package/components/ea-step/src/style/stylesheet.js +0 -86
- package/components/ea-steps/index.css +0 -19
- package/components/ea-steps/index.js +0 -104
- package/components/ea-steps/index.scss +0 -23
- package/components/ea-steps/src/style/stylesheet.js +0 -21
- package/components/ea-submenu/index.css +0 -65
- package/components/ea-submenu/index.js +0 -141
- package/components/ea-submenu/index.scss +0 -88
- package/components/ea-submenu/src/style/stylesheet.js +0 -67
- package/components/ea-switch/index.css +0 -90
- package/components/ea-switch/index.js +0 -189
- package/components/ea-switch/index.scss +0 -117
- package/components/ea-switch/src/style/stylesheet.js +0 -92
- package/components/ea-tab/index.css +0 -68
- package/components/ea-tab/index.js +0 -138
- package/components/ea-tab/index.scss +0 -96
- package/components/ea-tab/src/style/stylesheet.js +0 -70
- package/components/ea-table/index.css +0 -98
- package/components/ea-table/index.js +0 -555
- package/components/ea-table/index.scss +0 -90
- package/components/ea-table/src/style/stylesheet.js +0 -100
- package/components/ea-table-column/index.css +0 -0
- package/components/ea-table-column/index.js +0 -164
- package/components/ea-table-column/index.scss +0 -0
- package/components/ea-tabs/index.css +0 -45
- package/components/ea-tabs/index.js +0 -245
- package/components/ea-tabs/index.scss +0 -64
- package/components/ea-tabs/src/style/stylesheet.js +0 -47
- package/components/ea-tag/index.css +0 -90
- package/components/ea-tag/index.js +0 -107
- package/components/ea-tag/index.scss +0 -71
- package/components/ea-tag/src/style/stylesheet.js +0 -92
- package/components/ea-textarea/index.css +0 -37
- package/components/ea-textarea/index.js +0 -277
- package/components/ea-textarea/index.scss +0 -48
- package/components/ea-textarea/src/style/stylesheet.js +0 -39
- package/components/ea-time-picker/index.css +0 -82
- package/components/ea-time-picker/index.js +0 -379
- package/components/ea-time-picker/index.scss +0 -110
- package/components/ea-time-picker/src/style/stylesheet.js +0 -84
- package/components/ea-timeline/index.css +0 -0
- package/components/ea-timeline/index.js +0 -74
- package/components/ea-timeline/index.scss +0 -1
- package/components/ea-timeline/style/stylesheet.js +0 -3
- package/components/ea-timeline-item/index.css +0 -79
- package/components/ea-timeline-item/index.js +0 -146
- package/components/ea-timeline-item/index.scss +0 -92
- package/components/ea-timeline-item/src/style/stylesheet.js +0 -81
- package/components/ea-ui-base-style.css +0 -0
- package/components/ea-ui-base-style.scss +0 -153
- package/components/globalConfig.js +0 -10
- package/components/index.js +0 -67
- package/public/logo.png +0 -0
- package/utils/Validator.js +0 -16
- package/utils/createElement.js +0 -30
- package/utils/handleDefaultAttrIsTrue.js +0 -11
- package/utils/handleTemplate.js +0 -19
- package/utils/setStyle.js +0 -8
- package/utils/timeout.js +0 -16
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
var pt = Object.defineProperty;
|
|
2
|
+
var ct = (n) => {
|
|
3
|
+
throw TypeError(n);
|
|
4
|
+
};
|
|
5
|
+
var mt = (n, o, e) => o in n ? pt(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
|
|
6
|
+
var x = (n, o, e) => mt(n, typeof o != "symbol" ? o + "" : o, e), ht = (n, o, e) => o.has(n) || ct("Cannot " + e);
|
|
7
|
+
var t = (n, o, e) => (ht(n, o, "read from private field"), e ? e.call(n) : o.get(n)), i = (n, o, e) => o.has(n) ? ct("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, e), u = (n, o, e, a) => (ht(n, o, "write to private field"), a ? a.call(n, e) : o.set(n, e), e), N = (n, o, e) => (ht(n, o, "access private method"), e);
|
|
8
|
+
import { c as yt, g as vt, d as L, n as bt } from "./ea-calendar2.js";
|
|
9
|
+
import { F as ft } from "../core/FormBase.js";
|
|
10
|
+
import { s as wt } from "../css/ea-date-picker.style.js";
|
|
11
|
+
import "./ea-input.js";
|
|
12
|
+
import "./ea-button.js";
|
|
13
|
+
import { E as gt } from "../utils/Variables.js";
|
|
14
|
+
import { E as Dt } from "../utils/Utils.js";
|
|
15
|
+
import { i as G } from "../utils/I18nManager.js";
|
|
16
|
+
var ut = { exports: {} };
|
|
17
|
+
(function(n, o) {
|
|
18
|
+
(function(e, a) {
|
|
19
|
+
n.exports = a();
|
|
20
|
+
})(yt, function() {
|
|
21
|
+
return function(e, a) {
|
|
22
|
+
var r = a.prototype, h = r.format;
|
|
23
|
+
r.format = function(m) {
|
|
24
|
+
var c = this, C = this.$locale();
|
|
25
|
+
if (!this.isValid()) return h.bind(this)(m);
|
|
26
|
+
var y = this.$utils(), ot = (m || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(R) {
|
|
27
|
+
switch (R) {
|
|
28
|
+
case "Q":
|
|
29
|
+
return Math.ceil((c.$M + 1) / 3);
|
|
30
|
+
case "Do":
|
|
31
|
+
return C.ordinal(c.$D);
|
|
32
|
+
case "gggg":
|
|
33
|
+
return c.weekYear();
|
|
34
|
+
case "GGGG":
|
|
35
|
+
return c.isoWeekYear();
|
|
36
|
+
case "wo":
|
|
37
|
+
return C.ordinal(c.week(), "W");
|
|
38
|
+
case "w":
|
|
39
|
+
case "ww":
|
|
40
|
+
return y.s(c.week(), R === "w" ? 1 : 2, "0");
|
|
41
|
+
case "W":
|
|
42
|
+
case "WW":
|
|
43
|
+
return y.s(c.isoWeek(), R === "W" ? 1 : 2, "0");
|
|
44
|
+
case "k":
|
|
45
|
+
case "kk":
|
|
46
|
+
return y.s(String(c.$H === 0 ? 24 : c.$H), R === "k" ? 1 : 2, "0");
|
|
47
|
+
case "X":
|
|
48
|
+
return Math.floor(c.$d.getTime() / 1e3);
|
|
49
|
+
case "x":
|
|
50
|
+
return c.$d.getTime();
|
|
51
|
+
case "z":
|
|
52
|
+
return "[" + c.offsetName() + "]";
|
|
53
|
+
case "zzz":
|
|
54
|
+
return "[" + c.offsetName("long") + "]";
|
|
55
|
+
default:
|
|
56
|
+
return R;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return h.bind(this)(ot);
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
})(ut);
|
|
64
|
+
var $t = ut.exports;
|
|
65
|
+
const Mt = /* @__PURE__ */ vt($t);
|
|
66
|
+
class lt extends Event {
|
|
67
|
+
constructor(o) {
|
|
68
|
+
super("ea-panel-change", {
|
|
69
|
+
bubbles: !0,
|
|
70
|
+
cancelable: !0,
|
|
71
|
+
composed: !0
|
|
72
|
+
}), this.detail = o;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
class dt extends Event {
|
|
76
|
+
constructor(o) {
|
|
77
|
+
super("ea-visible-change", {
|
|
78
|
+
bubbles: !0,
|
|
79
|
+
cancelable: !0,
|
|
80
|
+
composed: !0
|
|
81
|
+
}), this.detail = o;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
L.extend(Mt);
|
|
85
|
+
var p, H, d, V, $, j, O, v, b, f, M, Y, w, W, A, l, s, E, I, D, P, S, q, z, B, F, _, Q, U, X, Z, J, K, tt, k, et, T, g, st, at, it, rt, nt;
|
|
86
|
+
class Yt extends ft {
|
|
87
|
+
constructor() {
|
|
88
|
+
super();
|
|
89
|
+
i(this, E);
|
|
90
|
+
/** @type {HTMLElement} */
|
|
91
|
+
i(this, p);
|
|
92
|
+
/** @type {HTMLElement} */
|
|
93
|
+
i(this, H);
|
|
94
|
+
/** @type {HTMLElement} */
|
|
95
|
+
i(this, d);
|
|
96
|
+
/** @type {HTMLElement} */
|
|
97
|
+
i(this, V);
|
|
98
|
+
/** @type {HTMLElement} */
|
|
99
|
+
i(this, $);
|
|
100
|
+
/** @type {HTMLElement} */
|
|
101
|
+
i(this, j);
|
|
102
|
+
/** @type {HTMLElement} */
|
|
103
|
+
i(this, O);
|
|
104
|
+
/** @type {HTMLElement} */
|
|
105
|
+
i(this, v);
|
|
106
|
+
/** @type {HTMLElement} */
|
|
107
|
+
i(this, b);
|
|
108
|
+
/** @type {HTMLElement} */
|
|
109
|
+
i(this, f);
|
|
110
|
+
/** @type {HTMLElement} */
|
|
111
|
+
i(this, M);
|
|
112
|
+
/** @type {HTMLElement} */
|
|
113
|
+
i(this, Y);
|
|
114
|
+
/** @type {HTMLElement} */
|
|
115
|
+
i(this, w);
|
|
116
|
+
/** @type {HTMLElement} */
|
|
117
|
+
i(this, W);
|
|
118
|
+
/** @type {HTMLElement} */
|
|
119
|
+
i(this, A);
|
|
120
|
+
/** @type {AbortController} */
|
|
121
|
+
i(this, l, new AbortController());
|
|
122
|
+
i(this, s, {
|
|
123
|
+
currentDate: L(),
|
|
124
|
+
/** @type {'day' | 'month' | 'year'} */
|
|
125
|
+
viewMode: "day",
|
|
126
|
+
selectedYear: null,
|
|
127
|
+
selectedMonth: null
|
|
128
|
+
});
|
|
129
|
+
x(this, "state", this.properties({
|
|
130
|
+
label: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: "",
|
|
133
|
+
observer: async (e) => {
|
|
134
|
+
await customElements.whenDefined("ea-input"), t(this, d).label = e;
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
width: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: "auto",
|
|
140
|
+
observer: (e) => {
|
|
141
|
+
t(this, p).style.setProperty("--ea-date-picker-width", e);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
value: {
|
|
145
|
+
type: String,
|
|
146
|
+
default: "",
|
|
147
|
+
observer: (e) => {
|
|
148
|
+
let a = e;
|
|
149
|
+
if (isNaN(new Date(e)) && e !== "") {
|
|
150
|
+
const r = new Date(Date.now());
|
|
151
|
+
a = `${r.getFullYear()}-${r.getMonth() + 1}-${r.getDate()}`;
|
|
152
|
+
}
|
|
153
|
+
a ? (t(this, s).currentDate = L(a), t(this, s).selectedYear = t(this, s).currentDate.year(), t(this, s).selectedMonth = t(this, s).currentDate.month() + 1, t(this, d).value = t(this, s).currentDate.format(
|
|
154
|
+
N(this, E, I).call(this)
|
|
155
|
+
)) : t(this, d).value = a, this.setValue(e);
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
placeholder: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: "",
|
|
161
|
+
observer: (e) => {
|
|
162
|
+
t(this, d).setAttribute("placeholder", e);
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
disabled: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: !1,
|
|
168
|
+
observer: (e) => {
|
|
169
|
+
t(this, d).toggleAttribute("disabled", e), this.updateContainerClasslist();
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
align: {
|
|
173
|
+
type: ["left", "center", "right"],
|
|
174
|
+
default: "left",
|
|
175
|
+
observer: () => {
|
|
176
|
+
this.updateContainerClasslist();
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"display-format": {
|
|
180
|
+
type: String,
|
|
181
|
+
default: "YYYY-MM-DD"
|
|
182
|
+
},
|
|
183
|
+
"value-format": {
|
|
184
|
+
type: String,
|
|
185
|
+
default: "YYYY-MM-DD"
|
|
186
|
+
},
|
|
187
|
+
type: {
|
|
188
|
+
type: ["date", "month", "year"],
|
|
189
|
+
default: "date",
|
|
190
|
+
observer: (e) => {
|
|
191
|
+
e === "year" ? t(this, P).call(this) : e === "month" ? t(this, S).call(this) : t(this, q).call(this);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
size: {
|
|
195
|
+
type: gt,
|
|
196
|
+
default: "default",
|
|
197
|
+
observer: (e) => {
|
|
198
|
+
t(this, d).setAttribute("size", e), t(this, v).setAttribute("size", e), t(this, b).setAttribute("size", e), t(this, f).setAttribute("size", e), t(this, M).setAttribute("size", e), t(this, Y).setAttribute("size", e), t(this, w).setAttribute("size", e), this.updateContainerClasslist();
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
required: {
|
|
202
|
+
type: Boolean,
|
|
203
|
+
default: !1,
|
|
204
|
+
observer: async (e) => {
|
|
205
|
+
await customElements.whenDefined("ea-input"), t(this, d).toggleAttribute("required", e);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}));
|
|
209
|
+
/**
|
|
210
|
+
* 更新header显示
|
|
211
|
+
*/
|
|
212
|
+
i(this, D, () => {
|
|
213
|
+
const e = t(this, s).currentDate.year(), a = t(this, s).currentDate.month() + 1;
|
|
214
|
+
if (t(this, s).viewMode === "year") {
|
|
215
|
+
const r = Math.floor(e / 10) * 10, h = r + 9;
|
|
216
|
+
t(this, v).textContent = `${r} ~ ${h}`, t(this, b).textContent = "";
|
|
217
|
+
} else t(this, s).viewMode === "month" ? (t(this, v).textContent = e, t(this, b).textContent = "") : (t(this, v).textContent = e, t(this, b).textContent = a < 10 ? `0${a}` : a);
|
|
218
|
+
});
|
|
219
|
+
/**
|
|
220
|
+
* 切换到年份选择模式
|
|
221
|
+
*/
|
|
222
|
+
i(this, P, () => {
|
|
223
|
+
t(this, s).viewMode = "year", t(this, D).call(this), t(this, B).call(this), this.updateContainerClasslist(), t(this, z).call(this, "year"), this.dispatchEvent(
|
|
224
|
+
new lt({
|
|
225
|
+
date: t(this, s).currentDate.toDate(),
|
|
226
|
+
mode: "year",
|
|
227
|
+
view: "year-panel"
|
|
228
|
+
})
|
|
229
|
+
);
|
|
230
|
+
});
|
|
231
|
+
/**
|
|
232
|
+
* 切换到月份选择模式
|
|
233
|
+
*/
|
|
234
|
+
i(this, S, () => {
|
|
235
|
+
t(this, s).viewMode = "month", t(this, D).call(this), t(this, F).call(this), this.updateContainerClasslist(), t(this, z).call(this, "month"), this.dispatchEvent(
|
|
236
|
+
new lt({
|
|
237
|
+
date: t(this, s).currentDate.toDate(),
|
|
238
|
+
mode: "month",
|
|
239
|
+
view: "month-panel"
|
|
240
|
+
})
|
|
241
|
+
);
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* 切换回日期选择模式
|
|
245
|
+
*/
|
|
246
|
+
i(this, q, () => {
|
|
247
|
+
t(this, s).viewMode = "day", t(this, D).call(this), this.updateContainerClasslist(), t(this, z).call(this, "day");
|
|
248
|
+
const e = t(this, s).currentDate.format("YYYY-MM-DD");
|
|
249
|
+
t(this, $).setAttribute("value", e), this.dispatchEvent(
|
|
250
|
+
new lt({
|
|
251
|
+
date: t(this, s).currentDate.toDate(),
|
|
252
|
+
mode: "month",
|
|
253
|
+
view: "day-panel"
|
|
254
|
+
})
|
|
255
|
+
);
|
|
256
|
+
});
|
|
257
|
+
/**
|
|
258
|
+
* 更新header按钮
|
|
259
|
+
* @param {'year' | 'month' | 'day'} mode
|
|
260
|
+
*/
|
|
261
|
+
i(this, z, (e) => {
|
|
262
|
+
e === "year" ? (t(this, f).ariaLabel = "Previous decade", t(this, w).ariaLabel = "Next decade") : e === "month" ? (t(this, f).ariaLabel = "Previous year", t(this, w).ariaLabel = "Next year") : (t(this, f).ariaLabel = "Previous year", t(this, w).ariaLabel = "Next year", t(this, M).ariaLabel = "Previous month", t(this, Y).ariaLabel = "Next month");
|
|
263
|
+
});
|
|
264
|
+
/**
|
|
265
|
+
* 渲染年份面板
|
|
266
|
+
*/
|
|
267
|
+
i(this, B, () => {
|
|
268
|
+
const e = this.ns, a = t(this, s).currentDate.year(), r = Math.floor(a / 10) * 10, h = t(this, W);
|
|
269
|
+
let m = Array.from({ length: 10 }, (c, C) => {
|
|
270
|
+
const y = r + C, ot = y === t(this, s).selectedYear;
|
|
271
|
+
return Dt.EaElement.h(
|
|
272
|
+
"button",
|
|
273
|
+
null,
|
|
274
|
+
{
|
|
275
|
+
class: `${e.e("year-item")} ${ot ? e.s("selected") : ""}`,
|
|
276
|
+
"data-year": y,
|
|
277
|
+
part: "year-item"
|
|
278
|
+
},
|
|
279
|
+
y
|
|
280
|
+
);
|
|
281
|
+
}).join("");
|
|
282
|
+
h.innerHTML = this.html(m);
|
|
283
|
+
});
|
|
284
|
+
/**
|
|
285
|
+
* 渲染月份面板
|
|
286
|
+
*/
|
|
287
|
+
i(this, F, () => {
|
|
288
|
+
const e = this.ns;
|
|
289
|
+
t(this, A).querySelectorAll(
|
|
290
|
+
`.${e.e("month-item")}`
|
|
291
|
+
).forEach((r) => {
|
|
292
|
+
const m = parseInt(r.dataset.month, 10) === t(this, s).selectedMonth && t(this, s).currentDate.year() === t(this, s).selectedYear;
|
|
293
|
+
r.classList.toggle(e.s("selected"), m);
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
/**
|
|
297
|
+
* 上一年按钮点击
|
|
298
|
+
*/
|
|
299
|
+
i(this, _, () => {
|
|
300
|
+
t(this, s).viewMode === "year" ? t(this, s).currentDate = t(this, s).currentDate.subtract(10, "year") : t(this, s).currentDate = t(this, s).currentDate.subtract(1, "year"), t(this, k).call(this);
|
|
301
|
+
});
|
|
302
|
+
/**
|
|
303
|
+
* 下一年按钮点击
|
|
304
|
+
*/
|
|
305
|
+
i(this, Q, () => {
|
|
306
|
+
t(this, s).viewMode === "year" ? t(this, s).currentDate = t(this, s).currentDate.add(10, "year") : t(this, s).currentDate = t(this, s).currentDate.add(1, "year"), t(this, k).call(this);
|
|
307
|
+
});
|
|
308
|
+
/**
|
|
309
|
+
* 上个月按钮点击
|
|
310
|
+
*/
|
|
311
|
+
i(this, U, () => {
|
|
312
|
+
t(this, s).currentDate = t(this, s).currentDate.subtract(1, "month"), t(this, k).call(this);
|
|
313
|
+
});
|
|
314
|
+
/**
|
|
315
|
+
* 下个月按钮点击
|
|
316
|
+
*/
|
|
317
|
+
i(this, X, () => {
|
|
318
|
+
t(this, s).currentDate = t(this, s).currentDate.add(1, "month"), t(this, k).call(this);
|
|
319
|
+
});
|
|
320
|
+
/**
|
|
321
|
+
* 年份点击事件
|
|
322
|
+
*/
|
|
323
|
+
i(this, Z, (e) => {
|
|
324
|
+
const a = e.target.closest("[data-year]");
|
|
325
|
+
if (!a) return;
|
|
326
|
+
const r = parseInt(a.dataset.year);
|
|
327
|
+
t(this, s).selectedYear = r, t(this, s).currentDate = t(this, s).currentDate.year(r), this.type === "year" ? t(this, J).call(this, r) : t(this, S).call(this);
|
|
328
|
+
});
|
|
329
|
+
/**
|
|
330
|
+
* 处理年份选择(type=year)
|
|
331
|
+
*/
|
|
332
|
+
i(this, J, (e) => {
|
|
333
|
+
const a = t(this, s).currentDate, r = a.format(N(this, E, I).call(this)), h = a.format(this["value-format"]);
|
|
334
|
+
t(this, d).value = r, this.setAttribute("value", h), this.emit("change", {
|
|
335
|
+
detail: {
|
|
336
|
+
fullDate: h,
|
|
337
|
+
year: e,
|
|
338
|
+
month: null,
|
|
339
|
+
date: null,
|
|
340
|
+
week: null
|
|
341
|
+
}
|
|
342
|
+
}), t(this, g).call(this);
|
|
343
|
+
});
|
|
344
|
+
/**
|
|
345
|
+
* 月份点击事件
|
|
346
|
+
*/
|
|
347
|
+
i(this, K, (e) => {
|
|
348
|
+
const a = e.target.closest("[data-month]");
|
|
349
|
+
if (!a) return;
|
|
350
|
+
const r = parseInt(a.dataset.month);
|
|
351
|
+
t(this, s).selectedMonth = r, t(this, s).currentDate = t(this, s).currentDate.month(r - 1), this.type === "month" ? t(this, tt).call(this, r) : t(this, q).call(this);
|
|
352
|
+
});
|
|
353
|
+
/**
|
|
354
|
+
* 处理月份选择(type=month)
|
|
355
|
+
*/
|
|
356
|
+
i(this, tt, (e) => {
|
|
357
|
+
const a = t(this, s).currentDate, r = a.format(N(this, E, I).call(this)), h = a.format(this["value-format"]);
|
|
358
|
+
t(this, d).value = r, this.setAttribute("value", h), this.emit("change", {
|
|
359
|
+
detail: {
|
|
360
|
+
fullDate: h,
|
|
361
|
+
year: t(this, s).selectedYear,
|
|
362
|
+
month: e,
|
|
363
|
+
date: null,
|
|
364
|
+
week: null
|
|
365
|
+
}
|
|
366
|
+
}), t(this, g).call(this);
|
|
367
|
+
});
|
|
368
|
+
/**
|
|
369
|
+
* 更新视图
|
|
370
|
+
*/
|
|
371
|
+
i(this, k, () => {
|
|
372
|
+
t(this, D).call(this), t(this, s).viewMode === "year" ? t(this, B).call(this) : t(this, s).viewMode === "month" && t(this, F).call(this);
|
|
373
|
+
const e = t(this, s).currentDate.format("YYYY-MM-DD");
|
|
374
|
+
t(this, $).setAttribute("value", e);
|
|
375
|
+
});
|
|
376
|
+
/**
|
|
377
|
+
* 日历选择事件处理
|
|
378
|
+
* @param {CustomEvent} e
|
|
379
|
+
*/
|
|
380
|
+
i(this, et, (e) => {
|
|
381
|
+
const { year: a, month: r, date: h, day: m } = e.detail, c = L(`${a}-${r}-${h}`);
|
|
382
|
+
t(this, s).selectedYear = a, t(this, s).selectedMonth = r, t(this, s).currentDate = c;
|
|
383
|
+
const C = c.format(N(this, E, I).call(this)), y = c.format(this["value-format"]);
|
|
384
|
+
t(this, d).value = C, this.setAttribute("value", y), this.emit("change", {
|
|
385
|
+
detail: {
|
|
386
|
+
fullDate: y,
|
|
387
|
+
year: a,
|
|
388
|
+
month: r,
|
|
389
|
+
date: h,
|
|
390
|
+
week: m
|
|
391
|
+
}
|
|
392
|
+
}), t(this, g).call(this);
|
|
393
|
+
});
|
|
394
|
+
/**
|
|
395
|
+
* 打开下拉框
|
|
396
|
+
*/
|
|
397
|
+
i(this, T, () => {
|
|
398
|
+
if (this.disabled) return;
|
|
399
|
+
const e = t(this, p).classList.contains("is-open");
|
|
400
|
+
t(this, p).classList.add("is-open"), e || this.dispatchEvent(new dt({ visible: !0 })), this.type === "year" ? t(this, P).call(this) : this.type === "month" ? t(this, S).call(this) : t(this, q).call(this);
|
|
401
|
+
});
|
|
402
|
+
/**
|
|
403
|
+
* 关闭下拉框
|
|
404
|
+
*/
|
|
405
|
+
i(this, g, () => {
|
|
406
|
+
const e = t(this, p).classList.contains("is-open");
|
|
407
|
+
t(this, p).classList.remove("is-open"), e && this.dispatchEvent(
|
|
408
|
+
new dt({ visible: !1 })
|
|
409
|
+
);
|
|
410
|
+
});
|
|
411
|
+
/**
|
|
412
|
+
* 切换下拉框显示状态
|
|
413
|
+
*/
|
|
414
|
+
i(this, st, () => {
|
|
415
|
+
this.disabled || (t(this, p).classList.contains("is-open") ? t(this, g).call(this) : t(this, T).call(this));
|
|
416
|
+
});
|
|
417
|
+
/**
|
|
418
|
+
* 点击外部关闭下拉
|
|
419
|
+
* @param {MouseEvent} e
|
|
420
|
+
*/
|
|
421
|
+
i(this, at, (e) => {
|
|
422
|
+
const a = e.composedPath();
|
|
423
|
+
a.includes(this) || a.includes(this.shadowRoot) || t(this, g).call(this);
|
|
424
|
+
});
|
|
425
|
+
/**
|
|
426
|
+
* 输入框焦点事件
|
|
427
|
+
*/
|
|
428
|
+
i(this, it, () => {
|
|
429
|
+
this.emit("focus");
|
|
430
|
+
});
|
|
431
|
+
/**
|
|
432
|
+
* 输入框失焦事件
|
|
433
|
+
*/
|
|
434
|
+
i(this, rt, () => {
|
|
435
|
+
this.emit("blur");
|
|
436
|
+
});
|
|
437
|
+
/**
|
|
438
|
+
* 绑定事件
|
|
439
|
+
*/
|
|
440
|
+
i(this, nt, () => {
|
|
441
|
+
var r;
|
|
442
|
+
(r = t(this, l)) == null || r.abort(), u(this, l, new AbortController()), t(this, $).addEventListener("select", t(this, et), {
|
|
443
|
+
signal: t(this, l).signal
|
|
444
|
+
}), t(this, d).addEventListener("click", t(this, st), {
|
|
445
|
+
signal: t(this, l).signal
|
|
446
|
+
}), t(this, d).addEventListener("focus", t(this, it), {
|
|
447
|
+
signal: t(this, l).signal
|
|
448
|
+
}), t(this, d).addEventListener("blur", t(this, rt), {
|
|
449
|
+
signal: t(this, l).signal
|
|
450
|
+
}), window.addEventListener("click", t(this, at), {
|
|
451
|
+
signal: t(this, l).signal
|
|
452
|
+
}), t(this, f).addEventListener("click", t(this, _), {
|
|
453
|
+
signal: t(this, l).signal
|
|
454
|
+
}), t(this, w).addEventListener("click", t(this, Q), {
|
|
455
|
+
signal: t(this, l).signal
|
|
456
|
+
}), t(this, M).addEventListener("click", t(this, U), {
|
|
457
|
+
signal: t(this, l).signal
|
|
458
|
+
}), t(this, Y).addEventListener("click", t(this, X), {
|
|
459
|
+
signal: t(this, l).signal
|
|
460
|
+
}), t(this, v).addEventListener("click", t(this, P), {
|
|
461
|
+
signal: t(this, l).signal
|
|
462
|
+
}), t(this, b).addEventListener("click", t(this, S), {
|
|
463
|
+
signal: t(this, l).signal
|
|
464
|
+
}), this.shadowRoot.querySelector(this.ns.ce("year-panel")).addEventListener("click", t(this, Z), {
|
|
465
|
+
signal: t(this, l).signal
|
|
466
|
+
}), this.shadowRoot.querySelector(this.ns.ce("month-panel")).addEventListener("click", t(this, K), {
|
|
467
|
+
signal: t(this, l).signal
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
/**
|
|
471
|
+
* 使组件获取焦点
|
|
472
|
+
* @return {void}
|
|
473
|
+
*/
|
|
474
|
+
x(this, "focus", () => {
|
|
475
|
+
t(this, d).focus();
|
|
476
|
+
});
|
|
477
|
+
/**
|
|
478
|
+
* 使组件失去焦点
|
|
479
|
+
* @return {void}
|
|
480
|
+
*/
|
|
481
|
+
x(this, "blur", () => {
|
|
482
|
+
t(this, d).blur();
|
|
483
|
+
});
|
|
484
|
+
/**
|
|
485
|
+
* 打开日期选择器弹窗
|
|
486
|
+
* @return {void}
|
|
487
|
+
*/
|
|
488
|
+
x(this, "handleOpen", () => {
|
|
489
|
+
t(this, T).call(this);
|
|
490
|
+
});
|
|
491
|
+
/**
|
|
492
|
+
* 关闭日期选择器弹窗
|
|
493
|
+
* @return {void}
|
|
494
|
+
*/
|
|
495
|
+
x(this, "handleClose", () => {
|
|
496
|
+
t(this, g).call(this);
|
|
497
|
+
});
|
|
498
|
+
this.stylesheet = wt, this.$render();
|
|
499
|
+
}
|
|
500
|
+
static get observedAttributes() {
|
|
501
|
+
return [
|
|
502
|
+
...super.observedAttributes,
|
|
503
|
+
"label",
|
|
504
|
+
"width",
|
|
505
|
+
"value",
|
|
506
|
+
"placeholder",
|
|
507
|
+
"disabled",
|
|
508
|
+
"align",
|
|
509
|
+
"display-format",
|
|
510
|
+
"value-format",
|
|
511
|
+
"size",
|
|
512
|
+
"required"
|
|
513
|
+
];
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* 获取 classlist 列表
|
|
517
|
+
* @return {string} 属性值
|
|
518
|
+
*/
|
|
519
|
+
updateContainerClasslist() {
|
|
520
|
+
var r, h;
|
|
521
|
+
const e = ((r = t(this, s)) == null ? void 0 : r.viewMode) || "day", a = this.computedClasslist(
|
|
522
|
+
"ea-date-picker",
|
|
523
|
+
{
|
|
524
|
+
[`--${this.size}`]: this.size
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
disabled: this.disabled,
|
|
528
|
+
[`align-${this.align}`]: this.align,
|
|
529
|
+
open: (h = t(this, p)) == null ? void 0 : h.classList.contains("is-open"),
|
|
530
|
+
[`view-${e}`]: e
|
|
531
|
+
}
|
|
532
|
+
);
|
|
533
|
+
return t(this, p).className = a, a;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* 渲染组件
|
|
537
|
+
*/
|
|
538
|
+
$render() {
|
|
539
|
+
const e = bt("date-picker");
|
|
540
|
+
this.ns = e, G.locale = this.locale, L.locale(this.locale.toLowerCase());
|
|
541
|
+
const a = G.t("calendar.monthsShort");
|
|
542
|
+
this.shadowRoot.innerHTML = this.html(`
|
|
543
|
+
<div class='${e.b()}' part='container'>
|
|
544
|
+
<div class='${e.e("input-wrap")}' part='input-wrap'>
|
|
545
|
+
<ea-input class="${e.e("input")}" part='input' prefix-icon="icon-calendar-times-o" readonly></ea-input>
|
|
546
|
+
</div>
|
|
547
|
+
<div class='${e.e("dropdown-wrap")}' part='dropdown-wrap'>
|
|
548
|
+
<div class='${e.e("calendar-wrapper")}'>
|
|
549
|
+
<div class='${e.e("calendar-header")}' part='calendar-header'>
|
|
550
|
+
<div class='${e.e("header-left")}' part='header-left'>
|
|
551
|
+
<ea-button class='${e.e("header-btn")} ${e.e("btn-prev-year")}' part='header-btn' aria-label="Previous year" text>«</ea-button>
|
|
552
|
+
<ea-button class='${e.e("header-btn")} ${e.e("btn-prev-month")}' part='header-btn' aria-label="Previous month" text>‹</ea-button>
|
|
553
|
+
</div>
|
|
554
|
+
<div class='${e.e("header-center")}' part='header-center'>
|
|
555
|
+
<ea-button class='${e.e("header-year")}' part='header-year' aria-label="Year" text></ea-button>
|
|
556
|
+
<ea-button class='${e.e("header-month")}' part='header-month' aria-label="Month" text></ea-button>
|
|
557
|
+
</div>
|
|
558
|
+
<div class='${e.e("header-right")}' part='header-right'>
|
|
559
|
+
<ea-button class='${e.e("header-btn")} ${e.e("btn-next-month")}' part='header-btn' aria-label="Next month" text>›</ea-button>
|
|
560
|
+
<ea-button class='${e.e("header-btn")} ${e.e("btn-next-year")}' part='header-btn' aria-label="Next year" text>»</ea-button>
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
<div class='${e.e("calendar-body")}' part='calendar-body'>
|
|
564
|
+
<ea-calendar class="${e.e("calendar")}" size="small" part='calendar'></ea-calendar>
|
|
565
|
+
</div>
|
|
566
|
+
<div class='${e.e("year-panel")}' part='year-panel'></div>
|
|
567
|
+
<div class='${e.e("month-panel")}' part='month-panel'>${a.map(
|
|
568
|
+
(r, h) => `<button class='${e.e("month-item")}' part='month-item' data-month='${h + 1}'>${r}</button>`
|
|
569
|
+
).join("")}</div>
|
|
570
|
+
</div>
|
|
571
|
+
</div>
|
|
572
|
+
</div>
|
|
573
|
+
`), u(this, p, this.shadowRoot.querySelector(e.cb())), u(this, H, this.shadowRoot.querySelector(e.ce("input-wrap"))), u(this, d, this.shadowRoot.querySelector(e.ce("input"))), u(this, V, this.shadowRoot.querySelector(e.ce("dropdown-wrap"))), u(this, $, this.shadowRoot.querySelector(e.ce("calendar"))), u(this, j, this.shadowRoot.querySelector(
|
|
574
|
+
e.ce("calendar-header")
|
|
575
|
+
)), u(this, O, this.shadowRoot.querySelector(e.ce("calendar-body"))), u(this, v, this.shadowRoot.querySelector(e.ce("header-year"))), u(this, b, this.shadowRoot.querySelector(e.ce("header-month"))), u(this, f, this.shadowRoot.querySelector(e.ce("btn-prev-year"))), u(this, M, this.shadowRoot.querySelector(e.ce("btn-prev-month"))), u(this, Y, this.shadowRoot.querySelector(e.ce("btn-next-month"))), u(this, w, this.shadowRoot.querySelector(e.ce("btn-next-year"))), u(this, W, this.shadowRoot.querySelector(e.ce("year-panel"))), u(this, A, this.shadowRoot.querySelector(e.ce("month-panel")));
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* 更新本地化
|
|
579
|
+
* @param {string} locale
|
|
580
|
+
*/
|
|
581
|
+
$updateLocalization(e) {
|
|
582
|
+
G.locale = e, L.locale(e.toLowerCase());
|
|
583
|
+
const a = this.ns, r = G.t("calendar.monthsShort");
|
|
584
|
+
t(this, A).querySelectorAll(
|
|
585
|
+
`.${a.e("month-item")}`
|
|
586
|
+
).forEach((m, c) => {
|
|
587
|
+
r[c] && (m.textContent = r[c]);
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
connectedCallback() {
|
|
591
|
+
var e;
|
|
592
|
+
super.connectedCallback(), (e = t(this, l)) == null || e.abort(), u(this, l, new AbortController()), t(this, D).call(this), t(this, nt).call(this);
|
|
593
|
+
}
|
|
594
|
+
$beforeUnmounted() {
|
|
595
|
+
var e;
|
|
596
|
+
(e = t(this, l)) == null || e.abort(), u(this, l, null);
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* 获取验证目标元素
|
|
600
|
+
* @returns {HTMLElement}
|
|
601
|
+
*/
|
|
602
|
+
get validationTarget() {
|
|
603
|
+
return t(this, d);
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* 更新表单验证状态
|
|
607
|
+
*/
|
|
608
|
+
updateValidity() {
|
|
609
|
+
const e = this.value !== "" && this.value != null;
|
|
610
|
+
this.required && !e ? this.internals.setValidity({ valueMissing: !0 }, "请选择日期", this) : this.internals.setValidity({}, "", this);
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* 检查表单字段的有效性
|
|
614
|
+
* @returns {boolean}
|
|
615
|
+
*/
|
|
616
|
+
checkValidity() {
|
|
617
|
+
return this.updateValidity(), this.internals.validity.valid;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* 报告表单字段的有效性(显示验证提示)
|
|
621
|
+
* @returns {boolean}
|
|
622
|
+
*/
|
|
623
|
+
reportValidity() {
|
|
624
|
+
return this.updateValidity(), this.internals.reportValidity();
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
p = new WeakMap(), H = new WeakMap(), d = new WeakMap(), V = new WeakMap(), $ = new WeakMap(), j = new WeakMap(), O = new WeakMap(), v = new WeakMap(), b = new WeakMap(), f = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), w = new WeakMap(), W = new WeakMap(), A = new WeakMap(), l = new WeakMap(), s = new WeakMap(), E = new WeakSet(), /**
|
|
628
|
+
* 获取实际的显示格式
|
|
629
|
+
* 如果用户设置了自定义格式,则使用自定义格式
|
|
630
|
+
* 否则根据type使用默认格式
|
|
631
|
+
* @return {string} 显示格式
|
|
632
|
+
*/
|
|
633
|
+
I = function() {
|
|
634
|
+
const e = this["display-format"];
|
|
635
|
+
if (this.hasAttribute("display-format") && this["display-format"] !== "")
|
|
636
|
+
return e;
|
|
637
|
+
switch (this.type) {
|
|
638
|
+
case "year":
|
|
639
|
+
return "YYYY";
|
|
640
|
+
case "month":
|
|
641
|
+
return "YYYY-MM";
|
|
642
|
+
default:
|
|
643
|
+
return "YYYY-MM-DD";
|
|
644
|
+
}
|
|
645
|
+
}, D = new WeakMap(), P = new WeakMap(), S = new WeakMap(), q = new WeakMap(), z = new WeakMap(), B = new WeakMap(), F = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), U = new WeakMap(), X = new WeakMap(), Z = new WeakMap(), J = new WeakMap(), K = new WeakMap(), tt = new WeakMap(), k = new WeakMap(), et = new WeakMap(), T = new WeakMap(), g = new WeakMap(), st = new WeakMap(), at = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), nt = new WeakMap();
|
|
646
|
+
customElements.get("ea-date-picker") || customElements.define("ea-date-picker", Yt);
|
|
647
|
+
export {
|
|
648
|
+
Yt as EaDatePicker
|
|
649
|
+
};
|