@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,566 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { SingleSpaContext } from "single-spa-react";
|
|
3
|
+
import { v4 as uuidV4 } from "uuid";
|
|
4
|
+
import { getGroupByWindowName, getOpenedWindowIndexByWorkspace, getWindowByWorkspaceName, workspace2Store } from "@egen-civitas/esm-extensions";
|
|
5
|
+
import { useStoreWithActions } from "@egen-civitas/esm-react-utils";
|
|
6
|
+
import { shallowEqual } from "@egen-civitas/esm-utils";
|
|
7
|
+
import { showModal } from "../modals/index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Attempts to launch the specified workspace group with the given group props. Note that only one workspace group
|
|
10
|
+
* may be opened at any given time. If a workspace group is already opened, calling `launchWorkspaceGroup2` with
|
|
11
|
+
* either a different group name, or same group name but different incompatible props**, will result in prompting to
|
|
12
|
+
* confirm closing workspaces. If the user confirms, the opened group, along with its windows (and their workspaces), is closed, and
|
|
13
|
+
* the requested group is immediately opened.
|
|
14
|
+
*
|
|
15
|
+
* ** 2 sets of props are compatible if either one is nullish, or if they are shallow equal.
|
|
16
|
+
* @experimental
|
|
17
|
+
* @param groupName
|
|
18
|
+
* @param groupProps
|
|
19
|
+
* @returns a Promise that resolves to true if the specified workspace group with the specified group props
|
|
20
|
+
* is successfully opened, or that it already is opened.
|
|
21
|
+
*/ export async function launchWorkspaceGroup2(groupName, groupProps) {
|
|
22
|
+
const { openedGroup } = workspace2Store.getState();
|
|
23
|
+
if (openedGroup) {
|
|
24
|
+
if (openedGroup.groupName !== groupName || !arePropsCompatible(openedGroup.props, groupProps)) {
|
|
25
|
+
const okToCloseWorkspaces = await promptForClosingWorkspaces({
|
|
26
|
+
reason: 'CLOSE_WORKSPACE_GROUP',
|
|
27
|
+
explicit: false
|
|
28
|
+
});
|
|
29
|
+
if (!okToCloseWorkspaces) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
// else, proceed to open the new group with no openedWindows
|
|
33
|
+
} else {
|
|
34
|
+
// no-op, group with group props is already opened
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
workspace2Store.setState((state)=>({
|
|
39
|
+
...state,
|
|
40
|
+
openedGroup: {
|
|
41
|
+
groupName,
|
|
42
|
+
props: groupProps
|
|
43
|
+
},
|
|
44
|
+
openedWindows: []
|
|
45
|
+
}));
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Closes the workspace group that is currently opened. Note that only one workspace group
|
|
50
|
+
* may be opened at any given time
|
|
51
|
+
* @experimental
|
|
52
|
+
* @param discardUnsavedChanges If true, then the workspace group is forced closed, with no prompt
|
|
53
|
+
* for confirmation for unsaved changes in any opened workspace. This should be used sparingly
|
|
54
|
+
* for clean-up purpose, ex: when exiting an app.
|
|
55
|
+
* @returns a Promise that resolves to true if there is no opened group to begin with or we successfully closed
|
|
56
|
+
* the opened group; false otherwise.
|
|
57
|
+
*/ export async function closeWorkspaceGroup2(discardUnsavedChanges) {
|
|
58
|
+
const state = workspace2Store.getState();
|
|
59
|
+
const { openedGroup, openedWindows } = state;
|
|
60
|
+
if (openedGroup) {
|
|
61
|
+
if (openedWindows.length > 0) {
|
|
62
|
+
const okToCloseWorkspaces = discardUnsavedChanges || await promptForClosingWorkspaces({
|
|
63
|
+
reason: 'CLOSE_WORKSPACE_GROUP',
|
|
64
|
+
explicit: true
|
|
65
|
+
});
|
|
66
|
+
if (!okToCloseWorkspaces) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
workspace2Store.setState((state)=>({
|
|
71
|
+
...state,
|
|
72
|
+
openedGroup: null,
|
|
73
|
+
openedWindows: []
|
|
74
|
+
}));
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
// no openedGroup with begin with, return true
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Attempts to launch the specified workspace with the given workspace props. This also implicitly opens
|
|
82
|
+
* the workspace window to which the workspace belongs (if it's not opened already),
|
|
83
|
+
* and the workspace group to which the window belongs (if it's not opened already).
|
|
84
|
+
*
|
|
85
|
+
* When calling `launchWorkspace2`, we need to also pass in the workspace props. While not required,
|
|
86
|
+
* we can also pass in the window props (shared by other workspaces in the window) and the group props
|
|
87
|
+
* (shared by all windows and their workspaces). Omitting the window props or the group props[^1] means the caller
|
|
88
|
+
* explicitly does not care what the current window props and group props are, and that they may be set
|
|
89
|
+
* by other actions (like calling `launchWorkspace2` on a different workspace with those props passed in)
|
|
90
|
+
* at a later time.
|
|
91
|
+
*
|
|
92
|
+
* If there is already an opened workspace group, and it's not the group the workspace belongs to
|
|
93
|
+
* or has incompatible[^2] group props, then we prompt the user to close the group (and its windows and their workspaces).
|
|
94
|
+
* On user confirm, the existing opened group is closed and the new workspace, along with its window and its group,
|
|
95
|
+
* is opened.
|
|
96
|
+
*
|
|
97
|
+
* If the window is already opened, but with incompatible window props, we prompt the user to close
|
|
98
|
+
* the window (and all its opened workspaces), and reopen the window with (only) the newly requested workspace.
|
|
99
|
+
*
|
|
100
|
+
* If the workspace is already opened, but with incompatible workspace props, we also prompt the user to close
|
|
101
|
+
* the **window** (and all its opened workspaces), and reopen the window with (only) the newly requested workspace.
|
|
102
|
+
* This is true regardless of whether the already opened workspace has any child workspaces.
|
|
103
|
+
*
|
|
104
|
+
* Note that calling this function *never* results in creating a child workspace in the affected window.
|
|
105
|
+
* To do so, we need to call `launchChildWorkspace` instead.
|
|
106
|
+
*
|
|
107
|
+
* [^1] Omitting window or group props is useful for workspaces that don't have ties to the window or group "context" (props).
|
|
108
|
+
* For example, in the patient chart, the visit notes / clinical forms / order basket action menu button all share
|
|
109
|
+
* a "group context" of the current visit. However, the "patient list" action menu button does not need to share that group
|
|
110
|
+
* context, so opening that workspace should not need to cause other workspaces / windows / groups to potentially close.
|
|
111
|
+
* The "patient search" workspace in the queues and ward apps is another example.
|
|
112
|
+
*
|
|
113
|
+
* [^2] 2 sets of props are compatible if either one is nullish, or if they are shallow equal.
|
|
114
|
+
* @experimental
|
|
115
|
+
*/ export async function launchWorkspace2(workspaceName, workspaceProps = null, windowProps = null, groupProps = null) {
|
|
116
|
+
const storeState = workspace2Store.getState();
|
|
117
|
+
if (!storeState.registeredWorkspacesByName[workspaceName]) {
|
|
118
|
+
throw new Error(`Unable to launch workspace ${workspaceName}. Workspace is not registered`);
|
|
119
|
+
}
|
|
120
|
+
const windowDef = getWindowByWorkspaceName(workspaceName);
|
|
121
|
+
if (!windowDef) {
|
|
122
|
+
throw new Error(`Unable to launch workspace ${workspaceName}. Workspace is not registered to a workspace window`);
|
|
123
|
+
}
|
|
124
|
+
const { openedGroup } = storeState;
|
|
125
|
+
const { name: windowName } = windowDef;
|
|
126
|
+
const groupDef = getGroupByWindowName(windowName);
|
|
127
|
+
if (!groupDef) {
|
|
128
|
+
throw new Error(`Unable to launch workspace ${workspaceName}. Workspace window ${windowDef.name} is not registered to a workspace group`);
|
|
129
|
+
}
|
|
130
|
+
const openedWindowIndex = getOpenedWindowIndexByWorkspace(workspaceName);
|
|
131
|
+
const isWindowAlreadyOpened = openedWindowIndex >= 0;
|
|
132
|
+
// if current opened group is not the same as the requested group, or if the group props are different, then prompt for unsaved changes
|
|
133
|
+
if (openedGroup && (openedGroup.groupName !== groupDef.name || !arePropsCompatible(openedGroup.props, groupProps))) {
|
|
134
|
+
const okToCloseWorkspaces = await promptForClosingWorkspaces({
|
|
135
|
+
reason: 'CLOSE_WORKSPACE_GROUP',
|
|
136
|
+
explicit: true
|
|
137
|
+
});
|
|
138
|
+
if (okToCloseWorkspaces) {
|
|
139
|
+
workspace2Store.setState({
|
|
140
|
+
...storeState,
|
|
141
|
+
openedGroup: {
|
|
142
|
+
groupName: groupDef.name,
|
|
143
|
+
props: groupProps
|
|
144
|
+
},
|
|
145
|
+
openedWindows: [
|
|
146
|
+
// discard all opened windows, open a new one with the requested workspace
|
|
147
|
+
// most recently opened action appended to the end
|
|
148
|
+
{
|
|
149
|
+
windowName: windowName,
|
|
150
|
+
openedWorkspaces: [
|
|
151
|
+
newOpenedWorkspace(workspaceName, workspaceProps)
|
|
152
|
+
],
|
|
153
|
+
props: windowProps,
|
|
154
|
+
maximized: false
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
isMostRecentlyOpenedWindowHidden: false
|
|
158
|
+
});
|
|
159
|
+
return true;
|
|
160
|
+
} else {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
} else if (isWindowAlreadyOpened) {
|
|
164
|
+
const openedWindow = storeState.openedWindows[openedWindowIndex];
|
|
165
|
+
const groupProps = storeState.openedGroup?.props ?? {};
|
|
166
|
+
const isMostRecentlyOpenedWindowHidden = storeState.isMostRecentlyOpenedWindowHidden;
|
|
167
|
+
const { openedWorkspaces } = openedWindow;
|
|
168
|
+
if (arePropsCompatible(openedWindow.props, windowProps)) {
|
|
169
|
+
// this case is tricky, this results in restoring the window if:
|
|
170
|
+
// 1. the workspace is opened (but not necessarily as a leaf workspace)
|
|
171
|
+
// 2. the props of the opened workspace is same as workspace props (from the function input)
|
|
172
|
+
//
|
|
173
|
+
// Otherwise, we close all workspaces in this window, and open this newly requested one
|
|
174
|
+
const openedWorkspace = openedWorkspaces.find((w)=>w.workspaceName === workspaceName);
|
|
175
|
+
if (openedWorkspace && arePropsCompatible(openedWorkspace.props, workspaceProps)) {
|
|
176
|
+
// restore the window if it is hidden or not the most recently opened one
|
|
177
|
+
if (isMostRecentlyOpenedWindowHidden || openedWindowIndex !== storeState.openedWindows.length - 1) {
|
|
178
|
+
workspace2Store.setState(workspace2StoreActions.restoreWindow(storeState, windowName));
|
|
179
|
+
}
|
|
180
|
+
return true;
|
|
181
|
+
} else {
|
|
182
|
+
const okToCloseWorkspaces = await promptForClosingWorkspaces({
|
|
183
|
+
reason: 'CLOSE_WORKSPACE',
|
|
184
|
+
explicit: false,
|
|
185
|
+
windowName,
|
|
186
|
+
workspaceName
|
|
187
|
+
});
|
|
188
|
+
if (okToCloseWorkspaces) {
|
|
189
|
+
workspace2Store.setState({
|
|
190
|
+
...storeState,
|
|
191
|
+
openedGroup: {
|
|
192
|
+
groupName: groupDef.name,
|
|
193
|
+
props: storeState?.openedGroup?.props ?? groupProps
|
|
194
|
+
},
|
|
195
|
+
openedWindows: [
|
|
196
|
+
...storeState.openedWindows.filter((_, i)=>i !== openedWindowIndex),
|
|
197
|
+
// most recently opened workspace at the end of the array
|
|
198
|
+
{
|
|
199
|
+
windowName: windowName,
|
|
200
|
+
openedWorkspaces: [
|
|
201
|
+
newOpenedWorkspace(workspaceName, workspaceProps)
|
|
202
|
+
],
|
|
203
|
+
props: openedWindow?.props ?? windowProps,
|
|
204
|
+
maximized: false
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
isMostRecentlyOpenedWindowHidden: false
|
|
208
|
+
});
|
|
209
|
+
return true;
|
|
210
|
+
} else {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
const okToCloseWorkspaces = await promptForClosingWorkspaces({
|
|
216
|
+
reason: 'CLOSE_WINDOW',
|
|
217
|
+
explicit: false,
|
|
218
|
+
windowName
|
|
219
|
+
});
|
|
220
|
+
if (okToCloseWorkspaces) {
|
|
221
|
+
// discard the openedWindows element at openedWindowIndex
|
|
222
|
+
// and create a new one with the requested workspace opened
|
|
223
|
+
workspace2Store.setState({
|
|
224
|
+
...storeState,
|
|
225
|
+
openedGroup: {
|
|
226
|
+
groupName: groupDef.name,
|
|
227
|
+
props: groupProps ?? storeState?.openedGroup?.props
|
|
228
|
+
},
|
|
229
|
+
openedWindows: [
|
|
230
|
+
...storeState.openedWindows.filter((_, i)=>i !== openedWindowIndex),
|
|
231
|
+
// most recently opened workspace at the end of the array
|
|
232
|
+
{
|
|
233
|
+
windowName: windowName,
|
|
234
|
+
openedWorkspaces: [
|
|
235
|
+
newOpenedWorkspace(workspaceName, workspaceProps)
|
|
236
|
+
],
|
|
237
|
+
props: windowProps,
|
|
238
|
+
maximized: false
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
isMostRecentlyOpenedWindowHidden: false
|
|
242
|
+
});
|
|
243
|
+
return true;
|
|
244
|
+
} else {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} else if (groupDef.persistence == 'closable') {
|
|
249
|
+
const okToCloseWorkspaces = await promptForClosingWorkspaces({
|
|
250
|
+
reason: 'CLOSE_OTHER_WINDOWS',
|
|
251
|
+
explicit: false,
|
|
252
|
+
windowNameToSpare: windowDef.name
|
|
253
|
+
});
|
|
254
|
+
if (okToCloseWorkspaces) {
|
|
255
|
+
workspace2Store.setState({
|
|
256
|
+
...storeState,
|
|
257
|
+
openedGroup: {
|
|
258
|
+
groupName: groupDef.name,
|
|
259
|
+
props: groupProps ?? storeState?.openedGroup?.props ?? null
|
|
260
|
+
},
|
|
261
|
+
openedWindows: [
|
|
262
|
+
{
|
|
263
|
+
windowName: windowName,
|
|
264
|
+
openedWorkspaces: [
|
|
265
|
+
newOpenedWorkspace(workspaceName, workspaceProps)
|
|
266
|
+
],
|
|
267
|
+
props: windowProps,
|
|
268
|
+
maximized: false
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
isMostRecentlyOpenedWindowHidden: false
|
|
272
|
+
});
|
|
273
|
+
return true;
|
|
274
|
+
} else {
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
} else {
|
|
278
|
+
workspace2Store.setState({
|
|
279
|
+
...storeState,
|
|
280
|
+
openedGroup: {
|
|
281
|
+
groupName: groupDef.name,
|
|
282
|
+
props: groupProps ?? storeState?.openedGroup?.props ?? null
|
|
283
|
+
},
|
|
284
|
+
openedWindows: [
|
|
285
|
+
...storeState.openedWindows,
|
|
286
|
+
// most recently opened workspace at the end of the array
|
|
287
|
+
{
|
|
288
|
+
windowName: windowName,
|
|
289
|
+
openedWorkspaces: [
|
|
290
|
+
newOpenedWorkspace(workspaceName, workspaceProps)
|
|
291
|
+
],
|
|
292
|
+
props: windowProps,
|
|
293
|
+
maximized: false
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
isMostRecentlyOpenedWindowHidden: false
|
|
297
|
+
});
|
|
298
|
+
return true;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* When we launch a workspace, we may pass in workspace / windows / group props. If the workspace or
|
|
303
|
+
* window or group is currently opened, we have to check whether the current props are compatible with
|
|
304
|
+
* the passed in props. 2 props A and B are compatible if:
|
|
305
|
+
* either one is nullish (because this indicates that the caller does not care about prop incompatibility)
|
|
306
|
+
* neither is nullish, and A and B are shallow equal.
|
|
307
|
+
* @param a props
|
|
308
|
+
* @param b props
|
|
309
|
+
* @returns whether props a and b are compatible
|
|
310
|
+
*/ function arePropsCompatible(a, b) {
|
|
311
|
+
if (a == null || b == null) {
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
314
|
+
return shallowEqual(a, b);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* A user can perform actions that explicitly result in closing workspaces
|
|
318
|
+
* (such that clicking the 'X' button for the workspace or workspace group), or
|
|
319
|
+
* implicitly (by opening a workspace with different props than the one that is already opened).
|
|
320
|
+
* Calls to closeWorkspace2() or closeWorkspaceGroup2() are considered explicit, while calls
|
|
321
|
+
* to launchWorkspace2() or launchWorkspaceGroup2() are considered implicit.
|
|
322
|
+
*
|
|
323
|
+
* This function prompts the user for confirmation to close workspaces with a modal dialog.
|
|
324
|
+
* When the closing is explicit, it prompts for confirmation for affected workspaces with unsaved changes.
|
|
325
|
+
* When the closing is implicit, it prompts for confirmation for all affected workspaces, regardless of
|
|
326
|
+
* whether they have unsaved changes.
|
|
327
|
+
* @experimental
|
|
328
|
+
* @param promptReason
|
|
329
|
+
* @returns a Promise that resolves to true if the user confirmed closing the workspaces; false otherwise.
|
|
330
|
+
*/ export function promptForClosingWorkspaces(promptReason) {
|
|
331
|
+
// if onlyUpToThisWorkspace is provided, we will only loop till we hit that workspace
|
|
332
|
+
function getAffectedWorkspacesInWindow(openedWindow, onlyUpToThisWorkspace) {
|
|
333
|
+
const ret = [];
|
|
334
|
+
for(let i = openedWindow.openedWorkspaces.length - 1; i >= 0; i--){
|
|
335
|
+
const openedWorkspace = openedWindow.openedWorkspaces[i];
|
|
336
|
+
if (openedWorkspace.hasUnsavedChanges) {
|
|
337
|
+
ret.push(openedWorkspace);
|
|
338
|
+
}
|
|
339
|
+
if (onlyUpToThisWorkspace && openedWorkspace.workspaceName === onlyUpToThisWorkspace) {
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return ret;
|
|
344
|
+
}
|
|
345
|
+
const { openedWindows, workspaceTitleByWorkspaceName } = workspace2Store.getState();
|
|
346
|
+
let affectedWorkspaces = [];
|
|
347
|
+
switch(promptReason.reason){
|
|
348
|
+
case 'CLOSE_WORKSPACE_GROUP':
|
|
349
|
+
{
|
|
350
|
+
affectedWorkspaces = openedWindows.flatMap((window)=>getAffectedWorkspacesInWindow(window));
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
case 'CLOSE_WINDOW':
|
|
354
|
+
{
|
|
355
|
+
const openedWindow = openedWindows.find((window)=>window.windowName === promptReason.windowName);
|
|
356
|
+
if (!openedWindow) {
|
|
357
|
+
throw new Error(`Window ${promptReason.windowName} not found in opened windows.`);
|
|
358
|
+
}
|
|
359
|
+
affectedWorkspaces = getAffectedWorkspacesInWindow(openedWindow);
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
case 'CLOSE_WORKSPACE':
|
|
363
|
+
{
|
|
364
|
+
const openedWindow = openedWindows.find((window)=>window.windowName === promptReason.windowName);
|
|
365
|
+
if (!openedWindow) {
|
|
366
|
+
throw new Error(`Window ${promptReason.windowName} not found in opened windows.`);
|
|
367
|
+
}
|
|
368
|
+
affectedWorkspaces = getAffectedWorkspacesInWindow(openedWindow, promptReason.workspaceName);
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
case 'CLOSE_OTHER_WINDOWS':
|
|
372
|
+
{
|
|
373
|
+
const windowsToClose = openedWindows.filter((window)=>window.windowName !== promptReason.windowNameToSpare);
|
|
374
|
+
affectedWorkspaces = windowsToClose.flatMap((w)=>getAffectedWorkspacesInWindow(w));
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (affectedWorkspaces.length === 0) {
|
|
379
|
+
return Promise.resolve(true); // no unsaved changes, no need to prompt
|
|
380
|
+
}
|
|
381
|
+
return new Promise((resolve)=>{
|
|
382
|
+
const dispose = showModal('workspace2-close-prompt', {
|
|
383
|
+
onConfirm: ()=>{
|
|
384
|
+
dispose();
|
|
385
|
+
resolve(true);
|
|
386
|
+
},
|
|
387
|
+
onCancel: ()=>{
|
|
388
|
+
dispose();
|
|
389
|
+
resolve(false);
|
|
390
|
+
},
|
|
391
|
+
affectedWorkspaceTitles: affectedWorkspaces.map((workspace)=>workspaceTitleByWorkspaceName[workspace.workspaceName])
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
export const workspace2StoreActions = {
|
|
396
|
+
setWindowMaximized (state, windowName, maximized) {
|
|
397
|
+
const openedWindowIndex = state.openedWindows.findIndex((a)=>a.windowName === windowName);
|
|
398
|
+
const openedWindows = [
|
|
399
|
+
...state.openedWindows
|
|
400
|
+
];
|
|
401
|
+
const currentWindow = {
|
|
402
|
+
...openedWindows[openedWindowIndex],
|
|
403
|
+
maximized
|
|
404
|
+
};
|
|
405
|
+
openedWindows[openedWindowIndex] = currentWindow;
|
|
406
|
+
return {
|
|
407
|
+
...state,
|
|
408
|
+
openedWindows
|
|
409
|
+
};
|
|
410
|
+
},
|
|
411
|
+
// hides the most recently opened window (all other opened windows are implicitly hidden)
|
|
412
|
+
hideWindow (state) {
|
|
413
|
+
return {
|
|
414
|
+
...state,
|
|
415
|
+
isMostRecentlyOpenedWindowHidden: true
|
|
416
|
+
};
|
|
417
|
+
},
|
|
418
|
+
restoreWindow (state, windowName) {
|
|
419
|
+
const openedWindowIndex = state.openedWindows.findIndex((a)=>a.windowName === windowName);
|
|
420
|
+
const currentWindow = state.openedWindows[openedWindowIndex];
|
|
421
|
+
const openedWindows = [
|
|
422
|
+
...state.openedWindows.filter((_, i)=>i !== openedWindowIndex),
|
|
423
|
+
currentWindow
|
|
424
|
+
];
|
|
425
|
+
return {
|
|
426
|
+
...state,
|
|
427
|
+
openedWindows,
|
|
428
|
+
isMostRecentlyOpenedWindowHidden: false
|
|
429
|
+
};
|
|
430
|
+
},
|
|
431
|
+
closeWorkspace (state, workspaceName) {
|
|
432
|
+
const openedWindowIndex = getOpenedWindowIndexByWorkspace(workspaceName);
|
|
433
|
+
if (openedWindowIndex < 0) {
|
|
434
|
+
return state; // no-op if the window does not exist
|
|
435
|
+
}
|
|
436
|
+
const window = {
|
|
437
|
+
...state.openedWindows[openedWindowIndex]
|
|
438
|
+
};
|
|
439
|
+
const workspaceIndex = window.openedWorkspaces.findIndex((w)=>w.workspaceName === workspaceName);
|
|
440
|
+
const openedWindows = [
|
|
441
|
+
...state.openedWindows
|
|
442
|
+
];
|
|
443
|
+
// close all children of the input workspace as well
|
|
444
|
+
window.openedWorkspaces = window.openedWorkspaces.slice(0, workspaceIndex);
|
|
445
|
+
let hidden = state.isMostRecentlyOpenedWindowHidden;
|
|
446
|
+
if (window.openedWorkspaces.length === 0) {
|
|
447
|
+
const wasMostRecentWindow = openedWindowIndex === state.openedWindows.length - 1;
|
|
448
|
+
// if no workspaces left, remove the window
|
|
449
|
+
openedWindows.splice(openedWindowIndex, 1);
|
|
450
|
+
// If we removed the most recent window and there are still windows left,
|
|
451
|
+
// the new most recent window should be shown
|
|
452
|
+
if (wasMostRecentWindow && openedWindows.length > 0) {
|
|
453
|
+
hidden = false;
|
|
454
|
+
}
|
|
455
|
+
} else {
|
|
456
|
+
// if there are still workspaces left, just update the window
|
|
457
|
+
openedWindows[openedWindowIndex] = window;
|
|
458
|
+
}
|
|
459
|
+
return {
|
|
460
|
+
...state,
|
|
461
|
+
openedWindows,
|
|
462
|
+
isMostRecentlyOpenedWindowHidden: hidden
|
|
463
|
+
};
|
|
464
|
+
},
|
|
465
|
+
openChildWorkspace (state, parentWorkspaceName, childWorkspaceName, childWorkspaceProps) {
|
|
466
|
+
const childWorkspaceDef = state.registeredWorkspacesByName[childWorkspaceName];
|
|
467
|
+
if (!childWorkspaceDef) {
|
|
468
|
+
throw new Error(`No workspace named "${childWorkspaceName}" registered`);
|
|
469
|
+
}
|
|
470
|
+
const parentWorkspaceDef = state.registeredWorkspacesByName[parentWorkspaceName];
|
|
471
|
+
if (!parentWorkspaceDef) {
|
|
472
|
+
throw new Error(`No workspace named "${parentWorkspaceName}" registered`);
|
|
473
|
+
}
|
|
474
|
+
if (parentWorkspaceDef.window !== childWorkspaceDef.window) {
|
|
475
|
+
throw new Error(`Child workspace ${childWorkspaceName} does not belong to the same workspace window as parent workspace ${parentWorkspaceName}`);
|
|
476
|
+
}
|
|
477
|
+
// as the request workspace should be a child workspace, the corresponding window
|
|
478
|
+
// to contain the workspace should already be opened
|
|
479
|
+
const openedWindowIndex = state.openedWindows.findIndex((window)=>window.windowName === childWorkspaceDef.window);
|
|
480
|
+
if (openedWindowIndex == -1) {
|
|
481
|
+
throw new Error(`Cannot open child workspace ${childWorkspaceName} as window ${childWorkspaceDef.window} is not opened`);
|
|
482
|
+
}
|
|
483
|
+
const openedWindow = state.openedWindows[openedWindowIndex];
|
|
484
|
+
const { openedWorkspaces } = openedWindow;
|
|
485
|
+
const parentIndex = openedWorkspaces.findIndex((w)=>w.workspaceName === parentWorkspaceName);
|
|
486
|
+
if (parentIndex === -1) {
|
|
487
|
+
throw new Error(`Cannot open child workspace ${childWorkspaceName} from parent workspace ${parentWorkspaceName} as the parent is not opened within the workspace window`);
|
|
488
|
+
}
|
|
489
|
+
// Close any workspaces above the parent (analogous to closeWorkspace's slice behavior)
|
|
490
|
+
const trimmedWorkspaces = openedWorkspaces.slice(0, parentIndex + 1);
|
|
491
|
+
return {
|
|
492
|
+
openedWindows: state.openedWindows.map((w, i)=>{
|
|
493
|
+
if (i == openedWindowIndex) {
|
|
494
|
+
return {
|
|
495
|
+
...w,
|
|
496
|
+
openedWorkspaces: [
|
|
497
|
+
...trimmedWorkspaces,
|
|
498
|
+
newOpenedWorkspace(childWorkspaceName, childWorkspaceProps)
|
|
499
|
+
]
|
|
500
|
+
};
|
|
501
|
+
} else {
|
|
502
|
+
return w;
|
|
503
|
+
}
|
|
504
|
+
})
|
|
505
|
+
};
|
|
506
|
+
},
|
|
507
|
+
setHasUnsavedChanges (state, workspaceName, hasUnsavedChanges) {
|
|
508
|
+
const openedWindowIndex = getOpenedWindowIndexByWorkspace(workspaceName);
|
|
509
|
+
if (openedWindowIndex < 0) {
|
|
510
|
+
return state; // no-op if the window does not exist
|
|
511
|
+
}
|
|
512
|
+
const openedWindow = {
|
|
513
|
+
...state.openedWindows[openedWindowIndex]
|
|
514
|
+
};
|
|
515
|
+
const workspaceIndex = openedWindow.openedWorkspaces.findIndex((w)=>w.workspaceName === workspaceName);
|
|
516
|
+
if (workspaceIndex < 0) {
|
|
517
|
+
return state; // no-op if the workspace is not found
|
|
518
|
+
}
|
|
519
|
+
openedWindow.openedWorkspaces[workspaceIndex] = {
|
|
520
|
+
...openedWindow.openedWorkspaces[workspaceIndex],
|
|
521
|
+
hasUnsavedChanges
|
|
522
|
+
};
|
|
523
|
+
const openedWindows = [
|
|
524
|
+
...state.openedWindows
|
|
525
|
+
];
|
|
526
|
+
openedWindows[openedWindowIndex] = openedWindow;
|
|
527
|
+
return {
|
|
528
|
+
...state,
|
|
529
|
+
openedWindows
|
|
530
|
+
};
|
|
531
|
+
},
|
|
532
|
+
setWorkspaceTitle (state, workspaceName, title) {
|
|
533
|
+
const newWorkspaceTitleByWorkspaceName = {
|
|
534
|
+
...state.workspaceTitleByWorkspaceName
|
|
535
|
+
};
|
|
536
|
+
if (title === null) {
|
|
537
|
+
delete newWorkspaceTitleByWorkspaceName[workspaceName];
|
|
538
|
+
} else {
|
|
539
|
+
newWorkspaceTitleByWorkspaceName[workspaceName] = title;
|
|
540
|
+
}
|
|
541
|
+
return {
|
|
542
|
+
...state,
|
|
543
|
+
workspaceTitleByWorkspaceName: newWorkspaceTitleByWorkspaceName
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
export function useWorkspace2Store() {
|
|
548
|
+
return useStoreWithActions(workspace2Store, workspace2StoreActions);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Returns the react Context containing props passed into a workspace.
|
|
552
|
+
* This hook MUST be called inside a child of <Workspace2>
|
|
553
|
+
*/ export const useWorkspace2Context = ()=>useContext(SingleSpaContext);
|
|
554
|
+
/**
|
|
555
|
+
* @returns a list of registered workspaces.
|
|
556
|
+
*/ export const getRegisteredWorkspace2Names = ()=>{
|
|
557
|
+
return Object.keys(workspace2Store.getState().registeredWorkspacesByName);
|
|
558
|
+
};
|
|
559
|
+
function newOpenedWorkspace(workspaceName, workspaceProps) {
|
|
560
|
+
return {
|
|
561
|
+
workspaceName,
|
|
562
|
+
props: workspaceProps ?? {},
|
|
563
|
+
hasUnsavedChanges: false,
|
|
564
|
+
uuid: uuidV4()
|
|
565
|
+
};
|
|
566
|
+
}
|