@aquera/nile-elements 1.5.2 → 1.5.4
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/README.md +9 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +240 -196
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.esm.js +1 -1
- package/dist/nile-carousel/index.cjs.js +1 -1
- package/dist/nile-carousel/index.esm.js +1 -1
- package/dist/nile-carousel/nile-carousel.cjs.js +1 -1
- package/dist/nile-carousel/nile-carousel.cjs.js.map +1 -1
- package/dist/nile-carousel/nile-carousel.esm.js +11 -11
- package/dist/nile-dialog/index.cjs.js +1 -1
- package/dist/nile-dialog/index.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +1 -1
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.esm.js +2 -2
- package/dist/nile-file-preview/nile-file-preview.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.esm.js +55 -25
- package/dist/nile-file-preview/utils/index.cjs.js +1 -1
- package/dist/nile-file-preview/utils/index.esm.js +1 -1
- package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js +1 -1
- package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js.map +1 -1
- package/dist/nile-file-preview/utils/nile-file-preview.util.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.css.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.css.esm.js +15 -5
- package/dist/nile-file-upload/nile-file-upload.esm.js +2 -2
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +2 -2
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.esm.js +36 -32
- package/dist/nile-file-upload/types/file-upload.enums.cjs.js +1 -1
- package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +1 -1
- package/dist/nile-file-upload/types/file-upload.enums.esm.js +1 -1
- package/dist/nile-file-upload/types/index.cjs.js +1 -1
- package/dist/nile-file-upload/types/index.esm.js +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.esm.js +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js +4 -2
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.esm.js +3 -3
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.esm.js +1 -1
- package/dist/nile-grid/nile-grid.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.esm.js +2 -2
- package/dist/nile-grid/nile-grid.layout.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.layout.esm.js +1 -1
- package/dist/nile-grid/nile-grid.resize.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.resize.esm.js +1 -1
- package/dist/nile-grid/nile-grid.utils.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.utils.esm.js +1 -1
- package/dist/nile-grid/nile-grid.width.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.width.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.width.esm.js +1 -1
- package/dist/nile-icon/icons/svg/delete_history.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/delete_history.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/delete_history.esm.js +1 -0
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
- package/dist/nile-input/index.cjs.js +1 -1
- package/dist/nile-input/index.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +2 -2
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/index.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +4 -4
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +11 -6
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-side-bar-action-menu-item/index.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu-item/index.esm.js +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.esm.js +1 -1
- package/dist/nile-tab/index.cjs.js +1 -1
- package/dist/nile-tab/index.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/index.cjs.js +1 -1
- package/dist/nile-tab-group/index.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
- package/dist/nile-tag/index.cjs.js +1 -1
- package/dist/nile-tag/index.esm.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.esm.js +1 -1
- package/dist/nile-toast/index.cjs.js +1 -1
- package/dist/nile-toast/index.esm.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +1 -1
- package/dist/nile-tree/index.cjs.js +1 -1
- package/dist/nile-tree/index.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree-item/index.cjs.js +1 -1
- package/dist/nile-tree-item/index.esm.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
- package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -2
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +1 -1
- package/dist/src/nile-accordion/nile-accordian.test.js +101 -99
- package/dist/src/nile-accordion/nile-accordian.test.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.test.js +104 -112
- package/dist/src/nile-auto-complete/nile-auto-complete.test.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.test.d.ts +0 -1
- package/dist/src/nile-avatar/nile-avatar.test.js +103 -87
- package/dist/src/nile-avatar/nile-avatar.test.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.test.js +554 -35
- package/dist/src/nile-badge/nile-badge.test.js.map +1 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.d.ts +2 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.js +106 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.js.map +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.test.d.ts +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.test.js +108 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.test.js.map +1 -0
- package/dist/src/nile-button/nile-button.test.js +499 -39
- package/dist/src/nile-button/nile-button.test.js.map +1 -1
- package/dist/src/nile-button-filter/nile-button-filter.test.d.ts +1 -0
- package/dist/src/nile-button-filter/nile-button-filter.test.js +108 -0
- package/dist/src/nile-button-filter/nile-button-filter.test.js.map +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.test.d.ts +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.test.js +108 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.test.js.map +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.d.ts +1 -1
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js +105 -104
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.test.d.ts +0 -6
- package/dist/src/nile-calendar/nile-calendar.test.js +103 -318
- package/dist/src/nile-calendar/nile-calendar.test.js.map +1 -1
- package/dist/src/nile-card/nile-card.test.js +102 -66
- package/dist/src/nile-card/nile-card.test.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.test.js +547 -108
- package/dist/src/nile-checkbox/nile-checkbox.test.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.test.d.ts +0 -2
- package/dist/src/nile-chip/nile-chip.test.js +101 -102
- package/dist/src/nile-chip/nile-chip.test.js.map +1 -1
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.test.d.ts +1 -0
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.test.js +108 -0
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.test.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.test.d.ts +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.test.js +108 -0
- package/dist/src/nile-date-picker/nile-date-picker.test.js.map +1 -0
- package/dist/src/nile-dialog/nile-dialog.test.d.ts +0 -1
- package/dist/src/nile-dialog/nile-dialog.test.js +104 -126
- package/dist/src/nile-dialog/nile-dialog.test.js.map +1 -1
- package/dist/src/nile-divider/nile-divider.test.d.ts +1 -0
- package/dist/src/nile-divider/nile-divider.test.js +560 -0
- package/dist/src/nile-divider/nile-divider.test.js.map +1 -0
- package/dist/src/nile-drawer/nile-drawer.test.js +106 -86
- package/dist/src/nile-drawer/nile-drawer.test.js.map +1 -1
- package/dist/src/nile-dropdown/nile-dropdown.test.js +104 -148
- package/dist/src/nile-dropdown/nile-dropdown.test.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.test.js +107 -59
- package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.test.js +105 -55
- package/dist/src/nile-error-message/nile-error-message.test.js.map +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.test.d.ts +1 -0
- package/dist/src/nile-error-notification/nile-error-notification.test.js +108 -0
- package/dist/src/nile-error-notification/nile-error-notification.test.js.map +1 -0
- package/dist/src/nile-file-preview/nile-file-preview.css.js +2 -2
- package/dist/src/nile-file-preview/nile-file-preview.css.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.d.ts +1 -4
- package/dist/src/nile-file-preview/nile-file-preview.js +21 -47
- package/dist/src/nile-file-preview/nile-file-preview.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +6 -6
- package/dist/src/nile-file-preview/nile-file-preview.template.js +53 -23
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -6
- package/dist/src/nile-file-preview/nile-file-preview.test.js +106 -28
- package/dist/src/nile-file-preview/nile-file-preview.test.js.map +1 -1
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +3 -2
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +32 -7
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.css.js +15 -5
- package/dist/src/nile-file-upload/nile-file-upload.css.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.d.ts +4 -1
- package/dist/src/nile-file-upload/nile-file-upload.js +13 -1
- package/dist/src/nile-file-upload/nile-file-upload.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.template.js +19 -15
- package/dist/src/nile-file-upload/nile-file-upload.template.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -6
- package/dist/src/nile-file-upload/nile-file-upload.test.js +106 -28
- package/dist/src/nile-file-upload/nile-file-upload.test.js.map +1 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +17 -3
- package/dist/src/nile-file-upload/types/file-upload.enums.js +17 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.js.map +1 -1
- package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +2 -0
- package/dist/src/nile-file-upload/utils/drag-drop.util.js +14 -8
- package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +1 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.js +89 -10
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js +102 -77
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
- package/dist/src/nile-form-error-message/nile-form-error-message.test.d.ts +1 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.test.js +108 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.test.js.map +1 -0
- package/dist/src/nile-form-group/nile-form-group.test.js +104 -51
- package/dist/src/nile-form-group/nile-form-group.test.js.map +1 -1
- package/dist/src/nile-form-help-text/nile-form-help-text.test.js +104 -84
- package/dist/src/nile-form-help-text/nile-form-help-text.test.js.map +1 -1
- package/dist/src/nile-format-date/nile-format-date.test.d.ts +1 -0
- package/dist/src/nile-format-date/nile-format-date.test.js +108 -0
- package/dist/src/nile-format-date/nile-format-date.test.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.js +6 -5
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.js.map +1 -1
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.d.ts +14 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.js +24 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.d.ts +1 -0
- package/dist/src/nile-grid/nile-grid.js +5 -1
- package/dist/src/nile-grid/nile-grid.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.utils.d.ts +6 -0
- package/dist/src/nile-grid/nile-grid.utils.js +13 -0
- package/dist/src/nile-grid/nile-grid.utils.js.map +1 -1
- package/dist/src/nile-heading/nile-heading.test.d.ts +1 -0
- package/dist/src/nile-heading/nile-heading.test.js +108 -0
- package/dist/src/nile-heading/nile-heading.test.js.map +1 -0
- package/dist/src/nile-hero/nile-hero.test.js +101 -38
- package/dist/src/nile-hero/nile-hero.test.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/delete_history.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/delete_history.js +5 -0
- package/dist/src/nile-icon/icons/svg/delete_history.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/index.d.ts +1 -0
- package/dist/src/nile-icon/icons/svg/index.js +1 -0
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-icon/nile-icon.test.js +103 -40
- package/dist/src/nile-icon/nile-icon.test.js.map +1 -1
- package/dist/src/nile-icon-button/nile-icon-button.test.d.ts +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.test.js +568 -0
- package/dist/src/nile-icon-button/nile-icon-button.test.js.map +1 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.test.d.ts +1 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.test.js +108 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.test.js.map +1 -0
- package/dist/src/nile-input/nile-input.js +1 -1
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-input/nile-input.test.js +109 -139
- package/dist/src/nile-input/nile-input.test.js.map +1 -1
- package/dist/src/nile-link/nile-link.test.js +103 -67
- package/dist/src/nile-link/nile-link.test.js.map +1 -1
- package/dist/src/nile-list/nile-list.test.d.ts +1 -0
- package/dist/src/nile-list/nile-list.test.js +108 -0
- package/dist/src/nile-list/nile-list.test.js.map +1 -0
- package/dist/src/nile-list-item/nile-list-item.test.d.ts +1 -0
- package/dist/src/nile-list-item/nile-list-item.test.js +108 -0
- package/dist/src/nile-list-item/nile-list-item.test.js.map +1 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.test.d.ts +2 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.test.js +109 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.test.js.map +1 -0
- package/dist/src/nile-loader/nile-loader.test.js +107 -40
- package/dist/src/nile-loader/nile-loader.test.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.test.d.ts +1 -0
- package/dist/src/nile-menu/nile-menu.test.js +113 -0
- package/dist/src/nile-menu/nile-menu.test.js.map +1 -0
- package/dist/src/nile-menu-item/nile-menu-item.test.d.ts +1 -0
- package/dist/src/nile-menu-item/nile-menu-item.test.js +113 -0
- package/dist/src/nile-menu-item/nile-menu-item.test.js.map +1 -0
- package/dist/src/nile-option/nile-option.test.d.ts +1 -0
- package/dist/src/nile-option/nile-option.test.js +108 -0
- package/dist/src/nile-option/nile-option.test.js.map +1 -0
- package/dist/src/nile-option-group/nile-option-group.test.d.ts +1 -0
- package/dist/src/nile-option-group/nile-option-group.test.js +108 -0
- package/dist/src/nile-option-group/nile-option-group.test.js.map +1 -0
- package/dist/src/nile-page-header/nile-page-header.test.d.ts +1 -0
- package/dist/src/nile-page-header/nile-page-header.test.js +108 -0
- package/dist/src/nile-page-header/nile-page-header.test.js.map +1 -0
- package/dist/src/nile-pagination/nile-pagination.test.d.ts +1 -0
- package/dist/src/nile-pagination/nile-pagination.test.js +108 -0
- package/dist/src/nile-pagination/nile-pagination.test.js.map +1 -0
- package/dist/src/nile-popover/nile-popover.test.js +103 -68
- package/dist/src/nile-popover/nile-popover.test.js.map +1 -1
- package/dist/src/nile-popup/nile-popup.test.js +104 -65
- package/dist/src/nile-popup/nile-popup.test.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.test.js +104 -44
- package/dist/src/nile-progress-bar/nile-progress-bar.test.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.test.js +103 -66
- package/dist/src/nile-radio/nile-radio.test.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.test.d.ts +0 -1
- package/dist/src/nile-radio-group/nile-radio-group.test.js +105 -171
- package/dist/src/nile-radio-group/nile-radio-group.test.js.map +1 -1
- package/dist/src/nile-section-message/nile-section-message.test.d.ts +1 -0
- package/dist/src/nile-section-message/nile-section-message.test.js +108 -0
- package/dist/src/nile-section-message/nile-section-message.test.js.map +1 -0
- package/dist/src/nile-select/nile-select.test.d.ts +0 -5
- package/dist/src/nile-select/nile-select.test.js +105 -244
- package/dist/src/nile-select/nile-select.test.js.map +1 -1
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.test.d.ts +1 -0
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.test.js +108 -0
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.test.js.map +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js +104 -50
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.test.d.ts +1 -0
- package/dist/src/nile-slider/nile-slider.test.js +108 -0
- package/dist/src/nile-slider/nile-slider.test.js.map +1 -0
- package/dist/src/nile-spinner/nile-spinner.test.d.ts +1 -0
- package/dist/src/nile-spinner/nile-spinner.test.js +569 -0
- package/dist/src/nile-spinner/nile-spinner.test.js.map +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.d.ts +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.js +108 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.js.map +1 -0
- package/dist/src/nile-stepper/nile-stepper.test.d.ts +2 -0
- package/dist/src/nile-stepper/nile-stepper.test.js +109 -0
- package/dist/src/nile-stepper/nile-stepper.test.js.map +1 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.test.d.ts +1 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.test.js +108 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.test.js.map +1 -0
- package/dist/src/nile-tab/nile-tab.test.d.ts +1 -0
- package/dist/src/nile-tab/nile-tab.test.js +108 -0
- package/dist/src/nile-tab/nile-tab.test.js.map +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.test.js +105 -172
- package/dist/src/nile-tab-group/nile-tab-group.test.js.map +1 -1
- package/dist/src/nile-tab-panel/nile-tab-panel.test.d.ts +1 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.test.js +108 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.test.js.map +1 -0
- package/dist/src/nile-tag/nile-tag.test.d.ts +1 -0
- package/dist/src/nile-tag/nile-tag.test.js +574 -0
- package/dist/src/nile-tag/nile-tag.test.js.map +1 -0
- package/dist/src/nile-textarea/nile-textarea.test.d.ts +1 -1
- package/dist/src/nile-textarea/nile-textarea.test.js +105 -84
- package/dist/src/nile-textarea/nile-textarea.test.js.map +1 -1
- package/dist/src/nile-title/nile-title.test.d.ts +1 -0
- package/dist/src/nile-title/nile-title.test.js +108 -0
- package/dist/src/nile-title/nile-title.test.js.map +1 -0
- package/dist/src/nile-toast/nile-toast.test.d.ts +1 -0
- package/dist/src/nile-toast/nile-toast.test.js +526 -0
- package/dist/src/nile-toast/nile-toast.test.js.map +1 -0
- package/dist/src/nile-toolbar/nile-toolbar.test.d.ts +1 -0
- package/dist/src/nile-toolbar/nile-toolbar.test.js +108 -0
- package/dist/src/nile-toolbar/nile-toolbar.test.js.map +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.test.js +546 -0
- package/dist/src/nile-tooltip/nile-tooltip.test.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +1 -7
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +105 -628
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
- package/dist/src/version.js +2 -2
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/rollup.config.js +7 -1
- package/src/nile-accordion/nile-accordian.test.ts +102 -116
- package/src/nile-auto-complete/nile-auto-complete.css.ts +1 -1
- package/src/nile-auto-complete/nile-auto-complete.test.ts +102 -145
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-avatar/nile-avatar.test.ts +102 -112
- package/src/nile-badge/nile-badge.test.ts +642 -30
- package/src/nile-breadcrumb/nile-breadcrumb.test.ts +107 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.test.ts +106 -0
- package/src/nile-button/nile-button.test.ts +593 -61
- package/src/nile-button-filter/nile-button-filter.test.ts +106 -0
- package/src/nile-button-toggle/nile-button-toggle.test.ts +106 -0
- package/src/nile-button-toggle-group/nile-button-toggle-group.test.ts +104 -126
- package/src/nile-calendar/nile-calendar.test.ts +102 -406
- package/src/nile-card/nile-card.test.ts +103 -71
- package/src/nile-checkbox/nile-checkbox.test.ts +614 -108
- package/src/nile-chip/nile-chip.test.ts +102 -136
- package/src/nile-circular-progressbar/nile-circular-progressbar.test.ts +106 -0
- package/src/nile-date-picker/nile-date-picker.test.ts +106 -0
- package/src/nile-dialog/nile-dialog.test.ts +102 -164
- package/src/nile-divider/nile-divider.test.ts +659 -0
- package/src/nile-drawer/nile-drawer.test.ts +105 -105
- package/src/nile-dropdown/nile-dropdown.test.ts +102 -190
- package/src/nile-empty-state/nile-empty-state.test.ts +104 -67
- package/src/nile-error-message/nile-error-message.test.ts +104 -67
- package/src/nile-error-notification/nile-error-notification.test.ts +106 -0
- package/src/nile-file-preview/nile-file-preview.css.ts +2 -2
- package/src/nile-file-preview/nile-file-preview.template.ts +59 -23
- package/src/nile-file-preview/nile-file-preview.test.ts +105 -37
- package/src/nile-file-preview/nile-file-preview.ts +23 -56
- package/src/nile-file-preview/utils/nile-file-preview.util.ts +37 -8
- package/src/nile-file-upload/nile-file-upload.css.ts +15 -5
- package/src/nile-file-upload/nile-file-upload.template.ts +22 -18
- package/src/nile-file-upload/nile-file-upload.test.ts +105 -37
- package/src/nile-file-upload/nile-file-upload.ts +11 -3
- package/src/nile-file-upload/types/file-upload.enums.ts +20 -4
- package/src/nile-file-upload/utils/drag-drop.util.ts +20 -11
- package/src/nile-file-upload/utils/file-validation.util.ts +104 -22
- package/src/nile-filter-chip/nile-filter-chip.test.ts +103 -89
- package/src/nile-form-error-message/nile-form-error-message.test.ts +106 -0
- package/src/nile-form-group/nile-form-group.test.ts +103 -60
- package/src/nile-form-help-text/nile-form-help-text.test.ts +102 -106
- package/src/nile-format-date/nile-format-date.test.ts +106 -0
- package/src/nile-grid/nile-grid-head-item/nile-grid-head-item.ts +7 -5
- package/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.ts +28 -0
- package/src/nile-grid/nile-grid.ts +6 -1
- package/src/nile-grid/nile-grid.utils.ts +18 -1
- package/src/nile-heading/nile-heading.test.ts +106 -0
- package/src/nile-hero/nile-hero.test.ts +103 -42
- package/src/nile-icon/icons/svg/delete_history.ts +5 -0
- package/src/nile-icon/icons/svg/index.ts +1 -0
- package/src/nile-icon/nile-icon.test.ts +103 -50
- package/src/nile-icon-button/nile-icon-button.test.ts +667 -0
- package/src/nile-inline-edit/nile-inline-edit.test.ts +106 -0
- package/src/nile-input/nile-input.test.ts +105 -164
- package/src/nile-input/nile-input.ts +1 -1
- package/src/nile-link/nile-link.test.ts +104 -81
- package/src/nile-list/nile-list.test.ts +106 -0
- package/src/nile-list-item/nile-list-item.test.ts +106 -0
- package/src/nile-lite-tooltip/nile-lite-tooltip.test.ts +107 -0
- package/src/nile-loader/nile-loader.test.ts +103 -48
- package/src/nile-menu/nile-menu.test.ts +106 -0
- package/src/nile-menu-item/nile-menu-item.test.ts +106 -0
- package/src/nile-option/nile-option.test.ts +106 -0
- package/src/nile-option-group/nile-option-group.test.ts +106 -0
- package/src/nile-page-header/nile-page-header.test.ts +106 -0
- package/src/nile-pagination/nile-pagination.test.ts +106 -0
- package/src/nile-popover/nile-popover.test.ts +103 -83
- package/src/nile-popup/nile-popup.test.ts +102 -82
- package/src/nile-progress-bar/nile-progress-bar.test.ts +103 -52
- package/src/nile-radio/nile-radio.test.ts +103 -78
- package/src/nile-radio-group/nile-radio-group.test.ts +104 -213
- package/src/nile-section-message/nile-section-message.test.ts +106 -0
- package/src/nile-select/nile-select.test.ts +105 -308
- package/src/nile-skeleton-loader/nile-skeleton-loader.test.ts +106 -0
- package/src/nile-slide-toggle/nile-slide-toggle.test.ts +103 -58
- package/src/nile-slider/nile-slider.test.ts +106 -0
- package/src/nile-spinner/nile-spinner.test.ts +668 -0
- package/src/nile-split-panel/nile-split-panel.test.ts +106 -0
- package/src/nile-stepper/nile-stepper.test.ts +107 -0
- package/src/nile-stepper-item/nile-stepper-item.test.ts +106 -0
- package/src/nile-tab/nile-tab.test.ts +106 -0
- package/src/nile-tab-group/nile-tab-group.test.ts +104 -211
- package/src/nile-tab-panel/nile-tab-panel.test.ts +106 -0
- package/src/nile-tag/nile-tag.test.ts +675 -0
- package/src/nile-textarea/nile-textarea.test.ts +104 -100
- package/src/nile-title/nile-title.test.ts +106 -0
- package/src/nile-toast/nile-toast.test.ts +625 -0
- package/src/nile-toolbar/nile-toolbar.test.ts +106 -0
- package/src/nile-tooltip/nile-tooltip.test.ts +645 -0
- package/src/nile-virtual-select/nile-virtual-select.test.ts +104 -772
- package/vscode-html-custom-data.json +8 -3
- package/web-test-runner.config.mjs +4 -2
- package/dist/axe.min-2720cd56.esm.js +0 -1
- package/dist/axe.min-69d47269.cjs.js +0 -2
- package/dist/axe.min-69d47269.cjs.js.map +0 -1
- package/dist/css-tag-bb10c0fa.cjs.js +0 -6
- package/dist/css-tag-bb10c0fa.cjs.js.map +0 -1
- package/dist/css-tag-dc564feb.esm.js +0 -6
- package/dist/fixture-958445f8.cjs.js +0 -395
- package/dist/fixture-958445f8.cjs.js.map +0 -1
- package/dist/fixture-985bba12.esm.js +0 -569
- package/dist/nile-accordion/nile-accordian.test.cjs.js +0 -2
- package/dist/nile-accordion/nile-accordian.test.cjs.js.map +0 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +0 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +0 -2
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +0 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +0 -9
- package/dist/nile-avatar/nile-avatar.test.cjs.js +0 -2
- package/dist/nile-avatar/nile-avatar.test.cjs.js.map +0 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +0 -11
- package/dist/nile-badge/nile-badge.test.cjs.js +0 -2
- package/dist/nile-badge/nile-badge.test.cjs.js.map +0 -1
- package/dist/nile-badge/nile-badge.test.esm.js +0 -1
- package/dist/nile-button/nile-button.test.cjs.js +0 -2
- package/dist/nile-button/nile-button.test.cjs.js.map +0 -1
- package/dist/nile-button/nile-button.test.esm.js +0 -4
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +0 -2
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js.map +0 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +0 -49
- package/dist/nile-calendar/nile-calendar.test.cjs.js +0 -2
- package/dist/nile-calendar/nile-calendar.test.cjs.js.map +0 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +0 -11
- package/dist/nile-card/nile-card.test.cjs.js +0 -2
- package/dist/nile-card/nile-card.test.cjs.js.map +0 -1
- package/dist/nile-card/nile-card.test.esm.js +0 -51
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +0 -2
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js.map +0 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +0 -17
- package/dist/nile-chip/nile-chip.test.cjs.js +0 -2
- package/dist/nile-chip/nile-chip.test.cjs.js.map +0 -1
- package/dist/nile-chip/nile-chip.test.esm.js +0 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +0 -2
- package/dist/nile-dialog/nile-dialog.test.cjs.js.map +0 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +0 -7
- package/dist/nile-drawer/nile-drawer.test.cjs.js +0 -2
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +0 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +0 -17
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +0 -2
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js.map +0 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +0 -28
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +0 -2
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js.map +0 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +0 -9
- package/dist/nile-error-message/nile-error-message.test.cjs.js +0 -2
- package/dist/nile-error-message/nile-error-message.test.cjs.js.map +0 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +0 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +0 -2
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +0 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +0 -1
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +0 -2
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +0 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +0 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +0 -2
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +0 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +0 -20
- package/dist/nile-form-group/nile-form-group.test.cjs.js +0 -2
- package/dist/nile-form-group/nile-form-group.test.cjs.js.map +0 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +0 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +0 -2
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js.map +0 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +0 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +0 -2
- package/dist/nile-hero/nile-hero.test.cjs.js.map +0 -1
- package/dist/nile-hero/nile-hero.test.esm.js +0 -14
- package/dist/nile-icon/nile-icon.test.cjs.js +0 -2
- package/dist/nile-icon/nile-icon.test.cjs.js.map +0 -1
- package/dist/nile-icon/nile-icon.test.esm.js +0 -1
- package/dist/nile-input/nile-input.test.cjs.js +0 -2
- package/dist/nile-input/nile-input.test.cjs.js.map +0 -1
- package/dist/nile-input/nile-input.test.esm.js +0 -17
- package/dist/nile-link/nile-link.test.cjs.js +0 -2
- package/dist/nile-link/nile-link.test.cjs.js.map +0 -1
- package/dist/nile-link/nile-link.test.esm.js +0 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +0 -2
- package/dist/nile-loader/nile-loader.test.cjs.js.map +0 -1
- package/dist/nile-loader/nile-loader.test.esm.js +0 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +0 -2
- package/dist/nile-popover/nile-popover.test.cjs.js.map +0 -1
- package/dist/nile-popover/nile-popover.test.esm.js +0 -21
- package/dist/nile-popup/nile-popup.test.cjs.js +0 -2
- package/dist/nile-popup/nile-popup.test.cjs.js.map +0 -1
- package/dist/nile-popup/nile-popup.test.esm.js +0 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +0 -2
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js.map +0 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +0 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +0 -2
- package/dist/nile-radio/nile-radio.test.cjs.js.map +0 -1
- package/dist/nile-radio/nile-radio.test.esm.js +0 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +0 -2
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js.map +0 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +0 -57
- package/dist/nile-select/nile-select.test.cjs.js +0 -2
- package/dist/nile-select/nile-select.test.cjs.js.map +0 -1
- package/dist/nile-select/nile-select.test.esm.js +0 -55
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +0 -2
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js.map +0 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +0 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +0 -2
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +0 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +0 -65
- package/dist/nile-textarea/nile-textarea.test.cjs.js +0 -2
- package/dist/nile-textarea/nile-textarea.test.cjs.js.map +0 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +0 -2
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js.map +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +0 -93
- package/dist/scopedElementsWrapper-31107e48.esm.js +0 -1
- package/dist/scopedElementsWrapper-9b188ea6.cjs.js +0 -2
- package/dist/scopedElementsWrapper-9b188ea6.cjs.js.map +0 -1
- package/dist/sinon-esm-68c8e378.esm.js +0 -1
- package/dist/sinon-esm-97570c13.cjs.js +0 -2
- package/dist/sinon-esm-97570c13.cjs.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-empty-state.test.cjs.js","sources":["../../../src/nile-empty-state/nile-empty-state.test.ts"],"sourcesContent":["import { fixture,html,expect } from \"@open-wc/testing\";\nimport './nile-empty-state';\nimport { NileEmptyState } from \"./nile-empty-state\";\n\ndescribe('NileEmptyState',()=>{\n it('renders correctly with default properties',async ()=>{\n const el=await fixture<NileEmptyState>(html`<nile-empty-state></nile-empty-state>`)\n expect(el.size).to.equal('md');\n expect(el.variant).to.equal('tonal');\n expect(el.icon).to.equal('error');\n expect(el.grayscale).to.be.false;\n expect(el.text).to.equal('Empty State');\n expect(el.subText).to.equal('No Data');\n })\n\n it('should reflect properties to attributes', async () => {\n const iconName=\"action\"\n const el = await fixture<NileEmptyState>(html`\n <nile-empty-state size=\"sm\" variant=\"flat\" icon=${iconName} grayscale text=\"Test state text\" sub-text=\"Test sub text\"></nile-empty-state>\n `);\n expect(el.getAttribute('size')).to.equal('sm');\n expect(el.getAttribute('variant')).to.equal('flat');\n expect(el.getAttribute('icon')).to.equal(iconName);\n expect(el.hasAttribute('grayscale')).to.be.true;\n expect(el.getAttribute('text')).to.equal('Test state text');\n expect(el.getAttribute('sub-text')).to.equal('Test sub text');\n });\n\n it('should render different sizes correctly', async () => {\n const sizes:Array<'sm' | 'md' | 'lg' >= ['sm', 'md', 'lg'];\n for (const size of sizes) {\n const el = await fixture<NileEmptyState>(html`<nile-empty-state size=\"${size}\"></nile-empty-state>`);\n const container = el.shadowRoot!.querySelector('.empty-state')!;\n expect(container.classList.contains(`empty-state--${size}`)).to.be.true;\n }\n });\n\n it('should render different variants correctly', async () => {\n const variants :Array<'flat' | 'content' | 'tonal' >= ['flat', 'content', 'tonal'];\n for (const variant of variants) {\n const el = await fixture<NileEmptyState>(html`<nile-empty-state variant=\"${variant}\"></nile-empty-state>`);\n const container = el.shadowRoot!.querySelector(`.empty-state__body--${variant}`)!;\n expect(container).to.exist;\n }\n });\n\n it('should render text properties correctly', async () => {\n const sampleText='Custom Text'\n const sampleSubText=\"Custom SubText\"\n const el = await fixture<NileEmptyState>(html`\n <nile-empty-state text=${sampleText} sub-text=${sampleSubText}></nile-empty-state>\n `);\n const textEl = el.shadowRoot!.querySelector('.empty-state__text')!;\n const subTextEl = el.shadowRoot!.querySelector('.empty-state__subtext')!;\n expect(textEl.textContent).to.equal(sampleText);\n expect(subTextEl.textContent).to.equal(sampleSubText);\n });\n\n it('should render slot content', async () => {\n const el = await fixture<NileEmptyState>(html`\n <nile-empty-state>\n <div class=\"slot-content\">Slot Content</div>\n </nile-empty-state>\n `);\n const slotContent = el.querySelector('.slot-content')!;\n expect(slotContent).to.exist;\n expect(slotContent.textContent).to.equal('Slot Content');\n });\n})"],"names":["iconName","describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","expect","el","size","to","equal","variant","icon","grayscale","be","text","subText","_context2","stop","_callee","_templateObject2","getAttribute","hasAttribute","true","_context3","_callee2","sizes","_i2","_i","_templateObject3","container","shadowRoot","querySelector","classList","contains","_context4","next","_callee3","variants","_i5","_i4","length","_context5","_templateObject4","exist","_callee4","sampleText","sampleSubText","_context6","_templateObject5","textEl","subTextEl","textContent","_callee5","_templateObject6","slotContent","_context7","_callee6"],"mappings":"kyBAkB4DA,oJAAAA,mBAAAA,UAAAA,oBAAAA,SAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,MAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,cAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,cAAAA,WAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,KAAAA,GAAAA,CAAAA,oBAAAA,MAAAA,CAAAA,MAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,eAAAA,CAAAA,CAAAA,CAAAA,CAAAA,aAAAA,oBAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,2BAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,MAAAA,CAAAA,cAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,KAAAA,CAAAA,CAAAA,CAAAA,UAAAA,IAAAA,YAAAA,IAAAA,QAAAA,MAAAA,CAAAA,CAAAA,CAAAA,OAAAA,MAAAA,eAAAA,CAAAA,EAAAA,MAAAA,UAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,aAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,SAAAA,YAAAA,SAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,M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EAAGmC,CAAAA,KAAAA,CACvBtC,CAAOiD,CAAAA,CAAAA,CAAYH,WAAa3C,CAAAA,CAAAA,EAAAA,CAAGC,KAAM,CAAA,cAAA,CAAe,yBAAA8C,SAAA,CAAAtC,IAAA,MAAAuC,QAAA,GACxD,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{f as t,a as e}from"../fixture-985bba12.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-empty-state.esm.js";import"tslib";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-empty-state.css.esm.js";import"../internal/nile-element.esm.js";import"lit/directives/if-defined.js";describe("NileEmptyState",(()=>{it("renders correctly with default properties",(async()=>{const i=await t(s`<nile-empty-state></nile-empty-state>`);e(i.size).to.equal("md"),e(i.variant).to.equal("tonal"),e(i.icon).to.equal("error"),e(i.grayscale).to.be.false,e(i.text).to.equal("Empty State"),e(i.subText).to.equal("No Data")})),it("should reflect properties to attributes",(async()=>{const i="action",a=await t(s`
|
|
2
|
-
<nile-empty-state size="sm" variant="flat" icon=${i} grayscale text="Test state text" sub-text="Test sub text"></nile-empty-state>
|
|
3
|
-
`);e(a.getAttribute("size")).to.equal("sm"),e(a.getAttribute("variant")).to.equal("flat"),e(a.getAttribute("icon")).to.equal(i),e(a.hasAttribute("grayscale")).to.be.true,e(a.getAttribute("text")).to.equal("Test state text"),e(a.getAttribute("sub-text")).to.equal("Test sub text")})),it("should render different sizes correctly",(async()=>{const i=["sm","md","lg"];for(const a of i){const i=(await t(s`<nile-empty-state size="${a}"></nile-empty-state>`)).shadowRoot.querySelector(".empty-state");e(i.classList.contains(`empty-state--${a}`)).to.be.true}})),it("should render different variants correctly",(async()=>{const i=["flat","content","tonal"];for(const a of i){const i=(await t(s`<nile-empty-state variant="${a}"></nile-empty-state>`)).shadowRoot.querySelector(`.empty-state__body--${a}`);e(i).to.exist}})),it("should render text properties correctly",(async()=>{const i="Custom Text",a="Custom SubText",o=await t(s`
|
|
4
|
-
<nile-empty-state text=${i} sub-text=${a}></nile-empty-state>
|
|
5
|
-
`),n=o.shadowRoot.querySelector(".empty-state__text"),r=o.shadowRoot.querySelector(".empty-state__subtext");e(n.textContent).to.equal(i),e(r.textContent).to.equal(a)})),it("should render slot content",(async()=>{const i=(await t(s`
|
|
6
|
-
<nile-empty-state>
|
|
7
|
-
<div class="slot-content">Slot Content</div>
|
|
8
|
-
</nile-empty-state>
|
|
9
|
-
`)).querySelector(".slot-content");e(i).to.exist,e(i.textContent).to.equal("Slot Content")}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-error-message.cjs.js","tslib","lit/decorators.js","./nile-error-message.css.cjs.js"],function(_export,_context){"use strict";var e,r,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){e=_fixture006CjsJs.f;r=_fixture006CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileErrorMessageCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileErrorMessageCssCjsJs){}],execute:function execute(){describe("NileErrorMessage",function(){it("should render the error message",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context2.sent.shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred");case 4:case"end":return _context2.stop();}},_callee);}))),it("should truncate the error response if it is too long",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var o,t;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o="a".repeat(150);_context3.next=3;return e(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context3.sent.getTruncatedResponse();r(t).to.equal("".concat(o.substring(0,100),"..."));case 5:case"end":return _context3.stop();}},_callee2);}))),it("should not truncate the error response if it is within the maximum length",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var o,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Short error message";_context4.next=3;return e(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context4.sent.getTruncatedResponse();r(t).to.equal(o);case 5:case"end":return _context4.stop();}},_callee3);}))),it("should toggle the expanded state when the button is clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot$querySe;var o,t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context5.sent;t=(_o$shadowRoot$querySe=o.shadowRoot.querySelector(".nile-error-message__more-button"))!==null&&_o$shadowRoot$querySe!==void 0?_o$shadowRoot$querySe:{};t.click(),r(o.isExpanded).to.be["true"],t.click(),r(o.isExpanded).to.be["false"];case 5:case"end":return _context5.stop();}},_callee4);}))),it('should display the "View More" button if there is extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context6.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist;case 4:case"end":return _context6.stop();}},_callee5);}))),it('should not display the "View More" button if there is no extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var o;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\"></nile-error-message>"]))));case 2:o=_context7.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist;case 4:case"end":return _context7.stop();}},_callee6);}))),it("should show the extended error information when expanded",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var o,t;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(s(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context8.sent;o.isExpanded=!0;_context8.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t===null||t===void 0?void 0:t.textContent).to.include("Detailed error information");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should hide the extended error information when collapsed",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var o,t;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(s(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context9.sent;o.isExpanded=!1;_context9.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have["class"]("collapsed");case 8:case"end":return _context9.stop();}},_callee8);}))),it("should render icon and error message parts",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var o,t,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(s(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context10.sent;t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;n=o.shadowRoot.querySelector(".nile-error-message__error");r(n).to.exist;case 7:case"end":return _context10.stop();}},_callee9);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-error-message.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-error-message.test.cjs.js","sources":["../../../src/nile-error-message/nile-error-message.test.ts"],"sourcesContent":["import { html, fixture, expect, oneEvent } from '@open-wc/testing';\nimport './nile-error-message';\nimport { NileErrorMessage } from './nile-error-message';\ndescribe('NileErrorMessage', () => {\n it('should render the error message', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>`);\n const errorMessage = el.shadowRoot!.querySelector('.nile-error-message__error');\n expect(errorMessage!.textContent).to.equal('An error occurred');\n });\n\n it('should truncate the error response if it is too long', async () => {\n const longErrorResponse = 'a'.repeat(150);\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"${longErrorResponse}\"></nile-error-message>`);\n const truncatedResponse = el.getTruncatedResponse();\n expect(truncatedResponse).to.equal(`${longErrorResponse.substring(0, 100)}...`);\n });\n\n it('should not truncate the error response if it is within the maximum length', async () => {\n const shortErrorResponse = 'Short error message';\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"${shortErrorResponse}\"></nile-error-message>`);\n const truncatedResponse = el.getTruncatedResponse();\n expect(truncatedResponse).to.equal(shortErrorResponse);\n });\n\n it('should toggle the expanded state when the button is clicked', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n const button :HTMLButtonElement = el.shadowRoot!.querySelector('.nile-error-message__more-button') ??{} as HTMLButtonElement;\n button.click();\n expect(el.isExpanded).to.be.true;\n button.click();\n expect(el.isExpanded).to.be.false;\n });\n\n it('should display the \"View More\" button if there is extended error information', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n const button = el.shadowRoot!.querySelector('.nile-error-message__more-button');\n expect(button).to.exist;\n });\n\n it('should not display the \"View More\" button if there is no extended error information', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\"></nile-error-message>`);\n const button = el.shadowRoot!.querySelector('.nile-error-message__more-button');\n expect(button).to.not.exist;\n });\n\n it('should show the extended error information when expanded', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n el.isExpanded = true;\n await el.updateComplete;\n const expandedResponse = el.shadowRoot!.querySelector('.nile-error-message__response-expanded');\n expect(expandedResponse?.textContent).to.include('Detailed error information');\n });\n\n it('should hide the extended error information when collapsed', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n el.isExpanded = false;\n await el.updateComplete;\n const expandedResponse = el.shadowRoot!.querySelector('.nile-error-message__response-expanded');\n expect(expandedResponse).to.have.class('collapsed');\n });\n\n it('should render icon and error message parts', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>`);\n const icon = el.shadowRoot!.querySelector('nile-icon');\n expect(icon).to.exist;\n const errorMessage = el.shadowRoot!.querySelector('.nile-error-message__error');\n expect(errorMessage).to.exist;\n });\n});"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","errorMessage","shadowRoot","querySelector","expect","textContent","to","equal","_context2","stop","_callee","_asyncToGenerator","_regeneratorRuntime","mark","longErrorResponse","repeat","truncatedResponse","_templateObject2","getTruncatedResponse","substring","_context3","_callee2","shortErrorResponse","_context4","next","_templateObject3","_callee3","_templateObject4","button","el","_o$shadowRoot$querySe","click","isExpanded","be","true","_context5","_callee4","_templateObject5","exist","_context6","_callee5","_templateObject6","not","_context7","_callee6","_templateObject7","_context8","updateComplete","expandedResponse","include","_callee7","_templateObject8","_context9","have","_callee8","_templateObject9","icon","_context10","_callee9"],"mappings":"quSAGAA,QAAS,CAAA,kBAAA,CAAoB,UAC3BC,CAAAA,EAAAA,CAAG,iCAAmCC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnBC,CAAAA,CAAAA,CAA0BC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,oFAAA,CAAA,QACzCC,CADWJ,CAA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A,CAAAA,EAAAA,CAAG,oHAA8CC,SAAAA,SAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,UAAAA,iBAAAA,UAAAA,CAAAA,IAAAA,CAAAA,UAAAA,CAAAA,IAAAA,SAAAA,UAAAA,CAAAA,IAAAA,SAC9BC,CAAAA,CAAAA,CAA0BC,CAAI,CAAAyD,gBAAA,GAAAA,gBAAA,CAAAvD,sBAAA,oFAAA,CAAA,QAAzC6B,CAAWhC,CAAAA,UAAAA,CAAAA,IAAAA,CACX2D,EAAO3B,CAAG3B,CAAAA,UAAAA,CAAYC,aAAc,CAAA,WAAA,CAAA,CAC1CC,CAAOoD,CAAAA,CAAAA,CAAAA,CAAMlD,GAAGgC,KAChB,CAAMrC,CAAe4B,CAAAA,CAAAA,CAAG3B,UAAYC,CAAAA,aAAAA,CAAc,8BAClDC,CAAOH,CAAAA,CAAAA,CAAAA,CAAcK,EAAGgC,CAAAA,KAAK,yBAAAmB,UAAA,CAAAhD,IAAA,MAAAiD,QAAA,GAC7B,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,a as r}from"../fixture-985bba12.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-error-message.esm.js";import"tslib";import"lit/decorators.js";import"./nile-error-message.css.esm.js";describe("NileErrorMessage",(()=>{it("should render the error message",(async()=>{const o=(await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred")})),it("should truncate the error response if it is too long",(async()=>{const o="a".repeat(150),t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(`${o.substring(0,100)}...`)})),it("should not truncate the error response if it is within the maximum length",(async()=>{const o="Short error message",t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(o)})),it("should toggle the expanded state when the button is clicked",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`),t=o.shadowRoot.querySelector(".nile-error-message__more-button")??{};t.click(),r(o.isExpanded).to.be.true,t.click(),r(o.isExpanded).to.be.false})),it('should display the "View More" button if there is extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist})),it('should not display the "View More" button if there is no extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist})),it("should show the extended error information when expanded",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!0,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t?.textContent).to.include("Detailed error information")})),it("should hide the extended error information when collapsed",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!1,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have.class("collapsed")})),it("should render icon and error message parts",(async()=>{const o=await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`),t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;const n=o.shadowRoot.querySelector(".nile-error-message__error");r(n).to.exist}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-file-preview.cjs.js","tslib","./nile-file-preview.css.cjs.js","../internal/nile-element.cjs.js","lit/decorators.js","./utils/nile-file-preview.util.cjs.js","./types/nile-file-preview.enums.cjs.js","./nile-file-preview.template.cjs.js"],function(_export,_context){"use strict";var e,i,t,s,_templateObject,_templateObject2;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){e=_fixture006CjsJs.f;i=_fixture006CjsJs.a;t=_fixture006CjsJs.h;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFilePreviewCjsJs){},function(_tslib){},function(_nileFilePreviewCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDecoratorsJs){},function(_utilsNileFilePreviewUtilCjsJs){},function(_typesNileFilePreviewEnumsCjsJs){},function(_nileFilePreviewTemplateCjsJs){}],execute:function execute(){describe("<nile-preview>",function(){var l;beforeEach(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-file-preview></nile-file-preview>"]))));case 2:l=_context2.sent;case 3:case"end":return _context2.stop();}},_callee);}))),it("passes accessibility test",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return i(l).to.be.accessible();case 2:case"end":return _context3.stop();}},_callee2);}))),it("renders with the correct tag name",function(){i(l.tagName.toLowerCase()).to.equal("nile-preview");}),it("renders with slot content when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _o$0$textContent;var r,n,o;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:r="Test Content";_context4.next=3;return e(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-file-preview>","</nile-file-preview>"])),r));case 3:l=_context4.sent;n=l.shadowRoot.querySelector("slot");t.exists(n,"Slot should exist");o=n.assignedNodes({flatten:!0});i(o.length).to.be.greaterThan(0),i((_o$0$textContent=o[0].textContent)===null||_o$0$textContent===void 0?void 0:_o$0$textContent.trim()).to.equal(r);case 8:case"end":return _context4.stop();}},_callee3);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-file-preview.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-file-preview.test.cjs.js","sources":["../../../src/nile-file-preview/nile-file-preview.test.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-preview'; // Just import to register the element\n\ndescribe('<nile-preview>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-preview></nile-file-preview>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-preview');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-preview>${testContent}</nile-file-preview>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"],"names":["describe","element","beforeEach","async","fixture","html","_templateObject","_taggedTemplateLiteral","it","_asyncToGenerator","_regeneratorRuntime","mark","expect","to","be","accessible","_context3","stop","_callee2","tagName","toLowerCase","equal","testContent","_context4","next","_templateObject2","slot","shadowRoot","querySelector","assert","exists","assignedNodes","flatten","length","greaterThan","textContent","trim","_callee3"],"mappings":"i8SAWAA,QAAS,CAAA,gBAAA,CAAkB,WACzB,GAAIC,CAAAA,CAAAA,CAEJC,kFAAWC,SAAAA,QAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACOC,CAAAA,EAAQC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,+CAAA,CAA0C,QAAtEN,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,yBAAAA,SAAAA,CAAAA,IAAAA,MAAAA,OAAAA,OAGFO,EAAG,CAAA,2BAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAA6BR,SAAAA,SAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACxBS,CAAAA,CAAOX,CAAAA,CAAAA,CAAAA,CAASY,GAAGC,EAAGC,CAAAA,UAAAA,CAAAA,CAAY,yBAAAC,SAAA,CAAAC,IAAA,MAAAC,QAAA,OAG1CV,EAAG,CAAA,mCAAA,CAAqC,WACtCI,CAAOX,CAAAA,CAAAA,CAAQkB,QAAQC,WAAeP,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAGQ,MAAM,cAAe,CAAA,EAAA,CAAA,CAGhEb,GAAG,yCAA2CL,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,SAAAA,MAAAA,gBAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SACtCmB,CAAc,CAAA,cAAA,CAAAC,SAAA,CAAAC,IAAA,SACJpB,CAAAA,CAAQC,CAAAA,CAAI,CAAAoB,gBAAA,GAAAA,gBAAA,CAAAlB,sBAAA,kDAAsBe,CAElD,CAAA,CAAA,QAFArB,iBAEMyB,EAAQzB,CAAQ0B,CAAAA,UAAAA,CAAYC,cAAc,MAChDC,CAAAA,CAAAA,CAAAA,CAAOC,OAAOJ,CAAM,CAAA,mBAAA,CAAA,CAEdK,CAAgBL,CAAAA,CAAAA,CAAKK,cAAc,CAAEC,OAAAA,CAAAA,CAAS,IACpDpB,CAAOmB,CAAAA,CAAAA,CAAcE,QAAQpB,EAAGC,CAAAA,EAAAA,CAAGoB,YAAY,CAC/CtB,CAAAA,CAAAA,CAAAA,EAAAA,gBAAAA,CAAOmB,EAAc,CAAGI,CAAAA,CAAAA,WAAAA,UAAAA,gBAAAA,iBAAjBJ,gBAAAA,CAA8BK,QAAQvB,EAAGQ,CAAAA,KAAAA,CAAMC,EAAY,yBAAAC,SAAA,CAAAN,IAAA,MAAAoB,QAAA,GAClE,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,a as i,h as t}from"../fixture-985bba12.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-file-preview.esm.js";import"tslib";import"./nile-file-preview.css.esm.js";import"../internal/nile-element.esm.js";import"lit/decorators.js";import"./utils/nile-file-preview.util.esm.js";import"./types/nile-file-preview.enums.esm.js";import"./nile-file-preview.template.esm.js";describe("<nile-preview>",(()=>{let l;beforeEach((async()=>{l=await e(s`<nile-file-preview></nile-file-preview>`)})),it("passes accessibility test",(async()=>{await i(l).to.be.accessible()})),it("renders with the correct tag name",(()=>{i(l.tagName.toLowerCase()).to.equal("nile-preview")})),it("renders with slot content when provided",(async()=>{const r="Test Content";l=await e(s`<nile-file-preview>${r}</nile-file-preview>`);const n=l.shadowRoot.querySelector("slot");t.exists(n,"Slot should exist");const m=n.assignedNodes({flatten:!0});i(m.length).to.be.greaterThan(0),i(m[0].textContent?.trim()).to.equal(r)}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-file-upload.cjs.js","tslib","./nile-file-upload.css.cjs.js","../internal/nile-element.cjs.js","./utils/drag-drop.util.cjs.js","./utils/file-validation.util.cjs.js","./types/file-upload.enums.cjs.js","lit/decorators.js","./nile-file-upload.template.cjs.js","../lit-html-9b3af046.cjs.js","../directive-7733ffce.cjs.js"],function(_export,_context){"use strict";var i,t,e,l,_templateObject,_templateObject2;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){i=_fixture006CjsJs.f;t=_fixture006CjsJs.a;e=_fixture006CjsJs.h;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFileUploadCjsJs){},function(_tslib){},function(_nileFileUploadCssCjsJs){},function(_internalNileElementCjsJs){},function(_utilsDragDropUtilCjsJs){},function(_utilsFileValidationUtilCjsJs){},function(_typesFileUploadEnumsCjsJs){},function(_litDecoratorsJs){},function(_nileFileUploadTemplateCjsJs){},function(_litHtml003CjsJs){},function(_directive004CjsJs){}],execute:function execute(){describe("<nile-file-upload>",function(){var s;beforeEach(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return i(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-file-upload></nile-file-upload>"]))));case 2:s=_context2.sent;case 3:case"end":return _context2.stop();}},_callee);}))),it("passes accessibility test",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(s).to.be.accessible();case 2:case"end":return _context3.stop();}},_callee2);}))),it("renders with the correct tag name",function(){t(s.tagName.toLowerCase()).to.equal("nile-file-upload");}),it("renders with slot content when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _a$0$textContent;var o,r,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Test Content";_context4.next=3;return i(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-file-upload>","</nile-file-upload>"])),o));case 3:s=_context4.sent;r=s.shadowRoot.querySelector("slot");e.exists(r,"Slot should exist");a=r.assignedNodes({flatten:!0});t(a.length).to.be.greaterThan(0),t((_a$0$textContent=a[0].textContent)===null||_a$0$textContent===void 0?void 0:_a$0$textContent.trim()).to.equal(o);case 8:case"end":return _context4.stop();}},_callee3);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-file-upload.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-file-upload.test.cjs.js","sources":["../../../src/nile-file-upload/nile-file-upload.test.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-upload'; // Just import to register the element\n\ndescribe('<nile-file-upload>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-upload></nile-file-upload>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-upload>${testContent}</nile-file-upload>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"],"names":["describe","element","beforeEach","async","fixture","html","_templateObject","_taggedTemplateLiteral","it","_asyncToGenerator","_regeneratorRuntime","mark","expect","to","be","accessible","_context3","stop","_callee2","tagName","toLowerCase","equal","testContent","_templateObject2","slot","shadowRoot","querySelector","assert","exists","assignedNodes","flatten","length","greaterThan","textContent","trim","_context4","_callee3"],"mappings":"0mTAWAA,QAAS,CAAA,oBAAA,CAAsB,WAC7B,GAAIC,CAAAA,CAAAA,CAEJC,kFAAWC,SAAAA,QAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACOC,CAAAA,EAAQC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6CAAA,CAAwC,QAApEN,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,yBAAAA,SAAAA,C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,CAAA,CAAA,CAC/CpB,oBAAOiB,CAAc,CAAA,CAAA,CAAA,CAAGI,sDAAjBJ,gBAAAA,CAA8BK,IAAQrB,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAGQ,KAAMC,CAAAA,CAAAA,CAAY,yBAAAa,SAAA,CAAAlB,IAAA,MAAAmB,QAAA,GAClE,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as i,a as t,h as e}from"../fixture-985bba12.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-file-upload.esm.js";import"tslib";import"./nile-file-upload.css.esm.js";import"../internal/nile-element.esm.js";import"./utils/drag-drop.util.esm.js";import"./utils/file-validation.util.esm.js";import"./types/file-upload.enums.esm.js";import"lit/decorators.js";import"./nile-file-upload.template.esm.js";import"../lit-html-39a6718c.esm.js";import"../directive-ee0c609c.esm.js";describe("<nile-file-upload>",(()=>{let s;beforeEach((async()=>{s=await i(l`<nile-file-upload></nile-file-upload>`)})),it("passes accessibility test",(async()=>{await t(s).to.be.accessible()})),it("renders with the correct tag name",(()=>{t(s.tagName.toLowerCase()).to.equal("nile-file-upload")})),it("renders with slot content when provided",(async()=>{const o="Test Content";s=await i(l`<nile-file-upload>${o}</nile-file-upload>`);const r=s.shadowRoot.querySelector("slot");e.exists(r,"Slot should exist");const m=r.assignedNodes({flatten:!0});t(m.length).to.be.greaterThan(0),t(m[0].textContent?.trim()).to.equal(o)}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-filter-chip.cjs.js","tslib","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,i,l,t,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){e=_fixture006CjsJs.f;i=_fixture006CjsJs.a;l=_fixture006CjsJs.o;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFilterChipCjsJs){a=_nileFilterChipCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nileFilterChipCssCjsJs){}],execute:function execute(){describe("<nile-filter-chip>",function(){afterEach(function(){a.activeChips=[];}),it("registers and unregisters itself in activeChips",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context2.sent;i(a.activeChips).to.include(l);l.remove();_context2.next=7;return l.updateComplete;case 7:i(a.activeChips).to.not.include(l);case 8:case"end":return _context2.stop();}},_callee);}))),it("renders fallback label and value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var l,a,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"MyLabel\" value=\"MyText\"></nile-filter-chip>\n "]))));case 2:l=_context3.sent;a=l.shadowRoot.querySelector(".label");n=l.shadowRoot.querySelector(".value");i(a.textContent).to.equal("MyLabel:"),i(n.textContent.trim()).to.equal("MyText");case 6:case"end":return _context3.stop();}},_callee2);}))),it("renders slotted label and value over fallback",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var l,a,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n "]))));case 2:l=_context4.sent;a=l.querySelector('[slot="label"]');n=l.querySelector('[slot="value"]');i(a.textContent).to.equal("SLOT-LBL"),i(n.textContent).to.equal("SLOT-VAL");case 6:case"end":return _context4.stop();}},_callee3);}))),it("renders an icon when the `icon` property is set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var l;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-filter-chip icon=\"\u2605\" label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context5.sent.shadowRoot.querySelector(".icon");i(l).to.exist,i(l.textContent).to.equal("★");case 4:case"end":return _context5.stop();}},_callee4);}))),it("does not render a badge when viewMoreCount is zero",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var l;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context6.sent;i(l.shadowRoot.querySelector("nile-badge")).to.be["null"];case 4:case"end":return _context6.stop();}},_callee5);}))),it("renders a +badge when viewMoreCount > 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var l;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context7.sent.shadowRoot.querySelector("nile-badge");i(l).to.exist,i(l.textContent).to.contain("+5");case 4:case"end":return _context7.stop();}},_callee6);}))),it("dispatches `nile-click` on chip click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var a,n,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:a=_context8.sent;n=a.shadowRoot.querySelector(".chip");setTimeout(function(){return n.click();});_context8.next=7;return l(a,"nile-click");case 7:s=_context8.sent;i(s.detail).to.deep.equal({value:"T",viewMoreCount:0});case 9:case"end":return _context8.stop();}},_callee7);}))),it("dispatches `nile-close` on close icon click and removes itself",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var a,n,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-filter-chip closable viewMoreCount=\"2\" value=\"TT\"></nile-filter-chip>\n "]))));case 2:a=_context9.sent;n=a.shadowRoot.querySelector(".close-icon");setTimeout(function(){return n.click();});_context9.next=7;return l(a,"nile-close");case 7:s=_context9.sent;i(s.detail).to.deep.equal({value:"TT",viewMoreCount:2}),i(document.body.contains(a)).to.be["false"];case 9:case"end":return _context9.stop();}},_callee8);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-filter-chip.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-filter-chip.test.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.test.ts"],"sourcesContent":["import { fixture, expect, html, oneEvent } from '@open-wc/testing';\nimport './nile-filter-chip';\nimport { NileFilterChip } from './nile-filter-chip';\n\ndescribe('<nile-filter-chip>', () => {\n afterEach(() => {\n (NileFilterChip as any).activeChips = [];\n });\n\n it('registers and unregisters itself in activeChips', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n expect((NileFilterChip as any).activeChips).to.include(el);\n el.remove();\n await el.updateComplete;\n expect((NileFilterChip as any).activeChips).to.not.include(el);\n });\n\n it('renders fallback label and value', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"MyLabel\" value=\"MyText\"></nile-filter-chip>\n `);\n const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;\n const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;\n expect(label.textContent).to.equal('MyLabel:');\n expect(value.textContent!.trim()).to.equal('MyText');\n });\n\n it('renders slotted label and value over fallback', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n `);\n const slottedLabel = el.querySelector('[slot=\"label\"]')! as HTMLElement;\n const slottedValue = el.querySelector('[slot=\"value\"]')! as HTMLElement;\n expect(slottedLabel.textContent).to.equal('SLOT-LBL');\n expect(slottedValue.textContent).to.equal('SLOT-VAL');\n });\n\n it('renders an icon when the `icon` property is set', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip icon=\"★\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;\n expect(iconSpan).to.exist;\n expect(iconSpan.textContent).to.equal('★');\n });\n\n it('does not render a badge when viewMoreCount is zero', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;\n });\n\n it('renders a +badge when viewMoreCount > 0', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;\n expect(badge).to.exist;\n expect(badge.textContent).to.contain('+5');\n });\n\n\n\n it('dispatches `nile-click` on chip click', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;\n setTimeout(() => chip.click());\n const ev = await oneEvent(el, 'nile-click');\n expect(ev.detail).to.deep.equal({ value: 'T', viewMoreCount: 0 });\n });\n\n it('dispatches `nile-close` on close icon click and removes itself', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip closable viewMoreCount=\"2\" value=\"TT\"></nile-filter-chip>\n `);\n const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;\n setTimeout(() => closeIcon.click());\n const ev = await oneEvent(el, 'nile-close');\n expect(ev.detail).to.deep.equal({ value: 'TT', viewMoreCount: 2 });\n expect(document.body.contains(el)).to.be.false;\n });\n\n \n});\n"],"names":["describe","afterEach","NileFilterChip","activeChips","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","to","include","remove","updateComplete","not","_context2","stop","_callee","_templateObject2","label","shadowRoot","querySelector","value","textContent","equal","trim","_context3","_callee2","_templateObject3","slottedLabel","slottedValue","_context4","_callee3","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject4","iconSpan","exist","_context5","_callee4","_templateObject5","be","null","_context6","_callee5","_templateObject6","badge","contain","_context7","_callee6","_templateObject7","chip","setTimeout","click","_context8","next","oneEvent","ev","detail","deep","viewMoreCount","_callee7","_templateObject8","closeIcon","_context9","document","body","contains","_callee8"],"mappings":"s0SAIAA,QAAS,CAAA,oBAAA,CAAsB,UAC7BC,CAAAA,SAAAA,CAAU,UACPC,CAAAA,CAAAA,CAAuBC,WAAc,CAAA,EAAE,EAG1CC,CAAAA,CAAAA,EAAAA,CAAG,iDAAmDC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnCC,CAAAA,EAAwBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,4FAAvCC,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CAGNC,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGC,CAAAA,OAAAA,CAAQH,GACvDA,CAAGI,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SACGJ,CAAAA,CAAGK,CAAAA,cAAAA,QACTJ,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGI,CAAAA,GAAAA,CAAIH,OAAQH,CAAAA,CAAAA,CAAG,yBAAAO,SAAA,CAAAC,IAAA,MAAAC,OAAA,GAGhEf,EAAAA,CAAAA,CAAAA,EAAAA,CAAG,0GAAoCC,SAAAA,SAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,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A,IAAA,CAAMuC,cAAe,CAC9DpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAOyD,QAASC,CAAAA,IAAAA,CAAKC,QAAS5D,CAAAA,CAAAA,CAAAA,CAAAA,CAAKE,EAAGgC,CAAAA,EAAAA,SAAQ,yBAAAuB,SAAA,CAAAjD,IAAA,MAAAqD,QAAA,GAC9C,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{f as e,a as i,o as l}from"../fixture-985bba12.esm.js";import{html as t}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as a}from"./nile-filter-chip.esm.js";import"tslib";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"./nile-filter-chip.css.esm.js";describe("<nile-filter-chip>",(()=>{afterEach((()=>{a.activeChips=[]})),it("registers and unregisters itself in activeChips",(async()=>{const l=await e(t`
|
|
2
|
-
<nile-filter-chip label="L" value="T"></nile-filter-chip>
|
|
3
|
-
`);i(a.activeChips).to.include(l),l.remove(),await l.updateComplete,i(a.activeChips).to.not.include(l)})),it("renders fallback label and value",(async()=>{const l=await e(t`
|
|
4
|
-
<nile-filter-chip label="MyLabel" value="MyText"></nile-filter-chip>
|
|
5
|
-
`),a=l.shadowRoot.querySelector(".label"),n=l.shadowRoot.querySelector(".value");i(a.textContent).to.equal("MyLabel:"),i(n.textContent.trim()).to.equal("MyText")})),it("renders slotted label and value over fallback",(async()=>{const l=await e(t`
|
|
6
|
-
<nile-filter-chip>
|
|
7
|
-
<span slot="label">SLOT-LBL</span>
|
|
8
|
-
<span slot="value">SLOT-VAL</span>
|
|
9
|
-
</nile-filter-chip>
|
|
10
|
-
`),a=l.querySelector('[slot="label"]'),n=l.querySelector('[slot="value"]');i(a.textContent).to.equal("SLOT-LBL"),i(n.textContent).to.equal("SLOT-VAL")})),it("renders an icon when the `icon` property is set",(async()=>{const l=(await e(t`
|
|
11
|
-
<nile-filter-chip icon="★" label="L" value="T"></nile-filter-chip>
|
|
12
|
-
`)).shadowRoot.querySelector(".icon");i(l).to.exist,i(l.textContent).to.equal("★")})),it("does not render a badge when viewMoreCount is zero",(async()=>{const l=await e(t`
|
|
13
|
-
<nile-filter-chip viewMoreCount="0" label="L" value="T"></nile-filter-chip>
|
|
14
|
-
`);i(l.shadowRoot.querySelector("nile-badge")).to.be.null})),it("renders a +badge when viewMoreCount > 0",(async()=>{const l=(await e(t`
|
|
15
|
-
<nile-filter-chip viewMoreCount="5" label="L" value="T"></nile-filter-chip>
|
|
16
|
-
`)).shadowRoot.querySelector("nile-badge");i(l).to.exist,i(l.textContent).to.contain("+5")})),it("dispatches `nile-click` on chip click",(async()=>{const a=await e(t`
|
|
17
|
-
<nile-filter-chip label="L" value="T"></nile-filter-chip>
|
|
18
|
-
`),n=a.shadowRoot.querySelector(".chip");setTimeout((()=>n.click()));const s=await l(a,"nile-click");i(s.detail).to.deep.equal({value:"T",viewMoreCount:0})})),it("dispatches `nile-close` on close icon click and removes itself",(async()=>{const a=await e(t`
|
|
19
|
-
<nile-filter-chip closable viewMoreCount="2" value="TT"></nile-filter-chip>
|
|
20
|
-
`),n=a.shadowRoot.querySelector(".close-icon");setTimeout((()=>n.click()));const s=await l(a,"nile-close");i(s.detail).to.deep.equal({value:"TT",viewMoreCount:2}),i(document.body.contains(a)).to.be.false}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-group.cjs.js","tslib","lit/decorators.js","./nile-form-group.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){t=_fixture006CjsJs.f;e=_fixture006CjsJs.a;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormGroupCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileFormGroupCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileFormGroup",function(){it("should have default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context2.sent;e(l.title).to.equal(""),e(l.subtitle).to.equal("");case 4:case"end":return _context2.stop();}},_callee);}))),it("should render title when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _l$textContent;var l;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\"></nile-form-group>"]))));case 2:l=_context3.sent.shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent=l.textContent)===null||_l$textContent===void 0?void 0:_l$textContent.trim()).to.equal("Test Title");case 4:case"end":return _context3.stop();}},_callee2);}))),it("should render subtitle when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _l$textContent2;var l;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context4.sent.shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent2=l.textContent)===null||_l$textContent2===void 0?void 0:_l$textContent2.trim()).to.equal("Test Subtitle");case 4:case"end":return _context4.stop();}},_callee3);}))),it("should not render title and subtitle if not set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var l,o,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context5.sent;o=l.shadowRoot.querySelector('slot[name="title"]');s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist;case 6:case"end":return _context5.stop();}},_callee4);}))),it("should render content inside the form body slot",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _l$assignedNodes;var l,o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-group><p>Form Content</p></nile-form-group>"]))));case 2:l=_context6.sent.shadowRoot.querySelector(".form__body slot");o=(_l$assignedNodes=l===null||l===void 0?void 0:l.assignedNodes())!==null&&_l$assignedNodes!==void 0?_l$assignedNodes:[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content");case 5:case"end":return _context6.stop();}},_callee5);}))),it("should reflect title and subtitle attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var l;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context7.sent;e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle");case 4:case"end":return _context7.stop();}},_callee6);}))),it("should update the title dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _l$shadowRoot$querySe;var l,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-group title=\"Initial Title\"></nile-form-group>"]))));case 2:l=_context8.sent;l.title="Updated Title";_context8.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe=l.shadowRoot.querySelector('slot[name="title"]'))!==null&&_l$shadowRoot$querySe!==void 0?_l$shadowRoot$querySe:{};e(o.textContent.trim()).to.equal("Updated Title");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should update the subtitle dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _l$shadowRoot$querySe2;var l,o;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Initial Subtitle\"></nile-form-group>"]))));case 2:l=_context9.sent;l.subtitle="Updated Subtitle";_context9.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe2=l.shadowRoot.querySelector('slot[name="subtitle"]'))!==null&&_l$shadowRoot$querySe2!==void 0?_l$shadowRoot$querySe2:{};e(o.textContent.trim()).to.equal("Updated Subtitle");case 8:case"end":return _context9.stop();}},_callee8);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-form-group.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-form-group.test.cjs.js","sources":["../../../src/nile-form-group/nile-form-group.test.ts"],"sourcesContent":["import { fixture, html, expect } from '@open-wc/testing';\nimport './nile-form-group'; // Make sure to import the component to be tested\nimport NileFormGroup from './nile-form-group';\n\ndescribe('NileFormGroup', () => {\n it('should have default properties', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group></nile-form-group>`);\n expect(el.title).to.equal('');\n expect(el.subtitle).to.equal('');\n });\n\n it('should render title when set', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\"></nile-form-group>`);\n const titleSlot = el.shadowRoot!.querySelector('slot[name=\"title\"]');\n expect(titleSlot).to.exist;\n expect(titleSlot?.textContent?.trim()).to.equal('Test Title');\n });\n\n it('should render subtitle when set', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>`);\n const subtitleSlot = el.shadowRoot!.querySelector('slot[name=\"subtitle\"]');\n expect(subtitleSlot).to.exist;\n expect(subtitleSlot?.textContent?.trim()).to.equal('Test Subtitle');\n });\n\n it('should not render title and subtitle if not set', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group></nile-form-group>`);\n const titleSlot = el.shadowRoot!.querySelector('slot[name=\"title\"]');\n const subtitleSlot = el.shadowRoot!.querySelector('slot[name=\"subtitle\"]');\n expect(titleSlot).to.not.exist;\n expect(subtitleSlot).to.not.exist;\n });\n\n it('should render content inside the form body slot', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group><p>Form Content</p></nile-form-group>`);\n const bodySlot = el.shadowRoot!.querySelector<HTMLSlotElement>('.form__body slot');\n const assignedNodes = bodySlot?.assignedNodes() ?? [] as any;\n expect(assignedNodes.length).to.equal(1);\n expect(assignedNodes[0].textContent.trim()).to.equal('Form Content');\n });\n\n it('should reflect title and subtitle attributes', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>`);\n expect(el.getAttribute('title')).to.equal('Test Title');\n expect(el.getAttribute('subtitle')).to.equal('Test Subtitle');\n });\n\n it('should update the title dynamically', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Initial Title\"></nile-form-group>`);\n el.title = 'Updated Title';\n await el.updateComplete;\n const titleSlot = el.shadowRoot!.querySelector('slot[name=\"title\"]')?? {} as any;\n expect(titleSlot.textContent.trim()).to.equal('Updated Title');\n });\n\n it('should update the subtitle dynamically', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\" subtitle=\"Initial Subtitle\"></nile-form-group>`);\n el.subtitle = 'Updated Subtitle';\n await el.updateComplete;\n const subtitleSlot = el.shadowRoot!.querySelector('slot[name=\"subtitle\"]') ?? {} as any;\n expect(subtitleSlot.textContent.trim()).to.equal('Updated Subtitle');\n });\n});\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","title","to","equal","subtitle","_context2","stop","_callee","_templateObject2","titleSlot","shadowRoot","querySelector","exist","textContent","trim","_context3","_callee2","_templateObject3","subtitleSlot","_context4","_callee3","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject4","not","_context5","_callee4","_templateObject5","bodySlot","assignedNodes","length","_context6","_callee5","_templateObject6","getAttribute","_context7","_callee6","_templateObject7","updateComplete","_l$shadowRoot$querySe","_context8","_callee7","_templateObject8","_context9","next","_l$shadowRoot$querySe2","_callee8"],"mappings":"gxSAIAA,QAAS,CAAA,eAAA,CAAiB,UACxBC,CAAAA,EAAAA,CAAG,gCAAkCC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAA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AAAA,EAAAA,CAAG,gHAA0CC,SAAAA,SAAAA,MAAAA,sBAAAA,KAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SAC1BC,CAAAA,CAAAA,CAAuBC,CAAI,CAAA+C,gBAAA,GAAAA,gBAAA,CAAA7C,sBAAA,8FAAA,CAAA,QAAtCC,CAAWJ,CAAAA,SAAAA,CAAAA,IAAAA,CACjBI,EAAGK,QAAW,CAAA,kBAAA,CAAAwC,SAAA,CAAAC,IAAA,SACR9C,CAAAA,CAAGwC,CAAAA,cAAAA,QACHrB,CAAAA,EAAAA,sBAAAA,CAAenB,EAAGW,UAAYC,CAAAA,aAAAA,CAAc,uBAA4B,CAAA,UAAAmC,sBAAA,UAAAA,sBAAA,CAAA,EAC9E9C,CAAAA,CAAAA,CAAOkB,CAAaL,CAAAA,WAAAA,CAAYC,IAAQZ,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAGC,KAAM,CAAA,kBAAA,CAAmB,yBAAAyC,SAAA,CAAAtC,IAAA,MAAAyC,QAAA,GACpE,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as t,a as e}from"../fixture-985bba12.esm.js";import{html as i}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-form-group.esm.js";import"tslib";import"lit/decorators.js";import"./nile-form-group.css.esm.js";import"../internal/nile-element.esm.js";describe("NileFormGroup",(()=>{it("should have default properties",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`);e(l.title).to.equal(""),e(l.subtitle).to.equal("")})),it("should render title when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title"></nile-form-group>`)).shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Title")})),it("should render subtitle when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`)).shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Subtitle")})),it("should not render title and subtitle if not set",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`),o=l.shadowRoot.querySelector('slot[name="title"]'),s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist})),it("should render content inside the form body slot",(async()=>{const l=(await t(i`<nile-form-group><p>Form Content</p></nile-form-group>`)).shadowRoot.querySelector(".form__body slot"),o=l?.assignedNodes()??[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content")})),it("should reflect title and subtitle attributes",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`);e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle")})),it("should update the title dynamically",(async()=>{const l=await t(i`<nile-form-group title="Initial Title"></nile-form-group>`);l.title="Updated Title",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="title"]')??{};e(o.textContent.trim()).to.equal("Updated Title")})),it("should update the subtitle dynamically",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Initial Subtitle"></nile-form-group>`);l.subtitle="Updated Subtitle",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="subtitle"]')??{};e(o.textContent.trim()).to.equal("Updated Subtitle")}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-help-text.cjs.js","tslib","lit/decorators.js","./nile-form-help-text.css.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,l,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){t=_fixture006CjsJs.f;e=_fixture006CjsJs.a;i=_fixture006CjsJs.e;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormHelpTextCjsJs){o=_nileFormHelpTextCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileFormHelpTextCssCjsJs){},function(_litDirectivesClassMapJs){}],execute:function execute(){describe("NileFormHelpText",function(){it("should render with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$textContent;var i,s;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-help-text>This is a short text</nile-form-help-text>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(o),e(i.isExpanded).to.be["false"];s=i===null||i===void 0||(_i$textContent=i.textContent)===null||_i$textContent===void 0?void 0:_i$textContent.trim();e(s).to.equal("This is a short text");case 6:case"end":return _context2.stop();}},_callee);}))),it('should not show "View More" button if the text fits within the container',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _o$shadowRoot;var o,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-help-text>This is a short text</nile-form-help-text>"]))));case 2:o=_context3.sent;_context3.next=5;return i(o);case 5:s=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector(".nile-form-help-text__more-button");e(s).to.be["null"],e(o.showButton).to.be["false"];case 7:case"end":return _context3.stop();}},_callee2);}))),it('should show "View More" button if the text overflows the container',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _o$shadowRoot2,_o$shadowRoot3;var o,s,h;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context4.sent;s=(_o$shadowRoot2=o.shadowRoot)===null||_o$shadowRoot2===void 0?void 0:_o$shadowRoot2.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context4.next=9;return i(o);case 9:h=(_o$shadowRoot3=o.shadowRoot)===null||_o$shadowRoot3===void 0?void 0:_o$shadowRoot3.querySelector(".nile-form-help-text__more-button");e(h).to.exist,e(o.showButton).to.be["true"];case 11:case"end":return _context4.stop();}},_callee3);}))),it('should expand to show full text when "View More" is clicked',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot4,_o$shadowRoot5;var o,s,h;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context5.sent;s=(_o$shadowRoot4=o.shadowRoot)===null||_o$shadowRoot4===void 0?void 0:_o$shadowRoot4.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context5.next=9;return i(o);case 9:h=(_o$shadowRoot5=o.shadowRoot)===null||_o$shadowRoot5===void 0?void 0:_o$shadowRoot5.querySelector(".nile-form-help-text__more-button");h!==null&&h!==void 0&&h.click();_context5.next=13;return i(o);case 13:e(o.isExpanded).to.be["true"];e(s).to.have["class"]("help__text__full--expanded");e(h===null||h===void 0?void 0:h.textContent).to.include("View Less");case 16:case"end":return _context5.stop();}},_callee4);}))),it('should collapse back to truncated text when "View Less" is clicked',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _o$shadowRoot6,_o$shadowRoot7;var o,s,h;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context6.sent;s=(_o$shadowRoot6=o.shadowRoot)===null||_o$shadowRoot6===void 0?void 0:_o$shadowRoot6.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context6.next=9;return i(o);case 9:h=(_o$shadowRoot7=o.shadowRoot)===null||_o$shadowRoot7===void 0?void 0:_o$shadowRoot7.querySelector(".nile-form-help-text__more-button");h!==null&&h!==void 0&&h.click();_context6.next=13;return i(o);case 13:h!==null&&h!==void 0&&h.click();_context6.next=16;return i(o);case 16:e(o.isExpanded).to.be["false"];e(s).not.to.have["class"]("help__text__full--expanded");e(h===null||h===void 0?void 0:h.textContent).to.include("View More");case 19:case"end":return _context6.stop();}},_callee5);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-form-help-text.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-form-help-text.test.cjs.js","sources":["../../../src/nile-form-help-text/nile-form-help-text.test.ts"],"sourcesContent":["import { fixture, expect, html, elementUpdated } from '@open-wc/testing';\nimport './nile-form-help-text';\nimport { NileFormHelpText } from './nile-form-help-text';\n\nconst wait = (ms: number = 50000) => new Promise(resolve => setTimeout(resolve, ms))\n\n\ndescribe('NileFormHelpText', () => {\n it('should render with default properties', async () => {\n const el = await fixture<NileFormHelpText>(html`<nile-form-help-text>This is a short text</nile-form-help-text>`);\n expect(el).to.be.instanceOf(NileFormHelpText);\n expect(el.isExpanded).to.be.false;\n\n // Check if text content matches\n const textContent = el?.textContent?.trim();\n expect(textContent).to.equal('This is a short text');\n });\n\n it('should not show \"View More\" button if the text fits within the container', async () => {\n const el = await fixture<NileFormHelpText>(html`<nile-form-help-text>This is a short text</nile-form-help-text>`);\n await elementUpdated(el);\n\n const moreButton = el.shadowRoot?.querySelector('.nile-form-help-text__more-button');\n expect(moreButton).to.be.null;\n expect(el.showButton).to.be.false;\n });\n\n it('should show \"View More\" button if the text overflows the container', async () => {\n const longText = 'This is a very long help text that exceeds the container width and should show a \"View More\" button.';\n const el = await fixture<NileFormHelpText>(html`<nile-form-help-text>${longText}</nile-form-help-text>`);\n \n // Simulate overflow\n const textContainer = el.shadowRoot?.querySelector('.help__text__full') as HTMLSpanElement;\n Object.defineProperty(textContainer, 'scrollWidth', { value: 300 });\n Object.defineProperty(textContainer, 'clientWidth', { value: 200 });\n el.decideToToggleShowButton();\n await elementUpdated(el);\n\n const moreButton = el.shadowRoot?.querySelector('.nile-form-help-text__more-button');\n expect(moreButton).to.exist;\n expect(el.showButton).to.be.true;\n });\n\n it('should expand to show full text when \"View More\" is clicked', async () => {\n const longText = 'This is a very long help text that exceeds the container width and should show a \"View More\" button.';\n const el = await fixture<NileFormHelpText>(html`<nile-form-help-text>${longText}</nile-form-help-text>`);\n\n // Simulate overflow\n const textContainer = el.shadowRoot?.querySelector('.help__text__full') as HTMLSpanElement;\n Object.defineProperty(textContainer, 'scrollWidth', { value: 300 });\n Object.defineProperty(textContainer, 'clientWidth', { value: 200 });\n el.decideToToggleShowButton();\n await elementUpdated(el);\n\n // Click \"View More\"\n const moreButton = el.shadowRoot?.querySelector<HTMLElement>('.nile-form-help-text__more-button');\n moreButton?.click();\n await elementUpdated(el);\n\n expect(el.isExpanded).to.be.true;\n expect(textContainer).to.have.class('help__text__full--expanded');\n expect(moreButton?.textContent).to.include('View Less');\n });\n\n it('should collapse back to truncated text when \"View Less\" is clicked', async () => {\n const longText = 'This is a very long help text that exceeds the container width and should show a \"View More\" button.';\n const el = await fixture<NileFormHelpText>(html`<nile-form-help-text>${longText}</nile-form-help-text>`);\n\n // Simulate overflow\n const textContainer = el.shadowRoot?.querySelector('.help__text__full') as HTMLSpanElement;\n Object.defineProperty(textContainer, 'scrollWidth', { value: 300 });\n Object.defineProperty(textContainer, 'clientWidth', { value: 200 });\n el.decideToToggleShowButton();\n await elementUpdated(el);\n\n // Expand and then collapse\n const moreButton = el.shadowRoot?.querySelector<HTMLElement>('.nile-form-help-text__more-button');\n moreButton?.click();\n await elementUpdated(el);\n\n moreButton?.click(); // Collapse\n await elementUpdated(el);\n\n expect(el.isExpanded).to.be.false;\n expect(textContainer).not.to.have.class('help__text__full--expanded');\n expect(moreButton?.textContent).to.include('View More');\n });\n\n // it('should dynamically adjust \"View More\" visibility on text change', async () => {\n // const el = await fixture<NileFormHelpText>(html`<nile-form-help-text>Initial text</nile-form-help-text>`);\n // await elementUpdated(el);\n\n // const textContainer = el.shadowRoot?.querySelector('.help__text__full') as HTMLSpanElement;\n // Object.defineProperty(textContainer, 'scrollWidth', { value: 300 });\n // Object.defineProperty(textContainer, 'clientWidth', { value: 200 });\n // el.decideToToggleShowButton();\n // await elementUpdated(el);\n\n // expect(el.showButton).to.be.true;\n\n // // Change slot content to short text\n // textContainer.textContent = 'Short text';\n // Object.defineProperty(textContainer, 'scrollWidth', { value: 100 });\n // Object.defineProperty(textContainer, 'clientWidth', { value: 200 });\n // el.decideToToggleShowButton();\n // await elementUpdated(el);\n\n // expect(el.showButton).to.be.false;\n // });\n});\n"],"names":["describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","to","be","instanceOf","NileFormHelpText","isExpanded","false","textContent","trim","equal","_context2","stop","_callee","_templateObject2","elementUpdated","moreButton","shadowRoot","querySelector","null","showButton","_context3","_callee2","_templateObject3","textContainer","Object","defineProperty","value","decideToToggleShowButton","exist","_context4","_callee3","_templateObject4","click","true","have","include","_context5","_callee4","_templateObject5","not","_context6","_callee5"],"mappings":"0xSAOAA,QAAAA,CAAS,kBAAoB,CAAA,UAAA,CAC3BC,EAAG,CAAA,uCAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAAyCC,SAAAA,QAAAA,MAAAA,cAAAA,KAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACzBC,CAAAA,CAAAA,CAA0BC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uEAAA,CAAA,QAAzCC,CAAWJ,CAAAA,SAAAA,CAAAA,IAAAA,CACjBK,CAAOD,CAAAA,CAAAA,CAAAA,CAAIE,EAAGC,CAAAA,EAAAA,CAAGC,UAAWC,CAAAA,CAAAA,CAAAA,CAC5BJ,CAAOD,CAAAA,CAAAA,CAAGM,UAAYJ,CAAAA,CAAAA,EAAAA,CAAGC,EAAGI,SAAAA,CAGtBC,CAAAA,CAAcR,CAAIQ,SAAJR,CAAIQ,YAAAA,cAAAA,CAAJR,CAAIQ,CAAAA,WAAAA,UAAAA,cAAAA,iBAAJR,cAAAA,CAAiBS,IACrCR,CAAAA,CAAAA,CAAAA,CAAAA,CAAOO,CAAaN,CAAAA,CAAAA,EAAAA,CAAGQ,KAAM,C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AAAA,SAAAA,CAAAA,SAAAA,CAAAA,WAAAA,CAAAA,CAAYiB,KACNlB,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,UAAAA,CAAAA,CAAAA,CAAef,CAErBC,CAAAA,SAAAA,CAAAA,CAAOD,CAAGM,CAAAA,UAAAA,CAAAA,CAAYJ,EAAGC,CAAAA,EAAAA,SACzBF,CAAAA,CAAAA,CAAOuB,CAAegB,CAAAA,CAAAA,GAAAA,CAAItC,EAAGiC,CAAAA,IAAAA,SAAW,CAAA,4BAAA,CAAA,CACxClC,CAAOe,CAAAA,CAAAA,SAAAA,CAAAA,iBAAAA,CAAAA,CAAYR,WAAaN,CAAAA,CAAAA,EAAAA,CAAGkC,OAAQ,CAAA,WAAA,CAAY,0BAAAK,SAAA,CAAA7B,IAAA,MAAA8B,QAAA,GACvD,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as t,a as e,e as i}from"../fixture-985bba12.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as o}from"./nile-form-help-text.esm.js";import"tslib";import"lit/decorators.js";import"./nile-form-help-text.css.esm.js";import"lit/directives/class-map.js";describe("NileFormHelpText",(()=>{it("should render with default properties",(async()=>{const i=await t(l`<nile-form-help-text>This is a short text</nile-form-help-text>`);e(i).to.be.instanceOf(o),e(i.isExpanded).to.be.false;const s=i?.textContent?.trim();e(s).to.equal("This is a short text")})),it('should not show "View More" button if the text fits within the container',(async()=>{const o=await t(l`<nile-form-help-text>This is a short text</nile-form-help-text>`);await i(o);const s=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");e(s).to.be.null,e(o.showButton).to.be.false})),it('should show "View More" button if the text overflows the container',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");e(h).to.exist,e(o.showButton).to.be.true})),it('should expand to show full text when "View More" is clicked',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");h?.click(),await i(o),e(o.isExpanded).to.be.true,e(s).to.have.class("help__text__full--expanded"),e(h?.textContent).to.include("View Less")})),it('should collapse back to truncated text when "View Less" is clicked',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");h?.click(),await i(o),h?.click(),await i(o),e(o.isExpanded).to.be.false,e(s).not.to.have.class("help__text__full--expanded"),e(h?.textContent).to.include("View More")}))}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-hero.cjs.js","tslib","lit/decorators.js","./nile-hero.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var e,i,t,_templateObject,_templateObject2,_templateObject3;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){e=_fixture006CjsJs.f;i=_fixture006CjsJs.a;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileHeroCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileHeroCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectivesClassMapJs){}],execute:function execute(){describe("NileHero",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var r;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>"]))));case 2:r=_context2.sent;i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be["false"],i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("checks for collapsed state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _r$shadowRoot;var r,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-hero></nile-hero>"]))));case 2:r=_context3.sent;r.collapse=!0;_context3.next=6;return r.updateComplete;case 6:i(r.collapse).to.be["true"];r.collapse=!0;_context3.next=10;return r.updateComplete;case 10:a=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector(".hero__container");i(a===null||a===void 0?void 0:a.classList.contains("hero__container--collapsed")).to.be["true"];case 12:case"end":return _context3.stop();}},_callee2);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var r,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n "]))));case 2:r=_context4.sent;_context4.next=5;return r.updateComplete;case 5:a=r.querySelector("nile-page-header");i(a).to.exist;case 7:case"end":return _context4.stop();}},_callee3);})));});}};});
|
|
2
|
-
//# sourceMappingURL=nile-hero.test.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-hero.test.cjs.js","sources":["../../../src/nile-hero/nile-hero.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent } from '@open-wc/testing';\nimport './nile-hero';\nimport { NileHero } from './nile-hero';\n\ndescribe('NileHero', () => {\n it('renders correctly with default properties', async () => {\n const el = await fixture<NileHero>(html`\n\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>`);\n expect(el.getAttribute('icon')).to.equal('error');\n expect(el.hasAttribute('collapse')).to.be.false;\n expect(el.getAttribute('img-src')).to.equal('');\n expect(el.getAttribute('hero-text')).to.equal('Test Hero');\n expect(el).shadowDom.to.equalSnapshot();\n });\n\n it('checks for collapsed state', async () => {\n const el = await fixture<NileHero>(html`<nile-hero></nile-hero>`);\n el.collapse = true;\n await el.updateComplete;\n expect(el.collapse).to.be.true;\n el.collapse=true;\n await el.updateComplete;\n const heroContainer=el.shadowRoot?.querySelector('.hero__container');\n expect(heroContainer?.classList.contains('hero__container--collapsed')).to.be.true;\n });\n\n it('should render slot content', async () => {\n const el = await fixture<NileHero>(html`\n <nile-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n `);\n await el.updateComplete;\n const NilePageHeader = el.querySelector('nile-page-header')!;\n expect(NilePageHeader).to.exist;\n });\n})\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","expect","el","getAttribute","to","equal","hasAttribute","be","false","shadowDom","equalSnapshot","_context2","stop","_callee","_templateObject2","collapse","_context3","next","updateComplete","heroContainer","shadowRoot","querySelector","classList","contains","true","_callee2","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject3","NilePageHeader","exist","_context4","_callee3"],"mappings":"wuSAIAA,QAAS,CAAA,UAAA,CAAY,UACnBC,CAAAA,EAAAA,CAAG,mHAA6CC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SAC7BC,CAAAA,CAAAA,CAAkBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,kPAOvCC,CAAAA,QAPMC,CAAWL,CAAAA,SAAAA,CAAAA,IAAAA,CAOjBI,CAAAA,CAAOC,EAAGC,YAAa,CAAA,MAAA,CAAA,CAAA,CAASC,EAAGC,CAAAA,KAAAA,CAAM,SACzCJ,CAAOC,CAAAA,CAAAA,CAAGI,YAAa,CAAA,UAAA,CAAA,CAAA,CAAaF,GAAGG,EAAGC,SAAAA,CAC1CP,CAAOC,CAAAA,CAAAA,CAAGC,aAAa,SAAYC,CAAAA,CAAAA,CAAAA,EAAAA,CAAGC,KAAM,CAAA,EAAA,CAAA,CAC5CJ,EAAOC,CAA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