@theseam/ui-common 0.2.9
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/asset-reader/asset-reader-helper.service.d.ts +7 -0
- package/asset-reader/asset-reader.module.d.ts +2 -0
- package/asset-reader/encrypted-asset-link.directive.d.ts +23 -0
- package/asset-reader/encrypted-asset-reader.d.ts +24 -0
- package/asset-reader/package.json +11 -0
- package/asset-reader/public-api.d.ts +4 -0
- package/asset-reader/theseam-ui-common-asset-reader.d.ts +4 -0
- package/asset-reader/theseam-ui-common-asset-reader.metadata.json +1 -0
- package/assets/.gitkeep +0 -0
- package/assets/vendor/intl-tel-input/css/intlTelInput.min.css +1 -0
- package/assets/vendor/intl-tel-input/img/flags.png +0 -0
- package/assets/vendor/intl-tel-input/img/flags@2x.png +0 -0
- package/assets/vendor/intl-tel-input/js/utils.js +501 -0
- package/breadcrumbs/breadcrumb.d.ts +11 -0
- package/breadcrumbs/breadcrumbs/breadcrumbs.component.d.ts +10 -0
- package/breadcrumbs/breadcrumbs-resolver.d.ts +5 -0
- package/breadcrumbs/breadcrumbs.module.d.ts +2 -0
- package/breadcrumbs/breadcrumbs.service.d.ts +20 -0
- package/breadcrumbs/package.json +11 -0
- package/breadcrumbs/public-api.d.ts +5 -0
- package/breadcrumbs/theseam-ui-common-breadcrumbs.d.ts +4 -0
- package/breadcrumbs/theseam-ui-common-breadcrumbs.metadata.json +1 -0
- package/bundles/theseam-ui-common-asset-reader.umd.js +533 -0
- package/bundles/theseam-ui-common-asset-reader.umd.js.map +1 -0
- package/bundles/theseam-ui-common-breadcrumbs.umd.js +587 -0
- package/bundles/theseam-ui-common-breadcrumbs.umd.js.map +1 -0
- package/bundles/theseam-ui-common-buttons.umd.js +719 -0
- package/bundles/theseam-ui-common-buttons.umd.js.map +1 -0
- package/bundles/theseam-ui-common-card.umd.js +480 -0
- package/bundles/theseam-ui-common-card.umd.js.map +1 -0
- package/bundles/theseam-ui-common-checkbox.umd.js +650 -0
- package/bundles/theseam-ui-common-checkbox.umd.js.map +1 -0
- package/bundles/theseam-ui-common-confirm-dialog.umd.js +491 -0
- package/bundles/theseam-ui-common-confirm-dialog.umd.js.map +1 -0
- package/bundles/theseam-ui-common-core.umd.js +604 -0
- package/bundles/theseam-ui-common-core.umd.js.map +1 -0
- package/bundles/theseam-ui-common-data-exporter.umd.js +96 -0
- package/bundles/theseam-ui-common-data-exporter.umd.js.map +1 -0
- package/bundles/theseam-ui-common-data-filters.umd.js +888 -0
- package/bundles/theseam-ui-common-data-filters.umd.js.map +1 -0
- package/bundles/theseam-ui-common-datatable-dynamic.umd.js +1499 -0
- package/bundles/theseam-ui-common-datatable-dynamic.umd.js.map +1 -0
- package/bundles/theseam-ui-common-datatable.umd.js +2247 -0
- package/bundles/theseam-ui-common-datatable.umd.js.map +1 -0
- package/bundles/theseam-ui-common-dynamic-component-loader.umd.js +180 -0
- package/bundles/theseam-ui-common-dynamic-component-loader.umd.js.map +1 -0
- package/bundles/theseam-ui-common-dynamic.umd.js +1253 -0
- package/bundles/theseam-ui-common-dynamic.umd.js.map +1 -0
- package/bundles/theseam-ui-common-footer-bar.umd.js +49 -0
- package/bundles/theseam-ui-common-footer-bar.umd.js.map +1 -0
- package/bundles/theseam-ui-common-form-field-error.umd.js +884 -0
- package/bundles/theseam-ui-common-form-field-error.umd.js.map +1 -0
- package/bundles/theseam-ui-common-form-field.umd.js +914 -0
- package/bundles/theseam-ui-common-form-field.umd.js.map +1 -0
- package/bundles/theseam-ui-common-framework.umd.js +3344 -0
- package/bundles/theseam-ui-common-framework.umd.js.map +1 -0
- package/bundles/theseam-ui-common-graphql.umd.js +357 -0
- package/bundles/theseam-ui-common-graphql.umd.js.map +1 -0
- package/bundles/theseam-ui-common-icon.umd.js +890 -0
- package/bundles/theseam-ui-common-icon.umd.js.map +1 -0
- package/bundles/theseam-ui-common-layout.umd.js +119 -0
- package/bundles/theseam-ui-common-layout.umd.js.map +1 -0
- package/bundles/theseam-ui-common-loading.umd.js +152 -0
- package/bundles/theseam-ui-common-loading.umd.js.map +1 -0
- package/bundles/theseam-ui-common-menu.umd.js +1152 -0
- package/bundles/theseam-ui-common-menu.umd.js.map +1 -0
- package/bundles/theseam-ui-common-modal.umd.js +1669 -0
- package/bundles/theseam-ui-common-modal.umd.js.map +1 -0
- package/bundles/theseam-ui-common-models.umd.js +63 -0
- package/bundles/theseam-ui-common-models.umd.js.map +1 -0
- package/bundles/theseam-ui-common-popover.umd.js +504 -0
- package/bundles/theseam-ui-common-popover.umd.js.map +1 -0
- package/bundles/theseam-ui-common-progress.umd.js +420 -0
- package/bundles/theseam-ui-common-progress.umd.js.map +1 -0
- package/bundles/theseam-ui-common-scrollbar.umd.js +240 -0
- package/bundles/theseam-ui-common-scrollbar.umd.js.map +1 -0
- package/bundles/theseam-ui-common-services.umd.js +178 -0
- package/bundles/theseam-ui-common-services.umd.js.map +1 -0
- package/bundles/theseam-ui-common-shared.umd.js +1115 -0
- package/bundles/theseam-ui-common-shared.umd.js.map +1 -0
- package/bundles/theseam-ui-common-storage.umd.js +178 -0
- package/bundles/theseam-ui-common-storage.umd.js.map +1 -0
- package/bundles/theseam-ui-common-story-helpers.umd.js +795 -0
- package/bundles/theseam-ui-common-story-helpers.umd.js.map +1 -0
- package/bundles/theseam-ui-common-tabbed.umd.js +628 -0
- package/bundles/theseam-ui-common-tabbed.umd.js.map +1 -0
- package/bundles/theseam-ui-common-table-cell-type.umd.js +222 -0
- package/bundles/theseam-ui-common-table-cell-type.umd.js.map +1 -0
- package/bundles/theseam-ui-common-table-cell-types.umd.js +1174 -0
- package/bundles/theseam-ui-common-table-cell-types.umd.js.map +1 -0
- package/bundles/theseam-ui-common-table.umd.js +475 -0
- package/bundles/theseam-ui-common-table.umd.js.map +1 -0
- package/bundles/theseam-ui-common-tel-input.umd.js +1055 -0
- package/bundles/theseam-ui-common-tel-input.umd.js.map +1 -0
- package/bundles/theseam-ui-common-test-helpers.umd.js +94 -0
- package/bundles/theseam-ui-common-test-helpers.umd.js.map +1 -0
- package/bundles/theseam-ui-common-tiled-select.umd.js +849 -0
- package/bundles/theseam-ui-common-tiled-select.umd.js.map +1 -0
- package/bundles/theseam-ui-common-toggle-edit.umd.js +893 -0
- package/bundles/theseam-ui-common-toggle-edit.umd.js.map +1 -0
- package/bundles/theseam-ui-common-toggle-group.umd.js +629 -0
- package/bundles/theseam-ui-common-toggle-group.umd.js.map +1 -0
- package/bundles/theseam-ui-common-unsaved-changes-dialog.umd.js +136 -0
- package/bundles/theseam-ui-common-unsaved-changes-dialog.umd.js.map +1 -0
- package/bundles/theseam-ui-common-utils.umd.js +1245 -0
- package/bundles/theseam-ui-common-utils.umd.js.map +1 -0
- package/bundles/theseam-ui-common-validators.umd.js +105 -0
- package/bundles/theseam-ui-common-validators.umd.js.map +1 -0
- package/bundles/theseam-ui-common-viewers.umd.js +699 -0
- package/bundles/theseam-ui-common-viewers.umd.js.map +1 -0
- package/bundles/theseam-ui-common-widget.umd.js +1710 -0
- package/bundles/theseam-ui-common-widget.umd.js.map +1 -0
- package/bundles/theseam-ui-common.umd.js +54 -0
- package/bundles/theseam-ui-common.umd.js.map +1 -0
- package/buttons/badge-button/badge-button.component.d.ts +18 -0
- package/buttons/button/button.component.d.ts +28 -0
- package/buttons/buttons.module.d.ts +2 -0
- package/buttons/package.json +11 -0
- package/buttons/progress-circle-button/progress-circle-button.component.d.ts +19 -0
- package/buttons/public-api.d.ts +5 -0
- package/buttons/theseam-ui-common-buttons.d.ts +4 -0
- package/buttons/theseam-ui-common-buttons.metadata.json +1 -0
- package/buttons/toggle-button/toggle-button.component.d.ts +26 -0
- package/card/card-action/card-action.component.d.ts +9 -0
- package/card/card-body/card-body.component.d.ts +12 -0
- package/card/card-footer/card-footer.component.d.ts +5 -0
- package/card/card-header/card-header.component.d.ts +7 -0
- package/card/card.component.d.ts +6 -0
- package/card/card.module.d.ts +2 -0
- package/card/package.json +11 -0
- package/card/public-api.d.ts +6 -0
- package/card/theseam-ui-common-card.d.ts +4 -0
- package/card/theseam-ui-common-card.metadata.json +1 -0
- package/checkbox/checkbox.component.d.ts +140 -0
- package/checkbox/checkbox.module.d.ts +2 -0
- package/checkbox/package.json +11 -0
- package/checkbox/public-api.d.ts +2 -0
- package/checkbox/theseam-ui-common-checkbox.d.ts +4 -0
- package/checkbox/theseam-ui-common-checkbox.metadata.json +1 -0
- package/confirm-dialog/confirm-click.directive.d.ts +24 -0
- package/confirm-dialog/confirm-dialog.component.d.ts +6 -0
- package/confirm-dialog/confirm-dialog.module.d.ts +2 -0
- package/confirm-dialog/confirm-dialog.service.d.ts +11 -0
- package/confirm-dialog/package.json +11 -0
- package/confirm-dialog/public-api.d.ts +4 -0
- package/confirm-dialog/theseam-ui-common-confirm-dialog.d.ts +4 -0
- package/confirm-dialog/theseam-ui-common-confirm-dialog.metadata.json +1 -0
- package/core/common-behaviors/active.d.ts +8 -0
- package/core/common-behaviors/constructor.d.ts +9 -0
- package/core/common-behaviors/disabled.d.ts +17 -0
- package/core/common-behaviors/element-ref.d.ts +4 -0
- package/core/common-behaviors/index.d.ts +9 -0
- package/core/common-behaviors/initialized.d.ts +30 -0
- package/core/common-behaviors/renderer2.d.ts +4 -0
- package/core/common-behaviors/size.d.ts +9 -0
- package/core/common-behaviors/tabindex.d.ts +18 -0
- package/core/common-behaviors/theme.d.ts +10 -0
- package/core/input-decorators/index.d.ts +2 -0
- package/core/input-decorators/input-boolean.decorator.d.ts +12 -0
- package/core/input-decorators/input-number.decorator.d.ts +12 -0
- package/core/package.json +11 -0
- package/core/public-api.d.ts +2 -0
- package/core/theseam-ui-common-core.d.ts +4 -0
- package/core/theseam-ui-common-core.metadata.json +1 -0
- package/data-exporter/data-exporter.d.ts +30 -0
- package/data-exporter/data-exporter.module.d.ts +2 -0
- package/data-exporter/exporters/csv-exporter.d.ts +8 -0
- package/data-exporter/exporters/xlsx-exporter.d.ts +8 -0
- package/data-exporter/package.json +11 -0
- package/data-exporter/public-api.d.ts +4 -0
- package/data-exporter/theseam-ui-common-data-exporter.d.ts +4 -0
- package/data-exporter/theseam-ui-common-data-exporter.metadata.json +1 -0
- package/data-filters/data-filter-container.d.ts +8 -0
- package/data-filters/data-filter-def.d.ts +10 -0
- package/data-filters/data-filter.d.ts +49 -0
- package/data-filters/data-filters.module.d.ts +2 -0
- package/data-filters/filters/data-filter-search/data-filter-search.component.d.ts +36 -0
- package/data-filters/filters/data-filter-search/search-filter-options.d.ts +2 -0
- package/data-filters/filters/data-filter-text/data-filter-text.component.d.ts +34 -0
- package/data-filters/filters/data-filter-text/text-filter-options.d.ts +25 -0
- package/data-filters/filters/data-filter-toggle-buttons/data-filter-toggle-buttons.component.d.ts +43 -0
- package/data-filters/package.json +11 -0
- package/data-filters/public-api.d.ts +9 -0
- package/data-filters/theseam-ui-common-data-filters.d.ts +4 -0
- package/data-filters/theseam-ui-common-data-filters.metadata.json +1 -0
- package/datatable/datatable/datatable.component.d.ts +195 -0
- package/datatable/datatable-action-menu/datatable-action-menu.component.d.ts +15 -0
- package/datatable/datatable-action-menu-item/datatable-action-menu-item.component.d.ts +28 -0
- package/datatable/datatable-column/datatable-column.component.d.ts +41 -0
- package/datatable/datatable-column-preferences/datatable-column-preferences.component.d.ts +14 -0
- package/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.d.ts +6 -0
- package/datatable/datatable-export-button/datatable-export-button.component.d.ts +24 -0
- package/datatable/datatable-menu-bar/datatable-menu-bar.component.d.ts +17 -0
- package/datatable/datatable-menu-bar-column-center/datatable-menu-bar-column-center.component.d.ts +5 -0
- package/datatable/datatable-menu-bar-column-left/datatable-menu-bar-column-left.component.d.ts +5 -0
- package/datatable/datatable-menu-bar-column-right/datatable-menu-bar-column-right.component.d.ts +5 -0
- package/datatable/datatable-menu-bar-row/datatable-menu-bar-row.component.d.ts +5 -0
- package/datatable/datatable-menu-bar-text/datatable-menu-bar-text.component.d.ts +10 -0
- package/datatable/datatable-row-detail/datatable-row-detail-tpl.directive.d.ts +5 -0
- package/datatable/datatable-row-detail/datatable-row-detail.directive.d.ts +37 -0
- package/datatable/datatable.module.d.ts +2 -0
- package/datatable/directives/datatable-action-menu-item.directive.d.ts +35 -0
- package/datatable/directives/datatable-action-menu-toggle.directive.d.ts +27 -0
- package/datatable/directives/datatable-cell-tpl.directive.d.ts +5 -0
- package/datatable/directives/datatable-filter.directive.d.ts +6 -0
- package/datatable/directives/datatable-row-action-item.directive.d.ts +5 -0
- package/datatable/models/datatable-accessor.d.ts +19 -0
- package/datatable/models/datatable-data-source.d.ts +14 -0
- package/datatable/models/datatable-gql-data-source.d.ts +7 -0
- package/datatable/models/menubar-item-data.d.ts +3 -0
- package/datatable/models/page-info.d.ts +6 -0
- package/datatable/models/preferences-accessor.d.ts +15 -0
- package/datatable/models/preferences.d.ts +9 -0
- package/datatable/models/sort-event.d.ts +4 -0
- package/datatable/models/sort-item.d.ts +4 -0
- package/datatable/models/table-column.d.ts +14 -0
- package/datatable/package.json +11 -0
- package/datatable/public-api.d.ts +38 -0
- package/datatable/services/datatable-column-changes.service.d.ts +6 -0
- package/datatable/services/datatable-preferences.service.d.ts +19 -0
- package/datatable/services/datatable-scrollbar-helper.service.d.ts +19 -0
- package/datatable/theseam-ui-common-datatable.d.ts +5 -0
- package/datatable/theseam-ui-common-datatable.metadata.json +1 -0
- package/datatable/tokens/datatable-accessor.d.ts +3 -0
- package/datatable/tokens/datatable-preferences-accessor.d.ts +3 -0
- package/datatable/tokens/menubar-item-data.d.ts +3 -0
- package/datatable/utils/with-stored-column-info.d.ts +3 -0
- package/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.d.ts +32 -0
- package/datatable-dynamic/datatable-dynamic-def.d.ts +71 -0
- package/datatable-dynamic/datatable-dynamic-filter-container/datatable-dynamic-filter-container.component.d.ts +15 -0
- package/datatable-dynamic/datatable-dynamic-menu-bar-content/datatable-dynamic-menu-bar-content.component.d.ts +61 -0
- package/datatable-dynamic/datatable-dynamic-menu-bar-item-manifest.d.ts +16 -0
- package/datatable-dynamic/datatable-dynamic-menu-bar-token.d.ts +3 -0
- package/datatable-dynamic/datatable-dynamic.component.d.ts +89 -0
- package/datatable-dynamic/datatable-dynamic.module.d.ts +2 -0
- package/datatable-dynamic/directives/datatable-dynamic-action-menu-item.directive.d.ts +73 -0
- package/datatable-dynamic/dynamic-datatable-def.service.d.ts +59 -0
- package/datatable-dynamic/dynamic-datatable-row-actions.service.d.ts +16 -0
- package/datatable-dynamic/models/dynamic-datatable-action-menu-record.d.ts +17 -0
- package/datatable-dynamic/models/dynamic-datatable-filter-menu-item.d.ts +7 -0
- package/datatable-dynamic/models/dynamic-datatable-menu-bar.d.ts +63 -0
- package/datatable-dynamic/models/dynamic-datatable-row-action-context.d.ts +5 -0
- package/datatable-dynamic/models/dynamic-datatable-row-action.d.ts +17 -0
- package/datatable-dynamic/models/index.d.ts +5 -0
- package/datatable-dynamic/package.json +11 -0
- package/datatable-dynamic/public-api.d.ts +13 -0
- package/datatable-dynamic/theseam-ui-common-datatable-dynamic.d.ts +4 -0
- package/datatable-dynamic/theseam-ui-common-datatable-dynamic.metadata.json +1 -0
- package/datatable-dynamic/utils/defaults/set-dynamic-datatable-columns-defaults.d.ts +2 -0
- package/datatable-dynamic/utils/defaults/set-dynamic-datatable-def-defaults.d.ts +2 -0
- package/datatable-dynamic/utils/defaults/set-dynamic-datatable-filter-menu-defaults.d.ts +2 -0
- package/datatable-dynamic/utils/defaults/set-dynamic-datatable-options-defaults.d.ts +2 -0
- package/datatable-dynamic/utils/index.d.ts +4 -0
- package/dynamic/action/api/dynamic-action-api-def.d.ts +35 -0
- package/dynamic/action/api/dynamic-action-api-errors.d.ts +1 -0
- package/dynamic/action/api/dynamic-action-api.d.ts +3 -0
- package/dynamic/action/api/dynamic-action-api.service.d.ts +30 -0
- package/dynamic/action/dynamic-action-helper.service.d.ts +36 -0
- package/dynamic/action/index.d.ts +10 -0
- package/dynamic/action/link/dynamic-action-link-def.d.ts +58 -0
- package/dynamic/action/link/dynamic-action-link.d.ts +3 -0
- package/dynamic/action/link/dynamic-action-link.service.d.ts +14 -0
- package/dynamic/action/modal/dynamic-action-modal-def.d.ts +10 -0
- package/dynamic/action/modal/dynamic-action-modal.d.ts +3 -0
- package/dynamic/action/modal/dynamic-action-modal.service.d.ts +29 -0
- package/dynamic/dynamic-value-helper.service.d.ts +34 -0
- package/dynamic/evaluators/exporters-data-evaluator/exporters-data-evaluator.d.ts +16 -0
- package/dynamic/evaluators/exporters-data-evaluator/exporters-data-value.d.ts +8 -0
- package/dynamic/evaluators/exporters-data-evaluator/index.d.ts +2 -0
- package/dynamic/evaluators/index.d.ts +2 -0
- package/dynamic/evaluators/jexl-evaluator/index.d.ts +2 -0
- package/dynamic/evaluators/jexl-evaluator/jexl-evaluator.d.ts +9 -0
- package/dynamic/evaluators/jexl-evaluator/jexl-value.d.ts +11 -0
- package/dynamic/models/dynamic-action-confirm-def.d.ts +10 -0
- package/dynamic/models/dynamic-action-context.d.ts +2 -0
- package/dynamic/models/dynamic-action-def.d.ts +9 -0
- package/dynamic/models/dynamic-action-ui-anchor-def.d.ts +39 -0
- package/dynamic/models/dynamic-action-ui-button-def.d.ts +13 -0
- package/dynamic/models/dynamic-action-ui-def.d.ts +37 -0
- package/dynamic/models/dynamic-action.d.ts +11 -0
- package/dynamic/models/dynamic-value-base-type.d.ts +4 -0
- package/dynamic/models/dynamic-value-evaluatable-type.d.ts +2 -0
- package/dynamic/models/dynamic-value-evaluator.d.ts +6 -0
- package/dynamic/models/dynamic-value-primitive.d.ts +1 -0
- package/dynamic/models/dynamic-value-type.d.ts +4 -0
- package/dynamic/models/dynamic-value.d.ts +3 -0
- package/dynamic/models/index.d.ts +13 -0
- package/dynamic/package.json +11 -0
- package/dynamic/public-api.d.ts +6 -0
- package/dynamic/theseam-ui-common-dynamic.d.ts +4 -0
- package/dynamic/theseam-ui-common-dynamic.metadata.json +1 -0
- package/dynamic/tokens/api-config.d.ts +30 -0
- package/dynamic/tokens/dynamic-action.d.ts +3 -0
- package/dynamic/tokens/dynamic-data.d.ts +2 -0
- package/dynamic/tokens/dynamic-value-evaluator.d.ts +3 -0
- package/dynamic/tokens/index.d.ts +4 -0
- package/dynamic/utils/index.d.ts +1 -0
- package/dynamic/utils/is-action-type.d.ts +2 -0
- package/dynamic-component-loader/dynamic-component-loader.module.d.ts +7 -0
- package/dynamic-component-loader/dynamic-component-loader.service.d.ts +15 -0
- package/dynamic-component-loader/dynamic-component-manifest.d.ts +9 -0
- package/dynamic-component-loader/dynamic-component-tokens.d.ts +4 -0
- package/dynamic-component-loader/package.json +11 -0
- package/dynamic-component-loader/public-api.d.ts +4 -0
- package/dynamic-component-loader/theseam-ui-common-dynamic-component-loader.d.ts +4 -0
- package/dynamic-component-loader/theseam-ui-common-dynamic-component-loader.metadata.json +1 -0
- package/esm2015/asset-reader/asset-reader-helper.service.js +68 -0
- package/esm2015/asset-reader/asset-reader.module.js +15 -0
- package/esm2015/asset-reader/encrypted-asset-link.directive.js +69 -0
- package/esm2015/asset-reader/encrypted-asset-reader.js +20 -0
- package/esm2015/asset-reader/public-api.js +5 -0
- package/esm2015/asset-reader/theseam-ui-common-asset-reader.js +5 -0
- package/esm2015/breadcrumbs/breadcrumb.js +2 -0
- package/esm2015/breadcrumbs/breadcrumbs/breadcrumbs.component.js +21 -0
- package/esm2015/breadcrumbs/breadcrumbs-resolver.js +2 -0
- package/esm2015/breadcrumbs/breadcrumbs.module.js +21 -0
- package/esm2015/breadcrumbs/breadcrumbs.service.js +158 -0
- package/esm2015/breadcrumbs/public-api.js +6 -0
- package/esm2015/breadcrumbs/theseam-ui-common-breadcrumbs.js +5 -0
- package/esm2015/buttons/badge-button/badge-button.component.js +79 -0
- package/esm2015/buttons/button/button.component.js +111 -0
- package/esm2015/buttons/buttons.module.js +34 -0
- package/esm2015/buttons/progress-circle-button/progress-circle-button.component.js +60 -0
- package/esm2015/buttons/public-api.js +6 -0
- package/esm2015/buttons/theseam-ui-common-buttons.js +5 -0
- package/esm2015/buttons/toggle-button/toggle-button.component.js +88 -0
- package/esm2015/card/card-action/card-action.component.js +27 -0
- package/esm2015/card/card-body/card-body.component.js +32 -0
- package/esm2015/card/card-footer/card-footer.component.js +15 -0
- package/esm2015/card/card-header/card-header.component.js +22 -0
- package/esm2015/card/card.component.js +20 -0
- package/esm2015/card/card.module.js +33 -0
- package/esm2015/card/public-api.js +7 -0
- package/esm2015/card/theseam-ui-common-card.js +5 -0
- package/esm2015/checkbox/checkbox.component.js +276 -0
- package/esm2015/checkbox/checkbox.module.js +21 -0
- package/esm2015/checkbox/public-api.js +3 -0
- package/esm2015/checkbox/theseam-ui-common-checkbox.js +5 -0
- package/esm2015/confirm-dialog/confirm-click.directive.js +62 -0
- package/esm2015/confirm-dialog/confirm-dialog.component.js +20 -0
- package/esm2015/confirm-dialog/confirm-dialog.module.js +35 -0
- package/esm2015/confirm-dialog/confirm-dialog.service.js +38 -0
- package/esm2015/confirm-dialog/public-api.js +5 -0
- package/esm2015/confirm-dialog/theseam-ui-common-confirm-dialog.js +5 -0
- package/esm2015/core/common-behaviors/active.js +13 -0
- package/esm2015/core/common-behaviors/constructor.js +9 -0
- package/esm2015/core/common-behaviors/disabled.js +20 -0
- package/esm2015/core/common-behaviors/element-ref.js +2 -0
- package/esm2015/core/common-behaviors/index.js +10 -0
- package/esm2015/core/common-behaviors/initialized.js +62 -0
- package/esm2015/core/common-behaviors/renderer2.js +2 -0
- package/esm2015/core/common-behaviors/size.js +24 -0
- package/esm2015/core/common-behaviors/tabindex.js +22 -0
- package/esm2015/core/common-behaviors/theme.js +24 -0
- package/esm2015/core/input-decorators/index.js +3 -0
- package/esm2015/core/input-decorators/input-boolean.decorator.js +27 -0
- package/esm2015/core/input-decorators/input-number.decorator.js +27 -0
- package/esm2015/core/public-api.js +3 -0
- package/esm2015/core/theseam-ui-common-core.js +5 -0
- package/esm2015/data-exporter/data-exporter.js +7 -0
- package/esm2015/data-exporter/data-exporter.module.js +17 -0
- package/esm2015/data-exporter/exporters/csv-exporter.js +32 -0
- package/esm2015/data-exporter/exporters/xlsx-exporter.js +30 -0
- package/esm2015/data-exporter/public-api.js +5 -0
- package/esm2015/data-exporter/theseam-ui-common-data-exporter.js +5 -0
- package/esm2015/data-filters/data-filter-container.js +3 -0
- package/esm2015/data-filters/data-filter-def.js +3 -0
- package/esm2015/data-filters/data-filter.js +22 -0
- package/esm2015/data-filters/data-filters.module.js +50 -0
- package/esm2015/data-filters/filters/data-filter-search/data-filter-search.component.js +110 -0
- package/esm2015/data-filters/filters/data-filter-search/search-filter-options.js +2 -0
- package/esm2015/data-filters/filters/data-filter-text/data-filter-text.component.js +138 -0
- package/esm2015/data-filters/filters/data-filter-text/text-filter-options.js +2 -0
- package/esm2015/data-filters/filters/data-filter-toggle-buttons/data-filter-toggle-buttons.component.js +151 -0
- package/esm2015/data-filters/public-api.js +10 -0
- package/esm2015/data-filters/theseam-ui-common-data-filters.js +5 -0
- package/esm2015/datatable/datatable/datatable.component.js +584 -0
- package/esm2015/datatable/datatable-action-menu/datatable-action-menu.component.js +101 -0
- package/esm2015/datatable/datatable-action-menu-item/datatable-action-menu-item.component.js +30 -0
- package/esm2015/datatable/datatable-column/datatable-column.component.js +83 -0
- package/esm2015/datatable/datatable-column-preferences/datatable-column-preferences.component.js +46 -0
- package/esm2015/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.js +18 -0
- package/esm2015/datatable/datatable-export-button/datatable-export-button.component.js +98 -0
- package/esm2015/datatable/datatable-menu-bar/datatable-menu-bar.component.js +55 -0
- package/esm2015/datatable/datatable-menu-bar-column-center/datatable-menu-bar-column-center.component.js +16 -0
- package/esm2015/datatable/datatable-menu-bar-column-left/datatable-menu-bar-column-left.component.js +16 -0
- package/esm2015/datatable/datatable-menu-bar-column-right/datatable-menu-bar-column-right.component.js +16 -0
- package/esm2015/datatable/datatable-menu-bar-row/datatable-menu-bar-row.component.js +16 -0
- package/esm2015/datatable/datatable-menu-bar-text/datatable-menu-bar-text.component.js +32 -0
- package/esm2015/datatable/datatable-row-detail/datatable-row-detail-tpl.directive.js +15 -0
- package/esm2015/datatable/datatable-row-detail/datatable-row-detail.directive.js +69 -0
- package/esm2015/datatable/datatable.module.js +120 -0
- package/esm2015/datatable/directives/datatable-action-menu-item.directive.js +46 -0
- package/esm2015/datatable/directives/datatable-action-menu-toggle.directive.js +128 -0
- package/esm2015/datatable/directives/datatable-cell-tpl.directive.js +15 -0
- package/esm2015/datatable/directives/datatable-filter.directive.js +21 -0
- package/esm2015/datatable/directives/datatable-row-action-item.directive.js +15 -0
- package/esm2015/datatable/models/datatable-accessor.js +2 -0
- package/esm2015/datatable/models/datatable-data-source.js +42 -0
- package/esm2015/datatable/models/datatable-gql-data-source.js +15 -0
- package/esm2015/datatable/models/menubar-item-data.js +2 -0
- package/esm2015/datatable/models/page-info.js +2 -0
- package/esm2015/datatable/models/preferences-accessor.js +2 -0
- package/esm2015/datatable/models/preferences.js +2 -0
- package/esm2015/datatable/models/sort-event.js +2 -0
- package/esm2015/datatable/models/sort-item.js +2 -0
- package/esm2015/datatable/models/table-column.js +2 -0
- package/esm2015/datatable/public-api.js +39 -0
- package/esm2015/datatable/services/datatable-column-changes.service.js +17 -0
- package/esm2015/datatable/services/datatable-preferences.service.js +113 -0
- package/esm2015/datatable/services/datatable-scrollbar-helper.service.js +51 -0
- package/esm2015/datatable/theseam-ui-common-datatable.js +6 -0
- package/esm2015/datatable/tokens/datatable-accessor.js +3 -0
- package/esm2015/datatable/tokens/datatable-preferences-accessor.js +3 -0
- package/esm2015/datatable/tokens/menubar-item-data.js +3 -0
- package/esm2015/datatable/utils/with-stored-column-info.js +20 -0
- package/esm2015/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.js +119 -0
- package/esm2015/datatable-dynamic/datatable-dynamic-def.js +2 -0
- package/esm2015/datatable-dynamic/datatable-dynamic-filter-container/datatable-dynamic-filter-container.component.js +53 -0
- package/esm2015/datatable-dynamic/datatable-dynamic-menu-bar-content/datatable-dynamic-menu-bar-content.component.js +160 -0
- package/esm2015/datatable-dynamic/datatable-dynamic-menu-bar-item-manifest.js +2 -0
- package/esm2015/datatable-dynamic/datatable-dynamic-menu-bar-token.js +3 -0
- package/esm2015/datatable-dynamic/datatable-dynamic.component.js +75 -0
- package/esm2015/datatable-dynamic/datatable-dynamic.module.js +49 -0
- package/esm2015/datatable-dynamic/directives/datatable-dynamic-action-menu-item.directive.js +408 -0
- package/esm2015/datatable-dynamic/dynamic-datatable-def.service.js +84 -0
- package/esm2015/datatable-dynamic/dynamic-datatable-row-actions.service.js +47 -0
- package/esm2015/datatable-dynamic/models/dynamic-datatable-action-menu-record.js +2 -0
- package/esm2015/datatable-dynamic/models/dynamic-datatable-filter-menu-item.js +2 -0
- package/esm2015/datatable-dynamic/models/dynamic-datatable-menu-bar.js +2 -0
- package/esm2015/datatable-dynamic/models/dynamic-datatable-row-action-context.js +2 -0
- package/esm2015/datatable-dynamic/models/dynamic-datatable-row-action.js +2 -0
- package/esm2015/datatable-dynamic/models/index.js +6 -0
- package/esm2015/datatable-dynamic/public-api.js +14 -0
- package/esm2015/datatable-dynamic/theseam-ui-common-datatable-dynamic.js +5 -0
- package/esm2015/datatable-dynamic/utils/defaults/set-dynamic-datatable-columns-defaults.js +8 -0
- package/esm2015/datatable-dynamic/utils/defaults/set-dynamic-datatable-def-defaults.js +13 -0
- package/esm2015/datatable-dynamic/utils/defaults/set-dynamic-datatable-filter-menu-defaults.js +6 -0
- package/esm2015/datatable-dynamic/utils/defaults/set-dynamic-datatable-options-defaults.js +6 -0
- package/esm2015/datatable-dynamic/utils/index.js +5 -0
- package/esm2015/dynamic/action/api/dynamic-action-api-def.js +2 -0
- package/esm2015/dynamic/action/api/dynamic-action-api-errors.js +4 -0
- package/esm2015/dynamic/action/api/dynamic-action-api.js +2 -0
- package/esm2015/dynamic/action/api/dynamic-action-api.service.js +215 -0
- package/esm2015/dynamic/action/dynamic-action-helper.service.js +163 -0
- package/esm2015/dynamic/action/index.js +11 -0
- package/esm2015/dynamic/action/link/dynamic-action-link-def.js +2 -0
- package/esm2015/dynamic/action/link/dynamic-action-link.js +2 -0
- package/esm2015/dynamic/action/link/dynamic-action-link.service.js +50 -0
- package/esm2015/dynamic/action/modal/dynamic-action-modal-def.js +2 -0
- package/esm2015/dynamic/action/modal/dynamic-action-modal.js +2 -0
- package/esm2015/dynamic/action/modal/dynamic-action-modal.service.js +92 -0
- package/esm2015/dynamic/dynamic-value-helper.service.js +101 -0
- package/esm2015/dynamic/evaluators/exporters-data-evaluator/exporters-data-evaluator.js +33 -0
- package/esm2015/dynamic/evaluators/exporters-data-evaluator/exporters-data-value.js +2 -0
- package/esm2015/dynamic/evaluators/exporters-data-evaluator/index.js +3 -0
- package/esm2015/dynamic/evaluators/index.js +3 -0
- package/esm2015/dynamic/evaluators/jexl-evaluator/index.js +3 -0
- package/esm2015/dynamic/evaluators/jexl-evaluator/jexl-evaluator.js +29 -0
- package/esm2015/dynamic/evaluators/jexl-evaluator/jexl-value.js +2 -0
- package/esm2015/dynamic/models/dynamic-action-confirm-def.js +2 -0
- package/esm2015/dynamic/models/dynamic-action-context.js +2 -0
- package/esm2015/dynamic/models/dynamic-action-def.js +3 -0
- package/esm2015/dynamic/models/dynamic-action-ui-anchor-def.js +2 -0
- package/esm2015/dynamic/models/dynamic-action-ui-button-def.js +2 -0
- package/esm2015/dynamic/models/dynamic-action-ui-def.js +2 -0
- package/esm2015/dynamic/models/dynamic-action.js +2 -0
- package/esm2015/dynamic/models/dynamic-value-base-type.js +2 -0
- package/esm2015/dynamic/models/dynamic-value-evaluatable-type.js +2 -0
- package/esm2015/dynamic/models/dynamic-value-evaluator.js +2 -0
- package/esm2015/dynamic/models/dynamic-value-primitive.js +2 -0
- package/esm2015/dynamic/models/dynamic-value-type.js +2 -0
- package/esm2015/dynamic/models/dynamic-value.js +2 -0
- package/esm2015/dynamic/models/index.js +14 -0
- package/esm2015/dynamic/public-api.js +7 -0
- package/esm2015/dynamic/theseam-ui-common-dynamic.js +5 -0
- package/esm2015/dynamic/tokens/api-config.js +29 -0
- package/esm2015/dynamic/tokens/dynamic-action.js +3 -0
- package/esm2015/dynamic/tokens/dynamic-data.js +3 -0
- package/esm2015/dynamic/tokens/dynamic-value-evaluator.js +3 -0
- package/esm2015/dynamic/tokens/index.js +5 -0
- package/esm2015/dynamic/utils/index.js +2 -0
- package/esm2015/dynamic/utils/is-action-type.js +4 -0
- package/esm2015/dynamic-component-loader/dynamic-component-loader.module.js +47 -0
- package/esm2015/dynamic-component-loader/dynamic-component-loader.service.js +91 -0
- package/esm2015/dynamic-component-loader/dynamic-component-manifest.js +2 -0
- package/esm2015/dynamic-component-loader/dynamic-component-tokens.js +5 -0
- package/esm2015/dynamic-component-loader/public-api.js +5 -0
- package/esm2015/dynamic-component-loader/theseam-ui-common-dynamic-component-loader.js +5 -0
- package/esm2015/footer-bar/footer-bar/footer-bar.component.js +16 -0
- package/esm2015/footer-bar/footer-bar.module.js +15 -0
- package/esm2015/footer-bar/public-api.js +3 -0
- package/esm2015/footer-bar/theseam-ui-common-footer-bar.js +5 -0
- package/esm2015/form-field/form-field-error.directive.js +28 -0
- package/esm2015/form-field/form-field-help-text.directive.js +15 -0
- package/esm2015/form-field/form-field-label-tpl.directive.js +15 -0
- package/esm2015/form-field/form-field-required-indicator.component.js +38 -0
- package/esm2015/form-field/form-field.component.js +193 -0
- package/esm2015/form-field/form-field.module.js +40 -0
- package/esm2015/form-field/input.directive.js +195 -0
- package/esm2015/form-field/public-api.js +8 -0
- package/esm2015/form-field/theseam-ui-common-form-field.js +5 -0
- package/esm2015/form-field-error/form-field-error/form-field-error.component.js +27 -0
- package/esm2015/form-field-error/form-field-error-list/form-field-error-list-item-tpl.directive.js +25 -0
- package/esm2015/form-field-error/form-field-error-list/form-field-error-list-item.directive.js +18 -0
- package/esm2015/form-field-error/form-field-error-list/form-field-error-list.component.js +370 -0
- package/esm2015/form-field-error/form-field-error.module.js +28 -0
- package/esm2015/form-field-error/public-api.js +6 -0
- package/esm2015/form-field-error/theseam-ui-common-form-field-error.js +5 -0
- package/esm2015/framework/base-layout/base-layout-action.js +2 -0
- package/esm2015/framework/base-layout/base-layout-nav.js +2 -0
- package/esm2015/framework/base-layout/base-layout-ref.js +2 -0
- package/esm2015/framework/base-layout/base-layout-tokens.js +3 -0
- package/esm2015/framework/base-layout/base-layout.component.js +117 -0
- package/esm2015/framework/base-layout/base-layout.module.js +45 -0
- package/esm2015/framework/base-layout/directives/base-layout-content-footer.directive.js +15 -0
- package/esm2015/framework/base-layout/directives/base-layout-content-header.directive.js +15 -0
- package/esm2015/framework/base-layout/directives/base-layout-content.directive.js +15 -0
- package/esm2015/framework/base-layout/directives/base-layout-nav-toggle.directive.js +37 -0
- package/esm2015/framework/base-layout/directives/base-layout-side-bar.directive.js +15 -0
- package/esm2015/framework/base-layout/directives/base-layout-top-bar.directive.js +15 -0
- package/esm2015/framework/base-layout/index.js +13 -0
- package/esm2015/framework/dashboard/dashboard-widget-container/dashboard-widget-container.component.js +19 -0
- package/esm2015/framework/dashboard/dashboard-widget-template-container/dashboard-widget-template-container.component.js +25 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widget-portal-outlet.directive.js +121 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets-item.js +2 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets-preferences-accessor-token.js +3 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets-preferences-accessor.js +2 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets-preferences.service.js +173 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets.component.js +176 -0
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets.service.js +165 -0
- package/esm2015/framework/dashboard/dashboard.component.js +25 -0
- package/esm2015/framework/dashboard/dashboard.module.js +39 -0
- package/esm2015/framework/dashboard/index.js +12 -0
- package/esm2015/framework/dynamic-router/dynamic-route-def.js +2 -0
- package/esm2015/framework/dynamic-router/dynamic-router.module.js +21 -0
- package/esm2015/framework/dynamic-router/hierarchy-router-outlet/hierarchy-route-animations.js +256 -0
- package/esm2015/framework/dynamic-router/hierarchy-router-outlet/hierarchy-router-outlet.component.js +114 -0
- package/esm2015/framework/dynamic-router/index.js +6 -0
- package/esm2015/framework/dynamic-router/resolvers/hierarchy-level.resolver.js +26 -0
- package/esm2015/framework/public-api.js +7 -0
- package/esm2015/framework/schema-form/index.js +4 -0
- package/esm2015/framework/schema-form/schema-form-framework.component.js +16 -0
- package/esm2015/framework/schema-form/schema-form-framework.js +27 -0
- package/esm2015/framework/schema-form/schema-form.module.js +35 -0
- package/esm2015/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.js +41 -0
- package/esm2015/framework/schema-form-controls/schema-form-controls.module.js +50 -0
- package/esm2015/framework/schema-form-controls/schema-form-input/schema-form-input.component.js +34 -0
- package/esm2015/framework/schema-form-controls/schema-form-number/schema-form-number.component.js +40 -0
- package/esm2015/framework/schema-form-controls/schema-form-select/schema-form-select.component.js +36 -0
- package/esm2015/framework/schema-form-controls/schema-form-submit/schema-form-submit.component.js +46 -0
- package/esm2015/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.js +142 -0
- package/esm2015/framework/side-nav/index.js +7 -0
- package/esm2015/framework/side-nav/side-nav-item/side-nav-item.component.js +151 -0
- package/esm2015/framework/side-nav/side-nav-toggle/side-nav-toggle.component.js +36 -0
- package/esm2015/framework/side-nav/side-nav-utils.js +81 -0
- package/esm2015/framework/side-nav/side-nav.component.js +195 -0
- package/esm2015/framework/side-nav/side-nav.models.js +2 -0
- package/esm2015/framework/side-nav/side-nav.module.js +37 -0
- package/esm2015/framework/side-nav/side-nav.service.js +174 -0
- package/esm2015/framework/theseam-ui-common-framework.js +13 -0
- package/esm2015/framework/top-bar/index.js +8 -0
- package/esm2015/framework/top-bar/top-bar-item.directive.js +15 -0
- package/esm2015/framework/top-bar/top-bar-menu-btn-detail.directive.js +15 -0
- package/esm2015/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.js +53 -0
- package/esm2015/framework/top-bar/top-bar-menu.directive.js +16 -0
- package/esm2015/framework/top-bar/top-bar-title/top-bar-title.component.js +19 -0
- package/esm2015/framework/top-bar/top-bar.component.js +82 -0
- package/esm2015/framework/top-bar/top-bar.module.js +46 -0
- package/esm2015/graphql/models/direction.js +8 -0
- package/esm2015/graphql/models/hint-definition.js +2 -0
- package/esm2015/graphql/models/hint-transform-operation.js +2 -0
- package/esm2015/graphql/models/hint-transformer.js +2 -0
- package/esm2015/graphql/models/hints-kind.js +9 -0
- package/esm2015/graphql/models/hints-token.js +2 -0
- package/esm2015/graphql/models/index.js +9 -0
- package/esm2015/graphql/models/query-processing-config.js +2 -0
- package/esm2015/graphql/models/variable.js +7 -0
- package/esm2015/graphql/public-api.js +2 -0
- package/esm2015/graphql/theseam-ui-common-graphql.js +5 -0
- package/esm2015/graphql/utils/contains-variable.js +14 -0
- package/esm2015/graphql/utils/gql-var.js +4 -0
- package/esm2015/graphql/utils/hints-tokens-containing-hint.js +4 -0
- package/esm2015/graphql/utils/index.js +11 -0
- package/esm2015/graphql/utils/inline-variables.js +50 -0
- package/esm2015/graphql/utils/parse-comments.js +24 -0
- package/esm2015/graphql/utils/parse-hints.js +116 -0
- package/esm2015/graphql/utils/remove-variable-definition.js +14 -0
- package/esm2015/graphql/utils/remove-variable-definitions-not-defined.js +19 -0
- package/esm2015/graphql/utils/remove-variable.js +22 -0
- package/esm2015/graphql/utils/to-gql.js +40 -0
- package/esm2015/icon/icon/icon.component.js +125 -0
- package/esm2015/icon/icon-btn/icon-btn.component.js +136 -0
- package/esm2015/icon/icon-notification/icon-notification.component.js +120 -0
- package/esm2015/icon/icon.js +2 -0
- package/esm2015/icon/icon.module.js +27 -0
- package/esm2015/icon/public-api.js +7 -0
- package/esm2015/icon/theseam-ui-common-icon.js +5 -0
- package/esm2015/icon/utils/file-extension-icon.js +33 -0
- package/esm2015/icon/utils/get-known-icon.js +82 -0
- package/esm2015/icon/utils/index.js +3 -0
- package/esm2015/layout/breakpoint-aliases.js +11 -0
- package/esm2015/layout/layout.module.js +18 -0
- package/esm2015/layout/layout.service.js +24 -0
- package/esm2015/layout/observe-media-query.js +41 -0
- package/esm2015/layout/public-api.js +5 -0
- package/esm2015/layout/theseam-ui-common-layout.js +5 -0
- package/esm2015/loading/loading/loading.component.js +28 -0
- package/esm2015/loading/loading-overlay.service.js +59 -0
- package/esm2015/loading/loading-themes.js +18 -0
- package/esm2015/loading/loading.models.js +2 -0
- package/esm2015/loading/loading.module.js +29 -0
- package/esm2015/loading/public-api.js +6 -0
- package/esm2015/loading/theseam-ui-common-loading.js +5 -0
- package/esm2015/menu/menu-animations.js +58 -0
- package/esm2015/menu/menu-divider.component.js +15 -0
- package/esm2015/menu/menu-footer/menu-footer.component.js +32 -0
- package/esm2015/menu/menu-footer-action/menu-footer-action.component.js +48 -0
- package/esm2015/menu/menu-header/menu-header.component.js +32 -0
- package/esm2015/menu/menu-item.component.js +127 -0
- package/esm2015/menu/menu-panel-token.js +6 -0
- package/esm2015/menu/menu-panel.js +2 -0
- package/esm2015/menu/menu-toggle.directive.js +248 -0
- package/esm2015/menu/menu.component.js +174 -0
- package/esm2015/menu/menu.module.js +43 -0
- package/esm2015/menu/public-api.js +12 -0
- package/esm2015/menu/theseam-ui-common-menu.js +5 -0
- package/esm2015/modal/directives/modal-close.directive.js +63 -0
- package/esm2015/modal/directives/modal-footer-tpl.directive.js +15 -0
- package/esm2015/modal/directives/modal-header-icon-tpl.directive.js +15 -0
- package/esm2015/modal/directives/modal-header-title-tpl.directive.js +15 -0
- package/esm2015/modal/directives/modal-title.directive.js +19 -0
- package/esm2015/modal/directives/modal.directive.js +25 -0
- package/esm2015/modal/modal/modal.component.js +149 -0
- package/esm2015/modal/modal-body/modal-body.component.js +22 -0
- package/esm2015/modal/modal-config.js +47 -0
- package/esm2015/modal/modal-container/modal-container.component.js +217 -0
- package/esm2015/modal/modal-footer/modal-footer.component.js +20 -0
- package/esm2015/modal/modal-header/modal-header.component.js +26 -0
- package/esm2015/modal/modal-injectors.js +23 -0
- package/esm2015/modal/modal-ref.js +126 -0
- package/esm2015/modal/modal-utils.js +14 -0
- package/esm2015/modal/modal.models.js +3 -0
- package/esm2015/modal/modal.module.js +83 -0
- package/esm2015/modal/modal.service.js +343 -0
- package/esm2015/modal/public-api.js +20 -0
- package/esm2015/modal/route-modal/route-modal.component.js +68 -0
- package/esm2015/modal/theseam-ui-common-modal.js +5 -0
- package/esm2015/models/component-type.js +4 -0
- package/esm2015/models/http-status-codes.js +20 -0
- package/esm2015/models/public-api.js +8 -0
- package/esm2015/models/size-prefixes.js +2 -0
- package/esm2015/models/size-types.js +2 -0
- package/esm2015/models/theme-names.js +26 -0
- package/esm2015/models/theme-prefixes.js +2 -0
- package/esm2015/models/theme-types.js +2 -0
- package/esm2015/models/theseam-ui-common-models.js +5 -0
- package/esm2015/popover/popover/popover.component.js +149 -0
- package/esm2015/popover/popover-animations.js +46 -0
- package/esm2015/popover/popover.directive.js +257 -0
- package/esm2015/popover/popover.module.js +30 -0
- package/esm2015/popover/public-api.js +5 -0
- package/esm2015/popover/theseam-ui-common-popover.js +5 -0
- package/esm2015/progress/progress-circle/progress-circle.component.js +63 -0
- package/esm2015/progress/progress.module.js +19 -0
- package/esm2015/progress/public-api.js +3 -0
- package/esm2015/progress/theseam-ui-common-progress.js +5 -0
- package/esm2015/public_api.js +43 -0
- package/esm2015/scrollbar/overlay-scrollbar.directive.js +61 -0
- package/esm2015/scrollbar/overlay-scrollbars-config-model.js +2 -0
- package/esm2015/scrollbar/overlay-scrollbars-config.js +13 -0
- package/esm2015/scrollbar/overlay-scrollbars.service.js +87 -0
- package/esm2015/scrollbar/public-api.js +6 -0
- package/esm2015/scrollbar/scrollbar.module.js +25 -0
- package/esm2015/scrollbar/theseam-ui-common-scrollbar.js +5 -0
- package/esm2015/services/asset-loader.service.js +33 -0
- package/esm2015/services/font-loader.service.js +81 -0
- package/esm2015/services/public-api.js +4 -0
- package/esm2015/services/router-helpers.service.js +26 -0
- package/esm2015/services/theseam-ui-common-services.js +5 -0
- package/esm2015/shared/components/index.js +2 -0
- package/esm2015/shared/components/password-input-reveal/password-input-reveal.component.js +71 -0
- package/esm2015/shared/directives/auto-focus.directive.js +53 -0
- package/esm2015/shared/directives/click-outside.directive.js +49 -0
- package/esm2015/shared/directives/disable-control.directive.js +27 -0
- package/esm2015/shared/directives/elem-resized.directive.js +29 -0
- package/esm2015/shared/directives/hover-class-toggle.directive.js +80 -0
- package/esm2015/shared/directives/hover-class.directive.js +74 -0
- package/esm2015/shared/directives/index.js +9 -0
- package/esm2015/shared/directives/ng-select-extra.directive.js +177 -0
- package/esm2015/shared/directives/ngx-quill-extra.directive.js +60 -0
- package/esm2015/shared/pipes/index.js +3 -0
- package/esm2015/shared/pipes/mask-chars.pipe.js +21 -0
- package/esm2015/shared/pipes/truncate.pipe.js +19 -0
- package/esm2015/shared/public-api.js +5 -0
- package/esm2015/shared/shared.module.js +58 -0
- package/esm2015/shared/theseam-ui-common-shared.js +5 -0
- package/esm2015/storage/local-storage.service.js +77 -0
- package/esm2015/storage/localstorage-memory.js +64 -0
- package/esm2015/storage/public-api.js +2 -0
- package/esm2015/storage/theseam-ui-common-storage.js +5 -0
- package/esm2015/story-helpers/arg-type-helpers.js +34 -0
- package/esm2015/story-helpers/args-to-tpl.js +76 -0
- package/esm2015/story-helpers/initial-route-factory.js +4 -0
- package/esm2015/story-helpers/initial-route.service.js +27 -0
- package/esm2015/story-helpers/on-story-bootstrapped-exec.js +64 -0
- package/esm2015/story-helpers/on-story-bootstrapped-trigger.js +38 -0
- package/esm2015/story-helpers/public-api.js +15 -0
- package/esm2015/story-helpers/route-button.js +12 -0
- package/esm2015/story-helpers/routes-arg-type.js +18 -0
- package/esm2015/story-helpers/story-empty-with-route.component.js +7 -0
- package/esm2015/story-helpers/story-empty.component.js +7 -0
- package/esm2015/story-helpers/story-helper-components.module.js +29 -0
- package/esm2015/story-helpers/story-initial-route.js +24 -0
- package/esm2015/story-helpers/story-modal-container.component.js +77 -0
- package/esm2015/story-helpers/story-toastr.service.js +33 -0
- package/esm2015/story-helpers/theseam-ui-common-story-helpers.js +5 -0
- package/esm2015/tabbed/directives/tabbed-tab-content.directive.js +14 -0
- package/esm2015/tabbed/directives/tabbed-tab.directive.js +36 -0
- package/esm2015/tabbed/public-api.js +8 -0
- package/esm2015/tabbed/tabbed-content/tabbed-content.component.js +17 -0
- package/esm2015/tabbed/tabbed-item/tabbed-item.component.js +30 -0
- package/esm2015/tabbed/tabbed.component.js +111 -0
- package/esm2015/tabbed/tabbed.module.js +36 -0
- package/esm2015/tabbed/tabbed.service.js +28 -0
- package/esm2015/tabbed/theseam-ui-common-tabbed.js +5 -0
- package/esm2015/table/public-api.js +3 -0
- package/esm2015/table/table/table.component.js +90 -0
- package/esm2015/table/table.module.js +23 -0
- package/esm2015/table/theseam-ui-common-table.js +5 -0
- package/esm2015/table-cell-type/public-api.js +12 -0
- package/esm2015/table-cell-type/services/table-cell-types-helpers.service.js +70 -0
- package/esm2015/table-cell-type/table-cell-type-action.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-column.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-config.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-export-props.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-manifest-provider.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-models.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-name.js +2 -0
- package/esm2015/table-cell-type/table-cell-type-selector.component.js +94 -0
- package/esm2015/table-cell-type/table-cell-type-tokens.js +4 -0
- package/esm2015/table-cell-type/table-cell-type.module.js +23 -0
- package/esm2015/table-cell-type/theseam-ui-common-table-cell-type.js +5 -0
- package/esm2015/table-cell-types/public-api.js +16 -0
- package/esm2015/table-cell-types/table-cell-type-date/table-cell-type-date-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-date/table-cell-type-date.component.js +55 -0
- package/esm2015/table-cell-types/table-cell-type-date/table-cell-type-date.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-decimal/table-cell-type-decimal-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-icon/table-cell-type-icon-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-icon/table-cell-type-icon.component.js +166 -0
- package/esm2015/table-cell-types/table-cell-type-integer/table-cell-type-integer-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-manifests.js +91 -0
- package/esm2015/table-cell-types/table-cell-type-phone/table-cell-type-phone-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-phone/table-cell-type-phone.component.js +66 -0
- package/esm2015/table-cell-types/table-cell-type-progress-circle/table-cell-type-progress-circle-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-progress-circle/table-cell-type-progress-circle.component.js +160 -0
- package/esm2015/table-cell-types/table-cell-type-progress-circle-icon/table-cell-type-progress-circle-icon-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-progress-circle-icon/table-cell-type-progress-circle-icon.component.js +78 -0
- package/esm2015/table-cell-types/table-cell-type-string/table-cell-type-string-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-string/table-cell-type-string.component.js +150 -0
- package/esm2015/table-cell-types/table-cell-types.module.js +71 -0
- package/esm2015/table-cell-types/theseam-ui-common-table-cell-types.js +5 -0
- package/esm2015/tel-input/intl-tel-input.js +55 -0
- package/esm2015/tel-input/models/index.js +3 -0
- package/esm2015/tel-input/models/tel-input-country-data.js +2 -0
- package/esm2015/tel-input/models/tel-input-number-format-name.js +8 -0
- package/esm2015/tel-input/phone-number.pipe.js +51 -0
- package/esm2015/tel-input/public-api.js +10 -0
- package/esm2015/tel-input/tel-input/tel-input.component.js +167 -0
- package/esm2015/tel-input/tel-input-constants.js +18 -0
- package/esm2015/tel-input/tel-input-validator.js +27 -0
- package/esm2015/tel-input/tel-input.directive.js +164 -0
- package/esm2015/tel-input/tel-input.module.js +29 -0
- package/esm2015/tel-input/theseam-ui-common-tel-input.js +5 -0
- package/esm2015/tel-input/utils/add-country-code.js +23 -0
- package/esm2015/tel-input/utils/coerce-phone-number-format.js +22 -0
- package/esm2015/tel-input/utils/get-country-code.js +9 -0
- package/esm2015/tel-input/utils/get-dial-code.js +45 -0
- package/esm2015/tel-input/utils/get-global-intl-tel-input-globals.js +4 -0
- package/esm2015/tel-input/utils/get-global-intl-tel-input-utils.js +4 -0
- package/esm2015/tel-input/utils/get-intl-tel-input-utils.js +17 -0
- package/esm2015/tel-input/utils/get-validation-error-message.js +12 -0
- package/esm2015/tel-input/utils/index.js +10 -0
- package/esm2015/tel-input/utils/process-country-codes.js +49 -0
- package/esm2015/test-helpers/public-api.js +2 -0
- package/esm2015/test-helpers/theseam-ui-common-test-helpers.js +5 -0
- package/esm2015/test-helpers/tick-helper.js +74 -0
- package/esm2015/theseam-ui-common.js +5 -0
- package/esm2015/tiled-select/components/tiled-select/tiled-select.component.js +197 -0
- package/esm2015/tiled-select/components/tiled-select-tile/tiled-select-tile.component.js +125 -0
- package/esm2015/tiled-select/components/tiled-select-tile-icon/tiled-select-tile-icon.component.js +54 -0
- package/esm2015/tiled-select/directives/tiled-select-tile-icon-tpl.directive.js +16 -0
- package/esm2015/tiled-select/directives/tiled-select-tile-label-tpl.directive.js +15 -0
- package/esm2015/tiled-select/directives/tiled-select-tile-overlay.directive.js +19 -0
- package/esm2015/tiled-select/public-api.js +9 -0
- package/esm2015/tiled-select/theseam-ui-common-tiled-select.js +5 -0
- package/esm2015/tiled-select/tiled-select.models.js +2 -0
- package/esm2015/tiled-select/tiled-select.module.js +35 -0
- package/esm2015/toggle-edit/models/can-toggle-edit.js +2 -0
- package/esm2015/toggle-edit/models/index.js +3 -0
- package/esm2015/toggle-edit/models/toggle-edit-ref.js +2 -0
- package/esm2015/toggle-edit/public-api.js +7 -0
- package/esm2015/toggle-edit/theseam-ui-common-toggle-edit.js +5 -0
- package/esm2015/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.js +15 -0
- package/esm2015/toggle-edit/toggle-edit-display-tpl.directive.js +15 -0
- package/esm2015/toggle-edit/toggle-edit-keyboard-listener.service.js +56 -0
- package/esm2015/toggle-edit/toggle-edit.component.js +403 -0
- package/esm2015/toggle-edit/toggle-edit.module.js +40 -0
- package/esm2015/toggle-group/public-api.js +4 -0
- package/esm2015/toggle-group/theseam-ui-common-toggle-group.js +5 -0
- package/esm2015/toggle-group/toggle-group-option.directive.js +44 -0
- package/esm2015/toggle-group/toggle-group.directive.js +192 -0
- package/esm2015/toggle-group/toggle-group.module.js +24 -0
- package/esm2015/unsaved-changes-dialog/public-api.js +5 -0
- package/esm2015/unsaved-changes-dialog/theseam-ui-common-unsaved-changes-dialog.js +5 -0
- package/esm2015/unsaved-changes-dialog/unsaved-changes-can-deactivate.js +27 -0
- package/esm2015/unsaved-changes-dialog/unsaved-changes-dialog.component.js +20 -0
- package/esm2015/unsaved-changes-dialog/unsaved-changes-dialog.guard.js +35 -0
- package/esm2015/unsaved-changes-dialog/unsaved-changes-dialog.module.js +12 -0
- package/esm2015/utils/calc-percentage.js +4 -0
- package/esm2015/utils/cdk/get-closest-widget-cdk-drag.js +18 -0
- package/esm2015/utils/create-padding.js +17 -0
- package/esm2015/utils/file-utils.js +68 -0
- package/esm2015/utils/form/get-control-name.js +31 -0
- package/esm2015/utils/form/get-control-path.js +37 -0
- package/esm2015/utils/form/has-required-control.js +50 -0
- package/esm2015/utils/form/is-empty-input-value.js +6 -0
- package/esm2015/utils/form/observe-control-is-different.js +18 -0
- package/esm2015/utils/form/observe-control-status.js +17 -0
- package/esm2015/utils/form/observe-control-valid.js +30 -0
- package/esm2015/utils/form/observe-control-value-change.js +10 -0
- package/esm2015/utils/form/observe-control-value.js +11 -0
- package/esm2015/utils/form/wait-on-non-pending-status.js +18 -0
- package/esm2015/utils/fractional-digits-count.js +19 -0
- package/esm2015/utils/get-attribute.js +7 -0
- package/esm2015/utils/has-attribute.js +7 -0
- package/esm2015/utils/has-property.js +7 -0
- package/esm2015/utils/input-masks.js +2 -0
- package/esm2015/utils/is-absolute-url.js +17 -0
- package/esm2015/utils/is-null-or-undefined.js +4 -0
- package/esm2015/utils/is-numeric.js +4 -0
- package/esm2015/utils/load-style-sheet.js +14 -0
- package/esm2015/utils/load-style.js +13 -0
- package/esm2015/utils/not-null-or-undefined.js +4 -0
- package/esm2015/utils/obj-utils.js +27 -0
- package/esm2015/utils/observe-query-list.js +5 -0
- package/esm2015/utils/operators/index.js +3 -0
- package/esm2015/utils/operators/map-each.js +6 -0
- package/esm2015/utils/operators/tap-first.js +14 -0
- package/esm2015/utils/pad-end.js +9 -0
- package/esm2015/utils/pad-start.js +9 -0
- package/esm2015/utils/polling-ticker.js +121 -0
- package/esm2015/utils/public-api.js +38 -0
- package/esm2015/utils/refreshable.js +65 -0
- package/esm2015/utils/router/index.js +7 -0
- package/esm2015/utils/router/is-empty-url-route.js +4 -0
- package/esm2015/utils/router/leaf-child-route.js +8 -0
- package/esm2015/utils/router/operators/activated-routes-with-data-property.js +11 -0
- package/esm2015/utils/router/route-snapshot-path-full.js +5 -0
- package/esm2015/utils/router/route-snapshot-path-relative.js +4 -0
- package/esm2015/utils/router/will-have-data-prop.js +10 -0
- package/esm2015/utils/subscriber-count.js +19 -0
- package/esm2015/utils/theseam-ui-common-utils.js +5 -0
- package/esm2015/utils/toggle-attribute.js +35 -0
- package/esm2015/utils/wait-on-condition-async.js +33 -0
- package/esm2015/utils/wrap-into-observable.js +8 -0
- package/esm2015/validators/decimal.validator.js +25 -0
- package/esm2015/validators/email-exists.validator.js +18 -0
- package/esm2015/validators/integer.validator.js +25 -0
- package/esm2015/validators/phone-length.validator.js +8 -0
- package/esm2015/validators/public-api.js +6 -0
- package/esm2015/validators/tax-id.validator.js +13 -0
- package/esm2015/validators/theseam-ui-common-validators.js +5 -0
- package/esm2015/viewers/pdf-viewer/index.js +4 -0
- package/esm2015/viewers/pdf-viewer/pdf-page/pdf-page.component.js +134 -0
- package/esm2015/viewers/pdf-viewer/pdf-renderer.service.js +27 -0
- package/esm2015/viewers/pdf-viewer/pdf-viewer.component.js +149 -0
- package/esm2015/viewers/pdf-viewer/pdf-viewer.module.js +24 -0
- package/esm2015/viewers/public-api.js +2 -0
- package/esm2015/viewers/theseam-ui-common-viewers.js +5 -0
- package/esm2015/widget/directives/widget-drag-handle.directive.js +146 -0
- package/esm2015/widget/directives/widget-icon-tpl.directive.js +15 -0
- package/esm2015/widget/directives/widget-title-tpl.directive.js +15 -0
- package/esm2015/widget/public-api.js +38 -0
- package/esm2015/widget/theseam-ui-common-widget.js +5 -0
- package/esm2015/widget/widget/widget.component.js +121 -0
- package/esm2015/widget/widget-content-components/widget-button-group/widget-button-group.component.js +16 -0
- package/esm2015/widget/widget-content-components/widget-button-group/widget-button-group.module.js +22 -0
- package/esm2015/widget/widget-content-components/widget-content-header/widget-content-header.component.js +16 -0
- package/esm2015/widget/widget-content-components/widget-content-header/widget-content-header.module.js +19 -0
- package/esm2015/widget/widget-content-components/widget-description/widget-description.component.js +12 -0
- package/esm2015/widget/widget-content-components/widget-description/widget-description.module.js +19 -0
- package/esm2015/widget/widget-content-components/widget-empty-label/widget-empty-label.component.js +39 -0
- package/esm2015/widget/widget-content-components/widget-empty-label/widget-empty-label.module.js +19 -0
- package/esm2015/widget/widget-content-components/widget-footer-link/widget-footer-link.component.js +16 -0
- package/esm2015/widget/widget-content-components/widget-footer-link/widget-footer-link.module.js +19 -0
- package/esm2015/widget/widget-content-components/widget-footer-text/widget-footer-text.component.js +16 -0
- package/esm2015/widget/widget-content-components/widget-footer-text/widget-footer-text.module.js +19 -0
- package/esm2015/widget/widget-content-components/widget-header-badge/widget-header-badge.component.js +31 -0
- package/esm2015/widget/widget-content-components/widget-header-badge/widget-header-badge.module.js +19 -0
- package/esm2015/widget/widget-content-components/widget-list-group/widget-list-group-item/widget-list-group-item-icon-tpl.directive.js +16 -0
- package/esm2015/widget/widget-content-components/widget-list-group/widget-list-group-item/widget-list-group-item.component.js +162 -0
- package/esm2015/widget/widget-content-components/widget-list-group/widget-list-group.component.js +19 -0
- package/esm2015/widget/widget-content-components/widget-list-group/widget-list-group.module.js +31 -0
- package/esm2015/widget/widget-content-components/widget-table/widget-table.component.js +35 -0
- package/esm2015/widget/widget-content-components/widget-table/widget-table.module.js +23 -0
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile-footer/widget-tile-footer.component.js +19 -0
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile-footer-item/widget-tile-footer-item.component.js +43 -0
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile-group/widget-tile-group.component.js +16 -0
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile-secondary-icon.directive.js +16 -0
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile.component.js +108 -0
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile.module.js +33 -0
- package/esm2015/widget/widget-content-components/widget-tile-list/widget-tile-list.component.js +15 -0
- package/esm2015/widget/widget-content-components/widget-tile-list/widget-tile-list.module.js +21 -0
- package/esm2015/widget/widget-footer/widget-footer.component.js +16 -0
- package/esm2015/widget/widget-registry.models.js +2 -0
- package/esm2015/widget/widget-registry.service.js +56 -0
- package/esm2015/widget/widget-token.js +3 -0
- package/esm2015/widget/widget.module.js +70 -0
- package/fesm2015/theseam-ui-common-asset-reader.js +173 -0
- package/fesm2015/theseam-ui-common-asset-reader.js.map +1 -0
- package/fesm2015/theseam-ui-common-breadcrumbs.js +202 -0
- package/fesm2015/theseam-ui-common-breadcrumbs.js.map +1 -0
- package/fesm2015/theseam-ui-common-buttons.js +362 -0
- package/fesm2015/theseam-ui-common-buttons.js.map +1 -0
- package/fesm2015/theseam-ui-common-card.js +145 -0
- package/fesm2015/theseam-ui-common-card.js.map +1 -0
- package/fesm2015/theseam-ui-common-checkbox.js +302 -0
- package/fesm2015/theseam-ui-common-checkbox.js.map +1 -0
- package/fesm2015/theseam-ui-common-confirm-dialog.js +153 -0
- package/fesm2015/theseam-ui-common-confirm-dialog.js.map +1 -0
- package/fesm2015/theseam-ui-common-core.js +231 -0
- package/fesm2015/theseam-ui-common-core.js.map +1 -0
- package/fesm2015/theseam-ui-common-data-exporter.js +81 -0
- package/fesm2015/theseam-ui-common-data-exporter.js.map +1 -0
- package/fesm2015/theseam-ui-common-data-filters.js +452 -0
- package/fesm2015/theseam-ui-common-data-filters.js.map +1 -0
- package/fesm2015/theseam-ui-common-datatable-dynamic.js +991 -0
- package/fesm2015/theseam-ui-common-datatable-dynamic.js.map +1 -0
- package/fesm2015/theseam-ui-common-datatable.js +1714 -0
- package/fesm2015/theseam-ui-common-datatable.js.map +1 -0
- package/fesm2015/theseam-ui-common-dynamic-component-loader.js +143 -0
- package/fesm2015/theseam-ui-common-dynamic-component-loader.js.map +1 -0
- package/fesm2015/theseam-ui-common-dynamic.js +699 -0
- package/fesm2015/theseam-ui-common-dynamic.js.map +1 -0
- package/fesm2015/theseam-ui-common-footer-bar.js +36 -0
- package/fesm2015/theseam-ui-common-footer-bar.js.map +1 -0
- package/fesm2015/theseam-ui-common-form-field-error.js +464 -0
- package/fesm2015/theseam-ui-common-form-field-error.js.map +1 -0
- package/fesm2015/theseam-ui-common-form-field.js +506 -0
- package/fesm2015/theseam-ui-common-form-field.js.map +1 -0
- package/fesm2015/theseam-ui-common-framework.js +2650 -0
- package/fesm2015/theseam-ui-common-framework.js.map +1 -0
- package/fesm2015/theseam-ui-common-graphql.js +331 -0
- package/fesm2015/theseam-ui-common-graphql.js.map +1 -0
- package/fesm2015/theseam-ui-common-icon.js +518 -0
- package/fesm2015/theseam-ui-common-icon.js.map +1 -0
- package/fesm2015/theseam-ui-common-layout.js +89 -0
- package/fesm2015/theseam-ui-common-layout.js.map +1 -0
- package/fesm2015/theseam-ui-common-loading.js +131 -0
- package/fesm2015/theseam-ui-common-loading.js.map +1 -0
- package/fesm2015/theseam-ui-common-menu.js +762 -0
- package/fesm2015/theseam-ui-common-menu.js.map +1 -0
- package/fesm2015/theseam-ui-common-modal.js +1234 -0
- package/fesm2015/theseam-ui-common-modal.js.map +1 -0
- package/fesm2015/theseam-ui-common-models.js +54 -0
- package/fesm2015/theseam-ui-common-models.js.map +1 -0
- package/fesm2015/theseam-ui-common-popover.js +476 -0
- package/fesm2015/theseam-ui-common-popover.js.map +1 -0
- package/fesm2015/theseam-ui-common-progress.js +87 -0
- package/fesm2015/theseam-ui-common-progress.js.map +1 -0
- package/fesm2015/theseam-ui-common-scrollbar.js +184 -0
- package/fesm2015/theseam-ui-common-scrollbar.js.map +1 -0
- package/fesm2015/theseam-ui-common-services.js +140 -0
- package/fesm2015/theseam-ui-common-services.js.map +1 -0
- package/fesm2015/theseam-ui-common-shared.js +696 -0
- package/fesm2015/theseam-ui-common-shared.js.map +1 -0
- package/fesm2015/theseam-ui-common-storage.js +147 -0
- package/fesm2015/theseam-ui-common-storage.js.map +1 -0
- package/fesm2015/theseam-ui-common-story-helpers.js +441 -0
- package/fesm2015/theseam-ui-common-story-helpers.js.map +1 -0
- package/fesm2015/theseam-ui-common-tabbed.js +262 -0
- package/fesm2015/theseam-ui-common-tabbed.js.map +1 -0
- package/fesm2015/theseam-ui-common-table-cell-type.js +191 -0
- package/fesm2015/theseam-ui-common-table-cell-type.js.map +1 -0
- package/fesm2015/theseam-ui-common-table-cell-types.js +799 -0
- package/fesm2015/theseam-ui-common-table-cell-types.js.map +1 -0
- package/fesm2015/theseam-ui-common-table.js +118 -0
- package/fesm2015/theseam-ui-common-table.js.map +1 -0
- package/fesm2015/theseam-ui-common-tel-input.js +681 -0
- package/fesm2015/theseam-ui-common-tel-input.js.map +1 -0
- package/fesm2015/theseam-ui-common-test-helpers.js +81 -0
- package/fesm2015/theseam-ui-common-test-helpers.js.map +1 -0
- package/fesm2015/theseam-ui-common-tiled-select.js +448 -0
- package/fesm2015/theseam-ui-common-tiled-select.js.map +1 -0
- package/fesm2015/theseam-ui-common-toggle-edit.js +521 -0
- package/fesm2015/theseam-ui-common-toggle-edit.js.map +1 -0
- package/fesm2015/theseam-ui-common-toggle-group.js +260 -0
- package/fesm2015/theseam-ui-common-toggle-group.js.map +1 -0
- package/fesm2015/theseam-ui-common-unsaved-changes-dialog.js +97 -0
- package/fesm2015/theseam-ui-common-unsaved-changes-dialog.js.map +1 -0
- package/fesm2015/theseam-ui-common-utils.js +797 -0
- package/fesm2015/theseam-ui-common-utils.js.map +1 -0
- package/fesm2015/theseam-ui-common-validators.js +94 -0
- package/fesm2015/theseam-ui-common-validators.js.map +1 -0
- package/fesm2015/theseam-ui-common-viewers.js +328 -0
- package/fesm2015/theseam-ui-common-viewers.js.map +1 -0
- package/fesm2015/theseam-ui-common-widget.js +1187 -0
- package/fesm2015/theseam-ui-common-widget.js.map +1 -0
- package/fesm2015/theseam-ui-common.js +47 -0
- package/fesm2015/theseam-ui-common.js.map +1 -0
- package/footer-bar/footer-bar/footer-bar.component.d.ts +5 -0
- package/footer-bar/footer-bar.module.d.ts +2 -0
- package/footer-bar/package.json +11 -0
- package/footer-bar/public-api.d.ts +2 -0
- package/footer-bar/theseam-ui-common-footer-bar.d.ts +4 -0
- package/footer-bar/theseam-ui-common-footer-bar.metadata.json +1 -0
- package/form-field/form-field-error.directive.d.ts +12 -0
- package/form-field/form-field-help-text.directive.d.ts +5 -0
- package/form-field/form-field-label-tpl.directive.d.ts +5 -0
- package/form-field/form-field-required-indicator.component.d.ts +9 -0
- package/form-field/form-field.component.d.ts +114 -0
- package/form-field/form-field.module.d.ts +2 -0
- package/form-field/input.directive.d.ts +72 -0
- package/form-field/package.json +11 -0
- package/form-field/public-api.d.ts +7 -0
- package/form-field/theseam-ui-common-form-field.d.ts +4 -0
- package/form-field/theseam-ui-common-form-field.metadata.json +1 -0
- package/form-field-error/form-field-error/form-field-error.component.d.ts +8 -0
- package/form-field-error/form-field-error-list/form-field-error-list-item-tpl.directive.d.ts +9 -0
- package/form-field-error/form-field-error-list/form-field-error-list-item.directive.d.ts +6 -0
- package/form-field-error/form-field-error-list/form-field-error-list.component.d.ts +63 -0
- package/form-field-error/form-field-error.module.d.ts +2 -0
- package/form-field-error/package.json +11 -0
- package/form-field-error/public-api.d.ts +5 -0
- package/form-field-error/theseam-ui-common-form-field-error.d.ts +4 -0
- package/form-field-error/theseam-ui-common-form-field-error.metadata.json +1 -0
- package/framework/base-layout/_base-layout-theme.scss +3 -0
- package/framework/base-layout/base-layout-action.d.ts +31 -0
- package/framework/base-layout/base-layout-nav.d.ts +18 -0
- package/framework/base-layout/base-layout-ref.d.ts +14 -0
- package/framework/base-layout/base-layout-tokens.d.ts +3 -0
- package/framework/base-layout/base-layout.component.d.ts +43 -0
- package/framework/base-layout/base-layout.component.scss +81 -0
- package/framework/base-layout/base-layout.module.d.ts +2 -0
- package/framework/base-layout/directives/base-layout-content-footer.directive.d.ts +6 -0
- package/framework/base-layout/directives/base-layout-content-header.directive.d.ts +6 -0
- package/framework/base-layout/directives/base-layout-content.directive.d.ts +6 -0
- package/framework/base-layout/directives/base-layout-nav-toggle.directive.d.ts +14 -0
- package/framework/base-layout/directives/base-layout-side-bar.directive.d.ts +6 -0
- package/framework/base-layout/directives/base-layout-top-bar.directive.d.ts +6 -0
- package/framework/base-layout/index.d.ts +12 -0
- package/framework/base-layout/styles/_utilities.scss +3 -0
- package/framework/base-layout/styles/_variables.scss +9 -0
- package/framework/dashboard/_dashboard-theme.scss +3 -0
- package/framework/dashboard/dashboard-widget-container/dashboard-widget-container.component.d.ts +8 -0
- package/framework/dashboard/dashboard-widget-container/dashboard-widget-container.component.scss +0 -0
- package/framework/dashboard/dashboard-widget-template-container/dashboard-widget-template-container.component.d.ts +11 -0
- package/framework/dashboard/dashboard-widget-template-container/dashboard-widget-template-container.component.scss +0 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widget-portal-outlet.directive.d.ts +47 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets-item.d.ts +43 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets-preferences-accessor-token.d.ts +3 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets-preferences-accessor.d.ts +15 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets-preferences.service.d.ts +27 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.d.ts +58 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +48 -0
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.service.d.ts +34 -0
- package/framework/dashboard/dashboard.component.d.ts +8 -0
- package/framework/dashboard/dashboard.component.scss +0 -0
- package/framework/dashboard/dashboard.module.d.ts +2 -0
- package/framework/dashboard/index.d.ts +11 -0
- package/framework/dashboard/styles/_utilities.scss +3 -0
- package/framework/dashboard/styles/_variables.scss +2 -0
- package/framework/dynamic-router/dynamic-route-def.d.ts +8 -0
- package/framework/dynamic-router/dynamic-router.module.d.ts +2 -0
- package/framework/dynamic-router/hierarchy-router-outlet/hierarchy-route-animations.d.ts +5 -0
- package/framework/dynamic-router/hierarchy-router-outlet/hierarchy-router-outlet.component.d.ts +23 -0
- package/framework/dynamic-router/index.d.ts +5 -0
- package/framework/dynamic-router/resolvers/hierarchy-level.resolver.d.ts +7 -0
- package/framework/package.json +11 -0
- package/framework/public-api.d.ts +6 -0
- package/framework/schema-form/index.d.ts +3 -0
- package/framework/schema-form/schema-form-framework.component.d.ts +5 -0
- package/framework/schema-form/schema-form-framework.d.ts +18 -0
- package/framework/schema-form/schema-form.module.d.ts +2 -0
- package/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.d.ts +21 -0
- package/framework/schema-form-controls/schema-form-controls.module.d.ts +2 -0
- package/framework/schema-form-controls/schema-form-input/schema-form-input.component.d.ts +19 -0
- package/framework/schema-form-controls/schema-form-number/schema-form-number.component.d.ts +22 -0
- package/framework/schema-form-controls/schema-form-select/schema-form-select.component.d.ts +20 -0
- package/framework/schema-form-controls/schema-form-submit/schema-form-submit.component.d.ts +18 -0
- package/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.d.ts +34 -0
- package/framework/side-nav/_side-nav-theme.scss +5 -0
- package/framework/side-nav/index.d.ts +6 -0
- package/framework/side-nav/side-nav-item/side-nav-item.component.d.ts +65 -0
- package/framework/side-nav/side-nav-item/side-nav-item.component.scss +158 -0
- package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.d.ts +11 -0
- package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.scss +32 -0
- package/framework/side-nav/side-nav-utils.d.ts +18 -0
- package/framework/side-nav/side-nav.component.d.ts +40 -0
- package/framework/side-nav/side-nav.component.scss +47 -0
- package/framework/side-nav/side-nav.models.d.ts +64 -0
- package/framework/side-nav/side-nav.module.d.ts +2 -0
- package/framework/side-nav/side-nav.service.d.ts +21 -0
- package/framework/side-nav/styles/_themes/light/_variables.scss +29 -0
- package/framework/side-nav/styles/_themes/primary/_variables.scss +31 -0
- package/framework/side-nav/styles/_utilities.scss +3 -0
- package/framework/side-nav/styles/_variables.scss +2 -0
- package/framework/theseam-ui-common-framework.d.ts +12 -0
- package/framework/theseam-ui-common-framework.metadata.json +1 -0
- package/framework/top-bar/index.d.ts +7 -0
- package/framework/top-bar/top-bar-item.directive.d.ts +5 -0
- package/framework/top-bar/top-bar-menu-btn-detail.directive.d.ts +5 -0
- package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.d.ts +20 -0
- package/framework/top-bar/top-bar-menu.directive.d.ts +5 -0
- package/framework/top-bar/top-bar-title/top-bar-title.component.d.ts +7 -0
- package/framework/top-bar/top-bar.component.d.ts +59 -0
- package/framework/top-bar/top-bar.module.d.ts +2 -0
- package/graphql/models/direction.d.ts +6 -0
- package/graphql/models/hint-definition.d.ts +7 -0
- package/graphql/models/hint-transform-operation.d.ts +5 -0
- package/graphql/models/hint-transformer.d.ts +3 -0
- package/graphql/models/hints-kind.d.ts +7 -0
- package/graphql/models/hints-token.d.ts +7 -0
- package/graphql/models/index.d.ts +8 -0
- package/graphql/models/query-processing-config.d.ts +9 -0
- package/graphql/models/variable.d.ts +5 -0
- package/graphql/package.json +11 -0
- package/graphql/public-api.d.ts +1 -0
- package/graphql/theseam-ui-common-graphql.d.ts +4 -0
- package/graphql/theseam-ui-common-graphql.metadata.json +1 -0
- package/graphql/utils/contains-variable.d.ts +2 -0
- package/graphql/utils/gql-var.d.ts +3 -0
- package/graphql/utils/hints-tokens-containing-hint.d.ts +2 -0
- package/graphql/utils/index.d.ts +10 -0
- package/graphql/utils/inline-variables.d.ts +2 -0
- package/graphql/utils/parse-comments.d.ts +2 -0
- package/graphql/utils/parse-hints.d.ts +17 -0
- package/graphql/utils/remove-variable-definition.d.ts +2 -0
- package/graphql/utils/remove-variable-definitions-not-defined.d.ts +3 -0
- package/graphql/utils/remove-variable.d.ts +2 -0
- package/graphql/utils/to-gql.d.ts +1 -0
- package/icon/icon/icon.component.d.ts +54 -0
- package/icon/icon-btn/icon-btn.component.d.ts +74 -0
- package/icon/icon-notification/icon-notification.component.d.ts +47 -0
- package/icon/icon.d.ts +2 -0
- package/icon/icon.module.d.ts +2 -0
- package/icon/package.json +11 -0
- package/icon/public-api.d.ts +6 -0
- package/icon/theseam-ui-common-icon.d.ts +4 -0
- package/icon/theseam-ui-common-icon.metadata.json +1 -0
- package/icon/utils/file-extension-icon.d.ts +3 -0
- package/icon/utils/get-known-icon.d.ts +2 -0
- package/icon/utils/index.d.ts +2 -0
- package/layout/breakpoint-aliases.d.ts +20 -0
- package/layout/layout.module.d.ts +2 -0
- package/layout/layout.service.d.ts +12 -0
- package/layout/observe-media-query.d.ts +8 -0
- package/layout/package.json +11 -0
- package/layout/public-api.d.ts +4 -0
- package/layout/theseam-ui-common-layout.d.ts +4 -0
- package/layout/theseam-ui-common-layout.metadata.json +1 -0
- package/loading/loading/loading.component.d.ts +9 -0
- package/loading/loading-overlay.service.d.ts +13 -0
- package/loading/loading-themes.d.ts +3 -0
- package/loading/loading.models.d.ts +1 -0
- package/loading/loading.module.d.ts +4 -0
- package/loading/package.json +11 -0
- package/loading/public-api.d.ts +5 -0
- package/loading/theseam-ui-common-loading.d.ts +4 -0
- package/loading/theseam-ui-common-loading.metadata.json +1 -0
- package/menu/menu-animations.d.ts +8 -0
- package/menu/menu-divider.component.d.ts +2 -0
- package/menu/menu-footer/menu-footer.component.d.ts +9 -0
- package/menu/menu-footer-action/menu-footer-action.component.d.ts +19 -0
- package/menu/menu-header/menu-header.component.d.ts +9 -0
- package/menu/menu-item.component.d.ts +41 -0
- package/menu/menu-panel-token.d.ts +6 -0
- package/menu/menu-panel.d.ts +20 -0
- package/menu/menu-toggle.directive.d.ts +53 -0
- package/menu/menu.component.d.ts +62 -0
- package/menu/menu.module.d.ts +2 -0
- package/menu/package.json +11 -0
- package/menu/public-api.d.ts +11 -0
- package/menu/theseam-ui-common-menu.d.ts +4 -0
- package/menu/theseam-ui-common-menu.metadata.json +1 -0
- package/modal/directives/modal-close.directive.d.ts +20 -0
- package/modal/directives/modal-footer-tpl.directive.d.ts +5 -0
- package/modal/directives/modal-header-icon-tpl.directive.d.ts +5 -0
- package/modal/directives/modal-header-title-tpl.directive.d.ts +5 -0
- package/modal/directives/modal-title.directive.d.ts +6 -0
- package/modal/directives/modal.directive.d.ts +8 -0
- package/modal/modal/modal.component.d.ts +56 -0
- package/modal/modal-body/modal-body.component.d.ts +7 -0
- package/modal/modal-config.d.ts +93 -0
- package/modal/modal-container/modal-container.component.d.ts +77 -0
- package/modal/modal-footer/modal-footer.component.d.ts +6 -0
- package/modal/modal-header/modal-header.component.d.ts +11 -0
- package/modal/modal-injectors.d.ts +23 -0
- package/modal/modal-ref.d.ts +50 -0
- package/modal/modal-utils.d.ts +8 -0
- package/modal/modal.models.d.ts +24 -0
- package/modal/modal.module.d.ts +2 -0
- package/modal/modal.service.d.ts +95 -0
- package/modal/package.json +11 -0
- package/modal/public-api.d.ts +19 -0
- package/modal/route-modal/route-modal.component.d.ts +16 -0
- package/modal/theseam-ui-common-modal.d.ts +4 -0
- package/modal/theseam-ui-common-modal.metadata.json +1 -0
- package/models/component-type.d.ts +2 -0
- package/models/http-status-codes.d.ts +18 -0
- package/models/package.json +11 -0
- package/models/public-api.d.ts +7 -0
- package/models/size-prefixes.d.ts +1 -0
- package/models/size-types.d.ts +1 -0
- package/models/theme-names.d.ts +2 -0
- package/models/theme-prefixes.d.ts +1 -0
- package/models/theme-types.d.ts +2 -0
- package/models/theseam-ui-common-models.d.ts +4 -0
- package/models/theseam-ui-common-models.metadata.json +1 -0
- package/package.json +61 -0
- package/popover/package.json +11 -0
- package/popover/popover/popover.component.d.ts +44 -0
- package/popover/popover-animations.d.ts +4 -0
- package/popover/popover.directive.d.ts +57 -0
- package/popover/popover.module.d.ts +2 -0
- package/popover/public-api.d.ts +4 -0
- package/popover/theseam-ui-common-popover.d.ts +4 -0
- package/popover/theseam-ui-common-popover.metadata.json +1 -0
- package/progress/package.json +11 -0
- package/progress/progress-circle/_progress-circle-theme.scss +3 -0
- package/progress/progress-circle/progress-circle.component.d.ts +27 -0
- package/progress/progress-circle/progress-circle.component.scss +105 -0
- package/progress/progress-circle/styles/_utilities.scss +3 -0
- package/progress/progress-circle/styles/_variables.scss +8 -0
- package/progress/progress.module.d.ts +2 -0
- package/progress/public-api.d.ts +2 -0
- package/progress/theseam-ui-common-progress.d.ts +4 -0
- package/progress/theseam-ui-common-progress.metadata.json +1 -0
- package/public_api.d.ts +2 -0
- package/scrollbar/overlay-scrollbar.directive.d.ts +21 -0
- package/scrollbar/overlay-scrollbars-config-model.d.ts +2 -0
- package/scrollbar/overlay-scrollbars-config.d.ts +51 -0
- package/scrollbar/overlay-scrollbars.service.d.ts +20 -0
- package/scrollbar/package.json +11 -0
- package/scrollbar/public-api.d.ts +5 -0
- package/scrollbar/scrollbar.module.d.ts +2 -0
- package/scrollbar/theseam-ui-common-scrollbar.d.ts +4 -0
- package/scrollbar/theseam-ui-common-scrollbar.metadata.json +1 -0
- package/services/asset-loader.service.d.ts +13 -0
- package/services/font-loader.service.d.ts +43 -0
- package/services/package.json +11 -0
- package/services/public-api.d.ts +3 -0
- package/services/router-helpers.service.d.ts +7 -0
- package/services/theseam-ui-common-services.d.ts +4 -0
- package/services/theseam-ui-common-services.metadata.json +1 -0
- package/shared/components/index.d.ts +1 -0
- package/shared/components/password-input-reveal/password-input-reveal.component.d.ts +14 -0
- package/shared/directives/auto-focus.directive.d.ts +15 -0
- package/shared/directives/click-outside.directive.d.ts +10 -0
- package/shared/directives/disable-control.directive.d.ts +6 -0
- package/shared/directives/elem-resized.directive.d.ts +17 -0
- package/shared/directives/hover-class-toggle.directive.d.ts +33 -0
- package/shared/directives/hover-class.directive.d.ts +28 -0
- package/shared/directives/index.d.ts +8 -0
- package/shared/directives/ng-select-extra.directive.d.ts +39 -0
- package/shared/directives/ngx-quill-extra.directive.d.ts +20 -0
- package/shared/package.json +11 -0
- package/shared/pipes/index.d.ts +2 -0
- package/shared/pipes/mask-chars.pipe.d.ts +4 -0
- package/shared/pipes/truncate.pipe.d.ts +4 -0
- package/shared/public-api.d.ts +4 -0
- package/shared/shared.module.d.ts +2 -0
- package/shared/theseam-ui-common-shared.d.ts +4 -0
- package/shared/theseam-ui-common-shared.metadata.json +1 -0
- package/storage/local-storage.service.d.ts +28 -0
- package/storage/localstorage-memory.d.ts +37 -0
- package/storage/package.json +11 -0
- package/storage/public-api.d.ts +1 -0
- package/storage/theseam-ui-common-storage.d.ts +4 -0
- package/storage/theseam-ui-common-storage.metadata.json +1 -0
- package/story-helpers/arg-type-helpers.d.ts +5 -0
- package/story-helpers/args-to-tpl.d.ts +24 -0
- package/story-helpers/initial-route-factory.d.ts +2 -0
- package/story-helpers/initial-route.service.d.ts +7 -0
- package/story-helpers/on-story-bootstrapped-exec.d.ts +29 -0
- package/story-helpers/on-story-bootstrapped-trigger.d.ts +23 -0
- package/story-helpers/package.json +11 -0
- package/story-helpers/public-api.d.ts +14 -0
- package/story-helpers/route-button.d.ts +5 -0
- package/story-helpers/routes-arg-type.d.ts +2 -0
- package/story-helpers/story-empty-with-route.component.d.ts +2 -0
- package/story-helpers/story-empty.component.d.ts +2 -0
- package/story-helpers/story-helper-components.module.d.ts +2 -0
- package/story-helpers/story-initial-route.d.ts +4 -0
- package/story-helpers/story-modal-container.component.d.ts +20 -0
- package/story-helpers/story-toastr.service.d.ts +30 -0
- package/story-helpers/theseam-ui-common-story-helpers.d.ts +4 -0
- package/story-helpers/theseam-ui-common-story-helpers.metadata.json +1 -0
- package/styles/_storybook-fixes.scss +7 -0
- package/styles/_variables.scss +0 -0
- package/styles/bootstrap/_bootstrap.scss +45 -0
- package/styles/bootstrap/_bs-styles.scss +105 -0
- package/styles/bootstrap/_bs-utilities.scss +5 -0
- package/styles/bootstrap/_bs-variables.scss +141 -0
- package/styles/common/_forms.scss +15 -0
- package/styles/common/_global.scss +9 -0
- package/styles/common/_hacks.scss +14 -0
- package/styles/common/_table.scss +124 -0
- package/styles/common/_text.scss +1 -0
- package/styles/theme.scss +19 -0
- package/styles/utilities.scss +14 -0
- package/styles/vendor/_vendor.scss +3 -0
- package/styles/vendor/ng-select/_ng-select-bs4.scss +445 -0
- package/styles/vendor/ngx-datatable/_ngx-datatable.scss +108 -0
- package/styles/vendor/quill/_quill.scss +26 -0
- package/tabbed/directives/tabbed-tab-content.directive.d.ts +4 -0
- package/tabbed/directives/tabbed-tab.directive.d.ts +9 -0
- package/tabbed/package.json +11 -0
- package/tabbed/public-api.d.ts +7 -0
- package/tabbed/tabbed-content/tabbed-content.component.d.ts +7 -0
- package/tabbed/tabbed-item/tabbed-item.component.d.ts +14 -0
- package/tabbed/tabbed.component.d.ts +36 -0
- package/tabbed/tabbed.module.d.ts +2 -0
- package/tabbed/tabbed.service.d.ts +8 -0
- package/tabbed/theseam-ui-common-tabbed.d.ts +4 -0
- package/tabbed/theseam-ui-common-tabbed.metadata.json +1 -0
- package/table/package.json +11 -0
- package/table/public-api.d.ts +2 -0
- package/table/table/table.component.d.ts +43 -0
- package/table/table.module.d.ts +2 -0
- package/table/theseam-ui-common-table.d.ts +4 -0
- package/table/theseam-ui-common-table.metadata.json +1 -0
- package/table-cell-type/package.json +11 -0
- package/table-cell-type/public-api.d.ts +11 -0
- package/table-cell-type/services/table-cell-types-helpers.service.d.ts +15 -0
- package/table-cell-type/table-cell-type-action.d.ts +13 -0
- package/table-cell-type/table-cell-type-column.d.ts +12 -0
- package/table-cell-type/table-cell-type-config.d.ts +12 -0
- package/table-cell-type/table-cell-type-export-props.d.ts +15 -0
- package/table-cell-type/table-cell-type-manifest-provider.d.ts +7 -0
- package/table-cell-type/table-cell-type-models.d.ts +39 -0
- package/table-cell-type/table-cell-type-name.d.ts +1 -0
- package/table-cell-type/table-cell-type-selector.component.d.ts +25 -0
- package/table-cell-type/table-cell-type-tokens.d.ts +4 -0
- package/table-cell-type/table-cell-type.module.d.ts +2 -0
- package/table-cell-type/theseam-ui-common-table-cell-type.d.ts +4 -0
- package/table-cell-type/theseam-ui-common-table-cell-type.metadata.json +1 -0
- package/table-cell-types/package.json +11 -0
- package/table-cell-types/public-api.d.ts +15 -0
- package/table-cell-types/table-cell-type-date/table-cell-type-date-config.d.ts +9 -0
- package/table-cell-types/table-cell-type-date/table-cell-type-date.component.d.ts +12 -0
- package/table-cell-types/table-cell-type-date/table-cell-type-date.d.ts +3 -0
- package/table-cell-types/table-cell-type-decimal/table-cell-type-decimal-config.d.ts +3 -0
- package/table-cell-types/table-cell-type-icon/table-cell-type-icon-config.d.ts +34 -0
- package/table-cell-types/table-cell-type-icon/table-cell-type-icon.component.d.ts +53 -0
- package/table-cell-types/table-cell-type-integer/table-cell-type-integer-config.d.ts +3 -0
- package/table-cell-types/table-cell-type-manifests.d.ts +10 -0
- package/table-cell-types/table-cell-type-phone/table-cell-type-phone-config.d.ts +13 -0
- package/table-cell-types/table-cell-type-phone/table-cell-type-phone.component.d.ts +17 -0
- package/table-cell-types/table-cell-type-progress-circle/table-cell-type-progress-circle-config.d.ts +29 -0
- package/table-cell-types/table-cell-type-progress-circle/table-cell-type-progress-circle.component.d.ts +48 -0
- package/table-cell-types/table-cell-type-progress-circle-icon/table-cell-type-progress-circle-icon-config.d.ts +49 -0
- package/table-cell-types/table-cell-type-progress-circle-icon/table-cell-type-progress-circle-icon.component.d.ts +21 -0
- package/table-cell-types/table-cell-type-string/table-cell-type-string-config.d.ts +10 -0
- package/table-cell-types/table-cell-type-string/table-cell-type-string.component.d.ts +45 -0
- package/table-cell-types/table-cell-types.module.d.ts +2 -0
- package/table-cell-types/theseam-ui-common-table-cell-types.d.ts +6 -0
- package/table-cell-types/theseam-ui-common-table-cell-types.metadata.json +1 -0
- package/tel-input/intl-tel-input.d.ts +300 -0
- package/tel-input/models/index.d.ts +2 -0
- package/tel-input/models/tel-input-country-data.d.ts +9 -0
- package/tel-input/models/tel-input-number-format-name.d.ts +4 -0
- package/tel-input/package.json +11 -0
- package/tel-input/phone-number.pipe.d.ts +11 -0
- package/tel-input/public-api.d.ts +9 -0
- package/tel-input/tel-input/tel-input.component.d.ts +83 -0
- package/tel-input/tel-input-constants.d.ts +4 -0
- package/tel-input/tel-input-validator.d.ts +7 -0
- package/tel-input/tel-input.directive.d.ts +28 -0
- package/tel-input/tel-input.module.d.ts +2 -0
- package/tel-input/theseam-ui-common-tel-input.d.ts +4 -0
- package/tel-input/theseam-ui-common-tel-input.metadata.json +1 -0
- package/tel-input/utils/add-country-code.d.ts +7 -0
- package/tel-input/utils/coerce-phone-number-format.d.ts +7 -0
- package/tel-input/utils/get-country-code.d.ts +2 -0
- package/tel-input/utils/get-dial-code.d.ts +9 -0
- package/tel-input/utils/get-global-intl-tel-input-globals.d.ts +2 -0
- package/tel-input/utils/get-global-intl-tel-input-utils.d.ts +2 -0
- package/tel-input/utils/get-intl-tel-input-utils.d.ts +2 -0
- package/tel-input/utils/get-validation-error-message.d.ts +5 -0
- package/tel-input/utils/index.d.ts +9 -0
- package/tel-input/utils/process-country-codes.d.ts +8 -0
- package/test-helpers/package.json +11 -0
- package/test-helpers/public-api.d.ts +1 -0
- package/test-helpers/theseam-ui-common-test-helpers.d.ts +4 -0
- package/test-helpers/theseam-ui-common-test-helpers.metadata.json +1 -0
- package/test-helpers/tick-helper.d.ts +70 -0
- package/theseam-ui-common.d.ts +4 -0
- package/theseam-ui-common.metadata.json +1 -0
- package/tiled-select/components/tiled-select/tiled-select.component.d.ts +50 -0
- package/tiled-select/components/tiled-select-tile/tiled-select-tile.component.d.ts +41 -0
- package/tiled-select/components/tiled-select-tile-icon/tiled-select-tile-icon.component.d.ts +26 -0
- package/tiled-select/directives/tiled-select-tile-icon-tpl.directive.d.ts +5 -0
- package/tiled-select/directives/tiled-select-tile-label-tpl.directive.d.ts +5 -0
- package/tiled-select/directives/tiled-select-tile-overlay.directive.d.ts +7 -0
- package/tiled-select/package.json +11 -0
- package/tiled-select/public-api.d.ts +8 -0
- package/tiled-select/theseam-ui-common-tiled-select.d.ts +4 -0
- package/tiled-select/theseam-ui-common-tiled-select.metadata.json +1 -0
- package/tiled-select/tiled-select.models.d.ts +11 -0
- package/tiled-select/tiled-select.module.d.ts +2 -0
- package/toggle-edit/models/can-toggle-edit.d.ts +7 -0
- package/toggle-edit/models/index.d.ts +2 -0
- package/toggle-edit/models/toggle-edit-ref.d.ts +30 -0
- package/toggle-edit/package.json +11 -0
- package/toggle-edit/public-api.d.ts +6 -0
- package/toggle-edit/theseam-ui-common-toggle-edit.d.ts +4 -0
- package/toggle-edit/theseam-ui-common-toggle-edit.metadata.json +1 -0
- package/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.d.ts +5 -0
- package/toggle-edit/toggle-edit-display-tpl.directive.d.ts +5 -0
- package/toggle-edit/toggle-edit-keyboard-listener.service.d.ts +14 -0
- package/toggle-edit/toggle-edit.component.d.ts +90 -0
- package/toggle-edit/toggle-edit.module.d.ts +2 -0
- package/toggle-group/package.json +11 -0
- package/toggle-group/public-api.d.ts +3 -0
- package/toggle-group/theseam-ui-common-toggle-group.d.ts +4 -0
- package/toggle-group/theseam-ui-common-toggle-group.metadata.json +1 -0
- package/toggle-group/toggle-group-option.directive.d.ts +15 -0
- package/toggle-group/toggle-group.directive.d.ts +36 -0
- package/toggle-group/toggle-group.module.d.ts +2 -0
- package/unsaved-changes-dialog/package.json +11 -0
- package/unsaved-changes-dialog/public-api.d.ts +4 -0
- package/unsaved-changes-dialog/theseam-ui-common-unsaved-changes-dialog.d.ts +4 -0
- package/unsaved-changes-dialog/theseam-ui-common-unsaved-changes-dialog.metadata.json +1 -0
- package/unsaved-changes-dialog/unsaved-changes-can-deactivate.d.ts +4 -0
- package/unsaved-changes-dialog/unsaved-changes-dialog.component.d.ts +5 -0
- package/unsaved-changes-dialog/unsaved-changes-dialog.guard.d.ts +8 -0
- package/unsaved-changes-dialog/unsaved-changes-dialog.module.d.ts +2 -0
- package/utils/calc-percentage.d.ts +1 -0
- package/utils/cdk/get-closest-widget-cdk-drag.d.ts +8 -0
- package/utils/create-padding.d.ts +1 -0
- package/utils/file-utils.d.ts +12 -0
- package/utils/form/get-control-name.d.ts +22 -0
- package/utils/form/get-control-path.d.ts +27 -0
- package/utils/form/has-required-control.d.ts +31 -0
- package/utils/form/is-empty-input-value.d.ts +1 -0
- package/utils/form/observe-control-is-different.d.ts +13 -0
- package/utils/form/observe-control-status.d.ts +7 -0
- package/utils/form/observe-control-valid.d.ts +14 -0
- package/utils/form/observe-control-value-change.d.ts +9 -0
- package/utils/form/observe-control-value.d.ts +6 -0
- package/utils/form/wait-on-non-pending-status.d.ts +12 -0
- package/utils/fractional-digits-count.d.ts +8 -0
- package/utils/get-attribute.d.ts +4 -0
- package/utils/has-attribute.d.ts +4 -0
- package/utils/has-property.d.ts +1 -0
- package/utils/input-masks.d.ts +1 -0
- package/utils/is-absolute-url.d.ts +1 -0
- package/utils/is-null-or-undefined.d.ts +1 -0
- package/utils/is-numeric.d.ts +1 -0
- package/utils/load-style-sheet.d.ts +1 -0
- package/utils/load-style.d.ts +1 -0
- package/utils/not-null-or-undefined.d.ts +1 -0
- package/utils/obj-utils.d.ts +8 -0
- package/utils/observe-query-list.d.ts +3 -0
- package/utils/operators/index.d.ts +2 -0
- package/utils/operators/map-each.d.ts +2 -0
- package/utils/operators/tap-first.d.ts +5 -0
- package/utils/package.json +11 -0
- package/utils/pad-end.d.ts +1 -0
- package/utils/pad-start.d.ts +1 -0
- package/utils/polling-ticker.d.ts +13 -0
- package/utils/public-api.d.ts +37 -0
- package/utils/refreshable.d.ts +20 -0
- package/utils/router/index.d.ts +6 -0
- package/utils/router/is-empty-url-route.d.ts +2 -0
- package/utils/router/leaf-child-route.d.ts +2 -0
- package/utils/router/operators/activated-routes-with-data-property.d.ts +7 -0
- package/utils/router/route-snapshot-path-full.d.ts +2 -0
- package/utils/router/route-snapshot-path-relative.d.ts +2 -0
- package/utils/router/will-have-data-prop.d.ts +2 -0
- package/utils/subscriber-count.d.ts +1 -0
- package/utils/theseam-ui-common-utils.d.ts +4 -0
- package/utils/theseam-ui-common-utils.metadata.json +1 -0
- package/utils/toggle-attribute.d.ts +16 -0
- package/utils/wait-on-condition-async.d.ts +1 -0
- package/utils/wrap-into-observable.d.ts +2 -0
- package/validators/decimal.validator.d.ts +9 -0
- package/validators/email-exists.validator.d.ts +10 -0
- package/validators/integer.validator.d.ts +9 -0
- package/validators/package.json +11 -0
- package/validators/phone-length.validator.d.ts +7 -0
- package/validators/public-api.d.ts +5 -0
- package/validators/tax-id.validator.d.ts +11 -0
- package/validators/theseam-ui-common-validators.d.ts +4 -0
- package/validators/theseam-ui-common-validators.metadata.json +1 -0
- package/viewers/package.json +11 -0
- package/viewers/pdf-viewer/index.d.ts +3 -0
- package/viewers/pdf-viewer/pdf-page/pdf-page.component.d.ts +39 -0
- package/viewers/pdf-viewer/pdf-renderer.service.d.ts +6 -0
- package/viewers/pdf-viewer/pdf-viewer.component.d.ts +59 -0
- package/viewers/pdf-viewer/pdf-viewer.module.d.ts +2 -0
- package/viewers/public-api.d.ts +1 -0
- package/viewers/theseam-ui-common-viewers.d.ts +4 -0
- package/viewers/theseam-ui-common-viewers.metadata.json +1 -0
- package/widget/_widget-theme.scss +15 -0
- package/widget/directives/widget-drag-handle.directive.d.ts +53 -0
- package/widget/directives/widget-icon-tpl.directive.d.ts +5 -0
- package/widget/directives/widget-title-tpl.directive.d.ts +5 -0
- package/widget/package.json +11 -0
- package/widget/public-api.d.ts +37 -0
- package/widget/styles/_utilities.scss +3 -0
- package/widget/styles/_variables.scss +27 -0
- package/widget/theseam-ui-common-widget.d.ts +4 -0
- package/widget/theseam-ui-common-widget.metadata.json +1 -0
- package/widget/widget/widget.component.d.ts +78 -0
- package/widget/widget/widget.component.scss +107 -0
- package/widget/widget-content-components/widget-button-group/widget-button-group.component.d.ts +5 -0
- package/widget/widget-content-components/widget-button-group/widget-button-group.component.scss +3 -0
- package/widget/widget-content-components/widget-button-group/widget-button-group.module.d.ts +2 -0
- package/widget/widget-content-components/widget-content-header/widget-content-header.component.d.ts +5 -0
- package/widget/widget-content-components/widget-content-header/widget-content-header.component.scss +6 -0
- package/widget/widget-content-components/widget-content-header/widget-content-header.module.d.ts +2 -0
- package/widget/widget-content-components/widget-description/widget-description.component.d.ts +2 -0
- package/widget/widget-content-components/widget-description/widget-description.component.scss +0 -0
- package/widget/widget-content-components/widget-description/widget-description.module.d.ts +2 -0
- package/widget/widget-content-components/widget-empty-label/widget-empty-label.component.d.ts +15 -0
- package/widget/widget-content-components/widget-empty-label/widget-empty-label.component.scss +9 -0
- package/widget/widget-content-components/widget-empty-label/widget-empty-label.module.d.ts +2 -0
- package/widget/widget-content-components/widget-footer-link/widget-footer-link.component.d.ts +5 -0
- package/widget/widget-content-components/widget-footer-link/widget-footer-link.component.scss +8 -0
- package/widget/widget-content-components/widget-footer-link/widget-footer-link.module.d.ts +2 -0
- package/widget/widget-content-components/widget-footer-text/widget-footer-text.component.d.ts +5 -0
- package/widget/widget-content-components/widget-footer-text/widget-footer-text.component.scss +7 -0
- package/widget/widget-content-components/widget-footer-text/widget-footer-text.module.d.ts +2 -0
- package/widget/widget-content-components/widget-header-badge/widget-header-badge.component.d.ts +12 -0
- package/widget/widget-content-components/widget-header-badge/widget-header-badge.component.scss +5 -0
- package/widget/widget-content-components/widget-header-badge/widget-header-badge.module.d.ts +2 -0
- package/widget/widget-content-components/widget-list-group/widget-list-group-item/widget-list-group-item-icon-tpl.directive.d.ts +5 -0
- package/widget/widget-content-components/widget-list-group/widget-list-group-item/widget-list-group-item.component.d.ts +57 -0
- package/widget/widget-content-components/widget-list-group/widget-list-group-item/widget-list-group-item.component.scss +0 -0
- package/widget/widget-content-components/widget-list-group/widget-list-group.component.d.ts +5 -0
- package/widget/widget-content-components/widget-list-group/widget-list-group.component.scss +0 -0
- package/widget/widget-content-components/widget-list-group/widget-list-group.module.d.ts +2 -0
- package/widget/widget-content-components/widget-table/widget-table.component.d.ts +14 -0
- package/widget/widget-content-components/widget-table/widget-table.component.scss +0 -0
- package/widget/widget-content-components/widget-table/widget-table.module.d.ts +2 -0
- package/widget/widget-content-components/widget-tile/widget-tile-footer/widget-tile-footer.component.d.ts +5 -0
- package/widget/widget-content-components/widget-tile/widget-tile-footer/widget-tile-footer.component.scss +0 -0
- package/widget/widget-content-components/widget-tile/widget-tile-footer-item/widget-tile-footer-item.component.d.ts +15 -0
- package/widget/widget-content-components/widget-tile/widget-tile-footer-item/widget-tile-footer-item.component.scss +5 -0
- package/widget/widget-content-components/widget-tile/widget-tile-group/widget-tile-group.component.d.ts +5 -0
- package/widget/widget-content-components/widget-tile/widget-tile-group/widget-tile-group.component.scss +14 -0
- package/widget/widget-content-components/widget-tile/widget-tile-secondary-icon.directive.d.ts +5 -0
- package/widget/widget-content-components/widget-tile/widget-tile.component.d.ts +44 -0
- package/widget/widget-content-components/widget-tile/widget-tile.component.scss +70 -0
- package/widget/widget-content-components/widget-tile/widget-tile.module.d.ts +2 -0
- package/widget/widget-content-components/widget-tile-list/widget-tile-list.component.d.ts +5 -0
- package/widget/widget-content-components/widget-tile-list/widget-tile-list.component.scss +6 -0
- package/widget/widget-content-components/widget-tile-list/widget-tile-list.module.d.ts +2 -0
- package/widget/widget-footer/widget-footer.component.d.ts +5 -0
- package/widget/widget-footer/widget-footer.component.scss +16 -0
- package/widget/widget-registry.models.d.ts +20 -0
- package/widget/widget-registry.service.d.ts +16 -0
- package/widget/widget-token.d.ts +3 -0
- package/widget/widget.module.d.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-form-field.js","sources":["../../../projects/ui-common/form-field/form-field-error.directive.ts","../../../projects/ui-common/form-field/form-field-help-text.directive.ts","../../../projects/ui-common/form-field/form-field-label-tpl.directive.ts","../../../projects/ui-common/form-field/input.directive.ts","../../../projects/ui-common/form-field/form-field.component.ts","../../../projects/ui-common/form-field/form-field-required-indicator.component.ts","../../../projects/ui-common/form-field/form-field.module.ts","../../../projects/ui-common/form-field/theseam-ui-common-form-field.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion'\nimport { Directive, Input, TemplateRef } from '@angular/core'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\n\n@Directive({\n selector: '[seamFormFieldError]'\n})\nexport class FormFieldErrorDirective {\n static ngAcceptInputType_external: BooleanInput\n\n @Input()\n get validatorName(): string | undefined | null { return this._validatorName || this.seamFormFieldError }\n set validatorName(value: string | undefined | null) { this._validatorName = value }\n private _validatorName: string | undefined | null\n\n @Input() seamFormFieldError: string | undefined | null\n\n @Input() @InputBoolean() external: boolean = false\n\n constructor(public template: TemplateRef<any>) {}\n\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamFormFieldHelpText]'\n})\nexport class FormFieldHelpTextDirective {\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamFormFieldLabelTpl]'\n})\nexport class FormFieldLabelTplDirective {\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { Directive, DoCheck, ElementRef, HostBinding, Input, Optional, Self } from '@angular/core'\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms'\nimport { Subject } from 'rxjs'\n\nimport { NgSelectComponent } from '@ng-select/ng-select'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { toggleAttribute } from '@theseam/ui-common/utils'\n\n// NOTE: Partially based on mat-input: https://github.com/angular/material2/blob/master/src/lib/input/input.ts\n\nlet nextUniqueId = 0\n\n@Directive({\n // TODO: Consider removing restriction and instead adding a dev warning. A few\n // inputs in the app need to be changed for this first.\n selector: 'input[seamInput], textarea[seamInput], ng-select[seamInput], seam-checkbox[seamInput] [ngbRadioGroup], seam-tel-input[seamInput], quill-editor[seamInput]',\n exportAs: 'seamInput',\n})\nexport class InputDirective implements DoCheck {\n static ngAcceptInputType_required: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_readonly: BooleanInput\n\n protected _uid = `lib-input-${nextUniqueId++}`\n\n // TODO: Remove this being added to all seamInput elements or break this\n // directive up. Some elements in our app already have worked around this\n // class being there, so some refactoring will be required before removal.\n @HostBinding('class.form-control') _isFormControl = true\n @HostBinding('class.form-control-sm') get _isFormControlSmall() {\n return this._isFormControl && this.seamInputSize === 'sm'\n }\n @HostBinding('class.is-invalid') get _isInvalid() {\n return this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched)\n }\n\n @HostBinding('attr.id') get _attrId() { return this._isNgSelect() ? undefined : this.id }\n @HostBinding('attr.placeholder') get _attrPlaceholder() { return this.placeholder }\n @HostBinding('attr.aria-describedby') ariaDescribedBy: string | undefined\n\n @Input() seamInputSize: 'sm' | 'normal' = 'normal'\n\n @Input()\n get id(): string | undefined | null { return this._id }\n set id(value: string | undefined | null) { this._id = value || this._uid }\n protected _id: string | undefined | null\n\n /** Input type of the element. */\n @Input()\n get type(): string | undefined | null { return this._type }\n set type(value: string | undefined | null) {\n this._type = value || 'text'\n // this._validateType()\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if ((!this._isTextarea() && !this._isNgSelect()) /* && getSupportedInputTypes().has(this._type) */) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type\n }\n }\n protected _type: string | undefined | null = 'text'\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string | undefined | null\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() @InputBoolean() required: boolean = false\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled\n }\n return this._disabled\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value)\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false\n this.stateChanges.next()\n }\n }\n protected _disabled = false\n\n focused = false\n\n readonly stateChanges: Subject<void> = new Subject<void>()\n\n // @Input()\n // get value(): string { return this._inputValueAccessor.value; }\n // set value(value: string) {\n // if (value !== this.value) {\n // this._inputValueAccessor.value = value;\n // this.stateChanges.next();\n // }\n // }\n\n /** Whether the element is readonly. */\n @Input() @InputBoolean() readonly: boolean = false\n\n constructor(\n public _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n @Optional() @Self() public ngControl: NgControl,\n @Optional() private _parentForm: NgForm,\n @Optional() private _parentFormGroup: FormGroupDirective,\n // 3rd party support\n @Optional() private _ngSelect: NgSelectComponent\n ) {\n // Force setter to be called in case id was not specified.\n this.id = this.id\n\n if (!this._shouldHaveFormControlCssClass()) {\n this._isFormControl = false\n }\n }\n\n ngDoCheck() {\n if (this._isNgSelect()) {\n this._ngSelect.labelForId = this.id\n this._ngSelect.setDisabledState(this.disabled)\n } else {\n toggleAttribute(this._elementRef.nativeElement, 'required', this.required)\n toggleAttribute(this._elementRef.nativeElement, 'disabled', this.disabled)\n }\n }\n\n /** Should only be textual inputs, but initially our app added to all form controls. */\n protected _shouldHaveFormControlCssClass() {\n return !this._isSeamCheckbox()\n && !this._isRadioInput()\n && !this._isNgbRadioGroup()\n && !this._isTelInput()\n && !this._isQuillEditor()\n }\n\n /** Determines if the component host is a textarea. */\n protected _isTextarea() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea'\n }\n\n /** Determines if the component host is a ng-select. */\n protected _isNgSelect() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'ng-select'\n }\n\n /** Determines if the component host is a seam-checkbox. */\n protected _isSeamCheckbox() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'seam-checkbox'\n }\n\n /** Determines if the component host is a radio input. */\n protected _isRadioInput() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'input' &&\n this._elementRef.nativeElement.type.toLowerCase() === 'radio'\n }\n\n protected _isNgbRadioGroup() {\n return this._elementRef.nativeElement.getAttribute('ngbRadioGroup') !== null\n }\n\n protected _isTelInput() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'seam-tel-input'\n }\n\n protected _isQuillEditor() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'quill-editor'\n }\n\n /** Make sure the input is a supported type. */\n // protected _validateType() {\n // if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {\n // throw getMatInputUnsupportedTypeError(this._type)\n // }\n // }\n\n /** Focuses the input. */\n focus(): void {\n this._elementRef.nativeElement.focus()\n }\n\n /** Unfocuses the input. */\n blur(): void {\n this._elementRef.nativeElement.blur()\n }\n\n setValue(value: any) {\n if (this.ngControl) {\n const control = this.ngControl.control\n if (control) {\n control.setValue(value)\n }\n }\n }\n\n}\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport {\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n QueryList\n} from '@angular/core'\nimport { BehaviorSubject, combineLatest, Observable, ReplaySubject, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, map, startWith, switchMap, tap } from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { IErrorRecord } from '@theseam/ui-common/form-field-error'\n\nimport { FormFieldErrorDirective } from './form-field-error.directive'\nimport { FormFieldHelpTextDirective } from './form-field-help-text.directive'\nimport { FormFieldLabelTplDirective } from './form-field-label-tpl.directive'\nimport { InputDirective } from './input.directive'\n\nlet nextLabelUniqueId = 0\n\n/**\n * Should wrap all form controls.\n */\n@Component({\n selector: 'seam-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss']\n})\nexport class TheSeamFormFieldComponent implements OnInit, OnDestroy {\n static ngAcceptInputType_inline: BooleanInput\n\n private readonly _helpTextStrSubject = new BehaviorSubject<string | undefined>(undefined)\n private readonly _helpTextTplSubject = new BehaviorSubject<FormFieldHelpTextDirective | undefined>(undefined)\n private readonly _contentInputSubject = new BehaviorSubject<InputDirective | undefined>(undefined)\n\n /** @ignore */\n protected _labelUid = `seam-label-${nextLabelUniqueId++}`\n\n /** @ignore */\n protected _helpTextUid = `seam-help-text-${nextLabelUniqueId++}`\n\n /** @ignore */\n public _errorPadding = '0px'\n\n /** @ignore */\n @HostBinding('style.display') get _displayStyle() { return this.inline ? 'inline-block' : 'block' }\n\n /**\n * Used to declare an inline element.\n *\n * NOTE: Not well tested or supported, so it may have some issues currently\n * and could change.\n */\n @Input() @InputBoolean() inline: boolean = false\n\n /** Add a text label for the form control. */\n @Input() label: string | undefined | null\n\n /**\n * The label can be on top or inline.\n *\n * > Only supports `ltr` direction, so inline will only place the label on the\n * > left.\n */\n @Input() labelPosition: 'top' | 'inline' = 'top'\n\n /**\n * CSS class to add to the label element.\n *\n * Accepts a single space separated string of classes, like the html class\n * attribute.\n */\n @Input() labelClass: string | undefined | null\n\n /** Max errors to display. */\n @Input() maxErrors = -1\n\n /**\n * A padding error is an always allocated space equivalent to a single line\n * error string.\n */\n @Input() numPaddingErrors = 1\n\n /**\n * `id` attribute to add to the label element. This should not be needed in\n * most situations, because a unique id will be generated if not provided.\n */\n @Input()\n get labelId(): string | undefined | null { return this._labelId }\n set labelId(value: string | undefined | null) { this._labelId = value || this._labelUid }\n /** @ignore */\n protected _labelId: string | undefined | null\n\n /**\n * Help text added below the control.\n */\n @Input()\n get helpText(): string | undefined | null { return this._helpTextStrSubject.value }\n set helpText(value: string | undefined | null) {\n this._helpTextStrSubject.next(value || undefined)\n }\n\n /**\n * `id` attribute to add to the label element. This should not be needed in\n * most situations, because a unique id will be generated if not provided.\n */\n @Input()\n get helpTextId(): string | undefined | null { return this._helpTextId }\n set helpTextId(value: string | undefined | null) { this._helpTextId = value || this._helpTextUid }\n /** @ignore */\n protected _helpTextId: string | undefined | null\n\n /** @ignore */\n @ContentChild(FormFieldHelpTextDirective, { static: true })\n get helpTextTpl(): FormFieldLabelTplDirective | undefined { return this._helpTextTplSubject.value }\n set helpTextTpl(value: FormFieldLabelTplDirective | undefined) {\n this._helpTextTplSubject.next(value || undefined)\n }\n\n /** @ignore */\n @ContentChild(FormFieldLabelTplDirective, { static: true }) labelTpl?: FormFieldLabelTplDirective\n\n /** @ignore */\n @ContentChild(InputDirective, { static: true })\n get contentInput(): InputDirective | undefined { return this._contentInputSubject.value }\n set contentInput(value: InputDirective | undefined) { this._contentInputSubject.next(value || undefined) }\n\n\n /** @ignore */\n @ContentChildren(FormFieldErrorDirective)\n get fieldErrors() { return this._fieldErrors }\n set fieldErrors(value: QueryList<FormFieldErrorDirective[]> | undefined | null) {\n this._fieldErrors = value\n\n if (this._sub) { this._sub.unsubscribe() }\n if (this.fieldErrors) {\n this._sub = this.fieldErrors.changes\n .pipe(startWith(this.fieldErrors))\n .pipe(map(v => v.toArray() as FormFieldErrorDirective[]))\n .pipe(tap(v => {\n const records: IErrorRecord[] = []\n for (const item of v) {\n if (item.validatorName) {\n records.push({\n validatorName: item.validatorName,\n error: null,\n template: item.template,\n external: item.external\n })\n }\n }\n this._fieldErrorsSubject2.next(records)\n }))\n .subscribe(v => this._fieldErrorsSubject.next(v))\n }\n }\n /** @ignore */\n private _fieldErrors: QueryList<FormFieldErrorDirective[]> | undefined | null\n /** @ignore */\n private _sub?: Subscription\n\n /** @ignore */\n private readonly _fieldErrorsSubject = new ReplaySubject<FormFieldErrorDirective[]>(1)\n /** @ignore */\n public readonly fieldErrors$: Observable<FormFieldErrorDirective[]> = this._fieldErrorsSubject.asObservable()\n\n /** @ignore */\n private readonly _fieldErrorsSubject2 = new ReplaySubject<IErrorRecord[]>(1)\n /** @ignore */\n public readonly fieldErrors2$: Observable<IErrorRecord[]> = this._fieldErrorsSubject2.asObservable()\n\n get isPasswordInput() {\n return this.contentInput && this.contentInput.type && this.contentInput.type === 'password'\n }\n get passwordInputElement() {\n return this.contentInput && this.contentInput._elementRef && this.contentInput._elementRef.nativeElement\n }\n\n get hasHelpText() { return !!this._helpTextStrSubject.value || !!this._helpTextTplSubject.value }\n // get hasHelpText() { return !!this.helpText || !!this._helpTextTpl }\n\n private _helpTextSub = Subscription.EMPTY\n\n /** @ignore */\n constructor(\n private readonly _elementRef: ElementRef\n ) { }\n\n /** @ignore */\n ngOnInit() {\n this._helpTextSub = this._contentInputSubject.pipe(\n filter(contentInput => !!contentInput),\n switchMap(contentInput => combineLatest([\n this._helpTextStrSubject,\n this._helpTextTplSubject\n ]).pipe(\n map(() => this.hasHelpText),\n distinctUntilChanged(),\n tap(() => {\n if (!!contentInput) {\n contentInput.ariaDescribedBy = this._helpTextId || undefined\n }\n })\n ))\n ).subscribe()\n }\n\n /** @ignore */\n ngOnDestroy() {\n this._sub?.unsubscribe()\n this._helpTextSub?.unsubscribe()\n }\n\n /** @ignore */\n public isValidatorMatch(validatorName: string, tplValidatorName: string, errors: any): boolean {\n const tplValidatorNames = tplValidatorName.split(' ')\n\n for (let i = 0; i < tplValidatorNames.length; i++) {\n const name = tplValidatorNames[i]\n if (name === validatorName && i === 0) {\n return true\n }\n }\n\n return false\n }\n\n /** @ignore */\n public _labelElemResized(labelElem: HTMLLabelElement) {\n if (labelElem) {\n this._errorPadding = `${labelElem.getBoundingClientRect().width}px`\n } else {\n this._errorPadding = '0px'\n }\n }\n\n public getElement(): HTMLElement {\n return this._elementRef.nativeElement\n }\n\n}\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { ChangeDetectionStrategy, Component, Input, Optional } from '@angular/core'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\n\nimport { TheSeamFormFieldComponent } from './form-field.component'\n\n@Component({\n selector: 'seam-form-field-required-indicator',\n template: `\n <ng-container *ngIf=\"_formField?.contentInput; else noControl\">\n <ng-container *ngIf=\"_formField?.contentInput?.required\">*</ng-container>\n </ng-container>\n <ng-template #noControl>\n <ng-container *ngIf=\"required\">*</ng-container>\n </ng-template>\n `,\n styles: [],\n host: {\n 'class': 'text-danger'\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormFieldRequiredIndicatorComponent {\n static ngAcceptInputType_required: BooleanInput\n\n /** Used if a form control is not found. */\n @Input() @InputBoolean() required: boolean = false\n\n constructor(\n @Optional() public readonly _formField: TheSeamFormFieldComponent\n ) { }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { TheSeamFormFieldErrorModule } from '@theseam/ui-common/form-field-error'\nimport { TheSeamSharedModule } from '@theseam/ui-common/shared'\n\nimport { FormFieldErrorDirective } from './form-field-error.directive'\nimport { FormFieldHelpTextDirective } from './form-field-help-text.directive'\nimport { FormFieldLabelTplDirective } from './form-field-label-tpl.directive'\nimport { FormFieldRequiredIndicatorComponent } from './form-field-required-indicator.component'\nimport { TheSeamFormFieldComponent } from './form-field.component'\nimport { InputDirective } from './input.directive'\n\n@NgModule({\n declarations: [\n TheSeamFormFieldComponent,\n InputDirective,\n FormFieldErrorDirective,\n FormFieldLabelTplDirective,\n FormFieldRequiredIndicatorComponent,\n FormFieldHelpTextDirective\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TheSeamFormFieldErrorModule,\n TheSeamSharedModule\n ],\n exports: [\n TheSeamFormFieldComponent,\n InputDirective,\n FormFieldErrorDirective,\n FormFieldLabelTplDirective,\n FormFieldRequiredIndicatorComponent,\n FormFieldHelpTextDirective\n ]\n})\nexport class TheSeamFormFieldModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,uBAAuB;IAYlC,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;QAFpB,aAAQ,GAAY,KAAK,CAAA;KAED;IATjD,IACI,aAAa,KAAgC,OAAO,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,kBAAkB,CAAA,EAAE;IACxG,IAAI,aAAa,CAAC,KAAgC,IAAI,IAAI,CAAC,cAAc,GAAG,KAAK,CAAA,EAAE;;;YARpF,SAAS,SAAC;gBACT,QAAQ,EAAE,sBAAsB;aACjC;;;YAN0B,WAAW;;;4BAUnC,KAAK;iCAKL,KAAK;uBAEL,KAAK;;AAAmB;IAAf,YAAY,EAAE;yDAA0B;;MCbvC,0BAA0B;IAErC,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAK;;;YALnD,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;aACpC;;;YAJmB,WAAW;;;MCKlB,0BAA0B;IAErC,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAK;;;YALnD,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;aACpC;;;YAJmB,WAAW;;;ACU/B;AAEA,IAAI,YAAY,GAAG,CAAC,CAAA;MAQP,cAAc;IAgGzB,YACS,WAAmF,EAC/D,SAAoB,EAC3B,WAAmB,EACnB,gBAAoC;;IAEpC,SAA4B;QALzC,gBAAW,GAAX,WAAW,CAAwE;QAC/D,cAAS,GAAT,SAAS,CAAW;QAC3B,gBAAW,GAAX,WAAW,CAAQ;QACnB,qBAAgB,GAAhB,gBAAgB,CAAoB;QAEpC,cAAS,GAAT,SAAS,CAAmB;QAjGxC,SAAI,GAAG,aAAa,YAAY,EAAE,EAAE,CAAA;;;;QAKX,mBAAc,GAAG,IAAI,CAAA;QAY/C,kBAAa,GAAoB,QAAQ,CAAA;QAqBxC,UAAK,GAA8B,MAAM,CAAA;;;;;QAY1B,aAAQ,GAAY,KAAK,CAAA;QAuBxC,cAAS,GAAG,KAAK,CAAA;QAE3B,YAAO,GAAG,KAAK,CAAA;QAEN,iBAAY,GAAkB,IAAI,OAAO,EAAQ,CAAA;;;;;;;;;;QAYjC,aAAQ,GAAY,KAAK,CAAA;;QAWhD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;QAEjB,IAAI,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE;YAC1C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAA;SAC5B;KACF;IAnGD,IAA0C,mBAAmB;QAC3D,OAAO,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,CAAA;KAC1D;IACD,IAAqC,UAAU;QAC7C,OAAO,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;KACpG;IAED,IAA4B,OAAO,KAAK,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,CAAA,EAAE;IACzF,IAAqC,gBAAgB,KAAK,OAAO,IAAI,CAAC,WAAW,CAAA,EAAE;IAKnF,IACI,EAAE,KAAgC,OAAO,IAAI,CAAC,GAAG,CAAA,EAAE;IACvD,IAAI,EAAE,CAAC,KAAgC,IAAI,IAAI,CAAC,GAAG,GAAG,KAAK,IAAI,IAAI,CAAC,IAAI,CAAA,EAAE;;IAI1E,IACI,IAAI,KAAgC,OAAO,IAAI,CAAC,KAAK,CAAA,EAAE;IAC3D,IAAI,IAAI,CAAC,KAAgC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,MAAM,CAAA;;;;;QAM5B,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,qDAAqD;YACjG,IAAI,CAAC,WAAW,CAAC,aAAkC,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAA;SACvE;KACF;;;;;IAmBD,IACI,QAAQ;QACV,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,EAAE;YACtD,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAA;SAC/B;QACD,OAAO,IAAI,CAAC,SAAS,CAAA;KACtB;IACD,IAAI,QAAQ,CAAC,KAAc;QACzB,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAA;;;QAI7C,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;YACpB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;SACzB;KACF;IAmCD,SAAS;QACP,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;YACtB,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAA;YACnC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SAC/C;aAAM;YACL,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YAC1E,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;SAC3E;KACF;;IAGS,8BAA8B;QACtC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;eACzB,CAAC,IAAI,CAAC,aAAa,EAAE;eACrB,CAAC,IAAI,CAAC,gBAAgB,EAAE;eACxB,CAAC,IAAI,CAAC,WAAW,EAAE;eACnB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAA;KAC5B;;IAGS,WAAW;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,UAAU,CAAA;KAC5E;;IAGS,WAAW;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,WAAW,CAAA;KAC7E;;IAGS,eAAe;QACvB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,eAAe,CAAA;KACjF;;IAGS,aAAa;QACrB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,OAAO;YACtE,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,OAAO,CAAA;KAChE;IAES,gBAAgB;QACxB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,IAAI,CAAA;KAC7E;IAES,WAAW;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,gBAAgB,CAAA;KAClF;IAES,cAAc;QACtB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,cAAc,CAAA;KAChF;;;;;;;;IAUD,KAAK;QACH,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,CAAA;KACvC;;IAGD,IAAI;QACF,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,CAAA;KACtC;IAED,QAAQ,CAAC,KAAU;QACjB,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAA;YACtC,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;aACxB;SACF;KACF;;;YAlMF,SAAS,SAAC;;;gBAGT,QAAQ,EAAE,2JAA2J;gBACrK,QAAQ,EAAE,WAAW;aACtB;;;YAlB4B,UAAU;YACV,SAAS,uBAoHjC,QAAQ,YAAI,IAAI;YApHmB,MAAM,uBAqHzC,QAAQ;YArHJ,kBAAkB,uBAsHtB,QAAQ;YAnHJ,iBAAiB,uBAqHrB,QAAQ;;;6BA5FV,WAAW,SAAC,oBAAoB;kCAChC,WAAW,SAAC,uBAAuB;yBAGnC,WAAW,SAAC,kBAAkB;sBAI9B,WAAW,SAAC,SAAS;+BACrB,WAAW,SAAC,kBAAkB;8BAC9B,WAAW,SAAC,uBAAuB;4BAEnC,KAAK;iBAEL,KAAK;mBAML,KAAK;0BAmBL,KAAK;uBAML,KAAK;uBAML,KAAK;uBAiCL,KAAK;;AAvCmB;IAAf,YAAY,EAAE;gDAA0B;AAuCzB;IAAf,YAAY,EAAE;gDAA0B;;AC3FpD,IAAI,iBAAiB,GAAG,CAAC,CAAA;AAEzB;;;MAQa,yBAAyB;;IA4JpC,YACmB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;QA1JzB,wBAAmB,GAAG,IAAI,eAAe,CAAqB,SAAS,CAAC,CAAA;QACxE,wBAAmB,GAAG,IAAI,eAAe,CAAyC,SAAS,CAAC,CAAA;QAC5F,yBAAoB,GAAG,IAAI,eAAe,CAA6B,SAAS,CAAC,CAAA;;QAGxF,cAAS,GAAG,cAAc,iBAAiB,EAAE,EAAE,CAAA;;QAG/C,iBAAY,GAAG,kBAAkB,iBAAiB,EAAE,EAAE,CAAA;;QAGzD,kBAAa,GAAG,KAAK,CAAA;;;;;;;QAWH,WAAM,GAAY,KAAK,CAAA;;;;;;;QAWvC,kBAAa,GAAqB,KAAK,CAAA;;QAWvC,cAAS,GAAG,CAAC,CAAC,CAAA;;;;;QAMd,qBAAgB,GAAG,CAAC,CAAA;;QAiFZ,wBAAmB,GAAG,IAAI,aAAa,CAA4B,CAAC,CAAC,CAAA;;QAEtE,iBAAY,GAA0C,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAA;;QAG5F,yBAAoB,GAAG,IAAI,aAAa,CAAiB,CAAC,CAAC,CAAA;;QAE5D,kBAAa,GAA+B,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE,CAAA;;QAY5F,iBAAY,GAAG,YAAY,CAAC,KAAK,CAAA;KAKpC;;IA7IL,IAAkC,aAAa,KAAK,OAAO,IAAI,CAAC,MAAM,GAAG,cAAc,GAAG,OAAO,CAAA,EAAE;;;;;IA0CnG,IACI,OAAO,KAAgC,OAAO,IAAI,CAAC,QAAQ,CAAA,EAAE;IACjE,IAAI,OAAO,CAAC,KAAgC,IAAI,IAAI,CAAC,QAAQ,GAAG,KAAK,IAAI,IAAI,CAAC,SAAS,CAAA,EAAE;;;;IAOzF,IACI,QAAQ,KAAgC,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAA,EAAE;IACnF,IAAI,QAAQ,CAAC,KAAgC;QAC3C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,CAAA;KAClD;;;;;IAMD,IACI,UAAU,KAAgC,OAAO,IAAI,CAAC,WAAW,CAAA,EAAE;IACvE,IAAI,UAAU,CAAC,KAAgC,IAAI,IAAI,CAAC,WAAW,GAAG,KAAK,IAAI,IAAI,CAAC,YAAY,CAAA,EAAE;;IAKlG,IACI,WAAW,KAA6C,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAA,EAAE;IACnG,IAAI,WAAW,CAAC,KAA6C;QAC3D,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,CAAA;KAClD;;IAMD,IACI,YAAY,KAAiC,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAA,EAAE;IACzF,IAAI,YAAY,CAAC,KAAiC,IAAI,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,CAAA,EAAE;;IAI1G,IACI,WAAW,KAAK,OAAO,IAAI,CAAC,YAAY,CAAA,EAAE;IAC9C,IAAI,WAAW,CAAC,KAA8D;QAC5E,IAAI,CAAC,YAAY,GAAG,KAAK,CAAA;QAEzB,IAAI,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAA;SAAE;QAC1C,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO;iBACjC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBACjC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAA+B,CAAC,CAAC;iBACxD,IAAI,CAAC,GAAG,CAAC,CAAC;gBACT,MAAM,OAAO,GAAmB,EAAE,CAAA;gBAClC,KAAK,MAAM,IAAI,IAAI,CAAC,EAAE;oBACpB,IAAI,IAAI,CAAC,aAAa,EAAE;wBACtB,OAAO,CAAC,IAAI,CAAC;4BACX,aAAa,EAAE,IAAI,CAAC,aAAa;4BACjC,KAAK,EAAE,IAAI;4BACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;4BACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;yBACxB,CAAC,CAAA;qBACH;iBACF;gBACD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACxC,CAAC,CAAC;iBACF,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;SACpD;KACF;IAgBD,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,KAAK,UAAU,CAAA;KAC5F;IACD,IAAI,oBAAoB;QACtB,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,aAAa,CAAA;KACzG;IAED,IAAI,WAAW,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAA,EAAE;;IAWjG,QAAQ;QACN,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAChD,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,YAAY,CAAC,EACtC,SAAS,CAAC,YAAY,IAAI,aAAa,CAAC;YACtC,IAAI,CAAC,mBAAmB;YACxB,IAAI,CAAC,mBAAmB;SACzB,CAAC,CAAC,IAAI,CACL,GAAG,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,EAC3B,oBAAoB,EAAE,EACtB,GAAG,CAAC;YACF,IAAI,CAAC,CAAC,YAAY,EAAE;gBAClB,YAAY,CAAC,eAAe,GAAG,IAAI,CAAC,WAAW,IAAI,SAAS,CAAA;aAC7D;SACF,CAAC,CACH,CAAC,CACH,CAAC,SAAS,EAAE,CAAA;KACd;;IAGD,WAAW;;QACT,MAAA,IAAI,CAAC,IAAI,0CAAE,WAAW,EAAE,CAAA;QACxB,MAAA,IAAI,CAAC,YAAY,0CAAE,WAAW,EAAE,CAAA;KACjC;;IAGM,gBAAgB,CAAC,aAAqB,EAAE,gBAAwB,EAAE,MAAW;QAClF,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAErD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACjD,MAAM,IAAI,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;YACjC,IAAI,IAAI,KAAK,aAAa,IAAI,CAAC,KAAK,CAAC,EAAE;gBACrC,OAAO,IAAI,CAAA;aACZ;SACF;QAED,OAAO,KAAK,CAAA;KACb;;IAGM,iBAAiB,CAAC,SAA2B;QAClD,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,aAAa,GAAG,GAAG,SAAS,CAAC,qBAAqB,EAAE,CAAC,KAAK,IAAI,CAAA;SACpE;aAAM;YACL,IAAI,CAAC,aAAa,GAAG,KAAK,CAAA;SAC3B;KACF;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAA;KACtC;;;YAvNF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,ixDAA0C;;aAE3C;;;YA3BC,UAAU;;;4BA6CT,WAAW,SAAC,eAAe;qBAQ3B,KAAK;oBAGL,KAAK;4BAQL,KAAK;yBAQL,KAAK;wBAGL,KAAK;+BAML,KAAK;sBAML,KAAK;uBASL,KAAK;yBAUL,KAAK;0BAOL,YAAY,SAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;uBAOzD,YAAY,SAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;2BAGzD,YAAY,SAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;0BAM7C,eAAe,SAAC,uBAAuB;;AA5Ef;IAAf,YAAY,EAAE;yDAAwB;;MCnCrC,mCAAmC;IAM9C,YAC8B,UAAqC;QAArC,eAAU,GAAV,UAAU,CAA2B;;QAH1C,aAAQ,GAAY,KAAK,CAAA;KAI7C;;;YAxBN,SAAS,SAAC;gBACT,QAAQ,EAAE,oCAAoC;gBAC9C,QAAQ,EAAE;;;;;;;GAOT;gBAED,IAAI,EAAE;oBACJ,OAAO,EAAE,aAAa;iBACvB;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;;;YAjBQ,yBAAyB,uBAyB7B,QAAQ;;;uBAHV,KAAK;;AAAmB;IAAf,YAAY,EAAE;qEAA0B;;MCWvC,sBAAsB;;;YAxBlC,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,yBAAyB;oBACzB,cAAc;oBACd,uBAAuB;oBACvB,0BAA0B;oBAC1B,mCAAmC;oBACnC,0BAA0B;iBAC3B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,2BAA2B;oBAC3B,mBAAmB;iBACpB;gBACD,OAAO,EAAE;oBACP,yBAAyB;oBACzB,cAAc;oBACd,uBAAuB;oBACvB,0BAA0B;oBAC1B,mCAAmC;oBACnC,0BAA0B;iBAC3B;aACF;;;ACrCD;;;;;;"}
|
|
@@ -0,0 +1,2650 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, ElementRef, InjectionToken, Optional, Inject, HostBinding, Input, HostListener, forwardRef, isDevMode, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, ContentChild, TemplateRef, NgModule, ViewChild, Injectable, EventEmitter, ChangeDetectorRef, ViewChildren, Output, ComponentFactoryResolver, SkipSelf, Host, Self, ContentChildren } from '@angular/core';
|
|
3
|
+
import { TemplatePortal, PortalModule, ComponentPortal, BasePortalOutlet } from '@angular/cdk/portal';
|
|
4
|
+
import { BehaviorSubject, isObservable, from, Subject, of, combineLatest, defer, Observable } from 'rxjs';
|
|
5
|
+
import { faAngleDoubleRight, faAngleDoubleLeft, faLock, faUnlock, faAngleLeft, faBars, faAngleDown } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
+
import { TheSeamLayoutService, TheSeamLayoutModule } from '@theseam/ui-common/layout';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { TheSeamButtonsModule } from '@theseam/ui-common/buttons';
|
|
9
|
+
import { TheSeamIconModule } from '@theseam/ui-common/icon';
|
|
10
|
+
import { TheSeamScrollbarModule } from '@theseam/ui-common/scrollbar';
|
|
11
|
+
import { startWith, switchMap, map, shareReplay, tap, mapTo, take, auditTime, debounceTime, takeUntil, distinctUntilChanged, finalize, filter } from 'rxjs/operators';
|
|
12
|
+
import { __decorate } from 'tslib';
|
|
13
|
+
import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
14
|
+
import { moveItemInArray, transferArrayItem, CdkDrag, DragDropModule } from '@angular/cdk/drag-drop';
|
|
15
|
+
import { InputBoolean, InputNumber, mixinDisabled } from '@theseam/ui-common/core';
|
|
16
|
+
import { THESEAM_WIDGET_ACCESSOR } from '@theseam/ui-common/widget';
|
|
17
|
+
import * as i1 from '@theseam/ui-common/dynamic-component-loader';
|
|
18
|
+
import { TheSeamDynamicComponentLoader } from '@theseam/ui-common/dynamic-component-loader';
|
|
19
|
+
import { hasProperty, notNullOrUndefined, observeControlValue, observeControlStatus } from '@theseam/ui-common/utils';
|
|
20
|
+
import { TheSeamSharedModule } from '@theseam/ui-common/shared';
|
|
21
|
+
import { trigger, transition, group, query, animateChild, state, style, animate, keyframes } from '@angular/animations';
|
|
22
|
+
import { NavigationEnd, Router, RouterModule, NavigationStart, ActivatedRoute } from '@angular/router';
|
|
23
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
24
|
+
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
|
25
|
+
import { faUserCircle } from '@fortawesome/free-regular-svg-icons';
|
|
26
|
+
import { MenuComponent, TheSeamMenuModule } from '@theseam/ui-common/menu';
|
|
27
|
+
import { JsonSchemaFormService, isArray, buildTitleMap, hasOwn, Framework, JsonSchemaFormModule, WidgetLibraryModule, FrameworkLibraryService, WidgetLibraryService } from '@ajsf/core';
|
|
28
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
29
|
+
import { NgSelectModule } from '@ng-select/ng-select';
|
|
30
|
+
import { TheSeamCheckboxModule } from '@theseam/ui-common/checkbox';
|
|
31
|
+
import { TheSeamFormFieldModule } from '@theseam/ui-common/form-field';
|
|
32
|
+
|
|
33
|
+
class BaseLayoutContentFooterDirective {
|
|
34
|
+
constructor(_elementRef) {
|
|
35
|
+
this._elementRef = _elementRef;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
BaseLayoutContentFooterDirective.decorators = [
|
|
39
|
+
{ type: Directive, args: [{
|
|
40
|
+
selector: '[seamBaseLayoutContentFooter]'
|
|
41
|
+
},] }
|
|
42
|
+
];
|
|
43
|
+
BaseLayoutContentFooterDirective.ctorParameters = () => [
|
|
44
|
+
{ type: ElementRef }
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
class BaseLayoutContentHeaderDirective {
|
|
48
|
+
constructor(_elementRef) {
|
|
49
|
+
this._elementRef = _elementRef;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
BaseLayoutContentHeaderDirective.decorators = [
|
|
53
|
+
{ type: Directive, args: [{
|
|
54
|
+
selector: '[seamBaseLayoutContentHeader]'
|
|
55
|
+
},] }
|
|
56
|
+
];
|
|
57
|
+
BaseLayoutContentHeaderDirective.ctorParameters = () => [
|
|
58
|
+
{ type: ElementRef }
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
class BaseLayoutContentDirective {
|
|
62
|
+
constructor(_elementRef) {
|
|
63
|
+
this._elementRef = _elementRef;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
BaseLayoutContentDirective.decorators = [
|
|
67
|
+
{ type: Directive, args: [{
|
|
68
|
+
selector: '[seamBaseLayoutContent]'
|
|
69
|
+
},] }
|
|
70
|
+
];
|
|
71
|
+
BaseLayoutContentDirective.ctorParameters = () => [
|
|
72
|
+
{ type: ElementRef }
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
const THESEAM_BASE_LAYOUT_REF = new InjectionToken('seamBaseLayoutRef');
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Can be used to toggle the expand state of the registered nav.
|
|
79
|
+
*/
|
|
80
|
+
class BaseLayoutNavToggleDirective {
|
|
81
|
+
constructor(_baseLayout) {
|
|
82
|
+
this.type = 'button';
|
|
83
|
+
/** Screenreader label for the button. */
|
|
84
|
+
this.ariaLabel = 'Navigation toggle';
|
|
85
|
+
this.baseLayout = _baseLayout;
|
|
86
|
+
}
|
|
87
|
+
get _attrType() { return this.type; }
|
|
88
|
+
get _attrAriaLabel() { return this.ariaLabel || null; }
|
|
89
|
+
_onClick() {
|
|
90
|
+
if (this.baseLayout && this.baseLayout.registeredNav) {
|
|
91
|
+
this.baseLayout.registeredNav.toggle();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
BaseLayoutNavToggleDirective.decorators = [
|
|
96
|
+
{ type: Directive, args: [{
|
|
97
|
+
selector: 'button[seamBaseLayoutNavToggle]',
|
|
98
|
+
exportAs: 'seamBaseLayoutNavToggle'
|
|
99
|
+
},] }
|
|
100
|
+
];
|
|
101
|
+
BaseLayoutNavToggleDirective.ctorParameters = () => [
|
|
102
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [THESEAM_BASE_LAYOUT_REF,] }] }
|
|
103
|
+
];
|
|
104
|
+
BaseLayoutNavToggleDirective.propDecorators = {
|
|
105
|
+
_attrType: [{ type: HostBinding, args: ['attr.type',] }],
|
|
106
|
+
type: [{ type: Input }],
|
|
107
|
+
_attrAriaLabel: [{ type: HostBinding, args: ['attr.aria-label',] }],
|
|
108
|
+
ariaLabel: [{ type: Input, args: ['aria-label',] }],
|
|
109
|
+
_onClick: [{ type: HostListener, args: ['click',] }]
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
class BaseLayoutSideBarDirective {
|
|
113
|
+
constructor(_elementRef) {
|
|
114
|
+
this._elementRef = _elementRef;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
BaseLayoutSideBarDirective.decorators = [
|
|
118
|
+
{ type: Directive, args: [{
|
|
119
|
+
selector: '[seamBaseLayoutSideBar]'
|
|
120
|
+
},] }
|
|
121
|
+
];
|
|
122
|
+
BaseLayoutSideBarDirective.ctorParameters = () => [
|
|
123
|
+
{ type: ElementRef }
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
class BaseLayoutTopBarDirective {
|
|
127
|
+
constructor(_elementRef) {
|
|
128
|
+
this._elementRef = _elementRef;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
BaseLayoutTopBarDirective.decorators = [
|
|
132
|
+
{ type: Directive, args: [{
|
|
133
|
+
selector: '[seamBaseLayoutTopBar]'
|
|
134
|
+
},] }
|
|
135
|
+
];
|
|
136
|
+
BaseLayoutTopBarDirective.ctorParameters = () => [
|
|
137
|
+
{ type: ElementRef }
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
const THE_SEAM_BASE_LAYOUT = {
|
|
141
|
+
provide: THESEAM_BASE_LAYOUT_REF,
|
|
142
|
+
// tslint:disable-next-line:no-use-before-declare
|
|
143
|
+
useExisting: forwardRef(() => TheSeamBaseLayoutComponent),
|
|
144
|
+
multi: false,
|
|
145
|
+
};
|
|
146
|
+
class TheSeamBaseLayoutComponent {
|
|
147
|
+
constructor(_viewContainerRef, _layout) {
|
|
148
|
+
this._viewContainerRef = _viewContainerRef;
|
|
149
|
+
this._layout = _layout;
|
|
150
|
+
this.faAngleDoubleRight = faAngleDoubleRight;
|
|
151
|
+
this.faAngleDoubleLeft = faAngleDoubleLeft;
|
|
152
|
+
this.overlayNav = false;
|
|
153
|
+
this._hasSideBar = new BehaviorSubject(false);
|
|
154
|
+
this._registeredNav = new BehaviorSubject(undefined);
|
|
155
|
+
this.registeredNav$ = this._registeredNav.asObservable();
|
|
156
|
+
this._registeredActions = new BehaviorSubject([]);
|
|
157
|
+
this.registeredActions$ = this._registeredActions.asObservable();
|
|
158
|
+
this.isMobile$ = this._layout.isMobile$;
|
|
159
|
+
this.hasSideBar$ = this._hasSideBar.asObservable();
|
|
160
|
+
}
|
|
161
|
+
get registeredNav() { return this._registeredNav.value; }
|
|
162
|
+
get registeredActions() { return this._registeredActions.value; }
|
|
163
|
+
ngOnInit() {
|
|
164
|
+
if (this._topBarTpl) {
|
|
165
|
+
this._topBarPortal = new TemplatePortal(this._topBarTpl, this._viewContainerRef);
|
|
166
|
+
}
|
|
167
|
+
if (this._sideBarTpl) {
|
|
168
|
+
this._sideBarPortal = new TemplatePortal(this._sideBarTpl, this._viewContainerRef);
|
|
169
|
+
this._hasSideBar.next(true);
|
|
170
|
+
}
|
|
171
|
+
if (this._contentTpl) {
|
|
172
|
+
this._contentPortal = new TemplatePortal(this._contentTpl, this._viewContainerRef);
|
|
173
|
+
}
|
|
174
|
+
if (this._contentHeaderTpl) {
|
|
175
|
+
this._contentHeaderPortal = new TemplatePortal(this._contentHeaderTpl, this._viewContainerRef);
|
|
176
|
+
}
|
|
177
|
+
if (this._contentFooterTpl) {
|
|
178
|
+
this._contentFooterPortal = new TemplatePortal(this._contentFooterTpl, this._viewContainerRef);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
registerNav(nav) {
|
|
182
|
+
// TODO: Allow multiple registered navs
|
|
183
|
+
// if (this.registeredNav) {
|
|
184
|
+
// throw new Error('[TheSeamBaseLayoutComponent] A nav is already registered.')
|
|
185
|
+
// }
|
|
186
|
+
// console.log('register nav', nav)
|
|
187
|
+
this._registeredNav.next(nav);
|
|
188
|
+
}
|
|
189
|
+
unregisterNav(nav) {
|
|
190
|
+
if (this.registeredNav === nav) {
|
|
191
|
+
this._registeredNav.next(undefined);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
registerAction(action) {
|
|
195
|
+
const actions = this._registeredActions.value;
|
|
196
|
+
if (actions.findIndex(a => a.name === action.name) !== -1) {
|
|
197
|
+
if (isDevMode()) {
|
|
198
|
+
console.warn(`[TheSeamBaseLayoutComponent] registerAction(): Action ${action.name} not ` +
|
|
199
|
+
'registered, because another action by that name is already registered.');
|
|
200
|
+
}
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
actions.push(action);
|
|
204
|
+
}
|
|
205
|
+
unregisterAction(action) {
|
|
206
|
+
const actionName = typeof action === 'string' ? action : action.name;
|
|
207
|
+
const actions = this._registeredActions.value;
|
|
208
|
+
this._registeredActions.next(actions.filter(f => f.name !== actionName));
|
|
209
|
+
}
|
|
210
|
+
isActionRegistered(actionName) {
|
|
211
|
+
const actions = this._registeredActions.value;
|
|
212
|
+
const action = actions.find(f => f.name === actionName);
|
|
213
|
+
return !!action;
|
|
214
|
+
}
|
|
215
|
+
_handleButtonAction(action) {
|
|
216
|
+
this._execButtonAction(action).subscribe();
|
|
217
|
+
}
|
|
218
|
+
_execButtonAction(action) {
|
|
219
|
+
const fnRes = action.exec();
|
|
220
|
+
return isObservable(fnRes) ? fnRes : from(Promise.resolve(fnRes));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
TheSeamBaseLayoutComponent.decorators = [
|
|
224
|
+
{ type: Component, args: [{
|
|
225
|
+
selector: 'seam-base-layout',
|
|
226
|
+
template: "<div class=\"base-layout-side-bar-nav-content-mobile\" *ngIf=\"isMobile$ | async\">\n <ng-template [cdkPortalOutlet]=\"_sideBarPortal\"></ng-template>\n</div>\n\n<div class=\"base-layout-top-bar-container border-bottom bordered\">\n <ng-template [cdkPortalOutlet]=\"_topBarPortal\"></ng-template>\n</div>\n<div class=\"base-layout-main-container\">\n <div *ngIf=\"hasSideBar$ | async\"\n class=\"base-layout-side-bar-container border-right bordered\">\n <div class=\"base-layout-side-bar-nav-content\" *ngIf=\"!(isMobile$ | async)\">\n <ng-template [cdkPortalOutlet]=\"_sideBarPortal\"></ng-template>\n </div>\n </div>\n <div class=\"base-layout-content-container\">\n <div class=\"base-layout-content-container-header\">\n <!-- <ng-template [cdkPortalOutlet]=\"_contentHeaderPortal\"></ng-template> -->\n\n <div class=\"d-flex d-flex-row\">\n <div class=\"flex-grow-1\">\n <ng-template [cdkPortalOutlet]=\"_contentHeaderPortal\"></ng-template>\n </div>\n <div class=\"d-flex\">\n <ng-container *ngFor=\"let action of registeredActions$ | async; first as isFirst\">\n <div>\n <ng-container [ngTemplateOutlet]=\"$any(action)?.template\"></ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n\n </div>\n <div class=\"base-layout-content-container-inner\" seamOverlayScrollbar>\n <ng-template [cdkPortalOutlet]=\"_contentPortal\"></ng-template>\n </div>\n <div class=\"base-layout-content-container-footer\">\n <ng-template [cdkPortalOutlet]=\"_contentFooterPortal\"></ng-template>\n </div>\n </div>\n</div>\n",
|
|
227
|
+
providers: [THE_SEAM_BASE_LAYOUT],
|
|
228
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
229
|
+
encapsulation: ViewEncapsulation.None,
|
|
230
|
+
styles: ["seam-base-layout{display:flex;flex-direction:column;height:100%;width:100%}seam-base-layout .base-layout-side-bar-nav-content-mobile{position:absolute;top:0;bottom:0;left:0;float:left;z-index:9999}seam-base-layout .base-layout-side-bar-container{flex:0 0 auto;display:flex;flex-direction:column}seam-base-layout .base-layout-side-bar-container .base-layout-side-bar-nav-content{flex:1 1 0}seam-base-layout .base-layout-main-container{flex:1 1 100%;display:flex;flex-direction:row;transform:translateZ(0)}seam-base-layout .base-layout-top-bar-container{flex:0 0 auto}seam-base-layout .base-layout-content-container{flex:1 1 auto;display:flex;flex-direction:column}seam-base-layout .base-layout-content-container .base-layout-content-container-header{flex:0 0 auto}seam-base-layout .base-layout-content-container .base-layout-content-container-inner{flex:1 1 auto}seam-base-layout .base-layout-content-container .base-layout-content-container-footer{flex:0 0 auto}seam-base-layout .base-layout-content-container-header{margin:.25rem}seam-base-layout .btn-baselayout-action{margin:0 0 0 .25rem;color:#212529;background-color:#e9ecef;padding:.5rem 1rem;font-size:1rem;line-height:1.5;border-radius:.25rem;border:none;color:#6c757d}seam-base-layout .btn-baselayout-action:hover{color:#212529;background-color:#d3d9df;border-color:#cbd3da}seam-base-layout .btn-baselayout-action.focus,seam-base-layout .btn-baselayout-action:focus{color:#212529;background-color:#d3d9df;border-color:#cbd3da;box-shadow:0 0 0 .2rem hsla(210,6%,81%,.5)}seam-base-layout .btn-baselayout-action.disabled,seam-base-layout .btn-baselayout-action:disabled{color:#212529;background-color:#e9ecef;border-color:#e9ecef}.show>seam-base-layout .btn-baselayout-action.dropdown-toggle,seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled).active,seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled):active{color:#212529;background-color:#d3d9df;border-color:#c4ccd4}.show>seam-base-layout .btn-baselayout-action.dropdown-toggle:focus,seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled).active:focus,seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled):active:focus{box-shadow:0 0 0 .2rem hsla(210,6%,81%,.5)}seam-base-layout .btn-baselayout-action.focus,seam-base-layout .btn-baselayout-action:focus,seam-base-layout .btn-baselayout-action:hover{color:#6c757d}"]
|
|
231
|
+
},] }
|
|
232
|
+
];
|
|
233
|
+
TheSeamBaseLayoutComponent.ctorParameters = () => [
|
|
234
|
+
{ type: ViewContainerRef },
|
|
235
|
+
{ type: TheSeamLayoutService }
|
|
236
|
+
];
|
|
237
|
+
TheSeamBaseLayoutComponent.propDecorators = {
|
|
238
|
+
overlayNav: [{ type: Input }],
|
|
239
|
+
_topBarTpl: [{ type: ContentChild, args: [BaseLayoutTopBarDirective, { static: true, read: TemplateRef },] }],
|
|
240
|
+
_sideBarTpl: [{ type: ContentChild, args: [BaseLayoutSideBarDirective, { static: true, read: TemplateRef },] }],
|
|
241
|
+
_contentTpl: [{ type: ContentChild, args: [BaseLayoutContentDirective, { static: true, read: TemplateRef },] }],
|
|
242
|
+
_contentHeaderTpl: [{ type: ContentChild, args: [BaseLayoutContentHeaderDirective, { static: true, read: TemplateRef },] }],
|
|
243
|
+
_contentFooterTpl: [{ type: ContentChild, args: [BaseLayoutContentFooterDirective, { static: true, read: TemplateRef },] }]
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
class TheSeamBaseLayoutModule {
|
|
247
|
+
}
|
|
248
|
+
TheSeamBaseLayoutModule.decorators = [
|
|
249
|
+
{ type: NgModule, args: [{
|
|
250
|
+
declarations: [
|
|
251
|
+
TheSeamBaseLayoutComponent,
|
|
252
|
+
BaseLayoutContentDirective,
|
|
253
|
+
BaseLayoutSideBarDirective,
|
|
254
|
+
BaseLayoutTopBarDirective,
|
|
255
|
+
BaseLayoutNavToggleDirective,
|
|
256
|
+
BaseLayoutContentHeaderDirective,
|
|
257
|
+
BaseLayoutContentFooterDirective
|
|
258
|
+
],
|
|
259
|
+
imports: [
|
|
260
|
+
CommonModule,
|
|
261
|
+
PortalModule,
|
|
262
|
+
TheSeamScrollbarModule,
|
|
263
|
+
TheSeamIconModule,
|
|
264
|
+
TheSeamButtonsModule
|
|
265
|
+
],
|
|
266
|
+
exports: [
|
|
267
|
+
TheSeamBaseLayoutComponent,
|
|
268
|
+
BaseLayoutContentDirective,
|
|
269
|
+
BaseLayoutSideBarDirective,
|
|
270
|
+
BaseLayoutTopBarDirective,
|
|
271
|
+
BaseLayoutNavToggleDirective,
|
|
272
|
+
BaseLayoutContentHeaderDirective,
|
|
273
|
+
BaseLayoutContentFooterDirective
|
|
274
|
+
]
|
|
275
|
+
},] }
|
|
276
|
+
];
|
|
277
|
+
|
|
278
|
+
class DashboardWidgetContainerComponent {
|
|
279
|
+
constructor() { }
|
|
280
|
+
ngOnInit() { }
|
|
281
|
+
}
|
|
282
|
+
DashboardWidgetContainerComponent.decorators = [
|
|
283
|
+
{ type: Component, args: [{
|
|
284
|
+
selector: 'seam-dashboard-widget-container',
|
|
285
|
+
template: "<ng-template><ng-content></ng-content></ng-template>\n",
|
|
286
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
287
|
+
styles: [""]
|
|
288
|
+
},] }
|
|
289
|
+
];
|
|
290
|
+
DashboardWidgetContainerComponent.ctorParameters = () => [];
|
|
291
|
+
DashboardWidgetContainerComponent.propDecorators = {
|
|
292
|
+
def: [{ type: Input }],
|
|
293
|
+
templateRef: [{ type: ViewChild, args: [TemplateRef,] }]
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
const THESEAM_DASHBOARD_WIDGETS_PREFERENCES_ACCESSOR = new InjectionToken('ITheSeamDashboardWidgetsPreferencesAccessor');
|
|
297
|
+
|
|
298
|
+
// TODO: This needs a unit test to make sure it will not cause a race condition
|
|
299
|
+
// if update is called faster than the previous can respond.
|
|
300
|
+
//
|
|
301
|
+
// The ideal approach I am thinking, without steping through the process too
|
|
302
|
+
// thoroughly is to hold the new data emit until all pending updates are done.
|
|
303
|
+
// Any pending updates other than the most recently requested will be ignored
|
|
304
|
+
// and just wait on the most recent, and if already running it should be
|
|
305
|
+
// canceled if possible. Also, incase something happens that causes the new data
|
|
306
|
+
// emissions to get held up too long, there could be a threshold time that the
|
|
307
|
+
// new data can be held up.
|
|
308
|
+
/**
|
|
309
|
+
* Manages anything dealing with retrieving and updating dashboard widget
|
|
310
|
+
* preference data from the provided accessor.
|
|
311
|
+
*/
|
|
312
|
+
class DashboardWidgetsPreferencesService {
|
|
313
|
+
// private _pending = false
|
|
314
|
+
// public get pending() { return this._pending }
|
|
315
|
+
constructor(_prefsAccessor) {
|
|
316
|
+
this._prefsAccessor = _prefsAccessor;
|
|
317
|
+
this._tablePrefsMap = new Map();
|
|
318
|
+
}
|
|
319
|
+
preferences(preferenceKey) {
|
|
320
|
+
let prefs = this._tablePrefsMap.get(preferenceKey);
|
|
321
|
+
if (!prefs) {
|
|
322
|
+
const refreshSubject = new Subject();
|
|
323
|
+
prefs = {
|
|
324
|
+
observable: this._createObservable(refreshSubject, preferenceKey),
|
|
325
|
+
refresh: refreshSubject
|
|
326
|
+
};
|
|
327
|
+
this._tablePrefsMap.set(preferenceKey, prefs);
|
|
328
|
+
}
|
|
329
|
+
return prefs.observable;
|
|
330
|
+
}
|
|
331
|
+
_createObservable(refreshSubject, prefKey) {
|
|
332
|
+
if (!this._prefsAccessor) {
|
|
333
|
+
return of({});
|
|
334
|
+
}
|
|
335
|
+
const accessor = (key) => this._prefsAccessor ? this._prefsAccessor.get(key) : of('{}');
|
|
336
|
+
return refreshSubject.pipe(startWith({}),
|
|
337
|
+
// tap(() => console.log('Start requesting: ', prefKey)),
|
|
338
|
+
switchMap(() => accessor(prefKey).pipe(map(v => {
|
|
339
|
+
if (!v) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
// TODO: Add a schema validator and migration tool to avoid parsing issues.
|
|
343
|
+
try {
|
|
344
|
+
return JSON.parse(v);
|
|
345
|
+
}
|
|
346
|
+
catch (error) {
|
|
347
|
+
if (isDevMode()) {
|
|
348
|
+
console.error(error);
|
|
349
|
+
}
|
|
350
|
+
return null;
|
|
351
|
+
}
|
|
352
|
+
}), map(v => !!v ? v : {}))), shareReplay({ bufferSize: 1, refCount: true }));
|
|
353
|
+
}
|
|
354
|
+
refresh(preferenceKey) {
|
|
355
|
+
const prefs = this._tablePrefsMap.get(preferenceKey);
|
|
356
|
+
if (prefs) {
|
|
357
|
+
// this._pending = true
|
|
358
|
+
// prefs.refresh.next()
|
|
359
|
+
return prefs.observable.pipe(
|
|
360
|
+
// tap(() => prefs.refresh.next()),
|
|
361
|
+
tap(() => setTimeout(() => { prefs.refresh.next(); }, 0)), mapTo(undefined), take(1));
|
|
362
|
+
}
|
|
363
|
+
return of(undefined);
|
|
364
|
+
}
|
|
365
|
+
selectLayout(preferenceKey, layoutName) {
|
|
366
|
+
return this.preferences(preferenceKey).pipe(map(prefs => (prefs.layouts || []).find(l => l.name === layoutName)));
|
|
367
|
+
}
|
|
368
|
+
// TODO: Improve this updating to not be more generic, so we can quickly add
|
|
369
|
+
// edits for different preference schema's.
|
|
370
|
+
//
|
|
371
|
+
// TODO: Decide if a send queue/merging of pending queue is needed to avoid
|
|
372
|
+
// out of order updates. This shouldn't be an issue, with how fast preferences
|
|
373
|
+
// will most likely be changing, but it could happen in situations, such as
|
|
374
|
+
// network issues.
|
|
375
|
+
updateLayout(preferenceKey, layout) {
|
|
376
|
+
if (!this._prefsAccessor) {
|
|
377
|
+
return of(undefined);
|
|
378
|
+
}
|
|
379
|
+
if (!hasProperty(layout, 'name')) {
|
|
380
|
+
throw Error(`Unable to save layout preference. 'name' is required for a layout preference.`);
|
|
381
|
+
}
|
|
382
|
+
const _layout = this.toSerializeableLayout(layout);
|
|
383
|
+
// this._pending = true
|
|
384
|
+
return this.preferences(preferenceKey).pipe(map(prefs => {
|
|
385
|
+
// Making the preferences immutable may not be necessary, but for now
|
|
386
|
+
// this obj->str->obj will work as a naive clone.
|
|
387
|
+
const layouts = JSON.parse(JSON.stringify(prefs.layouts || []));
|
|
388
|
+
const _layoutPref = layouts.find((c) => c.name === _layout.name);
|
|
389
|
+
// console.log('has', _layoutPref)
|
|
390
|
+
if (_layoutPref) {
|
|
391
|
+
if (hasProperty(_layout, 'name')) {
|
|
392
|
+
_layoutPref.name = _layout.name;
|
|
393
|
+
}
|
|
394
|
+
if (hasProperty(_layout, 'label')) {
|
|
395
|
+
_layoutPref.label = _layout.label;
|
|
396
|
+
}
|
|
397
|
+
if (hasProperty(_layout, 'items')) {
|
|
398
|
+
_layoutPref.items = _layout.items;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
layouts.push(Object.assign({}, _layout));
|
|
403
|
+
}
|
|
404
|
+
const newPrefs = Object.assign(Object.assign({}, prefs), { layouts });
|
|
405
|
+
return newPrefs;
|
|
406
|
+
}),
|
|
407
|
+
// tap(v => console.log('newPrefs', v)),
|
|
408
|
+
take(1), switchMap(newPrefs => this._prefsAccessor
|
|
409
|
+
? this._prefsAccessor.update(preferenceKey, JSON.stringify(newPrefs))
|
|
410
|
+
: of(newPrefs)), switchMap(() => this.refresh(preferenceKey).pipe(mapTo(undefined))));
|
|
411
|
+
// .subscribe()
|
|
412
|
+
}
|
|
413
|
+
toSerializeableLayout(layout) {
|
|
414
|
+
const serialized = {
|
|
415
|
+
name: layout.name,
|
|
416
|
+
label: layout.label,
|
|
417
|
+
items: this.toSerializeableItems(layout.items) || []
|
|
418
|
+
};
|
|
419
|
+
return serialized;
|
|
420
|
+
}
|
|
421
|
+
// public toDeserializedLayout(layout: IDashboardWidgetItemLayoutSerialized): IDashboardWidgetItemLayoutDef {
|
|
422
|
+
// // For now there is nothing to do. Eventually this should have at least
|
|
423
|
+
// // validation on the deserialized object.
|
|
424
|
+
// return layout
|
|
425
|
+
// }
|
|
426
|
+
/**
|
|
427
|
+
* Returns the serializable widget items as objects that can be serialized to
|
|
428
|
+
* a JSON string for storage.
|
|
429
|
+
*/
|
|
430
|
+
toSerializeableItems(widgets) {
|
|
431
|
+
const serialized = [];
|
|
432
|
+
for (const w of widgets) {
|
|
433
|
+
// if (!w.__itemDef.component || typeof w.__itemDef.component !== 'string') {
|
|
434
|
+
// console.warn(`[DashboardWidgetsService] Widget item def must have a string 'component' property to be serialized.`, w)
|
|
435
|
+
// continue
|
|
436
|
+
// }
|
|
437
|
+
// serialized.push({
|
|
438
|
+
// widgetId: w.widgetId,
|
|
439
|
+
// col: w.col,
|
|
440
|
+
// order: w.order,
|
|
441
|
+
// component: w.__itemDef.component
|
|
442
|
+
// })
|
|
443
|
+
// TODO: Remove this, it is only here for initial dev debugging.
|
|
444
|
+
serialized.push({
|
|
445
|
+
widgetId: w.widgetId,
|
|
446
|
+
col: w.col,
|
|
447
|
+
order: w.order,
|
|
448
|
+
// component: w.__itemDef.component as string
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
return serialized;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
DashboardWidgetsPreferencesService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DashboardWidgetsPreferencesService_Factory() { return new DashboardWidgetsPreferencesService(i0.ɵɵinject(THESEAM_DASHBOARD_WIDGETS_PREFERENCES_ACCESSOR, 8)); }, token: DashboardWidgetsPreferencesService, providedIn: "root" });
|
|
455
|
+
DashboardWidgetsPreferencesService.decorators = [
|
|
456
|
+
{ type: Injectable, args: [{
|
|
457
|
+
providedIn: 'root'
|
|
458
|
+
},] }
|
|
459
|
+
];
|
|
460
|
+
DashboardWidgetsPreferencesService.ctorParameters = () => [
|
|
461
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [THESEAM_DASHBOARD_WIDGETS_PREFERENCES_ACCESSOR,] }] }
|
|
462
|
+
];
|
|
463
|
+
|
|
464
|
+
class DashboardWidgetsService {
|
|
465
|
+
constructor(_dynamicComponentLoaderModule, _preferences) {
|
|
466
|
+
this._dynamicComponentLoaderModule = _dynamicComponentLoaderModule;
|
|
467
|
+
this._preferences = _preferences;
|
|
468
|
+
this.preferenceKey = 'datatable-widgets';
|
|
469
|
+
this.defaultNumColumns = 3;
|
|
470
|
+
/** Used for operations, such as 'addWidget', if the column is not specified. */
|
|
471
|
+
this.defaultColumn = 0;
|
|
472
|
+
this._widgets = new BehaviorSubject([]);
|
|
473
|
+
this._numColumns = new BehaviorSubject(this.defaultNumColumns);
|
|
474
|
+
this._viewContainerRefSubject = new BehaviorSubject(undefined);
|
|
475
|
+
this.numColumns$ = this._numColumns.asObservable();
|
|
476
|
+
// Widget items without preferences
|
|
477
|
+
const _widgetItems$ = combineLatest([this._widgets, this._viewContainerRefSubject])
|
|
478
|
+
.pipe(switchMap(([defs, vcr]) => this.createWidgetItems(defs, vcr)));
|
|
479
|
+
// Widget items with preferences
|
|
480
|
+
this.widgetItems$ = combineLatest([_widgetItems$, this.numColumns$])
|
|
481
|
+
.pipe(
|
|
482
|
+
// Wait until the current tick is done, incase both the widgets and
|
|
483
|
+
// number of columns are set durring the same tick. Without the audit,
|
|
484
|
+
// this would get called twice when the component is initialized with
|
|
485
|
+
// both inputs set one after the other individually.
|
|
486
|
+
auditTime(0), switchMap(([items, numColumns]) => this._preferences.selectLayout(this.preferenceKey, this._layoutName(numColumns)).pipe(map(layout => layout ? this.withLayoutPreferences(items, layout) : items))), shareReplay({ bufferSize: 1, refCount: true }));
|
|
487
|
+
this.widgetColumns$ = this.widgetItems$
|
|
488
|
+
.pipe(map(items => this.toColumnRecords(items)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
489
|
+
}
|
|
490
|
+
get widgets() { return this._widgets.value; }
|
|
491
|
+
set widgets(value) { this._widgets.next(value); }
|
|
492
|
+
get numColumns() { return this._numColumns.value; }
|
|
493
|
+
set numColumns(value) {
|
|
494
|
+
if (value !== this._numColumns.value) {
|
|
495
|
+
this._numColumns.next(value);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
_layoutName(numColumns) {
|
|
499
|
+
return `columns-${numColumns}`;
|
|
500
|
+
}
|
|
501
|
+
setViewContainerRef(vcr) {
|
|
502
|
+
this._viewContainerRefSubject.next(vcr);
|
|
503
|
+
}
|
|
504
|
+
createWidgetItems(defs, vcr) {
|
|
505
|
+
const _createObservables = (defs || []).map(d => this.createWidgetItem(d, vcr));
|
|
506
|
+
const items$ = _createObservables.length > 0 ? combineLatest(_createObservables) : of([]);
|
|
507
|
+
return items$.pipe(map(items => items.filter(notNullOrUndefined)), tap(items => {
|
|
508
|
+
if (isDevMode()) {
|
|
509
|
+
const ids = items.map(v => v.widgetId);
|
|
510
|
+
if ((new Set(ids)).size !== ids.length) {
|
|
511
|
+
console.warn(`[DashboardWidgetsService] Duplicate widget's with the same 'widgetId' found.`);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}));
|
|
515
|
+
}
|
|
516
|
+
createWidgetItem(def, vcr) {
|
|
517
|
+
if (!def.widgetId || typeof def.widgetId !== 'string' || def.widgetId.length < 1) {
|
|
518
|
+
if (isDevMode()) {
|
|
519
|
+
console.warn(`[DashboardWidgetsService] Widget ignored. All widgets must have a 'widgetId'.`, def);
|
|
520
|
+
}
|
|
521
|
+
return of(undefined);
|
|
522
|
+
}
|
|
523
|
+
return this.createWidgetPortal(def, vcr).pipe(map(portal => (Object.assign(Object.assign({}, def), { col: def.col || this.defaultColumn, order: def.order || 0, portal, __itemDef: def }))));
|
|
524
|
+
}
|
|
525
|
+
createWidgetPortal(def, vcr) {
|
|
526
|
+
if (typeof def.component === 'string') {
|
|
527
|
+
return this._dynamicComponentLoaderModule
|
|
528
|
+
.getComponentFactory(def.component)
|
|
529
|
+
.pipe(map(componentFactory => {
|
|
530
|
+
return new ComponentPortal(componentFactory.componentType, vcr, undefined, componentFactory.ngModule.componentFactoryResolver);
|
|
531
|
+
}), take(1));
|
|
532
|
+
}
|
|
533
|
+
return def.componentFactoryResolver
|
|
534
|
+
? of(new ComponentPortal(def.component, vcr, undefined, def.componentFactoryResolver))
|
|
535
|
+
: of(new ComponentPortal(def.component, vcr));
|
|
536
|
+
}
|
|
537
|
+
updateOrder() {
|
|
538
|
+
return this.widgetColumns$
|
|
539
|
+
.pipe(take(1), tap(columns => columns.forEach(col => {
|
|
540
|
+
let i = 0;
|
|
541
|
+
col.items.forEach(itm => itm.order = i++);
|
|
542
|
+
})), mapTo(undefined));
|
|
543
|
+
}
|
|
544
|
+
toColumnRecords(items) {
|
|
545
|
+
let columns = [];
|
|
546
|
+
for (let i = 0; i < this.numColumns; i++) {
|
|
547
|
+
columns.push({ column: i, items: [] });
|
|
548
|
+
}
|
|
549
|
+
const colNotFound = [];
|
|
550
|
+
// Distribute items into columns
|
|
551
|
+
for (const item of items) {
|
|
552
|
+
const col = columns.find(c => c.column === item.col);
|
|
553
|
+
if (!col) {
|
|
554
|
+
// columns.push({ column: item.col, items: [ item ] })
|
|
555
|
+
// if (item.col < 0) {
|
|
556
|
+
// const col0: IDashboardWidgetsColumnRecord | undefined = columns.find(c => c.column === 0)
|
|
557
|
+
// if (col0) {
|
|
558
|
+
// col0.items.push(item)
|
|
559
|
+
// }
|
|
560
|
+
// } else if (item.col > this.numColumns - 1) {
|
|
561
|
+
// const colMax: IDashboardWidgetsColumnRecord | undefined = columns.find(c => c.column === this.numColumns - 1)
|
|
562
|
+
// if (colMax) {
|
|
563
|
+
// colMax.items.push(item)
|
|
564
|
+
// }
|
|
565
|
+
// }
|
|
566
|
+
colNotFound.push(item);
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
col.items.push(item);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
for (let i = 0; i < colNotFound.length; i++) {
|
|
573
|
+
const item = colNotFound[i];
|
|
574
|
+
const col = columns
|
|
575
|
+
.find(c => c.column === i % this.numColumns);
|
|
576
|
+
if (col) {
|
|
577
|
+
col.items.push(item);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
// Sort columns
|
|
581
|
+
columns = columns.sort((a, b) => a.column - b.column);
|
|
582
|
+
// Sort columns items
|
|
583
|
+
columns.forEach(col => col.items.sort((a, b) => a.order - b.order));
|
|
584
|
+
return columns;
|
|
585
|
+
}
|
|
586
|
+
withLayoutPreferences(items, layout) {
|
|
587
|
+
const _items = [];
|
|
588
|
+
for (const item of items) {
|
|
589
|
+
const itemPref = layout.items.find(x => x.widgetId === item.widgetId);
|
|
590
|
+
_items.push(Object.assign(Object.assign({}, item), (itemPref || {})));
|
|
591
|
+
}
|
|
592
|
+
return _items;
|
|
593
|
+
}
|
|
594
|
+
savePreferences() {
|
|
595
|
+
// Right now the items are moved between the column record arrays, but the
|
|
596
|
+
// 'col' prop is not updated, so it is mapped to corrected items here from
|
|
597
|
+
// the column records.
|
|
598
|
+
const items$ = this.widgetColumns$.pipe(map(columns => []
|
|
599
|
+
.concat(...(columns.map(c => c.items.map(itm => (Object.assign(Object.assign({}, itm), { col: c.column }))))))));
|
|
600
|
+
return combineLatest([items$, this.numColumns$]).pipe(auditTime(0), take(1), switchMap(([items, numColumns]) => {
|
|
601
|
+
return this._preferences.updateLayout(this.preferenceKey, {
|
|
602
|
+
name: this._layoutName(numColumns),
|
|
603
|
+
items
|
|
604
|
+
});
|
|
605
|
+
}), mapTo(undefined));
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
DashboardWidgetsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DashboardWidgetsService_Factory() { return new DashboardWidgetsService(i0.ɵɵinject(i1.TheSeamDynamicComponentLoader), i0.ɵɵinject(DashboardWidgetsPreferencesService)); }, token: DashboardWidgetsService, providedIn: "root" });
|
|
609
|
+
DashboardWidgetsService.decorators = [
|
|
610
|
+
{ type: Injectable, args: [{
|
|
611
|
+
providedIn: 'root'
|
|
612
|
+
},] }
|
|
613
|
+
];
|
|
614
|
+
DashboardWidgetsService.ctorParameters = () => [
|
|
615
|
+
{ type: TheSeamDynamicComponentLoader },
|
|
616
|
+
{ type: DashboardWidgetsPreferencesService }
|
|
617
|
+
];
|
|
618
|
+
|
|
619
|
+
class DashboardWidgetsComponent {
|
|
620
|
+
constructor(_dashboardWidgets, _viewContainerRef, _cdr, _baseLayoutRef) {
|
|
621
|
+
this._dashboardWidgets = _dashboardWidgets;
|
|
622
|
+
this._viewContainerRef = _viewContainerRef;
|
|
623
|
+
this._cdr = _cdr;
|
|
624
|
+
this._baseLayoutRef = _baseLayoutRef;
|
|
625
|
+
this.faLock = faLock;
|
|
626
|
+
this.faUnlock = faUnlock;
|
|
627
|
+
this._actionWidgetDragToggleName = 'widget-drag-toggle';
|
|
628
|
+
this._ngUnsubscribe = new Subject();
|
|
629
|
+
this._gapSize = new BehaviorSubject(30);
|
|
630
|
+
this.widgetsDraggable = false;
|
|
631
|
+
this._dragToggleVisible = new BehaviorSubject(true);
|
|
632
|
+
this._containers = new BehaviorSubject([]);
|
|
633
|
+
this._layoutChange = new Subject();
|
|
634
|
+
this.widgetsChange = new EventEmitter();
|
|
635
|
+
this._widthChange = new Subject();
|
|
636
|
+
this.containers$ = this._containers.asObservable();
|
|
637
|
+
this._gapStyleSize$ = this._gapSize.pipe(auditTime(0), map(size => size / 2), shareReplay({ bufferSize: 1, refCount: true }));
|
|
638
|
+
this._widthChange.pipe(debounceTime(30), tap(width => {
|
|
639
|
+
if (width > 1300) {
|
|
640
|
+
this.numColumns = 3;
|
|
641
|
+
}
|
|
642
|
+
else if (width > 800) {
|
|
643
|
+
this.numColumns = 2;
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
this.numColumns = 1;
|
|
647
|
+
}
|
|
648
|
+
}), takeUntil(this._ngUnsubscribe)).subscribe();
|
|
649
|
+
this.widgetItems$ = this._dashboardWidgets.widgetItems$;
|
|
650
|
+
this.widgetColumns$ = this._dashboardWidgets.widgetColumns$;
|
|
651
|
+
}
|
|
652
|
+
get gapSize() { return this._gapSize.value; }
|
|
653
|
+
set gapSize(val) {
|
|
654
|
+
this._gapSize.next(coerceNumberProperty(val));
|
|
655
|
+
}
|
|
656
|
+
get dragToggleVisible() { return this._dragToggleVisible.value; }
|
|
657
|
+
set dragToggleVisible(val) {
|
|
658
|
+
this._dragToggleVisible.next(coerceBooleanProperty(val));
|
|
659
|
+
}
|
|
660
|
+
get numColumns() { return this._dashboardWidgets.numColumns; }
|
|
661
|
+
set numColumns(val) {
|
|
662
|
+
this._dashboardWidgets.numColumns = coerceNumberProperty(val);
|
|
663
|
+
}
|
|
664
|
+
set widgets(value) { this._dashboardWidgets.widgets = value || []; }
|
|
665
|
+
get widgets() { return this._dashboardWidgets.widgets; }
|
|
666
|
+
ngOnInit() {
|
|
667
|
+
// this._dashboardWidgets.setViewContainerRef(this._viewContainerRef)
|
|
668
|
+
this._layoutChange.pipe(switchMap(() => this.widgetItems$.pipe(take(1), tap(widgetItems => this.widgetsChange.emit(widgetItems)),
|
|
669
|
+
// map(widgetItems => this._dashboardWidgets.toSerializeableItems(widgetItems)),
|
|
670
|
+
// tap(v => console.log('serializable', v)),
|
|
671
|
+
switchMap(() => this._dashboardWidgets.savePreferences()))), takeUntil(this._ngUnsubscribe)).subscribe();
|
|
672
|
+
}
|
|
673
|
+
ngOnDestroy() {
|
|
674
|
+
this._unregisterToggleAction();
|
|
675
|
+
this._ngUnsubscribe.next();
|
|
676
|
+
this._ngUnsubscribe.complete();
|
|
677
|
+
}
|
|
678
|
+
ngAfterViewInit() {
|
|
679
|
+
var _a;
|
|
680
|
+
if (this._baseLayoutRef) {
|
|
681
|
+
this._dragToggleVisible.pipe(distinctUntilChanged(), tap(visible => {
|
|
682
|
+
const isRegistered = this._isActionToggleActionRegistered();
|
|
683
|
+
if (visible && !isRegistered) {
|
|
684
|
+
this._registerToggleAction();
|
|
685
|
+
}
|
|
686
|
+
else if (!visible && isRegistered) {
|
|
687
|
+
this._unregisterToggleAction();
|
|
688
|
+
}
|
|
689
|
+
}), takeUntil(this._ngUnsubscribe)).subscribe();
|
|
690
|
+
}
|
|
691
|
+
(_a = this.containers) === null || _a === void 0 ? void 0 : _a.changes.pipe(startWith(undefined), map(() => { var _a; return ((_a = this.containers) === null || _a === void 0 ? void 0 : _a.toArray()) || []; }), takeUntil(this._ngUnsubscribe), finalize(() => this._containers.next([]))).subscribe(v => this._containers.next(v));
|
|
692
|
+
}
|
|
693
|
+
_registerToggleAction() {
|
|
694
|
+
if (this._baseLayoutRef) {
|
|
695
|
+
// This should probably use a component dynamically created from the
|
|
696
|
+
// config and return a ref to it, instead of using a template.
|
|
697
|
+
if (this._toggleBtnTpl) {
|
|
698
|
+
this._baseLayoutRef.registerAction({
|
|
699
|
+
// type: 'button',
|
|
700
|
+
type: 'template',
|
|
701
|
+
name: this._actionWidgetDragToggleName,
|
|
702
|
+
label: 'Toggle Widget Dragging',
|
|
703
|
+
// exec: () => {
|
|
704
|
+
// console.log('toggle')
|
|
705
|
+
// },
|
|
706
|
+
template: this._toggleBtnTpl
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
_unregisterToggleAction() {
|
|
712
|
+
if (this._baseLayoutRef) {
|
|
713
|
+
this._baseLayoutRef.unregisterAction(this._actionWidgetDragToggleName);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
_isActionToggleActionRegistered() {
|
|
717
|
+
if (!this._baseLayoutRef) {
|
|
718
|
+
return false;
|
|
719
|
+
}
|
|
720
|
+
return this._baseLayoutRef.isActionRegistered(this._actionWidgetDragToggleName);
|
|
721
|
+
}
|
|
722
|
+
drop(event) {
|
|
723
|
+
if (event.previousContainer === event.container) {
|
|
724
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
725
|
+
this._dashboardWidgets.updateOrder().subscribe(() => this._layoutChange.next());
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
729
|
+
this._dashboardWidgets.updateOrder().subscribe(() => this._layoutChange.next());
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
_containerTrackByFn(index, item) {
|
|
733
|
+
return item.widgetId;
|
|
734
|
+
}
|
|
735
|
+
_columnsTrackByFn(index, record) {
|
|
736
|
+
return record.column;
|
|
737
|
+
}
|
|
738
|
+
toggleDragging() {
|
|
739
|
+
this.widgetsDraggable = !this.widgetsDraggable;
|
|
740
|
+
this._cdr.detectChanges();
|
|
741
|
+
}
|
|
742
|
+
_resized(event) {
|
|
743
|
+
this._widthChange.next(event.size.width);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
DashboardWidgetsComponent.decorators = [
|
|
747
|
+
{ type: Component, args: [{
|
|
748
|
+
selector: 'seam-dashboard-widgets',
|
|
749
|
+
template: "<!--\n This is an ugly trick I am using to render the component into an <ng-content>\n wrapped in an <ng-template> to move the component to different outlets without\n reinitializing it. This way the widget won't reload when moving between\n columns. When I remember how I programatically did this I will remove this\n weirdness.\n -->\n <seam-dashboard-widget-container *ngFor=\"let item of widgetItems$ | async; trackBy: _containerTrackByFn\" [def]=\"$any(item)\">\n <!-- <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template> -->\n <ng-template [seamDashboardWidgetPortalOutlet]=\"item.portal\"></ng-template>\n</seam-dashboard-widget-container>\n\n<div class=\"dashboard-widgets-base d-flex flex-row justify-content-around\"\n style=\"flex: 1410px;\"\n [style.padding.px]=\"_gapStyleSize$ | async\"\n (seamElemResized)=\"_resized($event)\"\n cdkDropListGroup>\n <div *ngFor=\"let col of widgetColumns$ | async; trackBy: _columnsTrackByFn\"\n class=\"d-flex flex-column flex-grow-1 dashboard-widgets-list\"\n cdkDropList\n [cdkDropListData]=\"col.items\"\n (cdkDropListDropped)=\"drop($any($event))\">\n <div *ngFor=\"let item of col.items; trackBy: _containerTrackByFn\"\n class=\"dashboard-widgets-list-item\"\n [attr.data-widget-id]=\"item.widgetId\"\n cdkDrag\n [cdkDragDisabled]=\"!widgetsDraggable\">\n <div [style.margin.px]=\"_gapStyleSize$ | async\">\n <seam-dashboard-widget-template-container [item]=\"item\"></seam-dashboard-widget-template-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #toggleBtnTpl>\n <button seamButton theme=\"baselayout-action\" title=\"{{ widgetsDraggable ? 'Lock the Dashboard' : 'Modify Dashboard' }}\" (click)=\"toggleDragging()\">\n <seam-icon [icon]=\"widgetsDraggable ? faUnlock : faLock\"></seam-icon>\n </button>\n</ng-template>\n",
|
|
750
|
+
providers: [
|
|
751
|
+
{
|
|
752
|
+
provide: THESEAM_WIDGET_ACCESSOR,
|
|
753
|
+
// tslint:disable-next-line:no-use-before-declare
|
|
754
|
+
useExisting: forwardRef(() => DashboardWidgetsComponent)
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
758
|
+
encapsulation: ViewEncapsulation.None,
|
|
759
|
+
styles: ["seam-dashboard-widgets{display:flex;justify-content:center}seam-dashboard-widgets .dashboard-widgets-base{max-width:1410px}seam-dashboard-widgets .dashboard-widgets-list{flex-basis:400px;max-width:500px}seam-dashboard-widgets .dashboard-widgets-list.cdk-drop-list-dragging .dashboard-widgets-list-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.dashboard-widgets-list-item.cdk-drag-preview{box-sizing:border-box}.dashboard-widgets-list-item.cdk-drag-preview>div{border-radius:.25rem;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.dashboard-widgets-list-item.cdk-drag-disabled .cdk-drag-handle{cursor:default}.dashboard-widgets-list-item .cdk-drag-handle{cursor:move}.dashboard-widgets-list-item.cdk-drag-placeholder{opacity:0}.dashboard-widgets-list-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}"]
|
|
760
|
+
},] }
|
|
761
|
+
];
|
|
762
|
+
DashboardWidgetsComponent.ctorParameters = () => [
|
|
763
|
+
{ type: DashboardWidgetsService },
|
|
764
|
+
{ type: ViewContainerRef },
|
|
765
|
+
{ type: ChangeDetectorRef },
|
|
766
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [THESEAM_BASE_LAYOUT_REF,] }] }
|
|
767
|
+
];
|
|
768
|
+
DashboardWidgetsComponent.propDecorators = {
|
|
769
|
+
gapSize: [{ type: Input }],
|
|
770
|
+
widgetsDraggable: [{ type: Input }],
|
|
771
|
+
dragToggleVisible: [{ type: Input }],
|
|
772
|
+
numColumns: [{ type: Input }],
|
|
773
|
+
widgets: [{ type: Input }],
|
|
774
|
+
containers: [{ type: ViewChildren, args: [DashboardWidgetContainerComponent,] }],
|
|
775
|
+
cdkDragDirectives: [{ type: ViewChildren, args: [CdkDrag,] }],
|
|
776
|
+
_toggleBtnTpl: [{ type: ViewChild, args: ['toggleBtnTpl', { static: true },] }],
|
|
777
|
+
widgetsChange: [{ type: Output }]
|
|
778
|
+
};
|
|
779
|
+
__decorate([
|
|
780
|
+
InputBoolean()
|
|
781
|
+
], DashboardWidgetsComponent.prototype, "widgetsDraggable", void 0);
|
|
782
|
+
|
|
783
|
+
class DashboardWidgetTemplateContainerComponent {
|
|
784
|
+
constructor(_dashboardWidgetsComponent) {
|
|
785
|
+
this._dashboardWidgetsComponent = _dashboardWidgetsComponent;
|
|
786
|
+
this.template$ = this._dashboardWidgetsComponent.containers$.pipe(map(containers => containers.find((c) => { var _a; return c.def.widgetId === ((_a = this.item) === null || _a === void 0 ? void 0 : _a.widgetId); })), map(container => container && container.templateRef));
|
|
787
|
+
}
|
|
788
|
+
ngOnInit() { }
|
|
789
|
+
}
|
|
790
|
+
DashboardWidgetTemplateContainerComponent.decorators = [
|
|
791
|
+
{ type: Component, args: [{
|
|
792
|
+
selector: 'seam-dashboard-widget-template-container',
|
|
793
|
+
template: "<ng-template [ngTemplateOutlet]=\"$any(template$ | async)\"></ng-template>\n",
|
|
794
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
795
|
+
styles: [""]
|
|
796
|
+
},] }
|
|
797
|
+
];
|
|
798
|
+
DashboardWidgetTemplateContainerComponent.ctorParameters = () => [
|
|
799
|
+
{ type: DashboardWidgetsComponent }
|
|
800
|
+
];
|
|
801
|
+
DashboardWidgetTemplateContainerComponent.propDecorators = {
|
|
802
|
+
item: [{ type: Input }]
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Mostly copied from
|
|
807
|
+
* `https://github.com/angular/components/blob/master/src/cdk/portal/portal-directives.ts`
|
|
808
|
+
* until I can figure out how to hold off removing the DOM nodes with the
|
|
809
|
+
* cdkPortalOutlet. When we update to Angular 9 I may be able to do this better
|
|
810
|
+
* with the new DomPortal.
|
|
811
|
+
*
|
|
812
|
+
* Directive version of a PortalOutlet. Because the directive *is* a
|
|
813
|
+
* PortalOutlet, portals can be directly attached to it, enabling declarative
|
|
814
|
+
* use.
|
|
815
|
+
*
|
|
816
|
+
* Usage: `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
|
|
817
|
+
*/
|
|
818
|
+
class DashboardWidgetPortalOutletDirective extends BasePortalOutlet {
|
|
819
|
+
constructor(_componentFactoryResolver, _viewContainerRef, _elementRef) {
|
|
820
|
+
super();
|
|
821
|
+
this._componentFactoryResolver = _componentFactoryResolver;
|
|
822
|
+
this._viewContainerRef = _viewContainerRef;
|
|
823
|
+
this._elementRef = _elementRef;
|
|
824
|
+
/** Whether the portal component is initialized. */
|
|
825
|
+
this._isInitialized = false;
|
|
826
|
+
/** Emits when a portal is attached to the outlet. */
|
|
827
|
+
this.attached = new EventEmitter();
|
|
828
|
+
}
|
|
829
|
+
/** Portal associated with the Portal outlet. */
|
|
830
|
+
get portal() {
|
|
831
|
+
return this._attachedPortal;
|
|
832
|
+
}
|
|
833
|
+
set portal(portal) {
|
|
834
|
+
// console.log('[DashboardWidgetPortalOutletDirective] set portal', portal, this.hasAttached())
|
|
835
|
+
// Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have
|
|
836
|
+
// run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`
|
|
837
|
+
// and attach a portal programmatically in the parent component. When Angular does the first CD
|
|
838
|
+
// round, it will fire the setter with empty string, causing the user's content to be cleared.
|
|
839
|
+
if (this.hasAttached() && !portal && !this._isInitialized) {
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
if (this.hasAttached()) {
|
|
843
|
+
super.detach();
|
|
844
|
+
}
|
|
845
|
+
if (portal) {
|
|
846
|
+
super.attach(portal);
|
|
847
|
+
}
|
|
848
|
+
this._attachedPortal = portal;
|
|
849
|
+
}
|
|
850
|
+
/** Component or view reference that is attached to the portal. */
|
|
851
|
+
get attachedRef() {
|
|
852
|
+
return this._attachedRef;
|
|
853
|
+
}
|
|
854
|
+
ngOnInit() {
|
|
855
|
+
this._isInitialized = true;
|
|
856
|
+
}
|
|
857
|
+
ngOnDestroy() {
|
|
858
|
+
// console.log('[DashboardWidgetPortalOutletDirective] ngOnDestroy')
|
|
859
|
+
// TODO: Figure out the right way to call dispose without messing up
|
|
860
|
+
// animation. This setTimeout way assumes the transition is 500ms, but that
|
|
861
|
+
// may not always be the case and isn't guaranteed to match the animation ms
|
|
862
|
+
// duration, since setTimeout isn't really meant for accurate timing. It
|
|
863
|
+
// also makes debugging animations difficult, because you can pause an
|
|
864
|
+
// animation, but the timeout will still run.
|
|
865
|
+
setTimeout(() => {
|
|
866
|
+
super.dispose();
|
|
867
|
+
this._attachedPortal = null;
|
|
868
|
+
this._attachedRef = null;
|
|
869
|
+
}, 500);
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
|
|
873
|
+
*
|
|
874
|
+
* @param portal Portal to be attached to the portal outlet.
|
|
875
|
+
* @returns Reference to the created component.
|
|
876
|
+
*/
|
|
877
|
+
attachComponentPortal(portal) {
|
|
878
|
+
portal.setAttachedHost(this);
|
|
879
|
+
// If the portal specifies an origin, use that as the logical location of the component
|
|
880
|
+
// in the application tree. Otherwise use the location of this PortalOutlet.
|
|
881
|
+
const viewContainerRef = portal.viewContainerRef != null ?
|
|
882
|
+
portal.viewContainerRef :
|
|
883
|
+
this._viewContainerRef;
|
|
884
|
+
const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;
|
|
885
|
+
const componentFactory = resolver.resolveComponentFactory(portal.component);
|
|
886
|
+
const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);
|
|
887
|
+
super.setDisposeFn(() => ref.destroy());
|
|
888
|
+
this._attachedPortal = portal;
|
|
889
|
+
this._attachedRef = ref;
|
|
890
|
+
this.attached.emit(ref);
|
|
891
|
+
return ref;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Attach the given TemplatePortal to this PortlHost as an embedded View.
|
|
895
|
+
* @param portal Portal to be attached.
|
|
896
|
+
* @returns Reference to the created embedded view.
|
|
897
|
+
*/
|
|
898
|
+
attachTemplatePortal(portal) {
|
|
899
|
+
portal.setAttachedHost(this);
|
|
900
|
+
const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);
|
|
901
|
+
super.setDisposeFn(() => this._viewContainerRef.clear());
|
|
902
|
+
this._attachedPortal = portal;
|
|
903
|
+
this._attachedRef = viewRef;
|
|
904
|
+
this.attached.emit(viewRef);
|
|
905
|
+
return viewRef;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
DashboardWidgetPortalOutletDirective.decorators = [
|
|
909
|
+
{ type: Directive, args: [{
|
|
910
|
+
selector: '[seamDashboardWidgetPortalOutlet]',
|
|
911
|
+
exportAs: 'seamDashboardWidgetPortalOutlet',
|
|
912
|
+
inputs: ['portal: seamDashboardWidgetPortalOutlet']
|
|
913
|
+
},] }
|
|
914
|
+
];
|
|
915
|
+
DashboardWidgetPortalOutletDirective.ctorParameters = () => [
|
|
916
|
+
{ type: ComponentFactoryResolver },
|
|
917
|
+
{ type: ViewContainerRef },
|
|
918
|
+
{ type: ElementRef }
|
|
919
|
+
];
|
|
920
|
+
DashboardWidgetPortalOutletDirective.propDecorators = {
|
|
921
|
+
attached: [{ type: Output }]
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
class DashboardComponent {
|
|
925
|
+
constructor() {
|
|
926
|
+
this.widgetsDraggable = true;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
DashboardComponent.decorators = [
|
|
930
|
+
{ type: Component, args: [{
|
|
931
|
+
selector: 'seam-dashboard',
|
|
932
|
+
template: "<seam-dashboard-widgets [widgets]=\"widgets\" [widgetsDraggable]=\"widgetsDraggable\"></seam-dashboard-widgets>\n",
|
|
933
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
934
|
+
styles: [""]
|
|
935
|
+
},] }
|
|
936
|
+
];
|
|
937
|
+
DashboardComponent.ctorParameters = () => [];
|
|
938
|
+
DashboardComponent.propDecorators = {
|
|
939
|
+
widgets: [{ type: Input }],
|
|
940
|
+
widgetsDraggable: [{ type: Input }]
|
|
941
|
+
};
|
|
942
|
+
__decorate([
|
|
943
|
+
InputBoolean()
|
|
944
|
+
], DashboardComponent.prototype, "widgetsDraggable", void 0);
|
|
945
|
+
|
|
946
|
+
class TheSeamDashboardModule {
|
|
947
|
+
}
|
|
948
|
+
TheSeamDashboardModule.decorators = [
|
|
949
|
+
{ type: NgModule, args: [{
|
|
950
|
+
declarations: [
|
|
951
|
+
DashboardComponent,
|
|
952
|
+
DashboardWidgetsComponent,
|
|
953
|
+
DashboardWidgetContainerComponent,
|
|
954
|
+
DashboardWidgetTemplateContainerComponent,
|
|
955
|
+
DashboardWidgetPortalOutletDirective
|
|
956
|
+
],
|
|
957
|
+
imports: [
|
|
958
|
+
CommonModule,
|
|
959
|
+
PortalModule,
|
|
960
|
+
DragDropModule,
|
|
961
|
+
TheSeamButtonsModule,
|
|
962
|
+
TheSeamIconModule,
|
|
963
|
+
TheSeamSharedModule
|
|
964
|
+
],
|
|
965
|
+
exports: [
|
|
966
|
+
DashboardComponent,
|
|
967
|
+
DashboardWidgetsComponent,
|
|
968
|
+
DashboardWidgetPortalOutletDirective
|
|
969
|
+
]
|
|
970
|
+
},] }
|
|
971
|
+
];
|
|
972
|
+
|
|
973
|
+
function isNavItemType(item, type) {
|
|
974
|
+
return item.itemType === type;
|
|
975
|
+
}
|
|
976
|
+
function isNavItemActive(item) {
|
|
977
|
+
var _a, _b;
|
|
978
|
+
return (_b = (_a = item.__state) === null || _a === void 0 ? void 0 : _a.active) !== null && _b !== void 0 ? _b : false;
|
|
979
|
+
}
|
|
980
|
+
function isExpanded(item) {
|
|
981
|
+
var _a, _b;
|
|
982
|
+
return (_b = (_a = item.__state) === null || _a === void 0 ? void 0 : _a.expanded) !== null && _b !== void 0 ? _b : false;
|
|
983
|
+
}
|
|
984
|
+
function hasChildren(item) {
|
|
985
|
+
return canHaveChildren(item) && hasProperty(item, 'children') && item.children.length > 0;
|
|
986
|
+
}
|
|
987
|
+
function canHaveChildren(item) {
|
|
988
|
+
return isNavItemType(item, 'basic') || isNavItemType(item, 'link');
|
|
989
|
+
}
|
|
990
|
+
function hasActiveChild(item) {
|
|
991
|
+
if (!hasChildren(item)) {
|
|
992
|
+
return false;
|
|
993
|
+
}
|
|
994
|
+
for (const child of item.children) {
|
|
995
|
+
if (getItemStateProp(child, 'active')) {
|
|
996
|
+
return true;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
function hasExpandedChild(item) {
|
|
1002
|
+
if (!hasChildren(item)) {
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
for (const child of item.children) {
|
|
1006
|
+
if (getItemStateProp(child, 'expanded')) {
|
|
1007
|
+
return true;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
function canBeActive(item) {
|
|
1013
|
+
return isNavItemType(item, 'basic') || isNavItemType(item, 'link');
|
|
1014
|
+
}
|
|
1015
|
+
function canExpand(item) {
|
|
1016
|
+
return canHaveChildren(item);
|
|
1017
|
+
}
|
|
1018
|
+
function findLinkItems(items) {
|
|
1019
|
+
const linkItems = [];
|
|
1020
|
+
const _fn = (_items) => {
|
|
1021
|
+
for (const item of _items) {
|
|
1022
|
+
if (isNavItemType(item, 'link')) {
|
|
1023
|
+
linkItems.push(item);
|
|
1024
|
+
}
|
|
1025
|
+
if (canHaveChildren(item) && hasProperty(item, 'children')) {
|
|
1026
|
+
_fn(item.children);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
_fn(items);
|
|
1031
|
+
return linkItems;
|
|
1032
|
+
}
|
|
1033
|
+
function setItemStateProp(item, prop, value) {
|
|
1034
|
+
if (hasProperty(item, '__state')) {
|
|
1035
|
+
item.__state[prop] = value;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
function getItemStateProp(item, prop) {
|
|
1039
|
+
return setDefaultState(item).__state[prop];
|
|
1040
|
+
}
|
|
1041
|
+
function setDefaultState(item) {
|
|
1042
|
+
if (hasProperty(item, '__state')) {
|
|
1043
|
+
return item;
|
|
1044
|
+
}
|
|
1045
|
+
item.__state = {
|
|
1046
|
+
active: false,
|
|
1047
|
+
expanded: false
|
|
1048
|
+
};
|
|
1049
|
+
// TODO: See if there is a nice way to fix the typing for this.
|
|
1050
|
+
return item;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
class TheSeamSideNavService {
|
|
1054
|
+
constructor(_router) {
|
|
1055
|
+
this._router = _router;
|
|
1056
|
+
this._updatingCount = new BehaviorSubject(0);
|
|
1057
|
+
this.itemChanged = new Subject();
|
|
1058
|
+
this.loading$ = this._updatingCount.pipe(map(count => count > 0), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1059
|
+
}
|
|
1060
|
+
createItemsObservable(items) {
|
|
1061
|
+
return defer(() => {
|
|
1062
|
+
this.updateItemsStates(items);
|
|
1063
|
+
return new Observable((subscriber) => {
|
|
1064
|
+
const stateChangeSub = this.itemChanged.pipe(switchMap(() => this.loading$.pipe(filter(loading => !loading)))).subscribe(() => {
|
|
1065
|
+
subscriber.next(items);
|
|
1066
|
+
});
|
|
1067
|
+
try {
|
|
1068
|
+
this.updateItemsStates(items);
|
|
1069
|
+
}
|
|
1070
|
+
catch (err) {
|
|
1071
|
+
subscriber.error(err);
|
|
1072
|
+
}
|
|
1073
|
+
// const linkItems = findLinkItems(items)
|
|
1074
|
+
const routeChangeSub = this._router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => {
|
|
1075
|
+
try {
|
|
1076
|
+
this.updateItemsStates(items);
|
|
1077
|
+
}
|
|
1078
|
+
catch (err) {
|
|
1079
|
+
subscriber.error(err);
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
return () => {
|
|
1083
|
+
stateChangeSub.unsubscribe();
|
|
1084
|
+
routeChangeSub.unsubscribe();
|
|
1085
|
+
};
|
|
1086
|
+
}).pipe(startWith(items));
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
_incUpdatingCount() {
|
|
1090
|
+
this._updatingCount.next(this._updatingCount.value + 1);
|
|
1091
|
+
}
|
|
1092
|
+
_decrUpdatingCount() {
|
|
1093
|
+
this._updatingCount.next(this._updatingCount.value - 1);
|
|
1094
|
+
}
|
|
1095
|
+
updateItemsStates(items) {
|
|
1096
|
+
this._incUpdatingCount();
|
|
1097
|
+
try {
|
|
1098
|
+
for (const item of items) {
|
|
1099
|
+
if (hasChildren(item)) {
|
|
1100
|
+
this.updateItemsStates(item.children);
|
|
1101
|
+
}
|
|
1102
|
+
this.updateItemState(item);
|
|
1103
|
+
}
|
|
1104
|
+
this._decrUpdatingCount();
|
|
1105
|
+
}
|
|
1106
|
+
catch (err) {
|
|
1107
|
+
this._decrUpdatingCount();
|
|
1108
|
+
throw err;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
updateItemState(item) {
|
|
1112
|
+
this._incUpdatingCount();
|
|
1113
|
+
try {
|
|
1114
|
+
setDefaultState(item);
|
|
1115
|
+
if (isNavItemType(item, 'link')) {
|
|
1116
|
+
const url = this._getUrl(item);
|
|
1117
|
+
if (notNullOrUndefined(url)) {
|
|
1118
|
+
const opts = this._getMatchOptions(item);
|
|
1119
|
+
this.setItemStateProp(item, 'active', this._router.isActive(url, opts));
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
// TODO: Implement this in a more optimized way. Unless our apps start
|
|
1123
|
+
// having large side-navs constantly updating their state, this shouldn't
|
|
1124
|
+
// have much impact on performance.
|
|
1125
|
+
this._updateItemExpandedState(item);
|
|
1126
|
+
this._decrUpdatingCount();
|
|
1127
|
+
}
|
|
1128
|
+
catch (err) {
|
|
1129
|
+
this._decrUpdatingCount();
|
|
1130
|
+
throw err;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
_updateItemsExpandedState(items) {
|
|
1134
|
+
for (const item of items) {
|
|
1135
|
+
if (hasChildren(item)) {
|
|
1136
|
+
this._updateItemsExpandedState(item.children);
|
|
1137
|
+
}
|
|
1138
|
+
this._updateItemExpandedState(item);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
_updateItemExpandedState(item) {
|
|
1142
|
+
if (!canExpand(item)) {
|
|
1143
|
+
if (getItemStateProp(item, 'expanded')) {
|
|
1144
|
+
this.setItemStateProp(item, 'expanded', false);
|
|
1145
|
+
}
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
if (hasChildren(item)) {
|
|
1149
|
+
this._updateItemsExpandedState(item.children);
|
|
1150
|
+
}
|
|
1151
|
+
if (hasActiveChild(item) || hasExpandedChild(item)) {
|
|
1152
|
+
if (!getItemStateProp(item, 'expanded')) {
|
|
1153
|
+
this.setItemStateProp(item, 'expanded', true);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
if (getItemStateProp(item, 'expanded')) {
|
|
1158
|
+
this.setItemStateProp(item, 'expanded', false);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
_getNavExtras(item) {
|
|
1163
|
+
const navigationExtras = {};
|
|
1164
|
+
if (hasProperty(item, 'queryParams')) {
|
|
1165
|
+
navigationExtras.queryParams = item.queryParams;
|
|
1166
|
+
}
|
|
1167
|
+
if (hasProperty(item, 'fragment')) {
|
|
1168
|
+
navigationExtras.fragment = item.fragment;
|
|
1169
|
+
}
|
|
1170
|
+
if (hasProperty(item, 'queryParamsHandling')) {
|
|
1171
|
+
navigationExtras.queryParamsHandling = item.queryParamsHandling;
|
|
1172
|
+
}
|
|
1173
|
+
if (hasProperty(item, 'preserveFragment')) {
|
|
1174
|
+
navigationExtras.preserveFragment = item.preserveFragment;
|
|
1175
|
+
}
|
|
1176
|
+
return navigationExtras;
|
|
1177
|
+
}
|
|
1178
|
+
_getUrl(item) {
|
|
1179
|
+
const link = item.link;
|
|
1180
|
+
if (typeof link === 'string') {
|
|
1181
|
+
return this._router.createUrlTree([link], this._getNavExtras(item)).toString();
|
|
1182
|
+
}
|
|
1183
|
+
else if (Array.isArray(link)) {
|
|
1184
|
+
return this._router.createUrlTree(link, this._getNavExtras(item)).toString();
|
|
1185
|
+
}
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
_getMatchOptions(item) {
|
|
1189
|
+
const defaultMatchOpts = {
|
|
1190
|
+
paths: 'subset',
|
|
1191
|
+
queryParams: 'subset',
|
|
1192
|
+
fragment: 'ignored',
|
|
1193
|
+
matrixParams: 'ignored'
|
|
1194
|
+
};
|
|
1195
|
+
if (hasProperty(item, 'matchOptions')) {
|
|
1196
|
+
return Object.assign(Object.assign({}, defaultMatchOpts), item.matchOptions);
|
|
1197
|
+
}
|
|
1198
|
+
return defaultMatchOpts;
|
|
1199
|
+
}
|
|
1200
|
+
setItemStateProp(item, prop, value) {
|
|
1201
|
+
const currentValue = getItemStateProp(item, prop);
|
|
1202
|
+
if (currentValue !== value) {
|
|
1203
|
+
setItemStateProp(item, prop, value);
|
|
1204
|
+
const changed = {
|
|
1205
|
+
item,
|
|
1206
|
+
prop,
|
|
1207
|
+
prevValue: currentValue,
|
|
1208
|
+
newValue: value
|
|
1209
|
+
};
|
|
1210
|
+
this.itemChanged.next(changed);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
TheSeamSideNavService.decorators = [
|
|
1215
|
+
{ type: Injectable }
|
|
1216
|
+
];
|
|
1217
|
+
TheSeamSideNavService.ctorParameters = () => [
|
|
1218
|
+
{ type: Router }
|
|
1219
|
+
];
|
|
1220
|
+
|
|
1221
|
+
const EXPANDED_STATE$1 = 'expanded';
|
|
1222
|
+
const COLLAPSED_STATE$1 = 'collapsed';
|
|
1223
|
+
const EXPANDED_OVERLAY_STATE = 'expanded-overlay';
|
|
1224
|
+
const COLLAPSED_OVERLAY_STATE = 'collapsed-overlay';
|
|
1225
|
+
const EXPANDED_STATES = [EXPANDED_STATE$1, EXPANDED_OVERLAY_STATE];
|
|
1226
|
+
const COLLAPSED_STATES = [COLLAPSED_STATE$1, COLLAPSED_OVERLAY_STATE];
|
|
1227
|
+
const EXPAND_STATES = [...EXPANDED_STATES, ...COLLAPSED_STATES];
|
|
1228
|
+
function sideNavExpandStateChangeFn(fromState, toState) {
|
|
1229
|
+
// console.log({ fromState, toState })
|
|
1230
|
+
return fromState !== toState &&
|
|
1231
|
+
(
|
|
1232
|
+
// NOTE: The current way the side nav is being used it causes the
|
|
1233
|
+
// component to sometimes get placed in the wrong location initially. It
|
|
1234
|
+
// is fast enough to not be noticed without an initial animation usually,
|
|
1235
|
+
// so it is commented out below until the initial placement issue it
|
|
1236
|
+
// fixed.
|
|
1237
|
+
//
|
|
1238
|
+
// (
|
|
1239
|
+
// fromState === 'void' && EXPAND_STATES.indexOf(toState) !== -1
|
|
1240
|
+
// ||
|
|
1241
|
+
// toState === 'void' && EXPAND_STATES.indexOf(fromState) !== -1
|
|
1242
|
+
// )
|
|
1243
|
+
// ||
|
|
1244
|
+
((EXPANDED_STATES.indexOf(fromState) !== -1 && COLLAPSED_STATES.indexOf(toState) !== -1)
|
|
1245
|
+
||
|
|
1246
|
+
(EXPANDED_STATES.indexOf(toState) !== -1 && COLLAPSED_STATES.indexOf(fromState) !== -1)));
|
|
1247
|
+
}
|
|
1248
|
+
class SideNavComponent {
|
|
1249
|
+
constructor(_layout, _sideNav, _baseLayoutRef) {
|
|
1250
|
+
this._layout = _layout;
|
|
1251
|
+
this._sideNav = _sideNav;
|
|
1252
|
+
this._baseLayoutRef = _baseLayoutRef;
|
|
1253
|
+
this._ngUnsubscribe = new Subject();
|
|
1254
|
+
// @HostBinding('@sideNavExpand') _sideNavExpand = EXPANDED_STATE
|
|
1255
|
+
// _sideNavExpand = EXPANDED_STATE
|
|
1256
|
+
// @HostBinding('@sideNavAnim') _sideNavExpand = EXPANDED_STATE
|
|
1257
|
+
this._sideNavExpand = 'initial';
|
|
1258
|
+
this.hasHeaderToggle = true;
|
|
1259
|
+
this._items = new BehaviorSubject([]);
|
|
1260
|
+
this._expanded = new BehaviorSubject(true);
|
|
1261
|
+
this.expanded$ = this._expanded.asObservable();
|
|
1262
|
+
this._overlay = new BehaviorSubject(false);
|
|
1263
|
+
this.overlay$ = this._overlay.asObservable();
|
|
1264
|
+
this._backdropHidden = new BehaviorSubject(true);
|
|
1265
|
+
this.items$ = this._items.asObservable().pipe(switchMap(items => this._sideNav.createItemsObservable(items)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1266
|
+
this.isMobile$ = this._layout.isMobile$.pipe(tap(isMobile => isMobile && this.collapse()));
|
|
1267
|
+
this.sideNavExpandedState$ = combineLatest([this.expanded$, this.overlay$]).pipe(map(([expanded, overlay]) => expanded
|
|
1268
|
+
? overlay ? EXPANDED_OVERLAY_STATE : EXPANDED_STATE$1
|
|
1269
|
+
: overlay ? COLLAPSED_OVERLAY_STATE : COLLAPSED_STATE$1), distinctUntilChanged());
|
|
1270
|
+
}
|
|
1271
|
+
get items() { return this._items.value; }
|
|
1272
|
+
set items(value) { this._items.next(value); }
|
|
1273
|
+
get expanded() { return this._expanded.value; }
|
|
1274
|
+
set expanded(value) { this._expanded.next(coerceBooleanProperty(value)); }
|
|
1275
|
+
get overlay() { return this._overlay.value; }
|
|
1276
|
+
set overlay(value) { this._overlay.next(coerceBooleanProperty(value)); }
|
|
1277
|
+
ngOnInit() {
|
|
1278
|
+
if (this._baseLayoutRef) {
|
|
1279
|
+
this._baseLayoutRef.registerNav(this);
|
|
1280
|
+
}
|
|
1281
|
+
this.isMobile$
|
|
1282
|
+
.pipe(takeUntil(this._ngUnsubscribe))
|
|
1283
|
+
.subscribe(b => this.overlay = b);
|
|
1284
|
+
this.sideNavExpandedState$
|
|
1285
|
+
.pipe(takeUntil(this._ngUnsubscribe))
|
|
1286
|
+
.subscribe(v => this._sideNavExpand = v);
|
|
1287
|
+
}
|
|
1288
|
+
ngOnDestroy() {
|
|
1289
|
+
this._ngUnsubscribe.next();
|
|
1290
|
+
this._ngUnsubscribe.complete();
|
|
1291
|
+
if (this._baseLayoutRef) {
|
|
1292
|
+
this._baseLayoutRef.unregisterNav(this);
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
expand() {
|
|
1296
|
+
this.expanded = true;
|
|
1297
|
+
}
|
|
1298
|
+
collapse() {
|
|
1299
|
+
this.expanded = false;
|
|
1300
|
+
}
|
|
1301
|
+
toggle() {
|
|
1302
|
+
this.expanded = !this.expanded;
|
|
1303
|
+
}
|
|
1304
|
+
animateStart() {
|
|
1305
|
+
if (this.expanded) {
|
|
1306
|
+
this._backdropHidden.next(false);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
animateEnd() {
|
|
1310
|
+
if (!this.expanded) {
|
|
1311
|
+
this._backdropHidden.next(true);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
SideNavComponent.decorators = [
|
|
1316
|
+
{ type: Component, args: [{
|
|
1317
|
+
selector: 'seam-side-nav',
|
|
1318
|
+
template: "<div class=\"side-nav-backdrop\" *ngIf=\"isMobile$ | async\"\n [@sideNavBackdrop]=\"_sideNavExpand\"\n [class.side-nav-backdrop-hidden]=\"_backdropHidden | async\"></div>\n\n<div class=\"side-nav-inner-wrapper\" [@sideNavExpand]=\"_sideNavExpand\"\n (@sideNavExpand.start)=\"animateStart()\"\n (@sideNavExpand.done)=\"animateEnd()\">\n <nav class=\"nav side-nav-content\">\n <seam-side-nav-toggle *ngIf=\"hasHeaderToggle\"\n [expanded]=\"expanded$ | async\"\n (toggleExpand)=\"toggle()\">\n </seam-side-nav-toggle>\n <div class=\"side-nav-items-container\" seamOverlayScrollbar>\n <seam-side-nav-item *ngFor=\"let item of items$ | async\"\n [compact]=\"!(expanded$ | async)\"\n [itemType]=\"$any(item)?.itemType\"\n [icon]=\"$any(item)?.icon\"\n [label]=\"$any(item)?.label\"\n [link]=\"$any(item)?.link\"\n [badgeText]=\"$any(item)?.badge?.text\"\n [badgeTheme]=\"$any(item)?.badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(item)?.badge?.srContent\"\n [badgeTooltip]=\"$any(item)?.badge?.tooltip\"\n [queryParams]=\"$any(item)?.queryParams\"\n [children]=\"$any(item)?.children\"\n [active]=\"$any(item).__state.active\"\n [expanded]=\"$any(item).__state.expanded\">\n </seam-side-nav-item>\n </div>\n </nav>\n</div>\n",
|
|
1319
|
+
providers: [
|
|
1320
|
+
TheSeamSideNavService
|
|
1321
|
+
],
|
|
1322
|
+
animations: [
|
|
1323
|
+
//
|
|
1324
|
+
// TODO: This animation code turned into a mess. Clean it up and make it
|
|
1325
|
+
// more smooth.
|
|
1326
|
+
//
|
|
1327
|
+
trigger('sideNavAnim', [
|
|
1328
|
+
transition(sideNavExpandStateChangeFn, [
|
|
1329
|
+
group([
|
|
1330
|
+
query('@sideNavBackdrop', animateChild(), { optional: true }),
|
|
1331
|
+
query('@sideNavExpand', animateChild(), { optional: true }),
|
|
1332
|
+
]),
|
|
1333
|
+
]),
|
|
1334
|
+
]),
|
|
1335
|
+
trigger('sideNavBackdrop', [
|
|
1336
|
+
state(EXPANDED_OVERLAY_STATE, style({ opacity: '1' })),
|
|
1337
|
+
state(COLLAPSED_OVERLAY_STATE, style({ opacity: '0' })),
|
|
1338
|
+
// transition((fromState, toState, element, params) => {
|
|
1339
|
+
// console.log('sideNavBackdrop v', fromState, toState, element, params)
|
|
1340
|
+
// return false
|
|
1341
|
+
// }, []),
|
|
1342
|
+
transition(sideNavExpandStateChangeFn, animate('0.2s ease-in-out')),
|
|
1343
|
+
]),
|
|
1344
|
+
trigger('sideNavExpand', [
|
|
1345
|
+
// TODO: Make width configurable.
|
|
1346
|
+
state(EXPANDED_STATE$1, style({ width: '260px' })),
|
|
1347
|
+
state(COLLAPSED_STATE$1, style({ width: '50px', 'overflow-x': 'hidden' })),
|
|
1348
|
+
state(EXPANDED_OVERLAY_STATE, style({
|
|
1349
|
+
position: 'absolute',
|
|
1350
|
+
top: 0,
|
|
1351
|
+
height: '100%',
|
|
1352
|
+
bottom: 0,
|
|
1353
|
+
left: 0,
|
|
1354
|
+
float: 'left',
|
|
1355
|
+
zIndex: '9999',
|
|
1356
|
+
width: 'calc(100vw - 50px)',
|
|
1357
|
+
transform: 'translateX(0)'
|
|
1358
|
+
})),
|
|
1359
|
+
state(COLLAPSED_OVERLAY_STATE, style({
|
|
1360
|
+
position: 'absolute',
|
|
1361
|
+
top: 0,
|
|
1362
|
+
height: '100%',
|
|
1363
|
+
bottom: 0,
|
|
1364
|
+
left: 0,
|
|
1365
|
+
float: 'left',
|
|
1366
|
+
zIndex: '9999',
|
|
1367
|
+
width: 'calc(100vw - 50px)',
|
|
1368
|
+
transform: 'translateX(calc(-100vw + 50px))',
|
|
1369
|
+
'overflow-x': 'hidden'
|
|
1370
|
+
})),
|
|
1371
|
+
// transition(`${EXPANDED_STATE} <=> ${COLLAPSED_STATE}`, animate('0.2s ease-in-out')),
|
|
1372
|
+
transition(sideNavExpandStateChangeFn, animate('0.2s ease-in-out')),
|
|
1373
|
+
// transition(`${EXPANDED_STATE} <=> ${COLLAPSED_STATE}`, [
|
|
1374
|
+
// // query(':leave', animateChild(), { optional: true }),
|
|
1375
|
+
// // query(':enter', animateChild(), { optional: true }),
|
|
1376
|
+
// group([
|
|
1377
|
+
// query(':leave', animateChild(), { optional: true }),
|
|
1378
|
+
// query(':enter', animateChild(), { optional: true }),
|
|
1379
|
+
// query('@compactAnim', animateChild(), { optional: true }),
|
|
1380
|
+
// animate('5.2s ease-in-out')
|
|
1381
|
+
// ])
|
|
1382
|
+
// ]),
|
|
1383
|
+
])
|
|
1384
|
+
],
|
|
1385
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1386
|
+
encapsulation: ViewEncapsulation.None,
|
|
1387
|
+
styles: [".seam-side-nav,seam-side-nav{display:block;height:100%;position:relative;z-index:2;overflow:hidden}.seam-side-nav .side-nav-inner-wrapper,seam-side-nav .side-nav-inner-wrapper{background:#357ebd;height:100%}.seam-side-nav .side-nav-backdrop,seam-side-nav .side-nav-backdrop{background:rgba(52,58,64,.6);width:100vw;height:100vh}.seam-side-nav .side-nav-backdrop.side-nav-backdrop-hidden,seam-side-nav .side-nav-backdrop.side-nav-backdrop-hidden{display:none;width:0;height:0;padding:0;margin:0}.seam-side-nav .side-nav-content,seam-side-nav .side-nav-content{display:flex;flex-direction:column;height:100%;flex-wrap:nowrap}.seam-side-nav .side-nav-items-container,seam-side-nav .side-nav-items-container{display:flex;flex-direction:column;width:100%;flex:1 1 100%}"]
|
|
1388
|
+
},] }
|
|
1389
|
+
];
|
|
1390
|
+
SideNavComponent.ctorParameters = () => [
|
|
1391
|
+
{ type: TheSeamLayoutService },
|
|
1392
|
+
{ type: TheSeamSideNavService },
|
|
1393
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [THESEAM_BASE_LAYOUT_REF,] }] }
|
|
1394
|
+
];
|
|
1395
|
+
SideNavComponent.propDecorators = {
|
|
1396
|
+
_sideNavExpand: [{ type: HostBinding, args: ['@sideNavAnim',] }],
|
|
1397
|
+
hasHeaderToggle: [{ type: Input }],
|
|
1398
|
+
items: [{ type: Input }],
|
|
1399
|
+
expanded: [{ type: Input }],
|
|
1400
|
+
overlay: [{ type: Input }]
|
|
1401
|
+
};
|
|
1402
|
+
__decorate([
|
|
1403
|
+
InputBoolean()
|
|
1404
|
+
], SideNavComponent.prototype, "hasHeaderToggle", void 0);
|
|
1405
|
+
|
|
1406
|
+
const EXPANDED_STATE = 'expanded';
|
|
1407
|
+
const COLLAPSED_STATE = 'collapsed';
|
|
1408
|
+
const FULL_STATE = 'full';
|
|
1409
|
+
const COMPACT_STATE = 'compact';
|
|
1410
|
+
class SideNavItemComponent {
|
|
1411
|
+
constructor(_sideNav, _parent) {
|
|
1412
|
+
this._sideNav = _sideNav;
|
|
1413
|
+
this._parent = _parent;
|
|
1414
|
+
this._ngUnsubscribe = new Subject();
|
|
1415
|
+
this.faAngleLeft = faAngleLeft;
|
|
1416
|
+
this.active = false;
|
|
1417
|
+
this._link = new BehaviorSubject(undefined);
|
|
1418
|
+
this.link$ = this._link.asObservable();
|
|
1419
|
+
this.hierLevel = 0;
|
|
1420
|
+
this.indentSize = 10;
|
|
1421
|
+
this._expanded = new BehaviorSubject(false);
|
|
1422
|
+
this.expanded$ = this._expanded.asObservable();
|
|
1423
|
+
this._compact = new BehaviorSubject(false);
|
|
1424
|
+
this.compact$ = this._compact.asObservable();
|
|
1425
|
+
this.badgeTheme = 'danger';
|
|
1426
|
+
this.childGroupAnimState$ = this.expanded$
|
|
1427
|
+
.pipe(map(expanded => expanded ? EXPANDED_STATE : COLLAPSED_STATE));
|
|
1428
|
+
this.compactAnimState$ = this.compact$
|
|
1429
|
+
.pipe(map(compact => compact ? COMPACT_STATE : FULL_STATE));
|
|
1430
|
+
}
|
|
1431
|
+
set link(value) { this._link.next(value); }
|
|
1432
|
+
get link() { return this._link.value; }
|
|
1433
|
+
set expanded(value) { this._expanded.next(coerceBooleanProperty(value)); }
|
|
1434
|
+
get expanded() { return this._expanded.value; }
|
|
1435
|
+
set compact(value) { this._compact.next(coerceBooleanProperty(value)); }
|
|
1436
|
+
get compact() { return this._compact.value; }
|
|
1437
|
+
get badgeTooltip() { return this._badgeTooltip; }
|
|
1438
|
+
set badgeTooltip(value) {
|
|
1439
|
+
if (value !== null && value !== undefined) {
|
|
1440
|
+
if (typeof value === 'string') {
|
|
1441
|
+
this._badgeTooltip = {
|
|
1442
|
+
tooltip: value,
|
|
1443
|
+
placement: 'auto',
|
|
1444
|
+
disabled: false
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
else {
|
|
1448
|
+
this._badgeTooltip = Object.assign(Object.assign({}, value), { placement: value.placement || 'auto', disabled: typeof (value === null || value === void 0 ? void 0 : value.disabled) === 'boolean'
|
|
1449
|
+
? value.disabled
|
|
1450
|
+
: typeof value.tooltip === 'string' ? false : true });
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
else {
|
|
1454
|
+
this._badgeTooltip = undefined;
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
get _isActiveCssClass() { return this.active; }
|
|
1458
|
+
get _attrDataHierLevel() { return this.hierLevel; }
|
|
1459
|
+
ngOnDestroy() {
|
|
1460
|
+
this._ngUnsubscribe.next();
|
|
1461
|
+
this._ngUnsubscribe.complete();
|
|
1462
|
+
}
|
|
1463
|
+
get hasChildren() {
|
|
1464
|
+
return Array.isArray(this.children) && this.children.length > 0;
|
|
1465
|
+
}
|
|
1466
|
+
toggleChildren() {
|
|
1467
|
+
this.expanded = !this.expanded;
|
|
1468
|
+
}
|
|
1469
|
+
_linkClicked() {
|
|
1470
|
+
// Close nav when link is clicked while in overlay state
|
|
1471
|
+
if (this._sideNav.overlay) {
|
|
1472
|
+
this._sideNav.collapse();
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
SideNavItemComponent.decorators = [
|
|
1477
|
+
{ type: Component, args: [{
|
|
1478
|
+
selector: 'seam-side-nav-item',
|
|
1479
|
+
template: "<div class=\"d-flex flex-row\">\n <ng-container *ngIf=\"itemType === 'basic'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeBasic\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'link'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeLink\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'divider'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeDivider\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'title'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeTitle\"></ng-template>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"hasChildren\">\n <div class=\"side-nav--group side-nav--group--level-{{ hierLevel + 1 }}\"\n [@childGroupAnim]=\"childGroupAnimState$ | async\">\n <seam-side-nav-item *ngFor=\"let child of children\"\n [hierLevel]=\"compact ? 0 : (hierLevel + 1)\"\n [compact]=\"compact\"\n [itemType]=\"$any(child).itemType\"\n [icon]=\"$any(child).icon\"\n [label]=\"$any(child).label\"\n [link]=\"$any(child).link\"\n [badgeText]=\"$any(child).badge?.text\"\n [badgeTheme]=\"$any(child).badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(child).badge?.srContent\"\n [queryParams]=\"$any(child).queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n [children]=\"$any(child)?.children\"\n [active]=\"$any(child).__state.active\"\n [expanded]=\"$any(child).__state.expanded\">\n </seam-side-nav-item>\n </div>\n</ng-container>\n\n<ng-template #itemTypeBasic>\n <button class=\"side-nav-item btn side-nav-btn p-0 d-flex flex-row rounded-0 text-decoration-none text-nowrap w-100\"\n cdkMonitorElementFocus\n (click)=\"toggleChildren()\"\n [attr.aria-expanded]=\"expanded\">\n <div class=\"nav-link d-flex flex-row w-100\" [class.pr-0]=\"compact\">\n <div [style.padding-left.px]=\"hierLevel * indentSize\"></div>\n <div class=\"side-nav-item--icon\">\n <seam-icon *ngIf=\"icon\" [icon]=\"icon\"></seam-icon>\n <ng-container *ngIf=\"compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n <!-- NOTE: This is temporarily formatted oddly while fixing animation. -->\n <span style=\"margin-left: 11px;\" [@compactAnim]=\"compactAnimState$ | async\">\n <span *ngIf=\"!compact\" side-nav-item-label>\n {{ label }}\n </span>\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" side-nav-item-label>{{ label }}</span>\n <ng-container *ngIf=\"!compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n\n <div *ngIf=\"hasChildren && !compact\"\n class=\"btn side-nav-btn side-nav-item--toggle-btn-container rounded-0\">\n <seam-icon\n class=\"side-nav-item--toggle-btn\"\n [class.side-nav-item--toggle-btn-expanded]=\"expanded\"\n [icon]=\"faAngleLeft\"\n type>\n </seam-icon>\n </div>\n </button>\n</ng-template>\n\n<ng-template #itemTypeLink>\n <a *ngIf=\"link; else noLink\" class=\"side-nav-item nav-link d-flex flex-row text-nowrap w-100 align-items-center\"\n [class.pr-0]=\"compact\"\n [routerLink]=\"link\"\n [queryParams]=\"queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n (click)=\"_linkClicked()\">\n <div [style.padding-left.px]=\"hierLevel * indentSize\"></div>\n <div class=\"side-nav-item--icon\">\n <seam-icon *ngIf=\"icon\" [icon]=\"icon\"></seam-icon>\n <ng-container *ngIf=\"compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n <span *ngIf=\"!compact\" style=\"margin-left: 11px;\" side-nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" side-nav-item-label>{{ label }}</span>\n <ng-container *ngIf=\"!compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </a>\n\n <ng-template #noLink>\n <a class=\"side-nav-item nav-link d-flex flex-row text-nowrap w-100 align-items-center\" [class.pr-0]=\"compact\">\n <div [style.padding-left.px]=\"hierLevel * indentSize\"></div>\n <div class=\"side-nav-item--icon\">\n <seam-icon *ngIf=\"icon\" [icon]=\"icon\"></seam-icon>\n </div>\n <span *ngIf=\"!compact\" style=\"margin-left: 11px;\" side-nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" side-nav-item-label>{{ label }}</span>\n </a>\n </ng-template>\n\n <button *ngIf=\"hasChildren && !compact\"\n type=\"button\"\n class=\"btn side-nav-btn side-nav-item--toggle-btn-container rounded-0\"\n (click)=\"toggleChildren()\"\n [attr.aria-expanded]=\"expanded\"\n cdkMonitorElementFocus>\n <seam-icon\n class=\"side-nav-item--toggle-btn\"\n [class.side-nav-item--toggle-btn-expanded]=\"expanded\"\n [icon]=\"faAngleLeft\"\n type>\n </seam-icon>\n <span class=\"sr-only\">Group Toggle</span>\n </button>\n</ng-template>\n\n<ng-template #itemTypeDivider>\n <div class=\"px-2 w-100\">\n <hr class=\"side-nav-item--divider\" />\n </div>\n</ng-template>\n\n<ng-template #itemTypeTitle>\n <ng-container *ngIf=\"!compact\">\n <span class=\"side-nav-item--title pt-1\" side-nav-item-label>{{ label }}</span>\n </ng-container>\n</ng-template>\n\n<ng-template #itemBadge>\n <div *ngIf=\"badgeText\"\n class=\"side-nav-item--badge\"\n [class.side-nav-item--badge-no-icon]=\"!icon\"\n [ngbTooltip]=\"$any(badgeTooltip)?.tooltip\"\n [tooltipClass]=\"$any(badgeTooltip)?.class\"\n [placement]=\"$any(badgeTooltip)?.placement\"\n [container]=\"$any(badgeTooltip)?.container\"\n [disableTooltip]=\"!badgeTooltip || !!$any(badgeTooltip)?.disabled\">\n <span class=\"badge badge-pill badge-{{ badgeTheme }}\">\n {{ badgeText }}\n <span *ngIf=\"badgeSrContent\">{{ badgeSrContent }}</span>\n </span>\n </div>\n</ng-template>\n",
|
|
1480
|
+
exportAs: 'seamSideNavItem',
|
|
1481
|
+
animations: [
|
|
1482
|
+
trigger('childGroupAnim', [
|
|
1483
|
+
state(EXPANDED_STATE, style({ height: '*' })),
|
|
1484
|
+
state(COLLAPSED_STATE, style({ height: 0, 'overflow-y': 'hidden', visibility: 'hidden' })),
|
|
1485
|
+
transition(`${EXPANDED_STATE} <=> ${COLLAPSED_STATE}`, animate('0.2s ease-in-out')),
|
|
1486
|
+
]),
|
|
1487
|
+
trigger('compactAnim', [
|
|
1488
|
+
// transition('* <=> *', [
|
|
1489
|
+
// query(':enter', [
|
|
1490
|
+
// style({ opacity: '0' }),
|
|
1491
|
+
// animate('5.2s ease-in-out', style({ opacity: '1' }))
|
|
1492
|
+
// ], { optional: true }),
|
|
1493
|
+
// query(':leave', [
|
|
1494
|
+
// style({ opacity: '1' }),
|
|
1495
|
+
// animate('5.2s ease-in-out', style({ opacity: '0' }))
|
|
1496
|
+
// ], { optional: true })
|
|
1497
|
+
// ])
|
|
1498
|
+
// state(FULL_STATE, style({ opacity: '1' })),
|
|
1499
|
+
// state(COMPACT_STATE, style({ opacity: '0' })),
|
|
1500
|
+
// transition(`${FULL_STATE} <=> ${COMPACT_STATE}`, animate('5.2s ease-in-out')),
|
|
1501
|
+
// transition(`${FULL_STATE} <=> ${COMPACT_STATE}`, [
|
|
1502
|
+
// transition('* <=> *', [
|
|
1503
|
+
// query(':leave', [
|
|
1504
|
+
// style({ opacity: '1' }),
|
|
1505
|
+
// animate('5.2s ease-in-out', style({ opacity: '0' }))
|
|
1506
|
+
// ], { optional: true })
|
|
1507
|
+
// ]),
|
|
1508
|
+
])
|
|
1509
|
+
],
|
|
1510
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1511
|
+
encapsulation: ViewEncapsulation.None,
|
|
1512
|
+
styles: ["seam-side-nav-item{display:block;transition:background-color .25s ease-in-out}seam-side-nav-item.seam-side-nav-item--active,seam-side-nav-item.seam-side-nav-item--active .active,seam-side-nav-item.seam-side-nav-item--active:active{background-color:#2a6395}seam-side-nav-item.seam-side-nav-item--active .side-nav-item:hover{background-color:#2f71a9}seam-side-nav-item.seam-side-nav-item--active .nav-link{color:#fff}seam-side-nav-item:not(.side-nav-item--icon) .side-nav-item--badge{top:-10px;position:relative;margin-left:5px}seam-side-nav-item .side-nav-item--icon{width:24px;max-width:24px;min-width:24px;height:24px;max-height:24px;min-height:24px;text-align:center}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge{top:-35px;right:-12px;position:relative}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge.side-nav-item--badge-no-icon{top:-13px}seam-side-nav-item .side-nav-item{min-height:45px;transition:background-color .25s ease-in-out}seam-side-nav-item .side-nav-item:hover{background-color:#2f71a9}seam-side-nav-item .side-nav-item.active{pointer-events:none;cursor:default}seam-side-nav-item a.side-nav-item:not([href]):not([tabindex]){color:#ccc}seam-side-nav-item a.side-nav-item:not([href]):not([tabindex]):hover{background-color:transparent}seam-side-nav-item .nav-link{color:#fff}seam-side-nav-item .side-nav-btn{font-weight:400;color:#fff;text-decoration:none}seam-side-nav-item .side-nav-btn:hover{color:#2f71a9;text-decoration:underline}seam-side-nav-item .side-nav-btn.focus,seam-side-nav-item .side-nav-btn:focus{text-decoration:underline;box-shadow:none}seam-side-nav-item .side-nav-btn.disabled,seam-side-nav-item .side-nav-btn:disabled{color:#ccc;pointer-events:none}seam-side-nav-item .cdk-keyboard-focused{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}seam-side-nav-item .side-nav-item--toggle-btn-container{transition:background-color .25s ease-in-out;padding:.5rem 1rem}seam-side-nav-item button.side-nav-item--toggle-btn-container:hover{background-color:#2f71a9}seam-side-nav-item .side-nav-item--toggle-btn{color:#fff}seam-side-nav-item .side-nav-item--toggle-btn .svg-inline--fa{transition:transform .1s ease-in-out}seam-side-nav-item .side-nav-item--toggle-btn.side-nav-item--toggle-btn-expanded .svg-inline--fa{transform:rotate(-90deg)}seam-side-nav-item .side-nav--group{will-change:height;overflow:hidden}seam-side-nav-item .side-nav--group--level-1{background-color:#3276b1}seam-side-nav-item .side-nav--group--level-2{background-color:#2e6ea5}seam-side-nav-item .side-nav--group--level-3{background-color:#2b6699}seam-side-nav-item .side-nav--group--level-4{background-color:#285e8d}seam-side-nav-item .side-nav--group--level-5{background-color:#245681}seam-side-nav-item .side-nav--group--level-6{background-color:#214e75}seam-side-nav-item .side-nav--group--level-7{background-color:#1e4669}seam-side-nav-item .side-nav--group--level-8{background-color:#1a3e5d}seam-side-nav-item .side-nav--group--level-9{background-color:#173651}seam-side-nav-item .side-nav-item--divider{display:block;border-top:1px solid #2a6395;width:100%}seam-side-nav-item .side-nav-item--title{color:#fff;font-size:24px;padding-left:10px}"]
|
|
1513
|
+
},] }
|
|
1514
|
+
];
|
|
1515
|
+
SideNavItemComponent.ctorParameters = () => [
|
|
1516
|
+
{ type: SideNavComponent },
|
|
1517
|
+
{ type: SideNavItemComponent, decorators: [{ type: Optional }, { type: SkipSelf }, { type: Host }] }
|
|
1518
|
+
];
|
|
1519
|
+
SideNavItemComponent.propDecorators = {
|
|
1520
|
+
itemType: [{ type: Input }],
|
|
1521
|
+
icon: [{ type: Input }],
|
|
1522
|
+
label: [{ type: Input }],
|
|
1523
|
+
active: [{ type: Input }],
|
|
1524
|
+
link: [{ type: Input }],
|
|
1525
|
+
queryParams: [{ type: Input }],
|
|
1526
|
+
children: [{ type: Input }],
|
|
1527
|
+
hierLevel: [{ type: Input }],
|
|
1528
|
+
indentSize: [{ type: Input }],
|
|
1529
|
+
expanded: [{ type: Input }],
|
|
1530
|
+
compact: [{ type: Input }],
|
|
1531
|
+
badgeText: [{ type: Input }],
|
|
1532
|
+
badgeTheme: [{ type: Input }],
|
|
1533
|
+
badgeSrContent: [{ type: Input }],
|
|
1534
|
+
badgeTooltip: [{ type: Input }],
|
|
1535
|
+
_isActiveCssClass: [{ type: HostBinding, args: ['class.seam-side-nav-item--active',] }],
|
|
1536
|
+
_attrDataHierLevel: [{ type: HostBinding, args: ['attr.data-hier-level',] }]
|
|
1537
|
+
};
|
|
1538
|
+
__decorate([
|
|
1539
|
+
InputBoolean()
|
|
1540
|
+
], SideNavItemComponent.prototype, "active", void 0);
|
|
1541
|
+
__decorate([
|
|
1542
|
+
InputNumber(0)
|
|
1543
|
+
], SideNavItemComponent.prototype, "hierLevel", void 0);
|
|
1544
|
+
__decorate([
|
|
1545
|
+
InputNumber(10)
|
|
1546
|
+
], SideNavItemComponent.prototype, "indentSize", void 0);
|
|
1547
|
+
|
|
1548
|
+
class SideNavToggleComponent {
|
|
1549
|
+
constructor() {
|
|
1550
|
+
this.faBars = faBars;
|
|
1551
|
+
this.expanded = false;
|
|
1552
|
+
this.toggleExpand = new EventEmitter();
|
|
1553
|
+
}
|
|
1554
|
+
ngOnInit() { }
|
|
1555
|
+
toggle() {
|
|
1556
|
+
this.toggleExpand.emit();
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
SideNavToggleComponent.decorators = [
|
|
1560
|
+
{ type: Component, args: [{
|
|
1561
|
+
selector: 'seam-side-nav-toggle',
|
|
1562
|
+
template: "<div class=\"side-nav-toggle--content\" *ngIf=\"expanded\">\n <ng-content></ng-content>\n</div>\n<button seamIconBtn [icon]=\"faBars\"\n iconType=\"borderless-styled-square\"\n btnSize=\"sm\"\n class=\"side-nav-toggle--btn ml-1\"\n (click)=\"toggle()\">\n <span class=\"sr-only\">Toggle sidebar</span>\n</button>\n",
|
|
1563
|
+
host: {
|
|
1564
|
+
'[class.side-nav-toggle--compact]': '!expanded'
|
|
1565
|
+
},
|
|
1566
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1567
|
+
encapsulation: ViewEncapsulation.None,
|
|
1568
|
+
styles: ["seam-side-nav-toggle{display:flex;flex-direction:row;flex-shrink:0;position:relative;height:45px;width:100%}seam-side-nav-toggle .side-nav-toggle--content{flex:1 1 0}seam-side-nav-toggle .side-nav-toggle--btn{position:absolute;top:0;right:5px;color:#fff}seam-side-nav-toggle .side-nav-toggle--btn seam-icon{padding:5px}"]
|
|
1569
|
+
},] }
|
|
1570
|
+
];
|
|
1571
|
+
SideNavToggleComponent.ctorParameters = () => [];
|
|
1572
|
+
SideNavToggleComponent.propDecorators = {
|
|
1573
|
+
expanded: [{ type: Input }],
|
|
1574
|
+
toggleExpand: [{ type: Output }]
|
|
1575
|
+
};
|
|
1576
|
+
__decorate([
|
|
1577
|
+
InputBoolean()
|
|
1578
|
+
], SideNavToggleComponent.prototype, "expanded", void 0);
|
|
1579
|
+
|
|
1580
|
+
class TheSeamSideNavModule {
|
|
1581
|
+
}
|
|
1582
|
+
TheSeamSideNavModule.decorators = [
|
|
1583
|
+
{ type: NgModule, args: [{
|
|
1584
|
+
declarations: [
|
|
1585
|
+
SideNavItemComponent,
|
|
1586
|
+
SideNavComponent,
|
|
1587
|
+
SideNavToggleComponent
|
|
1588
|
+
],
|
|
1589
|
+
imports: [
|
|
1590
|
+
CommonModule,
|
|
1591
|
+
RouterModule,
|
|
1592
|
+
TheSeamIconModule,
|
|
1593
|
+
A11yModule,
|
|
1594
|
+
TheSeamScrollbarModule,
|
|
1595
|
+
TheSeamLayoutModule,
|
|
1596
|
+
NgbTooltipModule
|
|
1597
|
+
],
|
|
1598
|
+
exports: [
|
|
1599
|
+
SideNavItemComponent,
|
|
1600
|
+
SideNavComponent,
|
|
1601
|
+
SideNavToggleComponent
|
|
1602
|
+
]
|
|
1603
|
+
},] }
|
|
1604
|
+
];
|
|
1605
|
+
|
|
1606
|
+
class TopBarMenuButtonBase {
|
|
1607
|
+
}
|
|
1608
|
+
const _TopBarMenuButtonMixinBase = mixinDisabled(TopBarMenuButtonBase);
|
|
1609
|
+
class TopBarMenuButtonComponent extends _TopBarMenuButtonMixinBase {
|
|
1610
|
+
constructor() {
|
|
1611
|
+
super(...arguments);
|
|
1612
|
+
this.faAngleDown = faAngleDown;
|
|
1613
|
+
this.profileIcon = faUserCircle;
|
|
1614
|
+
this.compact = false;
|
|
1615
|
+
}
|
|
1616
|
+
get _hasCompactClass() { return this.compact; }
|
|
1617
|
+
get _hasPadding0Class() { return this.compact; }
|
|
1618
|
+
get _hasRoundedClass() { return this.compact; }
|
|
1619
|
+
get _hasBtnLinkClass() { return !this.compact; }
|
|
1620
|
+
ngOnInit() { }
|
|
1621
|
+
ngOnDestroy() { }
|
|
1622
|
+
}
|
|
1623
|
+
TopBarMenuButtonComponent.decorators = [
|
|
1624
|
+
{ type: Component, args: [{
|
|
1625
|
+
// tslint:disable-next-line:component-selector
|
|
1626
|
+
selector: 'button[seamTopBarMenuButton]',
|
|
1627
|
+
template: "<div class=\"d-flex flex-row\" *ngIf=\"!compact; else compactTpl\">\n <div class=\"text-left flex-grow-1 text-truncate\">\n <ng-template [ngTemplateOutlet]=\"$any(detailTpl)\"></ng-template>\n </div>\n <!-- Arrow Button -->\n <div class=\"pl-2 d-flex flex-column\">\n <div class=\"flex-grow-1\"></div>\n <seam-icon class=\"d-block\" [icon]=\"faAngleDown\"></seam-icon>\n <div class=\"flex-grow-1\"></div>\n </div>\n</div>\n<ng-template #compactTpl>\n <seam-icon [icon]=\"profileIcon\" iconType=\"borderless-styled-square\"></seam-icon>\n</ng-template>\n",
|
|
1628
|
+
exportAs: 'seamButton',
|
|
1629
|
+
// tslint:disable-next-line:use-input-property-decorator
|
|
1630
|
+
inputs: ['disabled'],
|
|
1631
|
+
// tslint:disable-next-line:use-host-property-decorator
|
|
1632
|
+
host: {
|
|
1633
|
+
'attr.type': 'button',
|
|
1634
|
+
'class': 'btn border text-decoration-none py-0',
|
|
1635
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
1636
|
+
'[attr.disabled]': 'disabled || null',
|
|
1637
|
+
},
|
|
1638
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1639
|
+
styles: [":host{min-width:200px;border-radius:0;border-top:0!important;border-bottom:0!important;border-right:0!important}:host.top-bar-menu-button--compact{min-width:40px;border-left:0!important}"]
|
|
1640
|
+
},] }
|
|
1641
|
+
];
|
|
1642
|
+
TopBarMenuButtonComponent.propDecorators = {
|
|
1643
|
+
detailTpl: [{ type: Input }],
|
|
1644
|
+
compact: [{ type: Input }],
|
|
1645
|
+
_hasCompactClass: [{ type: HostBinding, args: ['class.top-bar-menu-button--compact',] }],
|
|
1646
|
+
_hasPadding0Class: [{ type: HostBinding, args: ['class.p-0',] }],
|
|
1647
|
+
_hasRoundedClass: [{ type: HostBinding, args: ['class.rounded',] }],
|
|
1648
|
+
_hasBtnLinkClass: [{ type: HostBinding, args: ['class.btn-link',] }]
|
|
1649
|
+
};
|
|
1650
|
+
__decorate([
|
|
1651
|
+
InputBoolean()
|
|
1652
|
+
], TopBarMenuButtonComponent.prototype, "compact", void 0);
|
|
1653
|
+
|
|
1654
|
+
class TopBarTitleComponent {
|
|
1655
|
+
constructor() { }
|
|
1656
|
+
ngOnInit() { }
|
|
1657
|
+
}
|
|
1658
|
+
TopBarTitleComponent.decorators = [
|
|
1659
|
+
{ type: Component, args: [{
|
|
1660
|
+
selector: 'seam-top-bar-title',
|
|
1661
|
+
template: "<h2 class=\"mb-0\" [ngStyle]=\"{ 'font-size.px': 32 }\" [ngStyle.lt-md]=\"{ 'font-size.px': 26 }\" [ngStyle.lt-sm]=\"{ 'font-size.px': 20, 'line-height': 1 }\">\n {{ titleText }}\n <br fxHide.gt-sm>\n <small *ngIf=\"subTitleText\" class=\"text-muted\">{{ subTitleText }}</small>\n</h2>\n",
|
|
1662
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1663
|
+
styles: [":host{flex:1 1 auto;display:flex;flex-direction:row;align-items:center}"]
|
|
1664
|
+
},] }
|
|
1665
|
+
];
|
|
1666
|
+
TopBarTitleComponent.ctorParameters = () => [];
|
|
1667
|
+
TopBarTitleComponent.propDecorators = {
|
|
1668
|
+
titleText: [{ type: Input }],
|
|
1669
|
+
subTitleText: [{ type: Input }]
|
|
1670
|
+
};
|
|
1671
|
+
|
|
1672
|
+
class TopBarItemDirective {
|
|
1673
|
+
constructor(template) {
|
|
1674
|
+
this.template = template;
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
TopBarItemDirective.decorators = [
|
|
1678
|
+
{ type: Directive, args: [{
|
|
1679
|
+
selector: '[seamTopBarItem]'
|
|
1680
|
+
},] }
|
|
1681
|
+
];
|
|
1682
|
+
TopBarItemDirective.ctorParameters = () => [
|
|
1683
|
+
{ type: TemplateRef }
|
|
1684
|
+
];
|
|
1685
|
+
|
|
1686
|
+
class TopBarMenuBtnDetailDirective {
|
|
1687
|
+
constructor(template) {
|
|
1688
|
+
this.template = template;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
TopBarMenuBtnDetailDirective.decorators = [
|
|
1692
|
+
{ type: Directive, args: [{
|
|
1693
|
+
selector: '[seamTopBarMenuBtnDetail]'
|
|
1694
|
+
},] }
|
|
1695
|
+
];
|
|
1696
|
+
TopBarMenuBtnDetailDirective.ctorParameters = () => [
|
|
1697
|
+
{ type: TemplateRef }
|
|
1698
|
+
];
|
|
1699
|
+
|
|
1700
|
+
class TopBarMenuDirective {
|
|
1701
|
+
constructor(menu) {
|
|
1702
|
+
this.menu = menu;
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
TopBarMenuDirective.decorators = [
|
|
1706
|
+
{ type: Directive, args: [{
|
|
1707
|
+
selector: 'seam-menu[seamTopBarMenu]'
|
|
1708
|
+
},] }
|
|
1709
|
+
];
|
|
1710
|
+
TopBarMenuDirective.ctorParameters = () => [
|
|
1711
|
+
{ type: MenuComponent, decorators: [{ type: Self }] }
|
|
1712
|
+
];
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* Top bar of an app.
|
|
1716
|
+
*
|
|
1717
|
+
* The top bar is fairly opinionated, so most parts are not intended to be
|
|
1718
|
+
* customized unless there is an input.
|
|
1719
|
+
*
|
|
1720
|
+
* > If you have to make a change and apply it externally with a css class or js
|
|
1721
|
+
* > make sure there is an issue to get the feature changed, so we don't have
|
|
1722
|
+
* > different modifications across our apps. Also, this will help make sure
|
|
1723
|
+
* > your change should have even been done.
|
|
1724
|
+
*/
|
|
1725
|
+
class TheSeamTopBarComponent {
|
|
1726
|
+
constructor(_layout) {
|
|
1727
|
+
this._layout = _layout;
|
|
1728
|
+
/** @ignore */
|
|
1729
|
+
this._ngUnsubscribe = new Subject();
|
|
1730
|
+
/** @ignore */
|
|
1731
|
+
this.faBars = faBars;
|
|
1732
|
+
/** Link target used when `logoHref` is specified. Defaults to `"_blank"` */
|
|
1733
|
+
this.logoHrefTarget = '_blank';
|
|
1734
|
+
/** Route to link to when `logo` is clicked. Defaults to `/`. */
|
|
1735
|
+
this.logoRoute = '/';
|
|
1736
|
+
/** Determines if the title should be displayed. */
|
|
1737
|
+
this.hasTitle = false;
|
|
1738
|
+
this.isMobile$ = this._layout.isMobile$;
|
|
1739
|
+
}
|
|
1740
|
+
/** @ignore */
|
|
1741
|
+
ngOnInit() { }
|
|
1742
|
+
/** @ignore */
|
|
1743
|
+
ngOnDestroy() {
|
|
1744
|
+
this._ngUnsubscribe.next();
|
|
1745
|
+
this._ngUnsubscribe.complete();
|
|
1746
|
+
}
|
|
1747
|
+
/** @ignore */
|
|
1748
|
+
ngAfterContentInit() {
|
|
1749
|
+
if (this._topBarItems) {
|
|
1750
|
+
this._items$ = this._topBarItems.changes.pipe(startWith(undefined), takeUntil(this._ngUnsubscribe), map(() => { var _a; return ((_a = this._topBarItems) === null || _a === void 0 ? void 0 : _a.toArray()) || []; }), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
TheSeamTopBarComponent.decorators = [
|
|
1755
|
+
{ type: Component, args: [{
|
|
1756
|
+
selector: 'seam-top-bar',
|
|
1757
|
+
template: "<!-- Nav Toggle -->\n<div class=\"d-flex flex-column justify-content-center pr-2\" *ngIf=\"isMobile$ | async\">\n <button seamBaseLayoutNavToggle seamIconBtn [icon]=\"faBars\" iconType=\"borderless-styled-square\"></button>\n</div>\n\n<!-- Logo -->\n<div class=\"top-bar--logo d-flex flex-column justify-content-center\" *ngIf=\"logoHref; else useLogoRoute\"\n [class.top-bar--logo-mobile]=\"isMobile$ | async\">\n <a [href]=\"logoHref\" [target]=\"logoHrefTarget\">\n <div>\n <img [src]=\"logo\" [src.lt-md]=\"hasTitle ? logoSm : logo\" alt=\"Logo\">\n </div>\n </a>\n</div>\n\n<ng-template #useLogoRoute>\n <div class=\"top-bar--logo d-flex flex-column justify-content-center\" [routerLink]=\"logoRoute\"\n [class.top-bar--logo-mobile]=\"isMobile$ | async\">\n <div>\n <img [src]=\"logo\" [src.lt-md]=\"hasTitle ? logoSm : logo\" alt=\"Logo\">\n </div>\n </div>\n</ng-template>\n\n<!-- Title -->\n<div class=\"d-flex flex-column flex-grow-1\">\n <seam-top-bar-title *ngIf=\"hasTitle\"\n [titleText]=\"titleText\"\n [subTitleText]=\"subTitleText\"\n [class.ml-2]=\"isMobile$ | async\">\n </seam-top-bar-title>\n</div>\n\n<!-- Items -->\n<div class=\"top-bar-icon-container mr-2\">\n <ng-container *ngFor=\"let item of _items$ | async\">\n <ng-template [ngTemplateOutlet]=\"item.template\"></ng-template>\n </ng-container>\n</div>\n\n<!-- Menu -->\n<button seamTopBarMenuButton\n [seamMenuToggle]=\"_topBarMenu?.menu\"\n [detailTpl]=\"_topBarMenuBtnDetailTpl?.template\"\n [compact]=\"isMobile$ | async\">\n</button>\n",
|
|
1758
|
+
exportAs: 'seamTopBar',
|
|
1759
|
+
host: {
|
|
1760
|
+
'class': 'bg-white'
|
|
1761
|
+
},
|
|
1762
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1763
|
+
styles: [":host{flex:1 1 100%;display:flex;flex-direction:row;padding:8px}.top-bar--logo{flex:0 0 auto;overflow:hidden;cursor:pointer}.top-bar--logo img{max-height:60px;max-width:200px}.top-bar--logo.top-bar--logo-mobile{max-height:40px;max-width:150px}.top-bar--logo.top-bar--logo-mobile>div{max-height:100%;max-width:100%}.top-bar--logo.top-bar--logo-mobile>div img{max-height:40px;max-width:100%}.top-bar-icon-container{margin:auto 0}"]
|
|
1764
|
+
},] }
|
|
1765
|
+
];
|
|
1766
|
+
TheSeamTopBarComponent.ctorParameters = () => [
|
|
1767
|
+
{ type: TheSeamLayoutService }
|
|
1768
|
+
];
|
|
1769
|
+
TheSeamTopBarComponent.propDecorators = {
|
|
1770
|
+
_topBarMenu: [{ type: ContentChild, args: [TopBarMenuDirective, { static: true },] }],
|
|
1771
|
+
_topBarItems: [{ type: ContentChildren, args: [TopBarItemDirective,] }],
|
|
1772
|
+
_topBarMenuBtnDetailTpl: [{ type: ContentChild, args: [TopBarMenuBtnDetailDirective,] }],
|
|
1773
|
+
logo: [{ type: Input }],
|
|
1774
|
+
logoSm: [{ type: Input }],
|
|
1775
|
+
logoHref: [{ type: Input }],
|
|
1776
|
+
logoHrefTarget: [{ type: Input }],
|
|
1777
|
+
logoRoute: [{ type: Input }],
|
|
1778
|
+
hasTitle: [{ type: Input }],
|
|
1779
|
+
titleText: [{ type: Input }],
|
|
1780
|
+
subTitleText: [{ type: Input }]
|
|
1781
|
+
};
|
|
1782
|
+
__decorate([
|
|
1783
|
+
InputBoolean()
|
|
1784
|
+
], TheSeamTopBarComponent.prototype, "hasTitle", void 0);
|
|
1785
|
+
|
|
1786
|
+
class TheSeamTopBarModule {
|
|
1787
|
+
}
|
|
1788
|
+
TheSeamTopBarModule.decorators = [
|
|
1789
|
+
{ type: NgModule, args: [{
|
|
1790
|
+
declarations: [
|
|
1791
|
+
TheSeamTopBarComponent,
|
|
1792
|
+
TopBarTitleComponent,
|
|
1793
|
+
TopBarMenuButtonComponent,
|
|
1794
|
+
TopBarMenuDirective,
|
|
1795
|
+
TopBarItemDirective,
|
|
1796
|
+
TopBarMenuBtnDetailDirective
|
|
1797
|
+
],
|
|
1798
|
+
imports: [
|
|
1799
|
+
CommonModule,
|
|
1800
|
+
TheSeamLayoutModule,
|
|
1801
|
+
TheSeamButtonsModule,
|
|
1802
|
+
TheSeamIconModule,
|
|
1803
|
+
TheSeamMenuModule,
|
|
1804
|
+
TheSeamBaseLayoutModule,
|
|
1805
|
+
RouterModule
|
|
1806
|
+
],
|
|
1807
|
+
exports: [
|
|
1808
|
+
TheSeamTopBarComponent,
|
|
1809
|
+
TopBarMenuButtonComponent,
|
|
1810
|
+
TopBarMenuDirective,
|
|
1811
|
+
TheSeamMenuModule,
|
|
1812
|
+
TopBarItemDirective,
|
|
1813
|
+
TopBarMenuBtnDetailDirective
|
|
1814
|
+
]
|
|
1815
|
+
},] }
|
|
1816
|
+
];
|
|
1817
|
+
|
|
1818
|
+
const fader = trigger('routeAnimations', [
|
|
1819
|
+
transition('* <=> *', [
|
|
1820
|
+
// Set a default style for enter and leave
|
|
1821
|
+
query(':enter, :leave', [
|
|
1822
|
+
style({
|
|
1823
|
+
position: 'absolute',
|
|
1824
|
+
left: 0,
|
|
1825
|
+
width: '100%',
|
|
1826
|
+
opacity: 0,
|
|
1827
|
+
transform: 'scale(0) translateY(100%)',
|
|
1828
|
+
}),
|
|
1829
|
+
], { optional: true }),
|
|
1830
|
+
// Animate the new page in
|
|
1831
|
+
query(':enter', [
|
|
1832
|
+
animate('600ms ease', style({ opacity: 1, transform: 'scale(1) translateY(0)' })),
|
|
1833
|
+
], { optional: true })
|
|
1834
|
+
]),
|
|
1835
|
+
]);
|
|
1836
|
+
// function slideTo(direction) {
|
|
1837
|
+
// return [
|
|
1838
|
+
// query(':enter, :leave', [
|
|
1839
|
+
// style({
|
|
1840
|
+
// position: 'absolute',
|
|
1841
|
+
// top: 0,
|
|
1842
|
+
// [direction]: 0,
|
|
1843
|
+
// width: '100%'
|
|
1844
|
+
// })
|
|
1845
|
+
// ], { optional: true }),
|
|
1846
|
+
// query(':enter', [
|
|
1847
|
+
// style({ [direction]: '-100%'})
|
|
1848
|
+
// ], { optional: true }),
|
|
1849
|
+
// group([
|
|
1850
|
+
// query(':leave', [
|
|
1851
|
+
// animate('1000ms ease', style({ [direction]: '100%'}))
|
|
1852
|
+
// ], { optional: true }),
|
|
1853
|
+
// query(':enter', [
|
|
1854
|
+
// animate('1000ms ease', style({ [direction]: '0%'}))
|
|
1855
|
+
// ], { optional: true })
|
|
1856
|
+
// ]),
|
|
1857
|
+
// // Normalize the page style... Might not be necessary
|
|
1858
|
+
// // Required only if you have child animations on the page
|
|
1859
|
+
// query(':leave', animateChild(), { optional: true }),
|
|
1860
|
+
// query(':enter', animateChild(), { optional: true }),
|
|
1861
|
+
// ]
|
|
1862
|
+
// }
|
|
1863
|
+
// TODO: Refactor the slider animation, because AOT or ng-packagr, I haven't
|
|
1864
|
+
// looked into what exactly is preventing it, doesn't allow the function call.
|
|
1865
|
+
// export const slider =
|
|
1866
|
+
// trigger('routeAnimations', [
|
|
1867
|
+
// transition('* => isLeft', slideTo('left') ),
|
|
1868
|
+
// transition('* => isRight', slideTo('right') ),
|
|
1869
|
+
// transition('isRight => *', slideTo('left') ),
|
|
1870
|
+
// transition('isLeft => *', slideTo('right') )
|
|
1871
|
+
// ])
|
|
1872
|
+
// export const contentLeave =
|
|
1873
|
+
// trigger('contentLeave', [
|
|
1874
|
+
// transition(':leave', [
|
|
1875
|
+
// ])
|
|
1876
|
+
// ])
|
|
1877
|
+
const slider = trigger('routeAnimations', [
|
|
1878
|
+
transition('* => isLeft', [
|
|
1879
|
+
query('.router-container :enter, .router-container :leave', [
|
|
1880
|
+
style({
|
|
1881
|
+
position: 'absolute',
|
|
1882
|
+
top: 0,
|
|
1883
|
+
left: 0,
|
|
1884
|
+
width: '100%'
|
|
1885
|
+
})
|
|
1886
|
+
], { optional: true }),
|
|
1887
|
+
query('.router-container :enter', [
|
|
1888
|
+
style({ left: '-100%' })
|
|
1889
|
+
], { optional: true }),
|
|
1890
|
+
query('.hierarchy-router-outlet--content', [
|
|
1891
|
+
style({ left: '0%', position: 'absolute' })
|
|
1892
|
+
], { optional: true }),
|
|
1893
|
+
group([
|
|
1894
|
+
query('.router-container :leave', [
|
|
1895
|
+
animate('1000ms ease', style({ left: '100%' }))
|
|
1896
|
+
], { optional: true }),
|
|
1897
|
+
query('.router-container :enter', [
|
|
1898
|
+
animate('1000ms ease', style({ left: '0%' }))
|
|
1899
|
+
], { optional: true }),
|
|
1900
|
+
query('.hierarchy-router-outlet--content', [
|
|
1901
|
+
animate('1000ms ease', style({ left: '-100%' }))
|
|
1902
|
+
], { optional: true }),
|
|
1903
|
+
]),
|
|
1904
|
+
// Normalize the page style... Might not be necessary
|
|
1905
|
+
// Required only if you have child animations on the page
|
|
1906
|
+
query('.router-container :leave', animateChild(), { optional: true }),
|
|
1907
|
+
query('.router-container :enter', animateChild(), { optional: true }),
|
|
1908
|
+
]),
|
|
1909
|
+
transition('* => isRight', [
|
|
1910
|
+
query('.router-container :enter, .router-container :leave', [
|
|
1911
|
+
style({
|
|
1912
|
+
position: 'absolute',
|
|
1913
|
+
top: 0,
|
|
1914
|
+
right: 0,
|
|
1915
|
+
width: '100%'
|
|
1916
|
+
})
|
|
1917
|
+
], { optional: true }),
|
|
1918
|
+
query('.router-container :enter', [
|
|
1919
|
+
style({ right: '-100%' })
|
|
1920
|
+
], { optional: true }),
|
|
1921
|
+
query('.hierarchy-router-outlet--content', [
|
|
1922
|
+
style({ left: '0%', position: 'absolute' })
|
|
1923
|
+
], { optional: true }),
|
|
1924
|
+
group([
|
|
1925
|
+
query('.router-container :leave', [
|
|
1926
|
+
animate('1000ms ease', style({ right: '100%' }))
|
|
1927
|
+
], { optional: true }),
|
|
1928
|
+
query('.router-container :enter', [
|
|
1929
|
+
animate('1000ms ease', style({ right: '0%' }))
|
|
1930
|
+
], { optional: true }),
|
|
1931
|
+
query('.hierarchy-router-outlet--content', [
|
|
1932
|
+
animate('1000ms ease', style({ left: '-100%' }))
|
|
1933
|
+
], { optional: true }),
|
|
1934
|
+
]),
|
|
1935
|
+
// Normalize the page style... Might not be necessary
|
|
1936
|
+
// Required only if you have child animations on the page
|
|
1937
|
+
query('.router-container :leave', animateChild(), { optional: true }),
|
|
1938
|
+
query('.router-container :enter', animateChild(), { optional: true }),
|
|
1939
|
+
]),
|
|
1940
|
+
transition('isRight => *', [
|
|
1941
|
+
query('.router-container :enter, .router-container :leave', [
|
|
1942
|
+
style({
|
|
1943
|
+
position: 'absolute',
|
|
1944
|
+
top: 0,
|
|
1945
|
+
left: 0,
|
|
1946
|
+
width: '100%'
|
|
1947
|
+
})
|
|
1948
|
+
], { optional: true }),
|
|
1949
|
+
query('.router-container :enter', [
|
|
1950
|
+
style({ left: '-100%' })
|
|
1951
|
+
], { optional: true }),
|
|
1952
|
+
query('.hierarchy-router-outlet--content', [
|
|
1953
|
+
style({ left: '0%', position: 'absolute' })
|
|
1954
|
+
], { optional: true }),
|
|
1955
|
+
group([
|
|
1956
|
+
query('.router-container :leave', [
|
|
1957
|
+
animate('1000ms ease', style({ left: '100%' }))
|
|
1958
|
+
], { optional: true }),
|
|
1959
|
+
query('.router-container :enter', [
|
|
1960
|
+
animate('1000ms ease', style({ left: '0%' }))
|
|
1961
|
+
], { optional: true }),
|
|
1962
|
+
query('.hierarchy-router-outlet--content', [
|
|
1963
|
+
animate('1000ms ease', style({ left: '-100%' }))
|
|
1964
|
+
], { optional: true }),
|
|
1965
|
+
]),
|
|
1966
|
+
// Normalize the page style... Might not be necessary
|
|
1967
|
+
// Required only if you have child animations on the page
|
|
1968
|
+
query('.router-container :leave', animateChild(), { optional: true }),
|
|
1969
|
+
query('.router-container :enter', animateChild(), { optional: true }),
|
|
1970
|
+
]),
|
|
1971
|
+
transition('isLeft => *', [
|
|
1972
|
+
query('.router-container :enter, .router-container :leave', [
|
|
1973
|
+
style({
|
|
1974
|
+
position: 'absolute',
|
|
1975
|
+
top: 0,
|
|
1976
|
+
right: 0,
|
|
1977
|
+
width: '100%'
|
|
1978
|
+
})
|
|
1979
|
+
], { optional: true }),
|
|
1980
|
+
query('.router-container :enter', [
|
|
1981
|
+
style({ right: '-100%' })
|
|
1982
|
+
], { optional: true }),
|
|
1983
|
+
group([
|
|
1984
|
+
query('.router-container :leave', [
|
|
1985
|
+
animate('1000ms ease', style({ right: '100%' }))
|
|
1986
|
+
], { optional: true }),
|
|
1987
|
+
query('.router-container :enter', [
|
|
1988
|
+
animate('1000ms ease', style({ right: '0%' }))
|
|
1989
|
+
], { optional: true })
|
|
1990
|
+
]),
|
|
1991
|
+
// Normalize the page style... Might not be necessary
|
|
1992
|
+
// Required only if you have child animations on the page
|
|
1993
|
+
query('.router-container :leave', animateChild(), { optional: true }),
|
|
1994
|
+
query('.router-container :enter', animateChild(), { optional: true }),
|
|
1995
|
+
])
|
|
1996
|
+
]);
|
|
1997
|
+
const transformer = trigger('routeAnimations', [
|
|
1998
|
+
transition('* => isLeft', transformTo({ x: -100, y: -100, rotate: -720 })),
|
|
1999
|
+
transition('* => isRight', transformTo({ x: 100, y: -100, rotate: 90 })),
|
|
2000
|
+
transition('isRight => *', transformTo({ x: -100, y: -100, rotate: 360 })),
|
|
2001
|
+
transition('isLeft => *', transformTo({ x: 100, y: -100, rotate: -360 }))
|
|
2002
|
+
]);
|
|
2003
|
+
function transformTo({ x = 100, y = 0, rotate = 0 }) {
|
|
2004
|
+
const optional = { optional: true };
|
|
2005
|
+
return [
|
|
2006
|
+
query(':enter, :leave', [
|
|
2007
|
+
style({
|
|
2008
|
+
position: 'absolute',
|
|
2009
|
+
top: 0,
|
|
2010
|
+
left: 0,
|
|
2011
|
+
width: '100%'
|
|
2012
|
+
})
|
|
2013
|
+
], optional),
|
|
2014
|
+
query(':enter', [
|
|
2015
|
+
style({ transform: `translate(${x}%, ${y}%) rotate(${rotate}deg)` })
|
|
2016
|
+
], { optional: true }),
|
|
2017
|
+
group([
|
|
2018
|
+
query(':leave', [
|
|
2019
|
+
animate('600ms ease-out', style({ transform: `translate(${x}%, ${y}%) rotate(${rotate}deg)` }))
|
|
2020
|
+
], optional),
|
|
2021
|
+
query(':enter', [
|
|
2022
|
+
animate('600ms ease-out', style({ transform: `translate(0, 0) rotate(0)` }))
|
|
2023
|
+
], { optional: true })
|
|
2024
|
+
]),
|
|
2025
|
+
];
|
|
2026
|
+
}
|
|
2027
|
+
const stepper = trigger('routeAnimations', [
|
|
2028
|
+
transition('* <=> *', [
|
|
2029
|
+
query(':enter, :leave', [
|
|
2030
|
+
style({
|
|
2031
|
+
position: 'absolute',
|
|
2032
|
+
left: 0,
|
|
2033
|
+
width: '100%',
|
|
2034
|
+
}),
|
|
2035
|
+
], { optional: true }),
|
|
2036
|
+
group([
|
|
2037
|
+
query(':enter', [
|
|
2038
|
+
animate('2000ms ease', keyframes([
|
|
2039
|
+
style({ transform: 'scale(0) translateX(100%)', offset: 0 }),
|
|
2040
|
+
style({ transform: 'scale(0.5) translateX(25%)', offset: 0.3 }),
|
|
2041
|
+
style({ transform: 'scale(1) translateX(0%)', offset: 1 }),
|
|
2042
|
+
])),
|
|
2043
|
+
], { optional: true }),
|
|
2044
|
+
query(':leave', [
|
|
2045
|
+
animate('2000ms ease', keyframes([
|
|
2046
|
+
style({ transform: 'scale(1)', offset: 0 }),
|
|
2047
|
+
style({ transform: 'scale(0.5) translateX(-25%) rotate(0)', offset: 0.35 }),
|
|
2048
|
+
style({ opacity: 0, transform: 'translateX(-50%) rotate(-180deg) scale(6)', offset: 1 }),
|
|
2049
|
+
])),
|
|
2050
|
+
], { optional: true })
|
|
2051
|
+
]),
|
|
2052
|
+
])
|
|
2053
|
+
]);
|
|
2054
|
+
const sideToSide = trigger('routeAnimations', [
|
|
2055
|
+
transition('* => *', [
|
|
2056
|
+
style({
|
|
2057
|
+
position: 'fixed',
|
|
2058
|
+
width: '100%',
|
|
2059
|
+
transform: 'translateX(-100%)'
|
|
2060
|
+
}),
|
|
2061
|
+
animate('1000ms ease', style({ transform: 'translateX(0%)' }))
|
|
2062
|
+
]),
|
|
2063
|
+
transition(':leave', [
|
|
2064
|
+
style({
|
|
2065
|
+
position: 'fixed',
|
|
2066
|
+
width: '100%',
|
|
2067
|
+
transform: 'translateX(0%)'
|
|
2068
|
+
}),
|
|
2069
|
+
animate('1000ms ease', style({ transform: 'translateX(-100%)' }))
|
|
2070
|
+
])
|
|
2071
|
+
]);
|
|
2072
|
+
|
|
2073
|
+
function routeChanges(router) {
|
|
2074
|
+
return router.events.pipe(filter(event => event instanceof NavigationStart || event instanceof NavigationEnd), distinctUntilChanged((x, y) => x.id === y.id), map(event => ({ url: event.url })));
|
|
2075
|
+
}
|
|
2076
|
+
//
|
|
2077
|
+
// TODO: Animation improvement: Try adding a full component animation that
|
|
2078
|
+
// queries the <ng-content> and <router-outlet> blocks. When the outlet
|
|
2079
|
+
// activates, set the animation state to a transition that moves both blocks
|
|
2080
|
+
// together.
|
|
2081
|
+
//
|
|
2082
|
+
let _uid = 0;
|
|
2083
|
+
class HierarchyRouterOutletComponent {
|
|
2084
|
+
constructor(_route, _router) {
|
|
2085
|
+
this._route = _route;
|
|
2086
|
+
this._router = _router;
|
|
2087
|
+
this._uid = _uid++;
|
|
2088
|
+
this._ngUnsubscribe = new Subject();
|
|
2089
|
+
this.animState = 'isRight';
|
|
2090
|
+
// animState = ''
|
|
2091
|
+
this.outletActive = false;
|
|
2092
|
+
this.ngContentVisible = true;
|
|
2093
|
+
this._router.events.pipe(filter(event => event instanceof NavigationEnd),
|
|
2094
|
+
// tap(v => console.log(`_hasChildren()[${this._uid}]`, this._hasChildren())),
|
|
2095
|
+
takeUntil(this._ngUnsubscribe))
|
|
2096
|
+
.subscribe();
|
|
2097
|
+
// routeChanges(this._router)
|
|
2098
|
+
// .pipe(
|
|
2099
|
+
// untilDestroyed(this),
|
|
2100
|
+
// tap(() => {
|
|
2101
|
+
// // if (this._hasChildren()) {
|
|
2102
|
+
// // this.animState = 'isLeft'
|
|
2103
|
+
// // } else {
|
|
2104
|
+
// // this.animState = 'isRight'
|
|
2105
|
+
// // }
|
|
2106
|
+
// })
|
|
2107
|
+
// )
|
|
2108
|
+
// .subscribe(v => console.log(`routeChanges[${this._uid}]`, v))
|
|
2109
|
+
}
|
|
2110
|
+
ngOnInit() { }
|
|
2111
|
+
ngOnDestroy() {
|
|
2112
|
+
this._ngUnsubscribe.next();
|
|
2113
|
+
this._ngUnsubscribe.complete();
|
|
2114
|
+
}
|
|
2115
|
+
_hasChildren() {
|
|
2116
|
+
const count = this._route.pathFromRoot.length - 1;
|
|
2117
|
+
let countFull = 0;
|
|
2118
|
+
if (this._router.parseUrl(this._router.url).root.children.primary) {
|
|
2119
|
+
countFull = this._router.parseUrl(this._router.url).root.children.primary.segments.length;
|
|
2120
|
+
}
|
|
2121
|
+
// console.log(`_hasChildren[${this._uid}]`, { count, countFull })
|
|
2122
|
+
return countFull > count;
|
|
2123
|
+
}
|
|
2124
|
+
prepareRoute(outlet) {
|
|
2125
|
+
// console.log(`outlet[${this._uid}]`, outlet, this.animState, this._hasChildren(), this.outletActive)
|
|
2126
|
+
if (outlet.isActivated) {
|
|
2127
|
+
// console.log(outlet.isActivated)
|
|
2128
|
+
// console.log(outlet.component)
|
|
2129
|
+
console.log(this.animState);
|
|
2130
|
+
return this.animState;
|
|
2131
|
+
}
|
|
2132
|
+
else {
|
|
2133
|
+
return undefined;
|
|
2134
|
+
}
|
|
2135
|
+
// console.log(`prepareRoute[${this._uid}]`, this.animState, this._hasChildren())
|
|
2136
|
+
// console.log('activatedRouteData', outlet && outlet.activatedRouteData)
|
|
2137
|
+
// if (outlet && outlet.isActivated) {
|
|
2138
|
+
// console.log('activatedRoute', outlet.activatedRoute && outlet.activatedRoute.snapshot.url)
|
|
2139
|
+
// }
|
|
2140
|
+
// return outlet && outlet.activatedRouteData && outlet.activatedRouteData['animation']
|
|
2141
|
+
// console.log('')
|
|
2142
|
+
// return this.animState
|
|
2143
|
+
}
|
|
2144
|
+
outletActivate(event) {
|
|
2145
|
+
// console.log(`outletActivate[${this._uid}]`, event)
|
|
2146
|
+
this.outletActive = true;
|
|
2147
|
+
}
|
|
2148
|
+
outletDeactivate(event) {
|
|
2149
|
+
// console.log(`outletDeactivate[${this._uid}]`, event)
|
|
2150
|
+
this.outletActive = false;
|
|
2151
|
+
}
|
|
2152
|
+
routeAnimationsStart(event) {
|
|
2153
|
+
// console.log('routeAnimationsStart', event)
|
|
2154
|
+
this.ngContentVisible = true;
|
|
2155
|
+
}
|
|
2156
|
+
routeAnimationsDone(event) {
|
|
2157
|
+
// console.log('routeAnimationsDone', event)
|
|
2158
|
+
this.ngContentVisible = !this.outletActive;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
HierarchyRouterOutletComponent.decorators = [
|
|
2162
|
+
{ type: Component, args: [{
|
|
2163
|
+
selector: 'seam-hierarchy-router-outlet',
|
|
2164
|
+
template: "<div class=\"h-100\"\n [@routeAnimations]=\"prepareRoute(outlet)\"\n (@routeAnimations.start)=\"routeAnimationsStart($event)\"\n (@routeAnimations.done)=\"routeAnimationsDone($event)\">\n <div class=\"hierarchy-router-outlet--content h-100\" *ngIf=\"ngContentVisible\">\n <!-- {{ animState }} -->\n <div class=\"border border-info h-100\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"router-container\"\n [class.h-100]=\"!ngContentVisible\"\n >\n <!-- <div [@routeAnimations]=\"animState\"> -->\n <!-- <div class=\"hierarchy-router-outlet--route-content\"> -->\n <router-outlet #outlet=\"outlet\"\n (activate)=\"outletActivate($event)\"\n (deactivate)=\"outletDeactivate($event)\">\n </router-outlet>\n </div>\n</div>\n",
|
|
2165
|
+
animations: [
|
|
2166
|
+
// fader,
|
|
2167
|
+
slider,
|
|
2168
|
+
// transformer,
|
|
2169
|
+
// stepper,
|
|
2170
|
+
// sideToSide
|
|
2171
|
+
// contentLeave
|
|
2172
|
+
],
|
|
2173
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2174
|
+
styles: [":host{display:block;height:100%}:host ::ng-deep router-outlet+*{background-color:#fff;height:100%}"]
|
|
2175
|
+
},] }
|
|
2176
|
+
];
|
|
2177
|
+
HierarchyRouterOutletComponent.ctorParameters = () => [
|
|
2178
|
+
{ type: ActivatedRoute },
|
|
2179
|
+
{ type: Router }
|
|
2180
|
+
];
|
|
2181
|
+
|
|
2182
|
+
class HierarchyLevelResolver {
|
|
2183
|
+
constructor() { }
|
|
2184
|
+
resolve(route, state) {
|
|
2185
|
+
// console.log('[HierarchyLevelResolver]', route)
|
|
2186
|
+
// console.log('[HierarchyLevelResolver]', state)
|
|
2187
|
+
return this._getMaxHierLevel(route);
|
|
2188
|
+
}
|
|
2189
|
+
_getMaxHierLevel(route) {
|
|
2190
|
+
let curr = route;
|
|
2191
|
+
while (curr.parent) {
|
|
2192
|
+
curr = curr.parent;
|
|
2193
|
+
if (curr.data['hierLevel']) {
|
|
2194
|
+
return curr.data['hierLevel'] + 1;
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
return 0;
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
HierarchyLevelResolver.ɵprov = i0.ɵɵdefineInjectable({ factory: function HierarchyLevelResolver_Factory() { return new HierarchyLevelResolver(); }, token: HierarchyLevelResolver, providedIn: "root" });
|
|
2201
|
+
HierarchyLevelResolver.decorators = [
|
|
2202
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2203
|
+
];
|
|
2204
|
+
HierarchyLevelResolver.ctorParameters = () => [];
|
|
2205
|
+
|
|
2206
|
+
class TheSeamDynamicRouterModule {
|
|
2207
|
+
}
|
|
2208
|
+
TheSeamDynamicRouterModule.decorators = [
|
|
2209
|
+
{ type: NgModule, args: [{
|
|
2210
|
+
declarations: [
|
|
2211
|
+
HierarchyRouterOutletComponent
|
|
2212
|
+
],
|
|
2213
|
+
imports: [
|
|
2214
|
+
CommonModule,
|
|
2215
|
+
RouterModule
|
|
2216
|
+
],
|
|
2217
|
+
exports: [
|
|
2218
|
+
HierarchyRouterOutletComponent
|
|
2219
|
+
]
|
|
2220
|
+
},] }
|
|
2221
|
+
];
|
|
2222
|
+
|
|
2223
|
+
class TheSeamSchemaFormCheckboxComponent {
|
|
2224
|
+
constructor(jsf) {
|
|
2225
|
+
this.jsf = jsf;
|
|
2226
|
+
this.controlDisabled = false;
|
|
2227
|
+
this.boundControl = false;
|
|
2228
|
+
this.trueValue = true;
|
|
2229
|
+
this.falseValue = false;
|
|
2230
|
+
}
|
|
2231
|
+
ngOnInit() {
|
|
2232
|
+
this.options = this.layoutNode.options || {};
|
|
2233
|
+
this.jsf.initializeControl(this);
|
|
2234
|
+
if (this.controlValue === null || this.controlValue === undefined) {
|
|
2235
|
+
this.controlValue = this.options.title;
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
updateValue(event) {
|
|
2239
|
+
event.preventDefault();
|
|
2240
|
+
this.jsf.updateValue(this, event.target.checked ? this.trueValue : this.falseValue);
|
|
2241
|
+
}
|
|
2242
|
+
get isChecked() {
|
|
2243
|
+
return this.jsf.getFormControlValue(this) === this.trueValue;
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
TheSeamSchemaFormCheckboxComponent.decorators = [
|
|
2247
|
+
{ type: Component, args: [{
|
|
2248
|
+
selector: 'seam-schema-form-checkbox',
|
|
2249
|
+
template: "<div class=\"mb-3\">\n <seam-form-field *ngIf=\"boundControl\">\n <seam-checkbox seamInput\n [formControl]=\"$any(formControl)\"\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [required]=\"options?.required\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\" [required]=\"options?.required\"></seam-form-field-required-indicator>\n </seam-checkbox>\n </seam-form-field>\n\n <seam-form-field *ngIf=\"!boundControl\">\n <seam-checkbox seamInput\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [required]=\"options?.required\"\n [value]=\"controlValue\"\n (change)=\"updateValue($event)\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\" [required]=\"options?.required\"></seam-form-field-required-indicator>\n </seam-checkbox>\n </seam-form-field>\n</div>\n",
|
|
2250
|
+
styles: [""]
|
|
2251
|
+
},] }
|
|
2252
|
+
];
|
|
2253
|
+
TheSeamSchemaFormCheckboxComponent.ctorParameters = () => [
|
|
2254
|
+
{ type: JsonSchemaFormService }
|
|
2255
|
+
];
|
|
2256
|
+
TheSeamSchemaFormCheckboxComponent.propDecorators = {
|
|
2257
|
+
layoutNode: [{ type: Input }],
|
|
2258
|
+
layoutIndex: [{ type: Input }],
|
|
2259
|
+
dataIndex: [{ type: Input }]
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
class TheSeamSchemaFormInputComponent {
|
|
2263
|
+
constructor(jsf) {
|
|
2264
|
+
this.jsf = jsf;
|
|
2265
|
+
this.controlDisabled = false;
|
|
2266
|
+
this.boundControl = false;
|
|
2267
|
+
this.autoCompleteList = [];
|
|
2268
|
+
}
|
|
2269
|
+
ngOnInit() {
|
|
2270
|
+
this.options = this.layoutNode.options || {};
|
|
2271
|
+
this.jsf.initializeControl(this);
|
|
2272
|
+
}
|
|
2273
|
+
updateValue(event) {
|
|
2274
|
+
this.jsf.updateValue(this, event.target.value);
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
TheSeamSchemaFormInputComponent.decorators = [
|
|
2278
|
+
{ type: Component, args: [{
|
|
2279
|
+
selector: 'seam-schema-form-input',
|
|
2280
|
+
template: "<seam-form-field *ngIf=\"boundControl\">\n <ng-template seamFormFieldLabelTpl let-required=\"required\">\n <ng-container *ngIf=\"!options?.notitle\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\"></seam-form-field-required-indicator>\n </ng-container>\n </ng-template>\n <input seamInput\n [formControl]=\"$any(formControl)\"\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [required]=\"options?.required\"\n\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.list]=\"'control' + layoutNode?._id + 'Autocomplete'\"\n [attr.maxlength]=\"options?.maxLength\"\n [attr.minlength]=\"options?.minLength\"\n [attr.pattern]=\"options?.pattern\"\n [attr.placeholder]=\"options?.placeholder\"\n [attr.required]=\"options?.required\"\n [readonly]=\"options?.readonly ? 'readonly' : null\"\n [type]=\"layoutNode?.type\">\n <datalist *ngIf=\"options?.typeahead?.source\"\n [id]=\"'control' + layoutNode?._id + 'Autocomplete'\">\n <option *ngFor=\"let word of options?.typeahead?.source\" [value]=\"word\">\n </datalist>\n</seam-form-field>\n\n<seam-form-field *ngIf=\"!boundControl\">\n <ng-template seamFormFieldLabelTpl let-required=\"required\">\n <ng-container *ngIf=\"!options?.notitle\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\"></seam-form-field-required-indicator>\n </ng-container>\n </ng-template>\n <input seamInput\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [required]=\"options?.required\"\n [value]=\"controlValue\"\n (input)=\"updateValue($event)\"\n\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.list]=\"'control' + layoutNode?._id + 'Autocomplete'\"\n [attr.maxlength]=\"options?.maxLength\"\n [attr.minlength]=\"options?.minLength\"\n [attr.pattern]=\"options?.pattern\"\n [attr.placeholder]=\"options?.placeholder\"\n [attr.required]=\"options?.required\"\n [readonly]=\"options?.readonly ? 'readonly' : null\"\n [type]=\"layoutNode?.type\"\n [disabled]=\"controlDisabled\">\n <datalist *ngIf=\"options?.typeahead?.source\"\n [id]=\"'control' + layoutNode?._id + 'Autocomplete'\">\n <option *ngFor=\"let word of options?.typeahead?.source\" [value]=\"word\">\n </datalist>\n</seam-form-field>\n",
|
|
2281
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2282
|
+
styles: [":host{display:block}"]
|
|
2283
|
+
},] }
|
|
2284
|
+
];
|
|
2285
|
+
TheSeamSchemaFormInputComponent.ctorParameters = () => [
|
|
2286
|
+
{ type: JsonSchemaFormService }
|
|
2287
|
+
];
|
|
2288
|
+
TheSeamSchemaFormInputComponent.propDecorators = {
|
|
2289
|
+
layoutNode: [{ type: Input }],
|
|
2290
|
+
layoutIndex: [{ type: Input }],
|
|
2291
|
+
dataIndex: [{ type: Input }]
|
|
2292
|
+
};
|
|
2293
|
+
|
|
2294
|
+
class TheSeamSchemaFormNumberComponent {
|
|
2295
|
+
constructor(jsf) {
|
|
2296
|
+
this.jsf = jsf;
|
|
2297
|
+
this.controlDisabled = false;
|
|
2298
|
+
this.boundControl = false;
|
|
2299
|
+
this.allowNegative = true;
|
|
2300
|
+
this.allowDecimal = true;
|
|
2301
|
+
this.allowExponents = false;
|
|
2302
|
+
this.lastValidNumber = '';
|
|
2303
|
+
}
|
|
2304
|
+
ngOnInit() {
|
|
2305
|
+
this.options = this.layoutNode.options || {};
|
|
2306
|
+
this.jsf.initializeControl(this);
|
|
2307
|
+
if (this.layoutNode.dataType === 'integer') {
|
|
2308
|
+
this.allowDecimal = false;
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
updateValue(event) {
|
|
2312
|
+
this.jsf.updateValue(this, event.target.value);
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
TheSeamSchemaFormNumberComponent.decorators = [
|
|
2316
|
+
{ type: Component, args: [{
|
|
2317
|
+
selector: 'seam-schema-form-number',
|
|
2318
|
+
template: "<seam-form-field *ngIf=\"boundControl\">\n <ng-template seamFormFieldLabelTpl let-required=\"required\">\n <ng-container *ngIf=\"!options?.notitle\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\"></seam-form-field-required-indicator>\n </ng-container>\n </ng-template>\n <input seamInput\n [formControl]=\"$any(formControl)\"\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [required]=\"options?.required\"\n [attr.max]=\"options?.maximum\"\n [attr.min]=\"options?.minimum\"\n [attr.step]=\"options?.multipleOf || options?.step || 'any'\"\n\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.list]=\"'control' + layoutNode?._id + 'Autocomplete'\"\n [attr.maxlength]=\"options?.maxLength\"\n [attr.minlength]=\"options?.minLength\"\n [attr.pattern]=\"options?.pattern\"\n [attr.placeholder]=\"options?.placeholder\"\n [attr.required]=\"options?.required\"\n [readonly]=\"options?.readonly ? 'readonly' : null\"\n [type]=\"layoutNode?.type === 'range' ? 'range' : 'number'\">\n <span *ngIf=\"layoutNode?.type === 'range'\" [innerHTML]=\"controlValue\"></span>\n</seam-form-field>\n\n<seam-form-field *ngIf=\"!boundControl\">\n <ng-template seamFormFieldLabelTpl let-required=\"required\">\n <ng-container *ngIf=\"!options?.notitle\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\"></seam-form-field-required-indicator>\n </ng-container>\n </ng-template>\n <input seamInput\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [required]=\"options?.required\"\n [attr.max]=\"options?.maximum\"\n [attr.min]=\"options?.minimum\"\n [attr.step]=\"options?.multipleOf || options?.step || 'any'\"\n [value]=\"controlValue\"\n (input)=\"updateValue($event)\"\n\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.list]=\"'control' + layoutNode?._id + 'Autocomplete'\"\n [attr.maxlength]=\"options?.maxLength\"\n [attr.minlength]=\"options?.minLength\"\n [attr.pattern]=\"options?.pattern\"\n [attr.placeholder]=\"options?.placeholder\"\n [attr.required]=\"options?.required\"\n [readonly]=\"options?.readonly ? 'readonly' : null\"\n [type]=\"layoutNode?.type === 'range' ? 'range' : 'number'\"\n [disabled]=\"controlDisabled\">\n <span *ngIf=\"layoutNode?.type === 'range'\" [innerHTML]=\"controlValue\"></span>\n</seam-form-field>\n",
|
|
2319
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2320
|
+
styles: [":host{display:block}"]
|
|
2321
|
+
},] }
|
|
2322
|
+
];
|
|
2323
|
+
TheSeamSchemaFormNumberComponent.ctorParameters = () => [
|
|
2324
|
+
{ type: JsonSchemaFormService }
|
|
2325
|
+
];
|
|
2326
|
+
TheSeamSchemaFormNumberComponent.propDecorators = {
|
|
2327
|
+
layoutNode: [{ type: Input }],
|
|
2328
|
+
layoutIndex: [{ type: Input }],
|
|
2329
|
+
dataIndex: [{ type: Input }]
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2332
|
+
class TheSeamSchemaFormSelectComponent {
|
|
2333
|
+
constructor(jsf) {
|
|
2334
|
+
this.jsf = jsf;
|
|
2335
|
+
this.controlDisabled = false;
|
|
2336
|
+
this.boundControl = false;
|
|
2337
|
+
this.selectList = [];
|
|
2338
|
+
this.isArray = isArray;
|
|
2339
|
+
}
|
|
2340
|
+
ngOnInit() {
|
|
2341
|
+
this.options = this.layoutNode.options || {};
|
|
2342
|
+
this.selectList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, !!this.options.required, !!this.options.flatList);
|
|
2343
|
+
this.jsf.initializeControl(this);
|
|
2344
|
+
}
|
|
2345
|
+
updateValue(event) {
|
|
2346
|
+
this.jsf.updateValue(this, event.value);
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
TheSeamSchemaFormSelectComponent.decorators = [
|
|
2350
|
+
{ type: Component, args: [{
|
|
2351
|
+
selector: 'seam-schema-form-select',
|
|
2352
|
+
template: "<seam-form-field *ngIf=\"boundControl\">\n <ng-template seamFormFieldLabelTpl let-required=\"required\">\n <ng-container *ngIf=\"!options?.notitle\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\"></seam-form-field-required-indicator>\n </ng-container>\n </ng-template>\n <ng-select seamInput\n [formControl]=\"$any(formControl)\"\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [required]=\"options?.required\"\n [items]=\"selectList\"\n bindLabel=\"name\"\n bindValue=\"value\"\n [clearable]=\"false\"\n appendTo=\"body\"\n\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.placeholder]=\"options?.placeholder\"\n [attr.required]=\"options?.required\"\n [readonly]=\"options?.readonly ? true : false\">\n <ng-template ng-label-tmp let-item=\"item\">\n <span [innerHTML]=\"item.name\"></span>\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\n <span [innerHTML]=\"item.name\"></span>\n </ng-template>\n </ng-select>\n</seam-form-field>\n\n<seam-form-field *ngIf=\"!boundControl\">\n <ng-template seamFormFieldLabelTpl let-required=\"required\">\n <ng-container *ngIf=\"!options?.notitle\">\n {{ options?.title }}<seam-form-field-required-indicator class=\"pl-1\"></seam-form-field-required-indicator>\n </ng-container>\n </ng-template>\n <ng-select seamInput\n [ngClass]=\"options?.fieldHtmlClass\"\n [id]=\"'control' + layoutNode?._id\"\n [required]=\"options?.required\"\n [items]=\"selectList\"\n bindLabel=\"name\"\n bindValue=\"value\"\n [clearable]=\"false\"\n (change)=\"updateValue($event)\"\n appendTo=\"body\"\n\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.placeholder]=\"options?.placeholder\"\n [attr.required]=\"options?.required\"\n [readonly]=\"options?.readonly ? true : false\"\n [disabled]=\"controlDisabled\">\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\n <span [innerHTML]=\"item.name\"></span>\n </ng-template>\n </ng-select>\n</seam-form-field>\n",
|
|
2353
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2354
|
+
styles: [":host{display:block}"]
|
|
2355
|
+
},] }
|
|
2356
|
+
];
|
|
2357
|
+
TheSeamSchemaFormSelectComponent.ctorParameters = () => [
|
|
2358
|
+
{ type: JsonSchemaFormService }
|
|
2359
|
+
];
|
|
2360
|
+
TheSeamSchemaFormSelectComponent.propDecorators = {
|
|
2361
|
+
layoutNode: [{ type: Input }],
|
|
2362
|
+
layoutIndex: [{ type: Input }],
|
|
2363
|
+
dataIndex: [{ type: Input }]
|
|
2364
|
+
};
|
|
2365
|
+
|
|
2366
|
+
// NOTE: This component is a little hacky, because I am basically creating a
|
|
2367
|
+
// data widget that acts like a data and 'submit' widget at the same time.
|
|
2368
|
+
//
|
|
2369
|
+
// TODO: Try and think of a nicer way to implement this, but still make sense
|
|
2370
|
+
// from a schema definition. The library may need to me forked to actually
|
|
2371
|
+
// support this in the way I expect, but maybe there is another way.
|
|
2372
|
+
class TheSeamSchemaFormSubmitSplitComponent {
|
|
2373
|
+
constructor(jsf) {
|
|
2374
|
+
this.jsf = jsf;
|
|
2375
|
+
/** @ignore */
|
|
2376
|
+
this._ngUnsubscribe = new Subject();
|
|
2377
|
+
this.controlDisabled = false;
|
|
2378
|
+
this.boundControl = false;
|
|
2379
|
+
this._buttonLabel = '';
|
|
2380
|
+
this._dropdownDisabled = false;
|
|
2381
|
+
this._selectList = [];
|
|
2382
|
+
}
|
|
2383
|
+
/** @ignore */
|
|
2384
|
+
ngOnInit() {
|
|
2385
|
+
this.options = this.layoutNode.options || {};
|
|
2386
|
+
this.jsf.initializeControl(this);
|
|
2387
|
+
// NOTE: This is commented out, because there is a bug with submit widgets
|
|
2388
|
+
// manually defined in layout. All nodes initialized from the provided
|
|
2389
|
+
// layout have their options populated from the defaults and 'disabled' is
|
|
2390
|
+
// on of the default properties, so the 'disableInvalidSubmit' condition
|
|
2391
|
+
// never gets reached.
|
|
2392
|
+
//
|
|
2393
|
+
// My initial idea for fixing would be to check if the disabled property
|
|
2394
|
+
// exists and is a boolean, or possibly anything defined that can coerce
|
|
2395
|
+
// into a boolean. I can't think of a reason disabled should be anything
|
|
2396
|
+
// else, so that may be an acceptable fix, but I don't want to enable that
|
|
2397
|
+
// yet.
|
|
2398
|
+
//
|
|
2399
|
+
// if (hasOwn(this.options, 'disabled')) {
|
|
2400
|
+
// console.log('[TheSeamSchemaFormSubmitSplitComponent] hasDisabled', this.options.disabled)
|
|
2401
|
+
// this.controlDisabled = this.options.disabled
|
|
2402
|
+
// } else
|
|
2403
|
+
if (this.jsf.formOptions.disableInvalidSubmit) {
|
|
2404
|
+
this.controlDisabled = !this.jsf.isValid;
|
|
2405
|
+
this.jsf.isValidChanges.subscribe(isValid => this.controlDisabled = !isValid);
|
|
2406
|
+
}
|
|
2407
|
+
if (this.controlValue === null || this.controlValue === undefined) {
|
|
2408
|
+
this.controlValue = this.options.title;
|
|
2409
|
+
}
|
|
2410
|
+
if (hasOwn(this.options, 'title')) {
|
|
2411
|
+
this._buttonLabel = this.options.title;
|
|
2412
|
+
}
|
|
2413
|
+
this._initDropdown();
|
|
2414
|
+
// console.log('this', this)
|
|
2415
|
+
}
|
|
2416
|
+
/** @ignore */
|
|
2417
|
+
ngOnDestroy() {
|
|
2418
|
+
this._ngUnsubscribe.next();
|
|
2419
|
+
this._ngUnsubscribe.complete();
|
|
2420
|
+
}
|
|
2421
|
+
updateValue(event) {
|
|
2422
|
+
if (typeof this.options.onClick === 'function') {
|
|
2423
|
+
this.options.onClick(event);
|
|
2424
|
+
}
|
|
2425
|
+
else {
|
|
2426
|
+
this.jsf.updateValue(this, event.target.value);
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
_initDropdown() {
|
|
2430
|
+
var _a;
|
|
2431
|
+
if (!hasOwn(this.layoutNode, 'items') || !(this.layoutNode.items || []).length) {
|
|
2432
|
+
return;
|
|
2433
|
+
}
|
|
2434
|
+
if (isDevMode()) {
|
|
2435
|
+
if (this.layoutNode.items.length > 1) {
|
|
2436
|
+
console.warn(`TheSeamSchemaFormSubmitSplitComponent only supports one item.` +
|
|
2437
|
+
` items after index 0 will be ignored.`);
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
const idx = 0;
|
|
2441
|
+
const item = this.layoutNode.items[idx];
|
|
2442
|
+
this._dropdownObj = {
|
|
2443
|
+
layoutNode: item,
|
|
2444
|
+
layoutIndex: (this.layoutIndex || []).concat(idx),
|
|
2445
|
+
dataIndex: ((_a = this.layoutNode) === null || _a === void 0 ? void 0 : _a.dataType) === 'array' ? (this.dataIndex || []).concat(idx) : this.dataIndex,
|
|
2446
|
+
options: item.options || {}
|
|
2447
|
+
};
|
|
2448
|
+
this.jsf.initializeControl(this._dropdownObj);
|
|
2449
|
+
const items = buildTitleMap(this._dropdownObj.options.titleMap || this._dropdownObj.options.enumNames, this._dropdownObj.options.enum, !!this._dropdownObj.options.required, !!this._dropdownObj.options.flatList);
|
|
2450
|
+
this._selectList = items;
|
|
2451
|
+
// TODO: Should this be checking if the control is bound?
|
|
2452
|
+
const dropdownControl = this._getDropdownControl();
|
|
2453
|
+
if (!dropdownControl) {
|
|
2454
|
+
return;
|
|
2455
|
+
}
|
|
2456
|
+
observeControlValue(dropdownControl).pipe(takeUntil(this._ngUnsubscribe)).subscribe(value => {
|
|
2457
|
+
this._setSelectListCheckedProp(value);
|
|
2458
|
+
this._selectedItem = this._getSelectedItem();
|
|
2459
|
+
});
|
|
2460
|
+
observeControlStatus(dropdownControl).pipe(takeUntil(this._ngUnsubscribe)).subscribe(value => {
|
|
2461
|
+
this._dropdownDisabled = dropdownControl.disabled;
|
|
2462
|
+
});
|
|
2463
|
+
}
|
|
2464
|
+
_getDropdownControl() {
|
|
2465
|
+
return this._dropdownObj.formControl;
|
|
2466
|
+
}
|
|
2467
|
+
_setSelectListCheckedProp(value) {
|
|
2468
|
+
const items = this._selectList;
|
|
2469
|
+
for (const item of items) {
|
|
2470
|
+
if (item.value === value) {
|
|
2471
|
+
item.checked = true;
|
|
2472
|
+
}
|
|
2473
|
+
else if (item.checked) {
|
|
2474
|
+
item.checked = false;
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
this._selectList = [...items];
|
|
2478
|
+
}
|
|
2479
|
+
_getSelectedItem() {
|
|
2480
|
+
return (this._selectList || []).find(x => x.checked === true);
|
|
2481
|
+
}
|
|
2482
|
+
_setDropdownValue(value) {
|
|
2483
|
+
const formControl = this._getDropdownControl();
|
|
2484
|
+
formControl === null || formControl === void 0 ? void 0 : formControl.setValue(value);
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
TheSeamSchemaFormSubmitSplitComponent.decorators = [
|
|
2488
|
+
{ type: Component, args: [{
|
|
2489
|
+
selector: 'seam-schema-form-submit-split',
|
|
2490
|
+
template: "<div\n [class]=\"options?.htmlClass || ''\">\n <div [class.btn-group]=\"_dropdownObj\">\n <button seamButton theme=\"primary\" type=\"submit\"\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.readonly]=\"options?.readonly ? 'readonly' : null\"\n [attr.required]=\"options?.required\"\n [class]=\"'btn btn-primary ' + (options?.fieldHtmlClass || '')\"\n [disabled]=\"controlDisabled\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [value]=\"controlValue\"\n (click)=\"updateValue($event)\">\n {{ _buttonLabel }}\n <span *ngIf=\"_selectedItem\">\n [{{ _selectedItem.name }}]\n </span>\n </button>\n <ng-container *ngIf=\"_dropdownObj\">\n <button\n [seamMenuToggle]=\"menu\" seamButton theme=\"primary\"\n class=\"dropdown-toggle dropdown-toggle-split\"\n [disabled]=\"_dropdownDisabled\">\n <span class=\"sr-only\">Toggle Dropdown</span>\n </button>\n <seam-menu #menu>\n <ng-container *ngFor=\"let item of _selectList\">\n <button seamMenuItem\n [class.active]=\"item.checked\"\n (click)=\"_setDropdownValue(item.value)\">\n {{ item.name }}\n </button>\n </ng-container>\n </seam-menu>\n </ng-container>\n </div>\n</div>\n",
|
|
2491
|
+
styles: [":host{display:block}"]
|
|
2492
|
+
},] }
|
|
2493
|
+
];
|
|
2494
|
+
TheSeamSchemaFormSubmitSplitComponent.ctorParameters = () => [
|
|
2495
|
+
{ type: JsonSchemaFormService }
|
|
2496
|
+
];
|
|
2497
|
+
TheSeamSchemaFormSubmitSplitComponent.propDecorators = {
|
|
2498
|
+
layoutNode: [{ type: Input }],
|
|
2499
|
+
layoutIndex: [{ type: Input }],
|
|
2500
|
+
dataIndex: [{ type: Input }]
|
|
2501
|
+
};
|
|
2502
|
+
|
|
2503
|
+
class TheSeamSchemaFormFrameworkComponent {
|
|
2504
|
+
}
|
|
2505
|
+
TheSeamSchemaFormFrameworkComponent.decorators = [
|
|
2506
|
+
{ type: Component, args: [{
|
|
2507
|
+
selector: 'seam-schema-form-framework',
|
|
2508
|
+
template: "<select-widget-widget\n [dataIndex]=\"$any(dataIndex)\"\n [layoutIndex]=\"$any(layoutIndex)\"\n [layoutNode]=\"layoutNode\">\n</select-widget-widget>\n",
|
|
2509
|
+
styles: [""]
|
|
2510
|
+
},] }
|
|
2511
|
+
];
|
|
2512
|
+
TheSeamSchemaFormFrameworkComponent.propDecorators = {
|
|
2513
|
+
layoutNode: [{ type: Input }],
|
|
2514
|
+
layoutIndex: [{ type: Input }],
|
|
2515
|
+
dataIndex: [{ type: Input }]
|
|
2516
|
+
};
|
|
2517
|
+
|
|
2518
|
+
class TheSeamFramework extends Framework {
|
|
2519
|
+
constructor() {
|
|
2520
|
+
super(...arguments);
|
|
2521
|
+
this.name = 'seam-framework';
|
|
2522
|
+
this.framework = TheSeamSchemaFormFrameworkComponent;
|
|
2523
|
+
this.widgets = {
|
|
2524
|
+
'checkbox': TheSeamSchemaFormCheckboxComponent,
|
|
2525
|
+
// 'submit': TheSeamSchemaFormSubmitComponent,
|
|
2526
|
+
'submit': TheSeamSchemaFormSubmitSplitComponent,
|
|
2527
|
+
'text': TheSeamSchemaFormInputComponent,
|
|
2528
|
+
'number': TheSeamSchemaFormNumberComponent,
|
|
2529
|
+
'select': TheSeamSchemaFormSelectComponent
|
|
2530
|
+
};
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
TheSeamFramework.decorators = [
|
|
2534
|
+
{ type: Injectable }
|
|
2535
|
+
];
|
|
2536
|
+
|
|
2537
|
+
class TheSeamSchemaFormSubmitComponent {
|
|
2538
|
+
constructor(jsf) {
|
|
2539
|
+
this.jsf = jsf;
|
|
2540
|
+
this.controlDisabled = false;
|
|
2541
|
+
this.boundControl = false;
|
|
2542
|
+
}
|
|
2543
|
+
ngOnInit() {
|
|
2544
|
+
this.options = this.layoutNode.options || {};
|
|
2545
|
+
this.jsf.initializeControl(this);
|
|
2546
|
+
if (hasOwn(this.options, 'disabled')) {
|
|
2547
|
+
this.controlDisabled = this.options.disabled;
|
|
2548
|
+
}
|
|
2549
|
+
else if (this.jsf.formOptions.disableInvalidSubmit) {
|
|
2550
|
+
this.controlDisabled = !this.jsf.isValid;
|
|
2551
|
+
this.jsf.isValidChanges.subscribe(isValid => this.controlDisabled = !isValid);
|
|
2552
|
+
}
|
|
2553
|
+
if (this.controlValue === null || this.controlValue === undefined) {
|
|
2554
|
+
this.controlValue = this.options.title;
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
updateValue(event) {
|
|
2558
|
+
if (typeof this.options.onClick === 'function') {
|
|
2559
|
+
this.options.onClick(event);
|
|
2560
|
+
}
|
|
2561
|
+
else {
|
|
2562
|
+
this.jsf.updateValue(this, event.target.value);
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
TheSeamSchemaFormSubmitComponent.decorators = [
|
|
2567
|
+
{ type: Component, args: [{
|
|
2568
|
+
selector: 'seam-schema-form-submit',
|
|
2569
|
+
template: "<div\n [class]=\"options?.htmlClass || ''\">\n <input\n [attr.aria-describedby]=\"'control' + layoutNode?._id + 'Status'\"\n [attr.readonly]=\"options?.readonly ? 'readonly' : null\"\n [attr.required]=\"options?.required\"\n [class]=\"'btn btn-primary ' + (options?.fieldHtmlClass || '')\"\n [disabled]=\"controlDisabled\"\n [id]=\"'control' + layoutNode?._id\"\n [name]=\"controlName\"\n [type]=\"layoutNode?.type\"\n [value]=\"controlValue\"\n (click)=\"updateValue($event)\">\n</div>\n"
|
|
2570
|
+
},] }
|
|
2571
|
+
];
|
|
2572
|
+
TheSeamSchemaFormSubmitComponent.ctorParameters = () => [
|
|
2573
|
+
{ type: JsonSchemaFormService }
|
|
2574
|
+
];
|
|
2575
|
+
TheSeamSchemaFormSubmitComponent.propDecorators = {
|
|
2576
|
+
layoutNode: [{ type: Input }],
|
|
2577
|
+
layoutIndex: [{ type: Input }],
|
|
2578
|
+
dataIndex: [{ type: Input }]
|
|
2579
|
+
};
|
|
2580
|
+
|
|
2581
|
+
const controls = [
|
|
2582
|
+
TheSeamSchemaFormCheckboxComponent,
|
|
2583
|
+
TheSeamSchemaFormSubmitComponent,
|
|
2584
|
+
TheSeamSchemaFormSelectComponent,
|
|
2585
|
+
TheSeamSchemaFormInputComponent,
|
|
2586
|
+
TheSeamSchemaFormNumberComponent,
|
|
2587
|
+
TheSeamSchemaFormSubmitSplitComponent
|
|
2588
|
+
];
|
|
2589
|
+
class TheSeamSchemaFormControlsModule {
|
|
2590
|
+
}
|
|
2591
|
+
TheSeamSchemaFormControlsModule.decorators = [
|
|
2592
|
+
{ type: NgModule, args: [{
|
|
2593
|
+
declarations: [
|
|
2594
|
+
...controls
|
|
2595
|
+
],
|
|
2596
|
+
imports: [
|
|
2597
|
+
CommonModule,
|
|
2598
|
+
ReactiveFormsModule,
|
|
2599
|
+
JsonSchemaFormModule,
|
|
2600
|
+
TheSeamFormFieldModule,
|
|
2601
|
+
TheSeamCheckboxModule,
|
|
2602
|
+
TheSeamMenuModule,
|
|
2603
|
+
TheSeamButtonsModule,
|
|
2604
|
+
NgSelectModule
|
|
2605
|
+
],
|
|
2606
|
+
exports: [
|
|
2607
|
+
...controls,
|
|
2608
|
+
JsonSchemaFormModule
|
|
2609
|
+
],
|
|
2610
|
+
entryComponents: [
|
|
2611
|
+
...controls
|
|
2612
|
+
]
|
|
2613
|
+
},] }
|
|
2614
|
+
];
|
|
2615
|
+
|
|
2616
|
+
class TheSeamSchemaFormModule {
|
|
2617
|
+
}
|
|
2618
|
+
TheSeamSchemaFormModule.decorators = [
|
|
2619
|
+
{ type: NgModule, args: [{
|
|
2620
|
+
declarations: [
|
|
2621
|
+
TheSeamSchemaFormFrameworkComponent
|
|
2622
|
+
],
|
|
2623
|
+
imports: [
|
|
2624
|
+
CommonModule,
|
|
2625
|
+
JsonSchemaFormModule,
|
|
2626
|
+
TheSeamSchemaFormControlsModule,
|
|
2627
|
+
WidgetLibraryModule,
|
|
2628
|
+
],
|
|
2629
|
+
providers: [
|
|
2630
|
+
JsonSchemaFormService,
|
|
2631
|
+
FrameworkLibraryService,
|
|
2632
|
+
WidgetLibraryService,
|
|
2633
|
+
{ provide: Framework, useClass: TheSeamFramework, multi: true }
|
|
2634
|
+
],
|
|
2635
|
+
exports: [
|
|
2636
|
+
TheSeamSchemaFormFrameworkComponent,
|
|
2637
|
+
JsonSchemaFormModule
|
|
2638
|
+
],
|
|
2639
|
+
entryComponents: [
|
|
2640
|
+
TheSeamSchemaFormFrameworkComponent
|
|
2641
|
+
]
|
|
2642
|
+
},] }
|
|
2643
|
+
];
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* Generated bundle index. Do not edit.
|
|
2647
|
+
*/
|
|
2648
|
+
|
|
2649
|
+
export { BaseLayoutContentDirective, BaseLayoutContentFooterDirective, BaseLayoutContentHeaderDirective, BaseLayoutNavToggleDirective, BaseLayoutSideBarDirective, BaseLayoutTopBarDirective, DashboardComponent, DashboardWidgetContainerComponent, DashboardWidgetPortalOutletDirective, DashboardWidgetTemplateContainerComponent, DashboardWidgetsComponent, DashboardWidgetsPreferencesService, DashboardWidgetsService, HierarchyLevelResolver, HierarchyRouterOutletComponent, SideNavComponent, SideNavItemComponent, SideNavToggleComponent, THESEAM_BASE_LAYOUT_REF, THESEAM_DASHBOARD_WIDGETS_PREFERENCES_ACCESSOR, THE_SEAM_BASE_LAYOUT, TheSeamBaseLayoutComponent, TheSeamBaseLayoutModule, TheSeamDashboardModule, TheSeamDynamicRouterModule, TheSeamFramework, TheSeamSchemaFormFrameworkComponent, TheSeamSchemaFormModule, TheSeamSideNavModule, TheSeamTopBarComponent, TheSeamTopBarModule, TopBarItemDirective, TopBarMenuBtnDetailDirective, TopBarMenuButtonComponent, TopBarMenuDirective, TopBarTitleComponent, canBeActive, canExpand, canHaveChildren, fader, findLinkItems, getItemStateProp, hasActiveChild, hasChildren, hasExpandedChild, isExpanded, isNavItemActive, isNavItemType, routeChanges, setDefaultState, setItemStateProp, sideNavExpandStateChangeFn, sideToSide, slider, stepper, transformer, TheSeamSideNavService as ɵa, TheSeamSchemaFormControlsModule as ɵb, TheSeamSchemaFormCheckboxComponent as ɵc, TheSeamSchemaFormSubmitComponent as ɵd, TheSeamSchemaFormSelectComponent as ɵe, TheSeamSchemaFormInputComponent as ɵf, TheSeamSchemaFormNumberComponent as ɵg, TheSeamSchemaFormSubmitSplitComponent as ɵh };
|
|
2650
|
+
//# sourceMappingURL=theseam-ui-common-framework.js.map
|