@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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Component, HostBinding, Input } from '@angular/core';
|
|
3
|
+
import { GarbageCollector, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
|
|
4
|
+
export class LoadingContainerComponent extends GarbageCollector {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
get state() {
|
|
9
|
+
return this.loadingModel.value ? "loaded" : "loading";
|
|
10
|
+
}
|
|
11
|
+
ngOnInit() {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
LoadingContainerComponent.decorators = [
|
|
15
|
+
{ type: Component, args: [{
|
|
16
|
+
selector: 'aup-loading-container',
|
|
17
|
+
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",
|
|
18
|
+
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"]
|
|
19
|
+
},] }
|
|
20
|
+
];
|
|
21
|
+
LoadingContainerComponent.ctorParameters = () => [];
|
|
22
|
+
LoadingContainerComponent.propDecorators = {
|
|
23
|
+
loadingModel: [{ type: Input }],
|
|
24
|
+
loading: [{ type: Input }],
|
|
25
|
+
messageModel: [{ type: Input }],
|
|
26
|
+
message: [{ type: Input }],
|
|
27
|
+
state: [{ type: HostBinding, args: ["class",] }]
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
TrackExternal(),
|
|
31
|
+
__metadata("design:type", ValueModel)
|
|
32
|
+
], LoadingContainerComponent.prototype, "loadingModel", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
StoreInValueModel("loadingModel"),
|
|
35
|
+
__metadata("design:type", Boolean)
|
|
36
|
+
], LoadingContainerComponent.prototype, "loading", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
TrackExternal(),
|
|
39
|
+
__metadata("design:type", ValueModel)
|
|
40
|
+
], LoadingContainerComponent.prototype, "messageModel", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
StoreInValueModel("messageModel"),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], LoadingContainerComponent.prototype, "message", void 0);
|
|
45
|
+
//# sourceMappingURL=loading-container.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-container.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/loading-container/loading-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOhG,MAAM,OAAO,yBAA0B,SAAQ,gBAAgB;IAwB7D;QACE,KAAK,EAAE,CAAA;IACT,CAAC;IAPD,IACI,KAAK;QACP,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACxD,CAAC;IAMD,QAAQ;IACR,CAAC;;;YAlCF,SAAS,SAAC;gBACT,QAAQ,EAAE,uBAAuB;gBACjC,+SAAiD;;aAElD;;;;2BAGE,KAAK;sBAIL,KAAK;2BAIL,KAAK;sBAIL,KAAK;oBAKL,WAAW,SAAC,OAAO;;AAfpB;IADC,aAAa,EAAE;8BACF,UAAU;+DAAU;AAIlC;IADC,iBAAiB,CAAC,cAAc,CAAC;;0DACjB;AAIjB;IADC,aAAa,EAAE;8BACF,UAAU;+DAAS;AAIjC;IADC,iBAAiB,CAAC,cAAc,CAAC;;0DAClB","sourcesContent":["import { Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { GarbageCollector, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\n\n@Component({\n selector: 'aup-loading-container',\n templateUrl: `./loading-container.component.html`,\n styleUrls: ['./loading-container.component.scss']\n})\nexport class LoadingContainerComponent extends GarbageCollector implements OnInit {\n\n @Input()\n @TrackExternal()\n loadingModel: ValueModel<boolean>;\n\n @Input()\n @StoreInValueModel(\"loadingModel\")\n loading: boolean;\n\n @Input()\n @TrackExternal()\n messageModel: ValueModel<string>;\n\n @Input()\n @StoreInValueModel(\"messageModel\")\n message: string;\n\n\n @HostBinding(\"class\")\n get state():string {\n return this.loadingModel.value ? \"loaded\" : \"loading\";\n }\n\n constructor() {\n super()\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"LoadingContainerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":8,"character":47},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"aup-loading-container","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","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"]}]}],"members":{"loadingModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":11,"character":3}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":15,"character":3},"arguments":["loadingModel"]}]}],"messageModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":19,"character":3}}]}],"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":23,"character":3},"arguments":["messageModel"]}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":27,"character":3},"arguments":["class"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-container.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/loading-container/loading-container.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-container.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/loading-container/loading-container.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"NoopComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-noop","template":"","styles":[":host{display:block}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"NoopComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-noop","template":"","styles":[":host{display:block}\n"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -8,7 +8,7 @@ ScrollContainerComponent.decorators = [
|
|
|
8
8
|
{ type: Component, args: [{
|
|
9
9
|
selector: 'aup-scroll-container',
|
|
10
10
|
template: "<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n",
|
|
11
|
-
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}"]
|
|
11
|
+
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"]
|
|
12
12
|
},] }
|
|
13
13
|
];
|
|
14
14
|
ScrollContainerComponent.ctorParameters = () => [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ScrollContainerComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-scroll-container","template":"<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n","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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ScrollContainerComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-scroll-container","template":"<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n","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"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
-
|
|
2
|
+
import { DisposableComponent } from '../disposable-component';
|
|
3
|
+
export class SectionHeaderComponent extends DisposableComponent {
|
|
3
4
|
constructor() {
|
|
4
|
-
|
|
5
|
+
super();
|
|
6
|
+
// readonly i18n = I18nMarsUi.components.layout.header;
|
|
7
|
+
this.size = 'medium';
|
|
8
|
+
this.borderTop = false;
|
|
9
|
+
this.borderBottom = false;
|
|
5
10
|
}
|
|
6
11
|
ngOnInit() {
|
|
7
12
|
}
|
|
@@ -9,12 +14,14 @@ export class SectionHeaderComponent {
|
|
|
9
14
|
SectionHeaderComponent.decorators = [
|
|
10
15
|
{ type: Component, args: [{
|
|
11
16
|
selector: 'aup-section-header',
|
|
12
|
-
template: "<ng-content></ng-content>\n",
|
|
13
|
-
styles: [":host{--
|
|
17
|
+
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",
|
|
18
|
+
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"]
|
|
14
19
|
},] }
|
|
15
20
|
];
|
|
16
21
|
SectionHeaderComponent.ctorParameters = () => [];
|
|
17
22
|
SectionHeaderComponent.propDecorators = {
|
|
18
|
-
|
|
23
|
+
size: [{ type: Input }, { type: HostBinding, args: ['class',] }],
|
|
24
|
+
borderTop: [{ type: Input }, { type: HostBinding, args: ['class.border-top',] }],
|
|
25
|
+
borderBottom: [{ type: Input }, { type: HostBinding, args: ['class.border-bottom',] }]
|
|
19
26
|
};
|
|
20
27
|
//# sourceMappingURL=section-header.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-header.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/section-header/section-header.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"section-header.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/section-header/section-header.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAO9D,MAAM,OAAO,sBAAuB,SAAQ,mBAAmB;IAgB7D;QACE,KAAK,EAAE,CAAC;QAfV,uDAAuD;QAIvD,SAAI,GAA6C,QAAQ,CAAC;QAI1D,cAAS,GAAG,KAAK,CAAC;QAIlB,iBAAY,GAAG,KAAK,CAAC;IAIrB,CAAC;IAED,QAAQ;IACR,CAAC;;;YA1BF,SAAS,SAAC;gBACT,QAAQ,EAAE,oBAAoB;gBAC9B,uTAA8C;;aAE/C;;;;mBAKE,KAAK,YACL,WAAW,SAAC,OAAO;wBAGnB,KAAK,YACL,WAAW,SAAC,kBAAkB;2BAG9B,KAAK,YACL,WAAW,SAAC,qBAAqB","sourcesContent":["import { Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { DisposableComponent } from '../disposable-component';\n\n@Component({\n selector: 'aup-section-header',\n templateUrl: './section-header.component.html',\n styleUrls: ['./section-header.component.scss']\n})\nexport class SectionHeaderComponent extends DisposableComponent implements OnInit {\n\n // readonly i18n = I18nMarsUi.components.layout.header;\n\n @Input()\n @HostBinding('class')\n size: 'toolbar' | 'large' | 'medium' | 'small' = 'medium';\n\n @Input()\n @HostBinding('class.border-top')\n borderTop = false;\n\n @Input()\n @HostBinding('class.border-bottom')\n borderBottom = false;\n\n constructor() {\n super();\n }\n\n ngOnInit(): void {\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SectionHeaderComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SectionHeaderComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../disposable-component","name":"DisposableComponent","line":8,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"aup-section-header","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","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"]}]}],"members":{"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":13,"character":3},"arguments":["class"]}]}],"borderTop":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":17,"character":3},"arguments":["class.border-top"]}]}],"borderBottom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":21,"character":3},"arguments":["class.border-bottom"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -104,7 +104,7 @@ SwitchCaseComponent.decorators = [
|
|
|
104
104
|
{ type: Component, args: [{
|
|
105
105
|
selector: 'aup-switch-case',
|
|
106
106
|
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",
|
|
107
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
107
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}\n"]
|
|
108
108
|
},] }
|
|
109
109
|
];
|
|
110
110
|
SwitchCaseComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SwitchCaseOption":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseWhenDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"SwitchCaseOption"},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":30,"character":1},"arguments":[{"selector":"[aupSwitchCaseWhen]","providers":[{"provide":{"__symbolic":"reference","name":"SwitchCaseOption"},"useExisting":{"__symbolic":"reference","name":"SwitchCaseWhenDirective"}}]}]}],"members":{"aupSwitchCaseWhen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseDefaultDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"SwitchCaseOption"},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":47,"character":1},"arguments":[{"selector":"[aupSwitchCaseDefault]","providers":[{"provide":{"__symbolic":"reference","name":"SwitchCaseOption"},"useExisting":{"__symbolic":"reference","name":"SwitchCaseDefaultDirective"}}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../disposable-component","name":"DisposableComponent","line":75,"character":44},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":70,"character":1},"arguments":[{"selector":"aup-switch-case","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","styles":[":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]}]}],"members":{"switchModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":77,"character":12}}]}],"switch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":80,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":80,"character":12},"arguments":["switchModel"]}]}],"switchCaseOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":83,"character":3},"arguments":[{"__symbolic":"reference","name":"SwitchCaseOption"}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":88,"character":27}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"updateSelection":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SwitchCaseOption":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseWhenDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"SwitchCaseOption"},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":30,"character":1},"arguments":[{"selector":"[aupSwitchCaseWhen]","providers":[{"provide":{"__symbolic":"reference","name":"SwitchCaseOption"},"useExisting":{"__symbolic":"reference","name":"SwitchCaseWhenDirective"}}]}]}],"members":{"aupSwitchCaseWhen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseDefaultDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"SwitchCaseOption"},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":47,"character":1},"arguments":[{"selector":"[aupSwitchCaseDefault]","providers":[{"provide":{"__symbolic":"reference","name":"SwitchCaseOption"},"useExisting":{"__symbolic":"reference","name":"SwitchCaseDefaultDirective"}}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../disposable-component","name":"DisposableComponent","line":75,"character":44},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":70,"character":1},"arguments":[{"selector":"aup-switch-case","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","styles":[":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}\n"]}]}],"members":{"switchModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":77,"character":12}}]}],"switch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":80,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":80,"character":12},"arguments":["switchModel"]}]}],"switchCaseOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":83,"character":3},"arguments":[{"__symbolic":"reference","name":"SwitchCaseOption"}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":88,"character":27}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"updateSelection":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { assert, DelegatingListModel, DirtyTrackingForm, Dsl, EventListenerList, GarbageCollector, lang, MutableListModel, TrackExternal, ValueModel } from '@coolon/pectin';
|
|
2
2
|
import * as _ from 'lodash';
|
|
3
3
|
import { ColumnListModel } from './column-list-model';
|
|
4
|
+
import { EditSession } from './edit-session';
|
|
4
5
|
import { CustomTemplateColumnModel, CustomValueColumnModel, EditorControlColumnModel, ListPropertyColumnModel, PropertyColumnModel, SelectionColumnModel } from './table/column-model';
|
|
5
|
-
import { EditSession } from './table/edit-session';
|
|
6
6
|
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
7
7
|
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
8
8
|
class RowClass {
|
|
@@ -14,7 +14,7 @@ class RowClass {
|
|
|
14
14
|
export class AbstractTableModel extends GarbageCollector {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
|
-
this._dataSource = new DelegatingListModel();
|
|
17
|
+
this._dataSource = this.registerDisposable(new DelegatingListModel());
|
|
18
18
|
this._columnList = this.registerDisposable(new ColumnListModel());
|
|
19
19
|
this._editorSessions = new MutableListModel();
|
|
20
20
|
this.rowClassNamePredicates = [];
|
|
@@ -35,6 +35,12 @@ export class AbstractTableModel extends GarbageCollector {
|
|
|
35
35
|
this.lastVisibleColumn = chain(this._columnList).last();
|
|
36
36
|
this.rowSelectionDisabledOnAllColumns = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
|
|
37
37
|
}
|
|
38
|
+
findMatchingColumns(row, regex) {
|
|
39
|
+
return this.columns.value.filter(c => c.isTextMatch(row, regex));
|
|
40
|
+
}
|
|
41
|
+
hasMatchingColumn(row, regex) {
|
|
42
|
+
return !!this.columns.value.find(c => c.isTextMatch(row, regex));
|
|
43
|
+
}
|
|
38
44
|
setDataSource(sourceOfTruth) {
|
|
39
45
|
this._dataSource.setDelegate(sourceOfTruth);
|
|
40
46
|
}
|
|
@@ -69,10 +75,13 @@ export class AbstractTableModel extends GarbageCollector {
|
|
|
69
75
|
}
|
|
70
76
|
return selectionColumnModel;
|
|
71
77
|
}
|
|
72
|
-
addEditControls(
|
|
73
|
-
this.
|
|
78
|
+
addEditControls(saveCommandFactory, formFactory) {
|
|
79
|
+
this.saveCommandFactory = saveCommandFactory;
|
|
80
|
+
if (_.isFunction(formFactory)) {
|
|
81
|
+
this._createForm = formFactory;
|
|
82
|
+
}
|
|
74
83
|
const columnId = 'editControls';
|
|
75
|
-
return this.addColumn(new EditorControlColumnModel(columnId,
|
|
84
|
+
return this.addColumn(new EditorControlColumnModel(columnId, saveCommandFactory, () => this.getColumnTextProperties(columnId)));
|
|
76
85
|
}
|
|
77
86
|
addCustomColumn(columnId, dataAccessor) {
|
|
78
87
|
return this.addColumn(new CustomValueColumnModel(columnId, () => this.getColumnTextProperties(columnId), dataAccessor));
|
|
@@ -116,19 +125,20 @@ export class AbstractTableModel extends GarbageCollector {
|
|
|
116
125
|
if (this._rowsBeingEdited.query().indexOf(row) > -1) {
|
|
117
126
|
return lang.illegalState(`Row with id=${rowId} already being edited`);
|
|
118
127
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
128
|
+
// todo: pass the factories to the edit session so we can make the whole lot pluggable?
|
|
129
|
+
const form = this._createForm(row);
|
|
130
|
+
const saveCommand = this.saveCommandFactory.create(form);
|
|
131
|
+
const editSession = new EditSession(rowId, row, form, saveCommand);
|
|
132
|
+
const { when } = Dsl.disposeWith(editSession);
|
|
133
|
+
when(editSession.liveRowValue).changes((editedValue) => {
|
|
134
|
+
this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
135
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
136
|
+
this._editorSessions.push(editSession);
|
|
137
|
+
editSession.onDispose(() => {
|
|
138
|
+
this._rowsBeingEdited.remove(editSession.liveRowValue.value);
|
|
139
|
+
this._editorSessions.remove(editSession);
|
|
140
|
+
});
|
|
141
|
+
return editSession;
|
|
132
142
|
}
|
|
133
143
|
getEditSessionFor(row) {
|
|
134
144
|
return this._editorSessionByRowId.get(this.identityOf(row));
|
|
@@ -144,12 +154,16 @@ export class AbstractTableModel extends GarbageCollector {
|
|
|
144
154
|
return this.isRowSelectionEnabled() && column.isRowSelectionEnabled();
|
|
145
155
|
}
|
|
146
156
|
isRowSelectionEnabled() {
|
|
147
|
-
return this.
|
|
157
|
+
return this.hasUserSelectionModel() && !this.rowSelectionDisabledOnAllColumns.value;
|
|
148
158
|
}
|
|
149
|
-
|
|
159
|
+
hasUserSelectionModel() {
|
|
150
160
|
var _a;
|
|
151
161
|
return !!((_a = this.selectionColumnModel) === null || _a === void 0 ? void 0 : _a.selectionModel.getDelegate());
|
|
152
162
|
}
|
|
163
|
+
getSelectionModel() {
|
|
164
|
+
var _a;
|
|
165
|
+
return (_a = this.selectionColumnModel) === null || _a === void 0 ? void 0 : _a.selectionModel;
|
|
166
|
+
}
|
|
153
167
|
isHoverEnabled() {
|
|
154
168
|
return this.isRowSelectionEnabled() || this.rowClickListeners.listenerCount > 0;
|
|
155
169
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-table-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/abstract-table-model.ts"],"names":[],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CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SACrB;QACD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF;AAGD,aAAa,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport {\n assert,\n BooleanValueModelChain,\n DelegatingListModel,\n DirtyTrackingForm,\n Disposable,\n Dsl,\n EventListenerList,\n GarbageCollector,\n lang,\n ListModel,\n ListModelChain,\n MapModelChain,\n MutableListModel,\n SelectionModel,\n TrackExternal,\n Types,\n UnaryCommand,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { ColumnListModel } from './column-list-model';\nimport { CellRenderer } from './table/cell-renderer';\nimport {\n CellRendererOptions,\n ColumnModel,\n CustomTemplateColumnModel,\n CustomValueColumnModel,\n EditorControlColumnModel,\n ListPropertyColumnModel,\n OnComponentInit,\n PropertyColumnModel,\n SelectionColumnModel\n} from './table/column-model';\nimport { ColumnTextProperties } from './table/column-text-properties';\nimport { EditSession } from './table/edit-session';\n\n// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];\n// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];\n\nclass RowClass<Row> {\n constructor(readonly className: string,\n readonly matches: (row: Row) => boolean) {\n }\n}\n\n\nexport class AbstractTableModel<Row> extends GarbageCollector {\n\n private readonly _dataSource = new DelegatingListModel<Row>();\n readonly dataSource: ListModelChain<Row>;\n\n private readonly _columnList = this.registerDisposable(new ColumnListModel<Row>());\n\n private _editorSessions = new MutableListModel<EditSession<Row>>();\n private readonly _rowsBeingEdited: MutableListModel<Row>;\n private readonly rowClassNamePredicates: RowClass<Row>[] = [];\n\n private _columnTextPropertiesLookup: { [columnName: string]: ColumnTextProperties };\n\n private saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>;\n private _editorSessionByRowId: MapModelChain<any, EditSession<Row>>;\n\n readonly editing: BooleanValueModelChain;\n readonly firstEditableColumn: ValueModelChain<ColumnModel<Row>>;\n private selectionColumnModel: SelectionColumnModel<Row>;\n private rowSelectionDisabledOnAllColumns: BooleanValueModelChain;\n private readonly rowClickListeners = new EventListenerList<(row: Row) => void>();\n readonly firstVisibleColumn: ValueModel<ColumnModel<Row>>;\n readonly lastVisibleColumn: ValueModel<ColumnModel<Row>>;\n\n private _createForm: (row: Row) => DirtyTrackingForm<Row> = (row) => new DirtyTrackingForm<Row>();\n\n public constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this._rowsBeingEdited = new MutableListModel<Row>([], {\n identifiedWith: row => this.identityOf(row)\n });\n this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');\n this.editing = chain(this._editorSessions).count().isGreaterThan(0);\n this.dataSource = chain(this._dataSource).replaceAll(this.rowsBeingEdited);\n\n this.firstEditableColumn = chain(this.columns).select(c => c.hasEditorPortal()).first();\n this.firstVisibleColumn = chain(this._columnList).first();\n this.lastVisibleColumn = chain(this._columnList).last();\n\n this.rowSelectionDisabledOnAllColumns = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);\n }\n\n protected setDataSource(sourceOfTruth: ListModel<Row>) {\n this._dataSource.setDelegate(sourceOfTruth);\n }\n\n identityOf(row: Row): any {\n return this._dataSource.identityOf(row);\n }\n\n get rowsBeingEdited(): ListModel<Row> {\n return this._rowsBeingEdited.readonly;\n }\n\n readonly trackBy = (index: number, item: Row) => {\n return this.identityOf ? this.identityOf(item) : index;\n };\n\n get columns(): ListModel<ColumnModel<Row>> {\n return this._columnList.allColumns;\n }\n\n get visibleColumns(): ListModel<ColumnModel<Row>> {\n return this._columnList.readonly;\n }\n\n pluck<P extends Types.ValuePropertiesOf<Row>>(property: P, options?: { columnId: string }): PropertyColumnModel<Row, P> {\n const columnId = options?.columnId || property.toString();\n return this.addColumn(new PropertyColumnModel<Row, P>(columnId, property, () => this.getColumnTextProperties(columnId)));\n }\n\n pluckList<P extends Types.ArrayPropertiesOf<Row>>(property: P, options?: { columnId: string }): ListPropertyColumnModel<Row, P> {\n const columnId = options?.columnId || property.toString();\n return this.addColumn(new ListPropertyColumnModel<Row, P>(columnId, property, () => this.getColumnTextProperties(columnId)));\n }\n\n protected _addSelectionColumn(selectionModel?: SelectionModel<Row>, visible?: ValueModel<boolean> | boolean): SelectionColumnModel<Row> {\n assert.isNil(this.selectionColumnModel);\n const columnId = 'selection-column';\n this.selectionColumnModel = new SelectionColumnModel<Row>(columnId, () => this.getColumnTextProperties(columnId), selectionModel);\n this.addRowClass('aup-row-selected', row => this.selectionColumnModel.isSelected(row));\n const selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);\n if (!_.isNil(visible)) {\n selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));\n }\n return selectionColumnModel;\n }\n\n addEditControls(saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>): EditorControlColumnModel<Row> {\n this.saveCommand = saveCommand;\n const columnId = 'editControls';\n return this.addColumn(new EditorControlColumnModel<Row>(columnId, saveCommand, () => this.getColumnTextProperties(columnId)));\n }\n\n addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V> {\n return this.addColumn(new CustomValueColumnModel<Row, V>(columnId, () => this.getColumnTextProperties(columnId), dataAccessor));\n }\n\n addComponentColumn<C extends CellRenderer<Row>>(columnId: string, component: ComponentType<C>, onInit?: OnComponentInit<C>): CustomValueColumnModel<Row, Row>\n addComponentColumn<C extends CellRenderer<Row>>(columnId: string, component: ComponentType<C>, options?: CellRendererOptions<Row, C>): CustomValueColumnModel<Row, Row>\n addComponentColumn<C extends CellRenderer<Row>>(columnId: string, component: ComponentType<C>, onComponentInitOrOptions?: OnComponentInit<C> | CellRendererOptions<Row, C>): CustomValueColumnModel<Row, Row> {\n return this.addColumn(new CustomValueColumnModel<Row, Row>(columnId, () => this.getColumnTextProperties(columnId), row => row)).cellRenderer(component, onComponentInitOrOptions);\n }\n\n addTemplateColumn<V>(columnId: string): CustomTemplateColumnModel<Row> {\n return this.addColumn(new CustomTemplateColumnModel<Row>(columnId, () => this.getColumnTextProperties(columnId)));\n }\n\n addRowClass(className: string, predicate: (row: Row) => boolean) {\n this.rowClassNamePredicates.push(new RowClass<Row>(className, predicate));\n }\n\n getRowClasses(row: Row): string[] {\n const classNames: string[] = [];\n this.rowClassNamePredicates.forEach(i => {\n if (i.matches(row)) {\n classNames.push(i.className);\n }\n });\n return classNames;\n }\n\n useFormFactory(factory: (row: Row) => DirtyTrackingForm<Row>): this {\n this._createForm = factory;\n return this;\n }\n\n protected addColumn<C extends ColumnModel<Row>>(column: C, index?: number): C {\n return this._columnList.addColumn(column, index);\n }\n\n // removeColumn(column: ColumnModel<Row>) {\n //\n // }\n\n columnTextProperties(columnTextProperties: { [columnName: string]: ColumnTextProperties }) {\n this._columnTextPropertiesLookup = columnTextProperties;\n }\n\n getColumnTextProperties(columnId: string): ColumnTextProperties {\n return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[columnId] : undefined;\n }\n\n startEditSession(row: Row): EditSession<Row> {\n const rowId = this.identityOf(row);\n if (this._rowsBeingEdited.query().indexOf(row) > -1) {\n return lang.illegalState(`Row with id=${rowId} already being edited`);\n } else {\n const editSession = new EditSession<Row>(rowId, row, this._createForm(row), this.saveCommand);\n const { when } = Dsl.disposeWith(editSession);\n when(editSession.liveRowValue).changes((editedValue) => {\n this._rowsBeingEdited.replaceOrPush(editedValue);\n }, { initialValue: 'triggerChangeUnlessNil' });\n\n this._editorSessions.push(editSession);\n editSession.onDispose(() => {\n this._rowsBeingEdited.remove(editSession.liveRowValue.value);\n this._editorSessions.remove(editSession);\n });\n return editSession;\n }\n }\n\n getEditSessionFor(row: Row): EditSession<Row> {\n return this._editorSessionByRowId.get(this.identityOf(row));\n }\n\n cancelAllEditorSessions() {\n this._editorSessions.runInTransaction((draft) => {\n this._rowsBeingEdited.runInTransaction(() => {\n draft.value.forEach(session => session.dispose());\n });\n });\n }\n\n isRowSelectionEnabledFor(column: ColumnModel<Row>): boolean {\n return this.isRowSelectionEnabled() && column.isRowSelectionEnabled();\n }\n\n isRowSelectionEnabled() {\n return this.hasSelectionModel() && !this.rowSelectionDisabledOnAllColumns.value;\n }\n\n hasSelectionModel() {\n return !!this.selectionColumnModel?.selectionModel.getDelegate();\n }\n\n isHoverEnabled(): boolean {\n return this.isRowSelectionEnabled() || this.rowClickListeners.listenerCount > 0;\n }\n\n isCursorEnabled(column: ColumnModel<Row>) {\n return this.isRowSelectionEnabledFor(column) || this.rowClickListeners.listenerCount > 0;\n }\n\n selectRow(row: Row) {\n this.selectionColumnModel?.selectRow(row);\n }\n\n onRowClicked(callback: (row: Row) => void): Disposable {\n return this.rowClickListeners.add(callback);\n }\n\n _notifyCellClicked(columnModel: ColumnModel<Row>, row: Row) {\n if (this.isRowSelectionEnabledFor(columnModel)) {\n this.selectRow(row);\n }\n this.rowClickListeners.fire(l => l(row));\n }\n}\n\n\nTrackExternal.oneTimeBinding(AbstractTableModel);\n"]}
|
|
1
|
+
{"version":3,"file":"abstract-table-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/abstract-table-model.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EAGN,mBAAmB,EACnB,iBAAiB,EAEjB,GAAG,EACH,iBAAiB,EACjB,gBAAgB,EAChB,IAAI,EAIJ,gBAAgB,EAEhB,aAAa,EAEb,UAAU,EAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAGL,yBAAyB,EACzB,sBAAsB,E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,iBAAiB,CAAC,aAAa,GAAG,CAAC,CAAC;IAC3F,CAAC;IAED,SAAS,CAAC,GAAQ;;QAChB,MAAA,IAAI,CAAC,oBAAoB,0CAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,YAAY,CAAC,QAA4B;QACvC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED,kBAAkB,CAAC,WAA6B,EAAE,GAAQ;QACxD,IAAI,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,EAAE;YAC9C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SACrB;QACD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF;AAGD,aAAa,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport {\n assert,\n BooleanValueModelChain, Command,\n CommandFactory,\n DelegatingListModel,\n DirtyTrackingForm,\n Disposable,\n Dsl,\n EventListenerList,\n GarbageCollector,\n lang,\n ListModel,\n ListModelChain,\n MapModelChain,\n MutableListModel,\n SelectionModel,\n TrackExternal,\n Types,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { ColumnListModel } from './column-list-model';\nimport { EditSession } from './edit-session';\nimport { CellRenderer } from './table/cell-renderer';\nimport {\n CellRendererOptions,\n ColumnModel,\n CustomTemplateColumnModel,\n CustomValueColumnModel,\n EditorControlColumnModel,\n ListPropertyColumnModel,\n OnComponentInit,\n PropertyColumnModel,\n SelectionColumnModel\n} from './table/column-model';\nimport { ColumnTextProperties } from './table/column-text-properties';\n\n// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];\n// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];\n\nclass RowClass<Row> {\n constructor(readonly className: string,\n readonly matches: (row: Row) => boolean) {\n }\n}\n\n\nexport class AbstractTableModel<Row> extends GarbageCollector {\n\n private readonly _dataSource = this.registerDisposable(new DelegatingListModel<Row>());\n readonly dataSource: ListModelChain<Row>;\n\n private readonly _columnList = this.registerDisposable(new ColumnListModel<Row>());\n\n private _editorSessions = new MutableListModel<EditSession<Row>>();\n private readonly _rowsBeingEdited: MutableListModel<Row>;\n private readonly rowClassNamePredicates: RowClass<Row>[] = [];\n\n private _columnTextPropertiesLookup: { [columnName: string]: ColumnTextProperties };\n\n private saveCommandFactory: Command.Factory<DirtyTrackingForm<Row>, boolean | Promise<boolean>>;\n private _editorSessionByRowId: MapModelChain<any, EditSession<Row>>;\n\n readonly editing: BooleanValueModelChain;\n readonly firstEditableColumn: ValueModelChain<ColumnModel<Row>>;\n private selectionColumnModel: SelectionColumnModel<Row>;\n private rowSelectionDisabledOnAllColumns: BooleanValueModelChain;\n private readonly rowClickListeners = new EventListenerList<(row: Row) => void>();\n readonly firstVisibleColumn: ValueModel<ColumnModel<Row>>;\n readonly lastVisibleColumn: ValueModel<ColumnModel<Row>>;\n\n private _createForm: (row: Row) => DirtyTrackingForm<Row> = (row) => new DirtyTrackingForm<Row>();\n\n public constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this._rowsBeingEdited = new MutableListModel<Row>([], {\n identifiedWith: row => this.identityOf(row)\n });\n this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');\n this.editing = chain(this._editorSessions).count().isGreaterThan(0);\n this.dataSource = chain(this._dataSource).replaceAll(this.rowsBeingEdited);\n\n this.firstEditableColumn = chain(this.columns).select(c => c.hasEditorPortal()).first();\n this.firstVisibleColumn = chain(this._columnList).first();\n this.lastVisibleColumn = chain(this._columnList).last();\n\n this.rowSelectionDisabledOnAllColumns = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);\n }\n\n findMatchingColumns(row: Row, regex: RegExp): ColumnModel<Row>[] {\n return this.columns.value.filter(c => c.isTextMatch(row, regex));\n }\n\n hasMatchingColumn(row: Row, regex: RegExp): boolean {\n return !!this.columns.value.find(c => c.isTextMatch(row, regex));\n }\n\n protected setDataSource(sourceOfTruth: ListModel<Row>) {\n this._dataSource.setDelegate(sourceOfTruth);\n }\n\n identityOf(row: Row): any {\n return this._dataSource.identityOf(row);\n }\n\n get rowsBeingEdited(): ListModel<Row> {\n return this._rowsBeingEdited.readonly;\n }\n\n readonly trackBy = (index: number, item: Row) => {\n return this.identityOf ? this.identityOf(item) : index;\n };\n\n get columns(): ListModel<ColumnModel<Row>> {\n return this._columnList.allColumns;\n }\n\n get visibleColumns(): ListModel<ColumnModel<Row>> {\n return this._columnList.readonly;\n }\n\n pluck<P extends Types.ValuePropertiesOf<Row>>(property: P, options?: { columnId: string }): PropertyColumnModel<Row, P> {\n const columnId = options?.columnId || property.toString();\n return this.addColumn(new PropertyColumnModel<Row, P>(columnId, property, () => this.getColumnTextProperties(columnId)));\n }\n\n pluckList<P extends Types.ArrayPropertiesOf<Row>>(property: P, options?: { columnId: string }): ListPropertyColumnModel<Row, P> {\n const columnId = options?.columnId || property.toString();\n return this.addColumn(new ListPropertyColumnModel<Row, P>(columnId, property, () => this.getColumnTextProperties(columnId)));\n }\n\n protected _addSelectionColumn(selectionModel?: SelectionModel<Row>, visible?: ValueModel<boolean> | boolean): SelectionColumnModel<Row> {\n assert.isNil(this.selectionColumnModel);\n const columnId = 'selection-column';\n this.selectionColumnModel = new SelectionColumnModel<Row>(columnId, () => this.getColumnTextProperties(columnId), selectionModel);\n this.addRowClass('aup-row-selected', row => this.selectionColumnModel.isSelected(row));\n const selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);\n if (!_.isNil(visible)) {\n selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));\n }\n return selectionColumnModel;\n }\n\n addEditControls(saveCommandFactory: Command.Factory<DirtyTrackingForm<Row>, boolean|Promise<boolean>>, formFactory?: (row: Row) => DirtyTrackingForm<Row>): EditorControlColumnModel<Row> {\n this.saveCommandFactory = saveCommandFactory;\n if (_.isFunction(formFactory)) {\n this._createForm = formFactory;\n }\n const columnId = 'editControls';\n return this.addColumn(new EditorControlColumnModel<Row>(columnId, saveCommandFactory, () => this.getColumnTextProperties(columnId)));\n }\n\n addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V> {\n return this.addColumn(new CustomValueColumnModel<Row, V>(columnId, () => this.getColumnTextProperties(columnId), dataAccessor));\n }\n\n addComponentColumn<C extends CellRenderer<Partial<Row>>>(columnId: string, component: ComponentType<C>, onInit?: OnComponentInit<C>): CustomValueColumnModel<Row, Row>\n addComponentColumn<C extends CellRenderer<Partial<Row>>>(columnId: string, component: ComponentType<C>, options?: CellRendererOptions<Row, C>): CustomValueColumnModel<Row, Row>\n addComponentColumn<C extends CellRenderer<Partial<Row>>>(columnId: string, component: ComponentType<C>, onComponentInitOrOptions?: OnComponentInit<C> | CellRendererOptions<Row, C>): CustomValueColumnModel<Row, Row> {\n return this.addColumn(new CustomValueColumnModel<Row, Row>(columnId, () => this.getColumnTextProperties(columnId), row => row)).cellRenderer(component, onComponentInitOrOptions);\n }\n\n addTemplateColumn<V>(columnId: string): CustomTemplateColumnModel<Row> {\n return this.addColumn(new CustomTemplateColumnModel<Row>(columnId, () => this.getColumnTextProperties(columnId)));\n }\n\n addRowClass(className: string, predicate: (row: Row) => boolean) {\n this.rowClassNamePredicates.push(new RowClass<Row>(className, predicate));\n }\n\n getRowClasses(row: Row): string[] {\n const classNames: string[] = [];\n this.rowClassNamePredicates.forEach(i => {\n if (i.matches(row)) {\n classNames.push(i.className);\n }\n });\n return classNames;\n }\n\n useFormFactory(factory: (row: Row) => DirtyTrackingForm<Row>): this {\n this._createForm = factory;\n return this;\n }\n\n protected addColumn<C extends ColumnModel<Row>>(column: C, index?: number): C {\n return this._columnList.addColumn(column, index);\n }\n\n // removeColumn(column: ColumnModel<Row>) {\n //\n // }\n\n columnTextProperties(columnTextProperties: { [columnName: string]: ColumnTextProperties }) {\n this._columnTextPropertiesLookup = columnTextProperties;\n }\n\n getColumnTextProperties(columnId: string): ColumnTextProperties {\n return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[columnId] : undefined;\n }\n\n startEditSession(row: Row): EditSession<Row> {\n const rowId = this.identityOf(row);\n if (this._rowsBeingEdited.query().indexOf(row) > -1) {\n return lang.illegalState(`Row with id=${rowId} already being edited`);\n }\n\n // todo: pass the factories to the edit session so we can make the whole lot pluggable?\n const form = this._createForm(row);\n const saveCommand = this.saveCommandFactory.create(form);\n const editSession = new EditSession<Row>(rowId, row, form, saveCommand);\n const { when } = Dsl.disposeWith(editSession);\n when(editSession.liveRowValue).changes((editedValue) => {\n this._rowsBeingEdited.replaceOrPush(editedValue);\n }, { initialValue: 'triggerChangeUnlessNil' });\n\n this._editorSessions.push(editSession);\n editSession.onDispose(() => {\n this._rowsBeingEdited.remove(editSession.liveRowValue.value);\n this._editorSessions.remove(editSession);\n });\n return editSession;\n }\n\n getEditSessionFor(row: Row): EditSession<Row> {\n return this._editorSessionByRowId.get(this.identityOf(row));\n }\n\n cancelAllEditorSessions() {\n this._editorSessions.runInTransaction((draft) => {\n this._rowsBeingEdited.runInTransaction(() => {\n draft.value.forEach(session => session.dispose());\n });\n });\n }\n\n isRowSelectionEnabledFor(column: ColumnModel<Row>): boolean {\n return this.isRowSelectionEnabled() && column.isRowSelectionEnabled();\n }\n\n isRowSelectionEnabled() {\n return this.hasUserSelectionModel() && !this.rowSelectionDisabledOnAllColumns.value;\n }\n\n hasUserSelectionModel() {\n return !!this.selectionColumnModel?.selectionModel.getDelegate();\n }\n\n getSelectionModel(): SelectionModel<Row> | undefined {\n return this.selectionColumnModel?.selectionModel;\n }\n\n isHoverEnabled(): boolean {\n return this.isRowSelectionEnabled() || this.rowClickListeners.listenerCount > 0;\n }\n\n isCursorEnabled(column: ColumnModel<Row>) {\n return this.isRowSelectionEnabledFor(column) || this.rowClickListeners.listenerCount > 0;\n }\n\n selectRow(row: Row) {\n this.selectionColumnModel?.selectRow(row);\n }\n\n onRowClicked(callback: (row: Row) => void): Disposable {\n return this.rowClickListeners.add(callback);\n }\n\n _notifyCellClicked(columnModel: ColumnModel<Row>, row: Row) {\n if (this.isRowSelectionEnabledFor(columnModel)) {\n this.selectRow(row);\n }\n this.rowClickListeners.fire(l => l(row));\n }\n}\n\n\nTrackExternal.oneTimeBinding(AbstractTableModel);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"AbstractTableModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":49,"character":45},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor"}],"setDataSource":[{"__symbolic":"method"}],"identityOf":[{"__symbolic":"method"}],"pluck":[{"__symbolic":"method"}],"pluckList":[{"__symbolic":"method"}],"_addSelectionColumn":[{"__symbolic":"method"}],"addEditControls":[{"__symbolic":"method"}],"addCustomColumn":[{"__symbolic":"method"}],"addComponentColumn":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"addTemplateColumn":[{"__symbolic":"method"}],"addRowClass":[{"__symbolic":"method"}],"getRowClasses":[{"__symbolic":"method"}],"useFormFactory":[{"__symbolic":"method"}],"addColumn":[{"__symbolic":"method"}],"columnTextProperties":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method"}],"startEditSession":[{"__symbolic":"method"}],"getEditSessionFor":[{"__symbolic":"method"}],"cancelAllEditorSessions":[{"__symbolic":"method"}],"isRowSelectionEnabledFor":[{"__symbolic":"method"}],"isRowSelectionEnabled":[{"__symbolic":"method"}],"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AbstractTableModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":49,"character":45},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor"}],"findMatchingColumns":[{"__symbolic":"method"}],"hasMatchingColumn":[{"__symbolic":"method"}],"setDataSource":[{"__symbolic":"method"}],"identityOf":[{"__symbolic":"method"}],"pluck":[{"__symbolic":"method"}],"pluckList":[{"__symbolic":"method"}],"_addSelectionColumn":[{"__symbolic":"method"}],"addEditControls":[{"__symbolic":"method"}],"addCustomColumn":[{"__symbolic":"method"}],"addComponentColumn":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"addTemplateColumn":[{"__symbolic":"method"}],"addRowClass":[{"__symbolic":"method"}],"getRowClasses":[{"__symbolic":"method"}],"useFormFactory":[{"__symbolic":"method"}],"addColumn":[{"__symbolic":"method"}],"columnTextProperties":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method"}],"startEditSession":[{"__symbolic":"method"}],"getEditSessionFor":[{"__symbolic":"method"}],"cancelAllEditorSessions":[{"__symbolic":"method"}],"isRowSelectionEnabledFor":[{"__symbolic":"method"}],"isRowSelectionEnabled":[{"__symbolic":"method"}],"hasUserSelectionModel":[{"__symbolic":"method"}],"getSelectionModel":[{"__symbolic":"method"}],"isHoverEnabled":[{"__symbolic":"method"}],"isCursorEnabled":[{"__symbolic":"method"}],"selectRow":[{"__symbolic":"method"}],"onRowClicked":[{"__symbolic":"method"}],"_notifyCellClicked":[{"__symbolic":"method"}]}}}}]
|
|
@@ -20,6 +20,7 @@ export class ColumnListModel extends AbstractComputedListModel {
|
|
|
20
20
|
if (this.hasColumn(column.columnId)) {
|
|
21
21
|
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
22
22
|
}
|
|
23
|
+
this.registerDisposable(column);
|
|
23
24
|
this.runInTransaction(() => {
|
|
24
25
|
if (!_.isNil(index)) {
|
|
25
26
|
this._allColumns.insert(index, column);
|
|
@@ -27,7 +28,7 @@ export class ColumnListModel extends AbstractComputedListModel {
|
|
|
27
28
|
else {
|
|
28
29
|
this._allColumns.push(column);
|
|
29
30
|
}
|
|
30
|
-
this.trackSource(column.visible);
|
|
31
|
+
this.registerDisposable(this.trackSource(column.visible));
|
|
31
32
|
});
|
|
32
33
|
return column;
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-list-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/column-list-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,GAAG,EAAE,IAAI,EAA4B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,OAAO,eAAqB,SAAQ,yBAAoD;IAK5F;QACE,KAAK,EAAE,CAAC;QAJO,gBAAW,GAAG,IAAI,gBAAgB,EAAoB,CAAC;QAKtE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,SAAS,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,CAAC,EAAU;QAClB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,CAA6B,MAAS,EAAE,KAAc;QAC7D,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACnC,IAAI,CAAC,YAAY,CAAC,kBAAkB,MAAM,CAAC,QAAQ,iBAAiB,CAAC,CAAC;SACvE;QACD,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE;YACzB,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACnB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;aACxC;iBAAM;gBACL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC/B;YACD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"column-list-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/column-list-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,GAAG,EAAE,IAAI,EAA4B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,OAAO,eAAqB,SAAQ,yBAAoD;IAK5F;QACE,KAAK,EAAE,CAAC;QAJO,gBAAW,GAAG,IAAI,gBAAgB,EAAoB,CAAC;QAKtE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,SAAS,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,CAAC,EAAU;QAClB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,CAA6B,MAAS,EAAE,KAAc;QAC7D,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACnC,IAAI,CAAC,YAAY,CAAC,kBAAkB,MAAM,CAAC,QAAQ,iBAAiB,CAAC,CAAC;SACvE;QACD,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE;YACzB,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACnB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;aACxC;iBAAM;gBACL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC/B;YACD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import { AbstractComputedListModel, Dsl, lang, ListModel, MapModelChain, MutableListModel } from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { ColumnModel } from './table/column-model';\n\nexport class ColumnListModel<Row> extends AbstractComputedListModel<ColumnModel<Row>, boolean> {\n\n private readonly _allColumns = new MutableListModel<ColumnModel<Row>>();\n private readonly columnsById: MapModelChain<string, ColumnModel<Row>>;\n\n constructor() {\n super();\n const { chain } = Dsl.disposeWith(this);\n this.columnsById = chain(this._allColumns).indexBy('columnId');\n }\n\n get allColumns(): ListModel<ColumnModel<Row>> {\n return this._allColumns.readonly;\n }\n\n getColumn(id: string): ColumnModel<Row> {\n return this.columnsById.get(id);\n }\n\n hasColumn(id: string): boolean {\n return !!this.columnsById.get(id);\n }\n\n addColumn<C extends ColumnModel<Row>>(column: C, index?: number): C {\n if (this.hasColumn(column.columnId)) {\n lang.illegalState(`Column with id=${column.columnId} already exists`);\n }\n this.registerDisposable(column);\n this.runInTransaction(() => {\n if (!_.isNil(index)) {\n this._allColumns.insert(index, column);\n } else {\n this._allColumns.push(column);\n }\n this.registerDisposable(this.trackSource(column.visible));\n });\n return column;\n }\n\n doComputeValue(): ColumnModel<Row>[] {\n return this._allColumns.value.filter(c => c.visible.value);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-session.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/edit-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEjG,OAAO,OAAO,MAAM,OAAO,CAAC;AAE5B,MAAM,OAAO,WAAiB,SAAQ,gBAAgB;IAIpD,YAAqB,KAAU,EAAE,GAAQ,EAAW,IAA4B,EAAW,WAAgD;QACzI,KAAK,EAAE,CAAC;QADW,UAAK,GAAL,KAAK,CAAK;QAAqB,SAAI,GAAJ,IAAI,CAAwB;QAAW,gBAAW,GAAX,WAAW,CAAqC;QAHnI,kBAAa,GAAG,IAAI,iBAAiB,EAAO,CAAC;QAC5C,iBAAY,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;QAIlD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,GAAG,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpB,8CAA8C;YAC9C,mBAAmB;YACnB,IAAI;YACJ,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;gBACnE,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAyB,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { Command, DirtyTrackingForm, GarbageCollector, MutableValueModel } from '@coolon/pectin';\nimport { PickMutable } from '@coolon/typescript-utilities';\nimport produce from 'immer';\n\nexport class EditSession<Row> extends GarbageCollector {\n private _liveRowValue = new MutableValueModel<Row>();\n readonly liveRowValue = this._liveRowValue.readonly;\n\n constructor(readonly rowId: any, row: Row, readonly form: DirtyTrackingForm<Row>, readonly saveCommand: Command<boolean | Promise<boolean>>) {\n super();\n this.form.load(row);\n this._liveRowValue.value = row;\n this.form.onEdit(() => {\n // if (!this._liveRowValue.value[immerable]) {\n // console.warn()\n // }\n this._liveRowValue.value = produce(this._liveRowValue.value, draft => {\n this.form.writeDirtyStateTo(draft as PickMutable<Row>);\n });\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"EditSession":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":4,"character":38},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Could not resolve type","line":8,"character":40,"context":{"typeName":"Row"}},{"__symbolic":"reference","module":"@coolon/pectin","name":"DirtyTrackingForm","line":8,"character":60,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"EditSession":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":4,"character":38},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Could not resolve type","line":8,"character":40,"context":{"typeName":"Row"}},{"__symbolic":"reference","module":"@coolon/pectin","name":"DirtyTrackingForm","line":8,"character":60,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":78,"context":{"typeName":"Row"}}]},{"__symbolic":"reference","module":"@coolon/pectin","name":"Command","line":8,"character":106,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":124,"context":{"typeName":"Promise"}}]}]}]}}}}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-portal-ref.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/table/cell-portal-ref.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAGlF,MAAM,OAAgB,aAAa;IACjC;IACA,CAAC;CAKF;AAED,MAAM,OAAO,mBAA4B,SAAQ,aAAuD;IACtG,YAAqB,aAA+B,EAAW,gBAAuE;QACpI,KAAK,EAAE,CAAC;QADW,kBAAa,GAAb,aAAa,CAAkB;QAAW,qBAAgB,GAAhB,gBAAgB,CAAuD;IAEtI,CAAC;IAED,cAAc,CAAC,IAAsC,EAAE,WAA6B;QAClF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,2BAA2B,CAAC,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9E,CAAC;IAED,WAAW;IACX,gBAAgB,CAAC,IAAsC,EAAE,eAAkB;QACzE,IAAI,CAAC,gBAAgB,CAAC,eAAe,EA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IAAqC,EAAE,eAAuB;QAC7E,IAAI,CAAC,uBAAuB,CAAC,GAAG,eAAe,CAAC;QAChD,IAAI,CAAC,uBAAuB,CAAC,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClE,CAAC;CAEF;AAED,MAAM,OAAO,6BAAmC,SAAQ,qBAAqC;IAO3F;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAEM,cAAc,CAAC,WAA6B,EAAE,aAA+B,EAAE,QAAiB,EAAE,QAAiB;QACxH,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,cAAc,CAAC,IAAqC,EAAE,WAA6B;QACjF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,WAAW;IACX,gBAAgB,CAAC,IAAqC,EAAE,eAA0B;QAChF,cAAc;IAChB,CAAC;IAED,WAAW;IACX,SAAS,CAAC,IAAqC;QAC7C,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;IAEO,YAAY,CAAC,IAAkB;QACrC,OAAO,IAAI,cAAc,CAAM,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,kCAAO,CAAC,IAAI,CAAC,KAAE,SAAS,EAAE,IAAI,CAAC,GAAG,IAAG,CAAC;IAC3G,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { Trace } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { ColumnModel, RowData } from './column-model';\nimport { EditSession } from '
|
|
1
|
+
{"version":3,"file":"cell-portal-ref.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/table/cell-portal-ref.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAGlF,MAAM,OAAgB,aAAa;IACjC;IACA,CAAC;CAKF;AAED,MAAM,OAAO,mBAA4B,SAAQ,aAAuD;IACtG,YAAqB,aAA+B,EAAW,gBAAuE;QACpI,KAAK,EAAE,CAAC;QADW,kBAAa,GAAb,aAAa,CAAkB;QAAW,qBAAgB,GAAhB,gBAAgB,CAAuD;IAEtI,CAAC;IAED,cAAc,CAAC,IAAsC,EAAE,WAA6B;QAClF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,2BAA2B,CAAC,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9E,CAAC;IAED,WAAW;IACX,gBAAgB,CAAC,IAAsC,EAAE,eAAkB;QACzE,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;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CAAC,uBAAuB,CAAC,GAAG,eAAe,CAAC;QAChD,IAAI,CAAC,uBAAuB,CAAC,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClE,CAAC;CAEF;AAED,MAAM,OAAO,6BAAmC,SAAQ,qBAAqC;IAO3F;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAEM,cAAc,CAAC,WAA6B,EAAE,aAA+B,EAAE,QAAiB,EAAE,QAAiB;QACxH,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,cAAc,CAAC,IAAqC,EAAE,WAA6B;QACjF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,WAAW;IACX,gBAAgB,CAAC,IAAqC,EAAE,eAA0B;QAChF,cAAc;IAChB,CAAC;IAED,WAAW;IACX,SAAS,CAAC,IAAqC;QAC7C,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;IAEO,YAAY,CAAC,IAAkB;QACrC,OAAO,IAAI,cAAc,CAAM,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,kCAAO,CAAC,IAAI,CAAC,KAAE,SAAS,EAAE,IAAI,CAAC,GAAG,IAAG,CAAC;IAC3G,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { Trace } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { ColumnModel, RowData } from './column-model';\nimport { EditSession } from '../edit-session';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\nexport const HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');\nexport const CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');\nexport const CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');\nexport const PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');\nexport const PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');\n\n\nexport abstract class CellPortalRef<Row, Host, Portal> {\n constructor() {\n }\n\n abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>)\n\n abstract onPortalAttached(host: Host, portalComponent: Portal);\n}\n\nexport class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellRendererComponent, C> {\n constructor(readonly componentType: ComponentType<C>, readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableHeaderCellRendererComponent, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableHeaderCellRendererComponent, portalComponent: C) {\n this.initialiseHeader(portalComponent, host.column);\n }\n\n}\n\nexport abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n abstract pushState(host: TableCellRendererComponent<Row>): void;\n}\n\nexport class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {\n\n\n constructor(readonly componentType: ComponentType<Portal>, readonly updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_RENDERER_COMPONENT] = portalComponent;\n this.updateComponent(portalComponent, host.getRowData(), true);\n }\n\n // @Trace()\n pushState(host: TableCellRendererComponent<Row>): void {\n if (host[PORTAL_RENDERER_COMPONENT]) {\n this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData(), false);\n }\n }\n\n}\n\nexport class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n\n constructor(readonly componentType: ComponentType<Portal>, readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_EDITOR_COMPONENT] = portalComponent;\n this.initialiseEditorSession(portalComponent, host.editSession);\n }\n\n}\n\nexport class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {\n\n private templateRef: TemplateRef<any>;\n private viewContainer: ViewContainerRef;\n private fillCell: boolean;\n private padChild: boolean;\n\n constructor() {\n super();\n }\n\n public registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.templateRef = templateRef;\n this.viewContainer = viewContainer;\n this.fillCell = fillCell;\n this.padChild = padChild;\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: undefined) {\n // don't care\n }\n\n // @Trace()\n pushState(host: TableCellRendererComponent<Row>): void {\n host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());\n host.fillCell = this.fillCell;\n host.padChild = this.padChild;\n }\n\n private createPortal(data: RowData<Row>) {\n return new TemplatePortal<any>(this.templateRef, this.viewContainer, { ...(data), $implicit: data.row });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-renderer.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/table/cell-renderer.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"cell-renderer.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/table/cell-renderer.ts"],"names":[],"mappings":"","sourcesContent":["import { TextSearchPredicate } from './text-search-predicate';\n\nexport interface CellRenderer<T> {\n value: T;\n matches?: TextSearchPredicate<T>;\n}\n"]}
|