@coolon/angular-ui-powerups 12.4.0-alpha.9 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/activities/activities.scss +80 -0
- package/assets/activities/input-activities.scss +36 -0
- package/assets/cards.scss +17 -0
- package/assets/form.scss +10 -2
- package/assets/forms/mixins.scss +6 -0
- package/assets/interaction/editor/inline-string-editor.scss +54 -0
- package/assets/interaction.scss +10 -7
- package/assets/markdown.scss +10 -0
- package/assets/mixins.scss +5 -7
- package/assets/pills.scss +45 -0
- package/assets/styles.scss +10 -15
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js +741 -336
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +1529 -488
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/cypress/component-builder.d.ts +71 -0
- package/cypress/components/aup-abstract-activity.d.ts +31 -0
- package/cypress/components/aup-abstract-table.d.ts +18 -0
- package/cypress/components/aup-activity.d.ts +9 -0
- package/cypress/components/aup-alert-dialog.d.ts +27 -0
- package/cypress/components/aup-alert.d.ts +9 -0
- package/cypress/components/aup-command-face.d.ts +2 -8
- package/cypress/components/aup-command.d.ts +2 -1
- package/cypress/components/aup-confirm-dialog.d.ts +27 -0
- package/cypress/components/aup-confirm.d.ts +11 -0
- package/cypress/components/aup-empty-state.d.ts +1 -2
- package/cypress/components/aup-input.d.ts +11 -5
- package/cypress/components/aup-modal-activity.d.ts +24 -0
- package/cypress/components/aup-modal-mixin.d.ts +23 -0
- package/cypress/components/aup-table.d.ts +5 -18
- package/cypress/components/aup-tree-table.d.ts +16 -0
- package/cypress/components/button.d.ts +11 -7
- package/cypress/components/form-element-mixin.d.ts +22 -0
- package/cypress/components/mat-checkbox.d.ts +31 -0
- package/cypress/components/popup/aup-abstract-popup-menu.d.ts +15 -0
- package/cypress/components/popup/aup-more-menu.d.ts +5 -0
- package/cypress/components/popup/aup-popup-menu-panel.d.ts +3 -0
- package/cypress/components/popup/aup-popup-menu.d.ts +7 -0
- package/cypress/components/table/aup-table-cell.d.ts +9 -0
- package/cypress/components/table/aup-table-column.d.ts +10 -0
- package/cypress/components/table/aup-table-row.d.ts +17 -0
- package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
- package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
- package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
- package/cypress/element-locator.d.ts +8 -0
- package/cypress/exports.d.ts +24 -4
- package/cypress/package.json +1 -1
- package/cypress/page-builder.d.ts +9 -0
- package/cypress/page-element.d.ts +12 -12
- package/cypress/page.d.ts +8 -34
- package/esm2015/cypress/component-builder.js +92 -0
- package/esm2015/cypress/component-builder.js.map +1 -0
- package/esm2015/cypress/component-builder.metadata.json +1 -0
- package/esm2015/cypress/components/aup-abstract-activity.js +12 -0
- package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -0
- package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -0
- package/esm2015/cypress/components/aup-abstract-table.js +50 -0
- package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
- package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
- package/esm2015/cypress/components/aup-activity.js +13 -0
- package/esm2015/cypress/components/aup-activity.js.map +1 -0
- package/esm2015/cypress/components/aup-activity.metadata.json +1 -0
- package/esm2015/cypress/components/aup-alert-dialog.js +8 -0
- package/esm2015/cypress/components/aup-alert-dialog.js.map +1 -0
- package/esm2015/cypress/components/aup-alert-dialog.metadata.json +1 -0
- package/esm2015/cypress/components/aup-alert.js +13 -0
- package/esm2015/cypress/components/aup-alert.js.map +1 -0
- package/esm2015/cypress/components/aup-alert.metadata.json +1 -0
- package/esm2015/cypress/components/aup-command-face.js +11 -22
- package/esm2015/cypress/components/aup-command-face.js.map +1 -1
- package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
- package/esm2015/cypress/components/aup-command.js +12 -6
- package/esm2015/cypress/components/aup-command.js.map +1 -1
- package/esm2015/cypress/components/aup-command.metadata.json +1 -1
- package/esm2015/cypress/components/aup-confirm-dialog.js +8 -0
- package/esm2015/cypress/components/aup-confirm-dialog.js.map +1 -0
- package/esm2015/cypress/components/aup-confirm-dialog.metadata.json +1 -0
- package/esm2015/cypress/components/aup-confirm.js +19 -0
- package/esm2015/cypress/components/aup-confirm.js.map +1 -0
- package/esm2015/cypress/components/aup-confirm.metadata.json +1 -0
- package/esm2015/cypress/components/aup-empty-state.js +2 -2
- package/esm2015/cypress/components/aup-empty-state.js.map +1 -1
- package/esm2015/cypress/components/aup-empty-state.metadata.json +1 -1
- package/esm2015/cypress/components/aup-input.js +17 -5
- package/esm2015/cypress/components/aup-input.js.map +1 -1
- package/esm2015/cypress/components/aup-input.metadata.json +1 -1
- package/esm2015/cypress/components/aup-modal-activity.js +5 -0
- package/esm2015/cypress/components/aup-modal-activity.js.map +1 -0
- package/esm2015/cypress/components/aup-modal-activity.metadata.json +1 -0
- package/esm2015/cypress/components/aup-modal-mixin.js +18 -0
- package/esm2015/cypress/components/aup-modal-mixin.js.map +1 -0
- package/esm2015/cypress/components/aup-modal-mixin.metadata.json +1 -0
- package/esm2015/cypress/components/aup-navigation.js +1 -1
- package/esm2015/cypress/components/aup-navigation.js.map +1 -1
- package/esm2015/cypress/components/aup-table.js +5 -33
- package/esm2015/cypress/components/aup-table.js.map +1 -1
- package/esm2015/cypress/components/aup-table.metadata.json +1 -1
- package/esm2015/cypress/components/aup-tree-table.js +34 -0
- package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
- package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
- package/esm2015/cypress/components/button.js +4 -10
- package/esm2015/cypress/components/button.js.map +1 -1
- package/esm2015/cypress/components/button.metadata.json +1 -1
- package/esm2015/cypress/components/form-element-mixin.js +11 -0
- package/esm2015/cypress/components/form-element-mixin.js.map +1 -0
- package/esm2015/cypress/components/form-element-mixin.metadata.json +1 -0
- package/esm2015/cypress/components/mat-checkbox.js +34 -0
- package/esm2015/cypress/components/mat-checkbox.js.map +1 -0
- package/esm2015/cypress/components/mat-checkbox.metadata.json +1 -0
- package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js +33 -0
- package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js.map +1 -0
- package/esm2015/cypress/components/popup/aup-abstract-popup-menu.metadata.json +1 -0
- package/esm2015/cypress/components/popup/aup-more-menu.js +8 -0
- package/esm2015/cypress/components/popup/aup-more-menu.js.map +1 -0
- package/esm2015/cypress/components/popup/aup-more-menu.metadata.json +1 -0
- package/esm2015/cypress/components/popup/aup-popup-menu-panel.js +4 -0
- package/esm2015/cypress/components/popup/aup-popup-menu-panel.js.map +1 -0
- package/esm2015/cypress/components/popup/aup-popup-menu-panel.metadata.json +1 -0
- package/esm2015/cypress/components/popup/aup-popup-menu.js +12 -0
- package/esm2015/cypress/components/popup/aup-popup-menu.js.map +1 -0
- package/esm2015/cypress/components/popup/aup-popup-menu.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-cell.js +14 -0
- package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-column.js +19 -0
- package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-row.js +28 -0
- package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
- package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
- package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
- package/esm2015/cypress/element-locator.js +16 -0
- package/esm2015/cypress/element-locator.js.map +1 -0
- package/esm2015/cypress/element-locator.metadata.json +1 -0
- package/esm2015/cypress/exports.js +24 -4
- package/esm2015/cypress/exports.js.map +1 -1
- package/esm2015/cypress/exports.metadata.json +1 -1
- package/esm2015/cypress/page-builder.js +16 -0
- package/esm2015/cypress/page-builder.js.map +1 -0
- package/esm2015/cypress/page-builder.metadata.json +1 -0
- package/esm2015/cypress/page-element.js +26 -19
- package/esm2015/cypress/page-element.js.map +1 -1
- package/esm2015/cypress/page-element.metadata.json +1 -1
- package/esm2015/cypress/page.js +31 -19
- package/esm2015/cypress/page.js.map +1 -1
- package/esm2015/cypress/page.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/busy-overlay/busy-overlay.component.js +1 -1
- package/esm2015/lib/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
- package/esm2015/lib/components/cards/abstract-card-container.component.js +29 -0
- package/esm2015/lib/components/cards/abstract-card-container.component.js.map +1 -0
- package/esm2015/lib/components/cards/abstract-card-container.component.metadata.json +1 -0
- package/esm2015/lib/components/cards/abstract-card-container.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/cards/card-container/card-container.component.js +123 -0
- package/esm2015/lib/components/cards/card-container/card-container.component.js.map +1 -0
- package/esm2015/lib/components/cards/card-container/card-container.component.metadata.json +1 -0
- package/esm2015/lib/components/cards/card-container/card-container.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/cards/card-container/card-container.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/cards/card-stack/card-stack.component.js +78 -0
- package/esm2015/lib/components/cards/card-stack/card-stack.component.js.map +1 -0
- package/esm2015/lib/components/cards/card-stack/card-stack.component.metadata.json +1 -0
- package/esm2015/lib/components/cards/card-stack/card-stack.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/cards/card-stack/card-stack.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/command/command.component.js +10 -10
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.js +5 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +4 -3
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js +3 -3
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +1 -2
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +1 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +43 -25
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
- package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
- package/esm2015/lib/components/exports.js +8 -4
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/esm2015/lib/components/focus-container/focus-container.component.js +1 -1
- package/esm2015/lib/components/focus-container/focus-container.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +1 -0
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +2 -2
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +2 -2
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +2 -2
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/icon/icon.component.js +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
- package/esm2015/lib/components/labelled-value/labelled-value.component.js +22 -0
- package/esm2015/lib/components/labelled-value/labelled-value.component.js.map +1 -0
- package/esm2015/lib/components/labelled-value/labelled-value.component.metadata.json +1 -0
- package/esm2015/lib/components/labelled-value/labelled-value.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/{card-container/card-container.component.scss.shim.ngstyle.js.map → labelled-value/labelled-value.component.scss.shim.ngstyle.js.map} +1 -1
- package/esm2015/lib/components/loading-container/loading-container.component.js +45 -0
- package/esm2015/lib/components/loading-container/loading-container.component.js.map +1 -0
- package/esm2015/lib/components/loading-container/loading-container.component.metadata.json +1 -0
- package/esm2015/lib/components/loading-container/loading-container.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/loading-container/loading-container.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/noop/noop.component.js +1 -1
- package/esm2015/lib/components/noop/noop.component.metadata.json +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
- package/esm2015/lib/components/section-header/section-header.component.js +12 -5
- package/esm2015/lib/components/section-header/section-header.component.js.map +1 -1
- package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
- package/esm2015/lib/components/switch-case/switch-case.component.js +1 -1
- package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/abstract-table-model.js +34 -20
- package/esm2015/lib/components/tables/abstract-table-model.js.map +1 -1
- package/esm2015/lib/components/tables/abstract-table-model.metadata.json +1 -1
- package/esm2015/lib/components/tables/column-list-model.js +2 -1
- package/esm2015/lib/components/tables/column-list-model.js.map +1 -1
- package/esm2015/lib/components/tables/edit-session.js.map +1 -0
- package/esm2015/lib/components/tables/{table/edit-session.metadata.json → edit-session.metadata.json} +1 -1
- package/esm2015/lib/components/tables/table/cell-portal-ref.js.map +1 -1
- package/esm2015/lib/components/tables/table/cell-renderer.js.map +1 -1
- package/esm2015/lib/components/tables/table/column-model.js +35 -10
- package/esm2015/lib/components/tables/table/column-model.js.map +1 -1
- package/esm2015/lib/components/tables/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/edit-row-controls/edit-row-controls.component.js +19 -12
- package/esm2015/lib/components/tables/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm2015/lib/components/tables/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/paginator/paginator.component.js +1 -1
- package/esm2015/lib/components/tables/table/paginator/paginator.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/tables/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/tables/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/tables/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js +0 -2
- package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js.map +1 -1
- package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/table.component.js +14 -13
- package/esm2015/lib/components/tables/table/table.component.js.map +1 -1
- package/esm2015/lib/components/tables/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/table/text-search-predicate.js +2 -0
- package/esm2015/lib/components/tables/table/text-search-predicate.js.map +1 -0
- package/esm2015/lib/components/tables/table/text-search-predicate.metadata.json +1 -0
- package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
- package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.js +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js +21 -13
- package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-label-column-model.js +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-label-column-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-label-column-model.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-component.js +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-component.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-component.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js +3 -2
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
- package/esm2015/lib/components/text/markdown/markdown.component.js +78 -0
- package/esm2015/lib/components/text/markdown/markdown.component.js.map +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.metadata.json +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/track-by.js +12 -0
- package/esm2015/lib/components/track-by.js.map +1 -1
- package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.js +1 -1
- package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.metadata.json +1 -1
- package/esm2015/lib/directives/command.directive.js +1 -1
- package/esm2015/lib/directives/command.directive.js.map +1 -1
- package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/abstract-interaction-context.js +7 -0
- package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/abstract-interaction-context.metadata.json +1 -1
- package/esm2015/lib/interaction/activity.js +2 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/alert.js +17 -1
- package/esm2015/lib/interaction/alert.js.map +1 -1
- package/esm2015/lib/interaction/components/abstract-confirm-dialog.component.js +23 -0
- package/esm2015/lib/interaction/components/abstract-confirm-dialog.component.js.map +1 -0
- package/esm2015/lib/interaction/components/abstract-confirm-dialog.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/abstract-confirm-dialog.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/abstract-dialog.component.js +52 -0
- package/esm2015/lib/interaction/components/abstract-dialog.component.js.map +1 -0
- package/esm2015/lib/interaction/components/abstract-dialog.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/abstract-dialog.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +17 -11
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +3 -3
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-title/activity-title.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-title/activity-title.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js +4 -0
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js +5 -2
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js +5 -2
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js +5 -2
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js +77 -0
- package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js.map +1 -0
- package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +8 -14
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +8 -31
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js +30 -0
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js.map +1 -0
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +7 -26
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/editors/edit-context.js +2 -0
- package/esm2015/lib/interaction/components/editors/edit-context.js.map +1 -0
- package/esm2015/lib/interaction/components/editors/edit-context.metadata.json +1 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js +50 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map +1 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.metadata.json +1 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +161 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js.map +1 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +10 -3
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/input-activities/input-activity.js +95 -0
- package/esm2015/lib/interaction/components/input-activities/input-activity.js.map +1 -0
- package/esm2015/lib/interaction/components/input-activities/input-activity.metadata.json +1 -0
- package/esm2015/lib/interaction/components/input-activities/input-activity.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +5 -3
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +6 -4
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/exports.js +8 -4
- package/esm2015/lib/interaction/exports.js.map +1 -1
- package/esm2015/lib/interaction/exports.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.js +29 -9
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.js +1 -1
- package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +1 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +18 -6
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/guards/consolidated-param-map.js +2 -1
- package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
- package/esm2015/lib/place/guards/consolidated-param-map.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +2 -1
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/place-component.js +31 -4
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +11 -14
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm2015/lib/place/route/parameter-definition.js +36 -13
- package/esm2015/lib/place/route/parameter-definition.js.map +1 -1
- package/esm2015/lib/place/route/parameter-definition.metadata.json +1 -1
- package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
- package/esm2015/lib/place/visit.js +8 -4
- package/esm2015/lib/place/visit.js.map +1 -1
- package/esm2015/lib/place/visit.metadata.json +1 -1
- package/esm2015/lib/services/exports.js +2 -0
- package/esm2015/lib/services/exports.js.map +1 -1
- package/esm2015/lib/services/exports.metadata.json +1 -1
- package/esm2015/lib/services/markdown/markdown.service.js +25 -0
- package/esm2015/lib/services/markdown/markdown.service.js.map +1 -0
- package/esm2015/lib/services/markdown/markdown.service.metadata.json +1 -0
- package/esm2015/lib/services/markdown/markdown.service.ngfactory.js.map +1 -0
- package/esm2015/lib/services/markdown/pill-plugin.js +38 -0
- package/esm2015/lib/services/markdown/pill-plugin.js.map +1 -0
- package/esm2015/lib/services/markdown/pill-plugin.metadata.json +1 -0
- package/fesm2015/coolon-angular-ui-powerups-cypress.js +546 -244
- package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +1270 -387
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/cards/abstract-card-container.component.d.ts +11 -0
- package/lib/components/{card-container → cards/card-container}/card-container.component.d.ts +30 -9
- package/lib/components/cards/card-stack/card-stack.component.d.ts +65 -0
- package/lib/components/commands/command/command.component.d.ts +6 -6
- package/lib/components/commands/command-face/command-face.component.d.ts +1 -0
- package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +1 -0
- package/lib/components/exports.d.ts +8 -4
- package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
- package/lib/components/loading-container/loading-container.component.d.ts +11 -0
- package/lib/components/section-header/section-header.component.d.ts +5 -2
- package/lib/components/tables/abstract-table-model.d.ts +10 -7
- package/lib/components/tables/{table/edit-session.d.ts → edit-session.d.ts} +3 -3
- package/lib/components/tables/table/cell-portal-ref.d.ts +1 -1
- package/lib/components/tables/table/cell-renderer.d.ts +2 -0
- package/lib/components/tables/table/column-model.d.ts +14 -5
- package/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.d.ts +2 -1
- package/lib/components/tables/table/edit-row-controls/edit-row-controls.component.d.ts +4 -2
- package/lib/components/tables/table/table-cell-renderer/table-cell-renderer.component.d.ts +1 -1
- package/lib/components/tables/table/table-row-menu/table-row-menu.component.d.ts +2 -3
- package/lib/components/tables/table/table.component.d.ts +13 -12
- package/lib/components/tables/table/text-search-predicate.d.ts +1 -0
- package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
- package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +2 -3
- package/lib/components/tables/tree-table/tree-label-column-model.d.ts +2 -3
- package/lib/components/tables/tree-table/tree-table-component.d.ts +1 -1
- package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
- package/lib/components/text/markdown/markdown.component.d.ts +28 -0
- package/lib/components/track-by.d.ts +9 -0
- package/lib/interaction/abstract-interaction-context.d.ts +1 -0
- package/lib/interaction/alert.d.ts +7 -1
- package/lib/interaction/components/abstract-confirm-dialog.component.d.ts +7 -0
- package/lib/interaction/components/abstract-dialog.component.d.ts +17 -0
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +14 -3
- package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +1 -1
- package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +2 -1
- package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +2 -1
- package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +2 -1
- package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +39 -0
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +2 -7
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +2 -10
- package/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.d.ts +12 -0
- package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +2 -9
- package/lib/interaction/components/editors/edit-context.d.ts +3 -0
- package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +24 -0
- package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +57 -0
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +2 -0
- package/lib/interaction/components/input-activities/input-activity.d.ts +41 -0
- package/lib/interaction/components/input-activities/select-input-activity.d.ts +11 -3
- package/lib/interaction/components/input-activities/string-input-activity.d.ts +6 -2
- package/lib/interaction/exports.d.ts +8 -4
- package/lib/interaction/interaction-context.d.ts +1 -0
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +1 -0
- package/lib/place/place-component.d.ts +6 -1
- package/lib/place/place-router.d.ts +2 -2
- package/lib/place/route/parameter-decorators.d.ts +5 -0
- package/lib/place/route/parameter-definition.d.ts +6 -1
- package/lib/place/route/parameter-sanitiser.d.ts +2 -3
- package/lib/place/visit.d.ts +2 -2
- package/lib/services/exports.d.ts +2 -0
- package/lib/services/markdown/markdown.service.d.ts +6 -0
- package/lib/services/markdown/pill-plugin.d.ts +15 -0
- package/package.json +17 -16
- package/schematics/activity/index.js +1 -1
- package/schematics/activity/index.js.map +1 -1
- package/schematics/activity/templates/component/__name@dasherize__.component.html.template +1 -1
- package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +5 -3
- package/schematics/aup-i18n/index.js +1 -1
- package/schematics/aup-i18n/index.js.map +1 -1
- package/schematics/component/index.js +1 -1
- package/schematics/component/index.js.map +1 -1
- package/schematics/component/templates/component/__name@dasherize__.component.ts.template +1 -1
- package/schematics/place-routes/place-class-scanner.js +3 -1
- package/schematics/place-routes/place-class-scanner.js.map +1 -1
- package/schematics/utils/build-context.d.ts +6 -3
- package/schematics/utils/build-context.js +3 -3
- package/schematics/utils/build-context.js.map +1 -1
- package/schematics/utils/workspace.d.ts +1 -0
- package/schematics/utils/workspace.js +11 -3
- package/schematics/utils/workspace.js.map +1 -1
- package/assets/activities.scss +0 -70
- package/cypress/components/aup-more-menu.d.ts +0 -4
- package/cypress/components/aup-popup-menu.d.ts +0 -7
- package/cypress/components/button-mixin.d.ts +0 -19
- package/cypress/section.d.ts +0 -55
- package/esm2015/cypress/components/aup-more-menu.js +0 -7
- package/esm2015/cypress/components/aup-more-menu.js.map +0 -1
- package/esm2015/cypress/components/aup-more-menu.metadata.json +0 -1
- package/esm2015/cypress/components/aup-popup-menu.js +0 -19
- package/esm2015/cypress/components/aup-popup-menu.js.map +0 -1
- package/esm2015/cypress/components/aup-popup-menu.metadata.json +0 -1
- package/esm2015/cypress/components/button-mixin.js +0 -15
- package/esm2015/cypress/components/button-mixin.js.map +0 -1
- package/esm2015/cypress/components/button-mixin.metadata.json +0 -1
- package/esm2015/cypress/section.js +0 -76
- package/esm2015/cypress/section.js.map +0 -1
- package/esm2015/cypress/section.metadata.json +0 -1
- package/esm2015/lib/components/card-container/card-container.component.js +0 -84
- package/esm2015/lib/components/card-container/card-container.component.js.map +0 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +0 -1
- package/esm2015/lib/components/card-container/card-container.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/tables/table/edit-session.js.map +0 -1
- package/esm2015/lib/components/tables/tree-table/tree-node.js +0 -2
- package/esm2015/lib/components/tables/tree-table/tree-node.js.map +0 -1
- package/esm2015/lib/components/tables/tree-table/tree-node.metadata.json +0 -1
- package/esm2015/lib/components/tables/tree-table/visitable.class.js +0 -26
- package/esm2015/lib/components/tables/tree-table/visitable.class.js.map +0 -1
- package/esm2015/lib/components/tables/tree-table/visitable.class.metadata.json +0 -1
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +0 -43
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +0 -1
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +0 -1
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.ngfactory.js.map +0 -1
- package/esm2015/lib/interaction/components/input-activities/input-activity-data.js +0 -2
- package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +0 -1
- package/esm2015/lib/interaction/components/input-activities/input-activity-data.metadata.json +0 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js +0 -2
- package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js.map +0 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.metadata.json +0 -1
- package/esm2015/lib/interaction/result.js +0 -4
- package/esm2015/lib/interaction/result.js.map +0 -1
- package/esm2015/lib/interaction/result.metadata.json +0 -1
- package/lib/components/tables/tree-table/tree-node.d.ts +0 -3
- package/lib/components/tables/tree-table/visitable.class.d.ts +0 -22
- package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +0 -12
- package/lib/interaction/components/input-activities/input-activity-data.d.ts +0 -11
- package/lib/interaction/components/input-activities/select-input-activity-data.d.ts +0 -8
- package/lib/interaction/result.d.ts +0 -8
- /package/esm2015/lib/components/tables/{table/edit-session.js → edit-session.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild,
|
|
4
|
+
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, HostBinding, ViewEncapsulation, InjectionToken, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, PLATFORM_ID, Injector, ComponentFactoryResolver } from '@angular/core';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -16,21 +16,24 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
|
16
16
|
import { MatDividerModule } from '@angular/material/divider';
|
|
17
17
|
import { MatIconModule } from '@angular/material/icon';
|
|
18
18
|
import { MatMenuItem, MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
19
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
19
20
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
20
21
|
import { MatTableModule } from '@angular/material/table';
|
|
21
22
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
22
23
|
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
|
23
24
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
24
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred,
|
|
25
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Functions } from '@coolon/pectin';
|
|
25
26
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
26
27
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
27
28
|
import * as _ from 'lodash';
|
|
28
29
|
import ___default from 'lodash';
|
|
30
|
+
import { marked } from 'marked';
|
|
29
31
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
30
32
|
import { Enum } from 'typescript-string-enums';
|
|
31
|
-
import {
|
|
33
|
+
import { lang as lang$1, assert as assert$1, Stringy, Opts, Klass } from '@coolon/typescript-utilities';
|
|
32
34
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
33
35
|
import produce from 'immer';
|
|
36
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
34
37
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
35
38
|
import * as i1$1 from '@angular/material/dialog';
|
|
36
39
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
@@ -47,7 +50,7 @@ class CommandDirective extends GarbageCollector {
|
|
|
47
50
|
constructor(elementRef, matButton, matMenuItem) {
|
|
48
51
|
super();
|
|
49
52
|
this.elementRef = elementRef;
|
|
50
|
-
this._commandEnabled = new DelegatingValueModel().withDefault(false);
|
|
53
|
+
this._commandEnabled = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
51
54
|
this._commandParameterProvided = false;
|
|
52
55
|
// Material buttons and menu items don't respond to the disabled binding so we
|
|
53
56
|
// need to inject them from our host element and handle them manually.
|
|
@@ -390,6 +393,66 @@ DirectivesModule.decorators = [
|
|
|
390
393
|
},] }
|
|
391
394
|
];
|
|
392
395
|
|
|
396
|
+
const markdownPillExtension = (renderPill) => {
|
|
397
|
+
return {
|
|
398
|
+
name: 'aup-pill',
|
|
399
|
+
level: 'inline',
|
|
400
|
+
start: (src) => {
|
|
401
|
+
var _a;
|
|
402
|
+
const index = (_a = src.match(/\(\([^)]/)) === null || _a === void 0 ? void 0 : _a.index;
|
|
403
|
+
// if (index) {
|
|
404
|
+
// console.log({start:src})
|
|
405
|
+
// }
|
|
406
|
+
return index;
|
|
407
|
+
},
|
|
408
|
+
tokenizer: function (src) {
|
|
409
|
+
const rule = /^(\(\((([^)])+)\)\))/; // Regex for the complete token
|
|
410
|
+
const match = rule.exec(src);
|
|
411
|
+
if (match) {
|
|
412
|
+
const token = {
|
|
413
|
+
type: 'aup-pill',
|
|
414
|
+
raw: match[0],
|
|
415
|
+
text: match[2].trim(), // Additional custom properties
|
|
416
|
+
// tokens: [] // Array where child inline tokens will be generated
|
|
417
|
+
};
|
|
418
|
+
// console.log(token)
|
|
419
|
+
// this.lexer.inlineTokens(token.text, token.tokens); // Queue this data to be processed for inline tokens
|
|
420
|
+
return token;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
return undefined;
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
renderer: function (token) {
|
|
427
|
+
// @ts-ignore (until typings are up to date)
|
|
428
|
+
const url = token.text;
|
|
429
|
+
return renderPill(token.text);
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
class MarkdownService {
|
|
435
|
+
constructor() {
|
|
436
|
+
}
|
|
437
|
+
render(content) {
|
|
438
|
+
return marked.parse(content, {
|
|
439
|
+
smartLists: true
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
renderInline(content) {
|
|
443
|
+
return marked.parseInline(content);
|
|
444
|
+
}
|
|
445
|
+
usePillExtension(renderer) {
|
|
446
|
+
marked.use({
|
|
447
|
+
extensions: [markdownPillExtension(renderer !== null && renderer !== void 0 ? renderer : (text => `<span class='aup-pill'>${text}<span>`))]
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
MarkdownService.decorators = [
|
|
452
|
+
{ type: Injectable }
|
|
453
|
+
];
|
|
454
|
+
MarkdownService.ctorParameters = () => [];
|
|
455
|
+
|
|
393
456
|
class BusyOverlayComponent extends GarbageCollector {
|
|
394
457
|
constructor() {
|
|
395
458
|
super();
|
|
@@ -401,7 +464,7 @@ BusyOverlayComponent.decorators = [
|
|
|
401
464
|
{ type: Component, args: [{
|
|
402
465
|
selector: 'aup-busy-overlay',
|
|
403
466
|
template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
|
|
404
|
-
styles: [":host{position:relative}div.busy-overlay-backdrop{
|
|
467
|
+
styles: [":host{position:relative}div.busy-overlay-backdrop{z-index:10;z-index:var(--aup-busy-overlay-z-index, 10);position:absolute;background-color:#0003;top:0;left:0;bottom:0;right:0;display:grid;grid-template-columns:auto;grid-template-rows:auto;place-content:center}\n"]
|
|
405
468
|
},] }
|
|
406
469
|
];
|
|
407
470
|
BusyOverlayComponent.ctorParameters = () => [];
|
|
@@ -526,6 +589,30 @@ var CommandFace;
|
|
|
526
589
|
CommandFace.Adapter = Adapter;
|
|
527
590
|
})(CommandFace || (CommandFace = {}));
|
|
528
591
|
|
|
592
|
+
class AbstractCardContainerComponent extends DisposableComponent {
|
|
593
|
+
constructor() {
|
|
594
|
+
super();
|
|
595
|
+
}
|
|
596
|
+
ngOnInit() {
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
AbstractCardContainerComponent.decorators = [
|
|
600
|
+
{ type: Component, args: [{
|
|
601
|
+
selector: 'aup-abstract-card-container',
|
|
602
|
+
template: ''
|
|
603
|
+
},] }
|
|
604
|
+
];
|
|
605
|
+
AbstractCardContainerComponent.ctorParameters = () => [];
|
|
606
|
+
AbstractCardContainerComponent.propDecorators = {
|
|
607
|
+
addCardCommand: [{ type: Input }],
|
|
608
|
+
addCardFace: [{ type: Input }],
|
|
609
|
+
addCardTemplate: [{ type: ContentChild, args: ['addCardTemplate',] }]
|
|
610
|
+
};
|
|
611
|
+
__decorate([
|
|
612
|
+
TrackExternal(),
|
|
613
|
+
__metadata("design:type", Command)
|
|
614
|
+
], AbstractCardContainerComponent.prototype, "addCardCommand", void 0);
|
|
615
|
+
|
|
529
616
|
/**
|
|
530
617
|
* @example
|
|
531
618
|
* // basic usage
|
|
@@ -543,6 +630,13 @@ var CommandFace;
|
|
|
543
630
|
* <my-card *ngFor="..."></my-card>
|
|
544
631
|
* </aup-card-container>
|
|
545
632
|
*
|
|
633
|
+
* // use the aup-add-card-activity to display as the new card place holder and to run
|
|
634
|
+
* // the activity inside teh card
|
|
635
|
+
* <aup-card-container [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
|
|
636
|
+
* <my-card *ngFor="..."></my-card>
|
|
637
|
+
* <aup-add-card-activity type="inline" renderAs="card" [face]="i18n.commands.addModal" [activityClass]="AddCardActivity"></aup-add-card-activity>
|
|
638
|
+
* </aup-card-container>
|
|
639
|
+
*
|
|
546
640
|
* // adds an add card component using the specified template. The template
|
|
547
641
|
* // will fill it's container in the grid.
|
|
548
642
|
* <aup-card-container>
|
|
@@ -575,35 +669,144 @@ var CommandFace;
|
|
|
575
669
|
* aup-card-container {
|
|
576
670
|
* --card-gap: var(--card-gap, 16px);
|
|
577
671
|
* --card-width: var(--card-width, 300px);
|
|
672
|
+
* --card-max-width: auto;
|
|
578
673
|
* --card-height: var(--card-height, auto);
|
|
579
674
|
* --card-min-height: var(--card-min-height, auto);
|
|
580
675
|
* --card-background: var(--card-background, #fcfcfb);
|
|
581
676
|
* }
|
|
582
677
|
*/
|
|
583
|
-
class CardContainerComponent extends
|
|
584
|
-
constructor() {
|
|
678
|
+
class CardContainerComponent extends AbstractCardContainerComponent {
|
|
679
|
+
constructor(elementRef) {
|
|
585
680
|
super();
|
|
681
|
+
this.elementRef = elementRef;
|
|
682
|
+
/**
|
|
683
|
+
* Enable scrolling. If true the container will have height==0 so you must set it's height explicitly
|
|
684
|
+
* or place in a layout that will stretch it such as a grid or flex layout.
|
|
685
|
+
*/
|
|
686
|
+
this.enabledScroll = false;
|
|
687
|
+
}
|
|
688
|
+
set columnCount(count) {
|
|
689
|
+
if (!_.isNil(count) && (!_.isInteger(count) || count < 1)) {
|
|
690
|
+
lang$1.illegalState('columnCount must be a positive integer or nil');
|
|
691
|
+
}
|
|
692
|
+
this._columnCount = count;
|
|
693
|
+
this.updateColumnCountStyles();
|
|
694
|
+
}
|
|
695
|
+
get columnCount() {
|
|
696
|
+
return this._columnCount;
|
|
586
697
|
}
|
|
587
698
|
ngOnInit() {
|
|
699
|
+
super.ngOnInit();
|
|
700
|
+
this.updateColumnCountStyles();
|
|
701
|
+
}
|
|
702
|
+
get isAutoColumns() {
|
|
703
|
+
return _.isNil(this._columnCount);
|
|
704
|
+
}
|
|
705
|
+
get isSingleColumn() {
|
|
706
|
+
return this._columnCount === 1;
|
|
707
|
+
}
|
|
708
|
+
updateColumnCountStyles() {
|
|
709
|
+
const el = this.elementRef.nativeElement;
|
|
710
|
+
if (_.isNil(this._columnCount)) {
|
|
711
|
+
el.style.setProperty('--aup-card-container-column-count', '');
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
el.style.setProperty('--aup-card-container-column-count', this._columnCount);
|
|
715
|
+
}
|
|
588
716
|
}
|
|
589
717
|
}
|
|
590
718
|
CardContainerComponent.decorators = [
|
|
591
719
|
{ type: Component, args: [{
|
|
592
720
|
selector: 'aup-card-container',
|
|
593
|
-
template: "<div class=\"
|
|
594
|
-
styles: [":host{--resolved-card-gap:var(--card-gap,16px);--resolved-card-width:var(--card-width,300px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-background:var(--card-background
|
|
721
|
+
template: "<div class=\"header-container\">\n <ng-content select=\"[card-container-header]\"></ng-content>\n</div>\n\n<ng-template #content>\n <div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<div class=\"no-scroll-container\" *ngIf=\"!enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n\n<aup-scroll-container *ngIf=\"enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aup-scroll-container>\n\n<div class=\"footer-container\">\n <ng-content select=\"[card-container-footer]\"></ng-content>\n</div>\n\n",
|
|
722
|
+
styles: [":host{--resolved-card-gap: var(--card-gap, 16px);--resolved-card-width: var(--card-width, 300px);--resolved-card-max-width: var(--card-max-width, auto);--resolved-card-height: var(--card-height, auto);--resolved-card-min-height: var(--card-min-height, auto);--resolved-card-background: var(--card-background, var(--aup-card-container-default-background-color));flex:1;display:flex;flex-direction:column;align-items:stretch;background:var(--resolved-card-background)}:host.auto-columns .card-container{grid-template-columns:repeat(auto-fit,minmax(var(--resolved-card-width),var(--resolved-card-max-width)));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap))}:host:not(.auto-columns) .card-container{grid-template-columns:repeat(var(--aup-card-container-column-count),1fr)}.card-container{display:grid;box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));max-width:100%;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap)}aup-scroll-container,.no-scroll-container{flex:1}.add-card-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.add-card-container:hover{border-color:transparent;background-color:#fff;color:#0000008a}.add-card-template-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}\n"]
|
|
595
723
|
},] }
|
|
596
724
|
];
|
|
597
|
-
CardContainerComponent.ctorParameters = () => [
|
|
725
|
+
CardContainerComponent.ctorParameters = () => [
|
|
726
|
+
{ type: ElementRef }
|
|
727
|
+
];
|
|
598
728
|
CardContainerComponent.propDecorators = {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
729
|
+
columnCount: [{ type: Input }],
|
|
730
|
+
enabledScroll: [{ type: Input }],
|
|
731
|
+
isAutoColumns: [{ type: HostBinding, args: ['class.auto-columns',] }],
|
|
732
|
+
isSingleColumn: [{ type: HostBinding, args: ['class.single-column',] }]
|
|
602
733
|
};
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* @deprecated deprecated, use `aup-card-container [columnCount]="1"` instead.
|
|
737
|
+
* @example
|
|
738
|
+
* // basic usage
|
|
739
|
+
* <aup-card-stack>
|
|
740
|
+
* <my-card *ngFor="..."></my-card>
|
|
741
|
+
* </aup-card-stack>
|
|
742
|
+
*
|
|
743
|
+
* // adds an add button with a the '+' icon to the end of the card list.
|
|
744
|
+
* <aup-card-stack [addCardCommand]="addCard">
|
|
745
|
+
* <my-card *ngFor="..."></my-card>
|
|
746
|
+
* </aup-card-stack>
|
|
747
|
+
*
|
|
748
|
+
* // adds an add button with the specified face
|
|
749
|
+
* <aup-card-stack [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
|
|
750
|
+
* <my-card *ngFor="..."></my-card>
|
|
751
|
+
* </aup-card-stack>
|
|
752
|
+
*
|
|
753
|
+
* // use the aup-add-card-activity to display as the new card place holder and to run
|
|
754
|
+
* // the activity inside teh card
|
|
755
|
+
* <aup-card-stack [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
|
|
756
|
+
* <my-card *ngFor="..."></my-card>
|
|
757
|
+
* <aup-add-card-activity type="inline" renderAs="card" [face]="i18n.commands.addModal" [activityClass]="AddCardActivity"></aup-add-card-activity>
|
|
758
|
+
* </aup-card-stack>
|
|
759
|
+
*
|
|
760
|
+
* // adds an add card component using the specified template. The template
|
|
761
|
+
* // will fill it's container in the grid.
|
|
762
|
+
* <aup-card-stack>
|
|
763
|
+
* <my-card *ngFor="..."></my-card>
|
|
764
|
+
* <ng-template #addCardTemplate>
|
|
765
|
+
* <div>This is a new card template, it will the the size of the other cards.</div>
|
|
766
|
+
* </ng-template>
|
|
767
|
+
* </aup-card-stack>
|
|
768
|
+
*
|
|
769
|
+
* // sing the default new card styles for your template
|
|
770
|
+
* @import "../../../../assets/styles";
|
|
771
|
+
* .my-new-card {
|
|
772
|
+
* @include aup-card-stack-new-card-style();
|
|
773
|
+
* // OR
|
|
774
|
+
* @include aup-card-stack-new-card-style(
|
|
775
|
+
* $color: rgba(0,0,0,0.54),
|
|
776
|
+
* $background-color: rgba(255,255,255,0.8),
|
|
777
|
+
* $hover-color: $color,
|
|
778
|
+
* $background-hover-color: white
|
|
779
|
+
* )
|
|
780
|
+
* }
|
|
781
|
+
* <aup-card-stack>
|
|
782
|
+
* <my-card *ngFor="..."></my-card>
|
|
783
|
+
* <ng-template #addCardTemplate>
|
|
784
|
+
* <div class="my-new-card" >This is a new card template, it will the the size of the other cards.</div>
|
|
785
|
+
* </ng-template>
|
|
786
|
+
* </aup-card-stack>
|
|
787
|
+
*
|
|
788
|
+
* // CSS Vars
|
|
789
|
+
* aup-card-stack {
|
|
790
|
+
* --card-gap: var(--card-gap, 16px);
|
|
791
|
+
* --card-height: var(--card-height, auto);
|
|
792
|
+
* --card-min-height: var(--card-min-height, auto);
|
|
793
|
+
* --card-background: var(--card-background, #fcfcfb);
|
|
794
|
+
* }
|
|
795
|
+
*/
|
|
796
|
+
class CardStackComponent extends AbstractCardContainerComponent {
|
|
797
|
+
constructor() {
|
|
798
|
+
super();
|
|
799
|
+
console.warn('<aup-card-stack></aup-card-stack> is deprecated. Use <aup-card-container [columnCount]="1"> instead.');
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
CardStackComponent.decorators = [
|
|
803
|
+
{ type: Component, args: [{
|
|
804
|
+
selector: 'aup-card-stack',
|
|
805
|
+
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n</div>\n<div class=\"footer\">\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n <ng-content select=\"[aup-card-stack-footer]\"></ng-content>\n</div>\n",
|
|
806
|
+
styles: [":host{--resolved-card-gap: var(--card-gap, 16px);--resolved-card-height: var(--card-height, auto);--resolved-card-min-height: var(--card-min-height, auto);--resolved-card-background: var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:grid;grid-template-columns:1fr;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);max-width:100%}.footer{display:flex;flex-direction:column;align-items:stretch;padding:0 var(--resolved-card-gap) var(--resolved-card-gap)}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.add-card-container:hover{border-color:transparent;background-color:#fff;color:#0000008a}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}\n"]
|
|
807
|
+
},] }
|
|
808
|
+
];
|
|
809
|
+
CardStackComponent.ctorParameters = () => [];
|
|
607
810
|
|
|
608
811
|
/**
|
|
609
812
|
* Custom CSS:
|
|
@@ -628,6 +831,9 @@ class CommandFaceComponent extends DisposableComponent {
|
|
|
628
831
|
this.activeIcon = activeFace.pluck("icon");
|
|
629
832
|
this.activeColor = activeFace.pluck("color");
|
|
630
833
|
}
|
|
834
|
+
set face(face) {
|
|
835
|
+
this.facesModel.value = [face];
|
|
836
|
+
}
|
|
631
837
|
get requiresMissingIconInLayout() {
|
|
632
838
|
return this.includeMissingIconInLayout && !this.activeIcon.value;
|
|
633
839
|
}
|
|
@@ -651,12 +857,13 @@ CommandFaceComponent.decorators = [
|
|
|
651
857
|
selector: 'aup-command-face',
|
|
652
858
|
template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n",
|
|
653
859
|
encapsulation: ViewEncapsulation.None,
|
|
654
|
-
styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}"]
|
|
860
|
+
styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}\n"]
|
|
655
861
|
},] }
|
|
656
862
|
];
|
|
657
863
|
CommandFaceComponent.ctorParameters = () => [];
|
|
658
864
|
CommandFaceComponent.propDecorators = {
|
|
659
865
|
_rawFaces: [{ type: Input, args: ['faces',] }],
|
|
866
|
+
face: [{ type: Input }],
|
|
660
867
|
ignoreIcon: [{ type: Input }],
|
|
661
868
|
ignoreText: [{ type: Input }],
|
|
662
869
|
includeMissingIconInLayout: [{ type: Input }],
|
|
@@ -710,22 +917,22 @@ class CommandComponent extends PopupAwareComponent {
|
|
|
710
917
|
this.CommandFace = CommandFace;
|
|
711
918
|
this.alignFace = HorizontalAlignment.CENTER;
|
|
712
919
|
const { chain, switchOn } = Dsl.disposeWith(this);
|
|
713
|
-
this.faces = chain(this.command.busy).mapToList(busy => {
|
|
920
|
+
this.faces$ = chain(this.command.busy).mapToList(busy => {
|
|
714
921
|
return busy ?
|
|
715
922
|
[this.busyFaceModel.value, this.faceModel.value] :
|
|
716
923
|
[this.faceModel.value, this.busyFaceModel.value];
|
|
717
924
|
}, { allowNil: true, dependsOn: [this.faceModel, this.busyFaceModel] })
|
|
718
925
|
.rejectNil();
|
|
719
|
-
this.activeFace = this.faces
|
|
720
|
-
this.buttonStyle = chain(this.activeFace).map(f => CommandFace.getStyleOf(f));
|
|
721
|
-
this.
|
|
722
|
-
this.
|
|
723
|
-
this.iconOnly = this.faces
|
|
926
|
+
this.activeFace$ = this.faces$.first();
|
|
927
|
+
this.buttonStyle$ = chain(this.activeFace$).map(f => CommandFace.getStyleOf(f));
|
|
928
|
+
this.color$ = chain(this.activeFace$).map(f => CommandFace.getColorOf(f));
|
|
929
|
+
this.tooltip$ = chain(this.activeFace$).map(f => CommandFace.getTooltipOf(f));
|
|
930
|
+
this.iconOnly$ = this.faces$.select(face => {
|
|
724
931
|
return ___default.isEmpty(CommandFace.getTextOf(face)) && !___default.isEmpty(CommandFace.getIconOf(face));
|
|
725
|
-
}).count().equals(this.faces
|
|
932
|
+
}).count().equals(this.faces$.count());
|
|
726
933
|
}
|
|
727
934
|
isActive(face) {
|
|
728
|
-
return this.activeFace
|
|
935
|
+
return this.activeFace$.query().equals(face);
|
|
729
936
|
}
|
|
730
937
|
ngOnInit() {
|
|
731
938
|
}
|
|
@@ -739,8 +946,8 @@ class CommandComponent extends PopupAwareComponent {
|
|
|
739
946
|
CommandComponent.decorators = [
|
|
740
947
|
{ type: Component, args: [{
|
|
741
948
|
selector: 'aup-command',
|
|
742
|
-
template: "<ng-container *ngIf=\"iconOnly
|
|
743
|
-
styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}:host.centered button{text-align:center}:host.start button{text-align:start}:host.end button{text-align:end}button{flex:1}"]
|
|
949
|
+
template: "<ng-container *ngIf=\"iconOnly$.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n</ng-container>\n<ng-container *ngIf=\"!iconOnly$.value\">\n <ng-container [ngSwitch]=\"buttonStyle$.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n",
|
|
950
|
+
styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}:host.centered button{text-align:center}:host.start button{text-align:start}:host.end button{text-align:end}button{flex:1}\n"]
|
|
744
951
|
},] }
|
|
745
952
|
];
|
|
746
953
|
CommandComponent.ctorParameters = () => [
|
|
@@ -801,12 +1008,13 @@ class AbstractPopupMenuComponent extends PopupAwareComponent {
|
|
|
801
1008
|
constructor(element, parent) {
|
|
802
1009
|
super(element, parent);
|
|
803
1010
|
this._unorderedChildren = new MutableListModel();
|
|
804
|
-
this.faceModelDelegate = new DelegatingValueModel();
|
|
1011
|
+
this.faceModelDelegate = this.registerDisposable(new DelegatingValueModel());
|
|
805
1012
|
this.xPosition = 'after';
|
|
806
1013
|
this.yPosition = 'below';
|
|
807
1014
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
808
1015
|
// group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
809
1016
|
this.faceAdapterModel = chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f));
|
|
1017
|
+
this.faces$ = chain(this.faceAdapterModel).pluck('face').mapToList(face => [face]);
|
|
810
1018
|
this.children = chain(this._unorderedChildren).sortBy('componentIndex');
|
|
811
1019
|
}
|
|
812
1020
|
ngAfterContentChecked() {
|
|
@@ -816,7 +1024,7 @@ class AbstractPopupMenuComponent extends PopupAwareComponent {
|
|
|
816
1024
|
get faceAdapter() {
|
|
817
1025
|
var _a, _b;
|
|
818
1026
|
if (!this.faceAdapterModel) {
|
|
819
|
-
console.error(
|
|
1027
|
+
console.error('Somehow faceAdapterModel is nil -- set a break point here and let me know what\'s going on');
|
|
820
1028
|
}
|
|
821
1029
|
return (_b = (_a = this.faceAdapterModel) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : new CommandFace.Adapter(undefined);
|
|
822
1030
|
}
|
|
@@ -859,7 +1067,7 @@ AbstractPopupMenuComponent.propDecorators = {
|
|
|
859
1067
|
enabledModel: [{ type: Input }]
|
|
860
1068
|
};
|
|
861
1069
|
__decorate([
|
|
862
|
-
StoreInValueModel(
|
|
1070
|
+
StoreInValueModel('enabledModel'),
|
|
863
1071
|
__metadata("design:type", Boolean)
|
|
864
1072
|
], AbstractPopupMenuComponent.prototype, "enabled", void 0);
|
|
865
1073
|
__decorate([
|
|
@@ -891,7 +1099,7 @@ class MoreMenuComponent extends AbstractPopupMenuComponent {
|
|
|
891
1099
|
MoreMenuComponent.decorators = [
|
|
892
1100
|
{ type: Component, args: [{
|
|
893
1101
|
selector: 'aup-more-menu',
|
|
894
|
-
template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"
|
|
1102
|
+
template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-raised-button>\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-button>\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n >\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
|
|
895
1103
|
providers: [
|
|
896
1104
|
{ provide: POPUP_CONTAINER, useExisting: MoreMenuComponent }
|
|
897
1105
|
]
|
|
@@ -912,10 +1120,22 @@ __decorate([
|
|
|
912
1120
|
var TrackBy;
|
|
913
1121
|
(function (TrackBy) {
|
|
914
1122
|
TrackBy.byIndex = (index, item) => index;
|
|
1123
|
+
/**
|
|
1124
|
+
* @deprecated use #track(MyType).by("property") instead.
|
|
1125
|
+
* @param property
|
|
1126
|
+
*/
|
|
915
1127
|
function trackByProperty(property) {
|
|
916
1128
|
return (index, item) => item[property];
|
|
917
1129
|
}
|
|
918
1130
|
TrackBy.trackByProperty = trackByProperty;
|
|
1131
|
+
function track(type) {
|
|
1132
|
+
return {
|
|
1133
|
+
by(property) {
|
|
1134
|
+
return (index, item) => item[property];
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
TrackBy.track = track;
|
|
919
1139
|
})(TrackBy || (TrackBy = {}));
|
|
920
1140
|
|
|
921
1141
|
class CommandContainer extends GarbageCollector {
|
|
@@ -963,7 +1183,7 @@ ToolBarComponent.decorators = [
|
|
|
963
1183
|
selector: 'aup-tool-bar',
|
|
964
1184
|
template: '<div class="toolbar-content"><ng-content></ng-content></div>',
|
|
965
1185
|
encapsulation: ViewEncapsulation.None,
|
|
966
|
-
styles: [":host{display:inline-block}.toolbar-content{display:inline-flex;flex-direction:row;align-items:center}.toolbar-content>aup-separator{align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}"]
|
|
1186
|
+
styles: [":host{display:inline-block}.toolbar-content{display:inline-flex;flex-direction:row;align-items:center}.toolbar-content>aup-separator{align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}\n"]
|
|
967
1187
|
},] }
|
|
968
1188
|
];
|
|
969
1189
|
ToolBarComponent.ctorParameters = () => [];
|
|
@@ -1012,13 +1232,12 @@ class PopupMenuComponent extends AbstractPopupMenuComponent {
|
|
|
1012
1232
|
constructor(element, parent) {
|
|
1013
1233
|
super(element, parent);
|
|
1014
1234
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1015
|
-
// group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
1016
1235
|
}
|
|
1017
1236
|
}
|
|
1018
1237
|
PopupMenuComponent.decorators = [
|
|
1019
1238
|
{ type: Component, args: [{
|
|
1020
1239
|
selector: 'aup-popup-menu',
|
|
1021
|
-
template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"
|
|
1240
|
+
template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-raised-button>\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-button>\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n >\n <aup-command-face [faces]=\"faces$.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
|
|
1022
1241
|
providers: [
|
|
1023
1242
|
{ provide: POPUP_CONTAINER, useExisting: PopupMenuComponent }
|
|
1024
1243
|
]
|
|
@@ -1044,7 +1263,7 @@ __decorate([
|
|
|
1044
1263
|
class PopupMenuRendererComponent extends DisposableComponent {
|
|
1045
1264
|
constructor() {
|
|
1046
1265
|
super();
|
|
1047
|
-
this._childList = new DelegatingListModel();
|
|
1266
|
+
this._childList = this.registerDisposable(new DelegatingListModel());
|
|
1048
1267
|
this.commandFired = new EventEmitter();
|
|
1049
1268
|
this.TrackBy = TrackBy;
|
|
1050
1269
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
@@ -1104,9 +1323,9 @@ class PopupMenuRendererComponent extends DisposableComponent {
|
|
|
1104
1323
|
}
|
|
1105
1324
|
getFaces(child) {
|
|
1106
1325
|
return this.isCommand(child) ?
|
|
1107
|
-
child.faces
|
|
1326
|
+
child.faces$.value :
|
|
1108
1327
|
this.isPopupMenu(child) ?
|
|
1109
|
-
|
|
1328
|
+
child.faces$.value :
|
|
1110
1329
|
undefined;
|
|
1111
1330
|
}
|
|
1112
1331
|
}
|
|
@@ -1138,7 +1357,7 @@ EmptyStateComponent.decorators = [
|
|
|
1138
1357
|
<ng-content></ng-content>
|
|
1139
1358
|
</div>
|
|
1140
1359
|
`,
|
|
1141
|
-
styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{display:flex;flex-direction:column;align-items:stretch;padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
|
|
1360
|
+
styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{display:flex;flex-direction:column;align-items:stretch;padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}\n"]
|
|
1142
1361
|
},] }
|
|
1143
1362
|
];
|
|
1144
1363
|
EmptyStateComponent.ctorParameters = () => [];
|
|
@@ -1166,7 +1385,7 @@ FocusContainerComponent.decorators = [
|
|
|
1166
1385
|
providers: [
|
|
1167
1386
|
{ provide: FocusManager }
|
|
1168
1387
|
],
|
|
1169
|
-
styles: [":host{display:block}"]
|
|
1388
|
+
styles: [":host{display:block}\n"]
|
|
1170
1389
|
},] }
|
|
1171
1390
|
];
|
|
1172
1391
|
FocusContainerComponent.ctorParameters = () => [
|
|
@@ -1222,6 +1441,7 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1222
1441
|
constructor() {
|
|
1223
1442
|
super();
|
|
1224
1443
|
this.onValueEditedListeners = new EventListenerList();
|
|
1444
|
+
this.userFloatLabel = 'always'; // TODO: make this an injectable default
|
|
1225
1445
|
this.dense = false;
|
|
1226
1446
|
// TODO: fix this.
|
|
1227
1447
|
// tslint:disable-next-line:no-output-native
|
|
@@ -1481,8 +1701,8 @@ class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
|
1481
1701
|
AutocompleteInputComponent.decorators = [
|
|
1482
1702
|
{ type: Component, args: [{
|
|
1483
1703
|
selector: 'aup-autocomplete-input',
|
|
1484
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1485
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1704
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
|
|
1705
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
|
|
1486
1706
|
},] }
|
|
1487
1707
|
];
|
|
1488
1708
|
AutocompleteInputComponent.ctorParameters = () => [];
|
|
@@ -1518,7 +1738,7 @@ CheckboxInputComponent.decorators = [
|
|
|
1518
1738
|
{ type: Component, args: [{
|
|
1519
1739
|
selector: 'aup-checkbox-input',
|
|
1520
1740
|
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
1521
|
-
styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-
|
|
1741
|
+
styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-hint,mat-error{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}\n"]
|
|
1522
1742
|
},] }
|
|
1523
1743
|
];
|
|
1524
1744
|
CheckboxInputComponent.ctorParameters = () => [];
|
|
@@ -1545,8 +1765,8 @@ class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
1545
1765
|
MultipleSelectInputComponent.decorators = [
|
|
1546
1766
|
{ type: Component, args: [{
|
|
1547
1767
|
selector: 'aup-multiple-select-input',
|
|
1548
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1549
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1768
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
|
|
1769
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"]
|
|
1550
1770
|
},] }
|
|
1551
1771
|
];
|
|
1552
1772
|
MultipleSelectInputComponent.ctorParameters = () => [];
|
|
@@ -1627,8 +1847,8 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
1627
1847
|
SelectInputComponent.decorators = [
|
|
1628
1848
|
{ type: Component, args: [{
|
|
1629
1849
|
selector: 'aup-select-input',
|
|
1630
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1631
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1850
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
|
|
1851
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
|
|
1632
1852
|
},] }
|
|
1633
1853
|
];
|
|
1634
1854
|
SelectInputComponent.ctorParameters = () => [];
|
|
@@ -1666,7 +1886,7 @@ StringInputComponent.decorators = [
|
|
|
1666
1886
|
{ type: Component, args: [{
|
|
1667
1887
|
selector: 'aup-string-input',
|
|
1668
1888
|
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
1669
|
-
styles: ["button[disabled]{visibility:hidden}"]
|
|
1889
|
+
styles: ["button[disabled]{visibility:hidden}\n"]
|
|
1670
1890
|
},] }
|
|
1671
1891
|
];
|
|
1672
1892
|
StringInputComponent.ctorParameters = () => [];
|
|
@@ -1700,7 +1920,7 @@ TextInputComponent.decorators = [
|
|
|
1700
1920
|
{ type: Component, args: [{
|
|
1701
1921
|
selector: 'aup-text-input',
|
|
1702
1922
|
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1703
|
-
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1923
|
+
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}\n"]
|
|
1704
1924
|
},] }
|
|
1705
1925
|
];
|
|
1706
1926
|
TextInputComponent.ctorParameters = () => [];
|
|
@@ -1739,7 +1959,7 @@ IconComponent.decorators = [
|
|
|
1739
1959
|
{ type: Component, args: [{
|
|
1740
1960
|
selector: 'aup-icon',
|
|
1741
1961
|
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
1742
|
-
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center}.
|
|
1962
|
+
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}\n"]
|
|
1743
1963
|
},] }
|
|
1744
1964
|
];
|
|
1745
1965
|
IconComponent.propDecorators = {
|
|
@@ -1753,6 +1973,48 @@ IconComponent.propDecorators = {
|
|
|
1753
1973
|
});
|
|
1754
1974
|
})(IconComponent || (IconComponent = {}));
|
|
1755
1975
|
|
|
1976
|
+
class LoadingContainerComponent extends GarbageCollector {
|
|
1977
|
+
constructor() {
|
|
1978
|
+
super();
|
|
1979
|
+
}
|
|
1980
|
+
get state() {
|
|
1981
|
+
return this.loadingModel.value ? "loaded" : "loading";
|
|
1982
|
+
}
|
|
1983
|
+
ngOnInit() {
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
LoadingContainerComponent.decorators = [
|
|
1987
|
+
{ type: Component, args: [{
|
|
1988
|
+
selector: 'aup-loading-container',
|
|
1989
|
+
template: "<ng-content *ngIf=\"!loadingModel.value\"></ng-content>\n<section *ngIf=\"loadingModel.value\" class=\"loading-indicator-overlay\">\n <div class=\"loading-message\">\n <p>{{messageModel.value}}</p>\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n</section>\n",
|
|
1990
|
+
styles: [":host{display:block;position:relative}section.loading-indicator-overlay{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading-message{display:inline-block;text-align:center;width:10em}\n"]
|
|
1991
|
+
},] }
|
|
1992
|
+
];
|
|
1993
|
+
LoadingContainerComponent.ctorParameters = () => [];
|
|
1994
|
+
LoadingContainerComponent.propDecorators = {
|
|
1995
|
+
loadingModel: [{ type: Input }],
|
|
1996
|
+
loading: [{ type: Input }],
|
|
1997
|
+
messageModel: [{ type: Input }],
|
|
1998
|
+
message: [{ type: Input }],
|
|
1999
|
+
state: [{ type: HostBinding, args: ["class",] }]
|
|
2000
|
+
};
|
|
2001
|
+
__decorate([
|
|
2002
|
+
TrackExternal(),
|
|
2003
|
+
__metadata("design:type", ValueModel)
|
|
2004
|
+
], LoadingContainerComponent.prototype, "loadingModel", void 0);
|
|
2005
|
+
__decorate([
|
|
2006
|
+
StoreInValueModel("loadingModel"),
|
|
2007
|
+
__metadata("design:type", Boolean)
|
|
2008
|
+
], LoadingContainerComponent.prototype, "loading", void 0);
|
|
2009
|
+
__decorate([
|
|
2010
|
+
TrackExternal(),
|
|
2011
|
+
__metadata("design:type", ValueModel)
|
|
2012
|
+
], LoadingContainerComponent.prototype, "messageModel", void 0);
|
|
2013
|
+
__decorate([
|
|
2014
|
+
StoreInValueModel("messageModel"),
|
|
2015
|
+
__metadata("design:type", String)
|
|
2016
|
+
], LoadingContainerComponent.prototype, "message", void 0);
|
|
2017
|
+
|
|
1756
2018
|
class NoopComponent {
|
|
1757
2019
|
constructor() {
|
|
1758
2020
|
}
|
|
@@ -1761,7 +2023,7 @@ NoopComponent.decorators = [
|
|
|
1761
2023
|
{ type: Component, args: [{
|
|
1762
2024
|
selector: 'aup-noop',
|
|
1763
2025
|
template: "",
|
|
1764
|
-
styles: [":host{display:block}"]
|
|
2026
|
+
styles: [":host{display:block}\n"]
|
|
1765
2027
|
},] }
|
|
1766
2028
|
];
|
|
1767
2029
|
NoopComponent.ctorParameters = () => [];
|
|
@@ -1775,14 +2037,18 @@ ScrollContainerComponent.decorators = [
|
|
|
1775
2037
|
{ type: Component, args: [{
|
|
1776
2038
|
selector: 'aup-scroll-container',
|
|
1777
2039
|
template: "<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n",
|
|
1778
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]
|
|
2040
|
+
styles: [":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}\n"]
|
|
1779
2041
|
},] }
|
|
1780
2042
|
];
|
|
1781
2043
|
ScrollContainerComponent.ctorParameters = () => [];
|
|
1782
2044
|
|
|
1783
|
-
class SectionHeaderComponent {
|
|
2045
|
+
class SectionHeaderComponent extends DisposableComponent {
|
|
1784
2046
|
constructor() {
|
|
1785
|
-
|
|
2047
|
+
super();
|
|
2048
|
+
// readonly i18n = I18nMarsUi.components.layout.header;
|
|
2049
|
+
this.size = 'medium';
|
|
2050
|
+
this.borderTop = false;
|
|
2051
|
+
this.borderBottom = false;
|
|
1786
2052
|
}
|
|
1787
2053
|
ngOnInit() {
|
|
1788
2054
|
}
|
|
@@ -1790,13 +2056,15 @@ class SectionHeaderComponent {
|
|
|
1790
2056
|
SectionHeaderComponent.decorators = [
|
|
1791
2057
|
{ type: Component, args: [{
|
|
1792
2058
|
selector: 'aup-section-header',
|
|
1793
|
-
template: "<ng-content></ng-content>\n",
|
|
1794
|
-
styles: [":host{--
|
|
2059
|
+
template: "<span class=\"container-start\"><ng-content select=\"[header-start]\"></ng-content><ng-content></ng-content></span>\n<span class=\"container-middle\"><ng-content select=\"[header-center]\"></ng-content></span>\n<span class=\"container-end\"><ng-content select=\"[header-end]\"></ng-content></span>\n",
|
|
2060
|
+
styles: [":host{display:flex;flex-direction:row;align-items:center;--resolved-padding: var(--padding, var(--default-padding));--resolved-padding-right: var(--padding-right, calc(var(--default-padding)/2));padding-left:var(--resolved-padding);padding-right:var(--resolved-padding-right);box-sizing:border-box}:host.has-back-button{padding-left:0}:host.toolbar{height:56px;min-height:56px}:host.toolbar span{font-weight:500;font-size:18px;color:#000000ab}:host.large{height:48px;min-height:48px}:host.large span{font-weight:500;font-size:14px;color:#000000ab}:host.medium{height:48px;min-height:48px}:host.medium span{font-weight:500;font-size:13px;color:#000000ab}:host.small{height:30px;min-height:30px}:host.small span{font-weight:300;font-size:12px;color:#000000ab}:host.border-top{border-top:var(--pinstripe-border)}:host.border-bottom{border-bottom:var(--pinstripe-border)}span{white-space:nowrap;display:inline-flex;flex-direction:row;align-items:center}span.container-start{justify-content:flex-start}span.container-middle{justify-content:center;flex:1;width:0;overflow:hidden}span.container-end{justify-content:flex-end}\n"]
|
|
1795
2061
|
},] }
|
|
1796
2062
|
];
|
|
1797
2063
|
SectionHeaderComponent.ctorParameters = () => [];
|
|
1798
2064
|
SectionHeaderComponent.propDecorators = {
|
|
1799
|
-
|
|
2065
|
+
size: [{ type: Input }, { type: HostBinding, args: ['class',] }],
|
|
2066
|
+
borderTop: [{ type: Input }, { type: HostBinding, args: ['class.border-top',] }],
|
|
2067
|
+
borderBottom: [{ type: Input }, { type: HostBinding, args: ['class.border-bottom',] }]
|
|
1800
2068
|
};
|
|
1801
2069
|
|
|
1802
2070
|
class SwitchCaseOption {
|
|
@@ -1901,7 +2169,7 @@ SwitchCaseComponent.decorators = [
|
|
|
1901
2169
|
{ type: Component, args: [{
|
|
1902
2170
|
selector: 'aup-switch-case',
|
|
1903
2171
|
template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
|
|
1904
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
2172
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}\n"]
|
|
1905
2173
|
},] }
|
|
1906
2174
|
];
|
|
1907
2175
|
SwitchCaseComponent.ctorParameters = () => [
|
|
@@ -2160,17 +2428,24 @@ class EditSession extends GarbageCollector {
|
|
|
2160
2428
|
class EditRowControls extends DisposableComponent {
|
|
2161
2429
|
constructor() {
|
|
2162
2430
|
super();
|
|
2163
|
-
this.saveCommand = Command.create(() => {
|
|
2164
|
-
this.editSession.saveCommand.execute(
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
});
|
|
2170
|
-
});
|
|
2431
|
+
this.saveCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
|
|
2432
|
+
const finished = yield this.editSession.saveCommand.execute();
|
|
2433
|
+
if (finished) {
|
|
2434
|
+
this.editSession.dispose();
|
|
2435
|
+
}
|
|
2436
|
+
}));
|
|
2171
2437
|
this.cancelCommand = Command.create(() => {
|
|
2172
2438
|
this.editSession.dispose();
|
|
2173
|
-
});
|
|
2439
|
+
}).disableWhile(this.saveCommand.busy);
|
|
2440
|
+
}
|
|
2441
|
+
set editSession(session) {
|
|
2442
|
+
if (session) {
|
|
2443
|
+
session.form.disableWhile(this.saveCommand.busy);
|
|
2444
|
+
}
|
|
2445
|
+
this._session = session;
|
|
2446
|
+
}
|
|
2447
|
+
get editSession() {
|
|
2448
|
+
return this._session;
|
|
2174
2449
|
}
|
|
2175
2450
|
ngOnInit() {
|
|
2176
2451
|
}
|
|
@@ -2183,7 +2458,7 @@ EditRowControls.decorators = [
|
|
|
2183
2458
|
{ type: Component, args: [{
|
|
2184
2459
|
selector: 'aup-row-editor-controls',
|
|
2185
2460
|
template: "<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><aup-icon icon=\"mat:edit\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><aup-icon icon=\"mat:done\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><aup-icon icon=\"mat:clear\"></aup-icon></button>\n",
|
|
2186
|
-
styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]
|
|
2461
|
+
styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}\n"]
|
|
2187
2462
|
},] }
|
|
2188
2463
|
];
|
|
2189
2464
|
EditRowControls.ctorParameters = () => [];
|
|
@@ -2254,14 +2529,19 @@ const noop = () => {
|
|
|
2254
2529
|
};
|
|
2255
2530
|
const ɵ0 = noop;
|
|
2256
2531
|
const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');
|
|
2257
|
-
|
|
2532
|
+
const DEFAULT_TEXT_SEARCH_PREDICATE = (row, text) => false;
|
|
2533
|
+
const ɵ1 = DEFAULT_TEXT_SEARCH_PREDICATE;
|
|
2534
|
+
class ColumnModel extends GarbageCollector {
|
|
2258
2535
|
constructor(columnId, textPropertiesProvider) {
|
|
2536
|
+
super();
|
|
2259
2537
|
this.columnId = columnId;
|
|
2260
2538
|
this.textPropertiesProvider = textPropertiesProvider;
|
|
2261
2539
|
this._enableRowSelection = true;
|
|
2262
2540
|
this._flex = false;
|
|
2263
|
-
this._defaultVisibility = new DelegatingValueModel().withDefault(true);
|
|
2264
|
-
this._visible = new DelegatingValueModel().withDefault(this._defaultVisibility);
|
|
2541
|
+
this._defaultVisibility = this.registerDisposable(new DelegatingValueModel().withDefault(true));
|
|
2542
|
+
this._visible = this.registerDisposable(new DelegatingValueModel().withDefault(this._defaultVisibility));
|
|
2543
|
+
this._columnModelTextSearchPredicate = undefined;
|
|
2544
|
+
this._cellRendererTextSearchPredicate = undefined;
|
|
2265
2545
|
this.installHeaderRenderer();
|
|
2266
2546
|
this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();
|
|
2267
2547
|
}
|
|
@@ -2290,6 +2570,17 @@ class ColumnModel {
|
|
|
2290
2570
|
getDefaultHeaderText() {
|
|
2291
2571
|
return this.columnId;
|
|
2292
2572
|
}
|
|
2573
|
+
get isTextMatch() {
|
|
2574
|
+
return this._columnModelTextSearchPredicate || this._cellRendererTextSearchPredicate || DEFAULT_TEXT_SEARCH_PREDICATE;
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* Sets the predicate to use when checking if the specified row is a text match for this column.
|
|
2578
|
+
* @param predicate
|
|
2579
|
+
*/
|
|
2580
|
+
useTextSearchPredicate(predicate) {
|
|
2581
|
+
this._columnModelTextSearchPredicate = predicate;
|
|
2582
|
+
return this;
|
|
2583
|
+
}
|
|
2293
2584
|
getColumnTextProperties() {
|
|
2294
2585
|
return this._columnTextProperties || this.textPropertiesProvider();
|
|
2295
2586
|
}
|
|
@@ -2340,6 +2631,12 @@ class ColumnModel {
|
|
|
2340
2631
|
}
|
|
2341
2632
|
onRendererAttached(host, component) {
|
|
2342
2633
|
this._cellRendererPortalRef.onPortalAttached(host, component);
|
|
2634
|
+
if (___default.isFunction(component === null || component === void 0 ? void 0 : component.matches)) {
|
|
2635
|
+
this._cellRendererTextSearchPredicate = (row, text) => component.matches(row, text);
|
|
2636
|
+
}
|
|
2637
|
+
else {
|
|
2638
|
+
this._cellRendererTextSearchPredicate = undefined;
|
|
2639
|
+
}
|
|
2343
2640
|
}
|
|
2344
2641
|
// @Trace()
|
|
2345
2642
|
onEditorAttached(host, component) {
|
|
@@ -2372,8 +2669,11 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2372
2669
|
constructor(id, property, defaults) {
|
|
2373
2670
|
super(id, defaults);
|
|
2374
2671
|
this.property = property;
|
|
2375
|
-
this._format = (value) => value;
|
|
2672
|
+
this._format = (value) => value === null || value === void 0 ? void 0 : value.toString();
|
|
2376
2673
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
2674
|
+
this.useTextSearchPredicate((row, regex) => {
|
|
2675
|
+
return regex.test(this._format(row[this.property]));
|
|
2676
|
+
});
|
|
2377
2677
|
}
|
|
2378
2678
|
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
2379
2679
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
@@ -2388,9 +2688,6 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2388
2688
|
}
|
|
2389
2689
|
}
|
|
2390
2690
|
component.value = this._format(rowData.row[this.property]);
|
|
2391
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2392
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2393
|
-
}
|
|
2394
2691
|
}));
|
|
2395
2692
|
return this;
|
|
2396
2693
|
}
|
|
@@ -2460,6 +2757,9 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
2460
2757
|
this.property = property;
|
|
2461
2758
|
this._format = (value) => value.map(v => v === null || v === void 0 ? void 0 : v.toString()).join(', ');
|
|
2462
2759
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
2760
|
+
this.useTextSearchPredicate((row, regex) => {
|
|
2761
|
+
return regex.test(this._format(row[this.property]));
|
|
2762
|
+
});
|
|
2463
2763
|
}
|
|
2464
2764
|
cellRenderer(componentType) {
|
|
2465
2765
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
@@ -2521,7 +2821,7 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
2521
2821
|
}
|
|
2522
2822
|
}
|
|
2523
2823
|
class EditorControlColumnModel extends ColumnModel {
|
|
2524
|
-
constructor(columnId,
|
|
2824
|
+
constructor(columnId, saveCommandFactory, defaults) {
|
|
2525
2825
|
super(columnId, defaults);
|
|
2526
2826
|
this.cellRenderer(EditRowControls);
|
|
2527
2827
|
}
|
|
@@ -2792,6 +3092,7 @@ class ColumnListModel extends AbstractComputedListModel {
|
|
|
2792
3092
|
if (this.hasColumn(column.columnId)) {
|
|
2793
3093
|
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
2794
3094
|
}
|
|
3095
|
+
this.registerDisposable(column);
|
|
2795
3096
|
this.runInTransaction(() => {
|
|
2796
3097
|
if (!_.isNil(index)) {
|
|
2797
3098
|
this._allColumns.insert(index, column);
|
|
@@ -2799,7 +3100,7 @@ class ColumnListModel extends AbstractComputedListModel {
|
|
|
2799
3100
|
else {
|
|
2800
3101
|
this._allColumns.push(column);
|
|
2801
3102
|
}
|
|
2802
|
-
this.trackSource(column.visible);
|
|
3103
|
+
this.registerDisposable(this.trackSource(column.visible));
|
|
2803
3104
|
});
|
|
2804
3105
|
return column;
|
|
2805
3106
|
}
|
|
@@ -2819,7 +3120,7 @@ class RowClass {
|
|
|
2819
3120
|
class AbstractTableModel extends GarbageCollector {
|
|
2820
3121
|
constructor() {
|
|
2821
3122
|
super();
|
|
2822
|
-
this._dataSource = new DelegatingListModel();
|
|
3123
|
+
this._dataSource = this.registerDisposable(new DelegatingListModel());
|
|
2823
3124
|
this._columnList = this.registerDisposable(new ColumnListModel());
|
|
2824
3125
|
this._editorSessions = new MutableListModel();
|
|
2825
3126
|
this.rowClassNamePredicates = [];
|
|
@@ -2840,6 +3141,12 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2840
3141
|
this.lastVisibleColumn = chain(this._columnList).last();
|
|
2841
3142
|
this.rowSelectionDisabledOnAllColumns = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
|
|
2842
3143
|
}
|
|
3144
|
+
findMatchingColumns(row, regex) {
|
|
3145
|
+
return this.columns.value.filter(c => c.isTextMatch(row, regex));
|
|
3146
|
+
}
|
|
3147
|
+
hasMatchingColumn(row, regex) {
|
|
3148
|
+
return !!this.columns.value.find(c => c.isTextMatch(row, regex));
|
|
3149
|
+
}
|
|
2843
3150
|
setDataSource(sourceOfTruth) {
|
|
2844
3151
|
this._dataSource.setDelegate(sourceOfTruth);
|
|
2845
3152
|
}
|
|
@@ -2874,10 +3181,13 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2874
3181
|
}
|
|
2875
3182
|
return selectionColumnModel;
|
|
2876
3183
|
}
|
|
2877
|
-
addEditControls(
|
|
2878
|
-
this.
|
|
3184
|
+
addEditControls(saveCommandFactory, formFactory) {
|
|
3185
|
+
this.saveCommandFactory = saveCommandFactory;
|
|
3186
|
+
if (_.isFunction(formFactory)) {
|
|
3187
|
+
this._createForm = formFactory;
|
|
3188
|
+
}
|
|
2879
3189
|
const columnId = 'editControls';
|
|
2880
|
-
return this.addColumn(new EditorControlColumnModel(columnId,
|
|
3190
|
+
return this.addColumn(new EditorControlColumnModel(columnId, saveCommandFactory, () => this.getColumnTextProperties(columnId)));
|
|
2881
3191
|
}
|
|
2882
3192
|
addCustomColumn(columnId, dataAccessor) {
|
|
2883
3193
|
return this.addColumn(new CustomValueColumnModel(columnId, () => this.getColumnTextProperties(columnId), dataAccessor));
|
|
@@ -2921,19 +3231,20 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2921
3231
|
if (this._rowsBeingEdited.query().indexOf(row) > -1) {
|
|
2922
3232
|
return lang.illegalState(`Row with id=${rowId} already being edited`);
|
|
2923
3233
|
}
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
this.
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
}
|
|
3234
|
+
// todo: pass the factories to the edit session so we can make the whole lot pluggable?
|
|
3235
|
+
const form = this._createForm(row);
|
|
3236
|
+
const saveCommand = this.saveCommandFactory.create(form);
|
|
3237
|
+
const editSession = new EditSession(rowId, row, form, saveCommand);
|
|
3238
|
+
const { when } = Dsl.disposeWith(editSession);
|
|
3239
|
+
when(editSession.liveRowValue).changes((editedValue) => {
|
|
3240
|
+
this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
3241
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
3242
|
+
this._editorSessions.push(editSession);
|
|
3243
|
+
editSession.onDispose(() => {
|
|
3244
|
+
this._rowsBeingEdited.remove(editSession.liveRowValue.value);
|
|
3245
|
+
this._editorSessions.remove(editSession);
|
|
3246
|
+
});
|
|
3247
|
+
return editSession;
|
|
2937
3248
|
}
|
|
2938
3249
|
getEditSessionFor(row) {
|
|
2939
3250
|
return this._editorSessionByRowId.get(this.identityOf(row));
|
|
@@ -2949,12 +3260,16 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2949
3260
|
return this.isRowSelectionEnabled() && column.isRowSelectionEnabled();
|
|
2950
3261
|
}
|
|
2951
3262
|
isRowSelectionEnabled() {
|
|
2952
|
-
return this.
|
|
3263
|
+
return this.hasUserSelectionModel() && !this.rowSelectionDisabledOnAllColumns.value;
|
|
2953
3264
|
}
|
|
2954
|
-
|
|
3265
|
+
hasUserSelectionModel() {
|
|
2955
3266
|
var _a;
|
|
2956
3267
|
return !!((_a = this.selectionColumnModel) === null || _a === void 0 ? void 0 : _a.selectionModel.getDelegate());
|
|
2957
3268
|
}
|
|
3269
|
+
getSelectionModel() {
|
|
3270
|
+
var _a;
|
|
3271
|
+
return (_a = this.selectionColumnModel) === null || _a === void 0 ? void 0 : _a.selectionModel;
|
|
3272
|
+
}
|
|
2958
3273
|
isHoverEnabled() {
|
|
2959
3274
|
return this.isRowSelectionEnabled() || this.rowClickListeners.listenerCount > 0;
|
|
2960
3275
|
}
|
|
@@ -3070,7 +3385,7 @@ TableHeaderCellRendererComponent.decorators = [
|
|
|
3070
3385
|
{ type: Component, args: [{
|
|
3071
3386
|
selector: 'aup-table-header-cell-renderer',
|
|
3072
3387
|
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
3073
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
3388
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}\n"]
|
|
3074
3389
|
},] }
|
|
3075
3390
|
];
|
|
3076
3391
|
TableHeaderCellRendererComponent.ctorParameters = () => [];
|
|
@@ -3100,8 +3415,6 @@ class TableRowMenuComponent extends DisposableComponent {
|
|
|
3100
3415
|
registerMoreAction(commandFactory, properties) {
|
|
3101
3416
|
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3102
3417
|
}
|
|
3103
|
-
ngOnInit() {
|
|
3104
|
-
}
|
|
3105
3418
|
createMoreMenuCommand(item, value) {
|
|
3106
3419
|
const { when } = Dsl.disposeWith(this);
|
|
3107
3420
|
const command = item.factory.create(value);
|
|
@@ -3186,18 +3499,19 @@ TableRowMenuComponent.propDecorators = {
|
|
|
3186
3499
|
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
3187
3500
|
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
3188
3501
|
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
3189
|
-
*
|
|
3190
|
-
*
|
|
3191
|
-
*
|
|
3192
|
-
*
|
|
3193
|
-
*
|
|
3194
|
-
*
|
|
3195
|
-
*
|
|
3196
|
-
*
|
|
3197
|
-
*
|
|
3198
|
-
*
|
|
3199
|
-
*
|
|
3200
|
-
*
|
|
3502
|
+
* ::ng-deep {
|
|
3503
|
+
* aup-table-header-cell-renderer,
|
|
3504
|
+
* aup-table-cell-renderer {
|
|
3505
|
+
* &.aup-col-my-dasherised-column-id {
|
|
3506
|
+
* // do stuff
|
|
3507
|
+
* }
|
|
3508
|
+
* &.first-visible-column {
|
|
3509
|
+
* // do stuff
|
|
3510
|
+
* }
|
|
3511
|
+
* &.last-visible-column {
|
|
3512
|
+
* // do stuff
|
|
3513
|
+
* }
|
|
3514
|
+
* }
|
|
3201
3515
|
* }
|
|
3202
3516
|
* }
|
|
3203
3517
|
*/
|
|
@@ -3216,7 +3530,7 @@ TableComponent.decorators = [
|
|
|
3216
3530
|
providers: [
|
|
3217
3531
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
3218
3532
|
],
|
|
3219
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}"]
|
|
3533
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"]
|
|
3220
3534
|
},] }
|
|
3221
3535
|
];
|
|
3222
3536
|
TableComponent.ctorParameters = () => [
|
|
@@ -3260,7 +3574,7 @@ TreeInheritanceIconComponent.decorators = [
|
|
|
3260
3574
|
{ type: Component, args: [{
|
|
3261
3575
|
selector: 'aup-tree-inheritance-icon',
|
|
3262
3576
|
template: "<svg xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"pixelWidth\" [attr.height]=\"pixelHeight\" [attr.viewBox]=\"viewBox\">\n <g fill=\"none\" fill-rule=\"evenodd\">\n <rect *ngIf=\"hasHead()\" width=\"1\" height=\"32.5\" x=\"11.5\" fill=\"currentColor\"/>\n <rect *ngIf=\"hasTail()\" width=\"1\" height=\"32.5\" x=\"11.5\" y=\"31.5\" fill=\"currentColor\"/>\n\n <rect *ngIf=\"hasLeadIn()\" width=\"12\" height=\"1\" y=\"31.5\" fill=\"currentColor\"/>\n <rect *ngIf=\"hasTerminal()\" width=\"12\" height=\"1\" x=\"12\" y=\"31.5\" fill=\"currentColor\"/>\n </g>\n</svg>\n",
|
|
3263
|
-
styles: [":host{position:relative;color:inherit}svg{color:var(--line-color);display:block}"]
|
|
3577
|
+
styles: [":host{position:relative;color:inherit}svg{color:var(--line-color);display:block}\n"]
|
|
3264
3578
|
},] }
|
|
3265
3579
|
];
|
|
3266
3580
|
TreeInheritanceIconComponent.ctorParameters = () => [];
|
|
@@ -3465,6 +3779,33 @@ var DecoratedTreeNode;
|
|
|
3465
3779
|
DecoratedTreeNode.Decorator = Decorator;
|
|
3466
3780
|
})(DecoratedTreeNode || (DecoratedTreeNode = {}));
|
|
3467
3781
|
|
|
3782
|
+
class FlattenedTreeListModel extends ComputedListModel {
|
|
3783
|
+
constructor(source, childRef, expansionModel) {
|
|
3784
|
+
super(source, {
|
|
3785
|
+
initialValue: [],
|
|
3786
|
+
identifiedWith: row => source.identityOf(row)
|
|
3787
|
+
});
|
|
3788
|
+
this.source = source;
|
|
3789
|
+
this.childRef = childRef;
|
|
3790
|
+
this.expansionModel = expansionModel;
|
|
3791
|
+
this.trackSource(expansionModel.isExpandedPredicate);
|
|
3792
|
+
}
|
|
3793
|
+
compute(values) {
|
|
3794
|
+
const result = [];
|
|
3795
|
+
values.forEach(rootNode => {
|
|
3796
|
+
return this.addNodeAndVisibleChildren(DecoratedTreeNode.decorateRoot(rootNode, this.childRef), result);
|
|
3797
|
+
});
|
|
3798
|
+
return result;
|
|
3799
|
+
}
|
|
3800
|
+
addNodeAndVisibleChildren(node, result) {
|
|
3801
|
+
result.push(node);
|
|
3802
|
+
const decorator = node[treeNodeDecorator];
|
|
3803
|
+
if (decorator.hasChildren() && !this.expansionModel.isCollapsed(node)) {
|
|
3804
|
+
decorator.children.forEach(child => this.addNodeAndVisibleChildren(child, result));
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3468
3809
|
class TreeExpansionModel {
|
|
3469
3810
|
constructor(identityOf) {
|
|
3470
3811
|
this.identityOf = identityOf;
|
|
@@ -3512,33 +3853,6 @@ class TreeExpansionModel {
|
|
|
3512
3853
|
}
|
|
3513
3854
|
}
|
|
3514
3855
|
|
|
3515
|
-
class FlattenedTreeListModel extends ComputedListModel {
|
|
3516
|
-
constructor(source, childRef, expansionModel) {
|
|
3517
|
-
super(source);
|
|
3518
|
-
this.source = source;
|
|
3519
|
-
this.childRef = childRef;
|
|
3520
|
-
this.expansionModel = expansionModel;
|
|
3521
|
-
this.trackSource(expansionModel.isExpandedPredicate);
|
|
3522
|
-
}
|
|
3523
|
-
getIdentityOf(item) {
|
|
3524
|
-
return this.source.identityOf(item);
|
|
3525
|
-
}
|
|
3526
|
-
compute(values) {
|
|
3527
|
-
const result = [];
|
|
3528
|
-
values.forEach(rootNode => {
|
|
3529
|
-
return this.addNodeAndVisibleChildren(DecoratedTreeNode.decorateRoot(rootNode, this.childRef), result);
|
|
3530
|
-
});
|
|
3531
|
-
return result;
|
|
3532
|
-
}
|
|
3533
|
-
addNodeAndVisibleChildren(node, result) {
|
|
3534
|
-
result.push(node);
|
|
3535
|
-
const decorator = node[treeNodeDecorator];
|
|
3536
|
-
if (decorator.hasChildren() && !this.expansionModel.isCollapsed(node)) {
|
|
3537
|
-
decorator.children.forEach(child => this.addNodeAndVisibleChildren(child, result));
|
|
3538
|
-
}
|
|
3539
|
-
}
|
|
3540
|
-
}
|
|
3541
|
-
|
|
3542
3856
|
class TreeLabelColumnModel extends ColumnModel {
|
|
3543
3857
|
constructor(columnId, textPropertiesProvider, expansionModel) {
|
|
3544
3858
|
super(columnId, textPropertiesProvider);
|
|
@@ -3561,7 +3875,7 @@ class TreeLabelColumnModel extends ColumnModel {
|
|
|
3561
3875
|
cellRenderer(componentType) {
|
|
3562
3876
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3563
3877
|
if (firstTime) {
|
|
3564
|
-
component.
|
|
3878
|
+
component.treeTableModel = this.expansionModel;
|
|
3565
3879
|
}
|
|
3566
3880
|
component.value = rowData.row;
|
|
3567
3881
|
component.label = ___default.isNil(this.labelProperty) ? undefined : rowData.row[this.labelProperty];
|
|
@@ -3593,10 +3907,11 @@ class TreeTableModel extends AbstractTableModel {
|
|
|
3593
3907
|
const childExtractor = _.isFunction(childAccessor) ? childAccessor : row => row[childAccessor];
|
|
3594
3908
|
this.flattenedDataSource = this.registerDisposable(new FlattenedTreeListModel(source, childExtractor, this.treeExpansionModel));
|
|
3595
3909
|
this.setDataSource(this.flattenedDataSource);
|
|
3910
|
+
this.addRowClass('aup-node-collapsed', row => this.isCollapsed(row));
|
|
3596
3911
|
}
|
|
3597
3912
|
treeControlColumn(builder) {
|
|
3598
3913
|
const columnId = 'tree-label';
|
|
3599
|
-
const column = new TreeLabelColumnModel(columnId, () => this.getColumnTextProperties(columnId), this
|
|
3914
|
+
const column = new TreeLabelColumnModel(columnId, () => this.getColumnTextProperties(columnId), this);
|
|
3600
3915
|
builder(column);
|
|
3601
3916
|
this.addColumn(column);
|
|
3602
3917
|
}
|
|
@@ -3604,7 +3919,7 @@ class TreeTableModel extends AbstractTableModel {
|
|
|
3604
3919
|
this.treeExpansionModel.expand(node);
|
|
3605
3920
|
}
|
|
3606
3921
|
collapse(node) {
|
|
3607
|
-
this.treeExpansionModel.
|
|
3922
|
+
this.treeExpansionModel.collapse(node);
|
|
3608
3923
|
}
|
|
3609
3924
|
isCollapsed(node) {
|
|
3610
3925
|
return this.treeExpansionModel.isCollapsed(node);
|
|
@@ -3681,17 +3996,17 @@ class TreeLabelCellRendererComponent extends DisposableComponent {
|
|
|
3681
3996
|
ngOnInit() {
|
|
3682
3997
|
const { chain } = Dsl.disposeWith(this);
|
|
3683
3998
|
this.canExpand = chain(this.nodeModel).map(node => {
|
|
3684
|
-
return DecoratedTreeNode.getDecorator(node).hasChildren() && this.
|
|
3685
|
-
}, { dependsOn: this.
|
|
3999
|
+
return DecoratedTreeNode.getDecorator(node).hasChildren() && this.treeTableModel.isCollapsed(node);
|
|
4000
|
+
}, { dependsOn: this.treeTableModel.treeExpansionModel.isExpandedPredicate });
|
|
3686
4001
|
this.canCollapse = chain(this.nodeModel).map(node => {
|
|
3687
|
-
return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.
|
|
3688
|
-
}, { dependsOn: this.
|
|
4002
|
+
return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.treeTableModel.isCollapsed(node);
|
|
4003
|
+
}, { dependsOn: this.treeTableModel.treeExpansionModel.isExpandedPredicate });
|
|
3689
4004
|
this.iconModel = chain(this.nodeModel).map(node => {
|
|
3690
4005
|
var _a;
|
|
3691
|
-
const expanded = this.
|
|
4006
|
+
const expanded = this.treeTableModel.treeExpansionModel.isExpanded(this.node);
|
|
3692
4007
|
const iconFactory = (_a = this.iconFactory) !== null && _a !== void 0 ? _a : TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY;
|
|
3693
4008
|
return iconFactory(node, expanded, TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY(node, expanded, undefined));
|
|
3694
|
-
}, { dependsOn: this.
|
|
4009
|
+
}, { dependsOn: this.treeTableModel.treeExpansionModel.isExpandedPredicate });
|
|
3695
4010
|
}
|
|
3696
4011
|
get isRoot() {
|
|
3697
4012
|
return DecoratedTreeNode.getDecorator(this.node).isRoot();
|
|
@@ -3703,15 +4018,17 @@ class TreeLabelCellRendererComponent extends DisposableComponent {
|
|
|
3703
4018
|
return this.nodeModel.value;
|
|
3704
4019
|
}
|
|
3705
4020
|
// @Trace()
|
|
3706
|
-
expandOrCollapse(node) {
|
|
3707
|
-
|
|
4021
|
+
expandOrCollapse($event, node) {
|
|
4022
|
+
$event.preventDefault();
|
|
4023
|
+
$event.stopPropagation();
|
|
4024
|
+
this.treeTableModel.isCollapsed(node) ? this.treeTableModel.expand(node) : this.treeTableModel.collapse(node);
|
|
3708
4025
|
}
|
|
3709
4026
|
}
|
|
3710
4027
|
TreeLabelCellRendererComponent.decorators = [
|
|
3711
4028
|
{ type: Component, args: [{
|
|
3712
4029
|
selector: 'aup-tree-label-cell-renderer',
|
|
3713
|
-
template: "<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse(node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n",
|
|
3714
|
-
styles: [":host{--line-color
|
|
4030
|
+
template: "<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse($event, node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n",
|
|
4031
|
+
styles: [":host{--line-color: #ddd;--node-color: #999;display:inline-flex;flex-direction:row;align-items:stretch}:host div.label{display:flex;flex-direction:row;align-items:center;white-space:nowrap;padding-left:6px}:host div.tree-icons{display:grid;grid-auto-flow:column;grid-auto-columns:auto;grid-template-rows:1fr;align-items:stretch;justify-content:stretch}:host div.tree-icons aup-icon{align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-tree-inheritance-icon,:host div.tree-icons aup-icon{margin-left:4px}\n"]
|
|
3715
4032
|
},] }
|
|
3716
4033
|
];
|
|
3717
4034
|
TreeLabelCellRendererComponent.ctorParameters = () => [];
|
|
@@ -3719,7 +4036,7 @@ TreeLabelCellRendererComponent.propDecorators = {
|
|
|
3719
4036
|
value: [{ type: Input }],
|
|
3720
4037
|
label: [{ type: Input }],
|
|
3721
4038
|
iconFactory: [{ type: Input }],
|
|
3722
|
-
|
|
4039
|
+
treeTableModel: [{ type: Input }],
|
|
3723
4040
|
isRoot: [{ type: HostBinding, args: ['class.root',] }],
|
|
3724
4041
|
isLeaf: [{ type: HostBinding, args: ['class.leaf',] }]
|
|
3725
4042
|
};
|
|
@@ -3728,7 +4045,14 @@ __decorate([
|
|
|
3728
4045
|
__metadata("design:type", Object)
|
|
3729
4046
|
], TreeLabelCellRendererComponent.prototype, "value", void 0);
|
|
3730
4047
|
(function (TreeLabelCellRendererComponent) {
|
|
3731
|
-
TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY = (node, expanded, defaultIcon) =>
|
|
4048
|
+
TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY = (node, expanded, defaultIcon) => {
|
|
4049
|
+
const isLeaf = DecoratedTreeNode.getDecorator(node).isLeaf();
|
|
4050
|
+
return isLeaf ?
|
|
4051
|
+
undefined :
|
|
4052
|
+
expanded ?
|
|
4053
|
+
'mat:expand_more' :
|
|
4054
|
+
'mat:chevron_right';
|
|
4055
|
+
};
|
|
3732
4056
|
})(TreeLabelCellRendererComponent || (TreeLabelCellRendererComponent = {}));
|
|
3733
4057
|
|
|
3734
4058
|
/**
|
|
@@ -3806,7 +4130,7 @@ TreeTableComponent.decorators = [
|
|
|
3806
4130
|
providers: [
|
|
3807
4131
|
{ provide: AbstractTableComponent, useExisting: TreeTableComponent }
|
|
3808
4132
|
],
|
|
3809
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}", "td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}"]
|
|
4133
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n", "td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}td.mat-column-tree-label,td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}\n"]
|
|
3810
4134
|
},] }
|
|
3811
4135
|
];
|
|
3812
4136
|
TreeTableComponent.ctorParameters = () => [
|
|
@@ -3860,7 +4184,7 @@ VerticalFocusContainerComponent.decorators = [
|
|
|
3860
4184
|
providers: [
|
|
3861
4185
|
{ provide: FocusManager }
|
|
3862
4186
|
],
|
|
3863
|
-
styles: [":host{display:block}"]
|
|
4187
|
+
styles: [":host{display:block}\n"]
|
|
3864
4188
|
},] }
|
|
3865
4189
|
];
|
|
3866
4190
|
VerticalFocusContainerComponent.ctorParameters = () => [
|
|
@@ -3906,7 +4230,7 @@ PaginatorComponent.decorators = [
|
|
|
3906
4230
|
{ type: Component, args: [{
|
|
3907
4231
|
selector: 'aup-paginator',
|
|
3908
4232
|
template: "<p>Page {{pageNumber}} of {{totalPages}}</p>\n<button mat-icon-button [pectinCommand]=\"previousCommand\"><aup-icon icon=\"mat:keyboard_arrow_left\"></aup-icon></button>\n<button mat-icon-button [pectinCommand]=\"nextCommand\"><aup-icon icon=\"mat:keyboard_arrow_right\"></aup-icon></button>\n\n",
|
|
3909
|
-
styles: [":host{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px;padding:0 8px;color
|
|
4233
|
+
styles: [":host{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px;padding:0 8px;color:#0009}:host p{color:inherit;margin-right:8px}:host button.md-button.md-icon-button{padding:0;margin:0;width:30px;height:30px}\n"]
|
|
3910
4234
|
},] }
|
|
3911
4235
|
];
|
|
3912
4236
|
PaginatorComponent.ctorParameters = () => [];
|
|
@@ -3918,6 +4242,98 @@ __decorate([
|
|
|
3918
4242
|
__metadata("design:type", PageController)
|
|
3919
4243
|
], PaginatorComponent.prototype, "pageController", void 0);
|
|
3920
4244
|
|
|
4245
|
+
class LabelledValueComponent extends DisposableComponent {
|
|
4246
|
+
constructor() {
|
|
4247
|
+
super();
|
|
4248
|
+
// const {chain} = Dsl.disposeWith(this);
|
|
4249
|
+
}
|
|
4250
|
+
ngOnInit() {
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
LabelledValueComponent.decorators = [
|
|
4254
|
+
{ type: Component, args: [{
|
|
4255
|
+
selector: 'aup-labelled-value',
|
|
4256
|
+
template: "<label>{{label}}</label>\n<ng-content></ng-content>\n",
|
|
4257
|
+
styles: [":host{display:inline-flex;flex-direction:column;align-items:flex-start}label{font-weight:400;font-size:12px;color:#00000091;margin-bottom:6px;white-space:nowrap}\n"]
|
|
4258
|
+
},] }
|
|
4259
|
+
];
|
|
4260
|
+
LabelledValueComponent.ctorParameters = () => [];
|
|
4261
|
+
LabelledValueComponent.propDecorators = {
|
|
4262
|
+
label: [{ type: Input }]
|
|
4263
|
+
};
|
|
4264
|
+
|
|
4265
|
+
// TODO: Look at using unified parser: https://javascript.plainenglish.io/markdown-to-angular-rendering-using-unified-and-remark-96835bb877
|
|
4266
|
+
/**
|
|
4267
|
+
* @example
|
|
4268
|
+
* <aup-markdown [content]="..."></aup-markdown>
|
|
4269
|
+
* <aup-markdown [content$]="stringValueModel$"></aup-markdown>
|
|
4270
|
+
* <aup-markdown ngPreserveWhitespaces>
|
|
4271
|
+
* # This is markdown content
|
|
4272
|
+
*
|
|
4273
|
+
* With a list
|
|
4274
|
+
* - a
|
|
4275
|
+
* - b
|
|
4276
|
+
* </aup-markdown>
|
|
4277
|
+
*/
|
|
4278
|
+
class MarkdownComponent extends DisposableComponent {
|
|
4279
|
+
constructor(platform, element, markdownService) {
|
|
4280
|
+
super();
|
|
4281
|
+
this.platform = platform;
|
|
4282
|
+
this.element = element;
|
|
4283
|
+
this.markdownService = markdownService;
|
|
4284
|
+
this.inline = false;
|
|
4285
|
+
const { chain } = Dsl.disposeWith(this);
|
|
4286
|
+
}
|
|
4287
|
+
ngOnInit() {
|
|
4288
|
+
const { when } = Dsl.disposeWith(this);
|
|
4289
|
+
when(this.content$).changes(content => this.renderContent(content), { initialValue: 'triggerChangeUnlessNil' });
|
|
4290
|
+
if (_.isNil(this.content) && !_.isEmpty(this.element.nativeElement.innerHTML)) {
|
|
4291
|
+
this.renderContent(this.extractInnerContent(this.element.nativeElement.innerHTML));
|
|
4292
|
+
}
|
|
4293
|
+
}
|
|
4294
|
+
extractInnerContent(content) {
|
|
4295
|
+
const lines = content.split('\n');
|
|
4296
|
+
const prefix = lines.reduce((minPrefix, line) => {
|
|
4297
|
+
const leadingWhitespace = line.search(/\S/);
|
|
4298
|
+
return leadingWhitespace < 0 ? minPrefix : Math.min(minPrefix, leadingWhitespace);
|
|
4299
|
+
}, Number.MAX_SAFE_INTEGER);
|
|
4300
|
+
return lines.map(l => l.substr(prefix)).join('\n');
|
|
4301
|
+
}
|
|
4302
|
+
renderContent(content) {
|
|
4303
|
+
if (!_.isNil(content)) {
|
|
4304
|
+
const markdown = this.inline ?
|
|
4305
|
+
this.markdownService.renderInline(content) :
|
|
4306
|
+
this.markdownService.render(content);
|
|
4307
|
+
this.element.nativeElement.innerHTML = markdown;
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
}
|
|
4311
|
+
MarkdownComponent.decorators = [
|
|
4312
|
+
{ type: Component, args: [{
|
|
4313
|
+
selector: 'aup-markdown, [aupMarkdown]',
|
|
4314
|
+
template: "<ng-content></ng-content>\n",
|
|
4315
|
+
styles: [":host{display:inline-block}\n"]
|
|
4316
|
+
},] }
|
|
4317
|
+
];
|
|
4318
|
+
MarkdownComponent.ctorParameters = () => [
|
|
4319
|
+
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
|
|
4320
|
+
{ type: ElementRef },
|
|
4321
|
+
{ type: MarkdownService }
|
|
4322
|
+
];
|
|
4323
|
+
MarkdownComponent.propDecorators = {
|
|
4324
|
+
content$: [{ type: Input }],
|
|
4325
|
+
content: [{ type: Input }],
|
|
4326
|
+
inline: [{ type: Input }]
|
|
4327
|
+
};
|
|
4328
|
+
__decorate([
|
|
4329
|
+
TrackExternal(),
|
|
4330
|
+
__metadata("design:type", ValueModel)
|
|
4331
|
+
], MarkdownComponent.prototype, "content$", void 0);
|
|
4332
|
+
__decorate([
|
|
4333
|
+
StoreInValueModel('content$'),
|
|
4334
|
+
__metadata("design:type", String)
|
|
4335
|
+
], MarkdownComponent.prototype, "content", void 0);
|
|
4336
|
+
|
|
3921
4337
|
class ComponentsModule {
|
|
3922
4338
|
constructor(faIconLibrary) {
|
|
3923
4339
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -3925,6 +4341,29 @@ class ComponentsModule {
|
|
|
3925
4341
|
}
|
|
3926
4342
|
ComponentsModule.decorators = [
|
|
3927
4343
|
{ type: NgModule, args: [{
|
|
4344
|
+
imports: [
|
|
4345
|
+
CommonModule,
|
|
4346
|
+
BrowserAnimationsModule,
|
|
4347
|
+
FormsModule,
|
|
4348
|
+
MatInputModule,
|
|
4349
|
+
MatFormFieldModule,
|
|
4350
|
+
MatSelectModule,
|
|
4351
|
+
MatTabsModule,
|
|
4352
|
+
DirectivesModule,
|
|
4353
|
+
MatIconModule,
|
|
4354
|
+
MatButtonModule,
|
|
4355
|
+
MatCheckboxModule,
|
|
4356
|
+
MatTableModule,
|
|
4357
|
+
PortalModule,
|
|
4358
|
+
CdkScrollableModule,
|
|
4359
|
+
FontAwesomeModule,
|
|
4360
|
+
MatTooltipModule,
|
|
4361
|
+
MatAutocompleteModule,
|
|
4362
|
+
MatMenuModule,
|
|
4363
|
+
MatDividerModule,
|
|
4364
|
+
MatProgressSpinnerModule,
|
|
4365
|
+
MatProgressBarModule
|
|
4366
|
+
],
|
|
3928
4367
|
declarations: [
|
|
3929
4368
|
AbstractInputComponent,
|
|
3930
4369
|
AbstractValueInputComponent,
|
|
@@ -3973,29 +4412,12 @@ ComponentsModule.decorators = [
|
|
|
3973
4412
|
BusyOverlayComponent,
|
|
3974
4413
|
EmptyStateComponent,
|
|
3975
4414
|
PaginatorComponent,
|
|
3976
|
-
AbstractTableComponent
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
MatInputModule,
|
|
3983
|
-
MatFormFieldModule,
|
|
3984
|
-
MatSelectModule,
|
|
3985
|
-
MatTabsModule,
|
|
3986
|
-
DirectivesModule,
|
|
3987
|
-
MatIconModule,
|
|
3988
|
-
MatButtonModule,
|
|
3989
|
-
MatCheckboxModule,
|
|
3990
|
-
MatTableModule,
|
|
3991
|
-
PortalModule,
|
|
3992
|
-
CdkScrollableModule,
|
|
3993
|
-
FontAwesomeModule,
|
|
3994
|
-
MatTooltipModule,
|
|
3995
|
-
MatAutocompleteModule,
|
|
3996
|
-
MatMenuModule,
|
|
3997
|
-
MatDividerModule,
|
|
3998
|
-
MatProgressSpinnerModule
|
|
4415
|
+
AbstractTableComponent,
|
|
4416
|
+
AbstractCardContainerComponent,
|
|
4417
|
+
CardStackComponent,
|
|
4418
|
+
LabelledValueComponent,
|
|
4419
|
+
LoadingContainerComponent,
|
|
4420
|
+
MarkdownComponent
|
|
3999
4421
|
],
|
|
4000
4422
|
exports: [
|
|
4001
4423
|
NumberInputComponent,
|
|
@@ -4032,9 +4454,14 @@ ComponentsModule.decorators = [
|
|
|
4032
4454
|
BusyOverlayComponent,
|
|
4033
4455
|
EmptyStateComponent,
|
|
4034
4456
|
PaginatorComponent,
|
|
4457
|
+
CardStackComponent,
|
|
4458
|
+
LabelledValueComponent,
|
|
4459
|
+
LoadingContainerComponent,
|
|
4460
|
+
MarkdownComponent
|
|
4035
4461
|
],
|
|
4036
4462
|
providers: [
|
|
4037
|
-
FocusBindingFactory
|
|
4463
|
+
FocusBindingFactory,
|
|
4464
|
+
MarkdownService
|
|
4038
4465
|
]
|
|
4039
4466
|
},] }
|
|
4040
4467
|
];
|
|
@@ -4067,7 +4494,8 @@ class ActivityActionsComponent extends DisposableComponent {
|
|
|
4067
4494
|
constructor(cdr) {
|
|
4068
4495
|
super();
|
|
4069
4496
|
this.cdr = cdr;
|
|
4070
|
-
this.
|
|
4497
|
+
this.layout = ActivityActionsComponent.Layout.BLOCK;
|
|
4498
|
+
this.align = ActivityActionsComponent.Align.STRETCH;
|
|
4071
4499
|
}
|
|
4072
4500
|
set faces(faces) {
|
|
4073
4501
|
this.confirmFace = faces.confirm;
|
|
@@ -4079,12 +4507,6 @@ class ActivityActionsComponent extends DisposableComponent {
|
|
|
4079
4507
|
set style(style) {
|
|
4080
4508
|
this.faces = style;
|
|
4081
4509
|
}
|
|
4082
|
-
get alignEnd() {
|
|
4083
|
-
return this.align === 'end';
|
|
4084
|
-
}
|
|
4085
|
-
get alignStretch() {
|
|
4086
|
-
return this.align === 'stretch';
|
|
4087
|
-
}
|
|
4088
4510
|
ngOnInit() {
|
|
4089
4511
|
}
|
|
4090
4512
|
hasConfirmFace() {
|
|
@@ -4103,7 +4525,7 @@ ActivityActionsComponent.decorators = [
|
|
|
4103
4525
|
{ type: Component, args: [{
|
|
4104
4526
|
selector: 'aup-activity-actions',
|
|
4105
4527
|
template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n",
|
|
4106
|
-
styles: [":host{display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr
|
|
4528
|
+
styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}\n"]
|
|
4107
4529
|
},] }
|
|
4108
4530
|
];
|
|
4109
4531
|
ActivityActionsComponent.ctorParameters = () => [
|
|
@@ -4116,9 +4538,8 @@ ActivityActionsComponent.propDecorators = {
|
|
|
4116
4538
|
confirmFace: [{ type: Input }],
|
|
4117
4539
|
cancelFace: [{ type: Input }],
|
|
4118
4540
|
style: [{ type: Input }],
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
alignStretch: [{ type: HostBinding, args: ['class.align-stretch',] }]
|
|
4541
|
+
layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
|
|
4542
|
+
align: [{ type: Input }, { type: HostBinding, args: ['attr.align',] }]
|
|
4122
4543
|
};
|
|
4123
4544
|
__decorate([
|
|
4124
4545
|
TrackExternal(),
|
|
@@ -4128,14 +4549,26 @@ __decorate([
|
|
|
4128
4549
|
TrackExternal(),
|
|
4129
4550
|
__metadata("design:type", Command)
|
|
4130
4551
|
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
4552
|
+
(function (ActivityActionsComponent) {
|
|
4553
|
+
ActivityActionsComponent.Layout = Enum({
|
|
4554
|
+
INLINE: 'inline',
|
|
4555
|
+
BLOCK: 'block'
|
|
4556
|
+
});
|
|
4557
|
+
ActivityActionsComponent.Align = Enum({
|
|
4558
|
+
START: 'start',
|
|
4559
|
+
END: 'end',
|
|
4560
|
+
STRETCH: 'stretch'
|
|
4561
|
+
});
|
|
4562
|
+
})(ActivityActionsComponent || (ActivityActionsComponent = {}));
|
|
4131
4563
|
|
|
4132
4564
|
const ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
|
|
4133
4565
|
class Activity extends DisposableComponent {
|
|
4134
4566
|
constructor() {
|
|
4135
4567
|
super();
|
|
4136
|
-
this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
4568
|
+
this._busyModel = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
4137
4569
|
this._focusedModel = this.registerDisposable(new DelegatingValueModel());
|
|
4138
4570
|
this.class = 'aup-activity';
|
|
4571
|
+
this.busyWhile(this.confirmCommand.busy);
|
|
4139
4572
|
}
|
|
4140
4573
|
get isFocused() {
|
|
4141
4574
|
return this._focusedModel.value;
|
|
@@ -4188,127 +4621,183 @@ Activity.decorators = [
|
|
|
4188
4621
|
template: ''
|
|
4189
4622
|
},] }
|
|
4190
4623
|
];
|
|
4191
|
-
Activity.ctorParameters = () => [];
|
|
4192
|
-
Activity.propDecorators = {
|
|
4193
|
-
activityActions: [{ type: ViewChild, args: [ActivityActionsComponent,] }],
|
|
4194
|
-
class: [{ type: HostBinding, args: ['class',] }],
|
|
4195
|
-
isFocused: [{ type: HostBinding, args: ['attr.focused',] }]
|
|
4196
|
-
};
|
|
4197
|
-
__decorate([
|
|
4198
|
-
TrackExternal(),
|
|
4199
|
-
__metadata("design:type", Command)
|
|
4200
|
-
], Activity.prototype, "confirmCommand", void 0);
|
|
4201
|
-
__decorate([
|
|
4202
|
-
TrackExternal(),
|
|
4203
|
-
__metadata("design:type", Command)
|
|
4204
|
-
], Activity.prototype, "cancelCommand", void 0);
|
|
4624
|
+
Activity.ctorParameters = () => [];
|
|
4625
|
+
Activity.propDecorators = {
|
|
4626
|
+
activityActions: [{ type: ViewChild, args: [ActivityActionsComponent,] }],
|
|
4627
|
+
class: [{ type: HostBinding, args: ['class',] }],
|
|
4628
|
+
isFocused: [{ type: HostBinding, args: ['attr.focused',] }]
|
|
4629
|
+
};
|
|
4630
|
+
__decorate([
|
|
4631
|
+
TrackExternal(),
|
|
4632
|
+
__metadata("design:type", Command)
|
|
4633
|
+
], Activity.prototype, "confirmCommand", void 0);
|
|
4634
|
+
__decorate([
|
|
4635
|
+
TrackExternal(),
|
|
4636
|
+
__metadata("design:type", Command)
|
|
4637
|
+
], Activity.prototype, "cancelCommand", void 0);
|
|
4638
|
+
|
|
4639
|
+
var Alert;
|
|
4640
|
+
(function (Alert) {
|
|
4641
|
+
function getContent(alert) {
|
|
4642
|
+
const content = alert.content();
|
|
4643
|
+
return Array.isArray(content) ? content : [content];
|
|
4644
|
+
}
|
|
4645
|
+
Alert.getContent = getContent;
|
|
4646
|
+
function getTitle(alert) {
|
|
4647
|
+
return _.isFunction(alert.title) ? alert.title() : undefined;
|
|
4648
|
+
}
|
|
4649
|
+
Alert.getTitle = getTitle;
|
|
4650
|
+
function getColor(alert) {
|
|
4651
|
+
return _.isFunction(alert.color) ? alert.color() : undefined;
|
|
4652
|
+
}
|
|
4653
|
+
Alert.getColor = getColor;
|
|
4654
|
+
})(Alert || (Alert = {}));
|
|
4655
|
+
|
|
4656
|
+
const ALERT_CONFIG = new InjectionToken('AlertConfig');
|
|
4657
|
+
class AbstractDialogComponent extends Activity {
|
|
4658
|
+
constructor(config) {
|
|
4659
|
+
super();
|
|
4660
|
+
this.config = config;
|
|
4661
|
+
assert.notNil(config);
|
|
4662
|
+
this.title = Alert.getTitle(config);
|
|
4663
|
+
this.color = this.checkColor(Alert.getColor(config));
|
|
4664
|
+
this.content = Alert.getContent(config);
|
|
4665
|
+
this.confirmFace = {
|
|
4666
|
+
text: () => config.ok(),
|
|
4667
|
+
color: () => this.color || 'primary',
|
|
4668
|
+
style: () => 'raised'
|
|
4669
|
+
};
|
|
4670
|
+
}
|
|
4671
|
+
getConfig() {
|
|
4672
|
+
return lang$1.abstractMethod(this.constructor);
|
|
4673
|
+
}
|
|
4674
|
+
checkColor(rawColor) {
|
|
4675
|
+
if (this.isDestructive()) {
|
|
4676
|
+
return 'warn';
|
|
4677
|
+
}
|
|
4678
|
+
else {
|
|
4679
|
+
if (['primary', 'accent', 'warn'].includes(rawColor)) {
|
|
4680
|
+
return rawColor;
|
|
4681
|
+
}
|
|
4682
|
+
else {
|
|
4683
|
+
console.warn(`Invalid color string ${rawColor}`);
|
|
4684
|
+
return undefined;
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
}
|
|
4688
|
+
isDestructive() {
|
|
4689
|
+
// @ts-ignore
|
|
4690
|
+
return _.isFunction(this.config['destructive']) && this.config.destructive();
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
AbstractDialogComponent.decorators = [
|
|
4694
|
+
{ type: Component, args: [{
|
|
4695
|
+
template: ''
|
|
4696
|
+
},] }
|
|
4697
|
+
];
|
|
4698
|
+
AbstractDialogComponent.ctorParameters = () => [
|
|
4699
|
+
{ type: undefined, decorators: [{ type: Inject, args: [ALERT_CONFIG,] }] }
|
|
4700
|
+
];
|
|
4701
|
+
|
|
4702
|
+
class AbstractConfirmDialogComponent extends AbstractDialogComponent {
|
|
4703
|
+
constructor(config) {
|
|
4704
|
+
super(config);
|
|
4705
|
+
this.cancelFace = {
|
|
4706
|
+
text: () => config.cancel()
|
|
4707
|
+
};
|
|
4708
|
+
this.cancelCommand = Command.create(() => {
|
|
4709
|
+
return this.cancel();
|
|
4710
|
+
});
|
|
4711
|
+
}
|
|
4712
|
+
}
|
|
4713
|
+
AbstractConfirmDialogComponent.decorators = [
|
|
4714
|
+
{ type: Component, args: [{
|
|
4715
|
+
template: ''
|
|
4716
|
+
},] }
|
|
4717
|
+
];
|
|
4718
|
+
AbstractConfirmDialogComponent.ctorParameters = () => [
|
|
4719
|
+
{ type: undefined, decorators: [{ type: Inject, args: [ALERT_CONFIG,] }] }
|
|
4720
|
+
];
|
|
4205
4721
|
|
|
4206
|
-
class AlertDialogComponent extends
|
|
4722
|
+
class AlertDialogComponent extends AbstractDialogComponent {
|
|
4207
4723
|
constructor(alert) {
|
|
4208
|
-
super();
|
|
4209
|
-
this.alert = alert;
|
|
4724
|
+
super(alert);
|
|
4210
4725
|
this.confirmCommand = Command.create(() => {
|
|
4211
4726
|
this.done();
|
|
4212
4727
|
});
|
|
4213
|
-
this.confirmFace = {
|
|
4214
|
-
text: () => alert.ok(),
|
|
4215
|
-
color: () => "primary",
|
|
4216
|
-
style: () => "raised"
|
|
4217
|
-
};
|
|
4218
|
-
}
|
|
4219
|
-
ngOnInit() {
|
|
4220
4728
|
}
|
|
4221
4729
|
}
|
|
4222
4730
|
AlertDialogComponent.decorators = [
|
|
4223
4731
|
{ type: Component, args: [{
|
|
4224
4732
|
selector: 'aup-alert-dialog',
|
|
4225
|
-
template: "<aup-activity-title *ngIf=\"
|
|
4226
|
-
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
4733
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\"></aup-activity-actions>\n",
|
|
4734
|
+
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
4227
4735
|
},] }
|
|
4228
4736
|
];
|
|
4229
4737
|
AlertDialogComponent.ctorParameters = () => [
|
|
4230
|
-
{ type:
|
|
4738
|
+
{ type: Alert, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
4231
4739
|
];
|
|
4232
4740
|
|
|
4233
|
-
class ConfirmThenDialogComponent extends
|
|
4741
|
+
class ConfirmThenDialogComponent extends AbstractConfirmDialogComponent {
|
|
4234
4742
|
constructor(config) {
|
|
4235
|
-
super();
|
|
4236
|
-
this.config = config;
|
|
4237
|
-
assert.notNil(config);
|
|
4743
|
+
super(config.confirm);
|
|
4238
4744
|
this.confirmCommand = Command.create(() => {
|
|
4239
|
-
this.interactionContext.startActivity(
|
|
4745
|
+
this.interactionContext.startActivity(config.activityType, config.data)
|
|
4240
4746
|
.then((result) => this.done(result))
|
|
4241
4747
|
.catch(error => this.cancel(error));
|
|
4242
4748
|
});
|
|
4243
|
-
this.cancelCommand = Command.create(() => {
|
|
4244
|
-
return this.cancel();
|
|
4245
|
-
});
|
|
4246
|
-
this.confirmFace = {
|
|
4247
|
-
text: () => this.confirm.ok(),
|
|
4248
|
-
color: () => this.isDestructive() ? 'warn' : 'primary',
|
|
4249
|
-
style: () => 'raised'
|
|
4250
|
-
};
|
|
4251
|
-
this.cancelFace = {
|
|
4252
|
-
text: () => this.confirm.cancel(),
|
|
4253
|
-
};
|
|
4254
|
-
}
|
|
4255
|
-
ngOnInit() {
|
|
4256
|
-
}
|
|
4257
|
-
get confirm() {
|
|
4258
|
-
return this.config.confirm;
|
|
4259
|
-
}
|
|
4260
|
-
get titleColor() {
|
|
4261
|
-
return this.isDestructive() ? 'warn' : undefined;
|
|
4262
|
-
}
|
|
4263
|
-
isDestructive() {
|
|
4264
|
-
return this.confirm.destructive && this.confirm.destructive();
|
|
4265
4749
|
}
|
|
4266
4750
|
}
|
|
4267
4751
|
ConfirmThenDialogComponent.decorators = [
|
|
4268
4752
|
{ type: Component, args: [{
|
|
4269
4753
|
selector: 'aup-confirmation-dialog',
|
|
4270
|
-
template: "<aup-activity-title *ngIf=\"
|
|
4271
|
-
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
4754
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
|
|
4755
|
+
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
4272
4756
|
},] }
|
|
4273
4757
|
];
|
|
4274
4758
|
ConfirmThenDialogComponent.ctorParameters = () => [
|
|
4275
4759
|
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
4276
4760
|
];
|
|
4277
4761
|
|
|
4278
|
-
class
|
|
4762
|
+
class ConfirmThenExecuteDialogComponent extends AbstractConfirmDialogComponent {
|
|
4763
|
+
constructor(data) {
|
|
4764
|
+
super(data.confirm);
|
|
4765
|
+
this.confirmCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
|
|
4766
|
+
try {
|
|
4767
|
+
const result = yield data.operation(this.interactionContext);
|
|
4768
|
+
this.done(result);
|
|
4769
|
+
}
|
|
4770
|
+
catch (e) {
|
|
4771
|
+
this.cancel(e);
|
|
4772
|
+
}
|
|
4773
|
+
}));
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
ConfirmThenExecuteDialogComponent.decorators = [
|
|
4777
|
+
{ type: Component, args: [{
|
|
4778
|
+
selector: 'aup-confirmation-execute-dialog',
|
|
4779
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
|
|
4780
|
+
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
4781
|
+
},] }
|
|
4782
|
+
];
|
|
4783
|
+
ConfirmThenExecuteDialogComponent.ctorParameters = () => [
|
|
4784
|
+
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
4785
|
+
];
|
|
4786
|
+
|
|
4787
|
+
class ConfirmationDialogComponent extends AbstractConfirmDialogComponent {
|
|
4279
4788
|
constructor(confirm) {
|
|
4280
|
-
super();
|
|
4789
|
+
super(confirm);
|
|
4281
4790
|
this.confirm = confirm;
|
|
4282
|
-
assert.notNil(confirm);
|
|
4283
4791
|
this.confirmCommand = Command.create(() => {
|
|
4284
4792
|
return this.done();
|
|
4285
4793
|
});
|
|
4286
|
-
this.cancelCommand = Command.create(() => {
|
|
4287
|
-
return this.cancel();
|
|
4288
|
-
});
|
|
4289
|
-
this.confirmFace = {
|
|
4290
|
-
text: () => confirm.ok(),
|
|
4291
|
-
color: () => this.isDestructive() ? 'warn' : 'primary',
|
|
4292
|
-
style: () => 'raised'
|
|
4293
|
-
};
|
|
4294
|
-
this.cancelFace = {
|
|
4295
|
-
text: () => confirm.cancel(),
|
|
4296
|
-
};
|
|
4297
|
-
}
|
|
4298
|
-
ngOnInit() {
|
|
4299
|
-
}
|
|
4300
|
-
get titleColor() {
|
|
4301
|
-
return this.isDestructive() ? 'warn' : undefined;
|
|
4302
|
-
}
|
|
4303
|
-
isDestructive() {
|
|
4304
|
-
return this.confirm.destructive && this.confirm.destructive();
|
|
4305
4794
|
}
|
|
4306
4795
|
}
|
|
4307
4796
|
ConfirmationDialogComponent.decorators = [
|
|
4308
4797
|
{ type: Component, args: [{
|
|
4309
4798
|
selector: 'aup-confirmation-dialog',
|
|
4310
|
-
template: "<aup-activity-title *ngIf=\"
|
|
4311
|
-
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
4799
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n\n",
|
|
4800
|
+
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
4312
4801
|
},] }
|
|
4313
4802
|
];
|
|
4314
4803
|
ConfirmationDialogComponent.ctorParameters = () => [
|
|
@@ -4345,6 +4834,12 @@ class AbstractInteractionContext {
|
|
|
4345
4834
|
data: data
|
|
4346
4835
|
}, true);
|
|
4347
4836
|
}
|
|
4837
|
+
confirmThenExecute(confirm, operation) {
|
|
4838
|
+
return this.createAndLaunchActivity(ConfirmThenExecuteDialogComponent, {
|
|
4839
|
+
confirm,
|
|
4840
|
+
operation: operation
|
|
4841
|
+
}, true);
|
|
4842
|
+
}
|
|
4348
4843
|
}
|
|
4349
4844
|
|
|
4350
4845
|
class ActivityRef {
|
|
@@ -4450,7 +4945,7 @@ ActivityOutletComponent.decorators = [
|
|
|
4450
4945
|
{ type: Component, args: [{
|
|
4451
4946
|
selector: 'aup-activity-outlet',
|
|
4452
4947
|
template: '',
|
|
4453
|
-
styles: [":host{display:block}"]
|
|
4948
|
+
styles: [":host{display:block}\n"]
|
|
4454
4949
|
},] }
|
|
4455
4950
|
];
|
|
4456
4951
|
ActivityOutletComponent.ctorParameters = () => [
|
|
@@ -4470,7 +4965,7 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
4470
4965
|
this.activityRefs = [];
|
|
4471
4966
|
this.garbage = new GarbageCollector();
|
|
4472
4967
|
this.inAnimation = new MutableValueModel(false);
|
|
4473
|
-
this.busy = new DelegatingValueModel().withDefault(false);
|
|
4968
|
+
this.busy = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
4474
4969
|
this.registerDisposable(this.busy);
|
|
4475
4970
|
}
|
|
4476
4971
|
ngOnInit() {
|
|
@@ -4646,8 +5141,8 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
4646
5141
|
ActivityContainerComponent.decorators = [
|
|
4647
5142
|
{ type: Component, args: [{
|
|
4648
5143
|
selector: 'aup-activity-container',
|
|
4649
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\">\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n",
|
|
4650
|
-
styles: [":host{display:flex;flex-direction:column}
|
|
5144
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n",
|
|
5145
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}\n"]
|
|
4651
5146
|
},] }
|
|
4652
5147
|
];
|
|
4653
5148
|
ActivityContainerComponent.ctorParameters = () => [];
|
|
@@ -4700,7 +5195,7 @@ ActivityTitleComponent.decorators = [
|
|
|
4700
5195
|
{ type: Component, args: [{
|
|
4701
5196
|
selector: 'aup-activity-title',
|
|
4702
5197
|
template: "<ng-content></ng-content>\n",
|
|
4703
|
-
styles: [":host{display:block}"]
|
|
5198
|
+
styles: [":host{display:block}\n"]
|
|
4704
5199
|
},] }
|
|
4705
5200
|
];
|
|
4706
5201
|
ActivityTitleComponent.propDecorators = {
|
|
@@ -4725,6 +5220,9 @@ class AbstractActivityTriggerComponent extends DisposableComponent {
|
|
|
4725
5220
|
});
|
|
4726
5221
|
});
|
|
4727
5222
|
}
|
|
5223
|
+
get interactionContext() {
|
|
5224
|
+
return lang$1.abstractMethod(this.constructor);
|
|
5225
|
+
}
|
|
4728
5226
|
ngOnInit() {
|
|
4729
5227
|
}
|
|
4730
5228
|
get isActive() {
|
|
@@ -4890,7 +5388,7 @@ InteractionService.ctorParameters = () => [
|
|
|
4890
5388
|
constructor() {
|
|
4891
5389
|
super();
|
|
4892
5390
|
this._interactions = new MutableListModel();
|
|
4893
|
-
this._disabledDelegate = new DelegatingValueModel().withDefault(false);
|
|
5391
|
+
this._disabledDelegate = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
4894
5392
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
4895
5393
|
this.active = chain(this._interactions).isNotEmpty();
|
|
4896
5394
|
this.interactionContextIds = chain(this._interactions).pluck("identifier");
|
|
@@ -4946,14 +5444,17 @@ InteractionService.ctorParameters = () => [
|
|
|
4946
5444
|
class ModalActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
4947
5445
|
constructor(interactionService) {
|
|
4948
5446
|
super();
|
|
4949
|
-
this.
|
|
5447
|
+
this._interactionContext = interactionService.createModalInteractionContextDisposedWith(this);
|
|
5448
|
+
}
|
|
5449
|
+
get interactionContext() {
|
|
5450
|
+
return this._interactionContext;
|
|
4950
5451
|
}
|
|
4951
5452
|
}
|
|
4952
5453
|
ModalActivityTriggerComponent.decorators = [
|
|
4953
5454
|
{ type: Component, args: [{
|
|
4954
5455
|
selector: 'aup-modal-activity-trigger',
|
|
4955
5456
|
template: "<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n",
|
|
4956
|
-
styles: [":host{display:inline-block}"]
|
|
5457
|
+
styles: [":host{display:inline-block}\n"]
|
|
4957
5458
|
},] }
|
|
4958
5459
|
];
|
|
4959
5460
|
ModalActivityTriggerComponent.ctorParameters = () => [
|
|
@@ -4986,6 +5487,9 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
4986
5487
|
var _a;
|
|
4987
5488
|
return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : '0ms';
|
|
4988
5489
|
}
|
|
5490
|
+
get active() {
|
|
5491
|
+
return this.isActive();
|
|
5492
|
+
}
|
|
4989
5493
|
ngAfterViewInit() {
|
|
4990
5494
|
this.interactionService.registerInplaceInteractionContext(this);
|
|
4991
5495
|
}
|
|
@@ -5010,6 +5514,9 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
5010
5514
|
confirmThen(confirm, activityType, data) {
|
|
5011
5515
|
return this.activityContainerComponent.confirmThen(confirm, activityType);
|
|
5012
5516
|
}
|
|
5517
|
+
confirmThenExecute(confirm, operation) {
|
|
5518
|
+
return this.activityContainerComponent.confirmThenExecute(confirm, operation);
|
|
5519
|
+
}
|
|
5013
5520
|
isActive() {
|
|
5014
5521
|
return this.activityContainerComponent.isActive();
|
|
5015
5522
|
}
|
|
@@ -5021,7 +5528,7 @@ InPlaceInteractionContextComponent.decorators = [
|
|
|
5021
5528
|
{ type: Component, args: [{
|
|
5022
5529
|
selector: 'aup-in-place-interaction-context',
|
|
5023
5530
|
template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
|
|
5024
|
-
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
5531
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}\n"]
|
|
5025
5532
|
},] }
|
|
5026
5533
|
];
|
|
5027
5534
|
InPlaceInteractionContextComponent.ctorParameters = () => [
|
|
@@ -5030,8 +5537,80 @@ InPlaceInteractionContextComponent.ctorParameters = () => [
|
|
|
5030
5537
|
];
|
|
5031
5538
|
InPlaceInteractionContextComponent.propDecorators = {
|
|
5032
5539
|
activityContainerComponent: [{ type: ViewChild, args: ['activityContainer', { static: true },] }],
|
|
5033
|
-
animateFirstActivity: [{ type: Input }]
|
|
5540
|
+
animateFirstActivity: [{ type: Input }],
|
|
5541
|
+
active: [{ type: HostBinding, args: ["class.active",] }]
|
|
5542
|
+
};
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
*
|
|
5546
|
+
*/
|
|
5547
|
+
class AddCardActivityComponent extends AbstractActivityTriggerComponent {
|
|
5548
|
+
constructor(interactionService) {
|
|
5549
|
+
super();
|
|
5550
|
+
this.interactionStyle = AddCardActivityComponent.InteractionType.MODAL;
|
|
5551
|
+
this.renderAs = AddCardActivityComponent.RenderAs.CARD;
|
|
5552
|
+
this.notCard = true;
|
|
5553
|
+
const { chain } = Dsl.disposeWith(this);
|
|
5554
|
+
this.modalInteractionContext = interactionService.createModalInteractionContextDisposedWith(this);
|
|
5555
|
+
this.faceList = chain(this.faceModel).mapToList(face => [face]);
|
|
5556
|
+
}
|
|
5557
|
+
get renderAsClass() {
|
|
5558
|
+
return `render-as-${this.renderAs}`;
|
|
5559
|
+
}
|
|
5560
|
+
get activityTypeClass() {
|
|
5561
|
+
return `${this.interactionStyle}-activity`;
|
|
5562
|
+
}
|
|
5563
|
+
isRenderAsCard() {
|
|
5564
|
+
return this.renderAs === 'card';
|
|
5565
|
+
}
|
|
5566
|
+
isRenderAsButton() {
|
|
5567
|
+
return this.renderAs === 'button';
|
|
5568
|
+
}
|
|
5569
|
+
ngOnInit() {
|
|
5570
|
+
}
|
|
5571
|
+
get interactionContext() {
|
|
5572
|
+
switch (this.interactionStyle) {
|
|
5573
|
+
case 'inline':
|
|
5574
|
+
return this.inlineInteractionContext;
|
|
5575
|
+
default:
|
|
5576
|
+
return this.modalInteractionContext;
|
|
5577
|
+
}
|
|
5578
|
+
}
|
|
5579
|
+
isModal() {
|
|
5580
|
+
return this.interactionStyle === 'modal';
|
|
5581
|
+
}
|
|
5582
|
+
isInline() {
|
|
5583
|
+
return this.interactionStyle === 'inline';
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
AddCardActivityComponent.decorators = [
|
|
5587
|
+
{ type: Component, args: [{
|
|
5588
|
+
selector: 'aup-add-card-activity',
|
|
5589
|
+
template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n",
|
|
5590
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}:host[interactionStyle=inline][renderas=card]:not(.active):hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}:host[interactionStyle=inline][renderas=card]:not(.active):hover{border-color:transparent;background-color:#fff;color:#0000008a}:host[interactionStyle=modal][renderas=card]{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}:host[interactionStyle=modal][renderas=card]:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}:host[interactionStyle=modal][renderas=card]:hover{border-color:transparent;background-color:#fff;color:#0000008a}:host-context(aup-card-container)[renderas=button]{align-self:start}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}\n"]
|
|
5591
|
+
},] }
|
|
5592
|
+
];
|
|
5593
|
+
AddCardActivityComponent.ctorParameters = () => [
|
|
5594
|
+
{ type: InteractionService }
|
|
5595
|
+
];
|
|
5596
|
+
AddCardActivityComponent.propDecorators = {
|
|
5597
|
+
inlineInteractionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }],
|
|
5598
|
+
interactionStyle: [{ type: Input }],
|
|
5599
|
+
renderAs: [{ type: Input }, { type: HostBinding, args: ['class',] }],
|
|
5600
|
+
notCard: [{ type: HostBinding, args: ['class.not-card',] }],
|
|
5601
|
+
renderAsClass: [{ type: HostBinding, args: ['class',] }],
|
|
5602
|
+
activityTypeClass: [{ type: HostBinding, args: ['class',] }]
|
|
5034
5603
|
};
|
|
5604
|
+
(function (AddCardActivityComponent) {
|
|
5605
|
+
AddCardActivityComponent.InteractionType = Enum({
|
|
5606
|
+
MODAL: 'modal',
|
|
5607
|
+
INLINE: 'inline'
|
|
5608
|
+
});
|
|
5609
|
+
AddCardActivityComponent.RenderAs = Enum({
|
|
5610
|
+
CARD: 'card',
|
|
5611
|
+
BUTTON: 'button'
|
|
5612
|
+
});
|
|
5613
|
+
})(AddCardActivityComponent || (AddCardActivityComponent = {}));
|
|
5035
5614
|
|
|
5036
5615
|
/**
|
|
5037
5616
|
* Css Vars.
|
|
@@ -5071,7 +5650,7 @@ AddItemInteractionContextComponent.decorators = [
|
|
|
5071
5650
|
{ type: Component, args: [{
|
|
5072
5651
|
selector: 'aup-add-item-interaction-context',
|
|
5073
5652
|
template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><aup-icon [icon]=\"icon\"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n",
|
|
5074
|
-
styles: [":host{--def-link-color:var(--link-color,currentColor);--def-link-color-hover:var(--link-color-hover,currentColor);--def-link-background:var(--link-background,transparent);--def-link-background-hover:var(--link-background-hover,rgba(0,0,0,
|
|
5653
|
+
styles: [":host{--def-link-color: var(--link-color, currentColor);--def-link-color-hover: var(--link-color-hover, currentColor);--def-link-background: var(--link-background, transparent);--def-link-background-hover: var(--link-background-hover, rgba(0, 0, 0, .05));--def-link-border-radius: var(--link-border-radius, 4px);--def-link-padding: var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:none}:host:hover a.link{color:var(--def-link-color-hover);background-color:var(--def-link-background-hover)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-background);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}\n"]
|
|
5075
5654
|
},] }
|
|
5076
5655
|
];
|
|
5077
5656
|
AddItemInteractionContextComponent.ctorParameters = () => [];
|
|
@@ -5094,17 +5673,20 @@ class InlineActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
|
5094
5673
|
constructor() {
|
|
5095
5674
|
super();
|
|
5096
5675
|
}
|
|
5676
|
+
get interactionContext() {
|
|
5677
|
+
return this._interactionContext;
|
|
5678
|
+
}
|
|
5097
5679
|
}
|
|
5098
5680
|
InlineActivityTriggerComponent.decorators = [
|
|
5099
5681
|
{ type: Component, args: [{
|
|
5100
5682
|
selector: 'aup-inline-activity-trigger',
|
|
5101
5683
|
template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n",
|
|
5102
|
-
styles: [":host{display:inline-block}"]
|
|
5684
|
+
styles: [":host{display:inline-block}\n"]
|
|
5103
5685
|
},] }
|
|
5104
5686
|
];
|
|
5105
5687
|
InlineActivityTriggerComponent.ctorParameters = () => [];
|
|
5106
5688
|
InlineActivityTriggerComponent.propDecorators = {
|
|
5107
|
-
|
|
5689
|
+
_interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }]
|
|
5108
5690
|
};
|
|
5109
5691
|
|
|
5110
5692
|
/**
|
|
@@ -5135,6 +5717,7 @@ class PopupInteractionContextComponent extends DisposableComponent {
|
|
|
5135
5717
|
const self = this;
|
|
5136
5718
|
const overlayRef = this._overlay.create({
|
|
5137
5719
|
hasBackdrop: false,
|
|
5720
|
+
disposeOnNavigation: true,
|
|
5138
5721
|
panelClass: 'aup-popup-interaction-panel',
|
|
5139
5722
|
positionStrategy: this._overlay.position()
|
|
5140
5723
|
.flexibleConnectedTo(this._element)
|
|
@@ -5189,7 +5772,7 @@ PopupInteractionContextComponent.decorators = [
|
|
|
5189
5772
|
{ type: Component, args: [{
|
|
5190
5773
|
selector: 'aup-popup-interaction-context',
|
|
5191
5774
|
template: "<ng-content></ng-content>\n",
|
|
5192
|
-
styles: [":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}"]
|
|
5775
|
+
styles: [":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}\n"]
|
|
5193
5776
|
},] }
|
|
5194
5777
|
];
|
|
5195
5778
|
PopupInteractionContextComponent.ctorParameters = () => [
|
|
@@ -5265,44 +5848,93 @@ InteractionContextTriggerFor.propDecorators = {
|
|
|
5265
5848
|
// @see https://github.com/ng-packagr/ng-packagr/issues/641 and https://github.com/angular/angular/issues/21123
|
|
5266
5849
|
// we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)
|
|
5267
5850
|
// @dynamic
|
|
5268
|
-
class
|
|
5851
|
+
class InputActivity extends Activity {
|
|
5269
5852
|
constructor(data) {
|
|
5853
|
+
var _a, _b;
|
|
5270
5854
|
super();
|
|
5271
5855
|
this.data = data;
|
|
5272
5856
|
this.class = 'aup-input-activity';
|
|
5273
5857
|
const form = new DirtyTrackingForm();
|
|
5274
5858
|
this.valueModel = form.valueModel(this.data.initialValue);
|
|
5275
5859
|
this.valueModel.validateUsing(data.validators || []);
|
|
5276
|
-
|
|
5860
|
+
// TODO: move to global configuration
|
|
5861
|
+
this.confirmFace = (_a = data.confirmFace) !== null && _a !== void 0 ? _a : {
|
|
5862
|
+
icon: () => 'mat:check'
|
|
5863
|
+
};
|
|
5864
|
+
this.cancelFace = (_b = data.cancelFace) !== null && _b !== void 0 ? _b : {
|
|
5865
|
+
icon: () => 'mat:clear'
|
|
5866
|
+
};
|
|
5867
|
+
this.confirmCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
|
|
5277
5868
|
if (this.valueModel.validate()) {
|
|
5278
5869
|
if (data.save) {
|
|
5279
|
-
|
|
5280
|
-
|
|
5870
|
+
const self = this;
|
|
5871
|
+
try {
|
|
5872
|
+
let allGood = true;
|
|
5873
|
+
const result = yield data.save(this.valueModel.value, {
|
|
5874
|
+
injectError(error) {
|
|
5875
|
+
allGood = false;
|
|
5876
|
+
self.valueModel.injectErrors([error]);
|
|
5877
|
+
}
|
|
5878
|
+
});
|
|
5879
|
+
if (allGood) {
|
|
5880
|
+
this.done(this.valueModel.value);
|
|
5881
|
+
}
|
|
5882
|
+
}
|
|
5883
|
+
catch (e) {
|
|
5884
|
+
console.error(e);
|
|
5885
|
+
}
|
|
5281
5886
|
}
|
|
5282
5887
|
else {
|
|
5283
5888
|
this.done(this.valueModel.value);
|
|
5284
5889
|
}
|
|
5285
5890
|
}
|
|
5286
|
-
});
|
|
5891
|
+
}));
|
|
5287
5892
|
this.cancelCommand = Command.create(() => {
|
|
5288
5893
|
this.cancel();
|
|
5289
5894
|
});
|
|
5895
|
+
this.busyWhile(this.confirmCommand.busy);
|
|
5896
|
+
}
|
|
5897
|
+
get layout() {
|
|
5898
|
+
var _a, _b;
|
|
5899
|
+
return (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.layout) !== null && _b !== void 0 ? _b : InputActivity.Layout.BLOCK;
|
|
5290
5900
|
}
|
|
5291
5901
|
onActivityReady() {
|
|
5292
5902
|
this.valueModel.focusContext.requestFocus();
|
|
5293
5903
|
}
|
|
5904
|
+
get additionalCssClassName() {
|
|
5905
|
+
var _a;
|
|
5906
|
+
return (_a = this.data.cssClassName) !== null && _a !== void 0 ? _a : '';
|
|
5907
|
+
}
|
|
5908
|
+
onEscape() {
|
|
5909
|
+
if (this.shouldCancelOnEscape() && this.cancelCommand.enabled.value) {
|
|
5910
|
+
this.cancelCommand.execute();
|
|
5911
|
+
}
|
|
5912
|
+
}
|
|
5913
|
+
shouldCancelOnEscape() {
|
|
5914
|
+
return _.isNil(this.data.cancelOnEscape) // we default to true..
|
|
5915
|
+
|| this.data.cancelOnEscape;
|
|
5916
|
+
}
|
|
5294
5917
|
}
|
|
5295
|
-
|
|
5918
|
+
InputActivity.decorators = [
|
|
5296
5919
|
{ type: Component, args: [{ template: `` },] }
|
|
5297
5920
|
];
|
|
5298
|
-
|
|
5921
|
+
InputActivity.ctorParameters = () => [
|
|
5299
5922
|
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
5300
5923
|
];
|
|
5301
|
-
|
|
5302
|
-
class: [{ type: HostBinding, args: ['class',] }]
|
|
5924
|
+
InputActivity.propDecorators = {
|
|
5925
|
+
class: [{ type: HostBinding, args: ['class',] }],
|
|
5926
|
+
layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
|
|
5927
|
+
additionalCssClassName: [{ type: HostBinding, args: ["class",] }],
|
|
5928
|
+
onEscape: [{ type: HostListener, args: ['keydown.escape',] }]
|
|
5303
5929
|
};
|
|
5930
|
+
(function (InputActivity) {
|
|
5931
|
+
InputActivity.Layout = Enum({
|
|
5932
|
+
INLINE: 'inline',
|
|
5933
|
+
BLOCK: 'block'
|
|
5934
|
+
});
|
|
5935
|
+
})(InputActivity || (InputActivity = {}));
|
|
5304
5936
|
|
|
5305
|
-
class StringInputActivity extends
|
|
5937
|
+
class StringInputActivity extends InputActivity {
|
|
5306
5938
|
}
|
|
5307
5939
|
StringInputActivity.decorators = [
|
|
5308
5940
|
{ type: Component, args: [{
|
|
@@ -5313,13 +5945,15 @@ StringInputActivity.decorators = [
|
|
|
5313
5945
|
[placeholder]="data.placeholder"
|
|
5314
5946
|
[command.enter]="confirmCommand"
|
|
5315
5947
|
[command.escape]="cancelCommand"></aup-string-input>
|
|
5316
|
-
<aup-activity-actions align="end"
|
|
5317
|
-
[
|
|
5948
|
+
<aup-activity-actions [layout]="layout" align="end"
|
|
5949
|
+
[confirmFace]="confirmFace"
|
|
5950
|
+
[cancelFace]="cancelFace"
|
|
5951
|
+
></aup-activity-actions>
|
|
5318
5952
|
`
|
|
5319
5953
|
},] }
|
|
5320
5954
|
];
|
|
5321
5955
|
|
|
5322
|
-
class SelectInputActivity extends
|
|
5956
|
+
class SelectInputActivity extends InputActivity {
|
|
5323
5957
|
constructor() {
|
|
5324
5958
|
super(...arguments);
|
|
5325
5959
|
this.defaultOptionLabelFormat = (option) => {
|
|
@@ -5347,7 +5981,9 @@ SelectInputActivity.decorators = [
|
|
|
5347
5981
|
[options]="options"
|
|
5348
5982
|
[optionLabelFormat]="optionLabelFormat"
|
|
5349
5983
|
></aup-select-input>
|
|
5350
|
-
<aup-activity-actions
|
|
5984
|
+
<aup-activity-actions [layout]="layout" align="end"
|
|
5985
|
+
[confirmFace]="confirmFace"
|
|
5986
|
+
[cancelFace]="cancelFace"
|
|
5351
5987
|
></aup-activity-actions>
|
|
5352
5988
|
`
|
|
5353
5989
|
},] }
|
|
@@ -5453,32 +6089,6 @@ class TableModel extends AbstractTableModel {
|
|
|
5453
6089
|
}
|
|
5454
6090
|
}
|
|
5455
6091
|
|
|
5456
|
-
class SelfAndDescendantsVisitor {
|
|
5457
|
-
constructor() {
|
|
5458
|
-
}
|
|
5459
|
-
visit(it) {
|
|
5460
|
-
this.onVisit(it);
|
|
5461
|
-
if (this.shouldVisitChildrenOf(it)) {
|
|
5462
|
-
it.visitChildren(this);
|
|
5463
|
-
}
|
|
5464
|
-
}
|
|
5465
|
-
shouldVisitChildrenOf(it) {
|
|
5466
|
-
return true;
|
|
5467
|
-
}
|
|
5468
|
-
}
|
|
5469
|
-
(function (SelfAndDescendantsVisitor) {
|
|
5470
|
-
class Each extends SelfAndDescendantsVisitor {
|
|
5471
|
-
constructor(callback) {
|
|
5472
|
-
super();
|
|
5473
|
-
this.callback = callback;
|
|
5474
|
-
}
|
|
5475
|
-
onVisit(it) {
|
|
5476
|
-
this.callback(it);
|
|
5477
|
-
}
|
|
5478
|
-
}
|
|
5479
|
-
SelfAndDescendantsVisitor.Each = Each;
|
|
5480
|
-
})(SelfAndDescendantsVisitor || (SelfAndDescendantsVisitor = {}));
|
|
5481
|
-
|
|
5482
6092
|
/**
|
|
5483
6093
|
* @file Automatically generated by barrelsby.
|
|
5484
6094
|
*/
|
|
@@ -5489,20 +6099,222 @@ class PopupActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
|
5489
6099
|
this.anchorX = 'start';
|
|
5490
6100
|
this.anchorY = 'bottom';
|
|
5491
6101
|
}
|
|
6102
|
+
get interactionContext() {
|
|
6103
|
+
return this._interactionContext;
|
|
6104
|
+
}
|
|
5492
6105
|
}
|
|
5493
6106
|
PopupActivityTriggerComponent.decorators = [
|
|
5494
6107
|
{ type: Component, args: [{
|
|
5495
6108
|
selector: 'aup-popup-activity-trigger',
|
|
5496
6109
|
template: "<aup-popup-interaction-context [anchorX]=\"anchorX\" [anchorY]=\"anchorY\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-popup-interaction-context>\n",
|
|
5497
|
-
styles: [":host{display:inline-block}"]
|
|
6110
|
+
styles: [":host{display:inline-block}\n"]
|
|
5498
6111
|
},] }
|
|
5499
6112
|
];
|
|
5500
6113
|
PopupActivityTriggerComponent.ctorParameters = () => [];
|
|
5501
6114
|
PopupActivityTriggerComponent.propDecorators = {
|
|
5502
6115
|
anchorX: [{ type: Input }],
|
|
5503
6116
|
anchorY: [{ type: Input }],
|
|
5504
|
-
|
|
6117
|
+
_interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
|
|
6118
|
+
};
|
|
6119
|
+
|
|
6120
|
+
class InlineEditorModel extends GarbageCollector {
|
|
6121
|
+
constructor(valueModel, saveCallback) {
|
|
6122
|
+
super();
|
|
6123
|
+
this.valueModel = valueModel;
|
|
6124
|
+
this.saveCallback = saveCallback;
|
|
6125
|
+
this.editing = new MutableValueModel(false);
|
|
6126
|
+
this._validators = new MutableListModel();
|
|
6127
|
+
this._editingEnabled = this.registerDisposable(new DelegatingValueModel().withDefault(true));
|
|
6128
|
+
assert.notNil(valueModel);
|
|
6129
|
+
const { when } = Dsl.disposeWith(this);
|
|
6130
|
+
when(this.editingEnabled).becomesFalsey(() => this.cancelEdit());
|
|
6131
|
+
}
|
|
6132
|
+
get editingEnabled() {
|
|
6133
|
+
return this._editingEnabled.readonly;
|
|
6134
|
+
}
|
|
6135
|
+
disableWhile(condition) {
|
|
6136
|
+
const { chain } = Dsl.disposeWith(this);
|
|
6137
|
+
this.enableWhile(chain(condition).isFalsey());
|
|
6138
|
+
return this;
|
|
6139
|
+
}
|
|
6140
|
+
enableWhile(condition) {
|
|
6141
|
+
this._editingEnabled.setDelegate(condition);
|
|
6142
|
+
return this;
|
|
6143
|
+
}
|
|
6144
|
+
get validators() {
|
|
6145
|
+
return this._validators.readonly;
|
|
6146
|
+
}
|
|
6147
|
+
validateUsing(validator) {
|
|
6148
|
+
this._validators.push(validator);
|
|
6149
|
+
return this;
|
|
6150
|
+
}
|
|
6151
|
+
isEditing() {
|
|
6152
|
+
return this.editing.value;
|
|
6153
|
+
}
|
|
6154
|
+
cancelEdit() {
|
|
6155
|
+
this.editing.value = false;
|
|
6156
|
+
}
|
|
6157
|
+
startEditing() {
|
|
6158
|
+
this.editing.value = true;
|
|
6159
|
+
}
|
|
6160
|
+
}
|
|
6161
|
+
(function (InlineEditorModel) {
|
|
6162
|
+
function create(valueModel, options) {
|
|
6163
|
+
return new InlineEditorModel(valueModel, options.save);
|
|
6164
|
+
}
|
|
6165
|
+
InlineEditorModel.create = create;
|
|
6166
|
+
})(InlineEditorModel || (InlineEditorModel = {}));
|
|
6167
|
+
TrackExternal.oneTimeBinding(InlineEditorModel);
|
|
6168
|
+
|
|
6169
|
+
/**
|
|
6170
|
+
* @example
|
|
6171
|
+
* const source: ValueModel<string> = ...;
|
|
6172
|
+
* const model = InlineEditorModel.create(source, {
|
|
6173
|
+
* save(updated:string, context: EditContext) => {
|
|
6174
|
+
* try {
|
|
6175
|
+
* try and save the thing...
|
|
6176
|
+
* } catch(error) {
|
|
6177
|
+
* context.injectError(error)
|
|
6178
|
+
* }
|
|
6179
|
+
* }).validateUsing(Validator.present("We'll need a value");
|
|
6180
|
+
*
|
|
6181
|
+
* # in the view
|
|
6182
|
+
* <aup-inline-string-editor
|
|
6183
|
+
* label="My field"
|
|
6184
|
+
* placeHolder="I'm ready for a string..."
|
|
6185
|
+
* [editorModel]="model"></aup-inline-string-editor>
|
|
6186
|
+
*/
|
|
6187
|
+
class InlineStringEditorComponent extends DisposableComponent {
|
|
6188
|
+
constructor(interactionService) {
|
|
6189
|
+
super();
|
|
6190
|
+
this.editingEnabled = this.registerDisposable(new DelegatingValueModel());
|
|
6191
|
+
const { chain, when, valueOf } = Dsl.disposeWith(this);
|
|
6192
|
+
const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
|
|
6193
|
+
const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
|
|
6194
|
+
return Object.assign(Object.assign({}, InlineStringEditorComponent.DEFAULT_FACES), userFaces);
|
|
6195
|
+
}, { allowNil: true });
|
|
6196
|
+
this.editFaceModel = resolvedFacesModel.pluck('edit');
|
|
6197
|
+
this.saveFace = resolvedFacesModel.pluck('save');
|
|
6198
|
+
this.cancelFace = resolvedFacesModel.pluck('cancel');
|
|
6199
|
+
const self = this;
|
|
6200
|
+
this.editCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
|
|
6201
|
+
this.editorModel.editing.value = true;
|
|
6202
|
+
try {
|
|
6203
|
+
yield this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());
|
|
6204
|
+
}
|
|
6205
|
+
catch (e) {
|
|
6206
|
+
// don't care if they cancelled, just hiding the console errors
|
|
6207
|
+
}
|
|
6208
|
+
finally {
|
|
6209
|
+
this.editorModel.editing.value = false;
|
|
6210
|
+
}
|
|
6211
|
+
})).enableWhile(this.editingEnabled);
|
|
6212
|
+
this.onDispose(() => this.cancelEdit());
|
|
6213
|
+
}
|
|
6214
|
+
ngOnInit() {
|
|
6215
|
+
// our editor model is a one time binding without delegates so we can only
|
|
6216
|
+
// use it once we've been initialised
|
|
6217
|
+
const { chain, when, valueOf } = Dsl.disposeWith(this);
|
|
6218
|
+
if (!this.editorModel) {
|
|
6219
|
+
lang$1.illegalState('editorModel is required');
|
|
6220
|
+
}
|
|
6221
|
+
this.editingEnabled.setDelegate(this.editorModel.editingEnabled);
|
|
6222
|
+
when(this.editorModel.editing).becomesTruthy(() => {
|
|
6223
|
+
this.editCommand.execute();
|
|
6224
|
+
}, { asLongAs: this.editCommand.enabled });
|
|
6225
|
+
when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
|
|
6226
|
+
this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
|
|
6227
|
+
// deviceDescription.isNil()
|
|
6228
|
+
).areTruthy();
|
|
6229
|
+
this.displayValue = chain(this.editorModel.valueModel).map(v => {
|
|
6230
|
+
return _.isEmpty(v) ? this.placeHolderModel.value : v;
|
|
6231
|
+
}, { dependsOn: this.placeHolderModel, allowNil: true });
|
|
6232
|
+
}
|
|
6233
|
+
createInputActivityData() {
|
|
6234
|
+
const self = this;
|
|
6235
|
+
return {
|
|
6236
|
+
initialValue: self.editorModel.valueModel.value,
|
|
6237
|
+
confirmFace: self.saveFace.value,
|
|
6238
|
+
cancelFace: self.cancelFace.value,
|
|
6239
|
+
placeholder: self.placeHolderModel.value,
|
|
6240
|
+
label: self.label,
|
|
6241
|
+
layout: InputActivity.Layout.INLINE,
|
|
6242
|
+
validators: self.editorModel.validators.value,
|
|
6243
|
+
save(value, inputContext) {
|
|
6244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6245
|
+
yield self.editorModel.saveCallback(value, inputContext);
|
|
6246
|
+
});
|
|
6247
|
+
}
|
|
6248
|
+
};
|
|
6249
|
+
}
|
|
6250
|
+
cancelEdit() {
|
|
6251
|
+
if (this.isEditing()) {
|
|
6252
|
+
this.interactionContext.cancelActiveActivity();
|
|
6253
|
+
}
|
|
6254
|
+
}
|
|
6255
|
+
startEdit() {
|
|
6256
|
+
if (!this.isEditing() && this.editCommand.enabled.value) {
|
|
6257
|
+
this.editCommand.execute();
|
|
6258
|
+
}
|
|
6259
|
+
}
|
|
6260
|
+
isEditing() {
|
|
6261
|
+
return this.interactionContext.isActive();
|
|
6262
|
+
}
|
|
6263
|
+
isEmpty() {
|
|
6264
|
+
return this.empty.value;
|
|
6265
|
+
}
|
|
6266
|
+
}
|
|
6267
|
+
InlineStringEditorComponent.decorators = [
|
|
6268
|
+
{ type: Component, args: [{
|
|
6269
|
+
selector: 'aup-inline-string-editor',
|
|
6270
|
+
template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
|
|
6271
|
+
},] }
|
|
6272
|
+
];
|
|
6273
|
+
InlineStringEditorComponent.ctorParameters = () => [
|
|
6274
|
+
{ type: InteractionService }
|
|
6275
|
+
];
|
|
6276
|
+
InlineStringEditorComponent.propDecorators = {
|
|
6277
|
+
editorModel: [{ type: Input }],
|
|
6278
|
+
facesModel: [{ type: Input }],
|
|
6279
|
+
faces: [{ type: Input }],
|
|
6280
|
+
interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent,] }],
|
|
6281
|
+
label: [{ type: Input }],
|
|
6282
|
+
placeHolder: [{ type: Input }],
|
|
6283
|
+
placeHolderModel: [{ type: Input }]
|
|
5505
6284
|
};
|
|
6285
|
+
__decorate([
|
|
6286
|
+
TrackExternal(),
|
|
6287
|
+
__metadata("design:type", InlineEditorModel)
|
|
6288
|
+
], InlineStringEditorComponent.prototype, "editorModel", void 0);
|
|
6289
|
+
__decorate([
|
|
6290
|
+
TrackExternal(),
|
|
6291
|
+
__metadata("design:type", ValueModel)
|
|
6292
|
+
], InlineStringEditorComponent.prototype, "facesModel", void 0);
|
|
6293
|
+
__decorate([
|
|
6294
|
+
StoreInValueModel('facesModel'),
|
|
6295
|
+
__metadata("design:type", Object)
|
|
6296
|
+
], InlineStringEditorComponent.prototype, "faces", void 0);
|
|
6297
|
+
__decorate([
|
|
6298
|
+
StoreInValueModel('placeHolderModel'),
|
|
6299
|
+
__metadata("design:type", String)
|
|
6300
|
+
], InlineStringEditorComponent.prototype, "placeHolder", void 0);
|
|
6301
|
+
__decorate([
|
|
6302
|
+
TrackExternal(),
|
|
6303
|
+
__metadata("design:type", ValueModel)
|
|
6304
|
+
], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
|
|
6305
|
+
(function (InlineStringEditorComponent) {
|
|
6306
|
+
InlineStringEditorComponent.DEFAULT_FACES = {
|
|
6307
|
+
edit: {
|
|
6308
|
+
icon: () => 'mat:edit'
|
|
6309
|
+
},
|
|
6310
|
+
save: {
|
|
6311
|
+
icon: () => 'mat:check'
|
|
6312
|
+
},
|
|
6313
|
+
cancel: {
|
|
6314
|
+
icon: () => 'mat:clear'
|
|
6315
|
+
}
|
|
6316
|
+
};
|
|
6317
|
+
})(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
|
|
5506
6318
|
|
|
5507
6319
|
class InteractionModule {
|
|
5508
6320
|
}
|
|
@@ -5519,12 +6331,17 @@ InteractionModule.decorators = [
|
|
|
5519
6331
|
DirectivesModule,
|
|
5520
6332
|
FlexModule,
|
|
5521
6333
|
GridModule,
|
|
5522
|
-
ComponentsModule
|
|
6334
|
+
ComponentsModule,
|
|
6335
|
+
FormsModule,
|
|
6336
|
+
MatInputModule,
|
|
6337
|
+
MatFormFieldModule,
|
|
6338
|
+
A11yModule
|
|
5523
6339
|
],
|
|
5524
6340
|
declarations: [
|
|
5525
6341
|
ActivityContainerComponent,
|
|
5526
6342
|
ConfirmationDialogComponent,
|
|
5527
6343
|
ConfirmThenDialogComponent,
|
|
6344
|
+
ConfirmThenExecuteDialogComponent,
|
|
5528
6345
|
AlertDialogComponent,
|
|
5529
6346
|
ActivityOutletComponent,
|
|
5530
6347
|
InPlaceInteractionContextComponent,
|
|
@@ -5533,7 +6350,7 @@ InteractionModule.decorators = [
|
|
|
5533
6350
|
PopupInteractionContextComponent,
|
|
5534
6351
|
StringInputActivity,
|
|
5535
6352
|
SelectInputActivity,
|
|
5536
|
-
|
|
6353
|
+
InputActivity,
|
|
5537
6354
|
InteractionContextTriggerFor,
|
|
5538
6355
|
Activity,
|
|
5539
6356
|
ActivityTitleComponent,
|
|
@@ -5542,7 +6359,11 @@ InteractionModule.decorators = [
|
|
|
5542
6359
|
AbstractActivityTriggerComponent,
|
|
5543
6360
|
PopupActivityTriggerComponent,
|
|
5544
6361
|
InlineActivityTriggerComponent,
|
|
5545
|
-
ModalActivityTriggerComponent
|
|
6362
|
+
ModalActivityTriggerComponent,
|
|
6363
|
+
AddCardActivityComponent,
|
|
6364
|
+
InlineStringEditorComponent,
|
|
6365
|
+
AbstractDialogComponent,
|
|
6366
|
+
AbstractConfirmDialogComponent,
|
|
5546
6367
|
],
|
|
5547
6368
|
exports: [
|
|
5548
6369
|
ActivityContainerComponent,
|
|
@@ -5558,13 +6379,15 @@ InteractionModule.decorators = [
|
|
|
5558
6379
|
ActivityBodyComponent,
|
|
5559
6380
|
PopupActivityTriggerComponent,
|
|
5560
6381
|
InlineActivityTriggerComponent,
|
|
5561
|
-
ModalActivityTriggerComponent
|
|
6382
|
+
ModalActivityTriggerComponent,
|
|
6383
|
+
AddCardActivityComponent,
|
|
6384
|
+
InlineStringEditorComponent,
|
|
5562
6385
|
],
|
|
5563
6386
|
entryComponents: [
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
6387
|
+
// ActivityContainerComponent,
|
|
6388
|
+
// ConfirmationDialogComponent,
|
|
6389
|
+
// ConfirmThenDialogComponent,
|
|
6390
|
+
// AlertDialogComponent
|
|
5568
6391
|
],
|
|
5569
6392
|
providers: [
|
|
5570
6393
|
InteractionService
|
|
@@ -5575,7 +6398,7 @@ InteractionModule.decorators = [
|
|
|
5575
6398
|
},] }
|
|
5576
6399
|
];
|
|
5577
6400
|
|
|
5578
|
-
const PARAMETER_DEFINITION_KEY = Symbol(
|
|
6401
|
+
const PARAMETER_DEFINITION_KEY = Symbol('parameterDefinition');
|
|
5579
6402
|
class ParameterDefinition {
|
|
5580
6403
|
constructor(propertyName, options, urlFormat) {
|
|
5581
6404
|
this.propertyName = propertyName;
|
|
@@ -5602,20 +6425,43 @@ class ParameterDefinition {
|
|
|
5602
6425
|
// @Trace()
|
|
5603
6426
|
sanitise(value, visit, placeHistory, injector, isPopState) {
|
|
5604
6427
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
const lastKnownVisit = placeHistory.getMostRecentVisitFor(visit.placeDefinition);
|
|
5609
|
-
if (this.remember && lastKnownVisit) {
|
|
5610
|
-
value = lastKnownVisit.getParameterValue(this);
|
|
5611
|
-
}
|
|
5612
|
-
return this.isEmptyValue(value) ? this.defaultValue : value;
|
|
5613
|
-
}
|
|
5614
|
-
}
|
|
5615
|
-
// todo: add custom sanitiser
|
|
6428
|
+
// console.log(`sanitise(${this.propertyName})`)
|
|
6429
|
+
value = yield this.sanitiseMissing(visit, placeHistory, value);
|
|
6430
|
+
value = yield this.runCustomSanitiser(value, visit, placeHistory, injector, isPopState);
|
|
5616
6431
|
return value;
|
|
5617
6432
|
});
|
|
5618
6433
|
}
|
|
6434
|
+
runCustomSanitiser(value, visit, placeHistory, injector, isPopState) {
|
|
6435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6436
|
+
const customSanitiser = this.prepareCustomSanitiser(injector);
|
|
6437
|
+
return customSanitiser ? customSanitiser.sanitise(value, visit, injector) : value;
|
|
6438
|
+
});
|
|
6439
|
+
}
|
|
6440
|
+
sanitiseMissing(visit, placeHistory, value) {
|
|
6441
|
+
if (this.isMissingFrom(visit)) {
|
|
6442
|
+
const returningFromSomewhereElse = !placeHistory.lastVisitIncluded(visit.placeDefinition);
|
|
6443
|
+
if (returningFromSomewhereElse) {
|
|
6444
|
+
const lastKnownVisit = placeHistory.getMostRecentVisitFor(visit.placeDefinition);
|
|
6445
|
+
if (this.remember && lastKnownVisit) {
|
|
6446
|
+
value = lastKnownVisit.getParameterValue(this);
|
|
6447
|
+
}
|
|
6448
|
+
value = this.isEmptyValue(value) ? this.defaultValue : value;
|
|
6449
|
+
}
|
|
6450
|
+
}
|
|
6451
|
+
return value;
|
|
6452
|
+
}
|
|
6453
|
+
prepareCustomSanitiser(injector) {
|
|
6454
|
+
const customSanitiser = this.options.getOptional('sanitiser', null);
|
|
6455
|
+
if (___default.isFunction(customSanitiser)) {
|
|
6456
|
+
return injector.get(customSanitiser);
|
|
6457
|
+
}
|
|
6458
|
+
if (___default.isObject(customSanitiser)) {
|
|
6459
|
+
return ___default.isFunction(customSanitiser['sanitise']) ?
|
|
6460
|
+
customSanitiser :
|
|
6461
|
+
lang$1.illegalState(`expected @VisitParameter({sanitiser: ...}) for ${this.propertyName} to be a constructor or instance of ParameterSanitiser, got: ` + customSanitiser);
|
|
6462
|
+
}
|
|
6463
|
+
return undefined;
|
|
6464
|
+
}
|
|
5619
6465
|
isMissingFrom(visit) {
|
|
5620
6466
|
return !visit.hasParameter(this);
|
|
5621
6467
|
}
|
|
@@ -5669,7 +6515,7 @@ class ParameterDefinition {
|
|
|
5669
6515
|
function get(model) {
|
|
5670
6516
|
const parameterDefinition = model[PARAMETER_DEFINITION_KEY];
|
|
5671
6517
|
if (!parameterDefinition) {
|
|
5672
|
-
lang$1.illegalArgument(
|
|
6518
|
+
lang$1.illegalArgument('model hasn\'t been annotated with @VisitParameter, @VisitParameterList or @RouteId');
|
|
5673
6519
|
}
|
|
5674
6520
|
return parameterDefinition;
|
|
5675
6521
|
}
|
|
@@ -5839,16 +6685,27 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5839
6685
|
when(this._active).becomesTruthy(() => this._notifyPlaceReady());
|
|
5840
6686
|
this.childPlaces = this.placeDefinition.children.map(d => d.component);
|
|
5841
6687
|
}
|
|
5842
|
-
// @Trace()
|
|
5843
6688
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
5844
6689
|
assert.isNil(this.visitModel.value);
|
|
5845
6690
|
const { when } = Dsl.disposeWith(this);
|
|
5846
6691
|
this.visitModel.value = visit;
|
|
5847
6692
|
DebugContext.getOrCreate(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);
|
|
5848
|
-
|
|
6693
|
+
// we track if the any of the bindings updated the route. If so we remember it and update the
|
|
6694
|
+
// route in one go at the end.
|
|
6695
|
+
this.placeDefinition
|
|
6696
|
+
.getVisitParameterDefs()
|
|
6697
|
+
.forEach(parameterDef => this.installAndInitialiseBinding(visit, parameterDef));
|
|
5849
6698
|
when(this.visitModel).changes((current, previous) => {
|
|
5850
6699
|
notifyVisitChanged(current, previous);
|
|
5851
6700
|
}, { unless: this._inVisitUpdate });
|
|
6701
|
+
// TODO: this needs to do a replace url option so that the new url isn't put in the history.... for
|
|
6702
|
+
// now we're not doing it as it's a fair bit of effort and will only affect people if they're
|
|
6703
|
+
// cutting and pasting urls to each other.
|
|
6704
|
+
// // the binding process can update the visit (e.g. if a selection model has already selected during
|
|
6705
|
+
// // component construction) and there was no value specified in the route
|
|
6706
|
+
// if (visit.hasRoutingChangedFrom(this.visitModel.value)) {
|
|
6707
|
+
// notifyVisitChanged(this.visitModel.value, visit)
|
|
6708
|
+
// }
|
|
5852
6709
|
}
|
|
5853
6710
|
updateVisit(visit) {
|
|
5854
6711
|
assert.isTruthy(this.isInitialised());
|
|
@@ -5861,7 +6718,12 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5861
6718
|
return !!this.visitModel.value;
|
|
5862
6719
|
}
|
|
5863
6720
|
// @Trace()
|
|
5864
|
-
|
|
6721
|
+
/**
|
|
6722
|
+
* Initialised the component bindings. If any binding has an initial model value (e.g. a selection model
|
|
6723
|
+
* initialised during the constructor) and the route has nothing, then the visit will be udpated and this
|
|
6724
|
+
* method will return ture to nofiy the the visit has changed.
|
|
6725
|
+
*/
|
|
6726
|
+
installAndInitialiseBinding(initialVisit, parameterDef) {
|
|
5865
6727
|
const model = this[parameterDef.propertyName];
|
|
5866
6728
|
DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);
|
|
5867
6729
|
const binding = this.registerDisposable(new Binding(this.visitModel, model, {
|
|
@@ -5875,7 +6737,17 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5875
6737
|
return currentVisit.replace(parameterDef, value);
|
|
5876
6738
|
}
|
|
5877
6739
|
}));
|
|
5878
|
-
binding.
|
|
6740
|
+
// Now we need to initialise the binding direction. If we have a value in the Url then we should always push
|
|
6741
|
+
// that to the view. If we don't and the view already has a value (e.g. a selection model has already initialised in the
|
|
6742
|
+
// component constructor) then we should push that to the route.
|
|
6743
|
+
const isInVisit = !_.isNil(initialVisit.getParameterValue(parameterDef));
|
|
6744
|
+
const isInModel = !_.isNil(model.value);
|
|
6745
|
+
if (!isInVisit && isInModel) {
|
|
6746
|
+
binding.writeLeft(); // push it to the route
|
|
6747
|
+
}
|
|
6748
|
+
else {
|
|
6749
|
+
binding.writeRight(); // push it to the model
|
|
6750
|
+
}
|
|
5879
6751
|
}
|
|
5880
6752
|
get placeDefinition() {
|
|
5881
6753
|
const definition = PlaceComponent.getDefinition(this.constructor);
|
|
@@ -6918,7 +7790,7 @@ class ConsolidatedParameterMap {
|
|
|
6918
7790
|
return !!this.paramMaps.find(m => m.has(name));
|
|
6919
7791
|
}
|
|
6920
7792
|
get keys() {
|
|
6921
|
-
return this.paramMaps.reduce((result, params) => result.concat(params.keys), []);
|
|
7793
|
+
return _.uniq(this.paramMaps.reduce((result, params) => result.concat(params.keys), []));
|
|
6922
7794
|
}
|
|
6923
7795
|
}
|
|
6924
7796
|
__decorate([
|
|
@@ -6962,10 +7834,10 @@ class Visit {
|
|
|
6962
7834
|
* Returns the value of the place parameter with the specified name. The parameter
|
|
6963
7835
|
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
6964
7836
|
* same as the the ValueModel property name.
|
|
6965
|
-
* @param
|
|
7837
|
+
* @param parameter the visit parameter definition
|
|
6966
7838
|
*/
|
|
6967
|
-
getParameterValue(
|
|
6968
|
-
return this.visitParameters[
|
|
7839
|
+
getParameterValue(parameter) {
|
|
7840
|
+
return _.isString(parameter) ? this.visitParameters[parameter] : this.visitParameters[parameter.name];
|
|
6969
7841
|
}
|
|
6970
7842
|
// @Trace()
|
|
6971
7843
|
hasParameter(parameterDef) {
|
|
@@ -6995,9 +7867,13 @@ class Visit {
|
|
|
6995
7867
|
});
|
|
6996
7868
|
return new Visit(this.placeDefinition, params);
|
|
6997
7869
|
}
|
|
7870
|
+
// @Trace()
|
|
6998
7871
|
hasRoutingChangedFrom(other) {
|
|
6999
7872
|
const samePlace = other.placeDefinition === this.placeDefinition;
|
|
7000
|
-
const
|
|
7873
|
+
const currentParams = this.placeDefinition.getFormattedRouteParameters(this, true);
|
|
7874
|
+
const otherParams = this.placeDefinition.getFormattedRouteParameters(other, true);
|
|
7875
|
+
// console.log({currentParams, otherParams});
|
|
7876
|
+
const sameRouteParameters = _.isEqual(currentParams, otherParams);
|
|
7001
7877
|
return !samePlace || !sameRouteParameters;
|
|
7002
7878
|
}
|
|
7003
7879
|
hasChangedFrom(other) {
|
|
@@ -7176,6 +8052,9 @@ UrlService.ctorParameters = () => [
|
|
|
7176
8052
|
{ type: UrlSerializer }
|
|
7177
8053
|
];
|
|
7178
8054
|
|
|
8055
|
+
function asArray(item) {
|
|
8056
|
+
return Array.isArray(item) ? item : [item];
|
|
8057
|
+
}
|
|
7179
8058
|
class PlaceRouter extends GarbageCollector {
|
|
7180
8059
|
constructor(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
7181
8060
|
super();
|
|
@@ -7191,7 +8070,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
7191
8070
|
* An observable model containing the authoriser function. This allows places to react to changes
|
|
7192
8071
|
* in permissions when any underlying auth logic changes, e.g. a role being removed from a user.
|
|
7193
8072
|
*/
|
|
7194
|
-
this._accessGuard = new DelegatingValueModel().withDefault(new PlaceAccessGuard.NoAuth());
|
|
8073
|
+
this._accessGuard = this.registerDisposable(new DelegatingValueModel().withDefault(new PlaceAccessGuard.NoAuth()));
|
|
7195
8074
|
if (window['Cypress']) {
|
|
7196
8075
|
window['aup.PlaceRouter'] = this;
|
|
7197
8076
|
}
|
|
@@ -7339,11 +8218,10 @@ class PlaceRouter extends GarbageCollector {
|
|
|
7339
8218
|
this.currentSession.onRouterEnd(event);
|
|
7340
8219
|
}
|
|
7341
8220
|
navigate(visit, options) {
|
|
8221
|
+
const commands = asArray(visit).reduce((result, v) => {
|
|
8222
|
+
return [...result, v.placeDefinition.path, ...this.createRouteParameters(v)];
|
|
8223
|
+
}, []);
|
|
7342
8224
|
return this.doNavigation(visit, (router) => __awaiter(this, void 0, void 0, function* () {
|
|
7343
|
-
const commands = [
|
|
7344
|
-
visit.placeDefinition.path,
|
|
7345
|
-
...this.createRouteParameters(visit)
|
|
7346
|
-
];
|
|
7347
8225
|
yield this.angularRouter.navigate(commands, {
|
|
7348
8226
|
relativeTo: options ? options.relativeTo : null
|
|
7349
8227
|
});
|
|
@@ -7356,7 +8234,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
7356
8234
|
lang.illegalState('Navigation already in progress');
|
|
7357
8235
|
}
|
|
7358
8236
|
const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());
|
|
7359
|
-
navigation.storeVisit(
|
|
8237
|
+
asArray(visit).forEach(v => navigation.storeVisit(v));
|
|
7360
8238
|
this.transitionTo(navigation);
|
|
7361
8239
|
try {
|
|
7362
8240
|
yield runNavigationCommands(this.angularRouter);
|
|
@@ -7437,6 +8315,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
7437
8315
|
* to be able to capture the back button on the first page. If we don't then the back click will exit
|
|
7438
8316
|
* the app directly and we don't get to ask.
|
|
7439
8317
|
*/
|
|
8318
|
+
// @Trace()
|
|
7440
8319
|
syncInteractionContextIdsWithRouter() {
|
|
7441
8320
|
if (this.navigationSession) {
|
|
7442
8321
|
// console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);
|
|
@@ -7478,12 +8357,6 @@ PlaceRouter.ctorParameters = () => [
|
|
|
7478
8357
|
{ type: UrlService },
|
|
7479
8358
|
{ type: PlaceHistory }
|
|
7480
8359
|
];
|
|
7481
|
-
__decorate([
|
|
7482
|
-
Trace(),
|
|
7483
|
-
__metadata("design:type", Function),
|
|
7484
|
-
__metadata("design:paramtypes", []),
|
|
7485
|
-
__metadata("design:returntype", Promise)
|
|
7486
|
-
], PlaceRouter.prototype, "syncInteractionContextIdsWithRouter", null);
|
|
7487
8360
|
(function (PlaceRouter) {
|
|
7488
8361
|
class State {
|
|
7489
8362
|
constructor(activeVisits) {
|
|
@@ -7509,7 +8382,7 @@ NotAuthorisedNoticeComponent.decorators = [
|
|
|
7509
8382
|
{ type: Component, args: [{
|
|
7510
8383
|
selector: 'aup-not-authorised-notice',
|
|
7511
8384
|
template: "<p>You are not authorised to access this page</p>\n",
|
|
7512
|
-
styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center}"]
|
|
8385
|
+
styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center}\n"]
|
|
7513
8386
|
},] }
|
|
7514
8387
|
];
|
|
7515
8388
|
NotAuthorisedNoticeComponent.ctorParameters = () => [];
|
|
@@ -7707,15 +8580,27 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7707
8580
|
const { when, chain, valueOf } = Dsl.disposeWith(activePlace);
|
|
7708
8581
|
when(this.routerVisitModel)
|
|
7709
8582
|
.changes(visit => {
|
|
7710
|
-
|
|
8583
|
+
this.pushVisitChangeToComponent(activePlace, visit);
|
|
7711
8584
|
}, {
|
|
7712
8585
|
unless: valueOf.any(this._isPushingVisitToRoute, this.routerVisitModel.isNil()).areTruthy()
|
|
7713
8586
|
});
|
|
7714
8587
|
}
|
|
8588
|
+
pushVisitChangeToComponent(activePlace, visit) {
|
|
8589
|
+
activePlace.updateVisit(visit);
|
|
8590
|
+
}
|
|
7715
8591
|
pushVisitChangeToRoute(previous, current) {
|
|
7716
|
-
this
|
|
7717
|
-
|
|
7718
|
-
|
|
8592
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8593
|
+
try {
|
|
8594
|
+
this._isPushingVisitToRoute.value = true;
|
|
8595
|
+
yield this.placeRouter.pushVisitChangesToRoute(previous, current);
|
|
8596
|
+
}
|
|
8597
|
+
finally {
|
|
8598
|
+
this._isPushingVisitToRoute.value = false;
|
|
8599
|
+
}
|
|
8600
|
+
// sanitisers may have adjusted other values in the visit to we check and write it back.
|
|
8601
|
+
if (current.hasRoutingChangedFrom(this.routerVisitModel.value)) {
|
|
8602
|
+
this.pushVisitChangeToComponent(this.activePlaceModel.value, this.routerVisitModel.value);
|
|
8603
|
+
}
|
|
7719
8604
|
});
|
|
7720
8605
|
}
|
|
7721
8606
|
// @Trace()
|
|
@@ -7735,7 +8620,7 @@ PlaceOutletComponent.decorators = [
|
|
|
7735
8620
|
selector: 'aup-place-outlet',
|
|
7736
8621
|
template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\"\n cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\"\n cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<div class=\"not-authorised-component-container\" *ngIf=\"!authorised.value\">\n <ng-template [cdkPortalOutlet]=\"notAuthorisedNoticePortal\"></ng-template>\n</div>\n",
|
|
7737
8622
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
7738
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0}:host:not(.authorised) .router-outlet-container{display:none}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:auto}router-outlet{display:none}.not-authorised-component-container{flex:1;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}"]
|
|
8623
|
+
styles: [":host{display:flex;flex-direction:column;min-height:0}:host:not(.authorised) .router-outlet-container{display:none}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:auto}router-outlet{display:none}.not-authorised-component-container{flex:1;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}\n"]
|
|
7739
8624
|
},] }
|
|
7740
8625
|
];
|
|
7741
8626
|
PlaceOutletComponent.ctorParameters = () => [
|
|
@@ -7776,7 +8661,7 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7776
8661
|
constructor(placeRouter) {
|
|
7777
8662
|
super();
|
|
7778
8663
|
this.placeRouter = placeRouter;
|
|
7779
|
-
this._activePlaceComponent = new DelegatingValueModel();
|
|
8664
|
+
this._activePlaceComponent = this.registerDisposable(new DelegatingValueModel());
|
|
7780
8665
|
this.trackByPlaceDef = (data) => data.place;
|
|
7781
8666
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
7782
8667
|
this.placeDefinitions = chain(this.placesModel)
|
|
@@ -7865,7 +8750,7 @@ ListPlaceNavComponent.decorators = [
|
|
|
7865
8750
|
{ type: Component, args: [{
|
|
7866
8751
|
selector: 'aup-list-place-nav',
|
|
7867
8752
|
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</mat-nav-list>\n",
|
|
7868
|
-
styles: [":host{display:flex;flex-direction:column;--selected-border-color
|
|
8753
|
+
styles: [":host{display:flex;flex-direction:column;--selected-border-color: #838383;--selected-color: inherit;--selected-background: #f1f1f1}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}\n"]
|
|
7869
8754
|
},] }
|
|
7870
8755
|
];
|
|
7871
8756
|
ListPlaceNavComponent.ctorParameters = () => [
|
|
@@ -7933,7 +8818,7 @@ SidePlaceNavigationComponent.decorators = [
|
|
|
7933
8818
|
{ type: Component, args: [{
|
|
7934
8819
|
selector: 'aup-side-place-navigation',
|
|
7935
8820
|
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(item.place).icon()\" [icon]=\"getNavigationFace(item.place).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(item.place).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
|
|
7936
|
-
styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width,56px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-color:var(--nav-color,
|
|
8821
|
+
styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width: var(--nav-width, 56px);--resolved-nav-item-height: var(--nav-item-height, var(--resolved-nav-item-width));--resolved-expanded-width: var(--nav-expanded-width, 235px);--resolved-color: var(--nav-color, rgba(255, 255, 255, .9));--resolved-background-color: var(--nav-background-color, #555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}\n"]
|
|
7937
8822
|
},] }
|
|
7938
8823
|
];
|
|
7939
8824
|
SidePlaceNavigationComponent.ctorParameters = () => [
|
|
@@ -7953,7 +8838,7 @@ TabbedPlaceNavigationComponent.decorators = [
|
|
|
7953
8838
|
{ type: Component, args: [{
|
|
7954
8839
|
selector: 'aup-tabbed-place-navigation',
|
|
7955
8840
|
template: "<nav mat-tab-nav-bar>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n",
|
|
7956
|
-
styles: [":host{display:block}div.place-holder{border:1px solid green}"]
|
|
8841
|
+
styles: [":host{display:block}div.place-holder{border:1px solid green}\n"]
|
|
7957
8842
|
},] }
|
|
7958
8843
|
];
|
|
7959
8844
|
TabbedPlaceNavigationComponent.ctorParameters = () => [
|
|
@@ -8058,9 +8943,6 @@ const slideRightOnEnterAnimation = trigger('slideRightOnEnter', [
|
|
|
8058
8943
|
* @file Automatically generated by barrelsby.
|
|
8059
8944
|
*/
|
|
8060
8945
|
|
|
8061
|
-
// const r:Result<string, number> = null;
|
|
8062
|
-
// r.catch(e => {}).then();
|
|
8063
|
-
|
|
8064
8946
|
class DialogInteractionContext extends AbstractInteractionContext {
|
|
8065
8947
|
constructor(identifier, api, dialogService, config) {
|
|
8066
8948
|
super();
|
|
@@ -8245,10 +9127,11 @@ class PlaceGuard {
|
|
|
8245
9127
|
}
|
|
8246
9128
|
}
|
|
8247
9129
|
const result = yield this.cleanInteractionState(activatedRoute, state, () => __awaiter(this, void 0, void 0, function* () {
|
|
9130
|
+
const navigationSession = this.placeRouter.navigationSession;
|
|
8248
9131
|
// Parse our route params.
|
|
8249
9132
|
const params = new ConsolidatedParameterMap(activatedRoute.url, activatedRoute.paramMap);
|
|
9133
|
+
// console.log("RouteParams", params)
|
|
8250
9134
|
const parsedParams = placeDefinition.parseRouteParams(params);
|
|
8251
|
-
const navigationSession = this.placeRouter.navigationSession;
|
|
8252
9135
|
const initialVisit = navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);
|
|
8253
9136
|
const sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);
|
|
8254
9137
|
const sanitisedVisit = yield sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams));
|
|
@@ -8500,5 +9383,5 @@ VisibilityService.ctorParameters = () => [
|
|
|
8500
9383
|
* Generated bundle index. Do not edit.
|
|
8501
9384
|
*/
|
|
8502
9385
|
|
|
8503
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent,
|
|
9386
|
+
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0, ɵ1 };
|
|
8504
9387
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|