carbon-components-angular 5.8.1 → 5.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/documentation/classes/NumberChange.html +5 -0
- package/docs/documentation/components/Accordion.html +1 -1
- package/docs/documentation/components/AccordionItem.html +1 -1
- package/docs/documentation/components/ActionableNotification.html +1 -1
- package/docs/documentation/components/AlertModal.html +1 -1
- package/docs/documentation/components/BaseIconButton.html +1 -1
- package/docs/documentation/components/BaseNotification.html +1 -1
- package/docs/documentation/components/BaseTabHeader.html +1 -1
- package/docs/documentation/components/Breadcrumb.html +1 -1
- package/docs/documentation/components/BreadcrumbItemComponent.html +1 -1
- package/docs/documentation/components/ButtonSet.html +1 -1
- package/docs/documentation/components/Checkbox.html +1 -1
- package/docs/documentation/components/ClickableTile.html +1 -1
- package/docs/documentation/components/CodeSnippet.html +1 -1
- package/docs/documentation/components/ComboBox.html +22 -20
- package/docs/documentation/components/ContentSwitcher.html +1 -1
- package/docs/documentation/components/ContextMenuComponent.html +1 -1
- package/docs/documentation/components/ContextMenuDividerComponent.html +1 -1
- package/docs/documentation/components/ContextMenuGroupComponent.html +1 -1
- package/docs/documentation/components/ContextMenuItemComponent.html +1 -1
- package/docs/documentation/components/DatePicker.html +1 -1
- package/docs/documentation/components/DatePickerInput.html +1 -1
- package/docs/documentation/components/Dialog.html +1 -1
- package/docs/documentation/components/Documentation.html +1 -1
- package/docs/documentation/components/Dropdown.html +1 -1
- package/docs/documentation/components/DropdownList.html +85 -74
- package/docs/documentation/components/ExpandableTile.html +1 -1
- package/docs/documentation/components/FileComponent.html +1 -1
- package/docs/documentation/components/FileUploader.html +46 -42
- package/docs/documentation/components/Hamburger.html +1 -1
- package/docs/documentation/components/Header.html +1 -1
- package/docs/documentation/components/HeaderAction.html +1 -1
- package/docs/documentation/components/HeaderGlobal.html +1 -1
- package/docs/documentation/components/HeaderItem.html +1 -1
- package/docs/documentation/components/HeaderMenu.html +1 -1
- package/docs/documentation/components/HeaderNavigation.html +1 -1
- package/docs/documentation/components/IconButton.html +1 -1
- package/docs/documentation/components/InlineLoading.html +1 -1
- package/docs/documentation/components/Label.html +311 -252
- package/docs/documentation/components/ListColumn.html +1 -1
- package/docs/documentation/components/ListHeader.html +1 -1
- package/docs/documentation/components/ListRow.html +1 -1
- package/docs/documentation/components/Loading.html +1 -1
- package/docs/documentation/components/Modal.html +1 -1
- package/docs/documentation/components/ModalFooter.html +1 -1
- package/docs/documentation/components/ModalHeader.html +10 -23
- package/docs/documentation/components/Notification.html +1 -1
- package/docs/documentation/components/NumberComponent.html +105 -64
- package/docs/documentation/components/OverflowMenu.html +1 -1
- package/docs/documentation/components/OverflowMenuCustomPane.html +1 -1
- package/docs/documentation/components/OverflowMenuOption.html +1 -1
- package/docs/documentation/components/OverflowMenuPane.html +1 -1
- package/docs/documentation/components/Overlay.html +1 -1
- package/docs/documentation/components/Pagination.html +10 -10
- package/docs/documentation/components/PaginationNav.html +1 -1
- package/docs/documentation/components/PaginationNavItem.html +1 -1
- package/docs/documentation/components/PaginationOverflow.html +1 -1
- package/docs/documentation/components/Panel.html +1 -1
- package/docs/documentation/components/Placeholder.html +1 -1
- package/docs/documentation/components/PopoverContent.html +1 -1
- package/docs/documentation/components/ProgressBar.html +1 -1
- package/docs/documentation/components/ProgressIndicator.html +23 -36
- package/docs/documentation/components/Radio.html +1 -1
- package/docs/documentation/components/RadioGroup.html +1 -1
- package/docs/documentation/components/Search.html +1 -1
- package/docs/documentation/components/Select.html +1 -1
- package/docs/documentation/components/SelectionTile.html +46 -48
- package/docs/documentation/components/SideNav.html +1 -1
- package/docs/documentation/components/SideNavItem.html +30 -24
- package/docs/documentation/components/SideNavMenu.html +5 -9
- package/docs/documentation/components/SkeletonPlaceholder.html +1 -1
- package/docs/documentation/components/SkeletonText.html +1 -1
- package/docs/documentation/components/Slider.html +107 -90
- package/docs/documentation/components/StructuredList.html +1 -1
- package/docs/documentation/components/SwitcherList.html +1 -1
- package/docs/documentation/components/SwitcherListItem.html +1 -1
- package/docs/documentation/components/Tab.html +1 -1
- package/docs/documentation/components/TabHeaderGroup.html +1 -1
- package/docs/documentation/components/TabHeaders.html +120 -31
- package/docs/documentation/components/TabSkeleton.html +1 -1
- package/docs/documentation/components/Table.html +1 -1
- package/docs/documentation/components/TableBody.html +1 -1
- package/docs/documentation/components/TableCheckbox.html +1 -1
- package/docs/documentation/components/TableContainer.html +1 -1
- package/docs/documentation/components/TableData.html +1 -1
- package/docs/documentation/components/TableExpandButton.html +1 -1
- package/docs/documentation/components/TableExpandedRow.html +1 -1
- package/docs/documentation/components/TableHead.html +1 -1
- package/docs/documentation/components/TableHeadCell.html +1 -1
- package/docs/documentation/components/TableHeadCheckbox.html +1 -1
- package/docs/documentation/components/TableHeadExpand.html +1 -1
- package/docs/documentation/components/TableHeader.html +1 -1
- package/docs/documentation/components/TableRadio.html +1 -1
- package/docs/documentation/components/TableRowComponent.html +1 -1
- package/docs/documentation/components/TableToolbar.html +8 -8
- package/docs/documentation/components/TableToolbarActions.html +1 -1
- package/docs/documentation/components/TableToolbarContent.html +1 -1
- package/docs/documentation/components/TableToolbarSearch.html +1 -1
- package/docs/documentation/components/Tabs.html +1 -1
- package/docs/documentation/components/Tag.html +1 -1
- package/docs/documentation/components/TagFilter.html +1 -1
- package/docs/documentation/components/TextInputLabelComponent.html +1197 -0
- package/docs/documentation/components/TextareaLabelComponent.html +1243 -0
- package/docs/documentation/components/Tile.html +1 -1
- package/docs/documentation/components/TileGroup.html +142 -27
- package/docs/documentation/components/TimePicker.html +1 -1
- package/docs/documentation/components/TimePickerSelect.html +1 -1
- package/docs/documentation/components/Toast.html +28 -44
- package/docs/documentation/components/Toggle.html +1 -1
- package/docs/documentation/components/Toggletip.html +1 -1
- package/docs/documentation/components/Tooltip.html +1 -1
- package/docs/documentation/components/TooltipDefinition.html +1 -1
- package/docs/documentation/coverage.html +35 -11
- package/docs/documentation/directives/DialogDirective.html +9 -11
- package/docs/documentation/directives/OverflowMenuDirective.html +2 -2
- package/docs/documentation/graph/dependencies.svg +2646 -2598
- package/docs/documentation/images/coverage-badge-documentation.svg +1 -1
- package/docs/documentation/interfaces/PaginationTranslations.html +4 -4
- package/docs/documentation/js/menu-wc.js +15 -9
- package/docs/documentation/js/menu-wc_es5.js +1 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +40 -36
- package/docs/documentation/modules/DatePickerInputModule.html +40 -36
- package/docs/documentation/modules/DatePickerModule/dependencies.svg +39 -39
- package/docs/documentation/modules/DatePickerModule.html +39 -39
- package/docs/documentation/modules/FileUploaderModule/dependencies.svg +34 -34
- package/docs/documentation/modules/FileUploaderModule.html +34 -34
- package/docs/documentation/modules/GridModule/dependencies.svg +60 -60
- package/docs/documentation/modules/GridModule.html +60 -60
- package/docs/documentation/modules/InputModule/dependencies.svg +107 -59
- package/docs/documentation/modules/InputModule.html +126 -60
- package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
- package/docs/documentation/modules/LoadingModule.html +4 -4
- package/docs/documentation/modules/NFormsModule/dependencies.svg +10 -4
- package/docs/documentation/modules/NFormsModule.html +15 -5
- package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NumberModule.html +4 -4
- package/docs/documentation/modules/ProgressBarModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ProgressBarModule.html +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +42 -54
- package/docs/documentation/modules/ProgressIndicatorModule.html +43 -60
- package/docs/documentation/modules/RadioModule/dependencies.svg +4 -8
- package/docs/documentation/modules/RadioModule.html +4 -8
- package/docs/documentation/modules/SearchModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SearchModule.html +4 -4
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/StructuredListModule/dependencies.svg +66 -66
- package/docs/documentation/modules/StructuredListModule.html +66 -66
- package/docs/documentation/modules/TableModule/dependencies.svg +216 -216
- package/docs/documentation/modules/TableModule.html +216 -216
- package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ThemeModule.html +4 -4
- package/docs/documentation/modules/TilesModule/dependencies.svg +78 -78
- package/docs/documentation/modules/TilesModule.html +78 -78
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TimePickerModule.html +4 -4
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +46 -50
- package/docs/documentation/modules/TimePickerSelectModule.html +46 -50
- package/docs/documentation/modules/ToggleModule/dependencies.svg +26 -26
- package/docs/documentation/modules/ToggleModule.html +26 -26
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation/overview.html +2647 -2599
- package/docs/documentation.json +1062 -453
- package/docs/storybook/1741.0cb8b504.iframe.bundle.js +1 -0
- package/docs/storybook/1895.d4241266.iframe.bundle.js +1 -0
- package/docs/storybook/{3224.acb75ed6.iframe.bundle.js → 3224.8b16624b.iframe.bundle.js} +1 -1
- package/docs/storybook/{3348.91a6fc53.iframe.bundle.js → 3348.683a45b7.iframe.bundle.js} +1 -1
- package/docs/storybook/{3931.f22006ff.iframe.bundle.js → 3931.55f9fea9.iframe.bundle.js} +1 -1
- package/docs/storybook/5868.3e7f17a9.iframe.bundle.js +1 -0
- package/docs/storybook/{1235.8d840d5b.iframe.bundle.js → 7153.87910de3.iframe.bundle.js} +1 -1
- package/docs/storybook/7773.6c3cf943.iframe.bundle.js +1 -0
- package/docs/storybook/{8341.50a06357.iframe.bundle.js → 8341.83894870.iframe.bundle.js} +1 -1
- package/docs/storybook/{901.aa635bd3.iframe.bundle.js → 901.3e5cc559.iframe.bundle.js} +1 -1
- package/docs/storybook/combobox-combobox-stories.fdeea2f7.iframe.bundle.js +1 -0
- package/docs/storybook/file-uploader-file-uploader-stories.fb6f46e6.iframe.bundle.js +1 -0
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/main.69a14133.iframe.bundle.js +1 -0
- package/docs/storybook/{progress-indicator-progress-indicator-stories.7a79da0d.iframe.bundle.js → number-input-number-stories.3ea609db.iframe.bundle.js} +1 -1
- package/docs/storybook/{patterns-dialogs-modal-with-table-stories.f2295407.iframe.bundle.js → patterns-dialogs-modal-with-table-stories.494ac5a3.iframe.bundle.js} +1 -1
- package/docs/storybook/{patterns-forms-multi-step-form-stories.0d86ee5b.iframe.bundle.js → patterns-forms-multi-step-form-stories.75d0fa39.iframe.bundle.js} +1 -1
- package/docs/storybook/patterns-loading-large-loading-stories.8c04d095.iframe.bundle.js +1 -0
- package/docs/storybook/progress-indicator-progress-indicator-stories.dcc5c5ca.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.c5d3a693.iframe.bundle.js → runtime~main.7228f593.iframe.bundle.js} +1 -1
- package/docs/storybook/slider-slider-stories.feee50aa.iframe.bundle.js +1 -0
- package/docs/storybook/{tabs-tabs-stories.d36fc351.iframe.bundle.js → tabs-tabs-stories.675b2d72.iframe.bundle.js} +1 -1
- package/docs/storybook/ui-shell-ui-shell-stories.90ac54a8.iframe.bundle.js +1 -0
- package/esm2020/combobox/combobox.component.mjs +4 -2
- package/esm2020/dialog/dialog.directive.mjs +4 -6
- package/esm2020/dropdown/list/dropdown-list.component.mjs +39 -30
- package/esm2020/file-uploader/file-uploader.component.mjs +16 -13
- package/esm2020/forms/forms.module.mjs +7 -4
- package/esm2020/forms/index.mjs +2 -2
- package/esm2020/input/index.mjs +3 -1
- package/esm2020/input/input.module.mjs +13 -3
- package/esm2020/input/label.component.mjs +200 -124
- package/esm2020/input/text-input-label.component.mjs +211 -0
- package/esm2020/input/textarea-label.component.mjs +215 -0
- package/esm2020/modal/modal-header.component.mjs +7 -9
- package/esm2020/notification/toast.component.mjs +10 -12
- package/esm2020/number-input/number.component.mjs +10 -2
- package/esm2020/pagination/pagination.component.mjs +9 -9
- package/esm2020/progress-indicator/progress-indicator.component.mjs +8 -10
- package/esm2020/progress-indicator/progress-indicator.module.mjs +1 -5
- package/esm2020/slider/slider.component.mjs +6 -5
- package/esm2020/table/toolbar/table-toolbar.component.mjs +7 -7
- package/esm2020/tabs/tab-headers.component.mjs +10 -2
- package/esm2020/tiles/selection-tile.component.mjs +21 -23
- package/esm2020/tiles/tile-group.component.mjs +25 -5
- package/esm2020/ui-shell/sidenav/sidenav-item.component.mjs +8 -2
- package/esm2020/ui-shell/sidenav/sidenav-menu.component.mjs +4 -9
- package/fesm2015/carbon-components-angular-combobox.mjs +3 -1
- package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-dialog.mjs +3 -5
- package/fesm2015/carbon-components-angular-dialog.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-dropdown.mjs +38 -29
- package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-file-uploader.mjs +15 -12
- package/fesm2015/carbon-components-angular-file-uploader.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-forms.mjs +7 -4
- package/fesm2015/carbon-components-angular-forms.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-input.mjs +572 -74
- package/fesm2015/carbon-components-angular-input.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-modal.mjs +11 -13
- package/fesm2015/carbon-components-angular-modal.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-notification.mjs +7 -9
- package/fesm2015/carbon-components-angular-notification.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-number-input.mjs +9 -1
- package/fesm2015/carbon-components-angular-number-input.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-pagination.mjs +8 -8
- package/fesm2015/carbon-components-angular-pagination.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-progress-indicator.mjs +7 -13
- package/fesm2015/carbon-components-angular-progress-indicator.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-slider.mjs +5 -4
- package/fesm2015/carbon-components-angular-slider.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-table.mjs +6 -6
- package/fesm2015/carbon-components-angular-table.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-tabs.mjs +9 -1
- package/fesm2015/carbon-components-angular-tabs.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-tiles.mjs +43 -26
- package/fesm2015/carbon-components-angular-tiles.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-ui-shell.mjs +10 -9
- package/fesm2015/carbon-components-angular-ui-shell.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-combobox.mjs +3 -1
- package/fesm2020/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dialog.mjs +3 -5
- package/fesm2020/carbon-components-angular-dialog.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dropdown.mjs +38 -29
- package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-file-uploader.mjs +15 -12
- package/fesm2020/carbon-components-angular-file-uploader.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-forms.mjs +7 -4
- package/fesm2020/carbon-components-angular-forms.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-input.mjs +572 -74
- package/fesm2020/carbon-components-angular-input.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-modal.mjs +11 -13
- package/fesm2020/carbon-components-angular-modal.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-notification.mjs +7 -9
- package/fesm2020/carbon-components-angular-notification.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-number-input.mjs +9 -1
- package/fesm2020/carbon-components-angular-number-input.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-pagination.mjs +8 -8
- package/fesm2020/carbon-components-angular-pagination.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-progress-indicator.mjs +7 -13
- package/fesm2020/carbon-components-angular-progress-indicator.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-slider.mjs +5 -4
- package/fesm2020/carbon-components-angular-slider.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-table.mjs +6 -6
- package/fesm2020/carbon-components-angular-table.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-tabs.mjs +9 -1
- package/fesm2020/carbon-components-angular-tabs.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-tiles.mjs +43 -26
- package/fesm2020/carbon-components-angular-tiles.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-ui-shell.mjs +10 -9
- package/fesm2020/carbon-components-angular-ui-shell.mjs.map +1 -1
- package/file-uploader/file-uploader.component.d.ts +2 -1
- package/forms/forms.module.d.ts +1 -1
- package/forms/index.d.ts +1 -1
- package/input/index.d.ts +2 -0
- package/input/input.module.d.ts +6 -4
- package/input/label.component.d.ts +10 -23
- package/input/text-input-label.component.d.ts +85 -0
- package/input/textarea-label.component.d.ts +87 -0
- package/modal/modal-header.component.d.ts +1 -3
- package/notification/toast.component.d.ts +1 -3
- package/number-input/number.component.d.ts +5 -1
- package/package.json +1 -1
- package/progress-indicator/progress-indicator.component.d.ts +1 -3
- package/progress-indicator/progress-indicator.module.d.ts +3 -4
- package/slider/slider.component.d.ts +3 -2
- package/tabs/tab-headers.component.d.ts +5 -3
- package/tiles/tile-group.component.d.ts +4 -2
- package/ui-shell/sidenav/sidenav-menu.component.d.ts +1 -1
- package/docs/storybook/1741.baa0e588.iframe.bundle.js +0 -1
- package/docs/storybook/1895.cdd3d03e.iframe.bundle.js +0 -1
- package/docs/storybook/5868.bc6e8b2d.iframe.bundle.js +0 -1
- package/docs/storybook/7773.ef20c61a.iframe.bundle.js +0 -1
- package/docs/storybook/combobox-combobox-stories.cc751a45.iframe.bundle.js +0 -1
- package/docs/storybook/file-uploader-file-uploader-stories.f41b9fbb.iframe.bundle.js +0 -1
- package/docs/storybook/main.760cce33.iframe.bundle.js +0 -1
- package/docs/storybook/number-input-number-stories.aadfb01f.iframe.bundle.js +0 -1
- package/docs/storybook/patterns-loading-large-loading-stories.95988daa.iframe.bundle.js +0 -1
- package/docs/storybook/slider-slider-stories.fe053915.iframe.bundle.js +0 -1
- package/docs/storybook/ui-shell-ui-shell-stories.9dc19b9f.iframe.bundle.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[7773],{"./src/common/tab.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{X9:()=>tabbableSelectorIgnoreTabIndex,ZW:()=>getFocusElementList,jv:()=>isFocusInLastItem,nW:()=>cycleTabs,o$:()=>tabbableSelector,w3:()=>isFocusInFirstItem});let tabbableSelector="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",tabbableSelectorIgnoreTabIndex="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";function getFocusElementList(element,selector=tabbableSelector){let elements=element.querySelectorAll(selector);return elements?Array.prototype.filter.call(elements,(el=>function isVisible(element){return!!(element.offsetWidth||element.offsetHeight||element.getClientRects().length)}(el))):elements}function isFocusInFirstItem(event,list){return list.length>0&&(event.target||event.srcElement)===list[0]}function isFocusInLastItem(event,list){return list.length>0&&(event.target||event.srcElement)===list[list.length-1]}function cycleTabs(event,element){if("Tab"===event.key){let list=getFocusElementList(element),focusChanged=!1;event.shiftKey?(isFocusInFirstItem(event,list)||function isElementFocused(event,element){return(event.target||event.srcElement)===element}(event,element))&&(focusChanged=function focusLastFocusableElement(list){return list.length>0&&(list[list.length-1].focus(),!0)}(list)):isFocusInLastItem(event,list)&&(focusChanged=function focusFirstFocusableElement(list){return list.length>0&&(list[0].focus(),!0)}(list)),focusChanged&&(event.preventDefault(),event.stopPropagation())}}},"./src/dialog/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Su:()=>DialogModule,PQ:()=>OverflowMenu});var CloseReasons,tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");!function(CloseReasons){CloseReasons[CloseReasons.destroyed=0]="destroyed",CloseReasons[CloseReasons.programmatic=1]="programmatic",CloseReasons[CloseReasons.interaction=2]="interaction",CloseReasons[CloseReasons.hidden=3]="hidden"}(CloseReasons||(CloseReasons={}));var placeholder=__webpack_require__("./src/placeholder/index.ts"),tab_service=__webpack_require__("./src/common/tab.service.ts");let DialogService=class DialogService{constructor(injector,placeholderService){this.injector=injector,this.placeholderService=placeholderService}static closeAll(){DialogService.dialogRefs.forEach((ref=>ref.instance.doClose({reason:CloseReasons.programmatic}))),DialogService.dialogRefs.clear()}open(viewContainer,dialogConfig,component){if(!component)return;let dialogRef;return dialogConfig.appendInline?dialogRef=viewContainer.createComponent(component,{index:0,injector:this.injector}):this.placeholderService.hasPlaceholderRef()?dialogRef=this.placeholderService.createComponent(component,this.injector):(dialogRef=viewContainer.createComponent(component,{index:0,injector:this.injector}),dialogRef&&setTimeout((()=>{window.document.querySelector("body").appendChild(dialogRef.location.nativeElement)}))),DialogService.dialogRefs.add(dialogRef),dialogConfig.previouslyFocusedElement=document.activeElement,dialogRef.instance.dialogConfig=dialogConfig,dialogRef.instance.elementRef.nativeElement.focus(),dialogRef}close(dialogRef){if(!dialogRef)return;const elementToFocus=dialogRef.instance.dialogConfig.previouslyFocusedElement;dialogRef.destroy(),DialogService.dialogRefs.has(dialogRef)&&DialogService.dialogRefs.delete(dialogRef),dialogRef.location.nativeElement.querySelectorAll(tab_service.o$)||elementToFocus.focus()}singletonClickListen(){DialogService.listeningForBodyClicks||(document.body.firstElementChild.addEventListener("click",(()=>null),!0),DialogService.listeningForBodyClicks=!0)}};DialogService.listeningForBodyClicks=!1,DialogService.dialogRefs=new Set,DialogService.ctorParameters=()=>[{type:core.Injector},{type:placeholder.Q_}],DialogService=(0,tslib_es6.gn)([(0,core.Injectable)()],DialogService);var Subscription=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subscription.js"),utils_position=__webpack_require__("./node_modules/@carbon/utils-position/index.js"),utils=__webpack_require__("./src/utils/index.ts");let Dialog=class Dialog{constructor(elementRef,elementService,animationFrameService=null){this.elementRef=elementRef,this.elementService=elementService,this.animationFrameService=animationFrameService,this.close=new core.EventEmitter,this.data={},this.visibilitySubscription=new Subscription.w0,this.animationFrameSubscription=new Subscription.w0,this.addGap={left:pos=>utils_position.FK.addOffset(pos,0,-this.dialogConfig.gap),right:pos=>utils_position.FK.addOffset(pos,0,this.dialogConfig.gap),top:pos=>utils_position.FK.addOffset(pos,-this.dialogConfig.gap),bottom:pos=>utils_position.FK.addOffset(pos,this.dialogConfig.gap),"left-bottom":pos=>utils_position.FK.addOffset(pos,0,-this.dialogConfig.gap),"right-bottom":pos=>utils_position.FK.addOffset(pos,0,this.dialogConfig.gap)},this.placements={}}ngOnInit(){this.placement=this.dialogConfig.placement.split(",")[0],this.data=this.dialogConfig.data,this.onDialogInit()}ngAfterViewInit(){const dialogElement=this.dialog.nativeElement;if(this.dialogConfig.wrapperClass)for(const extraClass of this.dialogConfig.wrapperClass.split(" "))dialogElement.classList.add(extraClass);(0,tab_service.ZW)(this.dialog.nativeElement).length>0&&dialogElement.focus();const parentElement=this.dialogConfig.parentRef.nativeElement;this.animationFrameService&&(this.animationFrameSubscription=this.animationFrameService.tick.subscribe((()=>{this.placeDialog()}))),this.dialogConfig.closeWhenHidden&&(this.visibilitySubscription=this.elementService.visibility(parentElement,parentElement).subscribe((value=>{this.placeDialog(),value.visible||this.doClose({reason:CloseReasons.hidden})}))),this.placeDialog(),setTimeout((()=>this.afterDialogViewInit()))}onDialogInit(){}afterDialogViewInit(){}placeDialog(){const positionService=new utils_position.ZP(this.placements);let parentEl=this.dialogConfig.parentRef.nativeElement,el=this.dialog.nativeElement,dialogPlacement=this.placement;const placements=this.dialogConfig.placement.split(",");dialogPlacement=positionService.findBestPlacement(parentEl,el,placements);const pos=((reference,target,placement)=>{let pos;return pos=this.dialogConfig.appendInline?this.addGap[placement](positionService.findRelative(reference,target,placement)):this.addGap[placement](positionService.findAbsolute(reference,target,placement)),this.dialogConfig.offset&&(pos.top=pos.top+this.dialogConfig.offset.y,pos.left=pos.left+this.dialogConfig.offset.x),pos})(parentEl,el,dialogPlacement);positionService.setElement(el,pos),setTimeout((()=>{this.placement=dialogPlacement}))}escapeClose(event){switch(event.key){case"Escape":event.stopImmediatePropagation(),this.doClose({reason:CloseReasons.interaction,target:event.target});break;case"Tab":(0,tab_service.nW)(event,this.elementRef.nativeElement)}}clickClose(event){this.elementRef.nativeElement.contains(event.target)||this.dialogConfig.parentRef.nativeElement.contains(event.target)||this.doClose({reason:CloseReasons.interaction,target:event.target})}doClose(meta={reason:CloseReasons.interaction}){this.close.emit(meta)}ngOnDestroy(){this.visibilitySubscription.unsubscribe(),this.animationFrameSubscription&&this.animationFrameSubscription.unsubscribe()}};Dialog.ctorParameters=()=>[{type:core.ElementRef},{type:utils.d2},{type:utils.NV,decorators:[{type:core.Optional}]}],Dialog.propDecorators={close:[{type:core.Output}],dialogConfig:[{type:core.Input}],dialog:[{type:core.ViewChild,args:["dialog"]}],escapeClose:[{type:core.HostListener,args:["keydown",["$event"]]}],clickClose:[{type:core.HostListener,args:["document:click",["$event"]]}]},Dialog=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-dialog, ibm-dialog",template:""})],Dialog);let DialogDirective=class DialogDirective{constructor(elementRef,viewContainerRef,dialogService,eventService){this.elementRef=elementRef,this.viewContainerRef=viewContainerRef,this.dialogService=dialogService,this.eventService=eventService,this.title="",this.trigger="click",this.closeTrigger="mouseleave",this.placement="left",this.gap=0,this.appendInline=!1,this.data={},this.isOpen=!1,this.disabled=!1,this.onClose=new core.EventEmitter,this.onOpen=new core.EventEmitter,this.isOpenChange=new core.EventEmitter,this.role="button",this.hasPopup=!0}set ibmDialog(body){this.cdsDialog=body}get ariaOwns(){return this.isOpen?this.dialogConfig.compID:null}ngOnChanges(changes){this.dialogConfig={title:this.title,content:this.cdsDialog,placement:this.placement,parentRef:this.elementRef,gap:this.gap,trigger:this.trigger,closeTrigger:this.closeTrigger,shouldClose:this.shouldClose||(()=>!0),appendInline:this.appendInline,wrapperClass:this.wrapperClass,data:this.data,offset:this.offset,disabled:this.disabled},changes.isOpen&&(changes.isOpen.currentValue?this.open():changes.isOpen.firstChange||this.close({reason:CloseReasons.programmatic})),this.onDialogChanges(changes),this.updateConfig()}ngOnInit(){this.dialogService.singletonClickListen();const element=this.elementRef.nativeElement;this.eventService.on(element,"keydown",(event=>{(event.target===this.dialogConfig.parentRef.nativeElement&&("Tab"===event.key||"Tab"===event.key&&event.shiftKey)||"Escape"===event.key)&&this.close({reason:CloseReasons.interaction,target:event.target})})),"hover"===this.trigger||"mouseenter"===this.trigger?(this.eventService.on(element,"mouseenter",this.open.bind(this)),this.eventService.on(element,this.closeTrigger,(event=>{this.close({reason:CloseReasons.interaction,target:event.target})})),this.eventService.on(element,"focus",this.open.bind(this)),this.eventService.on(element,"blur",(event=>{this.close({reason:CloseReasons.interaction,target:event.target})}))):(this.eventService.on(element,"click",(event=>{this.toggle({reason:CloseReasons.interaction,target:event.target})})),this.eventService.on(element,"keydown",(event=>{"Enter"!==event.key&&" "!==event.key||setTimeout((()=>{this.open()}))}))),DialogDirective.dialogCounter++,this.dialogConfig.compID="dialog-"+DialogDirective.dialogCounter,this.onDialogInit(),this.updateConfig()}ngOnDestroy(){this.close({reason:CloseReasons.destroyed})}open(component){if(!this.dialogRef&&!this.disabled)return this.dialogRef=this.dialogService.open(this.viewContainerRef,this.dialogConfig,component),this.isOpen=!0,this.onOpen.emit(),this.isOpenChange.emit(!0),this.dialogRef.instance.close.subscribe((meta=>{this.dialogRef&&this.dialogConfig.shouldClose&&this.dialogConfig.shouldClose(meta)&&(this.dialogService.close(this.dialogRef),this.dialogRef=null,this.isOpen=!1,this.onClose.emit(),this.isOpenChange.emit(!1))})),this.dialogRef}toggle(meta={reason:CloseReasons.interaction}){this.isOpen?this.close(meta):this.open()}close(meta={reason:CloseReasons.interaction}){setTimeout((()=>{this.dialogRef&&this.dialogRef.instance.doClose(meta)}))}onDialogInit(){}onDialogChanges(_changes){}updateConfig(){}};DialogDirective.dialogCounter=0,DialogDirective.ctorParameters=()=>[{type:core.ElementRef},{type:core.ViewContainerRef},{type:DialogService},{type:utils.PO}],DialogDirective.propDecorators={title:[{type:core.Input}],ibmDialog:[{type:core.Input}],cdsDialog:[{type:core.Input}],trigger:[{type:core.Input}],closeTrigger:[{type:core.Input}],placement:[{type:core.Input}],offset:[{type:core.Input}],wrapperClass:[{type:core.Input}],gap:[{type:core.Input}],appendInline:[{type:core.Input}],data:[{type:core.Input}],isOpen:[{type:core.Input},{type:core.HostBinding,args:["attr.aria-expanded"]}],disabled:[{type:core.Input}],shouldClose:[{type:core.Input}],onClose:[{type:core.Output}],onOpen:[{type:core.Output}],isOpenChange:[{type:core.Output}],role:[{type:core.HostBinding,args:["attr.role"]}],hasPopup:[{type:core.HostBinding,args:["attr.aria-haspopup"]}],ariaOwns:[{type:core.HostBinding,args:["attr.aria-owns"]}]},DialogDirective=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsDialog], [ibmDialog]",exportAs:"dialog",providers:[DialogService]})],DialogDirective);var i18n=__webpack_require__("./src/i18n/index.ts"),experimental=__webpack_require__("./src/experimental/index.ts");let OverflowMenuPane=class OverflowMenuPane extends Dialog{constructor(elementRef,i18n,experimental,animationFrameService=null,elementService=null){super(elementRef,elementService,animationFrameService),this.elementRef=elementRef,this.i18n=i18n,this.experimental=experimental,this.animationFrameService=animationFrameService,this.elementService=elementService}onDialogInit(){const positionOverflowMenu=pos=>{let offset;const closestRel=(0,utils._K)("position",["relative","fixed","absolute"],this.elementRef.nativeElement),topFix=closestRel?-1*closestRel.getBoundingClientRect().top:0,leftFix=closestRel?-1*closestRel.getBoundingClientRect().left:0;return offset=Math.round(this.dialog.nativeElement.offsetWidth/2)-20,this.dialogConfig.flip?utils_position.FK.addOffset(pos,topFix,-offset+leftFix):utils_position.FK.addOffset(pos,topFix,offset+leftFix)};this.addGap.bottom=positionOverflowMenu,this.addGap.top=positionOverflowMenu,this.dialogConfig.menuLabel||(this.dialogConfig.menuLabel=this.i18n.get().OVERFLOW_MENU.OVERFLOW)}hostkeys(event){const listItems=this.listItems();switch(event.key){case"ArrowDown":if(event.preventDefault(),(0,tab_service.jv)(event,listItems))listItems[0].focus();else{const index=listItems.findIndex((item=>item===event.target));listItems[index+1].focus()}break;case"ArrowUp":if(event.preventDefault(),(0,tab_service.w3)(event,listItems))listItems[listItems.length-1].focus();else{const index=listItems.findIndex((item=>item===event.target));listItems[index-1].focus()}break;case"Home":event.preventDefault(),listItems[0].focus();break;case"End":event.preventDefault(),listItems[listItems.length-1].focus();break;case"Escape":case"Tab":event.stopImmediatePropagation(),this.doClose({reason:CloseReasons.interaction,target:event.target})}}onClose(event){this.doClose({reason:CloseReasons.interaction,target:event.target})}afterDialogViewInit(){const focusElementList=this.listItems();focusElementList.forEach((button=>{null===button.getAttribute("tabindex")&&(button.tabIndex=-1)})),focusElementList[0]&&(focusElementList[0].tabIndex=0,focusElementList[0].focus())}listItems(){return Array.from(this.elementRef.nativeElement.querySelectorAll(".cds--overflow-menu-options__option:not([disabled]) .cds--overflow-menu-options__btn"))}};OverflowMenuPane.ctorParameters=()=>[{type:core.ElementRef},{type:i18n.oc},{type:experimental.tM},{type:utils.NV,decorators:[{type:core.Optional}]},{type:utils.d2,decorators:[{type:core.Optional}]}],OverflowMenuPane.propDecorators={hostkeys:[{type:core.HostListener,args:["keydown",["$event"]]}]},OverflowMenuPane=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-overflow-menu-pane, ibm-overflow-menu-pane",template:'\n\t\t<ul\n\t\t\t[attr.id]="dialogConfig.compID"\n\t\t\t[attr.aria-label]="dialogConfig.menuLabel"\n\t\t\t[attr.data-floating-menu-direction]="placement ? placement : null"\n\t\t\t[ngClass]="{\'cds--overflow-menu--flip\': dialogConfig.flip}"\n\t\t\trole="menu"\n\t\t\t#dialog\n\t\t\tclass="cds--overflow-menu-options cds--overflow-menu-options--open"\n\t\t\t(click)="onClose($event)"\n\t\t\t[attr.aria-label]="dialogConfig.menuLabel">\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="dialogConfig.content"\n\t\t\t\t[ngTemplateOutletContext]="{overflowMenu: this}">\n\t\t\t</ng-template>\n\t\t</ul>\n\t'})],OverflowMenuPane);let OverflowMenuCustomPane=class OverflowMenuCustomPane extends Dialog{constructor(elementRef,i18n,animationFrameService=null,elementService=null){super(elementRef,elementService,animationFrameService),this.elementRef=elementRef,this.i18n=i18n,this.animationFrameService=animationFrameService,this.elementService=elementService}onClick(event){this.doClose({reason:CloseReasons.interaction,target:event.target})}onDialogInit(){const positionOverflowMenu=pos=>{let offset;const closestRel=(0,utils._K)("position",["relative","fixed","absolute"],this.elementRef.nativeElement),topFix=closestRel?-1*closestRel.getBoundingClientRect().top:0,leftFix=closestRel?-1*closestRel.getBoundingClientRect().left:0;return offset=Math.round(this.dialog.nativeElement.offsetWidth/2)-20,this.dialogConfig.flip?utils_position.FK.addOffset(pos,topFix,-offset+leftFix):utils_position.FK.addOffset(pos,topFix,offset+leftFix)};this.addGap.bottom=positionOverflowMenu,this.addGap.top=positionOverflowMenu,this.dialogConfig.menuLabel||(this.dialogConfig.menuLabel=this.i18n.get().OVERFLOW_MENU.OVERFLOW)}};OverflowMenuCustomPane.ctorParameters=()=>[{type:core.ElementRef},{type:i18n.oc},{type:utils.NV,decorators:[{type:core.Optional}]},{type:utils.d2,decorators:[{type:core.Optional}]}],OverflowMenuCustomPane=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-overflow-custom-menu-pane, ibm-overflow-custom-menu-pane",template:'\n\t\t<div\n\t\t\t[attr.id]="dialogConfig.compID"\n\t\t\t[attr.aria-label]="dialogConfig.menuLabel"\n\t\t\t[attr.data-floating-menu-direction]="placement ? placement : null"\n\t\t\t[ngClass]="{\'cds--overflow-menu--flip\': dialogConfig.flip}"\n\t\t\tclass="cds--overflow-menu-options cds--overflow-menu-options--open"\n\t\t\trole="menu"\n\t\t\t(click)="onClick($event)"\n\t\t\t#dialog\n\t\t\t[attr.aria-label]="dialogConfig.menuLabel">\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="dialogConfig.content"\n\t\t\t\t[ngTemplateOutletContext]="{overflowMenu: this}">\n\t\t\t</ng-template>\n\t\t</div>\n\t'})],OverflowMenuCustomPane);let OverflowMenuDirective=class OverflowMenuDirective extends DialogDirective{constructor(elementRef,viewContainerRef,dialogService,eventService){super(elementRef,viewContainerRef,dialogService,eventService),this.elementRef=elementRef,this.viewContainerRef=viewContainerRef,this.dialogService=dialogService,this.eventService=eventService,this.flip=!1,this.wrapperClass="",this.customPane=!1}set ibmOverflowMenu(template){this.cdsOverflowMenu=template}updateConfig(){this.dialogConfig.content=this.cdsOverflowMenu,this.dialogConfig.flip=this.flip,this.dialogConfig.offset=this.offset,this.dialogConfig.wrapperClass=this.wrapperClass}hostkeys(event){switch(event.key){case"Enter":case" ":event.preventDefault()}}open(){return super.open(this.customPane?OverflowMenuCustomPane:OverflowMenuPane)}};OverflowMenuDirective.ctorParameters=()=>[{type:core.ElementRef},{type:core.ViewContainerRef},{type:DialogService},{type:utils.PO}],OverflowMenuDirective.propDecorators={ibmOverflowMenu:[{type:core.Input}],cdsOverflowMenu:[{type:core.Input}],flip:[{type:core.Input}],offset:[{type:core.Input}],wrapperClass:[{type:core.Input}],customPane:[{type:core.Input}],hostkeys:[{type:core.HostListener,args:["keydown",["$event"]]}]},OverflowMenuDirective=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsOverflowMenu], [ibmOverflowMenu]",exportAs:"overflowMenu",providers:[DialogService]})],OverflowMenuDirective);let OverflowMenu=class OverflowMenu{constructor(elementRef,i18n){this.elementRef=elementRef,this.i18n=i18n,this.buttonLabel=this.i18n.get().OVERFLOW_MENU.OVERFLOW,this.flip=!1,this.placement="bottom",this.open=!1,this.openChange=new core.EventEmitter,this.wrapperClass="",this.triggerClass=""}handleOpenChange(event){this.open=event,this.openChange.emit(event)}};var Target;OverflowMenu.ctorParameters=()=>[{type:core.ElementRef},{type:i18n.oc}],OverflowMenu.propDecorators={buttonLabel:[{type:core.Input}],flip:[{type:core.Input}],placement:[{type:core.Input}],open:[{type:core.Input}],openChange:[{type:core.Output}],customTrigger:[{type:core.Input}],offset:[{type:core.Input}],wrapperClass:[{type:core.Input}],triggerClass:[{type:core.Input}],overflowMenuDirective:[{type:core.ContentChild,args:[OverflowMenuDirective]}]},OverflowMenu=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-overflow-menu, ibm-overflow-menu",template:'\n\t\t<button\n\t\t\t[cdsOverflowMenu]="options"\n\t\t\t[ngClass]="{\'cds--overflow-menu--open\': open}"\n\t\t\tclass="cds--overflow-menu {{triggerClass}}"\n\t\t\t[attr.aria-label]="buttonLabel"\n\t\t\t[flip]="flip"\n\t\t\t[isOpen]="open"\n\t\t\t(isOpenChange)="handleOpenChange($event)"\n\t\t\t[offset]="offset"\n\t\t\t[wrapperClass]="wrapperClass"\n\t\t\taria-haspopup="true"\n\t\t\tclass="cds--overflow-menu"\n\t\t\ttype="button"\n\t\t\t[placement]="placement">\n\t\t\t<ng-template *ngIf="customTrigger; else defaultIcon" [ngTemplateOutlet]="customTrigger"></ng-template>\n\t\t</button>\n\t\t<ng-template #options>\n\t\t\t<ng-content></ng-content>\n\t\t</ng-template>\n\t\t<ng-template #defaultIcon>\n\t\t\t<svg cdsIcon="overflow-menu--vertical" size="16" class="cds--overflow-menu__icon"></svg>\n\t\t</ng-template>\n\t',encapsulation:core.ViewEncapsulation.None,styles:["\n\t\t.cds--overflow-menu--open {\n\t\t\topacity: 1\n\t\t}\n\n\t\t/*\n\t\tRotate the overflow menu container as well as the icon, since\n\t\twe calculate our menu position based on the container, not the icon.\n\t\t*/\n\n\t\t.cds--data-table-v2 .cds--overflow-menu {\n\t\t\ttransform: rotate(90deg);\n\t\t}\n\n\t\t.cds--data-table-v2 .cds--overflow-menu__icon {\n\t\t\ttransform: rotate(180deg);\n\t\t}\n\t"]})],OverflowMenu),function(Target){Target.self="_self",Target.blank="_blank",Target.parent="_parent",Target.top="_top"}(Target||(Target={}));let OverflowMenuOption=class OverflowMenuOption{constructor(elementRef){this.elementRef=elementRef,this.optionClass=!0,this.role="presentation",this.divider=!1,this.type="normal",this.disabled=!1,this.innerClass="",this.selected=new core.EventEmitter,this.tabIndex=-1,this.title=null}get isDanger(){return"danger"===this.type}get isDisabled(){return this.disabled}set target(value){Object.values(Target).includes(value)?this._target=value:console.warn(`\`target\` must have one of the following values: ${Object.values(Target).join(", ")}.\nPlease use the \`Target\` enum exported by carbon-components-angular`)}get target(){return this._target}get rel(){return this._target?"noreferrer noopener":null}onClick(){this.selected.emit()}onFocus(){setTimeout((()=>this.tabIndex=0))}onBlur(){setTimeout((()=>this.tabIndex=-1))}ngAfterViewInit(){const button=this.elementRef.nativeElement.querySelector("button, a"),textContainer=button.querySelector(".cds--overflow-menu-options__option-content");textContainer.scrollWidth>textContainer.offsetWidth&&(this.title=button.textContent)}};OverflowMenuOption.ctorParameters=()=>[{type:core.ElementRef}],OverflowMenuOption.propDecorators={optionClass:[{type:core.HostBinding,args:["class.cds--overflow-menu-options__option"]}],role:[{type:core.HostBinding,args:["attr.role"]}],isDanger:[{type:core.HostBinding,args:["class.cds--overflow-menu-options__option--danger"]}],isDisabled:[{type:core.HostBinding,args:["class.cds--overflow-menu-options__option--disabled"]}],divider:[{type:core.HostBinding,args:["class.cds--overflow-menu--divider"]},{type:core.Input}],type:[{type:core.Input}],disabled:[{type:core.Input}],href:[{type:core.Input}],target:[{type:core.Input}],innerClass:[{type:core.Input}],selected:[{type:core.Output}]},OverflowMenuOption=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-overflow-menu-option, ibm-overflow-menu-option",template:'\n\t\t<button\n\t\t\t*ngIf="!href"\n\t\t\tclass="cds--overflow-menu-options__btn {{innerClass}}"\n\t\t\trole="menuitem"\n\t\t\t[tabindex]="tabIndex"\n\t\t\t(focus)="onFocus()"\n\t\t\t(blur)="onBlur()"\n\t\t\t(click)="onClick()"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.title]="title">\n\t\t\t<ng-container *ngTemplateOutlet="tempOutlet"></ng-container>\n\t\t</button>\n\n\t\t<a\n\t\t\t*ngIf="href"\n\t\t\tclass="cds--overflow-menu-options__btn {{innerClass}}"\n\t\t\trole="menuitem"\n\t\t\t[tabindex]="tabIndex"\n\t\t\t(focus)="onFocus()"\n\t\t\t(blur)="onBlur()"\n\t\t\t(click)="onClick()"\n\t\t\t[attr.disabled]="disabled"\n\t\t\t[href]="href"\n\t\t\t[attr.target]="target"\n\t\t\t[attr.rel]="rel"\n\t\t\t[attr.title]="title">\n\t\t\t<ng-container *ngTemplateOutlet="tempOutlet"></ng-container>\n\t\t</a>\n\n\t\t<ng-template #tempOutlet>\n\t\t\t<div class="cds--overflow-menu-options__option-content">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t</ng-template>\n\t'})],OverflowMenuOption);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),icon=__webpack_require__("./src/icon/index.ts");let DialogModule=class DialogModule{};DialogModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Dialog,OverflowMenu,OverflowMenuPane,OverflowMenuCustomPane,DialogDirective,OverflowMenuDirective,OverflowMenuOption],exports:[Dialog,OverflowMenu,OverflowMenuPane,OverflowMenuCustomPane,DialogDirective,OverflowMenuDirective,OverflowMenuOption],providers:[DialogService],imports:[common.CommonModule,i18n.LU,placeholder.Qq,experimental.OV,utils.As,icon.QX]})],DialogModule)},"./src/experimental/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{OV:()=>ExperimentalModule,tM:()=>ExperimentalService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let ExperimentalService=class ExperimentalService{constructor(){this.experiments=new Map}addExperiment(name,options={enabled:!1}){this.experiments.has(name)||this.experiments.set(name,options)}enableExperiment(name){this.getExperiment(name).enabled=!0}disableExperiment(name){this.getExperiment(name).enabled=!1}getExperiment(name){return this.experiments.has(name)?this.experiments.get(name):(this.addExperiment(name),this.getExperiment(name))}getExperiments(){return Array.from(this.experiments.entries())}};ExperimentalService=(0,tslib_es6.gn)([(0,core.Injectable)()],ExperimentalService);const EXPERIMENTAL_SERVICE_PROVIDER={provide:ExperimentalService,deps:[[new core.Optional,new core.SkipSelf,ExperimentalService]],useFactory:function EXPERIMENTAL_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new ExperimentalService}};let ExperimentalModule=class ExperimentalModule{};ExperimentalModule=(0,tslib_es6.gn)([(0,core.NgModule)({providers:[ExperimentalService,EXPERIMENTAL_SERVICE_PROVIDER]})],ExperimentalModule)},"./src/placeholder/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Qq:()=>PlaceholderModule,Q_:()=>PlaceholderService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let PlaceholderService=class PlaceholderService{constructor(){this.viewContainerRef=null,this.viewContainerMap=new Map}registerViewContainerRef(vcRef,id){id?this.viewContainerMap.set(id,vcRef):this.viewContainerRef=vcRef}createComponent(component,injector,id){return id?this.viewContainerMap.has(id)?this.viewContainerMap.get(id).createComponent(component,{index:this.viewContainerMap.size,injector}):void console.error(`No view container with id ${id} found`):this.viewContainerRef?this.viewContainerRef.createComponent(component,{index:this.viewContainerRef.length,injector}):void console.error("No view container defined! Likely due to a missing `cds-placeholder`")}destroyComponent(component){component.destroy()}hasComponentRef(component,id){return id?!(this.viewContainerMap.get(id).indexOf(component.hostView)<0):!(this.viewContainerRef.indexOf(component.hostView)<0)}hasPlaceholderRef(id){return id?this.viewContainerMap.has(id):!!this.viewContainerRef}appendElement(element,id){return id?this.viewContainerMap.get(id).element.nativeElement.appendChild(element):this.viewContainerRef.element.nativeElement.appendChild(element)}removeElement(element,id){return id?this.viewContainerMap.get(id).element.nativeElement.removeChild(element):this.viewContainerRef.element.nativeElement.removeChild(element)}hasElement(element,id){return id?this.viewContainerMap.get(id).element.nativeElement.contains(element):this.viewContainerRef.element.nativeElement.contains(element)}};PlaceholderService=(0,tslib_es6.gn)([(0,core.Injectable)()],PlaceholderService);let Placeholder=class Placeholder{constructor(placeholderService){this.placeholderService=placeholderService}ngOnInit(){this.placeholderService.registerViewContainerRef(this.viewContainerRef)}};Placeholder.ctorParameters=()=>[{type:PlaceholderService}],Placeholder.propDecorators={id:[{type:core.Input}],viewContainerRef:[{type:core.ViewChild,args:["placeholder",{read:core.ViewContainerRef,static:!0}]}]},Placeholder=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-placeholder, ibm-placeholder",template:"<div #placeholder></div>"})],Placeholder);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");const PLACEHOLDER_SERVICE_PROVIDER={provide:PlaceholderService,deps:[[new core.Optional,new core.SkipSelf,PlaceholderService]],useFactory:function PLACEHOLDER_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new PlaceholderService}};let PlaceholderModule=class PlaceholderModule{};PlaceholderModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Placeholder],exports:[Placeholder],providers:[PLACEHOLDER_SERVICE_PROVIDER],imports:[common.CommonModule]})],PlaceholderModule)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[9736],{"./src/combobox/combobox.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,BasicMax:()=>BasicMax,Dynamic:()=>Dynamic,MockQuerySearch:()=>MockQuerySearch,Multiselect:()=>Multiselect,ReactiveForms:()=>ReactiveForms,default:()=>combobox_stories});var fesm2020_forms=__webpack_require__("./node_modules/@angular/forms/fesm2020/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),dropdown=__webpack_require__("./src/dropdown/index.ts"),filter=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/filter.js"),utils=__webpack_require__("./src/utils/index.ts"),i18n=__webpack_require__("./src/i18n/index.ts");let ComboBox=class ComboBox{constructor(elementRef,documentService,dropdownService,i18n){this.elementRef=elementRef,this.documentService=documentService,this.dropdownService=dropdownService,this.i18n=i18n,this.id="dropdown-"+ComboBox.comboBoxCount++,this.items=[],this.type="single",this.size="md",this.appendInline=null,this.invalid=!1,this.warn=!1,this.maxLength=null,this.theme="dark",this.selectionFeedback="top-after-reopen",this.autocomplete="list",this.disabled=!1,this.selected=new core.EventEmitter,this.submit=new core.EventEmitter,this.close=new core.EventEmitter,this.search=new core.EventEmitter,this.clear=new core.EventEmitter,this.hostClass=!0,this.display="block",this.open=!1,this.showClearButton=!1,this.pills=[],this.selectedValue="",this.keyboardNav=this._keyboardNav.bind(this),this._dropUp=!1,this.noop=this._noop.bind(this),this.onTouchedCallback=this._noop,this.propagateChangeCallback=this._noop,this._placeholder=this.i18n.getOverridable("COMBOBOX.PLACEHOLDER"),this._closeMenuAria=this.i18n.getOverridable("COMBOBOX.A11Y.CLOSE_MENU"),this._openMenuAria=this.i18n.getOverridable("COMBOBOX.A11Y.OPEN_MENU"),this._clearSelectionsTitle=this.i18n.getOverridable("COMBOBOX.CLEAR_SELECTIONS"),this._clearSelectionsAria=this.i18n.getOverridable("COMBOBOX.A11Y.CLEAR_SELECTIONS"),this._clearSelectionTitle=this.i18n.getOverridable("COMBOBOX.CLEAR_SELECTED"),this._clearSelectionAria=this.i18n.getOverridable("COMBOBOX.A11Y.CLEAR_SELECTED")}set placeholder(value){this._placeholder.override(value)}get placeholder(){return this._placeholder.value}set openMenuAria(value){this._openMenuAria.override(value)}get openMenuAria(){return this._openMenuAria.value}set closeMenuAria(value){this._closeMenuAria.override(value)}get closeMenuAria(){return this._closeMenuAria.value}set clearSelectionsTitle(value){this._clearSelectionsTitle.override(value)}get clearSelectionsTitle(){return this._clearSelectionsTitle.value}set clearSelectionsAria(value){this._clearSelectionsAria.override(value)}get clearSelectionsAria(){return this._clearSelectionsAria.value}set clearSelectionTitle(value){this._clearSelectionTitle.override(value)}get clearSelectionTitle(){return this._clearSelectionTitle.value}set clearSelectionAria(value){this._clearSelectionAria.override(value)}get clearSelectionAria(){return this._clearSelectionAria.value}ngOnChanges(changes){changes.items&&(this.view.items=changes.items.currentValue,this.updateSelected(),("multi"===this.type||"single"===this.type&&!this.selectedValue)&&this.onSearch(this.input.nativeElement.value,!1))}ngAfterContentInit(){if(this.view){this.view.type=this.type;const isUpdate=event=>event&&event.isUpdate;this.view.select.subscribe((event=>{if(Array.isArray(event)){if(this.updatePills(),!isUpdate(event))if(this.itemValueKey&&this.view.getSelected()){const values=this.view.getSelected().map((item=>item[this.itemValueKey]));this.propagateChangeCallback(values)}else this.propagateChangeCallback(this.view.getSelected())}else event.item&&event.item.selected?(this.showClearButton=!0,this.selectedValue=event.item.content,isUpdate(event)||(this.itemValueKey?this.propagateChangeCallback(event.item[this.itemValueKey]):this.propagateChangeCallback(event.item))):(this.selectedValue="",isUpdate(event)||this.propagateChangeCallback(null)),isUpdate(event)||(this.elementRef.nativeElement.querySelector("input").focus(),this.view.filterBy("")),this.closeDropdown();isUpdate(event)||Array.isArray(event)||this.selected.emit(event.item)})),setTimeout((()=>{this.updateSelected()})),this.view.blurIntent.pipe((0,filter.h)((v=>"top"===v))).subscribe((()=>{this.elementRef.nativeElement.querySelector(".cds--text-input").focus()}))}}ngAfterViewInit(){this.documentService.handleClick((event=>{this.elementRef.nativeElement.contains(event.target)||this.dropdownMenu.nativeElement.contains(event.target)||this.open&&this.closeDropdown()})),null===this.appendInline&&(0,utils.OQ)(this.elementRef.nativeElement)?this.appendInline=!1:null===this.appendInline&&(this.appendInline=!0)}ngOnDestroy(){this.appendInline||this._appendToDropdown()}hostkeys(ev){"Escape"===ev.key?this.closeDropdown():"ArrowDown"!==ev.key||this.dropdownMenu&&this.dropdownMenu.nativeElement.contains(ev.target)||(ev.stopPropagation(),this.openDropdown(),setTimeout((()=>{this.view.initFocus()}),0)),this.open&&"Tab"===ev.key&&(this.dropdownMenu.nativeElement.contains(ev.target)||ev.target===this.input.nativeElement)&&this.closeDropdown(),this.open&&"Tab"===ev.key&&ev.shiftKey&&this.closeDropdown()}_noop(){}writeValue(value){if("single"===this.type){if(this.itemValueKey){const newValue=Object.assign({},this.view.getListItems().find((item=>item[this.itemValueKey]===value)));newValue.selected=!0,this.view.propagateSelected([newValue])}else this.view.propagateSelected([value||""]);this.showClearButton=!(!value||!this.view.getSelected().length)}else if(this.itemValueKey){let newValues=[];for(const v of value)for(const item of this.view.getListItems())item[this.itemValueKey]===v&&newValues.push(Object.assign({},item,{selected:!0}));this.view.propagateSelected(newValues)}else this.view.propagateSelected(value||[""]);this.updateSelected()}onBlur(){this.onTouchedCallback()}registerOnChange(fn){this.propagateChangeCallback=fn}registerOnTouched(fn){this.onTouchedCallback=fn}setDisabledState(isDisabled){this.disabled=isDisabled}updatePills(){this.pills=this.view.getSelected()||[],this.checkForReorder()}clearSelected(){this.items=this.items.map((item=>(item.disabled||(item.selected=!1),item))),this.view.items=this.items,this.updatePills();const selected=this.view.getSelected();this.propagateChangeCallback(selected),this.selected.emit(selected),this.clear.emit()}closeDropdown(){this.open=!1,this.checkForReorder(),this.close.emit(),this.appendInline||this._appendToDropdown()}openDropdown(){this.disabled||(this.open=!0,this._dropUp=!1,this.appendInline||this._appendToBody(),setTimeout((()=>{null!==this.dropUp&&void 0!==this.dropUp||(this._dropUp=this._shouldDropUp())}),0))}toggleDropdown(){this.open?this.closeDropdown():this.openDropdown()}onSearch(searchString,shouldEmitSearch=!0){if(shouldEmitSearch&&this.search.emit(searchString),this.showClearButton=!!searchString,this.view.filterBy(searchString),""!==searchString?this.openDropdown():(this.selectedValue="","multi"!==this.type||"top"!==this.selectionFeedback&&"top-after-reopen"!==this.selectionFeedback||this.view.reorderSelected()),"single"===this.type){if(!this.view.getListItems().some((item=>item.content.toLowerCase().includes(searchString.toLowerCase())))){const selected=this.view.getSelected();selected&&selected[0]||this.view.filterBy(searchString)}}}onSubmit(event){this.submit.emit({items:this.view.getListItems(),index:0,value:{content:event.target.value,selected:!1}})}clearInput(event){event.stopPropagation(),event.preventDefault(),"single"===this.type&&(this.clearSelected(),this.closeDropdown()),this.selectedValue="",this.input.nativeElement.value="",this.showClearButton=!1,this.input.nativeElement.focus(),this.onSearch(this.input.nativeElement.value)}isTemplate(value){return value instanceof core.TemplateRef}_keyboardNav(event){"Escape"===event.key&&this.open&&event.stopImmediatePropagation(),"Escape"===event.key?(event.preventDefault(),this.closeDropdown(),this.input.nativeElement.focus()):this.open&&"Tab"===event.key&&(this.input.nativeElement.focus(),this.input.nativeElement.dispatchEvent(new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,key:"Tab"})),this.closeDropdown())}_appendToBody(){this.dropdownService.appendToBody(this.listbox.nativeElement,this.dropdownMenu.nativeElement,`${this.elementRef.nativeElement.className}${this.open?" cds--list-box--expanded":""}`),this.dropdownMenu.nativeElement.addEventListener("keydown",this.keyboardNav,!0)}_appendToDropdown(){this.dropdownService.appendToDropdown(this.elementRef.nativeElement),this.dropdownMenu.nativeElement.removeEventListener("keydown",this.keyboardNav,!0)}_shouldDropUp(){const menu=this.dropdownMenu&&this.dropdownMenu.nativeElement.querySelector(".cds--list-box__menu"),menuRect=menu&&menu.getBoundingClientRect();if(menu&&menuRect){return(0,utils.O3)(menu).reduce(((shouldDropUp,parent)=>{const parentRect=parent.getBoundingClientRect(),isBelowParent=!(menuRect.bottom<=parentRect.bottom);return shouldDropUp||isBelowParent}),!1)}return!1}updateSelected(){const selected=this.view.getSelected();if("multi"===this.type)this.updatePills();else if(selected){const value=selected[0]?selected[0].content:"";selected[0]&&selected[0];this.selectedValue=value,this.showClearButton=!!value}}checkForReorder(){const topAfterReopen=!this.open&&"top-after-reopen"===this.selectionFeedback;"multi"!==this.type||!topAfterReopen&&"top"!==this.selectionFeedback||this.view.reorderSelected(!0)}};ComboBox.comboBoxCount=0,ComboBox.ctorParameters=()=>[{type:core.ElementRef},{type:utils.Zg},{type:dropdown.Vn},{type:i18n.oc}],ComboBox.propDecorators={placeholder:[{type:core.Input}],openMenuAria:[{type:core.Input}],closeMenuAria:[{type:core.Input}],clearSelectionsTitle:[{type:core.Input}],clearSelectionsAria:[{type:core.Input}],clearSelectionTitle:[{type:core.Input}],clearSelectionAria:[{type:core.Input}],id:[{type:core.Input}],items:[{type:core.Input}],type:[{type:core.Input}],size:[{type:core.Input}],itemValueKey:[{type:core.Input}],label:[{type:core.Input}],helperText:[{type:core.Input}],appendInline:[{type:core.Input}],invalid:[{type:core.Input}],invalidText:[{type:core.Input}],warn:[{type:core.Input}],warnText:[{type:core.Input}],maxLength:[{type:core.Input}],theme:[{type:core.Input}],selectionFeedback:[{type:core.Input}],autocomplete:[{type:core.Input}],dropUp:[{type:core.Input}],disabled:[{type:core.Input}],selected:[{type:core.Output}],submit:[{type:core.Output}],close:[{type:core.Output}],search:[{type:core.Output}],clear:[{type:core.Output}],view:[{type:core.ContentChild,args:[dropdown.jq,{static:!0}]}],dropdownMenu:[{type:core.ViewChild,args:["dropdownMenu"]}],input:[{type:core.ViewChild,args:["input",{static:!0}]}],listbox:[{type:core.ViewChild,args:["listbox",{static:!0}]}],hostClass:[{type:core.HostBinding,args:["class.cds--list-box__wrapper"]}],display:[{type:core.HostBinding,args:["style.display"]}],hostkeys:[{type:core.HostListener,args:["keydown",["$event"]]}]},ComboBox=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-combo-box, ibm-combo-box",template:'\n\t\t<div class="cds--list-box__wrapper">\n\t\t\t<label\n\t\t\t\t*ngIf="label"\n\t\t\t\t[for]="id"\n\t\t\t\tclass="cds--label"\n\t\t\t\t[ngClass]="{\'cds--label--disabled\': disabled}">\n\t\t\t\t<ng-container *ngIf="!isTemplate(label)">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf="isTemplate(label)" [ngTemplateOutlet]="label"></ng-template>\n\t\t\t</label>\n\t\t\t<div\n\t\t\t\t#listbox\n\t\t\t\t[ngClass]="{\n\t\t\t\t\t\'cds--multi-select cds--multi-select--filterable\': type === \'multi\',\n\t\t\t\t\t\'cds--list-box--light\': theme === \'light\',\n\t\t\t\t\t\'cds--list-box--expanded\': open,\n\t\t\t\t\t\'cds--list-box--sm\': size === \'sm\',\n\t\t\t\t\t\'cds--list-box--md\': size === \'md\',\n\t\t\t\t\t\'cds--list-box--lg\': size === \'lg\',\n\t\t\t\t\t\'cds--list-box--disabled\': disabled,\n\t\t\t\t\t\'cds--combo-box--warning cds--list-box--warning\': warn\n\t\t\t\t}"\n\t\t\t\tclass="cds--list-box cds--combo-box"\n\t\t\t\t[attr.data-invalid]="(invalid ? true : null)">\n\t\t\t\t<div\n\t\t\t\t\tclass="cds--list-box__field"\n\t\t\t\t\t(click)="toggleDropdown()"\n\t\t\t\t\t(blur)="onBlur()">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf="type === \'multi\' && pills.length > 0"\n\t\t\t\t\t\tclass="cds--tag cds--tag--filter cds--tag--high-contrast"\n\t\t\t\t\t\t[ngClass]="{\'cds--tag--disabled\': disabled}">\n\t\t\t\t\t\t<span class="cds--tag__label">{{ pills.length }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\t(click)="clearSelected()"\n\t\t\t\t\t\t\t(blur)="onBlur()"\n\t\t\t\t\t\t\t(keydown.enter)="clearSelected()"\n\t\t\t\t\t\t\tclass="cds--tag__close-icon"\n\t\t\t\t\t\t\ttabindex="0"\n\t\t\t\t\t\t\t[title]="clearSelectionsTitle"\n\t\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t\t[attr.aria-label]="clearSelectionAria">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable="false"\n\t\t\t\t\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;"\n\t\t\t\t\t\t\t\trole="img"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\t\t\t\twidth="16"\n\t\t\t\t\t\t\t\theight="16"\n\t\t\t\t\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\t\t\t\t\taria-hidden="true">\n\t\t\t\t\t\t\t\t<path d="M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tautocomplete="off"\n\t\t\t\t\t\trole="combobox"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t(input)="onSearch($event.target.value)"\n\t\t\t\t\t\t(blur)="onBlur()"\n\t\t\t\t\t\t(keydown.enter)="onSubmit($event)"\n\t\t\t\t\t\t[value]="selectedValue"\n\t\t\t\t\t\tclass="cds--text-input"\n\t\t\t\t\t\t[ngClass]="{\'cds--text-input--empty\': !showClearButton}"\n\t\t\t\t\t\ttabindex="0"\n\t\t\t\t\t\t[id]="id"\n\t\t\t\t\t\t[attr.aria-labelledby]="id"\n\t\t\t\t\t\t[attr.aria-expanded]="open"\n\t\t\t\t\t\taria-haspopup="listbox"\n\t\t\t\t\t\t[attr.maxlength]="maxLength"\n\t\t\t\t\t\t[attr.aria-controls]="open ? view?.listId : null"\n\t\t\t\t\t\t[attr.aria-autocomplete]="autocomplete"\n\t\t\t\t\t\t[placeholder]="placeholder"/>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf="!warn && invalid"\n\t\t\t\t\t\tcdsIcon="warning--filled"\n\t\t\t\t\t\tsize="16"\n\t\t\t\t\t\tclass="cds--list-box__invalid-icon">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf="!invalid && warn"\n\t\t\t\t\t\tcdsIcon="warning--alt--filled"\n\t\t\t\t\t\tsize="16"\n\t\t\t\t\t\tclass="cds--list-box__invalid-icon cds--list-box__invalid-icon--warning">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf="showClearButton"\n\t\t\t\t\t\trole="button"\n\t\t\t\t\t\tclass="cds--list-box__selection"\n\t\t\t\t\t\ttabindex="0"\n\t\t\t\t\t\t[attr.aria-label]="clearSelectionAria"\n\t\t\t\t\t\t[title]="clearSelectionTitle"\n\t\t\t\t\t\t(keyup.enter)="clearInput($event)"\n\t\t\t\t\t\t(click)="clearInput($event)"\n\t\t\t\t\t\t(blur)="onBlur()">\n\t\t\t\t\t\t<svg cdsIcon="close" size="16"></svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\trole="button"\n\t\t\t\t\t\tclass="cds--list-box__menu-icon"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\t[title]="open ? closeMenuAria : openMenuAria"\n\t\t\t\t\t\t[attr.aria-label]="open ? closeMenuAria : openMenuAria"\n\t\t\t\t\t\t[ngClass]="{\'cds--list-box__menu-icon--open\': open}">\n\t\t\t\t\t\t<svg cdsIcon="chevron--down" size="16"></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t#dropdownMenu\n\t\t\t\t\t[ngClass]="{\n\t\t\t\t\t\t\'cds--list-box--up\': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t\t\t}">\n\t\t\t\t\t<ng-content *ngIf="open"></ng-content>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf="helperText && !invalid && !warn"\n\t\t\t\tclass="cds--form__helper-text"\n\t\t\t\t[ngClass]="{\'cds--form__helper-text--disabled\': disabled}">\n\t\t\t\t<ng-container *ngIf="!isTemplate(helperText)">{{helperText}}</ng-container>\n\t\t\t\t<ng-template *ngIf="isTemplate(helperText)" [ngTemplateOutlet]="helperText"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf="!warn && invalid" class="cds--form-requirement">\n\t\t\t\t<ng-container *ngIf="!isTemplate(invalidText)">{{ invalidText }}</ng-container>\n\t\t\t\t<ng-template *ngIf="isTemplate(invalidText)" [ngTemplateOutlet]="invalidText"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf="!invalid && warn" class="cds--form-requirement">\n\t\t\t\t<ng-container *ngIf="!isTemplate(warnText)">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf="isTemplate(warnText)" [ngTemplateOutlet]="warnText"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t',providers:[{provide:fesm2020_forms.JU,useExisting:ComboBox,multi:!0}]})],ComboBox);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),icon=__webpack_require__("./src/icon/index.ts");let ComboBoxModule=class ComboBoxModule{};ComboBoxModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[ComboBox],exports:[ComboBox,dropdown.kW],imports:[common.CommonModule,dropdown.kW,i18n.LU,utils.As,icon.QX],providers:[dropdown.Vn]})],ComboBoxModule);let DynamicListComboBox=class DynamicListComboBox{constructor(){this.items=[{content:"one"},{content:"two"},{content:"three"},{content:"four"}]}updateSelected(event){this.items.forEach((item=>{event.some((selectedItem=>selectedItem.content===item.content))?item.selected=!0:item.selected=!1}))}ngAfterViewInit(){setTimeout((()=>{const newItems=JSON.parse(JSON.stringify(this.items));newItems.push({content:`New ${newItems.length}`}),this.items=newItems}),4e3)}};DynamicListComboBox=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-dynamic-list-combobox",template:'\n\t\t<cds-combo-box\n\t\t\t[(items)]="items"\n\t\t\ttype="multi"\n\t\t\t(selected)="updateSelected($event)">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t'})],DynamicListComboBox);let MockQueryCombobox=class MockQueryCombobox{constructor(){this.filterItems=[]}onSearch(){setTimeout((()=>{this.filterItems=[{content:`Random ${Math.random()}`},{content:`Random ${Math.random()}`},{content:`Random ${Math.random()}`},{content:`Random ${Math.random()}`}]}),1e3)}};MockQueryCombobox=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-mock-query-search",template:'\n\t\t<cds-combo-box\n\t\t\tappendInline="true"\n\t\t\t[items]="filterItems"\n\t\t\t(search)="onSearch($event)">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t'})],MockQueryCombobox);var isEqual=__webpack_require__("./node_modules/lodash-es/isEqual.js");let ReactiveFormsCombobox=class ReactiveFormsCombobox{constructor(fb){this.fb=fb,this.invalid=!1,this.invalidText="",this.warn=!1,this.warnText="",this.label="",this.helperText="",this.size="md",this.theme="dark",this._items=[]}set items(newItems){newItems.length||(newItems=[]),(0,isEqual.Z)(this._items,newItems)||(this._items=newItems)}set disabled(isDisabled){this.sampleForm&&(isDisabled?this.sampleForm.disable():this.sampleForm.enable())}ngOnInit(){this.sampleForm=this.fb.group({combobox:new fesm2020_forms.NI,multibox:new fesm2020_forms.NI}),this.sampleForm.get("combobox")?.setValue("four"),this.sampleForm.get("multibox")?.setValue(["four","two"])}};ReactiveFormsCombobox.ctorParameters=()=>[{type:fesm2020_forms.qu}],ReactiveFormsCombobox.propDecorators={invalid:[{type:core.Input}],invalidText:[{type:core.Input}],warn:[{type:core.Input}],warnText:[{type:core.Input}],label:[{type:core.Input}],helperText:[{type:core.Input}],size:[{type:core.Input}],theme:[{type:core.Input}],items:[{type:core.Input}],disabled:[{type:core.Input}]},ReactiveFormsCombobox=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-reactive-combobox",template:'\n\t\t<form [formGroup]="sampleForm" (ngSubmit)="onSubmit(sampleForm)">\n\t\t\t<cds-combo-box\n\t\t\t\tformControlName="combobox"\n\t\t\t\t[size]="size"\n\t\t\t\t[label]="label"\n\t\t\t\t[helperText]="helperText"\n\t\t\t\titemValueKey="content"\n\t\t\t\t[theme]="theme"\n\t\t\t\t[invalid]="invalid"\n\t\t\t\t[invalidText]="invalidText"\n\t\t\t\t[warn]="warn"\n\t\t\t\t[warnText]="warnText"\n\t\t\t\t[items]="_items">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t\tselected: {{ sampleForm.get("combobox").value | json }}\n\t\t\t<cds-combo-box\n\t\t\t\tstyle="margin-top: 40px"\n\t\t\t\tformControlName="multibox"\n\t\t\t\t[label]="label"\n\t\t\t\t[size]="size"\n\t\t\t\titemValueKey="content"\n\t\t\t\t[helperText]="helperText"\n\t\t\t\ttype="multi"\n\t\t\t\t[invalid]="invalid"\n\t\t\t\t[invalidText]="invalidText"\n\t\t\t\t[warn]="warn"\n\t\t\t\t[warnText]="warnText"\n\t\t\t\t[items]="_items">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t\tselected: {{ sampleForm.get("multibox").value | json }}\n\t\t</form>\n\t'})],ReactiveFormsCombobox);const combobox_stories={title:"Components/Combobox",decorators:[(0,dist.moduleMetadata)({declarations:[DynamicListComboBox,ReactiveFormsCombobox,MockQueryCombobox],imports:[fesm2020_forms.u5,fesm2020_forms.UX,ComboBoxModule]})],args:{label:"Label",helperText:"Optional helper text",disabled:!1,invalid:!1,invalidText:"A valid value is required",warn:!1,warnText:"This is a warning",items:[{content:"one"},{content:"two"},{content:"three"},{content:"four"},{content:"five"},{content:"six"},{content:"seven"},{content:"eight"},{content:"nine"},{content:"ten"}],appendInline:!1,dropUp:!1,selectionFeedback:"top-after-reopen"},argTypes:{size:{options:["sm","md","lg"],defaultValue:"md",control:"radio"},theme:{options:["light","dark"],defaultValue:"dark",control:"radio"},maxLength:{control:!1},type:{control:!1},selected:{action:"Selection changed!"},submit:{action:"Submit"},search:{action:"Search"}},parameters:{layout:"centered"},component:ComboBox},Basic=(args=>({props:args,template:'\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]="model"\n\t\t\t[disabled]="disabled"\n\t\t\t[invalid]="invalid"\n\t\t\t[size]="size"\n\t\t\t[appendInline]="appendInline"\n\t\t\t[invalidText]="invalidText"\n\t\t\t[warn]="warn"\n\t\t\t[warnText]="warnText"\n\t\t\t[label]="label"\n\t\t\t[helperText]="helperText"\n\t\t\t[items]="items"\n\t\t\t[theme]="theme"\n\t\t\t[dropUp]="dropUp"\n\t\t\t(selected)="selected($event)"\n\t\t\t(submit)="submit($event)"\n\t\t\t(search)="search($event)">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t'})).bind({});Basic.argTypes={items:{controls:!1}};const BasicMax=(args=>({props:args,template:"\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-dynamic-list-combobox.component.ts\n\t\t--\x3e\n\t\t<app-dynamic-list-combobox></app-dynamic-list-combobox>\n\t"})).bind({});BasicMax.storyName="Basic with max length",BasicMax.args={maxLength:4},BasicMax.argTypes={maxLength:{control:"number"}};const Dynamic=(args=>({props:args,template:"\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-dynamic-list-combobox.component.ts\n\t\t--\x3e\n\t\t<app-dynamic-list-combobox></app-dynamic-list-combobox>\n\t"})).bind({});Dynamic.storyName="Dynamically added list items",Dynamic.parameters={controls:{disable:!0}};const Multiselect=(args=>({props:args,template:'\n\t\t<cds-combo-box\n\t\t\t[invalid]="invalid"\n\t\t\t[invalidText]="invalidText"\n\t\t\t[label]="label"\n\t\t\t[warn]="warn"\n\t\t\t[disabled]="disabled"\n\t\t\t[size]="size"\n\t\t\t[helperText]="helperText"\n\t\t\t[appendInline]="false"\n\t\t\t[items]="items"\n\t\t\t[theme]="theme"\n\t\t\t[selectionFeedback]="selectionFeedback"\n\t\t\t[dropUp]="dropUp"\n\t\t\t[appendInline]="appendInline"\n\t\t\ttype="multi"\n\t\t\t(selected)="selected($event)"\n\t\t\t(submit)="submit($event)">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t'})).bind({});Multiselect.argTypes={selectionFeedback:"top-after-reopen"};const ReactiveForms=(args=>({props:args,template:'\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-reactive-combobox.component.ts\n\t\t--\x3e\n\t\t<app-reactive-combobox\n\t\t\t[disabled]="disabled"\n\t\t\t[invalid]="invalid"\n\t\t\t[size]="size"\n\t\t\t[invalidText]="invalidText"\n\t\t\t[warn]="warn"\n\t\t\t[warnText]="warnText"\n\t\t\t[label]="label"\n\t\t\t[helperText]="helperText"\n\t\t\t[items]="items"\n\t\t\t[theme]="theme">\n\t\t</app-reactive-combobox>\n\t'})).bind({}),MockQuerySearch=(args=>({props:args,template:"\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-mock-query-search.component.ts\n\t\t--\x3e\n\t\t<app-mock-query-search></app-mock-query-search>\n\t"})).bind({});MockQuerySearch.parameters={controls:{disable:!0}}},"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{a:()=>IconDirective});var tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}set ibmIcon(iconName){this.cdsIcon=iconName}set cdsIcon(iconName){this.iconName=iconName,this.renderIcon(iconName)}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.u9)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString()}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.iconName)}};IconDirective.titleIdCounter=0,IconDirective.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.C6}],IconDirective.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]},IconDirective=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{QX:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.C6,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_52__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_52__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.C6]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.C6}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.Z,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.Z,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.Z,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.Z,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.Z,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.Z,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.Z,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.Z,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.Z,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.Z,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.Z,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.Z,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.Z,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.Z,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.Z,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.Z,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.Z,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.Z,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.Z,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.Z,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.Z,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.Z,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.Z,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.Z,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.Z,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.Z,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.Z,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.Z,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.Z,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.Z,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.Z,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_33__.Z,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_34__.Z,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_35__.Z,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_36__.Z,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_37__.Z,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_38__.Z,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_39__.Z,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_40__.Z,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_41__.Z,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_42__.Z,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_43__.Z,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_44__.Z,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_45__.Z,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_46__.Z,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_47__.Z,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_48__.Z,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_49__.Z,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_50__.Z,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_51__.Z])}};IconModule.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.C6}],IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_53__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_52__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.a],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.a],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_54__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{C6:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends class IconCache{}{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.BB)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ar:()=>icon_directive.a,QX:()=>icon_module.QX,C6:()=>icon_service.C6});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./src/placeholder/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Qq:()=>PlaceholderModule,Q_:()=>PlaceholderService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let PlaceholderService=class PlaceholderService{constructor(){this.viewContainerRef=null,this.viewContainerMap=new Map}registerViewContainerRef(vcRef,id){id?this.viewContainerMap.set(id,vcRef):this.viewContainerRef=vcRef}createComponent(component,injector,id){return id?this.viewContainerMap.has(id)?this.viewContainerMap.get(id).createComponent(component,{index:this.viewContainerMap.size,injector}):void console.error(`No view container with id ${id} found`):this.viewContainerRef?this.viewContainerRef.createComponent(component,{index:this.viewContainerRef.length,injector}):void console.error("No view container defined! Likely due to a missing `cds-placeholder`")}destroyComponent(component){component.destroy()}hasComponentRef(component,id){return id?!(this.viewContainerMap.get(id).indexOf(component.hostView)<0):!(this.viewContainerRef.indexOf(component.hostView)<0)}hasPlaceholderRef(id){return id?this.viewContainerMap.has(id):!!this.viewContainerRef}appendElement(element,id){return id?this.viewContainerMap.get(id).element.nativeElement.appendChild(element):this.viewContainerRef.element.nativeElement.appendChild(element)}removeElement(element,id){return id?this.viewContainerMap.get(id).element.nativeElement.removeChild(element):this.viewContainerRef.element.nativeElement.removeChild(element)}hasElement(element,id){return id?this.viewContainerMap.get(id).element.nativeElement.contains(element):this.viewContainerRef.element.nativeElement.contains(element)}};PlaceholderService=(0,tslib_es6.gn)([(0,core.Injectable)()],PlaceholderService);let Placeholder=class Placeholder{constructor(placeholderService){this.placeholderService=placeholderService}ngOnInit(){this.placeholderService.registerViewContainerRef(this.viewContainerRef)}};Placeholder.ctorParameters=()=>[{type:PlaceholderService}],Placeholder.propDecorators={id:[{type:core.Input}],viewContainerRef:[{type:core.ViewChild,args:["placeholder",{read:core.ViewContainerRef,static:!0}]}]},Placeholder=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-placeholder, ibm-placeholder",template:"<div #placeholder></div>"})],Placeholder);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");const PLACEHOLDER_SERVICE_PROVIDER={provide:PlaceholderService,deps:[[new core.Optional,new core.SkipSelf,PlaceholderService]],useFactory:function PLACEHOLDER_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new PlaceholderService}};let PlaceholderModule=class PlaceholderModule{};PlaceholderModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Placeholder],exports:[Placeholder],providers:[PLACEHOLDER_SERVICE_PROVIDER],imports:[common.CommonModule]})],PlaceholderModule)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6310],{"./src/file-uploader/file-uploader.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,DragAndDrop:()=>DragAndDrop,NgModel:()=>NgModel,ReactiveForms:()=>ReactiveForms,Skeleton:()=>Skeleton,default:()=>file_uploader_stories});var fesm2020_forms=__webpack_require__("./node_modules/@angular/forms/fesm2020/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),i18n=__webpack_require__("./src/i18n/index.ts");const noop=()=>{};let FileUploader=class FileUploader{constructor(i18n){this.i18n=i18n,this.buttonText=this.i18n.get().FILE_UPLOADER.OPEN,this.buttonType="primary",this.accept=[],this.multiple=!0,this.skeleton=!1,this.fileItemSize="lg",this.drop=!1,this.fileUploaderId=`file-uploader-${FileUploader.fileUploaderCount}`,this.files=new Set,this.disabled=!1,this.filesChange=new core.EventEmitter,this.dragOver=!1,this.onTouchedCallback=noop,this.onChangeCallback=noop,FileUploader.fileUploaderCount++}get value(){return this.files}set value(v){v!==this.files&&(this.files=v,this.onChangeCallback(v))}onBlur(){this.onTouchedCallback()}get fileList(){return Array.from(this.fileInput.nativeElement.files)}writeValue(value){value!==this.value&&(this.files=value)}createFileItem(file){return{uploaded:!1,state:"edit",invalid:!1,invalidText:"",file}}onFilesAdded(){const newFiles=new Set(this.files);this.multiple||newFiles.clear();for(let file of this.fileList){const fileItem=this.createFileItem(file);newFiles.add(fileItem)}this.value=newFiles,this.filesChange.emit(newFiles)}onDragOver(event){event.stopPropagation(),event.preventDefault(),this.dragOver=!0}onDragLeave(event){event.stopPropagation(),event.preventDefault(),this.dragOver=!1}onDrop(event){event.stopPropagation(),event.preventDefault();Array.from(event.dataTransfer.files).filter((({name,type})=>{const fileExtension=name.split(".").pop().replace(/^/,".");return this.accept.includes(type)||this.accept.includes(fileExtension)||!this.accept.length})).forEach((file=>{if(!this.files.size||this.multiple){const fileItem=this.createFileItem(file);this.files.add(fileItem)}})),this.filesChange.emit(this.files),this.value=this.files,this.dragOver=!1}removeFile(fileItem){let shouldEmit=!0;this.files&&(shouldEmit=this.files.has(fileItem),this.files.delete(fileItem)),this.fileInput.nativeElement.value="",shouldEmit&&this.filesChange.emit(this.files)}isTemplate(value){return value instanceof core.TemplateRef}registerOnTouched(fn){this.onTouchedCallback=fn}registerOnChange(fn){this.onChangeCallback=fn}setDisabledState(isDisabled){this.disabled=isDisabled}};FileUploader.fileUploaderCount=0,FileUploader.ctorParameters=()=>[{type:i18n.oc}],FileUploader.propDecorators={buttonText:[{type:core.Input}],buttonType:[{type:core.Input}],title:[{type:core.Input}],description:[{type:core.Input}],accept:[{type:core.Input}],multiple:[{type:core.Input}],skeleton:[{type:core.Input}],size:[{type:core.Input}],fileItemSize:[{type:core.Input}],drop:[{type:core.Input}],dropText:[{type:core.Input}],fileUploaderId:[{type:core.Input}],fileInput:[{type:core.ViewChild,args:["fileInput"]}],files:[{type:core.Input}],disabled:[{type:core.Input}],filesChange:[{type:core.Output}]},FileUploader=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-file-uploader, ibm-file-uploader",template:'\n\t\t<ng-container *ngIf="!skeleton; else skeletonTemplate">\n\t\t\t<label [for]="fileUploaderId" class="cds--file--label">{{title}}</label>\n\t\t\t<p class="cds--label-description">{{description}}</p>\n\t\t\t<div class="cds--file">\n\t\t\t\t<label\n\t\t\t\t\t*ngIf="drop"\n\t\t\t\t\tclass="cds--file-browse-btn"\n\t\t\t\t\t(keyup.enter)="fileInput.click()"\n\t\t\t\t\t(keyup.space)="fileInput.click()"\n\t\t\t\t\t[ngClass]="{\'cds--file-browse-btn--disabled\': disabled}"\n\t\t\t\t\ttabindex="0">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass="cds--file__drop-container"\n\t\t\t\t\t\t[ngClass]="{\'cds--file__drop-container--drag-over\': dragOver}"\n\t\t\t\t\t\trole="button"\n\t\t\t\t\t\t(click)="fileInput.click()"\n\t\t\t\t\t\t[attr.for]="fileUploaderId"\n\t\t\t\t\t\t(dragover)="onDragOver($event)"\n\t\t\t\t\t\t(dragleave)="onDragLeave($event)"\n\t\t\t\t\t\t(drop)="onDrop($event)">\n\t\t\t\t\t\t<ng-container *ngIf="!isTemplate(dropText)">{{dropText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf="isTemplate(dropText)" [ngTemplateOutlet]="dropText"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</label>\n\t\t\t\t<button\n\t\t\t\t\t*ngIf="!drop"\n\t\t\t\t\ttype="button"\n\t\t\t\t\t[cdsButton]="buttonType"\n\t\t\t\t\t(click)="fileInput.click()"\n\t\t\t\t\t[attr.for]="fileUploaderId"\n\t\t\t\t\t[size]="size"\n\t\t\t\t\t[disabled]="disabled">\n\t\t\t\t\t{{buttonText}}\n\t\t\t\t</button>\n\t\t\t\t<input\n\t\t\t\t\t#fileInput\n\t\t\t\t\ttype="file"\n\t\t\t\t\tclass="cds--file-input"\n\t\t\t\t\t[accept]="accept"\n\t\t\t\t\t[id]="fileUploaderId"\n\t\t\t\t\t[multiple]="multiple"\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t(change)="onFilesAdded()"\n\t\t\t\t\t[disabled]="disabled"/>\n\t\t\t\t<div class="cds--file-container">\n\t\t\t\t\t<ng-container *ngFor="let fileItem of files">\n\t\t\t\t\t\t<cds-file\n\t\t\t\t\t\t\t[fileItem]="fileItem"\n\t\t\t\t\t\t\t(remove)="removeFile(fileItem)"\n\t\t\t\t\t\t\t[size]="fileItemSize">\n\t\t\t\t\t\t</cds-file>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-container>\n\n\t\t<ng-template #skeletonTemplate>\n\t\t\t<div class="cds--skeleton__text" style="width: 100px"></div>\n\t\t\t<div class="cds--skeleton__text" style="width: 225px"></div>\n\t\t\t<button cdsButton skeleton="true"></button>\n\t\t</ng-template>\n\t',providers:[{provide:fesm2020_forms.JU,useExisting:FileUploader,multi:!0}]})],FileUploader);let FileComponent=class FileComponent{constructor(i18n){this.i18n=i18n,this.translations=this.i18n.get().FILE_UPLOADER,this.size="lg",this.remove=new core.EventEmitter,this.selectedFile=!0}get isInvalidText(){return this.fileItem.invalidText}get fileSizeSmall(){return"sm"===this.size}get fileSizeMedium(){return"md"===this.size}get fileSizeLarge(){return"lg"===this.size}ngOnDestroy(){this.remove.emit()}};FileComponent.ctorParameters=()=>[{type:i18n.oc}],FileComponent.propDecorators={translations:[{type:core.Input}],fileItem:[{type:core.Input}],size:[{type:core.Input}],remove:[{type:core.Output}],selectedFile:[{type:core.HostBinding,args:["class.cds--file__selected-file"]}],isInvalidText:[{type:core.HostBinding,args:["class.cds--file__selected-file--invalid"]}],fileSizeSmall:[{type:core.HostBinding,args:["class.cds--file__selected-file--sm"]}],fileSizeMedium:[{type:core.HostBinding,args:["class.cds--file__selected-file--md"]}],fileSizeLarge:[{type:core.HostBinding,args:["class.cds--file__selected-file--lg"]}]},FileComponent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-file, ibm-file",template:'\n\t\t<p class="cds--file-filename" [title]="fileItem.file.name">{{fileItem.file.name}}</p>\n\t\t<span\n\t\t\t*ngIf="fileItem.state === \'edit\'"\n\t\t\tclass="cds--file__state-container">\n\t\t\t<svg\n\t\t\t\t*ngIf="isInvalidText"\n\t\t\t\tcdsIcon="warning--filled"\n\t\t\t\tclass="cds--file--invalid"\n\t\t\t\tsize="16">\n\t\t\t</svg>\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="cds--file-close"\n\t\t\t\t[attr.aria-label]="translations.REMOVE_BUTTON"\n\t\t\t\ttabindex="0"\n\t\t\t\t(click)="remove.emit()"\n\t\t\t\t(keyup.enter)="remove.emit()"\n\t\t\t\t(keyup.space)="remove.emit()">\n\t\t\t\t<svg cdsIcon="close" size="16"></svg>\n\t\t\t</button>\n\t\t</span>\n\t\t<span *ngIf="fileItem.state === \'upload\'">\n\t\t\t<div class="cds--inline-loading__animation">\n\t\t\t\t<cds-loading size="sm"></cds-loading>\n\t\t\t</div>\n\t\t</span>\n\t\t<span *ngIf="fileItem.state === \'complete\'" class="cds--file__state-container">\n\t\t\t<svg\n\t\t\t\tcdsIcon="checkmark--filled"\n\t\t\t\tsize="16"\n\t\t\t\tclass="cds--file-complete"\n\t\t\t\t[ariaLabel]="translations.CHECKMARK">\n\t\t\t</svg>\n\t\t</span>\n\t\t<div class="cds--form-requirement" *ngIf="fileItem.invalid">\n\t\t\t<div class="cds--form-requirement__title">{{fileItem.invalidTitle}}</div>\n\t\t\t<p class="cds--form-requirement__supplement">{{fileItem.invalidText}}</p>\n\t\t</div>\n\t'})],FileComponent);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),src_button=__webpack_require__("./src/button/index.ts"),loading=__webpack_require__("./src/loading/index.ts"),icon=__webpack_require__("./src/icon/index.ts");let FileUploaderModule=class FileUploaderModule{};FileUploaderModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[FileUploader,FileComponent],exports:[FileUploader,FileComponent],imports:[common.CommonModule,src_button.hJ,loading.I,icon.QX]})],FileUploaderModule);var notification=__webpack_require__("./src/notification/index.ts"),file_type=__webpack_require__("./node_modules/file-type/index.js");let DragAndDropStory=class DragAndDropStory{constructor(){this.files=new Set,this.accept=[".jpg",".png"],this.dropText="Drag and drop files here of upload",this.disabled=!1,this.fileItemSize="lg",this.maxSize=5e5}onDropped(event){const transferredFiles=Array.from(event),readFileAndCheckType=fileObj=>new Promise(((resolve,reject)=>{let fileExtension,mime,reader=new FileReader;reader.readAsArrayBuffer(fileObj.file),reader.onload=()=>{if(reader.result){const type=file_type(reader.result);type?(fileExtension=type.ext.replace(/^/,"."),mime=type.mime):(fileExtension=fileObj.file.name.split(".").pop().replace(/^/,"."),mime=fileObj.file.type)}resolve({file:fileObj,accept:this.accept.includes(fileExtension)||this.accept.includes(mime)||!this.accept.length})},reader.onerror=error=>{reject(error)}})),promises=transferredFiles.map((file=>readFileAndCheckType(file)));Promise.all(promises).then((filePromiseArray=>filePromiseArray.filter((filePromise=>filePromise.accept)).map((acceptedFile=>acceptedFile.file)))).then((acceptedFiles=>this.files=new Set(acceptedFiles))).catch((error=>console.log(error)))}onUpload(){this.files.forEach((fileItem=>{fileItem.uploaded||(fileItem.file.size<this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="complete",fileItem.uploaded=!0,console.log(fileItem)}),1500)),fileItem.file.size>this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="edit",fileItem.invalid=!0,fileItem.invalidText="File size exceeds limit"}),1500)))}))}};DragAndDropStory.propDecorators={files:[{type:core.Input}],title:[{type:core.Input}],description:[{type:core.Input}],accept:[{type:core.Input}],multiple:[{type:core.Input}],dropText:[{type:core.Input}],disabled:[{type:core.Input}],fileItemSize:[{type:core.Input}]},DragAndDropStory=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-drop-file-uploader",template:'\n\t\t<cds-file-uploader\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[buttonText]="buttonText"\n\t\t\t[buttonType]="buttonType"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[skeleton]="skeleton"\n\t\t\t[(files)]="files"\n\t\t\t[size]="size"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\tdrop="true"\n\t\t\t[dropText]="dropText"\n\t\t\t(filesChange)="onDropped($event)"\n\t\t\t[disabled]="disabled">\n\t\t</cds-file-uploader>\n\t\t<button\n\t\t\tcdsButton\n\t\t\t*ngIf="files && files.size > 0"\n\t\t\t(click)="onUpload()"\n\t\t\tstyle="margin-top:20px">\n\t\t\tUpload\n\t\t</button>\n\t'})],DragAndDropStory);let NgModelFileUploaderStory=class NgModelFileUploaderStory{constructor(){this.buttonType="primary",this.size="md",this.disabled=!1,this.fileItemSize="lg",this.model=new Set,this.maxSize=5e5}removeFiles(){this.model=new Set}onUpload(){this.model.forEach((fileItem=>{fileItem.uploaded||(fileItem.file.size<this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="complete",fileItem.uploaded=!0,console.log(fileItem)}),1500)),fileItem.file.size>this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="edit",fileItem.invalid=!0,fileItem.invalidTitle="File size exceeds limit",fileItem.invalidText="500kb max file size. Select a new file and try again."}),1500)))}))}};NgModelFileUploaderStory.propDecorators={title:[{type:core.Input}],description:[{type:core.Input}],buttonText:[{type:core.Input}],buttonType:[{type:core.Input}],accept:[{type:core.Input}],multiple:[{type:core.Input}],size:[{type:core.Input}],disabled:[{type:core.Input}],fileItemSize:[{type:core.Input}]},NgModelFileUploaderStory=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-ngmodel-file-uploader",template:'\n\t\t<cds-file-uploader\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[buttonText]="buttonText"\n\t\t\t[buttonType]="buttonType"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[size]="size"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t[(ngModel)]="model"\n\t\t\t[disabled]="disabled">\n\t\t</cds-file-uploader>\n\t\t<button\n\t\t\tcdsButton\n\t\t\t*ngIf="model && model.size > 0"\n\t\t\t(click)="onUpload()"\n\t\t\tstyle="margin-top:20px">\n\t\t\tUpload\n\t\t</button>\n\t\t<button cdsButton (click)="removeFiles()">Remove all</button>\n\t'})],NgModelFileUploaderStory);let ReactiveFormsStory=class ReactiveFormsStory{constructor(formBuilder){this.formBuilder=formBuilder,this.buttonType="primary",this.accept=[".jpg",".png"],this.skeleton=!1,this.size="md",this.disabled=!1,this.fileItemSize="lg",this.maxSize=5e5}ngOnInit(){this.formGroup=this.formBuilder.group({files:new fesm2020_forms.NI(new Set,[fesm2020_forms.kI.required])}),this.disabledFormGroup=this.formBuilder.group({files:new fesm2020_forms.NI(new Set,[fesm2020_forms.kI.required])}),this.disabledFormGroup.disable()}onUpload(){this.formGroup.get("files").value.forEach((fileItem=>{fileItem.uploaded||(fileItem.file.size<this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="complete",fileItem.uploaded=!0}),1500)),fileItem.file.size>this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="edit",fileItem.invalid=!0,fileItem.invalidTitle="File size exceeds limit",fileItem.invalidText="500kb max file size. Select a new file and try again."}),1500)))}))}};ReactiveFormsStory.ctorParameters=()=>[{type:fesm2020_forms.qu}],ReactiveFormsStory.propDecorators={title:[{type:core.Input}],description:[{type:core.Input}],buttonText:[{type:core.Input}],buttonType:[{type:core.Input}],accept:[{type:core.Input}],multiple:[{type:core.Input}],skeleton:[{type:core.Input}],size:[{type:core.Input}],disabled:[{type:core.Input}],fileItemSize:[{type:core.Input}]},ReactiveFormsStory=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-reactive-forms",template:'\n\t\t<form [formGroup]="formGroup" (ngSubmit)="onUpload()">\n\t\t\t<cds-file-uploader\n\t\t\t\t[title]="title"\n\t\t\t\t[description]="description"\n\t\t\t\t[buttonText]="buttonText"\n\t\t\t\t[buttonType]="buttonType"\n\t\t\t\t[accept]="accept"\n\t\t\t\t[multiple]="multiple"\n\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t[size]="size"\n\t\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\tformControlName="files">\n\t\t\t</cds-file-uploader>\n\t\t\t<button\n\t\t\t\tcdsButton\n\t\t\t\t*ngIf="formGroup.get(\'files\').value && formGroup.get(\'files\').value.size > 0"\n\t\t\t\ttype="submit"\n\t\t\t\tstyle="margin-top: 20px">\n\t\t\t\tUpload\n\t\t\t</button>\n\t\t</form>\n\t\t<form [formGroup]="disabledFormGroup" (ngSubmit)="onUpload()">\n\t\t\t<cds-file-uploader\n\t\t\t\t[title]="title"\n\t\t\t\t[description]="description"\n\t\t\t\t[buttonText]="buttonText"\n\t\t\t\t[buttonType]="buttonType"\n\t\t\t\t[accept]="accept"\n\t\t\t\t[multiple]="multiple"\n\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t[size]="size"\n\t\t\t\tformControlName="files">\n\t\t\t</cds-file-uploader>\n\t\t\t<div [id]="notificationId" style="width: 300px; margin-top: 20px"></div>\n\t\t\t<button cdsButton *ngIf="disabledFormGroup.get(\'files\').value && disabledFormGroup.get(\'files\').value.size > 0" type="submit">\n\t\t\t\tUpload\n\t\t\t</button>\n\t\t</form>\n\t'})],ReactiveFormsStory);let FileUploaderStory=class FileUploaderStory{constructor(){this.files=new Set,this.buttonType="primary",this.accept=[".jpg",".png"],this.skeleton=!1,this.size="md",this.disabled=!1,this.fileItemSize="lg",this.maxSize=5e5}onUpload(){this.files.forEach((fileItem=>{fileItem.uploaded||(fileItem.file.size<this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="complete",fileItem.uploaded=!0,console.log(fileItem)}),1500)),fileItem.file.size>this.maxSize&&(fileItem.state="upload",setTimeout((()=>{fileItem.state="edit",fileItem.invalid=!0,fileItem.invalidTitle="File size exceeds limit",fileItem.invalidText="500kb max file size. Select a new file and try again."}),1500)))}))}};FileUploaderStory.propDecorators={files:[{type:core.Input}],title:[{type:core.Input}],description:[{type:core.Input}],buttonText:[{type:core.Input}],buttonType:[{type:core.Input}],accept:[{type:core.Input}],multiple:[{type:core.Input}],skeleton:[{type:core.Input}],size:[{type:core.Input}],disabled:[{type:core.Input}],fileItemSize:[{type:core.Input}]},FileUploaderStory=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-file-uploader",template:'\n\t\t<cds-file-uploader\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[buttonText]="buttonText"\n\t\t\t[buttonType]="buttonType"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[skeleton]="skeleton"\n\t\t\t[(files)]="files"\n\t\t\t[size]="size"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t[disabled]="disabled">\n\t\t</cds-file-uploader>\n\t\t<button cdsButton *ngIf="files && files.size > 0" (click)="onUpload()" style="margin-top:20px">\n\t\t\tUpload\n\t\t</button>\n\t'})],FileUploaderStory);const file_uploader_stories={title:"Components/File Uploader",decorators:[(0,dist.moduleMetadata)({declarations:[FileUploaderStory,NgModelFileUploaderStory,DragAndDropStory,ReactiveFormsStory],imports:[FileUploaderModule,fesm2020_forms.u5,fesm2020_forms.UX,notification.PQ,src_button.hJ]})],args:{title:"Account photo",description:"only .jpg and .png files. 500kb max file size.",buttonText:"Add files",disabled:!1,multiple:!0},argTypes:{size:{options:["sm","md","lg"],defaultValue:"md",control:"radio"},buttonType:{options:["primary","secondary","tertiary","ghost","danger"],defaultValue:"primary",control:"select"},fileItemSize:{options:["sm","md","lg"],defaultValue:"lg",control:"radio"}},component:FileUploader},Basic=(args=>({props:args,template:'\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/file-uploader/stories/uploader.component.ts\n\t\t--\x3e\n\t\t<app-file-uploader\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[buttonText]="buttonText"\n\t\t\t[buttonType]="buttonType"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[size]="size"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t[disabled]="disabled">\n\t\t</app-file-uploader>\n\t'})).bind({}),DragAndDrop=(args=>({props:args,template:'\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/file-uploader/stories/drag-drop.component.ts\n\t\t--\x3e\n\t\t<app-drop-file-uploader\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[dropText]="dropText"\n\t\t\tdrop="true"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t[disabled]="disabled">\n\t\t</app-drop-file-uploader>\n\t'})).bind({});DragAndDrop.args={dropText:"Drag and drop files here or upload",accept:[".png","image/jpeg"]},DragAndDrop.argTypes={size:{control:!1},buttonType:{control:!1}};const NgModel=(args=>({props:args,template:'\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/file-uploader/stories/uploader-form.component.ts\n\t\t--\x3e\n\t\t<app-ngmodel-file-uploader\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[buttonText]="buttonText"\n\t\t\t[buttonType]="buttonType"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[size]="size"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t[disabled]="disabled">\n\t\t</app-ngmodel-file-uploader>\n\t'})).bind({});NgModel.storyName="Using NgModel",NgModel.args={accept:[".png",".jpeg"]};const ReactiveForms=(args=>({props:args,template:'\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/file-uploader/stories/uploader-reactive-form.component.ts\n\t\t--\x3e\n\t\t<app-reactive-forms\n\t\t\t[title]="title"\n\t\t\t[description]="description"\n\t\t\t[buttonText]="buttonText"\n\t\t\t[buttonType]="buttonType"\n\t\t\t[accept]="accept"\n\t\t\t[multiple]="multiple"\n\t\t\t[size]="size"\n\t\t\t[fileItemSize]="fileItemSize"\n\t\t\t[disabled]="disabled">\n\t\t</app-reactive-forms>\n\t'})).bind({});NgModel.args={accept:[".png",".jpeg"]};const Skeleton=(args=>({props:args,template:'\n\t\t\x3c!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/file-uploader/stories/uploader.component.ts\n\t\t--\x3e\n\t\t<app-file-uploader skeleton="true"></app-file-uploader>\n\t'})).bind({})},"./src/loading/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{g:()=>Loading,I:()=>LoadingModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),i18n=__webpack_require__("./src/i18n/index.ts");let Loading=class Loading{constructor(i18n){this.i18n=i18n,this.title=this.i18n.get().LOADING.TITLE,this.isActive=!0,this.size="normal",this.overlay=!1}};Loading.ctorParameters=()=>[{type:i18n.oc}],Loading.propDecorators={title:[{type:core.Input}],isActive:[{type:core.Input}],size:[{type:core.Input}],overlay:[{type:core.Input},{type:core.HostBinding,args:["class.cds--loading-overlay"]}]},Loading=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-loading, ibm-loading",template:'\n\t\t<div\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--loading--small\': size === \'sm\',\n\t\t\t\t\'cds--loading--stop\': !isActive && !overlay,\n\t\t\t\t\'cds--loading-overlay--stop\': !isActive && overlay\n\t\t\t}"\n\t\t\tclass="cds--loading">\n\t\t\t<svg class="cds--loading__svg" viewBox="0 0 100 100">\n\t\t\t\t<title>{{title}}</title>\n\t\t\t\t<circle class="cds--loading__stroke" cx="50%" cy="50%" r="44" />\n\t\t\t</svg>\n\t\t</div>\n\t'})],Loading);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let LoadingModule=class LoadingModule{};LoadingModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Loading],exports:[Loading],imports:[common.CommonModule,i18n.LU]})],LoadingModule)}}]);
|