@coolon/angular-ui-powerups 12.4.0-alpha.4 → 12.4.0-alpha.41
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/cards.scss +17 -0
- package/assets/empty-state.scss +11 -0
- package/assets/form.scss +5 -2
- package/assets/forms/mixins.scss +6 -0
- package/assets/interaction/editor/inline-string-editor.scss +88 -0
- package/assets/interaction/input-activity.scss +12 -0
- package/assets/interaction.scss +11 -7
- package/assets/styles.scss +5 -12
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js +738 -307
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +745 -127
- 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 +4 -0
- 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 +25 -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 -33
- 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 +7 -0
- package/esm2015/cypress/components/aup-empty-state.js.map +1 -0
- package/esm2015/cypress/components/aup-empty-state.metadata.json +1 -0
- 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 +25 -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/cypress/path.js +3 -1
- package/esm2015/cypress/path.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +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/components.module.js +32 -24
- 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 +4 -1
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.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/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/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-table-model.js +1 -0
- 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/track-by.js +12 -0
- package/esm2015/lib/components/track-by.js.map +1 -1
- 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-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 +4 -1
- 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 +4 -1
- 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 +4 -1
- 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/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 +160 -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 +6 -2
- 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 +71 -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 +3 -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 +3 -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/exports.js +5 -3
- package/esm2015/lib/interaction/exports.js.map +1 -1
- package/esm2015/lib/interaction/exports.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +17 -5
- 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/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 +3 -8
- 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/url-snapshot.js +1 -7
- package/esm2015/lib/place/url-snapshot.js.map +1 -1
- package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
- package/esm2015/lib/place/visit.js +5 -1
- package/esm2015/lib/place/visit.js.map +1 -1
- package/esm2015/lib/place/visit.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups-cypress.js +555 -228
- package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +618 -96
- 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/exports.d.ts +4 -1
- package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
- package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
- package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
- package/lib/components/track-by.d.ts +9 -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/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 +1 -0
- package/lib/interaction/components/input-activities/input-activity.d.ts +33 -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 +2 -2
- package/lib/interaction/exports.d.ts +5 -3
- package/lib/place/place-component.d.ts +6 -1
- package/package.json +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/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 -51
- 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 -58
- 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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"InlineActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":12,"character":79},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"aup-inline-activity-trigger","template":"<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n","styles":[":host{display:inline-block}"]}]}],"members":{"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InlineActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":12,"character":79},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"aup-inline-activity-trigger","template":"<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n","styles":[":host{display:inline-block}"]}]}],"members":{"_interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":14,"character":3},"arguments":[{"__symbolic":"reference","module":"../../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":14,"character":13},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -4,7 +4,10 @@ import { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.c
|
|
|
4
4
|
export class ModalActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
5
5
|
constructor(interactionService) {
|
|
6
6
|
super();
|
|
7
|
-
this.
|
|
7
|
+
this._interactionContext = interactionService.createModalInteractionContextDisposedWith(this);
|
|
8
|
+
}
|
|
9
|
+
get interactionContext() {
|
|
10
|
+
return this._interactionContext;
|
|
8
11
|
}
|
|
9
12
|
}
|
|
10
13
|
ModalActivityTriggerComponent.decorators = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,6BAAyD,SAAQ,gCAAyC;
|
|
1
|
+
{"version":3,"file":"modal-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,6BAAyD,SAAQ,gCAAyC;IASrH,YAAY,kBAAsC;QAChD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,yCAAyC,CAAC,IAAI,CAAC,CAAC;IAChG,CAAC;IARD,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;;;YAXF,SAAS,SAAC;gBACT,QAAQ,EAAE,4BAA4B;gBACtC,gIAAsD;;aAEvD;;;YAPQ,kBAAkB","sourcesContent":["import { Component } from '@angular/core';\nimport { Activity } from '../../../activity';\nimport { InteractionContext } from '../../../interaction-context';\nimport { InteractionService } from '../../../services/interaction.service';\nimport { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';\n\n@Component({\n selector: 'aup-modal-activity-trigger',\n templateUrl: './modal-activity-trigger.component.html',\n styleUrls: ['./modal-activity-trigger.component.scss']\n})\nexport class ModalActivityTriggerComponent<D = any, R = any, E = any> extends AbstractActivityTriggerComponent<D, R, E> {\n\n _interactionContext: InteractionContext;\n\n get interactionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n\n constructor(interactionService: InteractionService) {\n super();\n this._interactionContext = interactionService.createModalInteractionContextDisposedWith(this);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ModalActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":11,"character":78},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-modal-activity-trigger","template":"<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n","styles":[":host{display:inline-block}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../../services/interaction.service","name":"InteractionService","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ModalActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":11,"character":78},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-modal-activity-trigger","template":"<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n","styles":[":host{display:inline-block}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../../services/interaction.service","name":"InteractionService","line":20,"character":34}]}]}}}}]
|
|
@@ -7,6 +7,9 @@ export class PopupActivityTriggerComponent extends AbstractActivityTriggerCompon
|
|
|
7
7
|
this.anchorX = 'start';
|
|
8
8
|
this.anchorY = 'bottom';
|
|
9
9
|
}
|
|
10
|
+
get interactionContext() {
|
|
11
|
+
return this._interactionContext;
|
|
12
|
+
}
|
|
10
13
|
}
|
|
11
14
|
PopupActivityTriggerComponent.decorators = [
|
|
12
15
|
{ type: Component, args: [{
|
|
@@ -19,6 +22,6 @@ PopupActivityTriggerComponent.ctorParameters = () => [];
|
|
|
19
22
|
PopupActivityTriggerComponent.propDecorators = {
|
|
20
23
|
anchorX: [{ type: Input }],
|
|
21
24
|
anchorY: [{ type: Input }],
|
|
22
|
-
|
|
25
|
+
_interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
|
|
23
26
|
};
|
|
24
27
|
//# sourceMappingURL=popup-activity-trigger.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,qEAAqE,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,6BAAyD,SAAQ,gCAAyC;IAWrH;QACE,KAAK,EAAE,CAAC;QATV,YAAO,GAAoB,OAAO,CAAC;QAGnC,YAAO,GAAqB,QAAQ,CAAC;IAOrC,CAAC;;;
|
|
1
|
+
{"version":3,"file":"popup-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,qEAAqE,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,6BAAyD,SAAQ,gCAAyC;IAWrH;QACE,KAAK,EAAE,CAAC;QATV,YAAO,GAAoB,OAAO,CAAC;QAGnC,YAAO,GAAqB,QAAQ,CAAC;IAOrC,CAAC;IAED,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;;;YAtBF,SAAS,SAAC;gBACT,QAAQ,EAAE,4BAA4B;gBACtC,iPAAsD;;aAEvD;;;;sBAGE,KAAK;sBAGL,KAAK;kCAGL,SAAS,SAAC,gCAAgC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE","sourcesContent":["import { Component, Input, ViewChild } from '@angular/core';\nimport { InteractionContext } from '../../../interaction-context';\nimport { PopupInteractionContextComponent } from '../../popup-interaction-context/popup-interaction-context.component';\nimport { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';\n\n@Component({\n selector: 'aup-popup-activity-trigger',\n templateUrl: './popup-activity-trigger.component.html',\n styleUrls: ['./popup-activity-trigger.component.scss']\n})\nexport class PopupActivityTriggerComponent<D = any, R = any, E = any> extends AbstractActivityTriggerComponent<D, R, E> {\n\n @Input()\n anchorX: 'start' | 'end' = 'start';\n\n @Input()\n anchorY: 'top' | 'bottom' = 'bottom';\n\n @ViewChild(PopupInteractionContextComponent, { static: true })\n _interactionContext: InteractionContext;\n\n constructor() {\n super();\n }\n\n get interactionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PopupActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":10,"character":78},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-popup-activity-trigger","template":"<aup-popup-interaction-context [anchorX]=\"anchorX\" [anchorY]=\"anchorY\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-popup-interaction-context>\n","styles":[":host{display:inline-block}"]}]}],"members":{"anchorX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"anchorY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PopupActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":10,"character":78},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-popup-activity-trigger","template":"<aup-popup-interaction-context [anchorX]=\"anchorX\" [anchorY]=\"anchorY\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-popup-interaction-context>\n","styles":[":host{display:inline-block}"]}]}],"members":{"anchorX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"anchorY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"_interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":18,"character":3},"arguments":[{"__symbolic":"reference","module":"../../popup-interaction-context/popup-interaction-context.component","name":"PopupInteractionContextComponent","line":18,"character":13},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Component, HostBinding, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { Dsl } from '@coolon/pectin';
|
|
3
|
+
import { Enum } from 'typescript-string-enums';
|
|
4
|
+
import { InteractionService } from '../../services/interaction.service';
|
|
5
|
+
import { AbstractActivityTriggerComponent } from '../activity-triggers/abstract-activity-trigger.component';
|
|
6
|
+
import { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export class AddCardActivityComponent extends AbstractActivityTriggerComponent {
|
|
11
|
+
constructor(interactionService) {
|
|
12
|
+
super();
|
|
13
|
+
this.interactionStyle = AddCardActivityComponent.InteractionType.MODAL;
|
|
14
|
+
this.renderAs = AddCardActivityComponent.RenderAs.CARD;
|
|
15
|
+
this.notCard = true;
|
|
16
|
+
const { chain } = Dsl.disposeWith(this);
|
|
17
|
+
this.modalInteractionContext = interactionService.createModalInteractionContextDisposedWith(this);
|
|
18
|
+
this.faceList = chain(this.faceModel).mapToList(face => [face]);
|
|
19
|
+
}
|
|
20
|
+
get renderAsClass() {
|
|
21
|
+
return `render-as-${this.renderAs}`;
|
|
22
|
+
}
|
|
23
|
+
get activityTypeClass() {
|
|
24
|
+
return `${this.interactionStyle}-activity`;
|
|
25
|
+
}
|
|
26
|
+
isRenderAsCard() {
|
|
27
|
+
return this.renderAs === 'card';
|
|
28
|
+
}
|
|
29
|
+
isRenderAsButton() {
|
|
30
|
+
return this.renderAs === 'button';
|
|
31
|
+
}
|
|
32
|
+
ngOnInit() {
|
|
33
|
+
}
|
|
34
|
+
get interactionContext() {
|
|
35
|
+
switch (this.interactionStyle) {
|
|
36
|
+
case 'inline':
|
|
37
|
+
return this.inlineInteractionContext;
|
|
38
|
+
default:
|
|
39
|
+
return this.modalInteractionContext;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
isModal() {
|
|
43
|
+
return this.interactionStyle === 'modal';
|
|
44
|
+
}
|
|
45
|
+
isInline() {
|
|
46
|
+
return this.interactionStyle === 'inline';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
AddCardActivityComponent.decorators = [
|
|
50
|
+
{ type: Component, args: [{
|
|
51
|
+
selector: 'aup-add-card-activity',
|
|
52
|
+
template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n",
|
|
53
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]{box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host-context(aup-card-container)[renderas=button]{align-self:start}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]
|
|
54
|
+
},] }
|
|
55
|
+
];
|
|
56
|
+
AddCardActivityComponent.ctorParameters = () => [
|
|
57
|
+
{ type: InteractionService }
|
|
58
|
+
];
|
|
59
|
+
AddCardActivityComponent.propDecorators = {
|
|
60
|
+
inlineInteractionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }],
|
|
61
|
+
interactionStyle: [{ type: Input }],
|
|
62
|
+
renderAs: [{ type: Input }, { type: HostBinding, args: ['class',] }],
|
|
63
|
+
notCard: [{ type: HostBinding, args: ['class.not-card',] }],
|
|
64
|
+
renderAsClass: [{ type: HostBinding, args: ['class',] }],
|
|
65
|
+
activityTypeClass: [{ type: HostBinding, args: ['class',] }]
|
|
66
|
+
};
|
|
67
|
+
(function (AddCardActivityComponent) {
|
|
68
|
+
AddCardActivityComponent.InteractionType = Enum({
|
|
69
|
+
MODAL: 'modal',
|
|
70
|
+
INLINE: 'inline'
|
|
71
|
+
});
|
|
72
|
+
AddCardActivityComponent.RenderAs = Enum({
|
|
73
|
+
CARD: 'card',
|
|
74
|
+
BUTTON: 'button'
|
|
75
|
+
});
|
|
76
|
+
})(AddCardActivityComponent || (AddCardActivityComponent = {}));
|
|
77
|
+
//# sourceMappingURL=add-card-activity.component.js.map
|
package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-card-activity.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/add-card-activity/add-card-activity.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,GAAG,EAAkB,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAC5G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uEAAuE,CAAC;AAE3H;;GAEG;AAMH,MAAM,OAAO,wBAAyB,SAAQ,gCAAgC;IAqC5E,YAAY,kBAAsC;QAChD,KAAK,EAAE,CAAC;QA9BV,qBAAgB,GAA6C,wBA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AAM,EAAE,IAAI,EAAE;+BAG9D,KAAK;uBAGL,KAAK,YACL,WAAW,SAAC,OAAO;sBAGnB,WAAW,SAAC,gBAAgB;4BAK5B,WAAW,SAAC,OAAO;gCAKnB,WAAW,SAAC,OAAO;;AA2CtB,WAAiB,wBAAwB;IAC1B,wCAAe,GAAG,IAAI,CAAC;QAClC,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;IAEU,iCAAQ,GAAG,IAAI,CAAC;QAC3B,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AAEL,CAAC,EAXgB,wBAAwB,KAAxB,wBAAwB,QAWxC","sourcesContent":["import { Component, HostBinding, Input, OnInit, ViewChild } from '@angular/core';\nimport { Dsl, ListModelChain } from '@coolon/pectin';\nimport { Enum } from 'typescript-string-enums';\nimport { CommandFace } from '../../../components/commands/command-face';\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../../services/interaction.service';\nimport { AbstractActivityTriggerComponent } from '../activity-triggers/abstract-activity-trigger.component';\nimport { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-add-card-activity',\n templateUrl: './add-card-activity.component.html',\n styleUrls: ['./add-card-activity.component.scss'],\n})\nexport class AddCardActivityComponent extends AbstractActivityTriggerComponent implements OnInit {\n\n private modalInteractionContext: InteractionContext;\n\n @ViewChild(InPlaceInteractionContextComponent, { static: true })\n inlineInteractionContext: InteractionContext;\n\n @Input()\n interactionStyle: AddCardActivityComponent.InteractionType = AddCardActivityComponent.InteractionType.MODAL;\n\n @Input()\n @HostBinding('class')\n renderAs: AddCardActivityComponent.RenderAs = AddCardActivityComponent.RenderAs.CARD;\n\n @HostBinding('class.not-card')\n notCard = true;\n\n readonly faceList: ListModelChain<CommandFace>;\n\n @HostBinding('class')\n get renderAsClass() {\n return `render-as-${this.renderAs}`;\n }\n\n @HostBinding('class')\n get activityTypeClass() {\n return `${this.interactionStyle}-activity`;\n }\n\n isRenderAsCard(): boolean {\n return this.renderAs === 'card';\n }\n\n isRenderAsButton(): boolean {\n return this.renderAs === 'button';\n }\n\n constructor(interactionService: InteractionService) {\n super();\n const { chain } = Dsl.disposeWith(this);\n this.modalInteractionContext = interactionService.createModalInteractionContextDisposedWith(this);\n this.faceList = chain(this.faceModel).mapToList(face => [face]);\n }\n\n ngOnInit(): void {\n }\n\n get interactionContext(): InteractionContext {\n switch (this.interactionStyle) {\n case 'inline':\n return this.inlineInteractionContext;\n default:\n return this.modalInteractionContext;\n }\n }\n\n isModal() {\n return this.interactionStyle === 'modal';\n }\n\n isInline() {\n return this.interactionStyle === 'inline';\n }\n\n\n}\n\nexport namespace AddCardActivityComponent {\n export const InteractionType = Enum({\n MODAL: 'modal',\n INLINE: 'inline'\n });\n export type InteractionType = Enum<typeof InteractionType>;\n export const RenderAs = Enum({\n CARD: 'card',\n BUTTON: 'button'\n });\n export type RenderAs = Enum<typeof RenderAs>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AddCardActivityComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../activity-triggers/abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":17,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"aup-add-card-activity","template":"<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]{box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host-context(aup-card-container)[renderas=button]{align-self:start}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]}]}],"members":{"inlineInteractionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":[{"__symbolic":"reference","module":"../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":21,"character":13},{"static":true}]}]}],"interactionStyle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"renderAs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":28,"character":3},"arguments":["class"]}]}],"notCard":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":31,"character":3},"arguments":["class.not-card"]}]}],"renderAsClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":36,"character":3},"arguments":["class"]}]}],"activityTypeClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":41,"character":3},"arguments":["class"]}]}],"isRenderAsCard":[{"__symbolic":"method"}],"isRenderAsButton":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":54,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"isModal":[{"__symbolic":"method"}],"isInline":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-card-activity.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/add-card-activity/add-card-activity.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-card-activity.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/add-card-activity/add-card-activity.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-context.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/edit-context.ts"],"names":[],"mappings":"","sourcesContent":["export interface EditContext<T> {\n injectError(error: string);\n // replaceValue(value:T) // TODO: implement..\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"EditContext":{"__symbolic":"interface"}}}]
|
package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DelegatingValueModel, Dsl, GarbageCollector, MutableListModel, MutableValueModel, TrackExternal } from '@coolon/pectin';
|
|
2
|
+
export class InlineEditorModel extends GarbageCollector {
|
|
3
|
+
constructor(valueModel, saveCallback) {
|
|
4
|
+
super();
|
|
5
|
+
this.valueModel = valueModel;
|
|
6
|
+
this.saveCallback = saveCallback;
|
|
7
|
+
this.editing = new MutableValueModel(false);
|
|
8
|
+
this._validators = new MutableListModel();
|
|
9
|
+
this._editingEnabled = this.registerDisposable(new DelegatingValueModel().withDefault(true));
|
|
10
|
+
const { when } = Dsl.disposeWith(this);
|
|
11
|
+
when(this.editingEnabled).becomesFalsey(() => this.cancelEdit());
|
|
12
|
+
}
|
|
13
|
+
get editingEnabled() {
|
|
14
|
+
return this._editingEnabled.readonly;
|
|
15
|
+
}
|
|
16
|
+
disableWhile(condition) {
|
|
17
|
+
const { chain } = Dsl.disposeWith(this);
|
|
18
|
+
this.enableWhile(chain(condition).isFalsey());
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
enableWhile(condition) {
|
|
22
|
+
this._editingEnabled.setDelegate(condition);
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
get validators() {
|
|
26
|
+
return this._validators.readonly;
|
|
27
|
+
}
|
|
28
|
+
validateUsing(validator) {
|
|
29
|
+
this._validators.push(validator);
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
;
|
|
33
|
+
isEditing() {
|
|
34
|
+
return this.editing.value;
|
|
35
|
+
}
|
|
36
|
+
cancelEdit() {
|
|
37
|
+
this.editing.value = false;
|
|
38
|
+
}
|
|
39
|
+
startEditing() {
|
|
40
|
+
this.editing.value = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
(function (InlineEditorModel) {
|
|
44
|
+
function create(valueModel, options) {
|
|
45
|
+
return new InlineEditorModel(valueModel, options.save);
|
|
46
|
+
}
|
|
47
|
+
InlineEditorModel.create = create;
|
|
48
|
+
})(InlineEditorModel || (InlineEditorModel = {}));
|
|
49
|
+
TrackExternal.oneTimeBinding(InlineEditorModel);
|
|
50
|
+
//# sourceMappingURL=inline-editor-model.js.map
|
package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-editor-model.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-editor-model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,GAAG,EACH,gBAAgB,EAEhB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EAGd,MAAM,gBAAgB,CAAC;AAIxB,MAAM,OAAO,iBAAqB,SAAQ,gBAAgB;IAMxD,YAAqB,UAAyB,EAAW,YAA+C;QACtG,KAAK,EAAE,CAAC;QADW,eAAU,GAAV,UAAU,CAAe;QAAW,iBAAY,GAAZ,YAAY,CAAmC;QAJ/F,YAAO,GAAG,IAAI,iBAAiB,CAAU,KAAK,CAAC,CAAC;QACxC,gBAAW,GAAmC,IAAI,gBAAgB,EAAgB,CAAC;QAC5F,oBAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,oBAAoB,EAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAIvG,MAAM,EAAE,IAAI,E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AC,EARgB,iBAAiB,KAAjB,iBAAiB,QAQjC;AAED,aAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n DelegatingValueModel,\n Dsl,\n GarbageCollector,\n ListModel,\n MutableListModel,\n MutableValueModel,\n TrackExternal,\n Validator,\n ValueModel\n} from '@coolon/pectin';\nimport { EditContext } from '../edit-context';\n\n\nexport class InlineEditorModel<T> extends GarbageCollector {\n\n readonly editing = new MutableValueModel<boolean>(false);\n private readonly _validators: MutableListModel<Validator<T>> = new MutableListModel<Validator<T>>();\n private _editingEnabled = this.registerDisposable(new DelegatingValueModel<boolean>().withDefault(true));\n\n constructor(readonly valueModel: ValueModel<T>, readonly saveCallback: InlineEditorModel.SaveCallback<T>) {\n super();\n const { when } = Dsl.disposeWith(this);\n when(this.editingEnabled).becomesFalsey(() => this.cancelEdit());\n }\n\n get editingEnabled(): ValueModel<boolean> {\n return this._editingEnabled.readonly;\n }\n\n disableWhile(condition: ValueModel<boolean>): this {\n const { chain } = Dsl.disposeWith(this);\n this.enableWhile(chain(condition).isFalsey());\n return this;\n }\n\n enableWhile(condition: ValueModel<boolean>): this {\n this._editingEnabled.setDelegate(condition);\n return this;\n }\n\n get validators(): ListModel<Validator<T>> {\n return this._validators.readonly;\n }\n\n validateUsing(validator: Validator<T>): this { //}, options?: HasValidators.Options): this {\n this._validators.push(validator);\n return this;\n };\n\n\n isEditing(): boolean {\n return this.editing.value;\n }\n\n cancelEdit() {\n this.editing.value = false;\n }\n\n startEditing() {\n this.editing.value = true;\n }\n\n}\n\nexport namespace InlineEditorModel {\n\n export type SaveCallback<T> = (value: T, context: EditContext<T>) => void | Promise<void>;\n\n export function create<T>(valueModel: ValueModel<T>, options: { save: SaveCallback<T> }): InlineEditorModel<T> {\n return new InlineEditorModel<T>(valueModel, options.save);\n }\n\n}\n\nTrackExternal.oneTimeBinding(InlineEditorModel);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InlineEditorModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":14,"character":42},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@coolon/pectin","name":"ValueModel","line":20,"character":35,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"}}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InlineEditorModel"},"member":"SaveCallback","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":104,"context":{"typeName":"T"}}]}]}],"disableWhile":[{"__symbolic":"method"}],"enableWhile":[{"__symbolic":"method"}],"validateUsing":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}],"cancelEdit":[{"__symbolic":"method"}],"startEditing":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { __awaiter, __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
3
|
+
import { Command, DelegatingValueModel, Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
|
|
4
|
+
import { lang } from '@coolon/typescript-utilities';
|
|
5
|
+
import * as _ from 'lodash';
|
|
6
|
+
import { DisposableComponent } from '../../../../components/disposable-component';
|
|
7
|
+
import { InteractionService } from '../../../services/interaction.service';
|
|
8
|
+
import { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';
|
|
9
|
+
import { InputActivity } from '../../input-activities/input-activity';
|
|
10
|
+
import { StringInputActivity } from '../../input-activities/string-input-activity';
|
|
11
|
+
import { InlineEditorModel } from './inline-editor-model';
|
|
12
|
+
/**
|
|
13
|
+
* @example
|
|
14
|
+
* const source: ValueModel<string> = ...;
|
|
15
|
+
* const model = InlineEditorModel.create(source, {
|
|
16
|
+
* save(updated:string, context: EditContext) => {
|
|
17
|
+
* try {
|
|
18
|
+
* try and save the thing...
|
|
19
|
+
* } catch(error) {
|
|
20
|
+
* context.injectError(error)
|
|
21
|
+
* }
|
|
22
|
+
* }).validateUsing(Validator.present("We'll need a value");
|
|
23
|
+
*
|
|
24
|
+
* # in the view
|
|
25
|
+
* <aup-inline-string-editor
|
|
26
|
+
* label="My field"
|
|
27
|
+
* placeHolder="I'm ready for a string..."
|
|
28
|
+
* [editorModel]="model"></aup-inline-string-editor>
|
|
29
|
+
*/
|
|
30
|
+
export class InlineStringEditorComponent extends DisposableComponent {
|
|
31
|
+
constructor(interactionService) {
|
|
32
|
+
super();
|
|
33
|
+
this.editingEnabled = this.registerDisposable(new DelegatingValueModel());
|
|
34
|
+
const { chain, when, valueOf } = Dsl.disposeWith(this);
|
|
35
|
+
const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
|
|
36
|
+
const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
|
|
37
|
+
return Object.assign(Object.assign({}, InlineStringEditorComponent.DEFAULT_FACES), userFaces);
|
|
38
|
+
}, { allowNil: true });
|
|
39
|
+
this.editFaceModel = resolvedFacesModel.pluck('edit');
|
|
40
|
+
this.saveFace = resolvedFacesModel.pluck('save');
|
|
41
|
+
this.cancelFace = resolvedFacesModel.pluck('cancel');
|
|
42
|
+
const self = this;
|
|
43
|
+
this.editCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
this.editorModel.editing.value = true;
|
|
45
|
+
try {
|
|
46
|
+
yield this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
// don't care if they cancelled, just hiding the console errors
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
this.editorModel.editing.value = false;
|
|
53
|
+
}
|
|
54
|
+
})).enableWhile(this.editingEnabled);
|
|
55
|
+
this.onDispose(() => this.cancelEdit());
|
|
56
|
+
}
|
|
57
|
+
ngOnInit() {
|
|
58
|
+
// our editor model is a one time binding without delegates so we can only
|
|
59
|
+
// use it once we've been initialised
|
|
60
|
+
const { chain, when, valueOf } = Dsl.disposeWith(this);
|
|
61
|
+
if (!this.editorModel) {
|
|
62
|
+
lang.illegalState('editorModel is required');
|
|
63
|
+
}
|
|
64
|
+
this.editingEnabled.setDelegate(this.editorModel.editingEnabled);
|
|
65
|
+
when(this.editorModel.editing).becomesTruthy(() => {
|
|
66
|
+
this.editCommand.execute();
|
|
67
|
+
}, { asLongAs: this.editCommand.enabled });
|
|
68
|
+
when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
|
|
69
|
+
this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
|
|
70
|
+
// deviceDescription.isNil()
|
|
71
|
+
).areTruthy();
|
|
72
|
+
this.displayValue = chain(this.editorModel.valueModel).map(v => {
|
|
73
|
+
return _.isEmpty(v) ? this.placeHolderModel.value : v;
|
|
74
|
+
}, { dependsOn: this.placeHolderModel, allowNil: true });
|
|
75
|
+
}
|
|
76
|
+
createInputActivityData() {
|
|
77
|
+
const self = this;
|
|
78
|
+
return {
|
|
79
|
+
initialValue: self.editorModel.valueModel.value,
|
|
80
|
+
buttonStyle: { confirm: self.saveFace.value, cancel: self.cancelFace.value },
|
|
81
|
+
placeholder: self.placeHolderModel.value,
|
|
82
|
+
label: self.label,
|
|
83
|
+
layout: InputActivity.Layout.INLINE,
|
|
84
|
+
validators: self.editorModel.validators.value,
|
|
85
|
+
save(value, inputContext) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
yield self.editorModel.saveCallback(value, inputContext);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
cancelEdit() {
|
|
93
|
+
if (this.isEditing()) {
|
|
94
|
+
this.interactionContext.cancelActiveActivity();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
startEdit() {
|
|
98
|
+
if (!this.isEditing() && this.editCommand.enabled.value) {
|
|
99
|
+
this.editCommand.execute();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
isEditing() {
|
|
103
|
+
return this.interactionContext.isActive();
|
|
104
|
+
}
|
|
105
|
+
isEmpty() {
|
|
106
|
+
return this.empty.value;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
InlineStringEditorComponent.decorators = [
|
|
110
|
+
{ type: Component, args: [{
|
|
111
|
+
selector: 'aup-inline-string-editor',
|
|
112
|
+
template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
|
|
113
|
+
},] }
|
|
114
|
+
];
|
|
115
|
+
InlineStringEditorComponent.ctorParameters = () => [
|
|
116
|
+
{ type: InteractionService }
|
|
117
|
+
];
|
|
118
|
+
InlineStringEditorComponent.propDecorators = {
|
|
119
|
+
editorModel: [{ type: Input }],
|
|
120
|
+
facesModel: [{ type: Input }],
|
|
121
|
+
faces: [{ type: Input }],
|
|
122
|
+
interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent,] }],
|
|
123
|
+
label: [{ type: Input }],
|
|
124
|
+
placeHolder: [{ type: Input }],
|
|
125
|
+
placeHolderModel: [{ type: Input }]
|
|
126
|
+
};
|
|
127
|
+
__decorate([
|
|
128
|
+
TrackExternal(),
|
|
129
|
+
__metadata("design:type", InlineEditorModel)
|
|
130
|
+
], InlineStringEditorComponent.prototype, "editorModel", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
TrackExternal(),
|
|
133
|
+
__metadata("design:type", ValueModel)
|
|
134
|
+
], InlineStringEditorComponent.prototype, "facesModel", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
StoreInValueModel('facesModel'),
|
|
137
|
+
__metadata("design:type", Object)
|
|
138
|
+
], InlineStringEditorComponent.prototype, "faces", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
StoreInValueModel('placeHolderModel'),
|
|
141
|
+
__metadata("design:type", String)
|
|
142
|
+
], InlineStringEditorComponent.prototype, "placeHolder", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
TrackExternal(),
|
|
145
|
+
__metadata("design:type", ValueModel)
|
|
146
|
+
], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
|
|
147
|
+
(function (InlineStringEditorComponent) {
|
|
148
|
+
InlineStringEditorComponent.DEFAULT_FACES = {
|
|
149
|
+
edit: {
|
|
150
|
+
icon: () => 'mat:edit'
|
|
151
|
+
},
|
|
152
|
+
save: {
|
|
153
|
+
icon: () => 'mat:check'
|
|
154
|
+
},
|
|
155
|
+
cancel: {
|
|
156
|
+
icon: () => 'mat:clear'
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
})(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
|
|
160
|
+
//# sourceMappingURL=inline-string-editor.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-string-editor.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,KAAK,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAEL,OAAO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input, OnInit, ViewChild } from '@angular/core';\nimport {\n BooleanValueModelChain,\n Command, DelegatingValueModel,\n Dsl,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport * as _ from 'lodash';\nimport { CommandFace } from '../../../../components/commands/command-face';\nimport { DisposableComponent } from '../../../../components/disposable-component';\nimport { InteractionService } from '../../../services/interaction.service';\nimport { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';\nimport { InputActivity } from '../../input-activities/input-activity';\nimport { StringInputActivity } from '../../input-activities/string-input-activity';\nimport { InlineEditorModel } from './inline-editor-model';\n\n/**\n * @example\n * const source: ValueModel<string> = ...;\n * const model = InlineEditorModel.create(source, {\n * save(updated:string, context: EditContext) => {\n * try {\n * try and save the thing...\n * } catch(error) {\n * context.injectError(error)\n * }\n * }).validateUsing(Validator.present(\"We'll need a value\");\n *\n * # in the view\n * <aup-inline-string-editor\n * label=\"My field\"\n * placeHolder=\"I'm ready for a string...\"\n * [editorModel]=\"model\"></aup-inline-string-editor>\n */\n@Component({\n selector: 'aup-inline-string-editor',\n templateUrl: './inline-string-editor.component.html',\n styleUrls: [] // See assets/interaction/editor/inline-string-editor.scss\n})\nexport class InlineStringEditorComponent extends DisposableComponent implements OnInit {\n\n @Input()\n @TrackExternal()\n editorModel: InlineEditorModel<string>;\n\n @Input()\n @TrackExternal()\n facesModel: ValueModel<InlineStringEditorComponent.Faces>;\n\n @Input()\n @StoreInValueModel('facesModel')\n faces: InlineStringEditorComponent.Faces;\n\n @ViewChild(InPlaceInteractionContextComponent)\n interactionContext: InPlaceInteractionContextComponent<any, any, any>;\n\n @Input()\n label: string;\n\n @Input()\n @StoreInValueModel('placeHolderModel')\n placeHolder: string;\n\n @Input()\n @TrackExternal()\n placeHolderModel: ValueModel<string>;\n\n readonly description: ValueModelChain<string>;\n empty: BooleanValueModelChain;\n readonly editCommand: Command<void>;\n\n displayValue: ValueModelChain<string>;\n readonly editFaceModel: ValueModelChain<CommandFace>;\n readonly saveFace: ValueModelChain<CommandFace>;\n readonly cancelFace: ValueModelChain<CommandFace>;\n\n readonly editingEnabled = this.registerDisposable(new DelegatingValueModel<boolean>());\n\n constructor(interactionService: InteractionService) {\n super();\n const { chain, when, valueOf } = Dsl.disposeWith(this);\n const modalIC = interactionService.createModalInteractionContextDisposedWith(this);\n\n const resolvedFacesModel = chain(this.facesModel).map(userFaces => {\n return {\n ...InlineStringEditorComponent.DEFAULT_FACES, // todo: should really inject app wide defaults as well\n ...userFaces\n };\n }, { allowNil: true });\n\n this.editFaceModel = resolvedFacesModel.pluck('edit');\n this.saveFace = resolvedFacesModel.pluck('save');\n this.cancelFace = resolvedFacesModel.pluck('cancel');\n\n const self = this;\n this.editCommand = Command.create(async () => {\n this.editorModel.editing.value = true;\n try {\n await this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());\n } catch (e) {\n // don't care if they cancelled, just hiding the console errors\n } finally {\n this.editorModel.editing.value = false;\n }\n }).enableWhile(this.editingEnabled);\n\n this.onDispose(() => this.cancelEdit());\n\n }\n\n\n ngOnInit(): void {\n // our editor model is a one time binding without delegates so we can only\n // use it once we've been initialised\n const { chain, when, valueOf } = Dsl.disposeWith(this);\n\n if (!this.editorModel) {\n lang.illegalState('editorModel is required');\n }\n\n this.editingEnabled.setDelegate(this.editorModel.editingEnabled);\n\n when(this.editorModel.editing).becomesTruthy(() => {\n this.editCommand.execute();\n }, { asLongAs: this.editCommand.enabled });\n\n when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());\n\n this.empty = valueOf.any(\n chain.stringValue(this.editorModel.valueModel).isBlank()\n // deviceDescription.isNil()\n ).areTruthy();\n\n this.displayValue = chain(this.editorModel.valueModel).map(v => {\n return _.isEmpty(v) ? this.placeHolderModel.value : v;\n }, { dependsOn: this.placeHolderModel, allowNil: true });\n\n }\n\n\n private createInputActivityData(): InputActivity.Data<string> {\n const self = this;\n return {\n initialValue: self.editorModel.valueModel.value,\n buttonStyle: { confirm: self.saveFace.value, cancel: self.cancelFace.value },\n placeholder: self.placeHolderModel.value,\n label: self.label,\n layout: InputActivity.Layout.INLINE,\n validators: self.editorModel.validators.value,\n async save(value: string, inputContext: InputActivity.Context): Promise<void> {\n await self.editorModel.saveCallback(value, inputContext);\n }\n };\n }\n\n cancelEdit() {\n if (this.isEditing()) {\n this.interactionContext.cancelActiveActivity();\n }\n }\n\n startEdit() {\n if (!this.isEditing() && this.editCommand.enabled.value) {\n this.editCommand.execute();\n }\n }\n\n private isEditing() {\n return this.interactionContext.isActive();\n }\n\n isEmpty(): boolean {\n return this.empty.value;\n }\n\n\n}\n\nexport namespace InlineStringEditorComponent {\n\n export interface Faces {\n edit?: CommandFace;\n save?: CommandFace;\n cancel?: CommandFace;\n }\n\n export const DEFAULT_FACES: Faces = {\n edit: {\n icon: () => 'mat:edit'\n },\n save: {\n icon: () => 'mat:check'\n },\n cancel: {\n icon: () => 'mat:clear'\n }\n };\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InlineStringEditorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../../components/disposable-component","name":"DisposableComponent","line":43,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":38,"character":1},"arguments":[{"selector":"aup-inline-string-editor","styleUrls":[],"template":"<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"}]}],"members":{"editorModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":46,"character":3}}]}],"facesModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":50,"character":3}}]}],"faces":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":54,"character":3},"arguments":["facesModel"]}]}],"interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":57,"character":3},"arguments":[{"__symbolic":"reference","module":"../../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":57,"character":13}]}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"placeHolder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":64,"character":3},"arguments":["placeHolderModel"]}]}],"placeHolderModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":68,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../../services/interaction.service","name":"InteractionService","line":82,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"createInputActivityData":[{"__symbolic":"method"}],"cancelEdit":[{"__symbolic":"method"}],"startEdit":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}],"isEmpty":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-string-editor.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Inject, Input, Optional, ViewChild } from '@angular/core';
|
|
1
|
+
import { Component, HostBinding, Inject, Input, Optional, ViewChild } from '@angular/core';
|
|
2
2
|
import { MAT_TABS_CONFIG } from '@angular/material/tabs';
|
|
3
3
|
import { DisposableComponent } from '../../../components/disposable-component';
|
|
4
4
|
import { InteractionService } from '../../services/interaction.service';
|
|
@@ -29,6 +29,9 @@ export class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
29
29
|
var _a;
|
|
30
30
|
return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : '0ms';
|
|
31
31
|
}
|
|
32
|
+
get active() {
|
|
33
|
+
return this.isActive();
|
|
34
|
+
}
|
|
32
35
|
ngAfterViewInit() {
|
|
33
36
|
this.interactionService.registerInplaceInteractionContext(this);
|
|
34
37
|
}
|
|
@@ -73,6 +76,7 @@ InPlaceInteractionContextComponent.ctorParameters = () => [
|
|
|
73
76
|
];
|
|
74
77
|
InPlaceInteractionContextComponent.propDecorators = {
|
|
75
78
|
activityContainerComponent: [{ type: ViewChild, args: ['activityContainer', { static: true },] }],
|
|
76
|
-
animateFirstActivity: [{ type: Input }]
|
|
79
|
+
animateFirstActivity: [{ type: Input }],
|
|
80
|
+
active: [{ type: HostBinding, args: ["class.active",] }]
|
|
77
81
|
};
|
|
78
82
|
//# sourceMappingURL=in-place-interaction-context.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-place-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"in-place-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,kCAA4C,SAAQ,mBAAmB;IAqBlF,YAAqB,kBAAsC,EAAwD,SAAwB;QACzI,KAAK,EAAE,CAAC;QADW,uBAAkB,GAAlB,kBAAkB,CAAoB;QAAwD,cAAS,GAAT,SAAS,CAAe;QAhB3I;;;WAGG;QAEH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,EAAE,IAAS,EAAE,OAAoC;QAC1H,OAAO,IAAI,CAAC,0BAA0B,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;;;YApEF,SAAS,SAAC;gBACT,QAAQ,EAAE,kCAAkC;gBAC5C,oXAA4D;;aAE7D;;;YAlBQ,kBAAkB;4CAwCqC,MAAM,SAAC,eAAe,cAAG,QAAQ;;;yCAnB9F,SAAS,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;mCAO/C,KAAK;qBAOL,WAAW,SAAC,cAAc","sourcesContent":["import { AfterViewInit, Component, HostBinding, Inject, Input, Optional, ViewChild } from '@angular/core';\nimport { MAT_TABS_CONFIG, MatTabsConfig } from '@angular/material/tabs';\nimport { Constructable } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { Alert } from '../../alert';\nimport { Confirm } from '../../confirm';\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityContainerComponent } from '../activity-container/activity-container.component';\n\n/**\n * @example\n * <aup-in-place-interaction-context #inPlaceInteractionContext>\n * </aup-in-place-interaction-context>\n *\n * in your component\n * @ViewChild('inPlaceInteractionContext', { static: true })\n * interactionContext: InteractionContext;\n *\n *\n */\n@Component({\n selector: 'aup-in-place-interaction-context',\n templateUrl: './in-place-interaction-context.component.html',\n styleUrls: ['./in-place-interaction-context.component.scss']\n})\nexport class InPlaceInteractionContextComponent<D, R, E> extends DisposableComponent implements InteractionContext, AfterViewInit {\n\n @ViewChild('activityContainer', { static: true })\n activityContainerComponent: ActivityContainerComponent<any, any, any>;\n\n /**\n * If true then the first startActivity call will slide the activity into view. If false\n * the activity will replace the existing content immediately.\n */\n @Input()\n animateFirstActivity = true;\n\n get animationDuration(): string {\n return this.animateFirstActivity ? (this.tabConfig?.animationDuration || '500ms') : '0ms';\n }\n\n @HostBinding(\"class.active\")\n get active() {\n return this.isActive();\n }\n\n constructor(readonly interactionService: InteractionService, @Inject(MAT_TABS_CONFIG) @Optional() private readonly tabConfig: MatTabsConfig) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.interactionService.registerInplaceInteractionContext(this);\n }\n\n initialise(id: string, api: InteractionService.Api) {\n this.activityContainerComponent.initialise(id, api);\n }\n\n get identifier() {\n return this.activityContainerComponent.identifier;\n }\n\n alert(alert: Alert): Promise<void> {\n return this.activityContainerComponent.alert(alert);\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.activityContainerComponent.cancelActiveActivity();\n }\n\n confirm(confirm: Confirm): Promise<boolean> {\n return this.activityContainerComponent.confirm(confirm);\n }\n\n confirmOrReject(confirm: Confirm): Promise<void> {\n return this.activityContainerComponent.confirmOrReject(confirm);\n }\n\n confirmThen<D1, R1, E1>(confirm: Confirm, activityType: Constructable<Activity<D1, R1, E1>>, data?: D1): Promise<R1> {\n return this.activityContainerComponent.confirmThen(confirm, activityType);\n }\n\n isActive(): boolean {\n return this.activityContainerComponent.isActive();\n }\n\n startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1> {\n return this.activityContainerComponent.startActivity(activityType, data, options);\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":44,"character":3},"arguments":["class.active"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":64},"arguments":[{"__symbolic":"reference","module":"@angular/material/tabs","name":"MAT_TABS_CONFIG","line":49,"character":71}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":49,"character":89}}]],"parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":49,"character":43},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsConfig","line":49,"character":128}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"alert":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"confirm":[{"__symbolic":"method"}],"confirmOrReject":[{"__symbolic":"method"}],"confirmThen":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"startActivity":[{"__symbolic":"method"}]}}}}]
|