@egen-civitas/esm-styleguide 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/_all.scss +29 -0
- package/dist/_carbon-bridge.scss +194 -0
- package/dist/_glass.scss +75 -0
- package/dist/_overrides.scss +767 -0
- package/dist/_panel.scss +123 -0
- package/dist/_vars.scss +111 -0
- package/dist/brand.d.ts +8 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +18 -0
- package/dist/breakpoints/index.d.ts +12 -0
- package/dist/breakpoints/index.d.ts.map +1 -0
- package/dist/breakpoints/index.js +28 -0
- package/dist/cards/card-header.component.d.ts +12 -0
- package/dist/cards/card-header.component.d.ts.map +1 -0
- package/dist/cards/card-header.component.js +22 -0
- package/dist/cards/card-header.module.scss +45 -0
- package/dist/cards/card-header.stories.js +32 -0
- package/dist/cards/decorated-card/_decoration-bleed.scss +26 -0
- package/dist/cards/decorated-card/card-decorations.d.ts +9 -0
- package/dist/cards/decorated-card/card-decorations.d.ts.map +1 -0
- package/dist/cards/decorated-card/card-decorations.js +106 -0
- package/dist/cards/decorated-card/decorated-card.component.d.ts +25 -0
- package/dist/cards/decorated-card/decorated-card.component.d.ts.map +1 -0
- package/dist/cards/decorated-card/decorated-card.component.js +134 -0
- package/dist/cards/decorated-card/decorated-card.module.scss +357 -0
- package/dist/cards/decorated-card/decorated-card.types.d.ts +26 -0
- package/dist/cards/decorated-card/decorated-card.types.d.ts.map +1 -0
- package/dist/cards/decorated-card/decorated-card.types.js +1 -0
- package/dist/cards/decorated-card/index.d.ts +3 -0
- package/dist/cards/decorated-card/index.d.ts.map +1 -0
- package/dist/cards/decorated-card/index.js +2 -0
- package/dist/cards/index.d.ts +3 -0
- package/dist/cards/index.d.ts.map +1 -0
- package/dist/cards/index.js +2 -0
- package/dist/carousel/circular-gallery/circular-gallery.component.d.ts +21 -0
- package/dist/carousel/circular-gallery/circular-gallery.component.d.ts.map +1 -0
- package/dist/carousel/circular-gallery/circular-gallery.component.js +130 -0
- package/dist/carousel/circular-gallery/circular-gallery.module.scss +165 -0
- package/dist/carousel/circular-gallery/circular-gallery.types.d.ts +17 -0
- package/dist/carousel/circular-gallery/circular-gallery.types.d.ts.map +1 -0
- package/dist/carousel/circular-gallery/circular-gallery.types.js +1 -0
- package/dist/carousel/circular-gallery/gallery-image.component.d.ts +23 -0
- package/dist/carousel/circular-gallery/gallery-image.component.d.ts.map +1 -0
- package/dist/carousel/circular-gallery/gallery-image.component.js +151 -0
- package/dist/carousel/circular-gallery/gallery-tabs.component.d.ts +10 -0
- package/dist/carousel/circular-gallery/gallery-tabs.component.d.ts.map +1 -0
- package/dist/carousel/circular-gallery/gallery-tabs.component.js +54 -0
- package/dist/carousel/circular-gallery/index.d.ts +3 -0
- package/dist/carousel/circular-gallery/index.d.ts.map +1 -0
- package/dist/carousel/circular-gallery/index.js +2 -0
- package/dist/carousel/image-swiper/image-swiper.component.d.ts +18 -0
- package/dist/carousel/image-swiper/image-swiper.component.d.ts.map +1 -0
- package/dist/carousel/image-swiper/image-swiper.component.js +200 -0
- package/dist/carousel/image-swiper/image-swiper.module.scss +43 -0
- package/dist/carousel/image-swiper/image-swiper.types.d.ts +17 -0
- package/dist/carousel/image-swiper/image-swiper.types.d.ts.map +1 -0
- package/dist/carousel/image-swiper/image-swiper.types.js +1 -0
- package/dist/carousel/image-swiper/index.d.ts +3 -0
- package/dist/carousel/image-swiper/index.d.ts.map +1 -0
- package/dist/carousel/image-swiper/index.js +2 -0
- package/dist/carousel/index.d.ts +5 -0
- package/dist/carousel/index.d.ts.map +1 -0
- package/dist/carousel/index.js +9 -0
- package/dist/carousel/slider/carousel.component.d.ts +29 -0
- package/dist/carousel/slider/carousel.component.d.ts.map +1 -0
- package/dist/carousel/slider/carousel.component.js +108 -0
- package/dist/carousel/slider/index.d.ts +9 -0
- package/dist/carousel/slider/index.d.ts.map +1 -0
- package/dist/carousel/slider/index.js +7 -0
- package/dist/carousel/slider/slider-container.component.d.ts +11 -0
- package/dist/carousel/slider/slider-container.component.d.ts.map +1 -0
- package/dist/carousel/slider/slider-container.component.js +21 -0
- package/dist/carousel/slider/slider-dot-button.component.d.ts +12 -0
- package/dist/carousel/slider/slider-dot-button.component.d.ts.map +1 -0
- package/dist/carousel/slider/slider-dot-button.component.js +29 -0
- package/dist/carousel/slider/slider.component.d.ts +11 -0
- package/dist/carousel/slider/slider.component.d.ts.map +1 -0
- package/dist/carousel/slider/slider.component.js +17 -0
- package/dist/carousel/slider/slider.context.d.ts +16 -0
- package/dist/carousel/slider/slider.context.d.ts.map +1 -0
- package/dist/carousel/slider/slider.context.js +9 -0
- package/dist/carousel/slider/slider.module.scss +176 -0
- package/dist/carousel/slider/slider.types.d.ts +40 -0
- package/dist/carousel/slider/slider.types.d.ts.map +1 -0
- package/dist/carousel/slider/slider.types.js +1 -0
- package/dist/carousel/slider/thumbs-slider.component.d.ts +16 -0
- package/dist/carousel/slider/thumbs-slider.component.d.ts.map +1 -0
- package/dist/carousel/slider/thumbs-slider.component.js +45 -0
- package/dist/carousel/testimonial-card/index.d.ts +4 -0
- package/dist/carousel/testimonial-card/index.d.ts.map +1 -0
- package/dist/carousel/testimonial-card/index.js +3 -0
- package/dist/carousel/testimonial-card/testimonial-card-stack.component.d.ts +29 -0
- package/dist/carousel/testimonial-card/testimonial-card-stack.component.d.ts.map +1 -0
- package/dist/carousel/testimonial-card/testimonial-card-stack.component.js +79 -0
- package/dist/carousel/testimonial-card/testimonial-card-stack.module.scss +18 -0
- package/dist/carousel/testimonial-card/testimonial-card.component.d.ts +36 -0
- package/dist/carousel/testimonial-card/testimonial-card.component.d.ts.map +1 -0
- package/dist/carousel/testimonial-card/testimonial-card.component.js +98 -0
- package/dist/carousel/testimonial-card/testimonial-card.module.scss +73 -0
- package/dist/carousel/testimonial-card/testimonial-card.types.d.ts +65 -0
- package/dist/carousel/testimonial-card/testimonial-card.types.d.ts.map +1 -0
- package/dist/carousel/testimonial-card/testimonial-card.types.js +1 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.component.d.ts +33 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.component.d.ts.map +1 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.component.js +195 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.module.scss +210 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.types.d.ts +36 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.types.d.ts.map +1 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.types.js +1 -0
- package/dist/cascading-nav-dropdown/column-with-search.component.d.ts +15 -0
- package/dist/cascading-nav-dropdown/column-with-search.component.d.ts.map +1 -0
- package/dist/cascading-nav-dropdown/column-with-search.component.js +99 -0
- package/dist/cascading-nav-dropdown/index.d.ts +4 -0
- package/dist/cascading-nav-dropdown/index.d.ts.map +1 -0
- package/dist/cascading-nav-dropdown/index.js +3 -0
- package/dist/classification-tags/classification-tags.component.d.ts +32 -0
- package/dist/classification-tags/classification-tags.component.d.ts.map +1 -0
- package/dist/classification-tags/classification-tags.component.js +40 -0
- package/dist/classification-tags/index.d.ts +2 -0
- package/dist/classification-tags/index.d.ts.map +1 -0
- package/dist/classification-tags/index.js +1 -0
- package/dist/components/_breadcrumbs.scss +11 -0
- package/dist/components/_canvas.scss +8 -0
- package/dist/components/_general.scss +121 -0
- package/dist/components/_main-content.scss +24 -0
- package/dist/components/_panel-overrides.scss +150 -0
- package/dist/config-schema.d.ts +43 -0
- package/dist/config-schema.d.ts.map +1 -0
- package/dist/config-schema.js +107 -0
- package/dist/containers/folder-gallery/folder-gallery.component.d.ts +24 -0
- package/dist/containers/folder-gallery/folder-gallery.component.d.ts.map +1 -0
- package/dist/containers/folder-gallery/folder-gallery.component.js +168 -0
- package/dist/containers/folder-gallery/folder-gallery.module.scss +201 -0
- package/dist/containers/folder-gallery/folder-gallery.types.d.ts +27 -0
- package/dist/containers/folder-gallery/folder-gallery.types.d.ts.map +1 -0
- package/dist/containers/folder-gallery/folder-gallery.types.js +1 -0
- package/dist/containers/folder-gallery/index.d.ts +3 -0
- package/dist/containers/folder-gallery/index.d.ts.map +1 -0
- package/dist/containers/folder-gallery/index.js +2 -0
- package/dist/containers/index.d.ts +3 -0
- package/dist/containers/index.d.ts.map +1 -0
- package/dist/containers/index.js +8 -0
- package/dist/containers/layout-grid/index.d.ts +3 -0
- package/dist/containers/layout-grid/index.d.ts.map +1 -0
- package/dist/containers/layout-grid/index.js +2 -0
- package/dist/containers/layout-grid/layout-grid.component.d.ts +30 -0
- package/dist/containers/layout-grid/layout-grid.component.d.ts.map +1 -0
- package/dist/containers/layout-grid/layout-grid.component.js +152 -0
- package/dist/containers/layout-grid/layout-grid.module.scss +143 -0
- package/dist/containers/layout-grid/layout-grid.types.d.ts +19 -0
- package/dist/containers/layout-grid/layout-grid.types.d.ts.map +1 -0
- package/dist/containers/layout-grid/layout-grid.types.js +1 -0
- package/dist/custom-overflow-menu/custom-overflow-menu.component.d.ts +24 -0
- package/dist/custom-overflow-menu/custom-overflow-menu.component.d.ts.map +1 -0
- package/dist/custom-overflow-menu/custom-overflow-menu.component.js +133 -0
- package/dist/custom-overflow-menu/custom-overflow-menu.module.scss +38 -0
- package/dist/custom-overflow-menu/custom-overflow-menu.stories.js +64 -0
- package/dist/custom-overflow-menu/index.d.ts +2 -0
- package/dist/custom-overflow-menu/index.d.ts.map +1 -0
- package/dist/custom-overflow-menu/index.js +1 -0
- package/dist/dashboard-extension/dashboard.module.scss +13 -0
- package/dist/dashboard-extension/index.d.ts +13 -0
- package/dist/dashboard-extension/index.d.ts.map +1 -0
- package/dist/dashboard-extension/index.js +59 -0
- package/dist/data-table-batch-actions/data-table-batch-actions.component.d.ts +5 -0
- package/dist/data-table-batch-actions/data-table-batch-actions.component.d.ts.map +1 -0
- package/dist/data-table-batch-actions/data-table-batch-actions.component.js +24 -0
- package/dist/data-table-batch-actions/index.d.ts +2 -0
- package/dist/data-table-batch-actions/index.d.ts.map +1 -0
- package/dist/data-table-batch-actions/index.js +1 -0
- package/dist/datepicker/auto-close-dialog.component.d.ts +7 -0
- package/dist/datepicker/auto-close-dialog.component.d.ts.map +1 -0
- package/dist/datepicker/auto-close-dialog.component.js +16 -0
- package/dist/datepicker/calendar-popover.component.d.ts +28 -0
- package/dist/datepicker/calendar-popover.component.d.ts.map +1 -0
- package/dist/datepicker/calendar-popover.component.js +68 -0
- package/dist/datepicker/date-picker-icon.component.d.ts +9 -0
- package/dist/datepicker/date-picker-icon.component.d.ts.map +1 -0
- package/dist/datepicker/date-picker-icon.component.js +23 -0
- package/dist/datepicker/date-picker-input.component.d.ts +12 -0
- package/dist/datepicker/date-picker-input.component.d.ts.map +1 -0
- package/dist/datepicker/date-picker-input.component.js +70 -0
- package/dist/datepicker/date-range-picker.stories.js +44 -0
- package/dist/datepicker/date-segment.component.d.ts +11 -0
- package/dist/datepicker/date-segment.component.d.ts.map +1 -0
- package/dist/datepicker/date-segment.component.js +53 -0
- package/dist/datepicker/datepicker.module.scss +502 -0
- package/dist/datepicker/datepicker.stories.js +47 -0
- package/dist/datepicker/defaults.d.ts +10 -0
- package/dist/datepicker/defaults.d.ts.map +1 -0
- package/dist/datepicker/defaults.js +8 -0
- package/dist/datepicker/egen-date-picker.component.d.ts +27 -0
- package/dist/datepicker/egen-date-picker.component.d.ts.map +1 -0
- package/dist/datepicker/egen-date-picker.component.js +142 -0
- package/dist/datepicker/egen-date-range-picker.component.d.ts +22 -0
- package/dist/datepicker/egen-date-range-picker.component.d.ts.map +1 -0
- package/dist/datepicker/egen-date-range-picker.component.js +172 -0
- package/dist/datepicker/hooks.d.ts +911 -0
- package/dist/datepicker/hooks.d.ts.map +1 -0
- package/dist/datepicker/hooks.js +103 -0
- package/dist/datepicker/i18n-wrapper.component.d.ts +7 -0
- package/dist/datepicker/i18n-wrapper.component.d.ts.map +1 -0
- package/dist/datepicker/i18n-wrapper.component.js +8 -0
- package/dist/datepicker/index.d.ts +3 -0
- package/dist/datepicker/index.d.ts.map +1 -0
- package/dist/datepicker/index.js +2 -0
- package/dist/datepicker/month-year.component.d.ts +11 -0
- package/dist/datepicker/month-year.component.d.ts.map +1 -0
- package/dist/datepicker/month-year.component.js +80 -0
- package/dist/datepicker/types.d.ts +31 -0
- package/dist/datepicker/types.d.ts.map +1 -0
- package/dist/datepicker/types.js +3 -0
- package/dist/datepicker/utils.d.ts +16 -0
- package/dist/datepicker/utils.d.ts.map +1 -0
- package/dist/datepicker/utils.js +35 -0
- package/dist/declarations.d.js +0 -0
- package/dist/dialogs/card-modal/card-modal.animations.d.ts +5 -0
- package/dist/dialogs/card-modal/card-modal.animations.d.ts.map +1 -0
- package/dist/dialogs/card-modal/card-modal.animations.js +102 -0
- package/dist/dialogs/card-modal/card-modal.component.d.ts +40 -0
- package/dist/dialogs/card-modal/card-modal.component.d.ts.map +1 -0
- package/dist/dialogs/card-modal/card-modal.component.js +284 -0
- package/dist/dialogs/card-modal/card-modal.module.scss +103 -0
- package/dist/dialogs/card-modal/card-modal.types.d.ts +64 -0
- package/dist/dialogs/card-modal/card-modal.types.d.ts.map +1 -0
- package/dist/dialogs/card-modal/card-modal.types.js +1 -0
- package/dist/dialogs/card-modal/index.d.ts +4 -0
- package/dist/dialogs/card-modal/index.d.ts.map +1 -0
- package/dist/dialogs/card-modal/index.js +3 -0
- package/dist/dialogs/index.d.ts +2 -0
- package/dist/dialogs/index.d.ts.map +1 -0
- package/dist/dialogs/index.js +12 -0
- package/dist/empty-card/empty-card-registration.d.ts +2 -0
- package/dist/empty-card/empty-card-registration.d.ts.map +1 -0
- package/dist/empty-card/empty-card-registration.js +5 -0
- package/dist/empty-card/empty-card.component.d.ts +18 -0
- package/dist/empty-card/empty-card.component.d.ts.map +1 -0
- package/dist/empty-card/empty-card.component.js +52 -0
- package/dist/empty-card/empty-card.module.scss +27 -0
- package/dist/empty-card/empty-card.stories.js +23 -0
- package/dist/empty-card/empty-data-illustration.svg +1 -0
- package/dist/empty-card/index.d.ts +2 -0
- package/dist/empty-card/index.d.ts.map +1 -0
- package/dist/empty-card/index.js +1 -0
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.d.ts +19 -0
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.d.ts.map +1 -0
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.js +137 -0
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.module.scss +23 -0
- package/dist/entity-banner/contact-details/entity-banner-contact-details.component.d.ts +9 -0
- package/dist/entity-banner/contact-details/entity-banner-contact-details.component.d.ts.map +1 -0
- package/dist/entity-banner/contact-details/entity-banner-contact-details.component.js +207 -0
- package/dist/entity-banner/contact-details/entity-banner-contact-details.module.scss +47 -0
- package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.d.ts +12 -0
- package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.d.ts.map +1 -0
- package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.js +15 -0
- package/dist/entity-banner/contact-details/types.d.ts +48 -0
- package/dist/entity-banner/contact-details/types.d.ts.map +1 -0
- package/dist/entity-banner/contact-details/types.js +1 -0
- package/dist/entity-banner/contact-details/useEntityAttributes.d.ts +14 -0
- package/dist/entity-banner/contact-details/useEntityAttributes.d.ts.map +1 -0
- package/dist/entity-banner/contact-details/useEntityAttributes.js +12 -0
- package/dist/entity-banner/contact-details/useEntityGroupsForEntity.d.ts +11 -0
- package/dist/entity-banner/contact-details/useEntityGroupsForEntity.d.ts.map +1 -0
- package/dist/entity-banner/contact-details/useEntityGroupsForEntity.js +9 -0
- package/dist/entity-banner/contact-details/useRelationships.d.ts +35 -0
- package/dist/entity-banner/contact-details/useRelationships.d.ts.map +1 -0
- package/dist/entity-banner/contact-details/useRelationships.js +37 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.d.ts +9 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.d.ts.map +1 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.js +77 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-info.component.d.ts +9 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-info.component.d.ts.map +1 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-info.component.js +72 -0
- package/dist/entity-banner/entity-info/entity-banner-entity-info.module.scss +165 -0
- package/dist/entity-banner/index.d.ts +5 -0
- package/dist/entity-banner/index.d.ts.map +1 -0
- package/dist/entity-banner/index.js +4 -0
- package/dist/entity-photo/entity-photo.component.d.ts +21 -0
- package/dist/entity-photo/entity-photo.component.d.ts.map +1 -0
- package/dist/entity-photo/entity-photo.component.js +111 -0
- package/dist/entity-photo/entity-photo.module.scss +21 -0
- package/dist/entity-photo/index.d.ts +3 -0
- package/dist/entity-photo/index.d.ts.map +1 -0
- package/dist/entity-photo/index.js +2 -0
- package/dist/entity-photo/placeholder-icon.component.d.ts +9 -0
- package/dist/entity-photo/placeholder-icon.component.d.ts.map +1 -0
- package/dist/entity-photo/placeholder-icon.component.js +26 -0
- package/dist/entity-photo/useEntityPhoto.d.ts +29 -0
- package/dist/entity-photo/useEntityPhoto.d.ts.map +1 -0
- package/dist/entity-photo/useEntityPhoto.js +37 -0
- package/dist/error-state/error-state.component.d.ts +11 -0
- package/dist/error-state/error-state.component.d.ts.map +1 -0
- package/dist/error-state/error-state.component.js +32 -0
- package/dist/error-state/error-state.module.scss +21 -0
- package/dist/error-state/error-state.stories.js +32 -0
- package/dist/error-state/index.d.ts +2 -0
- package/dist/error-state/index.d.ts.map +1 -0
- package/dist/error-state/index.js +1 -0
- package/dist/fields/dynamic-field.component.d.ts +39 -0
- package/dist/fields/dynamic-field.component.d.ts.map +1 -0
- package/dist/fields/dynamic-field.component.js +169 -0
- package/dist/fields/dynamic-field.module.scss +474 -0
- package/dist/fields/dynamic-field.stories.js +103 -0
- package/dist/fields/dynamic-field.types.d.ts +70 -0
- package/dist/fields/dynamic-field.types.d.ts.map +1 -0
- package/dist/fields/dynamic-field.types.js +7 -0
- package/dist/fields/field-icon.component.d.ts +11 -0
- package/dist/fields/field-icon.component.d.ts.map +1 -0
- package/dist/fields/field-icon.component.js +16 -0
- package/dist/fields/index.d.ts +3 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.js +2 -0
- package/dist/fields/kinetic-label.component.d.ts +16 -0
- package/dist/fields/kinetic-label.component.d.ts.map +1 -0
- package/dist/fields/kinetic-label.component.js +53 -0
- package/dist/fields/use-field-validation.hook.d.ts +12 -0
- package/dist/fields/use-field-validation.hook.d.ts.map +1 -0
- package/dist/fields/use-field-validation.hook.js +72 -0
- package/dist/fields/validation-icon.component.d.ts +10 -0
- package/dist/fields/validation-icon.component.d.ts.map +1 -0
- package/dist/fields/validation-icon.component.js +40 -0
- package/dist/glass-card/index.d.ts +3 -0
- package/dist/glass-card/index.d.ts.map +1 -0
- package/dist/glass-card/index.js +2 -0
- package/dist/glass-card/liquid-glass-card.component.d.ts +23 -0
- package/dist/glass-card/liquid-glass-card.component.d.ts.map +1 -0
- package/dist/glass-card/liquid-glass-card.component.js +175 -0
- package/dist/glass-card/liquid-glass-card.module.scss +154 -0
- package/dist/glass-card/liquid-glass-card.types.d.ts +27 -0
- package/dist/glass-card/liquid-glass-card.types.d.ts.map +1 -0
- package/dist/glass-card/liquid-glass-card.types.js +1 -0
- package/dist/icons/error-filled.icon.d.ts +18 -0
- package/dist/icons/error-filled.icon.d.ts.map +1 -0
- package/dist/icons/error-filled.icon.js +22 -0
- package/dist/icons/icon-registration.d.ts +2 -0
- package/dist/icons/icon-registration.d.ts.map +1 -0
- package/dist/icons/icon-registration.js +191 -0
- package/dist/icons/icons.d.ts +334 -0
- package/dist/icons/icons.d.ts.map +1 -0
- package/dist/icons/icons.js +916 -0
- package/dist/icons/icons.module.scss +5 -0
- package/dist/icons/icons.stories.js +61 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +2 -0
- package/dist/icons/svgs/activity.svg +1 -0
- package/dist/icons/svgs/add.svg +1 -0
- package/dist/icons/svgs/arrow-down.svg +1 -0
- package/dist/icons/svgs/arrow-left.svg +1 -0
- package/dist/icons/svgs/arrow-right.svg +1 -0
- package/dist/icons/svgs/arrow-up.svg +1 -0
- package/dist/icons/svgs/baby.svg +1 -0
- package/dist/icons/svgs/calendar--heat-map.svg +1 -0
- package/dist/icons/svgs/calendar.svg +1 -0
- package/dist/icons/svgs/caret-down.svg +1 -0
- package/dist/icons/svgs/caret-left.svg +1 -0
- package/dist/icons/svgs/caret-right.svg +1 -0
- package/dist/icons/svgs/caret-up.svg +1 -0
- package/dist/icons/svgs/chart-average.svg +1 -0
- package/dist/icons/svgs/chart-line.svg +1 -0
- package/dist/icons/svgs/checkmark--filled.svg +1 -0
- package/dist/icons/svgs/checkmark--outline.svg +1 -0
- package/dist/icons/svgs/chemistry.svg +1 -0
- package/dist/icons/svgs/chevron-down.svg +1 -0
- package/dist/icons/svgs/chevron-left.svg +1 -0
- package/dist/icons/svgs/chevron-right.svg +1 -0
- package/dist/icons/svgs/chevron-up.svg +1 -0
- package/dist/icons/svgs/close--filled.svg +1 -0
- package/dist/icons/svgs/close--outline.svg +1 -0
- package/dist/icons/svgs/close.svg +1 -0
- package/dist/icons/svgs/document-attachment.svg +1 -0
- package/dist/icons/svgs/document.svg +1 -0
- package/dist/icons/svgs/download.svg +1 -0
- package/dist/icons/svgs/drug-order.svg +1 -0
- package/dist/icons/svgs/edit.svg +1 -0
- package/dist/icons/svgs/event-schedule.svg +1 -0
- package/dist/icons/svgs/events.svg +1 -0
- package/dist/icons/svgs/gender-female.svg +1 -0
- package/dist/icons/svgs/gender-male.svg +1 -0
- package/dist/icons/svgs/gender-other.svg +1 -0
- package/dist/icons/svgs/gender-unknown.svg +1 -0
- package/dist/icons/svgs/generic-order-type.svg +1 -0
- package/dist/icons/svgs/group-access.svg +1 -0
- package/dist/icons/svgs/group.svg +1 -0
- package/dist/icons/svgs/hospital-bed.svg +1 -0
- package/dist/icons/svgs/image-medical.svg +1 -0
- package/dist/icons/svgs/information--filled.svg +1 -0
- package/dist/icons/svgs/information--square.svg +1 -0
- package/dist/icons/svgs/information.svg +1 -0
- package/dist/icons/svgs/inventory-management.svg +1 -0
- package/dist/icons/svgs/lab-order.svg +1 -0
- package/dist/icons/svgs/list-checked.svg +1 -0
- package/dist/icons/svgs/location.svg +1 -0
- package/dist/icons/svgs/material-order.svg +1 -0
- package/dist/icons/svgs/maximize.svg +1 -0
- package/dist/icons/svgs/medication.svg +1 -0
- package/dist/icons/svgs/message-queue.svg +1 -0
- package/dist/icons/svgs/microscope.svg +1 -0
- package/dist/icons/svgs/money.svg +1 -0
- package/dist/icons/svgs/mother.svg +1 -0
- package/dist/icons/svgs/movement.svg +1 -0
- package/dist/icons/svgs/overflow-menu--horizontal.svg +1 -0
- package/dist/icons/svgs/overflow-menu--vertical.svg +1 -0
- package/dist/icons/svgs/password.svg +1 -0
- package/dist/icons/svgs/pedestrian-family.svg +1 -0
- package/dist/icons/svgs/pen.svg +1 -0
- package/dist/icons/svgs/printer.svg +1 -0
- package/dist/icons/svgs/procedure-order.svg +1 -0
- package/dist/icons/svgs/programs.svg +1 -0
- package/dist/icons/svgs/referral-order.svg +1 -0
- package/dist/icons/svgs/renew.svg +1 -0
- package/dist/icons/svgs/report.svg +1 -0
- package/dist/icons/svgs/reset.svg +1 -0
- package/dist/icons/svgs/save.svg +1 -0
- package/dist/icons/svgs/search.svg +1 -0
- package/dist/icons/svgs/settings.svg +1 -0
- package/dist/icons/svgs/shopping-cart--arrow-down.svg +1 -0
- package/dist/icons/svgs/shopping-cart.svg +1 -0
- package/dist/icons/svgs/sticky-note-add.svg +1 -0
- package/dist/icons/svgs/switcher.svg +1 -0
- package/dist/icons/svgs/syringe.svg +1 -0
- package/dist/icons/svgs/table-of-contents.svg +1 -0
- package/dist/icons/svgs/table.svg +1 -0
- package/dist/icons/svgs/time.svg +1 -0
- package/dist/icons/svgs/tools.svg +1 -0
- package/dist/icons/svgs/translate.svg +1 -0
- package/dist/icons/svgs/trash-can.svg +1 -0
- package/dist/icons/svgs/tree-view--alt.svg +1 -0
- package/dist/icons/svgs/user-avatar.svg +1 -0
- package/dist/icons/svgs/user-follow.svg +1 -0
- package/dist/icons/svgs/user-xray.svg +1 -0
- package/dist/icons/svgs/user.svg +1 -0
- package/dist/icons/svgs/view-off.svg +1 -0
- package/dist/icons/svgs/view.svg +1 -0
- package/dist/icons/svgs/warning.svg +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/internal.d.ts +43 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +42 -0
- package/dist/left-nav/index.d.ts +24 -0
- package/dist/left-nav/index.d.ts.map +1 -0
- package/dist/left-nav/index.js +58 -0
- package/dist/left-nav/left-nav.module.scss +43 -0
- package/dist/location-picker/index.d.ts +2 -0
- package/dist/location-picker/index.d.ts.map +1 -0
- package/dist/location-picker/index.js +1 -0
- package/dist/location-picker/location-picker.component.d.ts +11 -0
- package/dist/location-picker/location-picker.component.d.ts.map +1 -0
- package/dist/location-picker/location-picker.component.js +114 -0
- package/dist/location-picker/location-picker.module.scss +71 -0
- package/dist/location-picker/location-picker.resource.d.ts +53 -0
- package/dist/location-picker/location-picker.resource.d.ts.map +1 -0
- package/dist/location-picker/location-picker.resource.js +98 -0
- package/dist/logo/_logo.scss +34 -0
- package/dist/logo/egen-logo-full.svg +1 -0
- package/dist/logo/egen-logo-icon.svg +1 -0
- package/dist/logo/egen-logo-partial.svg +1 -0
- package/dist/logo/egen-logo-white.svg +1 -0
- package/dist/logo/index.d.ts +8 -0
- package/dist/logo/index.d.ts.map +1 -0
- package/dist/logo/index.js +22 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.component.d.ts +30 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.component.d.ts.map +1 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.component.js +327 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.module.scss +335 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.types.d.ts +37 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.types.d.ts.map +1 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.types.js +1 -0
- package/dist/master-detail/entity-detail-browser/gradient-blur.component.d.ts +9 -0
- package/dist/master-detail/entity-detail-browser/gradient-blur.component.d.ts.map +1 -0
- package/dist/master-detail/entity-detail-browser/gradient-blur.component.js +16 -0
- package/dist/master-detail/entity-detail-browser/index.d.ts +4 -0
- package/dist/master-detail/entity-detail-browser/index.d.ts.map +1 -0
- package/dist/master-detail/entity-detail-browser/index.js +3 -0
- package/dist/master-detail/index.d.ts +2 -0
- package/dist/master-detail/index.d.ts.map +1 -0
- package/dist/master-detail/index.js +7 -0
- package/dist/modals/_modals.scss +13 -0
- package/dist/modals/index.d.ts +26 -0
- package/dist/modals/index.d.ts.map +1 -0
- package/dist/modals/index.js +173 -0
- package/dist/notifications/_actionable-notifications.scss +23 -0
- package/dist/notifications/_notifications.scss +22 -0
- package/dist/notifications/actionable-notification.component.d.ts +21 -0
- package/dist/notifications/actionable-notification.component.d.ts.map +1 -0
- package/dist/notifications/actionable-notification.component.js +26 -0
- package/dist/notifications/actionable-notification.stories.js +48 -0
- package/dist/notifications/active-actionable-notifications.component.d.ts +9 -0
- package/dist/notifications/active-actionable-notifications.component.d.ts.map +1 -0
- package/dist/notifications/active-actionable-notifications.component.js +21 -0
- package/dist/notifications/active-notifications.component.d.ts +9 -0
- package/dist/notifications/active-notifications.component.d.ts.map +1 -0
- package/dist/notifications/active-notifications.component.js +21 -0
- package/dist/notifications/index.d.ts +20 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +78 -0
- package/dist/notifications/notification.component.d.ts +20 -0
- package/dist/notifications/notification.component.d.ts.map +1 -0
- package/dist/notifications/notification.component.js +15 -0
- package/dist/notifications/notification.stories.js +54 -0
- package/dist/numeric-datapoint/index.d.ts +4 -0
- package/dist/numeric-datapoint/index.d.ts.map +1 -0
- package/dist/numeric-datapoint/index.js +3 -0
- package/dist/numeric-datapoint/interpretation-utils.d.ts +27 -0
- package/dist/numeric-datapoint/interpretation-utils.d.ts.map +1 -0
- package/dist/numeric-datapoint/interpretation-utils.js +66 -0
- package/dist/numeric-datapoint/numeric-datapoint.component.d.ts +44 -0
- package/dist/numeric-datapoint/numeric-datapoint.component.d.ts.map +1 -0
- package/dist/numeric-datapoint/numeric-datapoint.component.js +110 -0
- package/dist/numeric-datapoint/numeric-datapoint.module.scss +141 -0
- package/dist/numeric-datapoint/use-concept-reference-range.d.ts +13 -0
- package/dist/numeric-datapoint/use-concept-reference-range.d.ts.map +1 -0
- package/dist/numeric-datapoint/use-concept-reference-range.js +31 -0
- package/dist/page-header/index.d.ts +2 -0
- package/dist/page-header/index.d.ts.map +1 -0
- package/dist/page-header/index.js +1 -0
- package/dist/page-header/page-header.component.d.ts +61 -0
- package/dist/page-header/page-header.component.d.ts.map +1 -0
- package/dist/page-header/page-header.component.js +89 -0
- package/dist/page-header/page-header.module.scss +28 -0
- package/dist/page-header/page-header.stories.js +21 -0
- package/dist/pagination/index.d.ts +2 -0
- package/dist/pagination/index.d.ts.map +1 -0
- package/dist/pagination/index.js +1 -0
- package/dist/pagination/pagination.component.d.ts +23 -0
- package/dist/pagination/pagination.component.d.ts.map +1 -0
- package/dist/pagination/pagination.component.js +49 -0
- package/dist/pagination/pagination.module.scss +66 -0
- package/dist/pagination/pagination.stories.js +45 -0
- package/dist/pictograms/index.d.ts +2 -0
- package/dist/pictograms/index.d.ts.map +1 -0
- package/dist/pictograms/index.js +1 -0
- package/dist/pictograms/pictogram-registration.d.ts +2 -0
- package/dist/pictograms/pictogram-registration.d.ts.map +1 -0
- package/dist/pictograms/pictogram-registration.js +62 -0
- package/dist/pictograms/pictograms.d.ts +66 -0
- package/dist/pictograms/pictograms.d.ts.map +1 -0
- package/dist/pictograms/pictograms.js +281 -0
- package/dist/pictograms/pictograms.module.scss +5 -0
- package/dist/pictograms/pictograms.stories.js +47 -0
- package/dist/pictograms/svgs/appointments.svg +1 -0
- package/dist/pictograms/svgs/assessment-1.svg +1 -0
- package/dist/pictograms/svgs/assessment-2.svg +1 -0
- package/dist/pictograms/svgs/blood-bank.svg +1 -0
- package/dist/pictograms/svgs/cardiology.svg +1 -0
- package/dist/pictograms/svgs/ct-scan.svg +1 -0
- package/dist/pictograms/svgs/dentistry.svg +1 -0
- package/dist/pictograms/svgs/emergency-department.svg +1 -0
- package/dist/pictograms/svgs/facility.svg +1 -0
- package/dist/pictograms/svgs/geriatrics.svg +1 -0
- package/dist/pictograms/svgs/gynaecology.svg +1 -0
- package/dist/pictograms/svgs/in-patient.svg +1 -0
- package/dist/pictograms/svgs/inventory.svg +1 -0
- package/dist/pictograms/svgs/labs-2.svg +1 -0
- package/dist/pictograms/svgs/labs.svg +1 -0
- package/dist/pictograms/svgs/obstetrics.svg +1 -0
- package/dist/pictograms/svgs/patient-search.svg +1 -0
- package/dist/pictograms/svgs/patients.svg +1 -0
- package/dist/pictograms/svgs/payments-desk.svg +1 -0
- package/dist/pictograms/svgs/pharmacy-1.svg +1 -0
- package/dist/pictograms/svgs/pharmacy-2.svg +1 -0
- package/dist/pictograms/svgs/registration.svg +1 -0
- package/dist/pictograms/svgs/service-queues.svg +1 -0
- package/dist/pictograms/svgs/transfer.svg +1 -0
- package/dist/pictograms/svgs/triage.svg +1 -0
- package/dist/pictograms/svgs/x-ray.svg +1 -0
- package/dist/public.d.ts +38 -0
- package/dist/public.d.ts.map +1 -0
- package/dist/public.js +34 -0
- package/dist/responsive-wrapper/index.d.ts +2 -0
- package/dist/responsive-wrapper/index.d.ts.map +1 -0
- package/dist/responsive-wrapper/index.js +1 -0
- package/dist/responsive-wrapper/responsive-wrapper.component.d.ts +12 -0
- package/dist/responsive-wrapper/responsive-wrapper.component.d.ts.map +1 -0
- package/dist/responsive-wrapper/responsive-wrapper.component.js +20 -0
- package/dist/responsive-wrapper/responsive-wrapper.stories.js +28 -0
- package/dist/selections/index.d.ts +3 -0
- package/dist/selections/index.d.ts.map +1 -0
- package/dist/selections/index.js +8 -0
- package/dist/selections/interactive-selector/index.d.ts +3 -0
- package/dist/selections/interactive-selector/index.d.ts.map +1 -0
- package/dist/selections/interactive-selector/index.js +2 -0
- package/dist/selections/interactive-selector/interactive-selector.component.d.ts +37 -0
- package/dist/selections/interactive-selector/interactive-selector.component.d.ts.map +1 -0
- package/dist/selections/interactive-selector/interactive-selector.component.js +154 -0
- package/dist/selections/interactive-selector/interactive-selector.module.scss +212 -0
- package/dist/selections/interactive-selector/interactive-selector.types.d.ts +32 -0
- package/dist/selections/interactive-selector/interactive-selector.types.d.ts.map +1 -0
- package/dist/selections/interactive-selector/interactive-selector.types.js +1 -0
- package/dist/selections/select-popover/index.d.ts +5 -0
- package/dist/selections/select-popover/index.d.ts.map +1 -0
- package/dist/selections/select-popover/index.js +4 -0
- package/dist/selections/select-popover/select-avatar.component.d.ts +9 -0
- package/dist/selections/select-popover/select-avatar.component.d.ts.map +1 -0
- package/dist/selections/select-popover/select-avatar.component.js +19 -0
- package/dist/selections/select-popover/select-content.component.d.ts +5 -0
- package/dist/selections/select-popover/select-content.component.d.ts.map +1 -0
- package/dist/selections/select-popover/select-content.component.js +198 -0
- package/dist/selections/select-popover/select-popover.module.scss +230 -0
- package/dist/selections/select-popover/select-popover.types.d.ts +56 -0
- package/dist/selections/select-popover/select-popover.types.d.ts.map +1 -0
- package/dist/selections/select-popover/select-popover.types.js +9 -0
- package/dist/selections/select-popover/select-trigger.component.d.ts +5 -0
- package/dist/selections/select-popover/select-trigger.component.d.ts.map +1 -0
- package/dist/selections/select-popover/select-trigger.component.js +46 -0
- package/dist/selections/select-popover/select.component.d.ts +19 -0
- package/dist/selections/select-popover/select.component.d.ts.map +1 -0
- package/dist/selections/select-popover/select.component.js +61 -0
- package/dist/sheet/index.d.ts +15 -0
- package/dist/sheet/index.d.ts.map +1 -0
- package/dist/sheet/index.js +13 -0
- package/dist/sheet/sheet-content.component.d.ts +21 -0
- package/dist/sheet/sheet-content.component.d.ts.map +1 -0
- package/dist/sheet/sheet-content.component.js +224 -0
- package/dist/sheet/sheet-overlay.component.d.ts +8 -0
- package/dist/sheet/sheet-overlay.component.d.ts.map +1 -0
- package/dist/sheet/sheet-overlay.component.js +36 -0
- package/dist/sheet/sheet-parts.component.d.ts +23 -0
- package/dist/sheet/sheet-parts.component.d.ts.map +1 -0
- package/dist/sheet/sheet-parts.component.js +20 -0
- package/dist/sheet/sheet-portal.component.d.ts +9 -0
- package/dist/sheet/sheet-portal.component.d.ts.map +1 -0
- package/dist/sheet/sheet-portal.component.js +17 -0
- package/dist/sheet/sheet-root.component.d.ts +25 -0
- package/dist/sheet/sheet-root.component.d.ts.map +1 -0
- package/dist/sheet/sheet-root.component.js +36 -0
- package/dist/sheet/sheet-trigger.component.d.ts +15 -0
- package/dist/sheet/sheet-trigger.component.d.ts.map +1 -0
- package/dist/sheet/sheet-trigger.component.js +45 -0
- package/dist/sheet/sheet.context.d.ts +16 -0
- package/dist/sheet/sheet.context.d.ts.map +1 -0
- package/dist/sheet/sheet.context.js +9 -0
- package/dist/sheet/sheet.module.scss +143 -0
- package/dist/snackbars/_snackbars.scss +31 -0
- package/dist/snackbars/active-snackbar.component.d.ts +10 -0
- package/dist/snackbars/active-snackbar.component.d.ts.map +1 -0
- package/dist/snackbars/active-snackbar.component.js +25 -0
- package/dist/snackbars/index.d.ts +14 -0
- package/dist/snackbars/index.d.ts.map +1 -0
- package/dist/snackbars/index.js +37 -0
- package/dist/snackbars/snackbar.component.d.ts +23 -0
- package/dist/snackbars/snackbar.component.d.ts.map +1 -0
- package/dist/snackbars/snackbar.component.js +64 -0
- package/dist/snackbars/snackbar.module.scss +30 -0
- package/dist/snackbars/snackbar.stories.js +68 -0
- package/dist/spinner/_spinner.scss +14 -0
- package/dist/spinner/index.d.ts +3 -0
- package/dist/spinner/index.d.ts.map +1 -0
- package/dist/spinner/index.js +10 -0
- package/dist/staggered-menu/index.d.ts +3 -0
- package/dist/staggered-menu/index.d.ts.map +1 -0
- package/dist/staggered-menu/index.js +2 -0
- package/dist/staggered-menu/menu-toggle-button.component.d.ts +22 -0
- package/dist/staggered-menu/menu-toggle-button.component.d.ts.map +1 -0
- package/dist/staggered-menu/menu-toggle-button.component.js +235 -0
- package/dist/staggered-menu/staggered-menu-panel.component.d.ts +57 -0
- package/dist/staggered-menu/staggered-menu-panel.component.d.ts.map +1 -0
- package/dist/staggered-menu/staggered-menu-panel.component.js +389 -0
- package/dist/svg-utils.d.ts +17 -0
- package/dist/svg-utils.d.ts.map +1 -0
- package/dist/svg-utils.js +69 -0
- package/dist/test-utils.d.ts +7 -0
- package/dist/test-utils.d.ts.map +1 -0
- package/dist/test-utils.js +17 -0
- package/dist/toasts/_toasts.scss +22 -0
- package/dist/toasts/active-toasts.component.d.ts +10 -0
- package/dist/toasts/active-toasts.component.d.ts.map +1 -0
- package/dist/toasts/active-toasts.component.js +27 -0
- package/dist/toasts/index.d.ts +14 -0
- package/dist/toasts/index.d.ts.map +1 -0
- package/dist/toasts/index.js +39 -0
- package/dist/toasts/toast-kind.config.d.ts +15 -0
- package/dist/toasts/toast-kind.config.d.ts.map +1 -0
- package/dist/toasts/toast-kind.config.js +33 -0
- package/dist/toasts/toast-progress-bar.component.d.ts +13 -0
- package/dist/toasts/toast-progress-bar.component.d.ts.map +1 -0
- package/dist/toasts/toast-progress-bar.component.js +36 -0
- package/dist/toasts/toast.component.d.ts +24 -0
- package/dist/toasts/toast.component.d.ts.map +1 -0
- package/dist/toasts/toast.component.js +175 -0
- package/dist/toasts/toast.module.scss +181 -0
- package/dist/toasts/toast.stories.js +112 -0
- package/dist/toasts/toast.types.d.ts +45 -0
- package/dist/toasts/toast.types.d.ts.map +1 -0
- package/dist/toasts/toast.types.js +1 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +17 -0
- package/dist/workspaces/action-menu-button/action-menu-button.component.d.ts +16 -0
- package/dist/workspaces/action-menu-button/action-menu-button.component.d.ts.map +1 -0
- package/dist/workspaces/action-menu-button/action-menu-button.component.js +79 -0
- package/dist/workspaces/action-menu-button/action-menu-button.module.scss +111 -0
- package/dist/workspaces/container/action-menu.component.d.ts +10 -0
- package/dist/workspaces/container/action-menu.component.d.ts.map +1 -0
- package/dist/workspaces/container/action-menu.component.js +40 -0
- package/dist/workspaces/container/action-menu.module.scss +89 -0
- package/dist/workspaces/container/workspace-container.component.d.ts +68 -0
- package/dist/workspaces/container/workspace-container.component.d.ts.map +1 -0
- package/dist/workspaces/container/workspace-container.component.js +227 -0
- package/dist/workspaces/container/workspace-renderer.component.d.ts +9 -0
- package/dist/workspaces/container/workspace-renderer.component.d.ts.map +1 -0
- package/dist/workspaces/container/workspace-renderer.component.js +46 -0
- package/dist/workspaces/container/workspace.module.scss +276 -0
- package/dist/workspaces/index.d.ts +6 -0
- package/dist/workspaces/index.d.ts.map +1 -0
- package/dist/workspaces/index.js +5 -0
- package/dist/workspaces/notification/workspace-notification.component.d.ts +7 -0
- package/dist/workspaces/notification/workspace-notification.component.d.ts.map +1 -0
- package/dist/workspaces/notification/workspace-notification.component.js +89 -0
- package/dist/workspaces/notification/workspace-notification.module.scss +5 -0
- package/dist/workspaces/public.d.ts +5 -0
- package/dist/workspaces/public.d.ts.map +1 -0
- package/dist/workspaces/public.js +3 -0
- package/dist/workspaces/workspace-sidebar-store/useWorkspaceGroupStore.d.ts +12 -0
- package/dist/workspaces/workspace-sidebar-store/useWorkspaceGroupStore.d.ts.map +1 -0
- package/dist/workspaces/workspace-sidebar-store/useWorkspaceGroupStore.js +38 -0
- package/dist/workspaces/workspaces.d.ts +254 -0
- package/dist/workspaces/workspaces.d.ts.map +1 -0
- package/dist/workspaces/workspaces.js +504 -0
- package/dist/workspaces2/action-menu2/action-menu-button2.component.d.ts +38 -0
- package/dist/workspaces2/action-menu2/action-menu-button2.component.d.ts.map +1 -0
- package/dist/workspaces2/action-menu2/action-menu-button2.component.js +112 -0
- package/dist/workspaces2/action-menu2/action-menu-button2.module.scss +113 -0
- package/dist/workspaces2/action-menu2/action-menu2.component.d.ts +17 -0
- package/dist/workspaces2/action-menu2/action-menu2.component.d.ts.map +1 -0
- package/dist/workspaces2/action-menu2/action-menu2.component.js +46 -0
- package/dist/workspaces2/action-menu2/action-menu2.module.scss +87 -0
- package/dist/workspaces2/active-workspace-window.component.d.ts +12 -0
- package/dist/workspaces2/active-workspace-window.component.d.ts.map +1 -0
- package/dist/workspaces2/active-workspace-window.component.js +150 -0
- package/dist/workspaces2/index.d.ts +4 -0
- package/dist/workspaces2/index.d.ts.map +1 -0
- package/dist/workspaces2/index.js +3 -0
- package/dist/workspaces2/scope-utils.d.ts +10 -0
- package/dist/workspaces2/scope-utils.d.ts.map +1 -0
- package/dist/workspaces2/scope-utils.js +30 -0
- package/dist/workspaces2/workspace-windows-and-menu.component.d.ts +2 -0
- package/dist/workspaces2/workspace-windows-and-menu.component.d.ts.map +1 -0
- package/dist/workspaces2/workspace-windows-and-menu.component.js +82 -0
- package/dist/workspaces2/workspace-windows-and-menu.module.scss +32 -0
- package/dist/workspaces2/workspace2-close-prompt.modal.d.ts +12 -0
- package/dist/workspaces2/workspace2-close-prompt.modal.d.ts.map +1 -0
- package/dist/workspaces2/workspace2-close-prompt.modal.js +45 -0
- package/dist/workspaces2/workspace2-close-prompt.module.scss +8 -0
- package/dist/workspaces2/workspace2.component.d.ts +51 -0
- package/dist/workspaces2/workspace2.component.d.ts.map +1 -0
- package/dist/workspaces2/workspace2.component.js +160 -0
- package/dist/workspaces2/workspace2.d.ts +187 -0
- package/dist/workspaces2/workspace2.d.ts.map +1 -0
- package/dist/workspaces2/workspace2.js +566 -0
- package/dist/workspaces2/workspace2.module.scss +228 -0
- package/mock-jest.tsx +220 -0
- package/mock.tsx +222 -0
- package/package.json +146 -0
- package/src/_vars.scss +111 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
/** @module @category Workspace */ import { useMemo } from "react";
|
|
2
|
+
import { getWorkspaceGroupRegistration, getWorkspaceRegistration } from "@egen-civitas/esm-extensions";
|
|
3
|
+
import { navigate } from "@egen-civitas/esm-navigation";
|
|
4
|
+
import { getGlobalStore, createGlobalStore } from "@egen-civitas/esm-state";
|
|
5
|
+
import { getCoreTranslation } from "@egen-civitas/esm-translations";
|
|
6
|
+
import { useStore } from "@egen-civitas/esm-react-utils";
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param name Name of the workspace
|
|
10
|
+
* @param ignoreChanges If set to true, the "unsaved changes" modal will never be shown, even if the `promptBeforeClosing` function returns true. The user will not be prompted before closing.
|
|
11
|
+
* @returns true if the workspace can be closed.
|
|
12
|
+
*/ export function canCloseWorkspaceWithoutPrompting(name, ignoreChanges = false) {
|
|
13
|
+
if (ignoreChanges) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
const promptBeforeFn = getPromptBeforeClosingFcn(name);
|
|
17
|
+
return !promptBeforeFn || !promptBeforeFn();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Closes a workspace group and performs cleanup operations.
|
|
21
|
+
*
|
|
22
|
+
* @param groupName - The name of the workspace group to close
|
|
23
|
+
* @param onWorkspaceCloseup - Optional callback function to execute after closing the workspace group
|
|
24
|
+
* @returns void, or exits early if the current workspace group name doesn't match the provided group name
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* This function performs the following operations:
|
|
28
|
+
* - Validates if the provided group name matches the current workspace group
|
|
29
|
+
* - Closes all workspaces associated with the group
|
|
30
|
+
* - Clears the workspace group store state
|
|
31
|
+
* - Executes cleanup function if defined in the workspace group
|
|
32
|
+
* - Updates the main workspace store to remove the workspace group
|
|
33
|
+
* - Calls the optional closeup callback if provided
|
|
34
|
+
*
|
|
35
|
+
* @deprecated migrate to workspace v2 and use closeWorkspaceGroup2 instead. See:
|
|
36
|
+
* https://egen.atlassian.net/wiki/spaces/docs/pages/615677981/Workspace+v2+Migration+Guide
|
|
37
|
+
*/ function closeWorkspaceGroup(groupName, onWorkspaceCloseup) {
|
|
38
|
+
const store = getWorkspaceStore();
|
|
39
|
+
const currentWorkspaceGroup = store.getState()?.workspaceGroup;
|
|
40
|
+
const currentGroupName = currentWorkspaceGroup?.name;
|
|
41
|
+
if (!currentGroupName || groupName !== currentGroupName) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const filter = currentGroupName ? (workspace)=>workspace.currentWorkspaceGroup === currentGroupName : ()=>true;
|
|
45
|
+
closeAllWorkspaces(()=>{
|
|
46
|
+
// Clearing the workspace group and respective store if the new workspace is not part of the current group, which is handled in the `launchWorkspace` function.
|
|
47
|
+
const workspaceGroupStore = getWorkspaceGroupStore(groupName);
|
|
48
|
+
if (workspaceGroupStore) {
|
|
49
|
+
workspaceGroupStore.setState({}, true);
|
|
50
|
+
const unsubscribe = workspaceGroupStore.subscribe(()=>{});
|
|
51
|
+
unsubscribe();
|
|
52
|
+
}
|
|
53
|
+
if (typeof currentWorkspaceGroup?.cleanup === 'function') {
|
|
54
|
+
currentWorkspaceGroup.cleanup();
|
|
55
|
+
}
|
|
56
|
+
store.setState((prev)=>({
|
|
57
|
+
...prev,
|
|
58
|
+
workspaceGroup: undefined
|
|
59
|
+
}));
|
|
60
|
+
if (typeof onWorkspaceCloseup === 'function') {
|
|
61
|
+
onWorkspaceCloseup();
|
|
62
|
+
}
|
|
63
|
+
}, filter);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Launches a workspace group with the specified name and configuration.
|
|
67
|
+
* If there are any open workspaces, it will first close them before launching the new workspace group.
|
|
68
|
+
*
|
|
69
|
+
* @param groupName - The name of the workspace group to launch
|
|
70
|
+
* @param args - Configuration object for launching the workspace group
|
|
71
|
+
* @param args.state - The initial state for the workspace group
|
|
72
|
+
* @param args.onWorkspaceGroupLaunch - Optional callback function to be executed after the workspace group is launched
|
|
73
|
+
* @param args.workspaceGroupCleanup - Optional cleanup function to be executed when the workspace group is closed
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* launchWorkspaceGroup("myGroup", {
|
|
77
|
+
* state: initialState,
|
|
78
|
+
* onWorkspaceGroupLaunch: () => console.log("Workspace group launched"),
|
|
79
|
+
* workspaceGroupCleanup: () => console.log("Cleaning up workspace group")
|
|
80
|
+
* });
|
|
81
|
+
*
|
|
82
|
+
* @deprecated migrate to workspace v2 and use launchWorkspaceGroup2 instead. See:
|
|
83
|
+
* https://egen.atlassian.net/wiki/spaces/docs/pages/615677981/Workspace+v2+Migration+Guide
|
|
84
|
+
*/ export function launchWorkspaceGroup(groupName, args) {
|
|
85
|
+
const workspaceGroupRegistration = getWorkspaceGroupRegistration(groupName);
|
|
86
|
+
const { state, onWorkspaceGroupLaunch, workspaceGroupCleanup, workspaceToLaunch } = args;
|
|
87
|
+
const store = getWorkspaceStore();
|
|
88
|
+
if (store.getState().openWorkspaces.length) {
|
|
89
|
+
const workspaceGroup = store.getState().workspaceGroup;
|
|
90
|
+
if (workspaceGroup) {
|
|
91
|
+
closeWorkspaceGroup(workspaceGroup?.name, ()=>{
|
|
92
|
+
launchWorkspaceGroup(groupName, args);
|
|
93
|
+
});
|
|
94
|
+
} else {
|
|
95
|
+
closeAllWorkspaces(()=>{
|
|
96
|
+
launchWorkspaceGroup(groupName, args);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
store.setState((prev)=>({
|
|
101
|
+
...prev,
|
|
102
|
+
workspaceGroup: {
|
|
103
|
+
name: groupName,
|
|
104
|
+
members: workspaceGroupRegistration.members,
|
|
105
|
+
cleanup: workspaceGroupCleanup
|
|
106
|
+
}
|
|
107
|
+
}));
|
|
108
|
+
getWorkspaceGroupStore(groupName, state);
|
|
109
|
+
onWorkspaceGroupLaunch?.();
|
|
110
|
+
if (workspaceToLaunch) {
|
|
111
|
+
launchWorkspace(workspaceToLaunch.name, workspaceToLaunch.additionalProps ?? {});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function promptBeforeLaunchingWorkspace(workspace, newWorkspaceDetails) {
|
|
116
|
+
const { name, additionalProps } = newWorkspaceDetails;
|
|
117
|
+
const newWorkspaceRegistration = getWorkspaceRegistration(name);
|
|
118
|
+
const proceed = ()=>{
|
|
119
|
+
closeWorkspace(workspace.name, {
|
|
120
|
+
ignoreChanges: true,
|
|
121
|
+
// Calling the launchWorkspace again, since one of the `if` case
|
|
122
|
+
// might resolve, but we need to check all the cases before launching the form.
|
|
123
|
+
onWorkspaceClose: ()=>launchWorkspace(name, additionalProps),
|
|
124
|
+
// If the new workspace is of the same sidebar group, then we don't need to clear the workspace group store.
|
|
125
|
+
closeWorkspaceGroup: false
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
if (!canCloseWorkspaceWithoutPrompting(workspace.name)) {
|
|
129
|
+
showWorkspacePrompts('closing-workspace-launching-new-workspace', proceed, workspace.title ?? workspace.name);
|
|
130
|
+
} else {
|
|
131
|
+
proceed();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* This launches a workspace by its name. The workspace must have been registered.
|
|
136
|
+
* Workspaces should be registered in the `routes.json` file.
|
|
137
|
+
*
|
|
138
|
+
* For the workspace to appear, there must be either a `<WorkspaceOverlay />` or
|
|
139
|
+
* a `<WorkspaceWindow />` component rendered.
|
|
140
|
+
*
|
|
141
|
+
* The behavior of this function is as follows:
|
|
142
|
+
*
|
|
143
|
+
* - If no workspaces are open, or if no other workspaces with the same type are open,
|
|
144
|
+
* it will be opened and focused.
|
|
145
|
+
* - If a workspace with the same name is already open, it will be displayed/focused,
|
|
146
|
+
* if it was not already.
|
|
147
|
+
* - If a workspace is launched and a workspace which cannot be hidden is already open,
|
|
148
|
+
* a confirmation modal will pop up warning about closing the currently open workspace.
|
|
149
|
+
* - If another workspace with the same type is open, the workspace will be brought to
|
|
150
|
+
* the front and then a confirmation modal will pop up warning about closing the opened
|
|
151
|
+
* workspace
|
|
152
|
+
*
|
|
153
|
+
* Note that this function just manipulates the workspace store. The UI logic is handled
|
|
154
|
+
* by the components that display workspaces.
|
|
155
|
+
*
|
|
156
|
+
* Additional props can be passed to the workspace component being launched. Passing a
|
|
157
|
+
* prop named `workspaceTitle` will override the title of the workspace.
|
|
158
|
+
*
|
|
159
|
+
* @param name The name of the workspace to launch
|
|
160
|
+
* @param additionalProps Props to pass to the workspace component being launched. Passing
|
|
161
|
+
* a prop named `workspaceTitle` will override the title of the workspace.
|
|
162
|
+
*
|
|
163
|
+
* @deprecated migrate to workspace v2 and use launchWorkspace2 instead. See:
|
|
164
|
+
* https://egen.atlassian.net/wiki/spaces/docs/pages/615677981/Workspace+v2+Migration+Guide
|
|
165
|
+
*/ export function launchWorkspace(name, additionalProps) {
|
|
166
|
+
const store = getWorkspaceStore();
|
|
167
|
+
const workspace = getWorkspaceRegistration(name);
|
|
168
|
+
const currentWorkspaceGroup = store.getState().workspaceGroup;
|
|
169
|
+
if (currentWorkspaceGroup && !currentWorkspaceGroup.members?.includes(name)) {
|
|
170
|
+
closeWorkspaceGroup(currentWorkspaceGroup.name, ()=>{
|
|
171
|
+
launchWorkspace(name, additionalProps);
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const currentGroupName = store.getState().workspaceGroup?.name;
|
|
176
|
+
const newWorkspace = {
|
|
177
|
+
...workspace,
|
|
178
|
+
title: getWorkspaceTitle(workspace, additionalProps),
|
|
179
|
+
closeWorkspace: (options = {})=>closeWorkspace(name, options),
|
|
180
|
+
closeWorkspaceWithSavedChanges: (options)=>closeWorkspace(name, {
|
|
181
|
+
ignoreChanges: true,
|
|
182
|
+
...options
|
|
183
|
+
}),
|
|
184
|
+
promptBeforeClosing: (testFcn)=>promptBeforeClosing(name, testFcn),
|
|
185
|
+
setTitle: (title, titleNode)=>{
|
|
186
|
+
newWorkspace.title = title;
|
|
187
|
+
newWorkspace.titleNode = titleNode;
|
|
188
|
+
store.setState((state)=>{
|
|
189
|
+
const openWorkspaces = state.openWorkspaces.map((w)=>w.name === name ? newWorkspace : w);
|
|
190
|
+
return {
|
|
191
|
+
...state,
|
|
192
|
+
openWorkspaces
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
currentWorkspaceGroup: currentGroupName,
|
|
197
|
+
additionalProps: additionalProps ?? {}
|
|
198
|
+
};
|
|
199
|
+
if (currentGroupName) {
|
|
200
|
+
getWorkspaceGroupStore(currentGroupName, additionalProps);
|
|
201
|
+
}
|
|
202
|
+
function updateStoreWithNewWorkspace(workspaceToBeAdded, restOfTheWorkspaces) {
|
|
203
|
+
store.setState((state)=>{
|
|
204
|
+
const openWorkspaces = [
|
|
205
|
+
workspaceToBeAdded,
|
|
206
|
+
...restOfTheWorkspaces ?? state.openWorkspaces
|
|
207
|
+
];
|
|
208
|
+
let workspaceWindowState = getUpdatedWorkspaceWindowState(workspaceToBeAdded);
|
|
209
|
+
return {
|
|
210
|
+
...state,
|
|
211
|
+
openWorkspaces,
|
|
212
|
+
workspaceWindowState
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
const openWorkspaces = store.getState().openWorkspaces;
|
|
217
|
+
const workspaceIndexInOpenWorkspaces = openWorkspaces.findIndex((w)=>w.name === name);
|
|
218
|
+
const isWorkspaceAlreadyOpen = workspaceIndexInOpenWorkspaces >= 0;
|
|
219
|
+
const openedWorkspaceWithSameType = openWorkspaces.find((w)=>w.type == newWorkspace.type);
|
|
220
|
+
if (openWorkspaces.length === 0) {
|
|
221
|
+
updateStoreWithNewWorkspace(newWorkspace);
|
|
222
|
+
} else if (!openWorkspaces[0].canHide && workspaceIndexInOpenWorkspaces !== 0) {
|
|
223
|
+
promptBeforeLaunchingWorkspace(openWorkspaces[0], {
|
|
224
|
+
name,
|
|
225
|
+
additionalProps
|
|
226
|
+
});
|
|
227
|
+
} else if (isWorkspaceAlreadyOpen) {
|
|
228
|
+
const openWorkspace = openWorkspaces[workspaceIndexInOpenWorkspaces];
|
|
229
|
+
// Create a new object reference so that WorkspaceRenderer's useMemo
|
|
230
|
+
// detects the change and re-renders with the updated additionalProps.
|
|
231
|
+
const updatedWorkspace = {
|
|
232
|
+
...openWorkspace,
|
|
233
|
+
additionalProps: newWorkspace.additionalProps,
|
|
234
|
+
// Only update the title if it hasn't been set by `setTitle`
|
|
235
|
+
...openWorkspace.title === getWorkspaceTitle(openWorkspace, openWorkspace.additionalProps) && {
|
|
236
|
+
title: getWorkspaceTitle(newWorkspace, newWorkspace.additionalProps)
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const restOfTheWorkspaces = openWorkspaces.filter((w)=>w.name != name);
|
|
240
|
+
updateStoreWithNewWorkspace(updatedWorkspace, restOfTheWorkspaces);
|
|
241
|
+
} else if (openedWorkspaceWithSameType) {
|
|
242
|
+
const restOfTheWorkspaces = store.getState().openWorkspaces.filter((w)=>w.type != newWorkspace.type);
|
|
243
|
+
updateStoreWithNewWorkspace(openedWorkspaceWithSameType, restOfTheWorkspaces);
|
|
244
|
+
promptBeforeLaunchingWorkspace(openedWorkspaceWithSameType, {
|
|
245
|
+
name,
|
|
246
|
+
additionalProps
|
|
247
|
+
});
|
|
248
|
+
} else {
|
|
249
|
+
updateStoreWithNewWorkspace(newWorkspace);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Use this function to navigate to a new page and launch a workspace on that page.
|
|
254
|
+
*
|
|
255
|
+
* @param options The options for navigating and launching the workspace.
|
|
256
|
+
* @param options.targetUrl The URL to navigate to. Will be passed to [[navigate]].
|
|
257
|
+
* @param options.contextKey The context key used by the target page.
|
|
258
|
+
* @param options.workspaceName The name of the workspace to launch.
|
|
259
|
+
* @param options.additionalProps Additional props to pass to the workspace component being launched.
|
|
260
|
+
*
|
|
261
|
+
* @deprecated migrate to workspace v2 and call launchWorkspace2 instead. See:
|
|
262
|
+
* https://egen.atlassian.net/wiki/spaces/docs/pages/615677981/Workspace+v2+Migration+Guide
|
|
263
|
+
*/ export function navigateAndLaunchWorkspace({ targetUrl, contextKey, workspaceName, additionalProps }) {
|
|
264
|
+
changeWorkspaceContext(contextKey);
|
|
265
|
+
launchWorkspace(workspaceName, additionalProps);
|
|
266
|
+
navigate({
|
|
267
|
+
to: targetUrl
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
const promptBeforeClosingFcns = {};
|
|
271
|
+
export function promptBeforeClosing(workspaceName, testFcn) {
|
|
272
|
+
promptBeforeClosingFcns[workspaceName] = testFcn;
|
|
273
|
+
}
|
|
274
|
+
export function getPromptBeforeClosingFcn(workspaceName) {
|
|
275
|
+
return promptBeforeClosingFcns[workspaceName];
|
|
276
|
+
}
|
|
277
|
+
export function cancelPrompt() {
|
|
278
|
+
const store = getWorkspaceStore();
|
|
279
|
+
const state = store.getState();
|
|
280
|
+
store.setState({
|
|
281
|
+
...state,
|
|
282
|
+
prompt: null
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
const defaultOptions = {
|
|
286
|
+
ignoreChanges: false,
|
|
287
|
+
onWorkspaceClose: ()=>{},
|
|
288
|
+
closeWorkspaceGroup: true
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Function to close an opened workspace
|
|
292
|
+
* @param name Workspace registration name
|
|
293
|
+
* @param options Options to close workspace
|
|
294
|
+
*
|
|
295
|
+
* @deprecated migrate to workspace v2 and call closeWorkspace from Workspace2DefinitionProps instead. See:
|
|
296
|
+
* https://egen.atlassian.net/wiki/spaces/docs/pages/615677981/Workspace+v2+Migration+Guide
|
|
297
|
+
*/ export function closeWorkspace(name, options = {}) {
|
|
298
|
+
options = {
|
|
299
|
+
...defaultOptions,
|
|
300
|
+
...options
|
|
301
|
+
};
|
|
302
|
+
const store = getWorkspaceStore();
|
|
303
|
+
const updateStoreWithClosedWorkspace = ()=>{
|
|
304
|
+
const state = store.getState();
|
|
305
|
+
const workspaceToBeClosed = state.openWorkspaces.find((w)=>w.name === name);
|
|
306
|
+
const newOpenWorkspaces = state.openWorkspaces.filter((w)=>w.name != name);
|
|
307
|
+
const workspaceGroupName = store.getState().workspaceGroup?.name;
|
|
308
|
+
if (workspaceGroupName && options.closeWorkspaceGroup) {
|
|
309
|
+
closeWorkspaceGroup(workspaceGroupName);
|
|
310
|
+
}
|
|
311
|
+
// ensure closed workspace will not prompt
|
|
312
|
+
promptBeforeClosing(name, ()=>false);
|
|
313
|
+
store.setState((prev)=>({
|
|
314
|
+
...prev,
|
|
315
|
+
prompt: null,
|
|
316
|
+
openWorkspaces: newOpenWorkspaces,
|
|
317
|
+
workspaceWindowState: getUpdatedWorkspaceWindowState(newOpenWorkspaces?.[0])
|
|
318
|
+
}));
|
|
319
|
+
options?.onWorkspaceClose?.();
|
|
320
|
+
};
|
|
321
|
+
if (!canCloseWorkspaceWithoutPrompting(name, options?.ignoreChanges)) {
|
|
322
|
+
const currentName = getWorkspaceRegistration(name).title ?? name;
|
|
323
|
+
showWorkspacePrompts('closing-workspace', updateStoreWithClosedWorkspace, currentName);
|
|
324
|
+
return false;
|
|
325
|
+
} else {
|
|
326
|
+
updateStoreWithClosedWorkspace();
|
|
327
|
+
return true;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* The set of workspaces is specific to a particular page. This function
|
|
332
|
+
* should be used when transitioning to a new page. If the current
|
|
333
|
+
* workspace data is for a different page, the workspace state is cleared.
|
|
334
|
+
*
|
|
335
|
+
* This is called by the workspace components when they mount.
|
|
336
|
+
* @internal
|
|
337
|
+
*
|
|
338
|
+
* @param contextKey An arbitrary key to identify the current page
|
|
339
|
+
*/ export function changeWorkspaceContext(contextKey) {
|
|
340
|
+
const store = getWorkspaceStore();
|
|
341
|
+
const state = store.getState();
|
|
342
|
+
if (state.context != contextKey) {
|
|
343
|
+
store.setState({
|
|
344
|
+
context: contextKey,
|
|
345
|
+
openWorkspaces: [],
|
|
346
|
+
prompt: null
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
const initialState = {
|
|
351
|
+
context: '',
|
|
352
|
+
openWorkspaces: [],
|
|
353
|
+
prompt: null,
|
|
354
|
+
workspaceWindowState: 'normal',
|
|
355
|
+
workspaceGroup: undefined
|
|
356
|
+
};
|
|
357
|
+
export const workspaceStore = createGlobalStore('workspace', initialState);
|
|
358
|
+
export function getWorkspaceStore() {
|
|
359
|
+
return workspaceStore;
|
|
360
|
+
}
|
|
361
|
+
export function updateWorkspaceWindowState(value) {
|
|
362
|
+
const store = getWorkspaceStore();
|
|
363
|
+
const state = store.getState();
|
|
364
|
+
store.setState({
|
|
365
|
+
...state,
|
|
366
|
+
workspaceWindowState: value
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
function getUpdatedWorkspaceWindowState(workspaceAtTop) {
|
|
370
|
+
return workspaceAtTop?.preferredWindowSize ?? 'normal';
|
|
371
|
+
}
|
|
372
|
+
export function closeAllWorkspaces(onClosingWorkspaces = ()=>{}, filter = ()=>true) {
|
|
373
|
+
const store = getWorkspaceStore();
|
|
374
|
+
const canCloseAllWorkspaces = store.getState().openWorkspaces.filter(filter).every(({ name })=>{
|
|
375
|
+
return canCloseWorkspaceWithoutPrompting(name);
|
|
376
|
+
});
|
|
377
|
+
const updateWorkspaceStore = ()=>{
|
|
378
|
+
resetWorkspaceStore();
|
|
379
|
+
onClosingWorkspaces?.();
|
|
380
|
+
};
|
|
381
|
+
if (!canCloseAllWorkspaces) {
|
|
382
|
+
showWorkspacePrompts('closing-all-workspaces', updateWorkspaceStore);
|
|
383
|
+
} else {
|
|
384
|
+
updateWorkspaceStore();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* @deprecated migrate to workspace v2. See:
|
|
389
|
+
* https://egen.atlassian.net/wiki/spaces/docs/pages/615677981/Workspace+v2+Migration+Guide
|
|
390
|
+
*/ export function useWorkspaces() {
|
|
391
|
+
const { workspaceWindowState, openWorkspaces, prompt, workspaceGroup } = useStore(workspaceStore);
|
|
392
|
+
const memoisedResults = useMemo(()=>{
|
|
393
|
+
return {
|
|
394
|
+
active: openWorkspaces.length > 0,
|
|
395
|
+
prompt,
|
|
396
|
+
workspaceWindowState,
|
|
397
|
+
workspaces: openWorkspaces,
|
|
398
|
+
workspaceGroup
|
|
399
|
+
};
|
|
400
|
+
}, [
|
|
401
|
+
openWorkspaces,
|
|
402
|
+
workspaceWindowState,
|
|
403
|
+
prompt,
|
|
404
|
+
workspaceGroup
|
|
405
|
+
]);
|
|
406
|
+
return memoisedResults;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Sets the current prompt according to the prompt type.
|
|
410
|
+
* @param promptType Determines the text and behavior of the prompt
|
|
411
|
+
* @param onConfirmation Function to be called after the user confirms to close the workspace
|
|
412
|
+
* @param workspaceTitle Workspace title to be shown in the prompt
|
|
413
|
+
* @returns
|
|
414
|
+
*/ export function showWorkspacePrompts(promptType, onConfirmation = ()=>{}, workspaceTitle = '') {
|
|
415
|
+
const store = getWorkspaceStore();
|
|
416
|
+
let prompt;
|
|
417
|
+
switch(promptType){
|
|
418
|
+
case 'closing-workspace':
|
|
419
|
+
{
|
|
420
|
+
prompt = {
|
|
421
|
+
title: getCoreTranslation('unsavedChangesTitleText', 'Unsaved changes'),
|
|
422
|
+
body: getCoreTranslation('unsavedChangesInOpenedWorkspace', `You may have unsaved changes in the opened workspace. Do you want to discard these changes?`),
|
|
423
|
+
onConfirm: ()=>{
|
|
424
|
+
onConfirmation?.();
|
|
425
|
+
},
|
|
426
|
+
confirmText: getCoreTranslation('discard', 'Discard')
|
|
427
|
+
};
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
case 'closing-all-workspaces':
|
|
431
|
+
{
|
|
432
|
+
const workspacesNotClosed = store.getState().openWorkspaces.filter(({ name })=>!canCloseWorkspaceWithoutPrompting(name)).map(({ title }, indx)=>`${indx + 1}. ${title}`);
|
|
433
|
+
prompt = {
|
|
434
|
+
title: getCoreTranslation('closingAllWorkspacesPromptTitle', 'You have unsaved changes'),
|
|
435
|
+
body: getCoreTranslation('closingAllWorkspacesPromptBody', 'There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}', {
|
|
436
|
+
workspaceNames: workspacesNotClosed.join(',')
|
|
437
|
+
}),
|
|
438
|
+
onConfirm: ()=>{
|
|
439
|
+
onConfirmation?.();
|
|
440
|
+
},
|
|
441
|
+
confirmText: getCoreTranslation('closeAllOpenedWorkspaces', 'Discard changes in {{count}} workspaces', {
|
|
442
|
+
count: workspacesNotClosed.length
|
|
443
|
+
})
|
|
444
|
+
};
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
case 'closing-workspace-launching-new-workspace':
|
|
448
|
+
{
|
|
449
|
+
prompt = {
|
|
450
|
+
title: getCoreTranslation('unsavedChangesTitleText', 'Unsaved changes'),
|
|
451
|
+
body: getCoreTranslation('unsavedChangesInWorkspace', 'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.', {
|
|
452
|
+
workspaceName: workspaceTitle
|
|
453
|
+
}),
|
|
454
|
+
onConfirm: ()=>{
|
|
455
|
+
store.setState((state)=>({
|
|
456
|
+
...state,
|
|
457
|
+
prompt: null
|
|
458
|
+
}));
|
|
459
|
+
onConfirmation?.();
|
|
460
|
+
},
|
|
461
|
+
confirmText: getCoreTranslation('openAnyway', 'Open anyway')
|
|
462
|
+
};
|
|
463
|
+
break;
|
|
464
|
+
}
|
|
465
|
+
default:
|
|
466
|
+
{
|
|
467
|
+
console.error(`Workspace system trying to open unknown prompt type "${promptType}" in function "showWorkspacePrompts"`);
|
|
468
|
+
onConfirmation?.();
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
store.setState((state)=>({
|
|
473
|
+
...state,
|
|
474
|
+
prompt
|
|
475
|
+
}));
|
|
476
|
+
}
|
|
477
|
+
function getWorkspaceTitle(workspace, additionalProps) {
|
|
478
|
+
return additionalProps?.['workspaceTitle'] ?? workspace.title;
|
|
479
|
+
}
|
|
480
|
+
export function resetWorkspaceStore() {
|
|
481
|
+
getWorkspaceStore().setState(initialState);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* The workspace group store is a store that is specific to the workspace group.
|
|
485
|
+
* If the workspace has its own sidebar, the store will be created.
|
|
486
|
+
* This store can be used to store data that is specific to the workspace group.
|
|
487
|
+
* The store will be same for all the workspaces with same group name.
|
|
488
|
+
*
|
|
489
|
+
* For workspaces launched without a group, the store will be undefined.
|
|
490
|
+
*
|
|
491
|
+
* The store will be cleared when all the workspaces with the store's group name are closed.
|
|
492
|
+
*/ export function getWorkspaceGroupStore(workspaceGroupName, additionalProps = {}) {
|
|
493
|
+
if (!workspaceGroupName || workspaceGroupName === 'default') {
|
|
494
|
+
return undefined;
|
|
495
|
+
}
|
|
496
|
+
const store = getGlobalStore(workspaceGroupName, {});
|
|
497
|
+
if (additionalProps) {
|
|
498
|
+
store.setState((prev)=>({
|
|
499
|
+
...prev,
|
|
500
|
+
...additionalProps
|
|
501
|
+
}));
|
|
502
|
+
}
|
|
503
|
+
return store;
|
|
504
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @module @category Workspace */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ActionMenuButtonProps2 {
|
|
4
|
+
icon: (props: object) => JSX.Element;
|
|
5
|
+
label: string;
|
|
6
|
+
tagContent?: string | React.ReactNode;
|
|
7
|
+
workspaceToLaunch: {
|
|
8
|
+
workspaceName: string;
|
|
9
|
+
workspaceProps?: Record<string, any>;
|
|
10
|
+
windowProps?: Record<string, any>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* An optional callback function to run before launching the workspace.
|
|
14
|
+
* If provided, the workspace will only be launched if this function returns true.
|
|
15
|
+
* This can be used to perform checks or prompt the user before launching the workspace.
|
|
16
|
+
* Note that this function does not run if the action button's window is already opened;
|
|
17
|
+
* it will just restore (unhide) the window.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
onBeforeWorkspaceLaunch?: () => Promise<boolean>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The ActionMenuButton2 component is used to render a button in the action menu of a workspace group.
|
|
24
|
+
* The button is associated with a specific workspace window, defined in routes.json of the app with the button.
|
|
25
|
+
* When one or more workspaces within the window are opened, the button will be highlighted:
|
|
26
|
+
* bold blue when the window is focused (un-minimized and in front), green when unfocused.
|
|
27
|
+
* If any workspace in the window has unsaved changes, an exclamation mark will be displayed
|
|
28
|
+
* on top of the icon.
|
|
29
|
+
*
|
|
30
|
+
* On clicked, The button either:
|
|
31
|
+
* 1. hides the workspace window if it is opened and focused; or
|
|
32
|
+
* 2. restores the workspace window if it is opened and unfocused; or
|
|
33
|
+
* 3. launches a workspace from within that window, if the window is not opened.
|
|
34
|
+
*
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
export declare const ActionMenuButton2: React.FC<ActionMenuButtonProps2>;
|
|
38
|
+
//# sourceMappingURL=action-menu-button2.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-menu-button2.component.d.ts","sourceRoot":"","sources":["../../../src/workspaces2/action-menu2/action-menu-button2.component.tsx"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,KAAqB,MAAM,OAAO,CAAC;AA6B1C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,iBAAiB,EAAE;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACnC,CAAC;IAEF;;;;;;;OAOG;IACH,uBAAuB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAClD;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA6E9D,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/** @module @category Workspace */ import React, { useContext } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { Button, IconButton } from "@carbon/react";
|
|
5
|
+
import { ComponentContext, useLayoutType } from "@egen-civitas/esm-react-utils";
|
|
6
|
+
import { launchWorkspace2, useWorkspace2Store } from "../workspace2.js";
|
|
7
|
+
import styles from "./action-menu-button2.module.scss";
|
|
8
|
+
function Tags({ getIcon, hasUnsavedChanges, tagContent }) {
|
|
9
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
10
|
+
children: [
|
|
11
|
+
getIcon({
|
|
12
|
+
size: 16
|
|
13
|
+
}),
|
|
14
|
+
hasUnsavedChanges ? /*#__PURE__*/ _jsx("span", {
|
|
15
|
+
className: styles.interruptedTag,
|
|
16
|
+
children: "!"
|
|
17
|
+
}) : /*#__PURE__*/ _jsx("span", {
|
|
18
|
+
className: styles.countTag,
|
|
19
|
+
children: tagContent
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The ActionMenuButton2 component is used to render a button in the action menu of a workspace group.
|
|
26
|
+
* The button is associated with a specific workspace window, defined in routes.json of the app with the button.
|
|
27
|
+
* When one or more workspaces within the window are opened, the button will be highlighted:
|
|
28
|
+
* bold blue when the window is focused (un-minimized and in front), green when unfocused.
|
|
29
|
+
* If any workspace in the window has unsaved changes, an exclamation mark will be displayed
|
|
30
|
+
* on top of the icon.
|
|
31
|
+
*
|
|
32
|
+
* On clicked, The button either:
|
|
33
|
+
* 1. hides the workspace window if it is opened and focused; or
|
|
34
|
+
* 2. restores the workspace window if it is opened and unfocused; or
|
|
35
|
+
* 3. launches a workspace from within that window, if the window is not opened.
|
|
36
|
+
*
|
|
37
|
+
* @experimental
|
|
38
|
+
*/ export const ActionMenuButton2 = ({ icon: getIcon, label, tagContent, workspaceToLaunch, onBeforeWorkspaceLaunch })=>{
|
|
39
|
+
const layout = useLayoutType();
|
|
40
|
+
const { openedWindows, restoreWindow, hideWindow, isMostRecentlyOpenedWindowHidden } = useWorkspace2Store();
|
|
41
|
+
const { extension } = useContext(ComponentContext);
|
|
42
|
+
const openedWindowIndex = openedWindows.findIndex((w)=>w.windowName === extension?.extensionId);
|
|
43
|
+
// can be undefined if the window is not opened
|
|
44
|
+
const window = openedWindows[openedWindowIndex];
|
|
45
|
+
const isWindowOpened = window != null;
|
|
46
|
+
const isWindowHidden = isWindowOpened && (openedWindowIndex < openedWindows.length - 1 || isMostRecentlyOpenedWindowHidden);
|
|
47
|
+
const isWindowFocused = isWindowOpened && !isWindowHidden;
|
|
48
|
+
const hasUnsavedChanges = window?.openedWorkspaces.some((w)=>w.hasUnsavedChanges) ?? false;
|
|
49
|
+
const onClick = async ()=>{
|
|
50
|
+
if (isWindowOpened) {
|
|
51
|
+
if (isWindowHidden) {
|
|
52
|
+
restoreWindow(window.windowName);
|
|
53
|
+
} else {
|
|
54
|
+
hideWindow();
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
const shouldLaunch = await (onBeforeWorkspaceLaunch?.() ?? true);
|
|
58
|
+
if (shouldLaunch) {
|
|
59
|
+
const { workspaceName, workspaceProps, windowProps } = workspaceToLaunch;
|
|
60
|
+
launchWorkspace2(workspaceName, workspaceProps, windowProps);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
if (layout === 'tablet' || layout === 'phone') {
|
|
65
|
+
return /*#__PURE__*/ _jsxs(Button, {
|
|
66
|
+
className: classNames(styles.container, {
|
|
67
|
+
[styles.active]: isWindowOpened && !isWindowFocused,
|
|
68
|
+
[styles.focused]: isWindowFocused
|
|
69
|
+
}),
|
|
70
|
+
iconDescription: label,
|
|
71
|
+
kind: "ghost",
|
|
72
|
+
onClick: onClick,
|
|
73
|
+
role: "button",
|
|
74
|
+
tabIndex: 0,
|
|
75
|
+
size: "md",
|
|
76
|
+
children: [
|
|
77
|
+
/*#__PURE__*/ _jsx("span", {
|
|
78
|
+
className: styles.elementContainer,
|
|
79
|
+
children: /*#__PURE__*/ _jsx(Tags, {
|
|
80
|
+
hasUnsavedChanges: hasUnsavedChanges,
|
|
81
|
+
getIcon: getIcon,
|
|
82
|
+
tagContent: tagContent
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ _jsx("span", {
|
|
86
|
+
children: label
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return /*#__PURE__*/ _jsx(IconButton, {
|
|
92
|
+
align: "left",
|
|
93
|
+
"aria-label": label,
|
|
94
|
+
className: classNames(styles.container, {
|
|
95
|
+
[styles.active]: isWindowOpened && !isWindowFocused,
|
|
96
|
+
[styles.focused]: isWindowFocused
|
|
97
|
+
}),
|
|
98
|
+
enterDelayMs: 300,
|
|
99
|
+
kind: "ghost",
|
|
100
|
+
label: label,
|
|
101
|
+
onClick: onClick,
|
|
102
|
+
size: "md",
|
|
103
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
104
|
+
className: styles.elementContainer,
|
|
105
|
+
children: /*#__PURE__*/ _jsx(Tags, {
|
|
106
|
+
hasUnsavedChanges: hasUnsavedChanges,
|
|
107
|
+
getIcon: getIcon,
|
|
108
|
+
tagContent: tagContent
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
};
|