easy-component-ui 2.1.0 → 3.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/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 +294 -11
- 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,514 @@
|
|
|
1
|
+
var Y = Object.defineProperty;
|
|
2
|
+
var J = (a) => {
|
|
3
|
+
throw TypeError(a);
|
|
4
|
+
};
|
|
5
|
+
var tt = (a, r, s) => r in a ? Y(a, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[r] = s;
|
|
6
|
+
var C = (a, r, s) => tt(a, typeof r != "symbol" ? r + "" : r, s), K = (a, r, s) => r.has(a) || J("Cannot " + s);
|
|
7
|
+
var t = (a, r, s) => (K(a, r, "read from private field"), s ? s.call(a) : r.get(a)), n = (a, r, s) => r.has(a) ? J("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, s), w = (a, r, s, e) => (K(a, r, "write to private field"), e ? e.call(a, s) : r.set(a, s), s);
|
|
8
|
+
import { F as st } from "../core/FormBase.js";
|
|
9
|
+
import { s as it } from "../css/ea-time-picker.style.js";
|
|
10
|
+
import { n as et } from "./ea-calendar2.js";
|
|
11
|
+
import "./ea-icon.js";
|
|
12
|
+
import "./ea-input.js";
|
|
13
|
+
import { t as Z } from "../utils/timeout.js";
|
|
14
|
+
import { E as nt } from "../utils/Variables.js";
|
|
15
|
+
class Q extends Event {
|
|
16
|
+
constructor(r) {
|
|
17
|
+
super("ea-visible-change", {
|
|
18
|
+
bubbles: !0,
|
|
19
|
+
cancelable: !0,
|
|
20
|
+
composed: !0
|
|
21
|
+
}), this.detail = r;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
var f, u, O, v, y, S, g, i, $, M, H, G, A, D, L, E, k, B, P, I, x, V, W, F, z, _, T, j, N, q, R, U;
|
|
25
|
+
class lt extends st {
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
n(this, H);
|
|
29
|
+
/** @type {HTMLElement} */
|
|
30
|
+
n(this, f);
|
|
31
|
+
/** @type {HTMLElement} */
|
|
32
|
+
n(this, u);
|
|
33
|
+
/** @type {HTMLElement} */
|
|
34
|
+
n(this, O);
|
|
35
|
+
/** @type {HTMLElement} */
|
|
36
|
+
n(this, v);
|
|
37
|
+
/** @type {HTMLElement} */
|
|
38
|
+
n(this, y);
|
|
39
|
+
/** @type {HTMLElement} */
|
|
40
|
+
n(this, S);
|
|
41
|
+
n(this, g, new AbortController());
|
|
42
|
+
n(this, i, {
|
|
43
|
+
hour: 0,
|
|
44
|
+
minute: 0,
|
|
45
|
+
second: 0,
|
|
46
|
+
isScrolling: !1,
|
|
47
|
+
isAutoScrolling: !1,
|
|
48
|
+
scrollTimeout: null,
|
|
49
|
+
isFirstOpen: !0
|
|
50
|
+
});
|
|
51
|
+
C(this, "state", this.properties({
|
|
52
|
+
label: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "",
|
|
55
|
+
observer: async (s) => {
|
|
56
|
+
await customElements.whenDefined("ea-input"), t(this, u).label = s;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
value: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "",
|
|
62
|
+
observer: (s) => {
|
|
63
|
+
this.setValue(s), s && (t(this, M).call(this, s), t(this, D).call(this), t(this, L).call(this));
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
width: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "",
|
|
69
|
+
observer: (s) => {
|
|
70
|
+
t(this, f) && t(this, f).style.setProperty("--ea-time-picker-width", s);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
disabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1,
|
|
76
|
+
observer: (s) => {
|
|
77
|
+
t(this, u) && t(this, u).toggleAttribute("disabled", s), this.updateContainerClasslist();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
align: {
|
|
81
|
+
type: ["left", "center", "right"],
|
|
82
|
+
default: "left",
|
|
83
|
+
observer: () => {
|
|
84
|
+
this.updateContainerClasslist();
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
size: {
|
|
88
|
+
type: nt,
|
|
89
|
+
default: "",
|
|
90
|
+
observer: (s) => {
|
|
91
|
+
t(this, u).setAttribute("size", s);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"limit-range-start": {
|
|
95
|
+
type: String,
|
|
96
|
+
default: "00:00:00"
|
|
97
|
+
},
|
|
98
|
+
"limit-range-end": {
|
|
99
|
+
type: String,
|
|
100
|
+
default: "23:59:59"
|
|
101
|
+
},
|
|
102
|
+
required: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: !1,
|
|
105
|
+
observer: async (s) => {
|
|
106
|
+
await customElements.whenDefined("ea-input"), t(this, u).toggleAttribute("required", s);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
110
|
+
/**
|
|
111
|
+
* 生成时间项HTML
|
|
112
|
+
* @param {number} start
|
|
113
|
+
* @param {number} end
|
|
114
|
+
* @param {string} type
|
|
115
|
+
* @return {string}
|
|
116
|
+
*/
|
|
117
|
+
n(this, $, (s, e, l) => {
|
|
118
|
+
const o = this.ns, h = [], d = l === "hour" ? 23 : 59;
|
|
119
|
+
for (let c = 0; c <= d; c++) {
|
|
120
|
+
const b = c < s || c > e, p = t(this, A).call(this, c);
|
|
121
|
+
h.push(
|
|
122
|
+
`<li class="${o.e("dropdown-item")} ${b ? "is-disabled" : ""}" data-value="${c}" part="dropdown-item">${p}</li>`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return h.join("");
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* 解析时间值
|
|
129
|
+
* @param {string} value
|
|
130
|
+
*/
|
|
131
|
+
n(this, M, (s) => {
|
|
132
|
+
const [e = 0, l = 0, o = 0] = s.split(":").map(Number);
|
|
133
|
+
t(this, i).hour = e, t(this, i).minute = l, t(this, i).second = o;
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* 格式化数字
|
|
137
|
+
* @param {number} num
|
|
138
|
+
* @return {string}
|
|
139
|
+
*/
|
|
140
|
+
n(this, A, (s) => s < 10 ? `0${s}` : String(s));
|
|
141
|
+
/**
|
|
142
|
+
* 更新输入框值
|
|
143
|
+
*/
|
|
144
|
+
n(this, D, () => {
|
|
145
|
+
t(this, u) && (t(this, u).value = t(this, H, G));
|
|
146
|
+
});
|
|
147
|
+
/**
|
|
148
|
+
* 更新选中状态
|
|
149
|
+
*/
|
|
150
|
+
n(this, L, () => {
|
|
151
|
+
t(this, E).call(this, t(this, v), t(this, i).hour), t(this, E).call(this, t(this, y), t(this, i).minute), t(this, E).call(this, t(this, S), t(this, i).second);
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* 更新单个容器的选中状态
|
|
155
|
+
* @param {HTMLElement} wrap
|
|
156
|
+
* @param {number} value
|
|
157
|
+
*/
|
|
158
|
+
n(this, E, (s, e) => {
|
|
159
|
+
if (!s) return;
|
|
160
|
+
s.querySelectorAll("li").forEach((o) => {
|
|
161
|
+
const h = parseInt(o.dataset.value, 10);
|
|
162
|
+
o.classList.toggle("is-active", h === e);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* 获取最接近目标值的可用选项
|
|
167
|
+
* @param {HTMLElement} wrap
|
|
168
|
+
* @param {number} targetValue
|
|
169
|
+
* @return {number|null}
|
|
170
|
+
*/
|
|
171
|
+
n(this, k, (s, e) => {
|
|
172
|
+
if (!s) return null;
|
|
173
|
+
const l = s.querySelectorAll("li:not(.is-disabled)");
|
|
174
|
+
if (!l.length) return null;
|
|
175
|
+
let o = null, h = 1 / 0;
|
|
176
|
+
return l.forEach((d) => {
|
|
177
|
+
const c = parseInt(d.dataset.value, 10), b = Math.abs(c - e);
|
|
178
|
+
b < h && (h = b, o = c);
|
|
179
|
+
}), o;
|
|
180
|
+
});
|
|
181
|
+
/**
|
|
182
|
+
* 检查是否设置了 Limited Range
|
|
183
|
+
* @return {boolean}
|
|
184
|
+
*/
|
|
185
|
+
n(this, B, () => this.hasAttribute("limit-range-start") || this.hasAttribute("limit-range-end"));
|
|
186
|
+
/**
|
|
187
|
+
* 根据 limit-range 设置时间项的禁用状态
|
|
188
|
+
*/
|
|
189
|
+
n(this, P, () => {
|
|
190
|
+
const [s, e, l] = this["limit-range-start"].split(":").map(Number), [o, h, d] = this["limit-range-end"].split(":").map(Number);
|
|
191
|
+
t(this, I).call(this, t(this, v), s, o), t(this, I).call(this, t(this, y), e, h), t(this, I).call(this, t(this, S), l, d);
|
|
192
|
+
});
|
|
193
|
+
/**
|
|
194
|
+
* 应用范围到指定容器
|
|
195
|
+
* @param {HTMLElement} wrap
|
|
196
|
+
* @param {number} start
|
|
197
|
+
* @param {number} end
|
|
198
|
+
*/
|
|
199
|
+
n(this, I, (s, e, l) => {
|
|
200
|
+
if (!s) return;
|
|
201
|
+
s.querySelectorAll("li").forEach((h) => {
|
|
202
|
+
const d = parseInt(h.dataset.value, 10), c = d < e || d > l;
|
|
203
|
+
h.classList.toggle("is-disabled", c);
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
/**
|
|
207
|
+
* 打开下拉框
|
|
208
|
+
*/
|
|
209
|
+
n(this, x, () => {
|
|
210
|
+
if (this.disabled) return;
|
|
211
|
+
const s = t(this, f).classList.contains("is-open");
|
|
212
|
+
if (t(this, f).classList.add("is-open"), this.updateContainerClasslist(), s || this.dispatchEvent(new Q({ visible: !0 })), t(this, i).isFirstOpen) {
|
|
213
|
+
const e = this.value && this.value.trim() !== "", l = t(this, B).call(this);
|
|
214
|
+
if (!e && l) {
|
|
215
|
+
const o = /* @__PURE__ */ new Date(), h = o.getHours(), d = o.getMinutes(), c = o.getSeconds(), b = t(this, k).call(this, t(this, v), h), p = t(this, k).call(this, t(this, y), d), m = t(this, k).call(this, t(this, S), c);
|
|
216
|
+
b !== null && (t(this, i).hour = b, t(this, T).call(this, t(this, v), b, !1)), p !== null && (t(this, i).minute = p, t(this, T).call(this, t(this, y), p, !1)), m !== null && (t(this, i).second = m, t(this, T).call(this, t(this, S), m, !1)), t(this, L).call(this);
|
|
217
|
+
} else
|
|
218
|
+
t(this, T).call(this, t(this, v), t(this, i).hour, !1), t(this, T).call(this, t(this, y), t(this, i).minute, !1), t(this, T).call(this, t(this, S), t(this, i).second, !1);
|
|
219
|
+
t(this, i).isFirstOpen = !1;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
/**
|
|
223
|
+
* 关闭下拉框
|
|
224
|
+
*/
|
|
225
|
+
n(this, V, () => {
|
|
226
|
+
const s = t(this, f).classList.contains("is-open");
|
|
227
|
+
t(this, f).classList.remove("is-open"), this.updateContainerClasslist(), s && this.dispatchEvent(
|
|
228
|
+
new Q({ visible: !1 })
|
|
229
|
+
);
|
|
230
|
+
});
|
|
231
|
+
/**
|
|
232
|
+
* 切换下拉框显示状态
|
|
233
|
+
*/
|
|
234
|
+
n(this, W, () => {
|
|
235
|
+
this.disabled || (t(this, f).classList.contains("is-open") ? t(this, V).call(this) : t(this, x).call(this));
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* 点击外部关闭下拉
|
|
239
|
+
* @param {MouseEvent} e
|
|
240
|
+
*/
|
|
241
|
+
n(this, F, (s) => {
|
|
242
|
+
const e = s.composedPath();
|
|
243
|
+
e.includes(this) || e.includes(this.shadowRoot) || t(this, V).call(this);
|
|
244
|
+
});
|
|
245
|
+
/**
|
|
246
|
+
* 输入框焦点事件
|
|
247
|
+
*/
|
|
248
|
+
n(this, z, () => {
|
|
249
|
+
this.emit("focus");
|
|
250
|
+
});
|
|
251
|
+
/**
|
|
252
|
+
* 输入框失焦事件
|
|
253
|
+
*/
|
|
254
|
+
n(this, _, () => {
|
|
255
|
+
this.emit("blur");
|
|
256
|
+
});
|
|
257
|
+
/**
|
|
258
|
+
* 滚动到指定值
|
|
259
|
+
* @param {HTMLElement} wrap
|
|
260
|
+
* @param {number} value
|
|
261
|
+
* @param {boolean} smooth
|
|
262
|
+
*/
|
|
263
|
+
n(this, T, (s, e, l = !0) => {
|
|
264
|
+
if (!s) return;
|
|
265
|
+
const o = s.querySelectorAll("li:not(.is-disabled)");
|
|
266
|
+
if (!o.length) return;
|
|
267
|
+
const h = o[0].getBoundingClientRect().height, d = s.querySelector(`li[data-value="${e}"]`);
|
|
268
|
+
if (d && !d.classList.contains("is-disabled")) {
|
|
269
|
+
const c = h * e - 1;
|
|
270
|
+
s.scrollTo({ top: c, behavior: l ? "smooth" : "auto" });
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* 处理时间列表滚动停止
|
|
275
|
+
* @param {HTMLElement} wrap
|
|
276
|
+
* @param {string} type
|
|
277
|
+
*/
|
|
278
|
+
n(this, j, (s, e) => {
|
|
279
|
+
t(this, i).scrollTimeout && clearTimeout(t(this, i).scrollTimeout), t(this, i).scrollTimeout = Z(() => {
|
|
280
|
+
if (t(this, i).isAutoScrolling) return;
|
|
281
|
+
const l = s.querySelectorAll("li"), o = s.querySelectorAll("li:not(.is-disabled)");
|
|
282
|
+
if (!o.length) return;
|
|
283
|
+
const h = o[0].getBoundingClientRect().height, { scrollTop: d } = s, c = Math.round(d / h), b = Math.max(0, Math.min(l.length - 1, c));
|
|
284
|
+
let p = l[b];
|
|
285
|
+
if (p && p.classList.contains("is-disabled")) {
|
|
286
|
+
for (let m = b; m < l.length; m++)
|
|
287
|
+
if (!l[m].classList.contains("is-disabled")) {
|
|
288
|
+
p = l[m];
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
if (p.classList.contains("is-disabled")) {
|
|
292
|
+
for (let m = b; m >= 0; m--)
|
|
293
|
+
if (!l[m].classList.contains("is-disabled")) {
|
|
294
|
+
p = l[m];
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (p && !p.classList.contains("is-disabled")) {
|
|
300
|
+
const m = parseInt(p.dataset.value, 10);
|
|
301
|
+
t(this, N).call(this, e, m);
|
|
302
|
+
const X = h * m;
|
|
303
|
+
t(this, i).isAutoScrolling = !0, s.scrollTo({ top: X, behavior: "smooth" }), Z(() => {
|
|
304
|
+
t(this, i).isAutoScrolling = !1;
|
|
305
|
+
}, 300);
|
|
306
|
+
}
|
|
307
|
+
t(this, i).isScrolling = !1;
|
|
308
|
+
}, 150);
|
|
309
|
+
});
|
|
310
|
+
/**
|
|
311
|
+
* 设置时间值
|
|
312
|
+
* @param {string} type
|
|
313
|
+
* @param {number} value
|
|
314
|
+
*/
|
|
315
|
+
n(this, N, (s, e) => {
|
|
316
|
+
switch (s) {
|
|
317
|
+
case "hour":
|
|
318
|
+
t(this, i).hour = e;
|
|
319
|
+
break;
|
|
320
|
+
case "minute":
|
|
321
|
+
t(this, i).minute = e;
|
|
322
|
+
break;
|
|
323
|
+
case "second":
|
|
324
|
+
t(this, i).second = e;
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
const l = t(this, H, G);
|
|
328
|
+
this.setAttribute("value", l), t(this, D).call(this), t(this, L).call(this), this.emit("change", { detail: { value: l } });
|
|
329
|
+
});
|
|
330
|
+
/**
|
|
331
|
+
* 处理时间项点击
|
|
332
|
+
* @param {HTMLElement} wrap
|
|
333
|
+
* @param {string} type
|
|
334
|
+
*/
|
|
335
|
+
n(this, q, (s, e) => {
|
|
336
|
+
s.addEventListener(
|
|
337
|
+
"click",
|
|
338
|
+
(l) => {
|
|
339
|
+
const o = l.target.closest("li");
|
|
340
|
+
if (!o || o.classList.contains("is-disabled")) return;
|
|
341
|
+
const h = parseInt(o.dataset.value, 10);
|
|
342
|
+
t(this, N).call(this, e, h);
|
|
343
|
+
const c = o.getBoundingClientRect().height * h;
|
|
344
|
+
t(this, i).isAutoScrolling = !0, t(this, i).scrollTimeout && clearTimeout(t(this, i).scrollTimeout), s.scrollTo({ top: c, behavior: "smooth" }), Z(() => {
|
|
345
|
+
t(this, i).isAutoScrolling = !1;
|
|
346
|
+
}, 1e3);
|
|
347
|
+
},
|
|
348
|
+
{ signal: t(this, g).signal }
|
|
349
|
+
);
|
|
350
|
+
});
|
|
351
|
+
/**
|
|
352
|
+
* 处理时间列表滚动
|
|
353
|
+
* @param {HTMLElement} wrap
|
|
354
|
+
* @param {string} type
|
|
355
|
+
*/
|
|
356
|
+
n(this, R, (s, e) => {
|
|
357
|
+
s.addEventListener(
|
|
358
|
+
"scroll",
|
|
359
|
+
() => {
|
|
360
|
+
t(this, i).isScrolling = !0, t(this, j).call(this, s, e);
|
|
361
|
+
},
|
|
362
|
+
{ signal: t(this, g).signal }
|
|
363
|
+
);
|
|
364
|
+
});
|
|
365
|
+
/**
|
|
366
|
+
* 绑定事件
|
|
367
|
+
*/
|
|
368
|
+
n(this, U, () => {
|
|
369
|
+
var s;
|
|
370
|
+
(s = t(this, g)) == null || s.abort(), w(this, g, new AbortController()), t(this, u).addEventListener("click", t(this, W), {
|
|
371
|
+
signal: t(this, g).signal
|
|
372
|
+
}), t(this, u).addEventListener("focus", t(this, z), {
|
|
373
|
+
signal: t(this, g).signal
|
|
374
|
+
}), t(this, u).addEventListener("blur", t(this, _), {
|
|
375
|
+
signal: t(this, g).signal
|
|
376
|
+
}), window.addEventListener("click", t(this, F), {
|
|
377
|
+
signal: t(this, g).signal
|
|
378
|
+
}), t(this, q).call(this, t(this, v), "hour"), t(this, q).call(this, t(this, y), "minute"), t(this, q).call(this, t(this, S), "second"), t(this, R).call(this, t(this, v), "hour"), t(this, R).call(this, t(this, y), "minute"), t(this, R).call(this, t(this, S), "second");
|
|
379
|
+
});
|
|
380
|
+
/**
|
|
381
|
+
* 使组件获取焦点
|
|
382
|
+
* @return {void}
|
|
383
|
+
*/
|
|
384
|
+
C(this, "focus", () => {
|
|
385
|
+
t(this, u).focus();
|
|
386
|
+
});
|
|
387
|
+
/**
|
|
388
|
+
* 使组件失去焦点
|
|
389
|
+
* @return {void}
|
|
390
|
+
*/
|
|
391
|
+
C(this, "blur", () => {
|
|
392
|
+
t(this, u).blur();
|
|
393
|
+
});
|
|
394
|
+
/**
|
|
395
|
+
* 打开时间选择器弹窗
|
|
396
|
+
* @return {void}
|
|
397
|
+
*/
|
|
398
|
+
C(this, "handleOpen", () => {
|
|
399
|
+
t(this, x).call(this);
|
|
400
|
+
});
|
|
401
|
+
/**
|
|
402
|
+
* 关闭时间选择器弹窗
|
|
403
|
+
* @return {void}
|
|
404
|
+
*/
|
|
405
|
+
C(this, "handleClose", () => {
|
|
406
|
+
t(this, V).call(this);
|
|
407
|
+
});
|
|
408
|
+
this.stylesheet = it, this.$render();
|
|
409
|
+
}
|
|
410
|
+
static get observedAttributes() {
|
|
411
|
+
return [
|
|
412
|
+
...super.observedAttributes,
|
|
413
|
+
"label",
|
|
414
|
+
"value",
|
|
415
|
+
"width",
|
|
416
|
+
"size",
|
|
417
|
+
"disabled",
|
|
418
|
+
"align",
|
|
419
|
+
"limit-range-start",
|
|
420
|
+
"limit-range-end"
|
|
421
|
+
];
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* 获取 classlist 列表
|
|
425
|
+
* @return {string} 属性值
|
|
426
|
+
*/
|
|
427
|
+
updateContainerClasslist() {
|
|
428
|
+
var e;
|
|
429
|
+
const s = this.computedClasslist(
|
|
430
|
+
"ea-time-picker",
|
|
431
|
+
{},
|
|
432
|
+
{
|
|
433
|
+
disabled: this.disabled,
|
|
434
|
+
open: (e = t(this, f)) == null ? void 0 : e.classList.contains("is-open"),
|
|
435
|
+
[`align-${this.align}`]: this.align
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
return t(this, f) && (t(this, f).className = s), s;
|
|
439
|
+
}
|
|
440
|
+
$render() {
|
|
441
|
+
const s = et("time-picker");
|
|
442
|
+
this.ns = s, this.shadowRoot.innerHTML = this.html(`
|
|
443
|
+
<div class='${s.b()}' part='container'>
|
|
444
|
+
<ea-input
|
|
445
|
+
class="${s.e("input")}"
|
|
446
|
+
part='input'
|
|
447
|
+
autocomplete="off"
|
|
448
|
+
readonly
|
|
449
|
+
prefix-icon="icon-clock"
|
|
450
|
+
></ea-input>
|
|
451
|
+
<div class="${s.e("dropdown")}" part='dropdown'>
|
|
452
|
+
<div class="${s.e("dropdown-inner-wrap")}" part='dropdown-inner-wrap'>
|
|
453
|
+
<ul class="${s.e("dropdown-inner")} ${s.m("hour")}" part='dropdown-time'>
|
|
454
|
+
${t(this, $).call(this, 0, 23, "hour")}
|
|
455
|
+
</ul>
|
|
456
|
+
<ul class="${s.e("dropdown-inner")} ${s.m("minute")}" part='dropdown-time'>
|
|
457
|
+
${t(this, $).call(this, 0, 59, "minute")}
|
|
458
|
+
</ul>
|
|
459
|
+
<ul class="${s.e("dropdown-inner")} ${s.m("second")}" part='dropdown-time'>
|
|
460
|
+
${t(this, $).call(this, 0, 59, "second")}
|
|
461
|
+
</ul>
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
</div>
|
|
465
|
+
`), w(this, f, this.shadowRoot.querySelector(s.cb())), w(this, u, this.shadowRoot.querySelector(s.ce("input"))), w(this, O, this.shadowRoot.querySelector(s.ce("dropdown"))), w(this, v, this.shadowRoot.querySelector(s.cm("hour"))), w(this, y, this.shadowRoot.querySelector(s.cm("minute"))), w(this, S, this.shadowRoot.querySelector(s.cm("second")));
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* 获取验证目标元素
|
|
469
|
+
* @returns {HTMLElement}
|
|
470
|
+
*/
|
|
471
|
+
get validationTarget() {
|
|
472
|
+
return t(this, u);
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 更新表单验证状态
|
|
476
|
+
*/
|
|
477
|
+
updateValidity() {
|
|
478
|
+
const s = this.value !== "" && this.value != null;
|
|
479
|
+
this.required && !s ? this.internals.setValidity(
|
|
480
|
+
{ valueMissing: !0 },
|
|
481
|
+
"请选择时间",
|
|
482
|
+
this
|
|
483
|
+
) : this.internals.setValidity({}, "", this);
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* 检查表单字段的有效性
|
|
487
|
+
* @returns {boolean}
|
|
488
|
+
*/
|
|
489
|
+
checkValidity() {
|
|
490
|
+
return this.updateValidity(), this.internals.validity.valid;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* 报告表单字段的有效性(显示验证提示)
|
|
494
|
+
* @returns {boolean}
|
|
495
|
+
*/
|
|
496
|
+
reportValidity() {
|
|
497
|
+
return this.updateValidity(), this.internals.reportValidity();
|
|
498
|
+
}
|
|
499
|
+
connectedCallback() {
|
|
500
|
+
var s;
|
|
501
|
+
super.connectedCallback(), (s = t(this, g)) == null || s.abort(), w(this, g, new AbortController()), t(this, P).call(this), t(this, U).call(this), this.hasAttribute("value") && t(this, M).call(this, this.value);
|
|
502
|
+
}
|
|
503
|
+
$beforeUnmounted() {
|
|
504
|
+
var s;
|
|
505
|
+
(s = t(this, g)) == null || s.abort(), t(this, i).scrollTimeout && clearTimeout(t(this, i).scrollTimeout);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
f = new WeakMap(), u = new WeakMap(), O = new WeakMap(), v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), g = new WeakMap(), i = new WeakMap(), $ = new WeakMap(), M = new WeakMap(), H = new WeakSet(), G = function() {
|
|
509
|
+
return `${t(this, A).call(this, t(this, i).hour)}:${t(this, A).call(this, t(this, i).minute)}:${t(this, A).call(this, t(this, i).second)}`;
|
|
510
|
+
}, A = new WeakMap(), D = new WeakMap(), L = new WeakMap(), E = new WeakMap(), k = new WeakMap(), B = new WeakMap(), P = new WeakMap(), I = new WeakMap(), x = new WeakMap(), V = new WeakMap(), W = new WeakMap(), F = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), T = new WeakMap(), j = new WeakMap(), N = new WeakMap(), q = new WeakMap(), R = new WeakMap(), U = new WeakMap();
|
|
511
|
+
customElements.get("ea-time-picker") || customElements.define("ea-time-picker", lt);
|
|
512
|
+
export {
|
|
513
|
+
lt as EaTimePicker
|
|
514
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var u = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var C = (t, s, e) => s in t ? b(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
6
|
+
var y = (t, s, e) => C(t, typeof s != "symbol" ? s + "" : s, e), w = (t, s, e) => s.has(t) || u("Cannot " + e);
|
|
7
|
+
var a = (t, s, e) => (w(t, s, "read from private field"), e ? e.call(t) : s.get(t)), i = (t, s, e) => s.has(t) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), o = (t, s, e, h) => (w(t, s, "write to private field"), h ? h.call(t, e) : s.set(t, e), e);
|
|
8
|
+
import { B as f } from "./Base.js";
|
|
9
|
+
import { s as _ } from "../css/ea-timeline.style.js";
|
|
10
|
+
import { s as v } from "../css/ea-timeline-item.style.js";
|
|
11
|
+
import { c as S } from "../utils/Variables.js";
|
|
12
|
+
class g extends f {
|
|
13
|
+
static get observedAttributes() {
|
|
14
|
+
return [...super.observedAttributes];
|
|
15
|
+
}
|
|
16
|
+
constructor() {
|
|
17
|
+
super(), this.stylesheet = _, this.$render();
|
|
18
|
+
}
|
|
19
|
+
$render() {
|
|
20
|
+
this.shadowRoot.innerHTML = `
|
|
21
|
+
<div class='ea-timeline' part='container'>
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</div>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
super.connectedCallback();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
window.customElements.get("ea-timeline") || window.customElements.define("ea-timeline", g);
|
|
31
|
+
var n, m, r, c, p, d, l;
|
|
32
|
+
class R extends f {
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
/** @type {HTMLElement} */
|
|
36
|
+
i(this, n);
|
|
37
|
+
/** @type {HTMLElement} */
|
|
38
|
+
i(this, m);
|
|
39
|
+
/** @type {HTMLElement} */
|
|
40
|
+
i(this, r);
|
|
41
|
+
/** @type {HTMLElement} */
|
|
42
|
+
i(this, c);
|
|
43
|
+
/** @type {HTMLElement} */
|
|
44
|
+
i(this, p);
|
|
45
|
+
/** @type {HTMLElement} */
|
|
46
|
+
i(this, d);
|
|
47
|
+
/** @type {HTMLElement} */
|
|
48
|
+
i(this, l);
|
|
49
|
+
y(this, "state", this.properties({
|
|
50
|
+
type: {
|
|
51
|
+
type: S,
|
|
52
|
+
default: "",
|
|
53
|
+
observer: (e) => {
|
|
54
|
+
this.updateContainerClasslist();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
timestamp: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "",
|
|
60
|
+
observer: (e) => {
|
|
61
|
+
a(this, l).textContent = e;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"hide-timestamp": {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1,
|
|
67
|
+
observer: (e) => {
|
|
68
|
+
a(this, l).style.display = e ? "none" : "block";
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
color: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "",
|
|
74
|
+
observer: (e) => {
|
|
75
|
+
if (!CSS.supports("color", e))
|
|
76
|
+
return console.warn(
|
|
77
|
+
`[EaTag] The color value ${e} is not supported.`
|
|
78
|
+
);
|
|
79
|
+
a(this, r) && (this.style.setProperty("--ea-timeline-item-dot-color", e), a(this, r).style.borderColor = e);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
hollow: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: !1,
|
|
85
|
+
observer: (e) => {
|
|
86
|
+
this.updateContainerClasslist();
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
icon: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: "",
|
|
92
|
+
observer: (e) => {
|
|
93
|
+
a(this, r).innerHTML = `<ea-icon class="ea-timeline-item__icon-dot" part='icon-dot' icon="${e}"></ea-icon>`;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
size: {
|
|
97
|
+
type: ["normal", "large"],
|
|
98
|
+
default: "",
|
|
99
|
+
observer: (e) => {
|
|
100
|
+
this.updateContainerClasslist();
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
placement: {
|
|
104
|
+
type: ["top", "bottom"],
|
|
105
|
+
default: "",
|
|
106
|
+
observer: (e) => {
|
|
107
|
+
this.updateContainerClasslist();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
center: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !1,
|
|
113
|
+
observer: (e) => {
|
|
114
|
+
this.updateContainerClasslist();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}));
|
|
118
|
+
this.stylesheet = v, this.$render();
|
|
119
|
+
}
|
|
120
|
+
static get observedAttributes() {
|
|
121
|
+
return [
|
|
122
|
+
...super.observedAttributes,
|
|
123
|
+
"type",
|
|
124
|
+
"timestamp",
|
|
125
|
+
"hide-timestamp",
|
|
126
|
+
"color",
|
|
127
|
+
"hollow",
|
|
128
|
+
"icon",
|
|
129
|
+
"placement",
|
|
130
|
+
"size",
|
|
131
|
+
"center"
|
|
132
|
+
];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* 获取 classlist 列表
|
|
136
|
+
* @return {string} 属性值
|
|
137
|
+
*/
|
|
138
|
+
updateContainerClasslist() {
|
|
139
|
+
const e = this.computedClasslist(
|
|
140
|
+
"ea-timeline-item",
|
|
141
|
+
{
|
|
142
|
+
["--" + this.type]: this.type,
|
|
143
|
+
["--" + this.size]: this.size,
|
|
144
|
+
["--" + this.placement]: this.placement,
|
|
145
|
+
"--center": this.center
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"hollow-dot": this.hollow
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
return a(this, n).className = e, e;
|
|
152
|
+
}
|
|
153
|
+
$render() {
|
|
154
|
+
this.shadowRoot.innerHTML = `
|
|
155
|
+
<div class='ea-timeline-item' part='container'>
|
|
156
|
+
<aside class="ea-timeline-item__wrapper" part='left-wrapper'>
|
|
157
|
+
<slot name="dot">
|
|
158
|
+
<section class="ea-timeline-item__dot" part='dot'></section>
|
|
159
|
+
</slot>
|
|
160
|
+
<section class="ea-timeline-item__tail" part='tail'></section>
|
|
161
|
+
</aside>
|
|
162
|
+
<main class="ea-timeline-item__wrapper right-wrapper" part='right-wrapper'>
|
|
163
|
+
<header class="ea-timeline-item__content" part='content'>
|
|
164
|
+
<slot></slot>
|
|
165
|
+
</header>
|
|
166
|
+
<footer class='ea-timeline-item__timestamp' part='timestamp'>
|
|
167
|
+
<slot name="timestamp"></slot>
|
|
168
|
+
</footer>
|
|
169
|
+
</main>
|
|
170
|
+
</div>
|
|
171
|
+
`, o(this, n, this.shadowRoot.querySelector(".ea-timeline-item")), o(this, m, this.shadowRoot.querySelector("slot[name='dot']")), o(this, r, this.shadowRoot.querySelector(".ea-timeline-item__dot")), o(this, c, this.shadowRoot.querySelector(".ea-timeline-item__tail")), o(this, p, this.shadowRoot.querySelector(".ea-timeline-item__content")), o(this, d, this.shadowRoot.querySelector(
|
|
172
|
+
".ea-timeline-item__timestamp"
|
|
173
|
+
)), o(this, l, this.shadowRoot.querySelector(
|
|
174
|
+
'slot[name="timestamp"]'
|
|
175
|
+
)), this.updateContainerClasslist();
|
|
176
|
+
}
|
|
177
|
+
connectedCallback() {
|
|
178
|
+
super.connectedCallback();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
n = new WeakMap(), m = new WeakMap(), r = new WeakMap(), c = new WeakMap(), p = new WeakMap(), d = new WeakMap(), l = new WeakMap();
|
|
182
|
+
window.customElements.get("ea-timeline-item") || window.customElements.define("ea-timeline-item", R);
|
|
183
|
+
export {
|
|
184
|
+
g as EaTimeline,
|
|
185
|
+
R as EaTimelineItem
|
|
186
|
+
};
|