@tylertech/forge 2.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 +202 -0
- package/README.md +124 -0
- package/dist/busy-indicator/forge-busy-indicator.css +6 -0
- package/dist/button/forge-button.css +6 -0
- package/dist/dialog/forge-dialog-utils.css +6 -0
- package/dist/dialog/forge-dialog.css +6 -0
- package/dist/expansion-panel/forge-expansion-panel.css +6 -0
- package/dist/floating-action-button/forge-floating-action-button.css +6 -0
- package/dist/floating-label/forge-floating-label.css +6 -0
- package/dist/forge-core.css +6 -0
- package/dist/forge-dark.css +6 -0
- package/dist/forge.css +6 -0
- package/dist/form-field/forge-form-field.css +6 -0
- package/dist/icon-button/forge-icon-button.css +6 -0
- package/dist/popup/forge-popup.css +6 -0
- package/dist/quantity-field/forge-quantity-field.css +6 -0
- package/dist/ripple/forge-ripple.css +6 -0
- package/dist/scaffold/forge-scaffold.css +6 -0
- package/dist/table/forge-table.css +6 -0
- package/dist/theme/forge-theme.css +6 -0
- package/dist/tooltip/forge-tooltip.css +6 -0
- package/dist/typography/forge-form.css +6 -0
- package/dist/typography/forge-typography.css +6 -0
- package/dist/utils/forge-flex.css +6 -0
- package/dist/utils/forge-grid.css +6 -0
- package/dist/utils/forge-utils.css +6 -0
- package/esm/accordion/accordion-adapter.d.ts +48 -0
- package/esm/accordion/accordion-adapter.js +63 -0
- package/esm/accordion/accordion-constants.d.ts +11 -0
- package/esm/accordion/accordion-constants.js +14 -0
- package/esm/accordion/accordion-foundation.d.ts +27 -0
- package/esm/accordion/accordion-foundation.js +61 -0
- package/esm/accordion/accordion.d.ts +30 -0
- package/esm/accordion/accordion.js +52 -0
- package/esm/accordion/index.d.ts +10 -0
- package/esm/accordion/index.js +14 -0
- package/esm/app-bar/app-bar-adapter.d.ts +43 -0
- package/esm/app-bar/app-bar-adapter.js +60 -0
- package/esm/app-bar/app-bar-constants.d.ts +33 -0
- package/esm/app-bar/app-bar-constants.js +37 -0
- package/esm/app-bar/app-bar-foundation.d.ts +35 -0
- package/esm/app-bar/app-bar-foundation.js +70 -0
- package/esm/app-bar/app-bar.d.ts +34 -0
- package/esm/app-bar/app-bar.js +71 -0
- package/esm/app-bar/help-button/app-bar-help-button-adapter.d.ts +18 -0
- package/esm/app-bar/help-button/app-bar-help-button-adapter.js +19 -0
- package/esm/app-bar/help-button/app-bar-help-button-constants.d.ts +8 -0
- package/esm/app-bar/help-button/app-bar-help-button-constants.js +10 -0
- package/esm/app-bar/help-button/app-bar-help-button-foundation.d.ts +21 -0
- package/esm/app-bar/help-button/app-bar-help-button-foundation.js +29 -0
- package/esm/app-bar/help-button/app-bar-help-button.d.ts +23 -0
- package/esm/app-bar/help-button/app-bar-help-button.js +48 -0
- package/esm/app-bar/help-button/index.d.ts +10 -0
- package/esm/app-bar/help-button/index.js +14 -0
- package/esm/app-bar/index.d.ts +16 -0
- package/esm/app-bar/index.js +20 -0
- package/esm/app-bar/menu-button/app-bar-menu-button-constants.d.ts +8 -0
- package/esm/app-bar/menu-button/app-bar-menu-button-constants.js +10 -0
- package/esm/app-bar/menu-button/app-bar-menu-button.d.ts +17 -0
- package/esm/app-bar/menu-button/app-bar-menu-button.js +34 -0
- package/esm/app-bar/menu-button/index.d.ts +8 -0
- package/esm/app-bar/menu-button/index.js +12 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +23 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +28 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.d.ts +14 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.js +17 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +32 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +79 -0
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +29 -0
- package/esm/app-bar/notification-button/app-bar-notification-button.js +78 -0
- package/esm/app-bar/notification-button/index.d.ts +10 -0
- package/esm/app-bar/notification-button/index.js +14 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +34 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +72 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.d.ts +31 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +25 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +66 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +199 -0
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +42 -0
- package/esm/app-bar/profile-button/app-bar-profile-button.js +112 -0
- package/esm/app-bar/profile-button/index.d.ts +10 -0
- package/esm/app-bar/profile-button/index.js +14 -0
- package/esm/app-bar/search/app-bar-search-adapter.d.ts +59 -0
- package/esm/app-bar/search/app-bar-search-adapter.js +73 -0
- package/esm/app-bar/search/app-bar-search-constants.d.ts +38 -0
- package/esm/app-bar/search/app-bar-search-constants.js +42 -0
- package/esm/app-bar/search/app-bar-search-foundation.d.ts +62 -0
- package/esm/app-bar/search/app-bar-search-foundation.js +126 -0
- package/esm/app-bar/search/app-bar-search.d.ts +52 -0
- package/esm/app-bar/search/app-bar-search.js +101 -0
- package/esm/app-bar/search/index.d.ts +10 -0
- package/esm/app-bar/search/index.js +14 -0
- package/esm/autocomplete/autocomplete-adapter.d.ts +90 -0
- package/esm/autocomplete/autocomplete-adapter.js +222 -0
- package/esm/autocomplete/autocomplete-component-delegate.d.ts +34 -0
- package/esm/autocomplete/autocomplete-component-delegate.js +76 -0
- package/esm/autocomplete/autocomplete-constants.d.ts +68 -0
- package/esm/autocomplete/autocomplete-constants.js +49 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +175 -0
- package/esm/autocomplete/autocomplete-foundation.js +857 -0
- package/esm/autocomplete/autocomplete-utils.d.ts +22 -0
- package/esm/autocomplete/autocomplete-utils.js +36 -0
- package/esm/autocomplete/autocomplete.d.ts +85 -0
- package/esm/autocomplete/autocomplete.js +162 -0
- package/esm/autocomplete/index.d.ts +12 -0
- package/esm/autocomplete/index.js +16 -0
- package/esm/avatar/avatar-adapter.d.ts +42 -0
- package/esm/avatar/avatar-adapter.js +63 -0
- package/esm/avatar/avatar-component-delegate.d.ts +16 -0
- package/esm/avatar/avatar-component-delegate.js +15 -0
- package/esm/avatar/avatar-constants.d.ts +25 -0
- package/esm/avatar/avatar-constants.js +32 -0
- package/esm/avatar/avatar-foundation.d.ts +47 -0
- package/esm/avatar/avatar-foundation.js +119 -0
- package/esm/avatar/avatar.d.ts +36 -0
- package/esm/avatar/avatar.js +71 -0
- package/esm/avatar/index.d.ts +11 -0
- package/esm/avatar/index.js +15 -0
- package/esm/backdrop/backdrop-adapter.d.ts +36 -0
- package/esm/backdrop/backdrop-adapter.js +40 -0
- package/esm/backdrop/backdrop-constants.d.ts +26 -0
- package/esm/backdrop/backdrop-constants.js +31 -0
- package/esm/backdrop/backdrop-foundation.d.ts +38 -0
- package/esm/backdrop/backdrop-foundation.js +82 -0
- package/esm/backdrop/backdrop.d.ts +51 -0
- package/esm/backdrop/backdrop.js +85 -0
- package/esm/backdrop/index.d.ts +10 -0
- package/esm/backdrop/index.js +14 -0
- package/esm/badge/badge-adapter.d.ts +17 -0
- package/esm/badge/badge-adapter.js +20 -0
- package/esm/badge/badge-component-delegate.d.ts +16 -0
- package/esm/badge/badge-component-delegate.js +15 -0
- package/esm/badge/badge-constants.d.ts +21 -0
- package/esm/badge/badge-constants.js +26 -0
- package/esm/badge/badge-foundation.d.ts +24 -0
- package/esm/badge/badge-foundation.js +55 -0
- package/esm/badge/badge.d.ts +26 -0
- package/esm/badge/badge.js +51 -0
- package/esm/badge/index.d.ts +11 -0
- package/esm/badge/index.js +15 -0
- package/esm/banner/banner-adapter.d.ts +30 -0
- package/esm/banner/banner-adapter.js +44 -0
- package/esm/banner/banner-constants.d.ts +34 -0
- package/esm/banner/banner-constants.js +41 -0
- package/esm/banner/banner-foundation.d.ts +31 -0
- package/esm/banner/banner-foundation.js +73 -0
- package/esm/banner/banner.d.ts +35 -0
- package/esm/banner/banner.js +67 -0
- package/esm/banner/index.d.ts +10 -0
- package/esm/banner/index.js +14 -0
- package/esm/bottom-sheet/bottom-sheet-adapter.d.ts +70 -0
- package/esm/bottom-sheet/bottom-sheet-adapter.js +129 -0
- package/esm/bottom-sheet/bottom-sheet-constants.d.ts +49 -0
- package/esm/bottom-sheet/bottom-sheet-constants.js +47 -0
- package/esm/bottom-sheet/bottom-sheet-foundation.d.ts +79 -0
- package/esm/bottom-sheet/bottom-sheet-foundation.js +327 -0
- package/esm/bottom-sheet/bottom-sheet.d.ts +58 -0
- package/esm/bottom-sheet/bottom-sheet.js +85 -0
- package/esm/bottom-sheet/index.d.ts +10 -0
- package/esm/bottom-sheet/index.js +14 -0
- package/esm/busy-indicator/busy-indicator-adapter.d.ts +159 -0
- package/esm/busy-indicator/busy-indicator-adapter.js +201 -0
- package/esm/busy-indicator/busy-indicator-constants.d.ts +49 -0
- package/esm/busy-indicator/busy-indicator-constants.js +58 -0
- package/esm/busy-indicator/busy-indicator-foundation.d.ts +97 -0
- package/esm/busy-indicator/busy-indicator-foundation.js +268 -0
- package/esm/busy-indicator/busy-indicator.d.ts +73 -0
- package/esm/busy-indicator/busy-indicator.js +111 -0
- package/esm/busy-indicator/index.d.ts +10 -0
- package/esm/busy-indicator/index.js +14 -0
- package/esm/button/button-component-delegate.d.ts +24 -0
- package/esm/button/button-component-delegate.js +39 -0
- package/esm/button/button-constants.d.ts +28 -0
- package/esm/button/button-constants.js +33 -0
- package/esm/button/button.d.ts +43 -0
- package/esm/button/button.js +160 -0
- package/esm/button/index.d.ts +9 -0
- package/esm/button/index.js +13 -0
- package/esm/button-toggle/button-toggle/button-toggle-adapter.d.ts +30 -0
- package/esm/button-toggle/button-toggle/button-toggle-adapter.js +62 -0
- package/esm/button-toggle/button-toggle/button-toggle-constants.d.ts +33 -0
- package/esm/button-toggle/button-toggle/button-toggle-constants.js +35 -0
- package/esm/button-toggle/button-toggle/button-toggle-foundation.d.ts +37 -0
- package/esm/button-toggle/button-toggle/button-toggle-foundation.js +74 -0
- package/esm/button-toggle/button-toggle/button-toggle.d.ts +37 -0
- package/esm/button-toggle/button-toggle/button-toggle.js +76 -0
- package/esm/button-toggle/button-toggle/index.d.ts +10 -0
- package/esm/button-toggle/button-toggle/index.js +14 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group-adapter.d.ts +44 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group-adapter.js +125 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group-constants.d.ts +35 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group-constants.js +33 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group-foundation.d.ts +57 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group-foundation.js +198 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group.d.ts +38 -0
- package/esm/button-toggle/button-toggle-group/button-toggle-group.js +94 -0
- package/esm/button-toggle/button-toggle-group/index.d.ts +10 -0
- package/esm/button-toggle/button-toggle-group/index.js +14 -0
- package/esm/button-toggle/index.d.ts +7 -0
- package/esm/button-toggle/index.js +7 -0
- package/esm/calendar/calendar-adapter.d.ts +160 -0
- package/esm/calendar/calendar-adapter.js +425 -0
- package/esm/calendar/calendar-component-delegate.d.ts +21 -0
- package/esm/calendar/calendar-component-delegate.js +27 -0
- package/esm/calendar/calendar-constants.d.ts +261 -0
- package/esm/calendar/calendar-constants.js +170 -0
- package/esm/calendar/calendar-dom-utils.d.ts +46 -0
- package/esm/calendar/calendar-dom-utils.js +301 -0
- package/esm/calendar/calendar-dropdown/calendar-dropdown-constants.d.ts +15 -0
- package/esm/calendar/calendar-dropdown/calendar-dropdown-constants.js +11 -0
- package/esm/calendar/calendar-dropdown/calendar-dropdown.d.ts +41 -0
- package/esm/calendar/calendar-dropdown/calendar-dropdown.js +106 -0
- package/esm/calendar/calendar-dropdown/index.d.ts +7 -0
- package/esm/calendar/calendar-dropdown/index.js +7 -0
- package/esm/calendar/calendar-foundation.d.ts +547 -0
- package/esm/calendar/calendar-foundation.js +2218 -0
- package/esm/calendar/calendar-locale-utils.d.ts +20 -0
- package/esm/calendar/calendar-locale-utils.js +133 -0
- package/esm/calendar/calendar-menu/calendar-menu-adapter.d.ts +43 -0
- package/esm/calendar/calendar-menu/calendar-menu-adapter.js +156 -0
- package/esm/calendar/calendar-menu/calendar-menu-constants.d.ts +74 -0
- package/esm/calendar/calendar-menu/calendar-menu-constants.js +76 -0
- package/esm/calendar/calendar-menu/calendar-menu-foundation.d.ts +66 -0
- package/esm/calendar/calendar-menu/calendar-menu-foundation.js +229 -0
- package/esm/calendar/calendar-menu/calendar-menu-utils.d.ts +12 -0
- package/esm/calendar/calendar-menu/calendar-menu-utils.js +85 -0
- package/esm/calendar/calendar-menu/calendar-menu.d.ts +48 -0
- package/esm/calendar/calendar-menu/calendar-menu.js +86 -0
- package/esm/calendar/calendar-menu/index.d.ts +11 -0
- package/esm/calendar/calendar-menu/index.js +15 -0
- package/esm/calendar/calendar-utils.d.ts +64 -0
- package/esm/calendar/calendar-utils.js +309 -0
- package/esm/calendar/calendar.d.ts +96 -0
- package/esm/calendar/calendar.js +282 -0
- package/esm/calendar/core/calendar-base.d.ts +34 -0
- package/esm/calendar/core/calendar-base.js +6 -0
- package/esm/calendar/core/date-range.d.ts +15 -0
- package/esm/calendar/core/date-range.js +16 -0
- package/esm/calendar/core/index.d.ts +7 -0
- package/esm/calendar/core/index.js +7 -0
- package/esm/calendar/index.d.ts +17 -0
- package/esm/calendar/index.js +21 -0
- package/esm/card/card-constants.d.ts +17 -0
- package/esm/card/card-constants.js +22 -0
- package/esm/card/card.d.ts +27 -0
- package/esm/card/card.js +58 -0
- package/esm/card/index.d.ts +8 -0
- package/esm/card/index.js +12 -0
- package/esm/checkbox/checkbox-adapter.d.ts +71 -0
- package/esm/checkbox/checkbox-adapter.js +216 -0
- package/esm/checkbox/checkbox-component-delegate.d.ts +37 -0
- package/esm/checkbox/checkbox-component-delegate.js +92 -0
- package/esm/checkbox/checkbox-constants.d.ts +72 -0
- package/esm/checkbox/checkbox-constants.js +67 -0
- package/esm/checkbox/checkbox-foundation.d.ts +35 -0
- package/esm/checkbox/checkbox-foundation.js +175 -0
- package/esm/checkbox/checkbox.d.ts +28 -0
- package/esm/checkbox/checkbox.js +69 -0
- package/esm/checkbox/index.d.ts +11 -0
- package/esm/checkbox/index.js +15 -0
- package/esm/chip-field/chip-field-adapter.d.ts +32 -0
- package/esm/chip-field/chip-field-adapter.js +51 -0
- package/esm/chip-field/chip-field-component-delegate.d.ts +45 -0
- package/esm/chip-field/chip-field-component-delegate.js +125 -0
- package/esm/chip-field/chip-field-constants.d.ts +31 -0
- package/esm/chip-field/chip-field-constants.js +36 -0
- package/esm/chip-field/chip-field-foundation.d.ts +30 -0
- package/esm/chip-field/chip-field-foundation.js +151 -0
- package/esm/chip-field/chip-field.d.ts +21 -0
- package/esm/chip-field/chip-field.js +28 -0
- package/esm/chip-field/index.d.ts +11 -0
- package/esm/chip-field/index.js +15 -0
- package/esm/chips/chip/chip-adapter.d.ts +51 -0
- package/esm/chips/chip/chip-adapter.js +115 -0
- package/esm/chips/chip/chip-constants.d.ts +53 -0
- package/esm/chips/chip/chip-constants.js +47 -0
- package/esm/chips/chip/chip-foundation.d.ts +69 -0
- package/esm/chips/chip/chip-foundation.js +264 -0
- package/esm/chips/chip/chip.d.ts +50 -0
- package/esm/chips/chip/chip.js +98 -0
- package/esm/chips/chip/index.d.ts +10 -0
- package/esm/chips/chip/index.js +14 -0
- package/esm/chips/chip-set/chip-set-adapter.d.ts +23 -0
- package/esm/chips/chip-set/chip-set-adapter.js +33 -0
- package/esm/chips/chip-set/chip-set-constants.d.ts +21 -0
- package/esm/chips/chip-set/chip-set-constants.js +26 -0
- package/esm/chips/chip-set/chip-set-foundation.d.ts +35 -0
- package/esm/chips/chip-set/chip-set-foundation.js +74 -0
- package/esm/chips/chip-set/chip-set.d.ts +29 -0
- package/esm/chips/chip-set/chip-set.js +67 -0
- package/esm/chips/chip-set/index.d.ts +10 -0
- package/esm/chips/chip-set/index.js +14 -0
- package/esm/chips/index.d.ts +7 -0
- package/esm/chips/index.js +7 -0
- package/esm/circular-progress/circular-progress-adapter.d.ts +28 -0
- package/esm/circular-progress/circular-progress-adapter.js +42 -0
- package/esm/circular-progress/circular-progress-constants.d.ts +17 -0
- package/esm/circular-progress/circular-progress-constants.js +21 -0
- package/esm/circular-progress/circular-progress-foundation.d.ts +32 -0
- package/esm/circular-progress/circular-progress-foundation.js +66 -0
- package/esm/circular-progress/circular-progress.d.ts +27 -0
- package/esm/circular-progress/circular-progress.js +65 -0
- package/esm/circular-progress/index.d.ts +10 -0
- package/esm/circular-progress/index.js +14 -0
- package/esm/color-picker/color-picker-adapter.d.ts +78 -0
- package/esm/color-picker/color-picker-adapter.js +175 -0
- package/esm/color-picker/color-picker-constants.d.ts +79 -0
- package/esm/color-picker/color-picker-constants.js +65 -0
- package/esm/color-picker/color-picker-foundation.d.ts +67 -0
- package/esm/color-picker/color-picker-foundation.js +235 -0
- package/esm/color-picker/color-picker-gradient-slider.d.ts +30 -0
- package/esm/color-picker/color-picker-gradient-slider.js +135 -0
- package/esm/color-picker/color-picker-slider.d.ts +38 -0
- package/esm/color-picker/color-picker-slider.js +118 -0
- package/esm/color-picker/color-picker-utils.d.ts +40 -0
- package/esm/color-picker/color-picker-utils.js +197 -0
- package/esm/color-picker/color-picker.d.ts +43 -0
- package/esm/color-picker/color-picker.js +80 -0
- package/esm/color-picker/index.d.ts +10 -0
- package/esm/color-picker/index.js +14 -0
- package/esm/constants.d.ts +9 -0
- package/esm/constants.js +9 -0
- package/esm/core/base/base-adapter.d.ts +42 -0
- package/esm/core/base/base-adapter.js +56 -0
- package/esm/core/base/base-component.d.ts +11 -0
- package/esm/core/base/base-component.js +8 -0
- package/esm/core/base/index.d.ts +7 -0
- package/esm/core/base/index.js +7 -0
- package/esm/core/delegates/base-component-delegate.d.ts +40 -0
- package/esm/core/delegates/base-component-delegate.js +84 -0
- package/esm/core/delegates/form-field-component-delegate.d.ts +24 -0
- package/esm/core/delegates/form-field-component-delegate.js +11 -0
- package/esm/core/delegates/index.d.ts +7 -0
- package/esm/core/delegates/index.js +7 -0
- package/esm/core/index.d.ts +9 -0
- package/esm/core/index.js +9 -0
- package/esm/core/mask/date-input-mask.d.ts +35 -0
- package/esm/core/mask/date-input-mask.js +155 -0
- package/esm/core/mask/index.d.ts +7 -0
- package/esm/core/mask/index.js +7 -0
- package/esm/core/mask/time-input-mask.d.ts +38 -0
- package/esm/core/mask/time-input-mask.js +163 -0
- package/esm/core/utils/date-utils.d.ts +42 -0
- package/esm/core/utils/date-utils.js +133 -0
- package/esm/core/utils/index.d.ts +9 -0
- package/esm/core/utils/index.js +9 -0
- package/esm/core/utils/svg-utils.d.ts +14 -0
- package/esm/core/utils/svg-utils.js +62 -0
- package/esm/core/utils/time-utils.d.ts +21 -0
- package/esm/core/utils/time-utils.js +111 -0
- package/esm/core/utils/utils.d.ts +11 -0
- package/esm/core/utils/utils.js +26 -0
- package/esm/date-picker/base/base-date-picker-adapter.d.ts +98 -0
- package/esm/date-picker/base/base-date-picker-adapter.js +157 -0
- package/esm/date-picker/base/base-date-picker-constants.d.ts +52 -0
- package/esm/date-picker/base/base-date-picker-constants.js +33 -0
- package/esm/date-picker/base/base-date-picker-foundation.d.ts +152 -0
- package/esm/date-picker/base/base-date-picker-foundation.js +608 -0
- package/esm/date-picker/base/base-date-picker-utils.d.ts +6 -0
- package/esm/date-picker/base/base-date-picker-utils.js +21 -0
- package/esm/date-picker/base/base-date-picker.d.ts +82 -0
- package/esm/date-picker/base/base-date-picker.js +135 -0
- package/esm/date-picker/date-picker-adapter.d.ts +39 -0
- package/esm/date-picker/date-picker-adapter.js +121 -0
- package/esm/date-picker/date-picker-component-delegate.d.ts +34 -0
- package/esm/date-picker/date-picker-component-delegate.js +73 -0
- package/esm/date-picker/date-picker-constants.d.ts +20 -0
- package/esm/date-picker/date-picker-constants.js +25 -0
- package/esm/date-picker/date-picker-foundation.d.ts +34 -0
- package/esm/date-picker/date-picker-foundation.js +155 -0
- package/esm/date-picker/date-picker.d.ts +26 -0
- package/esm/date-picker/date-picker.js +54 -0
- package/esm/date-picker/index.d.ts +11 -0
- package/esm/date-picker/index.js +15 -0
- package/esm/date-range-picker/date-range-picker-adapter.d.ts +65 -0
- package/esm/date-range-picker/date-range-picker-adapter.js +190 -0
- package/esm/date-range-picker/date-range-picker-component-delegate.d.ts +41 -0
- package/esm/date-range-picker/date-range-picker-component-delegate.js +86 -0
- package/esm/date-range-picker/date-range-picker-constants.d.ts +34 -0
- package/esm/date-range-picker/date-range-picker-constants.js +38 -0
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +60 -0
- package/esm/date-range-picker/date-range-picker-foundation.js +342 -0
- package/esm/date-range-picker/date-range-picker.d.ts +33 -0
- package/esm/date-range-picker/date-range-picker.js +64 -0
- package/esm/date-range-picker/index.d.ts +11 -0
- package/esm/date-range-picker/index.js +15 -0
- package/esm/dialog/dialog-adapter.d.ts +75 -0
- package/esm/dialog/dialog-adapter.js +164 -0
- package/esm/dialog/dialog-constants.d.ts +65 -0
- package/esm/dialog/dialog-constants.js +59 -0
- package/esm/dialog/dialog-foundation.d.ts +102 -0
- package/esm/dialog/dialog-foundation.js +451 -0
- package/esm/dialog/dialog.d.ts +71 -0
- package/esm/dialog/dialog.js +120 -0
- package/esm/dialog/index.d.ts +10 -0
- package/esm/dialog/index.js +14 -0
- package/esm/divider/divider-constants.d.ts +11 -0
- package/esm/divider/divider-constants.js +14 -0
- package/esm/divider/divider.d.ts +19 -0
- package/esm/divider/divider.js +26 -0
- package/esm/divider/index.d.ts +8 -0
- package/esm/divider/index.js +12 -0
- package/esm/drawer/base/base-drawer-adapter.d.ts +24 -0
- package/esm/drawer/base/base-drawer-adapter.js +48 -0
- package/esm/drawer/base/base-drawer-constants.d.ts +27 -0
- package/esm/drawer/base/base-drawer-constants.js +30 -0
- package/esm/drawer/base/base-drawer-foundation.d.ts +32 -0
- package/esm/drawer/base/base-drawer-foundation.js +89 -0
- package/esm/drawer/base/base-drawer.d.ts +30 -0
- package/esm/drawer/base/base-drawer.js +42 -0
- package/esm/drawer/base/index.d.ts +9 -0
- package/esm/drawer/base/index.js +9 -0
- package/esm/drawer/drawer/drawer-constants.d.ts +8 -0
- package/esm/drawer/drawer/drawer-constants.js +10 -0
- package/esm/drawer/drawer/drawer.d.ts +21 -0
- package/esm/drawer/drawer/drawer.js +24 -0
- package/esm/drawer/drawer/index.d.ts +8 -0
- package/esm/drawer/drawer/index.js +12 -0
- package/esm/drawer/index.d.ts +9 -0
- package/esm/drawer/index.js +9 -0
- package/esm/drawer/mini-drawer/index.d.ts +8 -0
- package/esm/drawer/mini-drawer/index.js +12 -0
- package/esm/drawer/mini-drawer/mini-drawer-constants.d.ts +11 -0
- package/esm/drawer/mini-drawer/mini-drawer-constants.js +14 -0
- package/esm/drawer/mini-drawer/mini-drawer.d.ts +17 -0
- package/esm/drawer/mini-drawer/mini-drawer.js +24 -0
- package/esm/drawer/modal-drawer/index.d.ts +10 -0
- package/esm/drawer/modal-drawer/index.js +14 -0
- package/esm/drawer/modal-drawer/modal-drawer-adapter.d.ts +20 -0
- package/esm/drawer/modal-drawer/modal-drawer-adapter.js +30 -0
- package/esm/drawer/modal-drawer/modal-drawer-constants.d.ts +15 -0
- package/esm/drawer/modal-drawer/modal-drawer-constants.js +19 -0
- package/esm/drawer/modal-drawer/modal-drawer-foundation.d.ts +22 -0
- package/esm/drawer/modal-drawer/modal-drawer-foundation.js +52 -0
- package/esm/drawer/modal-drawer/modal-drawer.d.ts +21 -0
- package/esm/drawer/modal-drawer/modal-drawer.js +28 -0
- package/esm/expansion-panel/expansion-panel-adapter.d.ts +33 -0
- package/esm/expansion-panel/expansion-panel-adapter.js +182 -0
- package/esm/expansion-panel/expansion-panel-constants.d.ts +38 -0
- package/esm/expansion-panel/expansion-panel-constants.js +47 -0
- package/esm/expansion-panel/expansion-panel-foundation.d.ts +59 -0
- package/esm/expansion-panel/expansion-panel-foundation.js +151 -0
- package/esm/expansion-panel/expansion-panel.d.ts +60 -0
- package/esm/expansion-panel/expansion-panel.js +81 -0
- package/esm/expansion-panel/index.d.ts +10 -0
- package/esm/expansion-panel/index.js +14 -0
- package/esm/field/field-adapter.d.ts +101 -0
- package/esm/field/field-adapter.js +184 -0
- package/esm/field/field-constants.d.ts +36 -0
- package/esm/field/field-constants.js +36 -0
- package/esm/field/field-foundation.d.ts +65 -0
- package/esm/field/field-foundation.js +328 -0
- package/esm/field/field.d.ts +40 -0
- package/esm/field/field.js +78 -0
- package/esm/file-picker/file-picker-adapter.d.ts +81 -0
- package/esm/file-picker/file-picker-adapter.js +134 -0
- package/esm/file-picker/file-picker-component-delegate.d.ts +23 -0
- package/esm/file-picker/file-picker-component-delegate.js +49 -0
- package/esm/file-picker/file-picker-constants.d.ts +41 -0
- package/esm/file-picker/file-picker-constants.js +44 -0
- package/esm/file-picker/file-picker-foundation.d.ts +66 -0
- package/esm/file-picker/file-picker-foundation.js +226 -0
- package/esm/file-picker/file-picker.d.ts +45 -0
- package/esm/file-picker/file-picker.js +88 -0
- package/esm/file-picker/index.d.ts +11 -0
- package/esm/file-picker/index.js +15 -0
- package/esm/floating-action-button/floating-action-button-component-delegate.d.ts +22 -0
- package/esm/floating-action-button/floating-action-button-component-delegate.js +36 -0
- package/esm/floating-action-button/floating-action-button-constants.d.ts +27 -0
- package/esm/floating-action-button/floating-action-button-constants.js +32 -0
- package/esm/floating-action-button/floating-action-button.d.ts +40 -0
- package/esm/floating-action-button/floating-action-button.js +126 -0
- package/esm/floating-action-button/index.d.ts +9 -0
- package/esm/floating-action-button/index.js +13 -0
- package/esm/floating-label/floating-label-adapter.d.ts +23 -0
- package/esm/floating-label/floating-label-adapter.js +32 -0
- package/esm/floating-label/floating-label-constants.d.ts +13 -0
- package/esm/floating-label/floating-label-constants.js +14 -0
- package/esm/floating-label/floating-label-foundation.d.ts +17 -0
- package/esm/floating-label/floating-label-foundation.js +71 -0
- package/esm/floating-label/floating-label.d.ts +27 -0
- package/esm/floating-label/floating-label.js +34 -0
- package/esm/floating-label/index.d.ts +9 -0
- package/esm/floating-label/index.js +9 -0
- package/esm/icon/icon-adapter.d.ts +23 -0
- package/esm/icon/icon-adapter.js +43 -0
- package/esm/icon/icon-component-delegate.d.ts +15 -0
- package/esm/icon/icon-component-delegate.js +15 -0
- package/esm/icon/icon-constants.d.ts +27 -0
- package/esm/icon/icon-constants.js +31 -0
- package/esm/icon/icon-foundation.d.ts +58 -0
- package/esm/icon/icon-foundation.js +187 -0
- package/esm/icon/icon-registry.d.ts +53 -0
- package/esm/icon/icon-registry.js +94 -0
- package/esm/icon/icon-utils.d.ts +12 -0
- package/esm/icon/icon-utils.js +66 -0
- package/esm/icon/icon.d.ts +46 -0
- package/esm/icon/icon.js +89 -0
- package/esm/icon/index.d.ts +13 -0
- package/esm/icon/index.js +23 -0
- package/esm/icon-button/icon-button-component-delegate.d.ts +31 -0
- package/esm/icon-button/icon-button-component-delegate.js +68 -0
- package/esm/icon-button/icon-button-constants.d.ts +30 -0
- package/esm/icon-button/icon-button-constants.js +43 -0
- package/esm/icon-button/icon-button.d.ts +57 -0
- package/esm/icon-button/icon-button.js +219 -0
- package/esm/icon-button/index.d.ts +9 -0
- package/esm/icon-button/index.js +13 -0
- package/esm/index.d.ts +70 -0
- package/esm/index.js +212 -0
- package/esm/inline-message/index.d.ts +8 -0
- package/esm/inline-message/index.js +12 -0
- package/esm/inline-message/inline-message-constants.d.ts +11 -0
- package/esm/inline-message/inline-message-constants.js +14 -0
- package/esm/inline-message/inline-message.d.ts +16 -0
- package/esm/inline-message/inline-message.js +23 -0
- package/esm/keyboard-shortcut/index.d.ts +11 -0
- package/esm/keyboard-shortcut/index.js +15 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-adapter.d.ts +44 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-adapter.js +79 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-constants.d.ts +29 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-constants.js +44 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +63 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +165 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-utils.d.ts +16 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-utils.js +61 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +45 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.js +93 -0
- package/esm/label-value/index.d.ts +11 -0
- package/esm/label-value/index.js +15 -0
- package/esm/label-value/label-value-adapter.d.ts +24 -0
- package/esm/label-value/label-value-adapter.js +47 -0
- package/esm/label-value/label-value-component-delegate.d.ts +29 -0
- package/esm/label-value/label-value-component-delegate.js +54 -0
- package/esm/label-value/label-value-constants.d.ts +27 -0
- package/esm/label-value/label-value-constants.js +30 -0
- package/esm/label-value/label-value-foundation.d.ts +33 -0
- package/esm/label-value/label-value-foundation.js +80 -0
- package/esm/label-value/label-value.d.ts +34 -0
- package/esm/label-value/label-value.js +65 -0
- package/esm/linear-progress/index.d.ts +8 -0
- package/esm/linear-progress/index.js +12 -0
- package/esm/linear-progress/linear-progress-constants.d.ts +18 -0
- package/esm/linear-progress/linear-progress-constants.js +22 -0
- package/esm/linear-progress/linear-progress.d.ts +44 -0
- package/esm/linear-progress/linear-progress.js +143 -0
- package/esm/list/index.d.ts +7 -0
- package/esm/list/index.js +7 -0
- package/esm/list/list/index.d.ts +10 -0
- package/esm/list/list/index.js +14 -0
- package/esm/list/list/list-adapter.d.ts +61 -0
- package/esm/list/list/list-adapter.js +99 -0
- package/esm/list/list/list-constants.d.ts +18 -0
- package/esm/list/list/list-constants.js +22 -0
- package/esm/list/list/list-foundation.d.ts +48 -0
- package/esm/list/list/list-foundation.js +142 -0
- package/esm/list/list/list.d.ts +38 -0
- package/esm/list/list/list.js +77 -0
- package/esm/list/list-item/index.d.ts +10 -0
- package/esm/list/list-item/index.js +14 -0
- package/esm/list/list-item/list-item-adapter.d.ts +101 -0
- package/esm/list/list-item/list-item-adapter.js +175 -0
- package/esm/list/list-item/list-item-constants.d.ts +57 -0
- package/esm/list/list-item/list-item-constants.js +59 -0
- package/esm/list/list-item/list-item-foundation.d.ts +102 -0
- package/esm/list/list-item/list-item-foundation.js +305 -0
- package/esm/list/list-item/list-item.d.ts +72 -0
- package/esm/list/list-item/list-item.js +168 -0
- package/esm/list-dropdown/cascading-list-dropdown-aware-foundation.d.ts +43 -0
- package/esm/list-dropdown/cascading-list-dropdown-aware-foundation.js +62 -0
- package/esm/list-dropdown/index.d.ts +10 -0
- package/esm/list-dropdown/index.js +10 -0
- package/esm/list-dropdown/list-dropdown-adapter.d.ts +64 -0
- package/esm/list-dropdown/list-dropdown-adapter.js +282 -0
- package/esm/list-dropdown/list-dropdown-aware-foundation.d.ts +40 -0
- package/esm/list-dropdown/list-dropdown-aware-foundation.js +62 -0
- package/esm/list-dropdown/list-dropdown-aware.d.ts +34 -0
- package/esm/list-dropdown/list-dropdown-aware.js +54 -0
- package/esm/list-dropdown/list-dropdown-constants.d.ts +101 -0
- package/esm/list-dropdown/list-dropdown-constants.js +39 -0
- package/esm/list-dropdown/list-dropdown-foundation.d.ts +64 -0
- package/esm/list-dropdown/list-dropdown-foundation.js +224 -0
- package/esm/list-dropdown/list-dropdown-utils.d.ts +35 -0
- package/esm/list-dropdown/list-dropdown-utils.js +347 -0
- package/esm/list-dropdown/list-dropdown.d.ts +63 -0
- package/esm/list-dropdown/list-dropdown.js +86 -0
- package/esm/menu/index.d.ts +10 -0
- package/esm/menu/index.js +14 -0
- package/esm/menu/menu-adapter.d.ts +67 -0
- package/esm/menu/menu-adapter.js +202 -0
- package/esm/menu/menu-constants.d.ts +59 -0
- package/esm/menu/menu-constants.js +48 -0
- package/esm/menu/menu-foundation.d.ts +101 -0
- package/esm/menu/menu-foundation.js +514 -0
- package/esm/menu/menu.d.ts +71 -0
- package/esm/menu/menu.js +136 -0
- package/esm/open-icon/index.d.ts +10 -0
- package/esm/open-icon/index.js +14 -0
- package/esm/open-icon/open-icon-adapter.d.ts +18 -0
- package/esm/open-icon/open-icon-adapter.js +27 -0
- package/esm/open-icon/open-icon-constants.d.ts +20 -0
- package/esm/open-icon/open-icon-constants.js +25 -0
- package/esm/open-icon/open-icon-foundation.d.ts +22 -0
- package/esm/open-icon/open-icon-foundation.js +35 -0
- package/esm/open-icon/open-icon.d.ts +29 -0
- package/esm/open-icon/open-icon.js +55 -0
- package/esm/page-state/index.d.ts +8 -0
- package/esm/page-state/index.js +12 -0
- package/esm/page-state/page-state-constants.d.ts +8 -0
- package/esm/page-state/page-state-constants.js +10 -0
- package/esm/page-state/page-state.d.ts +16 -0
- package/esm/page-state/page-state.js +23 -0
- package/esm/paginator/index.d.ts +10 -0
- package/esm/paginator/index.js +14 -0
- package/esm/paginator/paginator-adapter.d.ts +96 -0
- package/esm/paginator/paginator-adapter.js +149 -0
- package/esm/paginator/paginator-constants.d.ts +74 -0
- package/esm/paginator/paginator-constants.js +75 -0
- package/esm/paginator/paginator-foundation.d.ts +132 -0
- package/esm/paginator/paginator-foundation.js +402 -0
- package/esm/paginator/paginator.d.ts +59 -0
- package/esm/paginator/paginator.js +135 -0
- package/esm/popup/index.d.ts +10 -0
- package/esm/popup/index.js +14 -0
- package/esm/popup/popup-adapter.d.ts +43 -0
- package/esm/popup/popup-adapter.js +136 -0
- package/esm/popup/popup-constants.d.ts +54 -0
- package/esm/popup/popup-constants.js +52 -0
- package/esm/popup/popup-foundation.d.ts +68 -0
- package/esm/popup/popup-foundation.js +249 -0
- package/esm/popup/popup.d.ts +49 -0
- package/esm/popup/popup.js +94 -0
- package/esm/product-icon/index.d.ts +10 -0
- package/esm/product-icon/index.js +14 -0
- package/esm/product-icon/product-icon-adapter.d.ts +27 -0
- package/esm/product-icon/product-icon-adapter.js +50 -0
- package/esm/product-icon/product-icon-constants.d.ts +38 -0
- package/esm/product-icon/product-icon-constants.js +46 -0
- package/esm/product-icon/product-icon-foundation.d.ts +40 -0
- package/esm/product-icon/product-icon-foundation.js +116 -0
- package/esm/product-icon/product-icon.d.ts +32 -0
- package/esm/product-icon/product-icon.js +65 -0
- package/esm/profile-card/index.d.ts +10 -0
- package/esm/profile-card/index.js +14 -0
- package/esm/profile-card/profile-card-adapter.d.ts +46 -0
- package/esm/profile-card/profile-card-adapter.js +81 -0
- package/esm/profile-card/profile-card-constants.d.ts +33 -0
- package/esm/profile-card/profile-card-constants.js +39 -0
- package/esm/profile-card/profile-card-foundation.d.ts +48 -0
- package/esm/profile-card/profile-card-foundation.js +108 -0
- package/esm/profile-card/profile-card.d.ts +38 -0
- package/esm/profile-card/profile-card.js +94 -0
- package/esm/quantity-field/index.d.ts +11 -0
- package/esm/quantity-field/index.js +15 -0
- package/esm/quantity-field/quantity-field-adapter.d.ts +77 -0
- package/esm/quantity-field/quantity-field-adapter.js +225 -0
- package/esm/quantity-field/quantity-field-component-delegate.d.ts +44 -0
- package/esm/quantity-field/quantity-field-component-delegate.js +129 -0
- package/esm/quantity-field/quantity-field-constants.d.ts +35 -0
- package/esm/quantity-field/quantity-field-constants.js +41 -0
- package/esm/quantity-field/quantity-field-foundation.d.ts +36 -0
- package/esm/quantity-field/quantity-field-foundation.js +100 -0
- package/esm/quantity-field/quantity-field.d.ts +29 -0
- package/esm/quantity-field/quantity-field.js +89 -0
- package/esm/radio/index.d.ts +8 -0
- package/esm/radio/index.js +12 -0
- package/esm/radio/radio-adapter.d.ts +70 -0
- package/esm/radio/radio-adapter.js +250 -0
- package/esm/radio/radio-constants.d.ts +30 -0
- package/esm/radio/radio-constants.js +36 -0
- package/esm/radio/radio-foundation.d.ts +31 -0
- package/esm/radio/radio-foundation.js +80 -0
- package/esm/radio/radio.d.ts +31 -0
- package/esm/radio/radio.js +73 -0
- package/esm/ripple/forge-ripple.d.ts +11 -0
- package/esm/ripple/forge-ripple.js +10 -0
- package/esm/ripple/index.d.ts +11 -0
- package/esm/ripple/index.js +15 -0
- package/esm/ripple/ripple-adapter.d.ts +23 -0
- package/esm/ripple/ripple-adapter.js +47 -0
- package/esm/ripple/ripple-constants.d.ts +15 -0
- package/esm/ripple/ripple-constants.js +19 -0
- package/esm/ripple/ripple-foundation.d.ts +30 -0
- package/esm/ripple/ripple-foundation.js +48 -0
- package/esm/ripple/ripple.d.ts +31 -0
- package/esm/ripple/ripple.js +59 -0
- package/esm/scaffold/index.d.ts +8 -0
- package/esm/scaffold/index.js +12 -0
- package/esm/scaffold/scaffold-constants.d.ts +8 -0
- package/esm/scaffold/scaffold-constants.js +10 -0
- package/esm/scaffold/scaffold.d.ts +19 -0
- package/esm/scaffold/scaffold.js +26 -0
- package/esm/select/core/base-select-adapter.d.ts +68 -0
- package/esm/select/core/base-select-adapter.js +167 -0
- package/esm/select/core/base-select-constants.d.ts +28 -0
- package/esm/select/core/base-select-constants.js +22 -0
- package/esm/select/core/base-select-foundation.d.ts +137 -0
- package/esm/select/core/base-select-foundation.js +609 -0
- package/esm/select/core/base-select.d.ts +51 -0
- package/esm/select/core/base-select.js +67 -0
- package/esm/select/core/index.d.ts +10 -0
- package/esm/select/core/index.js +10 -0
- package/esm/select/core/select-utils.d.ts +18 -0
- package/esm/select/core/select-utils.js +27 -0
- package/esm/select/index.d.ts +20 -0
- package/esm/select/index.js +11 -0
- package/esm/select/option/index.d.ts +10 -0
- package/esm/select/option/index.js +14 -0
- package/esm/select/option/option-adapter.d.ts +17 -0
- package/esm/select/option/option-adapter.js +14 -0
- package/esm/select/option/option-constants.d.ts +21 -0
- package/esm/select/option/option-constants.js +24 -0
- package/esm/select/option/option-foundation.d.ts +67 -0
- package/esm/select/option/option-foundation.js +149 -0
- package/esm/select/option/option.d.ts +51 -0
- package/esm/select/option/option.js +122 -0
- package/esm/select/option-group/index.d.ts +8 -0
- package/esm/select/option-group/index.js +12 -0
- package/esm/select/option-group/option-group-constants.d.ts +11 -0
- package/esm/select/option-group/option-group-constants.js +14 -0
- package/esm/select/option-group/option-group.d.ts +26 -0
- package/esm/select/option-group/option-group.js +45 -0
- package/esm/select/select/index.d.ts +10 -0
- package/esm/select/select/index.js +14 -0
- package/esm/select/select/select-adapter.d.ts +85 -0
- package/esm/select/select/select-adapter.js +159 -0
- package/esm/select/select/select-constants.d.ts +37 -0
- package/esm/select/select/select-constants.js +42 -0
- package/esm/select/select/select-foundation.d.ts +96 -0
- package/esm/select/select/select-foundation.js +338 -0
- package/esm/select/select/select.d.ts +54 -0
- package/esm/select/select/select.js +129 -0
- package/esm/select/select-component-delegate.d.ts +30 -0
- package/esm/select/select-component-delegate.js +62 -0
- package/esm/select/select-dropdown/index.d.ts +10 -0
- package/esm/select/select-dropdown/index.js +14 -0
- package/esm/select/select-dropdown/select-dropdown-adapter.d.ts +36 -0
- package/esm/select/select-dropdown/select-dropdown-adapter.js +123 -0
- package/esm/select/select-dropdown/select-dropdown-constants.d.ts +16 -0
- package/esm/select/select-dropdown/select-dropdown-constants.js +21 -0
- package/esm/select/select-dropdown/select-dropdown-foundation.d.ts +35 -0
- package/esm/select/select-dropdown/select-dropdown-foundation.js +88 -0
- package/esm/select/select-dropdown/select-dropdown.d.ts +31 -0
- package/esm/select/select-dropdown/select-dropdown.js +83 -0
- package/esm/skeleton/index.d.ts +8 -0
- package/esm/skeleton/index.js +12 -0
- package/esm/skeleton/skeleton-constants.d.ts +8 -0
- package/esm/skeleton/skeleton-constants.js +10 -0
- package/esm/skeleton/skeleton.d.ts +16 -0
- package/esm/skeleton/skeleton.js +23 -0
- package/esm/slider/index.d.ts +9 -0
- package/esm/slider/index.js +13 -0
- package/esm/slider/slider-component-delegate.d.ts +27 -0
- package/esm/slider/slider-component-delegate.js +42 -0
- package/esm/slider/slider-constants.d.ts +41 -0
- package/esm/slider/slider-constants.js +38 -0
- package/esm/slider/slider.d.ts +92 -0
- package/esm/slider/slider.js +298 -0
- package/esm/stepper/core/stepper-utils.d.ts +51 -0
- package/esm/stepper/core/stepper-utils.js +139 -0
- package/esm/stepper/index.d.ts +7 -0
- package/esm/stepper/index.js +7 -0
- package/esm/stepper/step/index.d.ts +10 -0
- package/esm/stepper/step/index.js +14 -0
- package/esm/stepper/step/step-adapter.d.ts +76 -0
- package/esm/stepper/step/step-adapter.js +161 -0
- package/esm/stepper/step/step-constants.d.ts +76 -0
- package/esm/stepper/step/step-constants.js +82 -0
- package/esm/stepper/step/step-foundation.d.ts +78 -0
- package/esm/stepper/step/step-foundation.js +248 -0
- package/esm/stepper/step/step.d.ts +49 -0
- package/esm/stepper/step/step.js +127 -0
- package/esm/stepper/stepper/index.d.ts +10 -0
- package/esm/stepper/stepper/index.js +14 -0
- package/esm/stepper/stepper/stepper-adapter.d.ts +67 -0
- package/esm/stepper/stepper/stepper-adapter.js +148 -0
- package/esm/stepper/stepper/stepper-constants.d.ts +77 -0
- package/esm/stepper/stepper/stepper-constants.js +79 -0
- package/esm/stepper/stepper/stepper-foundation.d.ts +76 -0
- package/esm/stepper/stepper/stepper-foundation.js +292 -0
- package/esm/stepper/stepper/stepper.d.ts +44 -0
- package/esm/stepper/stepper/stepper.js +95 -0
- package/esm/switch/index.d.ts +9 -0
- package/esm/switch/index.js +13 -0
- package/esm/switch/switch-component-delegate.d.ts +32 -0
- package/esm/switch/switch-component-delegate.js +70 -0
- package/esm/switch/switch-constants.d.ts +26 -0
- package/esm/switch/switch-constants.js +31 -0
- package/esm/switch/switch.d.ts +53 -0
- package/esm/switch/switch.js +155 -0
- package/esm/table/index.d.ts +12 -0
- package/esm/table/index.js +16 -0
- package/esm/table/multi-sort-manager.d.ts +18 -0
- package/esm/table/multi-sort-manager.js +67 -0
- package/esm/table/table-adapter.d.ts +80 -0
- package/esm/table/table-adapter.js +120 -0
- package/esm/table/table-constants.d.ts +104 -0
- package/esm/table/table-constants.js +115 -0
- package/esm/table/table-foundation.d.ts +271 -0
- package/esm/table/table-foundation.js +918 -0
- package/esm/table/table-row.d.ts +13 -0
- package/esm/table/table-row.js +14 -0
- package/esm/table/table-utils.d.ts +389 -0
- package/esm/table/table-utils.js +1415 -0
- package/esm/table/table.d.ts +182 -0
- package/esm/table/table.js +290 -0
- package/esm/table/types.d.ts +157 -0
- package/esm/table/types.js +26 -0
- package/esm/tabs/index.d.ts +7 -0
- package/esm/tabs/index.js +7 -0
- package/esm/tabs/tab/index.d.ts +10 -0
- package/esm/tabs/tab/index.js +14 -0
- package/esm/tabs/tab/tab-adapter.d.ts +54 -0
- package/esm/tabs/tab/tab-adapter.js +103 -0
- package/esm/tabs/tab/tab-constants.d.ts +32 -0
- package/esm/tabs/tab/tab-constants.js +32 -0
- package/esm/tabs/tab/tab-foundation.d.ts +43 -0
- package/esm/tabs/tab/tab-foundation.js +98 -0
- package/esm/tabs/tab/tab.d.ts +42 -0
- package/esm/tabs/tab/tab.js +79 -0
- package/esm/tabs/tab-bar/index.d.ts +10 -0
- package/esm/tabs/tab-bar/index.js +14 -0
- package/esm/tabs/tab-bar/tab-bar-adapter.d.ts +98 -0
- package/esm/tabs/tab-bar/tab-bar-adapter.js +223 -0
- package/esm/tabs/tab-bar/tab-bar-constants.d.ts +64 -0
- package/esm/tabs/tab-bar/tab-bar-constants.js +79 -0
- package/esm/tabs/tab-bar/tab-bar-foundation.d.ts +96 -0
- package/esm/tabs/tab-bar/tab-bar-foundation.js +385 -0
- package/esm/tabs/tab-bar/tab-bar.d.ts +64 -0
- package/esm/tabs/tab-bar/tab-bar.js +123 -0
- package/esm/text-field/index.d.ts +11 -0
- package/esm/text-field/index.js +15 -0
- package/esm/text-field/text-field-adapter.d.ts +34 -0
- package/esm/text-field/text-field-adapter.js +109 -0
- package/esm/text-field/text-field-component-delegate.d.ts +45 -0
- package/esm/text-field/text-field-component-delegate.js +125 -0
- package/esm/text-field/text-field-constants.d.ts +21 -0
- package/esm/text-field/text-field-constants.js +25 -0
- package/esm/text-field/text-field-foundation.d.ts +14 -0
- package/esm/text-field/text-field-foundation.js +16 -0
- package/esm/text-field/text-field.d.ts +17 -0
- package/esm/text-field/text-field.js +26 -0
- package/esm/theme/color-constants.d.ts +313 -0
- package/esm/theme/color-constants.js +363 -0
- package/esm/theme/index.d.ts +7 -0
- package/esm/theme/index.js +7 -0
- package/esm/theme/theme-utils.d.ts +9 -0
- package/esm/theme/theme-utils.js +68 -0
- package/esm/time-picker/index.d.ts +12 -0
- package/esm/time-picker/index.js +16 -0
- package/esm/time-picker/time-picker-adapter.d.ts +80 -0
- package/esm/time-picker/time-picker-adapter.js +208 -0
- package/esm/time-picker/time-picker-component-delegate.d.ts +33 -0
- package/esm/time-picker/time-picker-component-delegate.js +68 -0
- package/esm/time-picker/time-picker-constants.d.ts +59 -0
- package/esm/time-picker/time-picker-constants.js +48 -0
- package/esm/time-picker/time-picker-foundation.d.ts +146 -0
- package/esm/time-picker/time-picker-foundation.js +814 -0
- package/esm/time-picker/time-picker-utils.d.ts +25 -0
- package/esm/time-picker/time-picker-utils.js +122 -0
- package/esm/time-picker/time-picker.d.ts +76 -0
- package/esm/time-picker/time-picker.js +198 -0
- package/esm/toast/index.d.ts +10 -0
- package/esm/toast/index.js +14 -0
- package/esm/toast/toast-adapter.d.ts +83 -0
- package/esm/toast/toast-adapter.js +146 -0
- package/esm/toast/toast-constants.d.ts +58 -0
- package/esm/toast/toast-constants.js +63 -0
- package/esm/toast/toast-foundation.d.ts +67 -0
- package/esm/toast/toast-foundation.js +150 -0
- package/esm/toast/toast.d.ts +49 -0
- package/esm/toast/toast.js +93 -0
- package/esm/toolbar/index.d.ts +8 -0
- package/esm/toolbar/index.js +12 -0
- package/esm/toolbar/toolbar-constants.d.ts +25 -0
- package/esm/toolbar/toolbar-constants.js +30 -0
- package/esm/toolbar/toolbar.d.ts +26 -0
- package/esm/toolbar/toolbar.js +58 -0
- package/esm/tooltip/index.d.ts +11 -0
- package/esm/tooltip/index.js +15 -0
- package/esm/tooltip/tooltip-adapter.d.ts +74 -0
- package/esm/tooltip/tooltip-adapter.js +127 -0
- package/esm/tooltip/tooltip-constants.d.ts +35 -0
- package/esm/tooltip/tooltip-constants.js +41 -0
- package/esm/tooltip/tooltip-foundation.d.ts +104 -0
- package/esm/tooltip/tooltip-foundation.js +251 -0
- package/esm/tooltip/tooltip-utils.d.ts +13 -0
- package/esm/tooltip/tooltip-utils.js +53 -0
- package/esm/tooltip/tooltip.d.ts +47 -0
- package/esm/tooltip/tooltip.js +80 -0
- package/esm/utils/color-utils.d.ts +14 -0
- package/esm/utils/color-utils.js +35 -0
- package/esm/utils/index.d.ts +6 -0
- package/esm/utils/index.js +6 -0
- package/esm/view-switcher/index.d.ts +11 -0
- package/esm/view-switcher/index.js +15 -0
- package/esm/view-switcher/view/index.d.ts +8 -0
- package/esm/view-switcher/view/index.js +12 -0
- package/esm/view-switcher/view/view-constants.d.ts +8 -0
- package/esm/view-switcher/view/view-constants.js +10 -0
- package/esm/view-switcher/view/view.d.ts +16 -0
- package/esm/view-switcher/view/view.js +23 -0
- package/esm/view-switcher/view-switcher-adapter.d.ts +93 -0
- package/esm/view-switcher/view-switcher-adapter.js +281 -0
- package/esm/view-switcher/view-switcher-constants.d.ts +38 -0
- package/esm/view-switcher/view-switcher-constants.js +43 -0
- package/esm/view-switcher/view-switcher-foundation.d.ts +38 -0
- package/esm/view-switcher/view-switcher-foundation.js +122 -0
- package/esm/view-switcher/view-switcher.d.ts +40 -0
- package/esm/view-switcher/view-switcher.js +73 -0
- package/package.json +22 -0
- package/styles/app-bar/_mixins.scss +242 -0
- package/styles/app-bar/_variables.scss +34 -0
- package/styles/app-bar/app-bar.scss +22 -0
- package/styles/app-bar/search/_mixins.scss +238 -0
- package/styles/app-bar/search/_variables.scss +18 -0
- package/styles/app-bar/search/app-bar-search.scss +16 -0
- package/styles/autocomplete/autocomplete.scss +12 -0
- package/styles/avatar/_mixins.scss +46 -0
- package/styles/avatar/_variables.scss +16 -0
- package/styles/avatar/avatar.scss +16 -0
- package/styles/backdrop/_mixins.scss +31 -0
- package/styles/backdrop/_variables.scss +12 -0
- package/styles/backdrop/backdrop.scss +32 -0
- package/styles/badge/_mixins.scss +121 -0
- package/styles/badge/_variables.scss +87 -0
- package/styles/badge/badge.scss +40 -0
- package/styles/banner/_mixins.scss +219 -0
- package/styles/banner/_variables.scss +88 -0
- package/styles/banner/banner.scss +24 -0
- package/styles/bottom-sheet/_mixins.scss +98 -0
- package/styles/bottom-sheet/_variables.scss +7 -0
- package/styles/bottom-sheet/bottom-sheet.scss +21 -0
- package/styles/busy-indicator/_mixins.scss +184 -0
- package/styles/busy-indicator/_variables.scss +9 -0
- package/styles/busy-indicator/busy-indicator.scss +23 -0
- package/styles/busy-indicator/forge-busy-indicator.scss +8 -0
- package/styles/button/_button-base.scss +183 -0
- package/styles/button/_button-filled-theme.scss +60 -0
- package/styles/button/_button-filled.scss +71 -0
- package/styles/button/_button-outlined-theme.scss +175 -0
- package/styles/button/_button-outlined.scss +76 -0
- package/styles/button/_button-protected-theme.scss +60 -0
- package/styles/button/_button-protected.scss +88 -0
- package/styles/button/_button-ripple.scss +69 -0
- package/styles/button/_button-shared-theme.scss +447 -0
- package/styles/button/_button-text-theme.scss +60 -0
- package/styles/button/_button-text.scss +57 -0
- package/styles/button/_button.mixins.scss +148 -0
- package/styles/button/_mixins.scss +183 -0
- package/styles/button/forge-button.scss +9 -0
- package/styles/button-toggle/button-toggle/_mixins.scss +98 -0
- package/styles/button-toggle/button-toggle/button-toggle.scss +35 -0
- package/styles/button-toggle/button-toggle-group/_mixins.scss +79 -0
- package/styles/button-toggle/button-toggle-group/button-toggle-group.scss +16 -0
- package/styles/calendar/_mixins.scss +440 -0
- package/styles/calendar/_variables.scss +79 -0
- package/styles/calendar/calendar-menu/_mixins.scss +419 -0
- package/styles/calendar/calendar-menu/_variables.scss +10 -0
- package/styles/calendar/calendar-menu/calendar-menu.scss +22 -0
- package/styles/calendar/calendar.scss +26 -0
- package/styles/card/_mixins.scss +45 -0
- package/styles/card/_variables.scss +9 -0
- package/styles/card/card.scss +16 -0
- package/styles/checkbox/_checkbox-custom-properties.scss +11 -0
- package/styles/checkbox/_checkbox-theme.scss +577 -0
- package/styles/checkbox/_checkbox.mixins.scss +595 -0
- package/styles/checkbox/checkbox.scss +19 -0
- package/styles/chip-field/_base.scss +298 -0
- package/styles/chip-field/_core.scss +25 -0
- package/styles/chip-field/_mixins.scss +26 -0
- package/styles/chip-field/_selector.scss +229 -0
- package/styles/chip-field/_variables.scss +76 -0
- package/styles/chip-field/chip-field.scss +16 -0
- package/styles/chips/chip/_mixins.scss +277 -0
- package/styles/chips/chip/_variables.scss +7 -0
- package/styles/chips/chip/chip.scss +22 -0
- package/styles/chips/chip-set/_mixins.scss +40 -0
- package/styles/chips/chip-set/_variables.scss +6 -0
- package/styles/chips/chip-set/chip-set.scss +16 -0
- package/styles/circular-progress/_keyframes.scss +185 -0
- package/styles/circular-progress/_mixins.scss +320 -0
- package/styles/circular-progress/_variables.scss +50 -0
- package/styles/circular-progress/circular-progress.scss +9 -0
- package/styles/color-picker/_mixins.scss +231 -0
- package/styles/color-picker/_variables.scss +6 -0
- package/styles/color-picker/color-picker.scss +21 -0
- package/styles/date-picker/date-picker.scss +12 -0
- package/styles/date-range-picker/date-range-picker.scss +12 -0
- package/styles/dialog/_mixins.scss +199 -0
- package/styles/dialog/_variables.scss +22 -0
- package/styles/dialog/dialog.scss +16 -0
- package/styles/dialog/forge-dialog-utils.scss +31 -0
- package/styles/dialog/forge-dialog.scss +8 -0
- package/styles/divider/_mixins.scss +47 -0
- package/styles/divider/_variables.scss +7 -0
- package/styles/divider/divider.scss +31 -0
- package/styles/drawer/base/_mixins.scss +137 -0
- package/styles/drawer/base/_variables.scss +11 -0
- package/styles/drawer/drawer/_mixins.scss +10 -0
- package/styles/drawer/drawer/_variables.scss +12 -0
- package/styles/drawer/drawer/drawer.scss +25 -0
- package/styles/drawer/mini-drawer/_mixins.scss +66 -0
- package/styles/drawer/mini-drawer/_variables.scss +7 -0
- package/styles/drawer/mini-drawer/mini-drawer.scss +40 -0
- package/styles/drawer/modal-drawer/_mixins.scss +69 -0
- package/styles/drawer/modal-drawer/modal-drawer.scss +8 -0
- package/styles/expansion-panel/_mixins.scss +87 -0
- package/styles/expansion-panel/expansion-panel.scss +16 -0
- package/styles/expansion-panel/forge-expansion-panel.scss +16 -0
- package/styles/field/_base.scss +622 -0
- package/styles/field/_core.scss +61 -0
- package/styles/field/_selector.scss +560 -0
- package/styles/field/_utils.scss +48 -0
- package/styles/field/_variables.scss +126 -0
- package/styles/file-picker/_mixins.scss +153 -0
- package/styles/file-picker/_variables.scss +8 -0
- package/styles/file-picker/file-picker.scss +16 -0
- package/styles/floating-action-button/_extended-fab-theme.scss +238 -0
- package/styles/floating-action-button/_fab-custom-properties.scss +29 -0
- package/styles/floating-action-button/_fab-theme.scss +541 -0
- package/styles/floating-action-button/_fab.mixins.scss +351 -0
- package/styles/floating-action-button/forge-floating-action-button.scss +16 -0
- package/styles/floating-label/_mixins.scss +291 -0
- package/styles/floating-label/_variables.scss +15 -0
- package/styles/floating-label/forge-floating-label.scss +8 -0
- package/styles/forge-core.scss +14 -0
- package/styles/forge-dark.scss +10 -0
- package/styles/forge.scss +26 -0
- package/styles/form-field/_mixins.scss +71 -0
- package/styles/form-field/forge-form-field.scss +8 -0
- package/styles/icon/_mixins.scss +37 -0
- package/styles/icon/_variables.scss +10 -0
- package/styles/icon/icon.scss +26 -0
- package/styles/icon-button/_mixins.scss +345 -0
- package/styles/icon-button/_variables.scss +42 -0
- package/styles/icon-button/forge-icon-button.scss +8 -0
- package/styles/inline-message/_mixins.scss +82 -0
- package/styles/inline-message/_variables.scss +67 -0
- package/styles/inline-message/inline-message.scss +18 -0
- package/styles/label-value/_base.scss +252 -0
- package/styles/label-value/_core.scss +15 -0
- package/styles/label-value/_mixins.scss +15 -0
- package/styles/label-value/_selector.scss +167 -0
- package/styles/label-value/_variables.scss +37 -0
- package/styles/label-value/label-value.scss +17 -0
- package/styles/linear-progress/_mixins.scss +11 -0
- package/styles/linear-progress/_variables.scss +15 -0
- package/styles/linear-progress/linear-progress.scss +40 -0
- package/styles/list/list/_mixins.scss +45 -0
- package/styles/list/list/list.scss +16 -0
- package/styles/list/list-item/_mixins.scss +392 -0
- package/styles/list/list-item/_variables.scss +25 -0
- package/styles/list/list-item/list-item.scss +30 -0
- package/styles/menu/menu.scss +12 -0
- package/styles/open-icon/_mixins.scss +39 -0
- package/styles/open-icon/_variables.scss +8 -0
- package/styles/open-icon/open-icon.scss +16 -0
- package/styles/page-state/_mixins.scss +123 -0
- package/styles/page-state/_variables.scss +9 -0
- package/styles/page-state/page-state.scss +17 -0
- package/styles/paginator/_mixins.scss +136 -0
- package/styles/paginator/_variables.scss +6 -0
- package/styles/paginator/paginator.scss +21 -0
- package/styles/popup/_mixins.scss +86 -0
- package/styles/popup/_variables.scss +7 -0
- package/styles/popup/forge-popup.scss +8 -0
- package/styles/popup/popup.scss +16 -0
- package/styles/product-icon/_mixins.scss +49 -0
- package/styles/product-icon/_variables.scss +7 -0
- package/styles/product-icon/product-icon.scss +16 -0
- package/styles/profile-card/_mixins.scss +83 -0
- package/styles/profile-card/profile-card.scss +22 -0
- package/styles/quantity-field/_mixins.scss +116 -0
- package/styles/quantity-field/forge-quantity-field.scss +18 -0
- package/styles/quantity-field/quantity-field.scss +16 -0
- package/styles/radio/_mixins.scss +309 -0
- package/styles/radio/_radio-theme.scss +314 -0
- package/styles/radio/radio.scss +19 -0
- package/styles/ripple/forge-ripple.scss +17 -0
- package/styles/scaffold/_mixins.scss +194 -0
- package/styles/scaffold/forge-scaffold.scss +43 -0
- package/styles/scaffold/scaffold.scss +21 -0
- package/styles/select/select/_base.scss +84 -0
- package/styles/select/select/_core.scss +23 -0
- package/styles/select/select/_mixins.scss +25 -0
- package/styles/select/select/_selector.scss +88 -0
- package/styles/select/select/_variables.scss +16 -0
- package/styles/select/select/select.scss +17 -0
- package/styles/select/select-dropdown/select-dropdown.scss +8 -0
- package/styles/skeleton/_mixins.scss +132 -0
- package/styles/skeleton/_variables.scss +45 -0
- package/styles/skeleton/skeleton.scss +18 -0
- package/styles/slider/slider.scss +33 -0
- package/styles/stepper/step/_mixins.scss +416 -0
- package/styles/stepper/step/_variables.scss +21 -0
- package/styles/stepper/step/step.scss +164 -0
- package/styles/stepper/stepper/_mixins.scss +113 -0
- package/styles/stepper/stepper/stepper.scss +22 -0
- package/styles/switch/_switch-mixins.scss +301 -0
- package/styles/switch/_switch-theme.scss +701 -0
- package/styles/switch/switch.scss +80 -0
- package/styles/table/_mixins.scss +527 -0
- package/styles/table/_variables.scss +57 -0
- package/styles/table/forge-table.scss +12 -0
- package/styles/tabs/tab/_mixins.scss +165 -0
- package/styles/tabs/tab/_variables.scss +9 -0
- package/styles/tabs/tab/tab.scss +30 -0
- package/styles/tabs/tab-bar/_mixins.scss +78 -0
- package/styles/tabs/tab-bar/tab-bar.scss +19 -0
- package/styles/text-field/_base.scss +76 -0
- package/styles/text-field/_core.scss +19 -0
- package/styles/text-field/_mixins.scss +28 -0
- package/styles/text-field/_selector.scss +57 -0
- package/styles/text-field/_variables.scss +20 -0
- package/styles/text-field/text-field.scss +17 -0
- package/styles/theme/_custom-properties.scss +311 -0
- package/styles/theme/_icon-mixins.scss +62 -0
- package/styles/theme/_index.scss +7 -0
- package/styles/theme/_keys.scss +477 -0
- package/styles/theme/_theme-dark.scss +47 -0
- package/styles/theme/_theme-utils.scss +23 -0
- package/styles/theme/_theme-values.scss +244 -0
- package/styles/theme/_theme.scss +353 -0
- package/styles/theme/forge-material-icons.scss +19 -0
- package/styles/theme/forge-theme.scss +9 -0
- package/styles/time-picker/time-picker.scss +12 -0
- package/styles/toast/_mixins.scss +242 -0
- package/styles/toast/_variables.scss +52 -0
- package/styles/toast/toast.scss +18 -0
- package/styles/toolbar/_mixins.scss +79 -0
- package/styles/toolbar/_variables.scss +10 -0
- package/styles/toolbar/toolbar.scss +28 -0
- package/styles/tooltip/_mixins.scss +98 -0
- package/styles/tooltip/_variables.scss +18 -0
- package/styles/tooltip/forge-tooltip.scss +12 -0
- package/styles/typography/_index.scss +7 -0
- package/styles/typography/_mixins.scss +93 -0
- package/styles/typography/_variables.scss +100 -0
- package/styles/typography/forge-form.scss +67 -0
- package/styles/typography/forge-typography.scss +9 -0
- package/styles/utils/_functions-grid.scss +8 -0
- package/styles/utils/_mixins-animation.scss +37 -0
- package/styles/utils/_mixins-core.scss +18 -0
- package/styles/utils/_mixins-flex.scss +53 -0
- package/styles/utils/_mixins-grid.scss +29 -0
- package/styles/utils/_mixins-media.scss +38 -0
- package/styles/utils/_mixins.scss +45 -0
- package/styles/utils/_variables-flex.scss +30 -0
- package/styles/utils/_variables-grid.scss +9 -0
- package/styles/utils/_variables-media.scss +11 -0
- package/styles/utils/forge-flex.scss +30 -0
- package/styles/utils/forge-grid.scss +54 -0
- package/styles/utils/forge-utils.scss +45 -0
- package/styles/view-switcher/_mixins.scss +49 -0
- package/styles/view-switcher/_variables.scss +6 -0
- package/styles/view-switcher/view/view.scss +12 -0
- package/styles/view-switcher/view-switcher.scss +32 -0
|
@@ -0,0 +1,857 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { debounce, isDefined, isString, Platform, randomChars } from '@tylertech/forge-core';
|
|
7
|
+
import { highlightTextHTML } from '../core';
|
|
8
|
+
import { ListDropdownAsyncStyle } from '../list-dropdown';
|
|
9
|
+
import { ListDropdownAwareFoundation } from '../list-dropdown/list-dropdown-aware-foundation';
|
|
10
|
+
import { AutocompleteMode, AUTOCOMPLETE_CONSTANTS } from './autocomplete-constants';
|
|
11
|
+
import { getSelectedOption, isOptionType, optionEqualPredicate, OptionType } from './autocomplete-utils';
|
|
12
|
+
/**
|
|
13
|
+
* The foundation class behind the `<forge-autocomplete>` element.
|
|
14
|
+
*/
|
|
15
|
+
export class AutocompleteFoundation extends ListDropdownAwareFoundation {
|
|
16
|
+
constructor(_adapter) {
|
|
17
|
+
super();
|
|
18
|
+
this._adapter = _adapter;
|
|
19
|
+
this._isInitialized = false;
|
|
20
|
+
this._isDropdownOpen = false;
|
|
21
|
+
this._mode = AutocompleteMode.Default;
|
|
22
|
+
this._multiple = false;
|
|
23
|
+
this._debounce = AUTOCOMPLETE_CONSTANTS.numbers.DEFAULT_DEBOUNCE_TIME;
|
|
24
|
+
this._allowUnmatched = false;
|
|
25
|
+
this._filterOnFocus = true;
|
|
26
|
+
this._options = [];
|
|
27
|
+
this._filterText = '';
|
|
28
|
+
this._selectedOptions = [];
|
|
29
|
+
this._values = [];
|
|
30
|
+
this._pendingFilterPromises = [];
|
|
31
|
+
this._matchKey = null;
|
|
32
|
+
this._clickListener = evt => this._onClick(evt);
|
|
33
|
+
this._focusListener = () => this._onFocus();
|
|
34
|
+
this._blurListener = evt => this._onBlur(evt);
|
|
35
|
+
this._keydownListener = evt => this._onKeydown(evt);
|
|
36
|
+
this._dropdownIconClickListener = evt => this._onDropdownIconClick(evt);
|
|
37
|
+
this._dropdownScrollEndListener = () => this._onDropdownScrollEnd();
|
|
38
|
+
this._dropdownIconMouseDownListener = evt => this._onDropdownIconMouseDown(evt);
|
|
39
|
+
this._clearButtonListener = evt => this._onClear(evt);
|
|
40
|
+
this._dismissListener = () => this._onDismiss();
|
|
41
|
+
this._activeChangeListener = id => this._adapter.updateActiveDescendant(id);
|
|
42
|
+
this._targetWidthCallback = () => this._adapter.getTargetElementWidth(this._popupTarget);
|
|
43
|
+
this._optionBuilderCallback = (option, parentElement) => {
|
|
44
|
+
return this._optionBuilder(option, this._filterText, parentElement);
|
|
45
|
+
};
|
|
46
|
+
this._identifier = randomChars();
|
|
47
|
+
}
|
|
48
|
+
async initialize() {
|
|
49
|
+
if (!this._adapter.hasInputElement() && !this._adapter.setInputElement()) {
|
|
50
|
+
throw new Error('An input element is required as a child of the autocomplete component.');
|
|
51
|
+
}
|
|
52
|
+
this._setInputListener();
|
|
53
|
+
this._setFilterCallback();
|
|
54
|
+
this._attachListeners();
|
|
55
|
+
this._initializeAccessibility();
|
|
56
|
+
if (this._values.length) {
|
|
57
|
+
if (!this._selectedOptions.length) {
|
|
58
|
+
try {
|
|
59
|
+
await this._executeFilter();
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
console.error(e);
|
|
63
|
+
}
|
|
64
|
+
this._updateSelectedOptions(this._values);
|
|
65
|
+
}
|
|
66
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
67
|
+
}
|
|
68
|
+
this._isInitialized = true;
|
|
69
|
+
}
|
|
70
|
+
disconnect() {
|
|
71
|
+
if (this._isInitialized) {
|
|
72
|
+
this._detachListeners();
|
|
73
|
+
this._isInitialized = false;
|
|
74
|
+
}
|
|
75
|
+
if (this._isDropdownOpen) {
|
|
76
|
+
this._closeDropdown();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
_attachListeners() {
|
|
80
|
+
this._adapter.addInputListener('click', this._clickListener);
|
|
81
|
+
this._adapter.addInputListener('focus', this._focusListener);
|
|
82
|
+
this._adapter.addInputListener('blur', this._blurListener);
|
|
83
|
+
this._adapter.addInputListener('input', this._inputListener);
|
|
84
|
+
this._adapter.addInputListener('keydown', this._keydownListener);
|
|
85
|
+
this._adapter.setDropdownIconListener('click', this._dropdownIconClickListener);
|
|
86
|
+
this._adapter.setDropdownIconListener('mousedown', this._dropdownIconMouseDownListener);
|
|
87
|
+
this._adapter.setClearButtonListener('click', this._clearButtonListener);
|
|
88
|
+
}
|
|
89
|
+
_detachListeners() {
|
|
90
|
+
this._adapter.removeInputListener('click', this._clickListener);
|
|
91
|
+
this._adapter.removeInputListener('focus', this._focusListener);
|
|
92
|
+
this._adapter.removeInputListener('blur', this._blurListener);
|
|
93
|
+
this._adapter.removeInputListener('input', this._inputListener);
|
|
94
|
+
this._adapter.removeInputListener('keydown', this._keydownListener);
|
|
95
|
+
this._adapter.removeDropdownIconListener('click', this._dropdownIconClickListener);
|
|
96
|
+
this._adapter.removeDropdownIconListener('mousedown', this._dropdownIconMouseDownListener);
|
|
97
|
+
this._adapter.removeClearButtonListener('click', this._clearButtonListener);
|
|
98
|
+
}
|
|
99
|
+
_setInputListener() {
|
|
100
|
+
this._inputListener = (evt) => this._onInput(evt);
|
|
101
|
+
}
|
|
102
|
+
_setFilterCallback() {
|
|
103
|
+
this._filterFn = isDefined(this._debounce) && this._debounce > 0 ? debounce(this._debounceFilter, this._debounce, false) : this._debounceFilter;
|
|
104
|
+
}
|
|
105
|
+
_initializeAccessibility() {
|
|
106
|
+
this._adapter.intializeInputAccessibility(this._identifier);
|
|
107
|
+
}
|
|
108
|
+
get _flatOptions() {
|
|
109
|
+
if (isOptionType(this._options, OptionType.Group)) {
|
|
110
|
+
return this._options.reduce((previousValue, currentValue) => previousValue.concat(currentValue.options), []);
|
|
111
|
+
}
|
|
112
|
+
return this._options;
|
|
113
|
+
}
|
|
114
|
+
_onClick(evt) {
|
|
115
|
+
if (!this._isDropdownOpen && this._filterOnFocus) {
|
|
116
|
+
this._showDropdown();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
_onDropdownIconMouseDown(evt) {
|
|
120
|
+
evt.preventDefault(); // Always avoid changing focus when clicking the dropdown
|
|
121
|
+
}
|
|
122
|
+
_onDropdownIconClick(evt) {
|
|
123
|
+
if (!this._isDropdownOpen) {
|
|
124
|
+
this._adapter.focus();
|
|
125
|
+
window.requestAnimationFrame(() => this._showDropdown());
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this._closeDropdown();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
_onClear(evt) {
|
|
132
|
+
this._clearValue();
|
|
133
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
134
|
+
}
|
|
135
|
+
_onDropdownScrollEnd() {
|
|
136
|
+
this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.SCROLLED_BOTTOM);
|
|
137
|
+
}
|
|
138
|
+
_onFocus() {
|
|
139
|
+
if (!this._isDropdownOpen && this._adapter.getInputValue() && !Platform.isMobile) {
|
|
140
|
+
this._adapter.selectInputValue();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
_onBlur(evt) {
|
|
144
|
+
// If the blur event was triggered by an element within the popup then ignore it
|
|
145
|
+
if (this._adapter.isFocusWithinPopup(evt.relatedTarget)) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this._applyBlur();
|
|
149
|
+
}
|
|
150
|
+
_applyBlur() {
|
|
151
|
+
if (this._isDropdownOpen) {
|
|
152
|
+
this._closeDropdown();
|
|
153
|
+
}
|
|
154
|
+
// If we are in stateless mode, we don't need to do anything further
|
|
155
|
+
if (this._mode === AutocompleteMode.Stateless) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (!this._selectedOptions.length) {
|
|
159
|
+
if (!this._allowUnmatched) {
|
|
160
|
+
this._filterText = '';
|
|
161
|
+
this._adapter.setSelectedText('');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
_onInput(evt) {
|
|
169
|
+
if (this._selectedOptions.length && !this._multiple && (!this._adapter.getInputValue() || this._allowUnmatched) && !this._adapter.isWrappingChipField()) {
|
|
170
|
+
this._selectedOptions = [];
|
|
171
|
+
this._values = [];
|
|
172
|
+
this._emitChangeEvent();
|
|
173
|
+
}
|
|
174
|
+
this._filterText = this._adapter.getInputValue();
|
|
175
|
+
this._filterFn();
|
|
176
|
+
}
|
|
177
|
+
async _debounceFilter() {
|
|
178
|
+
// There is the potential that the user could have started a filter, then moved focus to another element
|
|
179
|
+
// while a debounced filter is running. This check detects that scenario and stops all pending filters.
|
|
180
|
+
if (!this._adapter.hasFocus()) {
|
|
181
|
+
this._pendingFilterPromises = [];
|
|
182
|
+
if (this._isDropdownOpen) {
|
|
183
|
+
this._closeDropdown();
|
|
184
|
+
}
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
// Keep track of these variables so we can use them when each filter callback completes
|
|
188
|
+
const filterText = this._filterText; // Filter text just before the execution
|
|
189
|
+
const filterPromise = this._executeFilter(); // Execute the filter and keep track of the filter promise object for use after it resolves
|
|
190
|
+
// Keep track of all pending promises
|
|
191
|
+
this._pendingFilterPromises.push(filterPromise);
|
|
192
|
+
// If the dropdown is open, show the spinner and execute the filter. If not open, then we need to
|
|
193
|
+
// show the dropdown (which will handle showing the spinner and executing the filter for us) so
|
|
194
|
+
// we use the promise from that method instead.
|
|
195
|
+
if (this._isDropdownOpen) {
|
|
196
|
+
this._adapter.setBusyVisibility(true);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this._showDropdown({ filter: false });
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
await filterPromise;
|
|
203
|
+
}
|
|
204
|
+
catch (_a) {
|
|
205
|
+
// When an exception occurs, we just flush the pending promises and clean up
|
|
206
|
+
this._pendingFilterPromises = [];
|
|
207
|
+
if (this._isDropdownOpen) {
|
|
208
|
+
this._closeDropdown();
|
|
209
|
+
}
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
// We only continue if the filter text before this result matches the latest filter text
|
|
213
|
+
if (filterText === this._filterText) {
|
|
214
|
+
this._pendingFilterPromises = [];
|
|
215
|
+
this._onFilterComplete();
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
// If this is not the latest filter result, we ignore it and remove it from the pending promises
|
|
219
|
+
const promiseIndex = this._pendingFilterPromises.indexOf(filterPromise);
|
|
220
|
+
if (promiseIndex !== -1) {
|
|
221
|
+
this._pendingFilterPromises.splice(promiseIndex, 1);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
_onKeydown(evt) {
|
|
226
|
+
switch (evt.key) {
|
|
227
|
+
case 'Tab':
|
|
228
|
+
if (this._isDropdownOpen && !this._multiple) {
|
|
229
|
+
this._selectActiveOption(false);
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
case 'Esc':
|
|
233
|
+
case 'Escape':
|
|
234
|
+
if (this._isDropdownOpen) {
|
|
235
|
+
evt.preventDefault();
|
|
236
|
+
this._closeDropdown();
|
|
237
|
+
}
|
|
238
|
+
break;
|
|
239
|
+
case 'Down':
|
|
240
|
+
case 'ArrowDown':
|
|
241
|
+
evt.preventDefault();
|
|
242
|
+
if (!this._isDropdownOpen) {
|
|
243
|
+
this._showDropdown({ activateFirst: true });
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
this._adapter.propagateKey(evt.key);
|
|
247
|
+
}
|
|
248
|
+
break;
|
|
249
|
+
case 'Up':
|
|
250
|
+
case 'ArrowUp':
|
|
251
|
+
evt.preventDefault();
|
|
252
|
+
if (this._isDropdownOpen) {
|
|
253
|
+
this._adapter.propagateKey(evt.key);
|
|
254
|
+
}
|
|
255
|
+
break;
|
|
256
|
+
case 'Enter':
|
|
257
|
+
case 'Home':
|
|
258
|
+
case 'End':
|
|
259
|
+
if (this._isDropdownOpen) {
|
|
260
|
+
if (evt.key === 'Enter') {
|
|
261
|
+
evt.stopPropagation();
|
|
262
|
+
}
|
|
263
|
+
evt.preventDefault();
|
|
264
|
+
this._adapter.propagateKey(evt.key);
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
case 'Backspace':
|
|
268
|
+
case 'Delete':
|
|
269
|
+
const input = evt.target;
|
|
270
|
+
const value = this._adapter.getInputValue();
|
|
271
|
+
const isRemovingAllChars = input.value.substring(input.selectionStart, input.selectionEnd) === input.value;
|
|
272
|
+
const isBackspacingLastChar = value.length === 1 && input.selectionEnd === 1;
|
|
273
|
+
const isDeletingLastChar = value.length === 1 && input.selectionEnd === 0;
|
|
274
|
+
const isEmpty = !value || isRemovingAllChars || isBackspacingLastChar || isDeletingLastChar;
|
|
275
|
+
// We only clear the value on empty when not around a chip-field and NOT in multiple mode
|
|
276
|
+
if (!this._adapter.isWrappingChipField() && isEmpty && !this._multiple && this._values.length) {
|
|
277
|
+
this._clearValue();
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
_executeFilter(sendFilterText = true, sendValue = false) {
|
|
283
|
+
if (!this._filter || typeof this._filter !== 'function') {
|
|
284
|
+
throw new Error('A filter callback must be provided. Did you set the "filter" property?');
|
|
285
|
+
}
|
|
286
|
+
const filterText = sendFilterText ? this._filterText : '';
|
|
287
|
+
const value = sendValue ? this._getValue() : null;
|
|
288
|
+
return new Promise((resolve, reject) => {
|
|
289
|
+
return Promise.resolve(this._filter(filterText, value))
|
|
290
|
+
.then(options => {
|
|
291
|
+
this._options = options;
|
|
292
|
+
resolve(this._options);
|
|
293
|
+
})
|
|
294
|
+
.catch(e => reject(`An unexpected error occurred while filtering: ${e}`));
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
_onFilterComplete() {
|
|
298
|
+
if (!this._adapter.hasFocus()) {
|
|
299
|
+
if (this._isDropdownOpen) {
|
|
300
|
+
this._closeDropdown();
|
|
301
|
+
}
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (this._options.length) {
|
|
305
|
+
const sendFilterText = this._allowUnmatched && !this._selectedOptions.length;
|
|
306
|
+
this._dropdownReady({ userTriggered: sendFilterText });
|
|
307
|
+
if (this._filterText) {
|
|
308
|
+
this._adapter.activateFirstOption();
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
this._closeDropdown();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
_clearValue() {
|
|
316
|
+
this._selectedOptions = [];
|
|
317
|
+
this._values = [];
|
|
318
|
+
if (this._isDropdownOpen) {
|
|
319
|
+
this._adapter.setSelectedOptions([]);
|
|
320
|
+
this._adapter.clearActiveOption();
|
|
321
|
+
}
|
|
322
|
+
this._emitChangeEvent();
|
|
323
|
+
}
|
|
324
|
+
async _showDropdown({ filter = true, userTriggered = true, activateFirst = false } = {}) {
|
|
325
|
+
const sendFilterText = this._allowUnmatched && !this._selectedOptions.length;
|
|
326
|
+
this._isDropdownOpen = true;
|
|
327
|
+
const config = {
|
|
328
|
+
options: this._options,
|
|
329
|
+
multiple: this._multiple,
|
|
330
|
+
selectedValues: [...this._values],
|
|
331
|
+
id: `forge-autocomplete-${this._identifier}`,
|
|
332
|
+
asyncStyle: ListDropdownAsyncStyle.Skeleton,
|
|
333
|
+
optionLimit: this._optionLimit,
|
|
334
|
+
popupClasses: this._popupClasses,
|
|
335
|
+
headerBuilder: this._popupHeaderBuilder,
|
|
336
|
+
footerBuilder: this._popupFooterBuilder,
|
|
337
|
+
transform: label => {
|
|
338
|
+
if (this._filterText) {
|
|
339
|
+
// Highlight the filter text within the label
|
|
340
|
+
const highlightElement = highlightTextHTML(label, this._filterText);
|
|
341
|
+
if (highlightElement) {
|
|
342
|
+
return highlightElement;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return label;
|
|
346
|
+
},
|
|
347
|
+
allowBusy: true,
|
|
348
|
+
optionBuilder: !!this._optionBuilder ? this._optionBuilderCallback : undefined,
|
|
349
|
+
syncWidth: this._syncPopupWidth,
|
|
350
|
+
observeScroll: this._observeScroll,
|
|
351
|
+
observeScrollThreshold: this._observeScrollThreshold,
|
|
352
|
+
scrollEndListener: this._dropdownScrollEndListener,
|
|
353
|
+
activeChangeCallback: this._activeChangeListener,
|
|
354
|
+
targetWidthCallback: this._targetWidthCallback,
|
|
355
|
+
selectCallback: (value) => this._onSelect(value),
|
|
356
|
+
closeCallback: () => this._closeDropdown()
|
|
357
|
+
};
|
|
358
|
+
this._adapter.show(config, this._popupTarget);
|
|
359
|
+
this._adapter.toggleHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.OPEN, this._isDropdownOpen);
|
|
360
|
+
if (filter) {
|
|
361
|
+
if (this._options.length) {
|
|
362
|
+
this._adapter.setBusyVisibility(true);
|
|
363
|
+
}
|
|
364
|
+
try {
|
|
365
|
+
await this._executeFilter(sendFilterText);
|
|
366
|
+
}
|
|
367
|
+
catch (e) {
|
|
368
|
+
console.error(e);
|
|
369
|
+
}
|
|
370
|
+
this._updateSelectedOptions(this._values);
|
|
371
|
+
}
|
|
372
|
+
// If we have any pending filter promises, then we will let those complete and update the dropdown separately after
|
|
373
|
+
if (this._pendingFilterPromises.length) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this._dropdownReady({ userTriggered, activateFirst });
|
|
377
|
+
}
|
|
378
|
+
_dropdownReady({ userTriggered = true, activateFirst = false } = {}) {
|
|
379
|
+
if (!this._isDropdownOpen || !this._options.length || (userTriggered && !this._adapter.hasFocus())) {
|
|
380
|
+
this._closeDropdown();
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
this._sortSelectedOptions();
|
|
384
|
+
this._adapter.setBusyVisibility(false);
|
|
385
|
+
this._adapter.setOptions(this._options);
|
|
386
|
+
this._adapter.setSelectedOptions(this._selectedOptions);
|
|
387
|
+
this._adapter.setDismissListener(this._dismissListener);
|
|
388
|
+
if (activateFirst) {
|
|
389
|
+
this._adapter.activateFirstOption();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
_closeDropdown() {
|
|
393
|
+
if (this._multiple) {
|
|
394
|
+
this._filterText = '';
|
|
395
|
+
}
|
|
396
|
+
this._isDropdownOpen = false;
|
|
397
|
+
this._adapter.hide(this._dismissListener);
|
|
398
|
+
this._sortSelectedOptions();
|
|
399
|
+
this._adapter.toggleHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.OPEN, this._isDropdownOpen);
|
|
400
|
+
}
|
|
401
|
+
_sortSelectedOptions() {
|
|
402
|
+
// When in multiple selection mode, we need to make sure that the selected options appear at the top of the list
|
|
403
|
+
if (this._multiple && this._selectedOptions.length && isOptionType(this._options, OptionType.Option)) {
|
|
404
|
+
const selectedOptions = [];
|
|
405
|
+
const unselectedOptions = [];
|
|
406
|
+
this._options.forEach(option => {
|
|
407
|
+
if (this._selectedOptions.find(o => optionEqualPredicate(o, option.value, this._matchKey))) {
|
|
408
|
+
selectedOptions.push(option);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
unselectedOptions.push(option);
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
this._options = [...selectedOptions, ...unselectedOptions];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Handles selecting an item in the dropdown.
|
|
419
|
+
* @param {string} selectedValue The string value to select.
|
|
420
|
+
*/
|
|
421
|
+
async _onSelect(selectedValue, keepFocus = true) {
|
|
422
|
+
if (this._valueChanging) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
// If we are in stateless mode, then we need to just emit an event when selecting an option. The
|
|
426
|
+
// selected values are not tracked in stateless mode
|
|
427
|
+
if (this._mode === AutocompleteMode.Stateless) {
|
|
428
|
+
const data = { value: selectedValue };
|
|
429
|
+
const result = this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.SELECT, data, true, true);
|
|
430
|
+
if (result) {
|
|
431
|
+
this._filterText = '';
|
|
432
|
+
this._closeDropdown();
|
|
433
|
+
}
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const select = () => {
|
|
437
|
+
const flatOptions = this._flatOptions;
|
|
438
|
+
const option = flatOptions.find(o => optionEqualPredicate(o, selectedValue, this._matchKey));
|
|
439
|
+
const value = option ? option.value : '';
|
|
440
|
+
const label = option ? option.label : '';
|
|
441
|
+
if (this._multiple) {
|
|
442
|
+
const optionIndex = flatOptions.findIndex(o => optionEqualPredicate(o, selectedValue, this._matchKey));
|
|
443
|
+
if (optionIndex >= 0) {
|
|
444
|
+
const selected = this._selectedOptions.some(o => optionEqualPredicate(o, selectedValue, this._matchKey));
|
|
445
|
+
this._adapter.toggleOptionMultiple(optionIndex, selected);
|
|
446
|
+
}
|
|
447
|
+
const selectedOption = getSelectedOption(this._selectedOptions, value);
|
|
448
|
+
if (selectedOption) {
|
|
449
|
+
const index = this._selectedOptions.indexOf(selectedOption);
|
|
450
|
+
this._selectedOptions.splice(index, 1);
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
this._selectedOptions.push(option);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
if (isDefined(value)) {
|
|
458
|
+
this._selectedOptions[0] = option;
|
|
459
|
+
this._filterText = label;
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
this._selectedOptions = [];
|
|
463
|
+
this._filterText = '';
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
// Update the dropdown selection status if its open
|
|
467
|
+
if (this._isDropdownOpen) {
|
|
468
|
+
this._adapter.setSelectedOptions(this._selectedOptions);
|
|
469
|
+
}
|
|
470
|
+
// Keep the values in sync with the currently selected options
|
|
471
|
+
this._values = this._selectedOptions.map(o => o.value);
|
|
472
|
+
// Update the selected text in the input
|
|
473
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
474
|
+
// Select the text in the input to allow for the next filter
|
|
475
|
+
if (!Platform.isMobile && keepFocus) {
|
|
476
|
+
this._adapter.selectInputValue();
|
|
477
|
+
}
|
|
478
|
+
if (this._multiple) {
|
|
479
|
+
// If we're in multiselect mode, we need to toggle the selected option
|
|
480
|
+
const index = flatOptions.findIndex(o => optionEqualPredicate(o, selectedValue, this._matchKey));
|
|
481
|
+
const isSelected = this._values.includes(selectedValue);
|
|
482
|
+
this._adapter.toggleOptionMultiple(index, isSelected);
|
|
483
|
+
}
|
|
484
|
+
this._emitChangeEvent();
|
|
485
|
+
};
|
|
486
|
+
// We close the dropdown immediately if in single selection mode
|
|
487
|
+
if (this._isDropdownOpen && !this._multiple) {
|
|
488
|
+
this._closeDropdown();
|
|
489
|
+
}
|
|
490
|
+
if (typeof this._beforeValueChange === 'function') {
|
|
491
|
+
this._valueChanging = Promise.resolve(this._beforeValueChange.call(null, selectedValue, this._matchKey));
|
|
492
|
+
const shouldContinue = await this._valueChanging;
|
|
493
|
+
if (shouldContinue) {
|
|
494
|
+
select();
|
|
495
|
+
}
|
|
496
|
+
this._valueChanging = undefined;
|
|
497
|
+
}
|
|
498
|
+
else {
|
|
499
|
+
select();
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
_selectActiveOption(keepFocus = true) {
|
|
503
|
+
const activeOptionIndex = this._adapter.getActiveOptionIndex();
|
|
504
|
+
if (typeof activeOptionIndex === 'number' && activeOptionIndex >= 0) {
|
|
505
|
+
const option = this._flatOptions[activeOptionIndex];
|
|
506
|
+
if (option) {
|
|
507
|
+
this._onSelect(option.value, keepFocus);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
_emitChangeEvent() {
|
|
512
|
+
this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.CHANGE, this._getValue(), true);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Retrieves the current value(s) from the selected options array based on whether
|
|
516
|
+
* we are in multi-select mode or not.
|
|
517
|
+
*/
|
|
518
|
+
_getValue() {
|
|
519
|
+
if (!this._values) {
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
if (!this._values.length) {
|
|
523
|
+
return this._multiple ? [] : null;
|
|
524
|
+
}
|
|
525
|
+
return this._multiple ? [...this._values] : this._values[0];
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Creates the selected text value from the selected label values.
|
|
529
|
+
*/
|
|
530
|
+
_getSelectedText() {
|
|
531
|
+
if (this._adapter.isWrappingChipField()) {
|
|
532
|
+
return '';
|
|
533
|
+
}
|
|
534
|
+
if (this._selectedTextBuilder) {
|
|
535
|
+
return this._selectedTextBuilder(this._selectedOptions);
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
if (this._multiple) {
|
|
539
|
+
if (this._values.length) {
|
|
540
|
+
return `${this._values.length} ${this._values.length === 1 ? 'option' : 'options'} selected`;
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
return '';
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
return this._selectedOptions.filter(o => o && o.label).map(o => o.label).join(' ').trim();
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Handles the user dismissing the dropdown. This is only called if the blur event was triggered
|
|
553
|
+
* from within the popup element itself (in a custom template most likely).
|
|
554
|
+
* @param keepFocus Keep focus on the dropdown or not.
|
|
555
|
+
*/
|
|
556
|
+
_onDismiss() {
|
|
557
|
+
this._closeDropdown();
|
|
558
|
+
}
|
|
559
|
+
async _applyValue(value) {
|
|
560
|
+
let values = [];
|
|
561
|
+
this._selectedOptions = [];
|
|
562
|
+
if (!Array.isArray(value)) {
|
|
563
|
+
values = isDefined(value) ? [value] : [];
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
values = value;
|
|
567
|
+
}
|
|
568
|
+
// If this is not a multi-select, then make sure we only allow one selected value
|
|
569
|
+
if (!this._multiple && values.length > 1) {
|
|
570
|
+
values = [values[0]];
|
|
571
|
+
}
|
|
572
|
+
if (isOptionType(values, OptionType.Option)) {
|
|
573
|
+
this._values = values.map((o) => o.value);
|
|
574
|
+
this._selectedOptions = values;
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
this._values = values;
|
|
578
|
+
}
|
|
579
|
+
// Ensure that the values passed are actually existing options
|
|
580
|
+
const allOptions = this._flatOptions;
|
|
581
|
+
if (values.length && allOptions.length) {
|
|
582
|
+
this._updateSelectedOptions(values);
|
|
583
|
+
}
|
|
584
|
+
// Execute the filter now if we have a value, but not options yet (only if it has been initialized already)
|
|
585
|
+
if (this._values.length && !this._selectedOptions.length && this._filter && this._isInitialized) {
|
|
586
|
+
try {
|
|
587
|
+
await this._executeFilter(false, true);
|
|
588
|
+
}
|
|
589
|
+
catch (e) {
|
|
590
|
+
console.error(e);
|
|
591
|
+
}
|
|
592
|
+
this._updateSelectedOptions(this._values);
|
|
593
|
+
}
|
|
594
|
+
// Update filter text to match the label when on in multiselect mode
|
|
595
|
+
if (!this._multiple) {
|
|
596
|
+
this._filterText = this._selectedOptions.length ? this._selectedOptions[0].label : '';
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
this._filterText = '';
|
|
600
|
+
}
|
|
601
|
+
// Update the state of the component based on the existence of a selected value
|
|
602
|
+
if (this._isInitialized) {
|
|
603
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
604
|
+
}
|
|
605
|
+
// When the value is changed programmatically we should update the selected options
|
|
606
|
+
if (this._isDropdownOpen) {
|
|
607
|
+
this._adapter.setSelectedOptions(this._selectedOptions);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
_updateSelectedOptions(values) {
|
|
611
|
+
const flatOptions = [...this._flatOptions, ...this._selectedOptions];
|
|
612
|
+
if (this._selectedOptions.length) {
|
|
613
|
+
this._selectedOptions = [];
|
|
614
|
+
}
|
|
615
|
+
if (isOptionType(values, OptionType.Option)) {
|
|
616
|
+
for (const option of values) {
|
|
617
|
+
const actualOption = flatOptions.find(o => optionEqualPredicate(o, option.value, this._matchKey));
|
|
618
|
+
if (actualOption) {
|
|
619
|
+
this._selectedOptions.push(actualOption);
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
this._selectedOptions.push(option);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
for (const value of values) {
|
|
628
|
+
const actualOption = flatOptions.find(o => optionEqualPredicate(o, value, this._matchKey));
|
|
629
|
+
if (actualOption) {
|
|
630
|
+
this._selectedOptions.push(actualOption);
|
|
631
|
+
}
|
|
632
|
+
else if (this._allowUnmatched) {
|
|
633
|
+
this._selectedOptions.push({ label: value, value });
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
/** Gets/sets the mode state. */
|
|
639
|
+
get mode() {
|
|
640
|
+
return this._mode;
|
|
641
|
+
}
|
|
642
|
+
set mode(value) {
|
|
643
|
+
if (this._mode !== value) {
|
|
644
|
+
this._mode = value;
|
|
645
|
+
if (this._mode === AutocompleteMode.Stateless) {
|
|
646
|
+
this._selectedOptions = [];
|
|
647
|
+
if (this._isDropdownOpen) {
|
|
648
|
+
this._closeDropdown();
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.MODE, this._mode);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
/** Gets/sets the multi-select state. */
|
|
655
|
+
get multiple() {
|
|
656
|
+
return this._multiple;
|
|
657
|
+
}
|
|
658
|
+
set multiple(value) {
|
|
659
|
+
if (this._multiple !== value) {
|
|
660
|
+
this._multiple = value;
|
|
661
|
+
this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE, isDefined(this._multiple) ? this._multiple.toString() : '');
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
/** Gets/sets the value of the component. */
|
|
665
|
+
get value() {
|
|
666
|
+
return this._getValue();
|
|
667
|
+
}
|
|
668
|
+
set value(value) {
|
|
669
|
+
let values = [];
|
|
670
|
+
if (value === null || value === undefined) {
|
|
671
|
+
values = [];
|
|
672
|
+
}
|
|
673
|
+
else if (Array.isArray(value)) {
|
|
674
|
+
values = JSON.parse(JSON.stringify(value));
|
|
675
|
+
}
|
|
676
|
+
else if (isString(value)) {
|
|
677
|
+
values = [value];
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
values = [JSON.parse(JSON.stringify(value))];
|
|
681
|
+
}
|
|
682
|
+
const hasNewValue = values.length !== this._values.length || values.some(v => !this._values.includes(v));
|
|
683
|
+
if (!hasNewValue) {
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
// We only apply the new values if they have actually changed
|
|
687
|
+
this._applyValue(value);
|
|
688
|
+
}
|
|
689
|
+
/** Gets/sets filter on focus settings which controls whether the dropdown displays automatically when focused. */
|
|
690
|
+
get filterOnFocus() {
|
|
691
|
+
return this._filterOnFocus;
|
|
692
|
+
}
|
|
693
|
+
set filterOnFocus(value) {
|
|
694
|
+
if (this._filterOnFocus !== value) {
|
|
695
|
+
this._filterOnFocus = value;
|
|
696
|
+
this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS, isDefined(this._filterOnFocus) ? this._filterOnFocus.toString() : '');
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
/** Controls whether unmatched text entered by the user will stay visible an option in the dropdown is not found. */
|
|
700
|
+
get allowUnmatched() {
|
|
701
|
+
return this._allowUnmatched;
|
|
702
|
+
}
|
|
703
|
+
set allowUnmatched(value) {
|
|
704
|
+
if (this._allowUnmatched !== value) {
|
|
705
|
+
this._allowUnmatched = value;
|
|
706
|
+
if (isDefined(this._allowUnmatched)) {
|
|
707
|
+
this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED, this._allowUnmatched.toString());
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
/** Gets/sets the property key to match the value to an option. */
|
|
712
|
+
get matchKey() {
|
|
713
|
+
return this._matchKey;
|
|
714
|
+
}
|
|
715
|
+
set matchKey(value) {
|
|
716
|
+
if (this._matchKey !== value) {
|
|
717
|
+
this._matchKey = value;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
/** Gets/sets the selector that will be used to find an element to attach the popup to. Defaults to the input element. */
|
|
721
|
+
get popupTarget() {
|
|
722
|
+
return this._popupTarget;
|
|
723
|
+
}
|
|
724
|
+
set popupTarget(value) {
|
|
725
|
+
if (this._popupTarget !== value) {
|
|
726
|
+
this._popupTarget = value;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
/** Gets/sets the list of classes to apply to the popup element. */
|
|
730
|
+
get popupClasses() {
|
|
731
|
+
return Array.isArray(this._popupClasses) ? [...this._popupClasses] : [this._popupClasses];
|
|
732
|
+
}
|
|
733
|
+
set popupClasses(value) {
|
|
734
|
+
if (this._popupClasses !== value) {
|
|
735
|
+
this._popupClasses = Array.isArray(value) ? [...value] : [value];
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
/** Gets/sets the builder callback to use for the popup header. */
|
|
739
|
+
set popupHeaderBuilder(value) {
|
|
740
|
+
this._popupHeaderBuilder = value;
|
|
741
|
+
}
|
|
742
|
+
/** Gets/sets the builder callback to use for the popup footer. */
|
|
743
|
+
set popupFooterBuilder(value) {
|
|
744
|
+
this._popupFooterBuilder = value;
|
|
745
|
+
}
|
|
746
|
+
/** Gets/sets whether the popup width is synchronized with the popup target. */
|
|
747
|
+
get syncPopupWidth() {
|
|
748
|
+
return this._syncPopupWidth;
|
|
749
|
+
}
|
|
750
|
+
set syncPopupWidth(value) {
|
|
751
|
+
if (this._syncPopupWidth !== value) {
|
|
752
|
+
this._syncPopupWidth = value;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
/** Gets/sets the maximum number of options to display in the dropdown. */
|
|
756
|
+
get optionLimit() {
|
|
757
|
+
return this._optionLimit;
|
|
758
|
+
}
|
|
759
|
+
set optionLimit(value) {
|
|
760
|
+
if (this._optionLimit !== value) {
|
|
761
|
+
this._optionLimit = value;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
/** Gets/sets the debounce delay (milliseconds) for keyboard events. */
|
|
765
|
+
get debounce() {
|
|
766
|
+
return this._debounce;
|
|
767
|
+
}
|
|
768
|
+
set debounce(value) {
|
|
769
|
+
if (this._debounce !== value) {
|
|
770
|
+
this._debounce = value;
|
|
771
|
+
if (this._isInitialized) {
|
|
772
|
+
this._setFilterCallback();
|
|
773
|
+
}
|
|
774
|
+
this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE, isDefined(this._debounce) ? this._debounce.toString() : '');
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
/** Sets the item builder callback that will be executed when building the option list in the dropdown. */
|
|
778
|
+
get optionBuilder() {
|
|
779
|
+
return this._optionBuilder;
|
|
780
|
+
}
|
|
781
|
+
set optionBuilder(fn) {
|
|
782
|
+
this._optionBuilder = fn;
|
|
783
|
+
}
|
|
784
|
+
/** Sets the filter callback that will be executed when fetching options for the autocomplete dropdown. */
|
|
785
|
+
get filter() {
|
|
786
|
+
return this._filter;
|
|
787
|
+
}
|
|
788
|
+
set filter(cb) {
|
|
789
|
+
if (this._filter !== cb) {
|
|
790
|
+
this._filter = cb;
|
|
791
|
+
// If we have a value, but don't have any options yet then execute the filter
|
|
792
|
+
if (this._isInitialized && this._values.length && !this._flatOptions.length && this._filter) {
|
|
793
|
+
this._executeFilter().then(() => {
|
|
794
|
+
this._updateSelectedOptions(this._values);
|
|
795
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
/** Sets the selected text builder callback that will be executed when getting the selected text. */
|
|
801
|
+
get selectedTextBuilder() {
|
|
802
|
+
return this._selectedTextBuilder;
|
|
803
|
+
}
|
|
804
|
+
set selectedTextBuilder(fn) {
|
|
805
|
+
this._selectedTextBuilder = fn;
|
|
806
|
+
// If there are selected options, set the selected text again
|
|
807
|
+
if (this._selectedOptions.length) {
|
|
808
|
+
this._adapter.setSelectedText(this._getSelectedText());
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
get observeScroll() {
|
|
812
|
+
return this._observeScroll;
|
|
813
|
+
}
|
|
814
|
+
set observeScroll(value) {
|
|
815
|
+
this._observeScroll = value;
|
|
816
|
+
}
|
|
817
|
+
get observeScrollThreshold() {
|
|
818
|
+
return this._observeScrollThreshold;
|
|
819
|
+
}
|
|
820
|
+
set observeScrollThreshold(value) {
|
|
821
|
+
this._observeScrollThreshold = value;
|
|
822
|
+
}
|
|
823
|
+
appendOptions(options) {
|
|
824
|
+
if (!this._isDropdownOpen) {
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
this._options = [...this._options, ...options];
|
|
828
|
+
this._adapter.appendOptions(options);
|
|
829
|
+
}
|
|
830
|
+
get isInitialized() {
|
|
831
|
+
return this._isInitialized;
|
|
832
|
+
}
|
|
833
|
+
get open() {
|
|
834
|
+
return this._isDropdownOpen;
|
|
835
|
+
}
|
|
836
|
+
set open(value) {
|
|
837
|
+
if (this._isDropdownOpen !== value) {
|
|
838
|
+
if (value) {
|
|
839
|
+
this._showDropdown({ userTriggered: false });
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
this._closeDropdown();
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
get beforeValueChange() {
|
|
847
|
+
return this._beforeValueChange;
|
|
848
|
+
}
|
|
849
|
+
set beforeValueChange(value) {
|
|
850
|
+
if (value !== this._beforeValueChange) {
|
|
851
|
+
this._beforeValueChange = value;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
get popupElement() {
|
|
855
|
+
return this._adapter.getPopupElement();
|
|
856
|
+
}
|
|
857
|
+
}
|