@coolon/angular-ui-powerups 2.0.0-alpha.9 → 2.0.1
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/CHANGELOG.md +207 -0
- package/assets/commands.scss +3 -0
- package/assets/icons.scss +30 -0
- package/assets/interaction.scss +5 -0
- package/assets/styles.scss +2 -0
- package/assets/tabs.scss +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +1537 -277
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +46 -34
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +44 -32
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +61 -0
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -0
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js +92 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/command-face.js +112 -0
- package/esm2015/lib/components/commands/command-face.js.map +1 -0
- package/esm2015/lib/components/commands/command-face.metadata.json +1 -0
- package/esm2015/lib/components/commands/flex.component.js +30 -0
- package/esm2015/lib/components/commands/flex.component.js.map +1 -0
- package/esm2015/lib/components/commands/flex.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/flex.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js +47 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +55 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +39 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group.js +100 -0
- package/esm2015/lib/components/commands/group/command-group.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/more-menu.component.js +55 -0
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.js +65 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/registration.js +58 -0
- package/esm2015/lib/components/commands/group/registration.js.map +1 -0
- package/esm2015/lib/components/commands/group/registration.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +55 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/group/view-data.js +104 -0
- package/esm2015/lib/components/commands/group/view-data.js.map +1 -0
- package/esm2015/lib/components/commands/group/view-data.metadata.json +1 -0
- package/esm2015/lib/components/commands/separator.component.js +35 -0
- package/esm2015/lib/components/commands/separator.component.js.map +1 -0
- package/esm2015/lib/components/commands/separator.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/separator.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/components.module.js +38 -15
- 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/forms/abstract-input.component.js +12 -4
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +27 -14
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +23 -13
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +7 -1
- 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.js.map +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 -10
- 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/number-input/number-input.component.js +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-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 +3 -3
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +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.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/icon/icon.component.js +17 -4
- package/esm2015/lib/components/icon/icon.component.js.map +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +16 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js +44 -2
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.js +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +1 -0
- package/esm2015/lib/components/table/table-model.js +10 -7
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +73 -0
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table.component.js +1 -1
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/track-by.js +5 -0
- package/esm2015/lib/components/track-by.js.map +1 -0
- package/esm2015/lib/interaction/activity-ref.js +10 -2
- package/esm2015/lib/interaction/activity-ref.js.map +1 -1
- package/esm2015/lib/interaction/activity-ref.metadata.json +1 -1
- package/esm2015/lib/interaction/activity.js +18 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +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 +24 -17
- 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.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +4 -3
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +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.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +56 -16
- 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 +2 -2
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +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.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/place-component.js +13 -1
- 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 +2 -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.js +3 -3
- package/esm2015/lib/place/place.module.js.map +1 -1
- package/esm2015/lib/place/place.module.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +2 -3
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +44 -32
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/components/commands/command/command.component.js +64 -0
- package/esm5/lib/components/commands/command/command.component.js.map +1 -0
- package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js +123 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/command-face.js +145 -0
- package/esm5/lib/components/commands/command-face.js.map +1 -0
- package/esm5/lib/components/commands/flex.component.js +33 -0
- package/esm5/lib/components/commands/flex.component.js.map +1 -0
- package/esm5/lib/components/commands/flex.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group/command-group.component.js +51 -0
- package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +59 -0
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +42 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group.js +122 -0
- package/esm5/lib/components/commands/group/command-group.js.map +1 -0
- package/esm5/lib/components/commands/group/more-menu.component.js +58 -0
- package/esm5/lib/components/commands/group/more-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/popup-menu.component.js +68 -0
- package/esm5/lib/components/commands/group/popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/registration.js +80 -0
- package/esm5/lib/components/commands/group/registration.js.map +1 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +58 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/group/view-data.js +131 -0
- package/esm5/lib/components/commands/group/view-data.js.map +1 -0
- package/esm5/lib/components/commands/separator.component.js +37 -0
- package/esm5/lib/components/commands/separator.component.js.map +1 -0
- package/esm5/lib/components/commands/separator.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/components.module.js +38 -15
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +12 -4
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +27 -14
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +23 -13
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +7 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +2 -10
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +2 -2
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/icon/icon.component.js +15 -3
- package/esm5/lib/components/icon/icon.component.js.map +1 -1
- package/esm5/lib/components/index.js +16 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +45 -2
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js +1 -0
- package/esm5/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/esm5/lib/components/table/table-model.js +10 -8
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +63 -0
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/components/track-by.js +5 -0
- package/esm5/lib/components/track-by.js.map +1 -0
- package/esm5/lib/interaction/activity-ref.js +14 -2
- package/esm5/lib/interaction/activity-ref.js.map +1 -1
- package/esm5/lib/interaction/activity.js +27 -1
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +24 -17
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +4 -3
- package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +56 -16
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
- package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/place-component.js +17 -1
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +2 -8
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.module.js +3 -3
- package/esm5/lib/place/place.module.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +2 -3
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +1290 -214
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1468 -227
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +22 -0
- package/lib/components/commands/command-face/command-face.component.d.ts +34 -0
- package/lib/components/commands/command-face.d.ts +40 -0
- package/lib/components/commands/flex.component.d.ts +11 -0
- package/lib/components/commands/group/command-group/command-group.component.d.ts +11 -0
- package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +21 -0
- package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +13 -0
- package/lib/components/commands/group/command-group.d.ts +41 -0
- package/lib/components/commands/group/more-menu.component.d.ts +14 -0
- package/lib/components/commands/group/popup-menu.component.d.ts +17 -0
- package/lib/components/commands/group/registration.d.ts +32 -0
- package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +13 -0
- package/lib/components/commands/group/view-data.d.ts +40 -0
- package/lib/components/commands/separator.component.d.ts +12 -0
- package/lib/components/forms/abstract-input.component.d.ts +8 -2
- package/lib/components/forms/abstract-list-input.component.d.ts +4 -3
- package/lib/components/forms/abstract-value-input.component.d.ts +4 -3
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +3 -0
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +1 -3
- package/lib/components/forms/select-input/select-input.component.d.ts +1 -1
- package/lib/components/icon/icon.component.d.ts +15 -0
- package/lib/components/index.d.ts +17 -0
- package/lib/components/table/column-model.d.ts +15 -17
- package/lib/components/table/mutable-cell-renderer.d.ts +6 -0
- package/lib/components/table/table-model.d.ts +7 -3
- package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +26 -0
- package/lib/components/track-by.d.ts +3 -0
- package/lib/interaction/activity-ref.d.ts +3 -0
- package/lib/interaction/activity.d.ts +6 -2
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +4 -2
- package/lib/place/components/abstract-place-navigation.component.d.ts +2 -2
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +8 -2
- package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
- package/lib/place/place-component.d.ts +6 -0
- package/package.json +7 -5
- package/schematics/bootstrap-app/index.d.ts +3 -0
- package/schematics/bootstrap-app/index.js +81 -0
- package/schematics/bootstrap-app/index.js.map +1 -0
- package/schematics/bootstrap-app/schema.d.ts +3 -0
- package/schematics/bootstrap-app/schema.js +3 -0
- package/schematics/bootstrap-app/schema.js.map +1 -0
- package/schematics/bootstrap-app/schema.json +19 -0
- package/schematics/bootstrap-app/templates/app/app-routing.module.ts +19 -0
- package/schematics/bootstrap-app/templates/app/auth/auth.guard.spec.ts +15 -0
- package/schematics/bootstrap-app/templates/app/auth/auth.guard.ts +23 -0
- package/schematics/bootstrap-app/templates/app/auth/auth.module.ts +13 -0
- package/schematics/bootstrap-app/templates/app/auth/auth.service.ts +13 -0
- package/schematics/bootstrap-app/templates/app/i18n.ts +9 -0
- package/schematics/bootstrap-app/templates/app/places/home/home.component.html +1 -0
- package/schematics/bootstrap-app/templates/app/places/home/home.component.scss +4 -0
- package/schematics/bootstrap-app/templates/app/places/home/home.component.spec.ts +25 -0
- package/schematics/bootstrap-app/templates/app/places/home/home.component.ts +25 -0
- package/schematics/bootstrap-app/templates/app/places/place-routes.ts +3 -0
- package/schematics/bootstrap-app/templates/app/places/places.json5 +3 -0
- package/schematics/bootstrap-app/templates/i18n/config.json +9 -0
- package/schematics/bootstrap-app/templates/i18n/notifications.yml +19 -0
- package/schematics/bootstrap-app/templates/i18n/places/home.yml +6 -0
- package/schematics/collection.json +10 -1
- package/schematics/ng-add/index.d.ts +1 -0
- package/schematics/ng-add/index.js +27 -4
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/package-util.d.ts +13 -0
- package/schematics/package-util.js +60 -0
- package/schematics/package-util.js.map +1 -0
- package/schematics/place-add/index.d.ts +3 -0
- package/schematics/place-add/index.js +26 -0
- package/schematics/place-add/index.js.map +1 -0
- package/schematics/place-add/schema.d.ts +2 -0
- package/schematics/place-add/schema.js +3 -0
- package/schematics/place-add/schema.js.map +1 -0
- package/schematics/place-add/schema.json +8 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('lodash'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', '
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.ng.material.tooltip, global.angularFontawesome, global.freeSolidSvgIcons, global.pectin, global.___default, global.
|
|
5
|
-
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, scrolling, autocomplete, button, checkbox, icon, table, tooltip, angularFontawesome, freeSolidSvgIcons, pectin, ___default,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/divider'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('lodash'), require('typescript-string-enums'), require('@coolon/typescript-utilities'), require('immer'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('resize-observer-polyfill'), require('@angular/material/list'), require('@angular/material/progress-spinner'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/divider', '@angular/material/icon', '@angular/material/menu', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', '@typescript-plus/fast-memoize-decorator/dist/src', 'lodash', 'typescript-string-enums', '@coolon/typescript-utilities', 'immer', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', 'resize-observer-polyfill', '@angular/material/list', '@angular/material/progress-spinner', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'rxjs'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.divider, global.ng.material.icon, global.ng.material.menu, global.ng.material.table, global.ng.material.tooltip, global.angularFontawesome, global.freeSolidSvgIcons, global.pectin, global.src, global.___default, global.typescriptStringEnums, global.typescriptUtilities, global.produce, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ResizeObserver, global.ng.material.list, global.ng.material.progressSpinner, global.fastMemoizeDecorator, null, global.ng.animations, global.rxjs));
|
|
5
|
+
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, scrolling, autocomplete, button, checkbox, divider, icon, menu, table, tooltip, angularFontawesome, freeSolidSvgIcons, pectin, src, ___default, typescriptStringEnums, typescriptUtilities, produce, flexLayout, dialog, router, overlay, ResizeObserver, list, progressSpinner, fastMemoizeDecorator, reflectMetadata, animations$1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
8
|
produce = produce && Object.prototype.hasOwnProperty.call(produce, 'default') ? produce['default'] : produce;
|
|
@@ -578,13 +578,1005 @@
|
|
|
578
578
|
core.Component({
|
|
579
579
|
selector: 'aup-card-container',
|
|
580
580
|
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-icon icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
|
|
581
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;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:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container: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)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
581
|
+
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--aup-command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.activity-outlet-wrapper{display:flex;flex-direction:column;align-items:stretch}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;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:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container: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)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
582
582
|
}),
|
|
583
583
|
__metadata("design:paramtypes", [])
|
|
584
584
|
], CardContainerComponent);
|
|
585
585
|
return CardContainerComponent;
|
|
586
586
|
}(DisposableComponent));
|
|
587
587
|
|
|
588
|
+
|
|
589
|
+
(function (TrackBy) {
|
|
590
|
+
TrackBy.byIndex = function (data, index) { return index; };
|
|
591
|
+
})(exports.TrackBy || (exports.TrackBy = {}));
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
(function (CommandFace) {
|
|
595
|
+
var Position;
|
|
596
|
+
(function (Position) {
|
|
597
|
+
Position["START"] = "start";
|
|
598
|
+
Position["END"] = "end";
|
|
599
|
+
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
600
|
+
CommandFace.Style = typescriptStringEnums.Enum({
|
|
601
|
+
FLAT: 'flat',
|
|
602
|
+
STROKED: 'stroked',
|
|
603
|
+
RAISED: 'raised'
|
|
604
|
+
});
|
|
605
|
+
function getColorOf(face) {
|
|
606
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
|
|
607
|
+
}
|
|
608
|
+
CommandFace.getColorOf = getColorOf;
|
|
609
|
+
function getStyleOf(face) {
|
|
610
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
|
|
611
|
+
}
|
|
612
|
+
CommandFace.getStyleOf = getStyleOf;
|
|
613
|
+
function getIconOf(face) {
|
|
614
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
615
|
+
}
|
|
616
|
+
CommandFace.getIconOf = getIconOf;
|
|
617
|
+
function getIconPositionOf(face) {
|
|
618
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.iconPosition) ? face.iconPosition() : undefined;
|
|
619
|
+
}
|
|
620
|
+
CommandFace.getIconPositionOf = getIconPositionOf;
|
|
621
|
+
function getTooltipOf(face) {
|
|
622
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
623
|
+
}
|
|
624
|
+
CommandFace.getTooltipOf = getTooltipOf;
|
|
625
|
+
function getTextOf(face) {
|
|
626
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
|
|
627
|
+
}
|
|
628
|
+
CommandFace.getTextOf = getTextOf;
|
|
629
|
+
var Adapter = /** @class */ (function () {
|
|
630
|
+
function Adapter(face) {
|
|
631
|
+
this.face = face;
|
|
632
|
+
}
|
|
633
|
+
Object.defineProperty(Adapter.prototype, "text", {
|
|
634
|
+
get: function () {
|
|
635
|
+
return CommandFace.getTextOf(this.face);
|
|
636
|
+
},
|
|
637
|
+
enumerable: true,
|
|
638
|
+
configurable: true
|
|
639
|
+
});
|
|
640
|
+
Object.defineProperty(Adapter.prototype, "icon", {
|
|
641
|
+
get: function () {
|
|
642
|
+
return CommandFace.getIconOf(this.face);
|
|
643
|
+
},
|
|
644
|
+
enumerable: true,
|
|
645
|
+
configurable: true
|
|
646
|
+
});
|
|
647
|
+
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
648
|
+
get: function () {
|
|
649
|
+
return CommandFace.getIconPositionOf(this.face);
|
|
650
|
+
},
|
|
651
|
+
enumerable: true,
|
|
652
|
+
configurable: true
|
|
653
|
+
});
|
|
654
|
+
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
655
|
+
get: function () {
|
|
656
|
+
return CommandFace.getTooltipOf(this.face);
|
|
657
|
+
},
|
|
658
|
+
enumerable: true,
|
|
659
|
+
configurable: true
|
|
660
|
+
});
|
|
661
|
+
Object.defineProperty(Adapter.prototype, "iconPositionStart", {
|
|
662
|
+
get: function () {
|
|
663
|
+
return this.iconPosition === CommandFace.Position.START;
|
|
664
|
+
},
|
|
665
|
+
enumerable: true,
|
|
666
|
+
configurable: true
|
|
667
|
+
});
|
|
668
|
+
Object.defineProperty(Adapter.prototype, "iconPositionEnd", {
|
|
669
|
+
get: function () {
|
|
670
|
+
return this.iconPosition === CommandFace.Position.END;
|
|
671
|
+
},
|
|
672
|
+
enumerable: true,
|
|
673
|
+
configurable: true
|
|
674
|
+
});
|
|
675
|
+
Object.defineProperty(Adapter.prototype, "color", {
|
|
676
|
+
get: function () {
|
|
677
|
+
return CommandFace.getColorOf(this.face);
|
|
678
|
+
},
|
|
679
|
+
enumerable: true,
|
|
680
|
+
configurable: true
|
|
681
|
+
});
|
|
682
|
+
Object.defineProperty(Adapter.prototype, "style", {
|
|
683
|
+
get: function () {
|
|
684
|
+
return CommandFace.getStyleOf(this.face);
|
|
685
|
+
},
|
|
686
|
+
enumerable: true,
|
|
687
|
+
configurable: true
|
|
688
|
+
});
|
|
689
|
+
__decorate([
|
|
690
|
+
src.Memoize(),
|
|
691
|
+
__metadata("design:type", Object),
|
|
692
|
+
__metadata("design:paramtypes", [])
|
|
693
|
+
], Adapter.prototype, "text", null);
|
|
694
|
+
__decorate([
|
|
695
|
+
src.Memoize(),
|
|
696
|
+
__metadata("design:type", Object),
|
|
697
|
+
__metadata("design:paramtypes", [])
|
|
698
|
+
], Adapter.prototype, "icon", null);
|
|
699
|
+
__decorate([
|
|
700
|
+
src.Memoize(),
|
|
701
|
+
__metadata("design:type", Object),
|
|
702
|
+
__metadata("design:paramtypes", [])
|
|
703
|
+
], Adapter.prototype, "iconPosition", null);
|
|
704
|
+
__decorate([
|
|
705
|
+
src.Memoize(),
|
|
706
|
+
__metadata("design:type", Object),
|
|
707
|
+
__metadata("design:paramtypes", [])
|
|
708
|
+
], Adapter.prototype, "tooltip", null);
|
|
709
|
+
__decorate([
|
|
710
|
+
src.Memoize(),
|
|
711
|
+
__metadata("design:type", Boolean),
|
|
712
|
+
__metadata("design:paramtypes", [])
|
|
713
|
+
], Adapter.prototype, "iconPositionStart", null);
|
|
714
|
+
__decorate([
|
|
715
|
+
src.Memoize(),
|
|
716
|
+
__metadata("design:type", Boolean),
|
|
717
|
+
__metadata("design:paramtypes", [])
|
|
718
|
+
], Adapter.prototype, "iconPositionEnd", null);
|
|
719
|
+
__decorate([
|
|
720
|
+
src.Memoize(),
|
|
721
|
+
__metadata("design:type", String),
|
|
722
|
+
__metadata("design:paramtypes", [])
|
|
723
|
+
], Adapter.prototype, "color", null);
|
|
724
|
+
__decorate([
|
|
725
|
+
src.Memoize(),
|
|
726
|
+
__metadata("design:type", String),
|
|
727
|
+
__metadata("design:paramtypes", [])
|
|
728
|
+
], Adapter.prototype, "style", null);
|
|
729
|
+
return Adapter;
|
|
730
|
+
}());
|
|
731
|
+
CommandFace.Adapter = Adapter;
|
|
732
|
+
})(exports.CommandFace || (exports.CommandFace = {}));
|
|
733
|
+
|
|
734
|
+
exports.ViewData = /** @class */ (function () {
|
|
735
|
+
function ViewData() {
|
|
736
|
+
}
|
|
737
|
+
return ViewData;
|
|
738
|
+
}());
|
|
739
|
+
(function (ViewData) {
|
|
740
|
+
var FaceData = /** @class */ (function (_super) {
|
|
741
|
+
__extends(FaceData, _super);
|
|
742
|
+
function FaceData(face) {
|
|
743
|
+
var _this = _super.call(this) || this;
|
|
744
|
+
_this.faceAdapter = new exports.CommandFace.Adapter(face);
|
|
745
|
+
return _this;
|
|
746
|
+
}
|
|
747
|
+
return FaceData;
|
|
748
|
+
}(ViewData));
|
|
749
|
+
ViewData.FaceData = FaceData;
|
|
750
|
+
var GroupData = /** @class */ (function (_super) {
|
|
751
|
+
__extends(GroupData, _super);
|
|
752
|
+
function GroupData(face, xPosition, yPosition, children) {
|
|
753
|
+
var _this = _super.call(this, face) || this;
|
|
754
|
+
_this.xPosition = xPosition;
|
|
755
|
+
_this.yPosition = yPosition;
|
|
756
|
+
_this.children = children;
|
|
757
|
+
return _this;
|
|
758
|
+
}
|
|
759
|
+
Object.defineProperty(GroupData.prototype, "hasMixedIcons", {
|
|
760
|
+
get: function () {
|
|
761
|
+
var hasFaces = this.children.filter(function (c) { return ViewData.hasFace(c); });
|
|
762
|
+
var iconCount = hasFaces.filter(function (c) { return !!c.faceAdapter.icon; }).length;
|
|
763
|
+
return iconCount > 0 && hasFaces.length !== iconCount;
|
|
764
|
+
},
|
|
765
|
+
enumerable: true,
|
|
766
|
+
configurable: true
|
|
767
|
+
});
|
|
768
|
+
__decorate([
|
|
769
|
+
src.Memoize(),
|
|
770
|
+
__metadata("design:type", Boolean),
|
|
771
|
+
__metadata("design:paramtypes", [])
|
|
772
|
+
], GroupData.prototype, "hasMixedIcons", null);
|
|
773
|
+
return GroupData;
|
|
774
|
+
}(FaceData));
|
|
775
|
+
ViewData.GroupData = GroupData;
|
|
776
|
+
var CommandData = /** @class */ (function (_super) {
|
|
777
|
+
__extends(CommandData, _super);
|
|
778
|
+
function CommandData(face, command) {
|
|
779
|
+
var _this = _super.call(this, face) || this;
|
|
780
|
+
_this.command = command;
|
|
781
|
+
return _this;
|
|
782
|
+
}
|
|
783
|
+
return CommandData;
|
|
784
|
+
}(FaceData));
|
|
785
|
+
ViewData.CommandData = CommandData;
|
|
786
|
+
var SeparatorData = /** @class */ (function (_super) {
|
|
787
|
+
__extends(SeparatorData, _super);
|
|
788
|
+
function SeparatorData() {
|
|
789
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
790
|
+
}
|
|
791
|
+
return SeparatorData;
|
|
792
|
+
}(ViewData));
|
|
793
|
+
ViewData.SeparatorData = SeparatorData;
|
|
794
|
+
var FlexData = /** @class */ (function (_super) {
|
|
795
|
+
__extends(FlexData, _super);
|
|
796
|
+
function FlexData() {
|
|
797
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
798
|
+
}
|
|
799
|
+
return FlexData;
|
|
800
|
+
}(ViewData));
|
|
801
|
+
ViewData.FlexData = FlexData;
|
|
802
|
+
function as(type, viewData) {
|
|
803
|
+
return viewData instanceof type ? viewData : pectin.lang.illegalState("expected instance of " + type.name + ", got " + viewData.constructor.name);
|
|
804
|
+
}
|
|
805
|
+
ViewData.as = as;
|
|
806
|
+
function getCommand(data) {
|
|
807
|
+
return as(CommandData, data).command;
|
|
808
|
+
}
|
|
809
|
+
ViewData.getCommand = getCommand;
|
|
810
|
+
function getTooltip(data) {
|
|
811
|
+
return as(FaceData, data).faceAdapter.tooltip;
|
|
812
|
+
}
|
|
813
|
+
ViewData.getTooltip = getTooltip;
|
|
814
|
+
function getStyle(data) {
|
|
815
|
+
return as(FaceData, data).faceAdapter.style;
|
|
816
|
+
}
|
|
817
|
+
ViewData.getStyle = getStyle;
|
|
818
|
+
function getColor(data) {
|
|
819
|
+
return as(FaceData, data).faceAdapter.color;
|
|
820
|
+
}
|
|
821
|
+
ViewData.getColor = getColor;
|
|
822
|
+
function hasText(data) {
|
|
823
|
+
return !!as(FaceData, data).faceAdapter.text;
|
|
824
|
+
}
|
|
825
|
+
ViewData.hasText = hasText;
|
|
826
|
+
function getFace(data) {
|
|
827
|
+
return as(FaceData, data).faceAdapter.face;
|
|
828
|
+
}
|
|
829
|
+
ViewData.getFace = getFace;
|
|
830
|
+
function asGroup(viewData) {
|
|
831
|
+
return as(GroupData, viewData);
|
|
832
|
+
}
|
|
833
|
+
ViewData.asGroup = asGroup;
|
|
834
|
+
function hasMixedIcons(data) {
|
|
835
|
+
return as(GroupData, data).hasMixedIcons;
|
|
836
|
+
}
|
|
837
|
+
ViewData.hasMixedIcons = hasMixedIcons;
|
|
838
|
+
function isGroup(data) {
|
|
839
|
+
return data instanceof GroupData;
|
|
840
|
+
}
|
|
841
|
+
ViewData.isGroup = isGroup;
|
|
842
|
+
function hasFace(data) {
|
|
843
|
+
return data instanceof FaceData;
|
|
844
|
+
}
|
|
845
|
+
ViewData.hasFace = hasFace;
|
|
846
|
+
function isCommand(data) {
|
|
847
|
+
return data instanceof CommandData;
|
|
848
|
+
}
|
|
849
|
+
ViewData.isCommand = isCommand;
|
|
850
|
+
function isSeparator(data) {
|
|
851
|
+
return data instanceof SeparatorData;
|
|
852
|
+
}
|
|
853
|
+
ViewData.isSeparator = isSeparator;
|
|
854
|
+
function isFlex(data) {
|
|
855
|
+
return data instanceof FlexData;
|
|
856
|
+
}
|
|
857
|
+
ViewData.isFlex = isFlex;
|
|
858
|
+
})(exports.ViewData || (exports.ViewData = {}));
|
|
859
|
+
|
|
860
|
+
var CommandGroupMenuRendererComponent = /** @class */ (function (_super) {
|
|
861
|
+
__extends(CommandGroupMenuRendererComponent, _super);
|
|
862
|
+
function CommandGroupMenuRendererComponent(parent) {
|
|
863
|
+
var _this = _super.call(this) || this;
|
|
864
|
+
_this.parent = parent;
|
|
865
|
+
_this.groupViewDataModel = new pectin.MutableValueModel();
|
|
866
|
+
_this.commandFired = new core.EventEmitter();
|
|
867
|
+
_this.ViewData = exports.ViewData;
|
|
868
|
+
_this.TrackBy = exports.TrackBy;
|
|
869
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
870
|
+
_this.children = chain(_this.groupViewDataModel).pluckList('children');
|
|
871
|
+
_this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
|
|
872
|
+
return _this;
|
|
873
|
+
}
|
|
874
|
+
CommandGroupMenuRendererComponent.prototype.getCommand = function (data) {
|
|
875
|
+
var _this = this;
|
|
876
|
+
var command = exports.ViewData.getCommand(data);
|
|
877
|
+
var when = pectin.Dsl.disposeWith(this).when;
|
|
878
|
+
when(command.busy).becomesFalsey(function () { return _this.commandFired.emit(); });
|
|
879
|
+
return command;
|
|
880
|
+
};
|
|
881
|
+
CommandGroupMenuRendererComponent.ctorParameters = function () { return [
|
|
882
|
+
{ type: CommandGroupMenuRendererComponent, decorators: [{ type: core.Optional }, { type: core.SkipSelf }] }
|
|
883
|
+
]; };
|
|
884
|
+
__decorate([
|
|
885
|
+
core.ViewChild('menu', { static: true }),
|
|
886
|
+
__metadata("design:type", menu.MatMenu)
|
|
887
|
+
], CommandGroupMenuRendererComponent.prototype, "menuComponent", void 0);
|
|
888
|
+
__decorate([
|
|
889
|
+
core.Input(), pectin.StoreInValueModel('groupViewDataModel'),
|
|
890
|
+
__metadata("design:type", exports.ViewData.GroupData)
|
|
891
|
+
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
892
|
+
__decorate([
|
|
893
|
+
core.Output(),
|
|
894
|
+
__metadata("design:type", Object)
|
|
895
|
+
], CommandGroupMenuRendererComponent.prototype, "commandFired", void 0);
|
|
896
|
+
__decorate([
|
|
897
|
+
core.ViewChildren(menu.MatMenuTrigger),
|
|
898
|
+
__metadata("design:type", core.QueryList)
|
|
899
|
+
], CommandGroupMenuRendererComponent.prototype, "triggers", void 0);
|
|
900
|
+
CommandGroupMenuRendererComponent = __decorate([
|
|
901
|
+
core.Component({
|
|
902
|
+
selector: 'aup-command-group-menu',
|
|
903
|
+
template: "<mat-menu #menu [xPosition]=\"groupViewData.xPosition\" [yPosition]=\"groupViewData.yPosition\">\n <ng-container *ngFor=\"let data of children.value; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"ViewData.isCommand(data)\"\n [pectinCommand]=\"getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n mat-menu-item>\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n\n <ng-container *ngIf=\"ViewData.isGroup(data)\">\n <button mat-menu-item\n #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"innerPanel.menuComponent\"\n >\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n <aup-command-group-menu #innerPanel\n [groupViewData]=\"ViewData.asGroup(data)\"\n (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\"></mat-divider>\n\n </ng-container>\n</mat-menu>\n"
|
|
904
|
+
}),
|
|
905
|
+
__param(0, core.Optional()), __param(0, core.SkipSelf()),
|
|
906
|
+
__metadata("design:paramtypes", [CommandGroupMenuRendererComponent])
|
|
907
|
+
], CommandGroupMenuRendererComponent);
|
|
908
|
+
return CommandGroupMenuRendererComponent;
|
|
909
|
+
}(DisposableComponent));
|
|
910
|
+
|
|
911
|
+
var CommandGroupRendererComponent = /** @class */ (function (_super) {
|
|
912
|
+
__extends(CommandGroupRendererComponent, _super);
|
|
913
|
+
function CommandGroupRendererComponent() {
|
|
914
|
+
var _this = _super.call(this) || this;
|
|
915
|
+
_this.renderRootNode = true;
|
|
916
|
+
_this.ViewData = exports.ViewData;
|
|
917
|
+
_this.TrackBy = exports.TrackBy;
|
|
918
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
919
|
+
_this.childViewDataModels = chain(_this.groupViewDataModel).pluckList('children');
|
|
920
|
+
return _this;
|
|
921
|
+
}
|
|
922
|
+
__decorate([
|
|
923
|
+
core.Input(), pectin.TrackExternal(),
|
|
924
|
+
__metadata("design:type", pectin.ValueModel)
|
|
925
|
+
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
926
|
+
__decorate([
|
|
927
|
+
core.Input(), pectin.StoreInValueModel('groupViewDataModel'),
|
|
928
|
+
__metadata("design:type", exports.ViewData.GroupData)
|
|
929
|
+
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
930
|
+
__decorate([
|
|
931
|
+
core.Input(),
|
|
932
|
+
core.HostBinding('class.render-root'),
|
|
933
|
+
__metadata("design:type", Object)
|
|
934
|
+
], CommandGroupRendererComponent.prototype, "renderRootNode", void 0);
|
|
935
|
+
CommandGroupRendererComponent = __decorate([
|
|
936
|
+
core.Component({
|
|
937
|
+
selector: 'aup-command-group-renderer',
|
|
938
|
+
template: "<ng-template #groupTemplate let-group>\n\n <ng-container *ngIf=\"ViewData.hasText(group)\" [ngSwitch]=\"ViewData.getStyle(group)\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-stroked-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-raised-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!ViewData.hasText(group)\">\n <button #trigger=\"matMenuTrigger\"\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n >\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #commandTemplate let-data>\n\n <ng-container *ngIf=\"ViewData.hasText(data)\" [ngSwitch]=\"ViewData.getStyle(data)\">\n <button *ngSwitchCase=\"'raised'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-raised-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"'stroked'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-stroked-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n <button *ngSwitchDefault\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n </ng-container>\n\n <button *ngIf=\"!ViewData.hasText(data)\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-icon-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n\n</ng-template>\n\n\n<ng-template *ngIf=\"renderRootNode\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: groupViewDataModel.value }\">\n</ng-template>\n\n<ng-container *ngIf=\"!renderRootNode\">\n <ng-container *ngFor=\"let data of this.childViewDataModels.value; trackBy: TrackBy.byIndex\">\n <ng-template *ngIf=\"ViewData.isGroup(data)\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n <ng-template *ngIf=\"ViewData.isCommand(data)\"\n [ngTemplateOutlet]=\"commandTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\" [vertical]=\"true\"></mat-divider>\n </ng-container>\n\n</ng-container>\n",
|
|
939
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host:not(.render-root) mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host:not(.render-root)>*+*{margin-left:8px}:host span.flex{flex:1}"]
|
|
940
|
+
}),
|
|
941
|
+
__metadata("design:paramtypes", [])
|
|
942
|
+
], CommandGroupRendererComponent);
|
|
943
|
+
return CommandGroupRendererComponent;
|
|
944
|
+
}(DisposableComponent));
|
|
945
|
+
|
|
946
|
+
exports.Registration = /** @class */ (function (_super) {
|
|
947
|
+
__extends(Registration, _super);
|
|
948
|
+
function Registration() {
|
|
949
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
950
|
+
}
|
|
951
|
+
return Registration;
|
|
952
|
+
}(pectin.GarbageCollector));
|
|
953
|
+
(function (Registration) {
|
|
954
|
+
var FaceRegistration = /** @class */ (function (_super) {
|
|
955
|
+
__extends(FaceRegistration, _super);
|
|
956
|
+
function FaceRegistration(faceModel) {
|
|
957
|
+
var _this = _super.call(this) || this;
|
|
958
|
+
_this.faceModel = faceModel;
|
|
959
|
+
return _this;
|
|
960
|
+
}
|
|
961
|
+
return FaceRegistration;
|
|
962
|
+
}(Registration));
|
|
963
|
+
Registration.FaceRegistration = FaceRegistration;
|
|
964
|
+
var CommandRegistration = /** @class */ (function (_super) {
|
|
965
|
+
__extends(CommandRegistration, _super);
|
|
966
|
+
function CommandRegistration(faceModel, command) {
|
|
967
|
+
var _this = _super.call(this, faceModel) || this;
|
|
968
|
+
_this.command = command;
|
|
969
|
+
return _this;
|
|
970
|
+
}
|
|
971
|
+
CommandRegistration.prototype.toTemplate = function () {
|
|
972
|
+
return new exports.ViewData.CommandData(this.faceModel.value, this.command);
|
|
973
|
+
};
|
|
974
|
+
return CommandRegistration;
|
|
975
|
+
}(FaceRegistration));
|
|
976
|
+
Registration.CommandRegistration = CommandRegistration;
|
|
977
|
+
var GroupRegistration = /** @class */ (function (_super) {
|
|
978
|
+
__extends(GroupRegistration, _super);
|
|
979
|
+
function GroupRegistration(faceModel, group) {
|
|
980
|
+
var _this = _super.call(this, faceModel) || this;
|
|
981
|
+
_this.group = group;
|
|
982
|
+
return _this;
|
|
983
|
+
}
|
|
984
|
+
GroupRegistration.prototype.toTemplate = function () {
|
|
985
|
+
return new exports.ViewData.GroupData(this.faceModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(function (r) { return r.toTemplate(); }));
|
|
986
|
+
};
|
|
987
|
+
return GroupRegistration;
|
|
988
|
+
}(FaceRegistration));
|
|
989
|
+
Registration.GroupRegistration = GroupRegistration;
|
|
990
|
+
var SeparatorRegistration = /** @class */ (function (_super) {
|
|
991
|
+
__extends(SeparatorRegistration, _super);
|
|
992
|
+
function SeparatorRegistration() {
|
|
993
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
994
|
+
_this.template = new exports.ViewData.SeparatorData();
|
|
995
|
+
return _this;
|
|
996
|
+
}
|
|
997
|
+
SeparatorRegistration.prototype.toTemplate = function () {
|
|
998
|
+
return this.template;
|
|
999
|
+
};
|
|
1000
|
+
return SeparatorRegistration;
|
|
1001
|
+
}(Registration));
|
|
1002
|
+
Registration.SeparatorRegistration = SeparatorRegistration;
|
|
1003
|
+
var FlexRegistration = /** @class */ (function (_super) {
|
|
1004
|
+
__extends(FlexRegistration, _super);
|
|
1005
|
+
function FlexRegistration() {
|
|
1006
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1007
|
+
_this.template = new exports.ViewData.FlexData();
|
|
1008
|
+
return _this;
|
|
1009
|
+
}
|
|
1010
|
+
FlexRegistration.prototype.toTemplate = function () {
|
|
1011
|
+
return this.template;
|
|
1012
|
+
};
|
|
1013
|
+
return FlexRegistration;
|
|
1014
|
+
}(Registration));
|
|
1015
|
+
Registration.FlexRegistration = FlexRegistration;
|
|
1016
|
+
function hasFace(entry) {
|
|
1017
|
+
return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
|
|
1018
|
+
}
|
|
1019
|
+
Registration.hasFace = hasFace;
|
|
1020
|
+
})(exports.Registration || (exports.Registration = {}));
|
|
1021
|
+
|
|
1022
|
+
exports.ɵbo = /** @class */ (function (_super) {
|
|
1023
|
+
__extends(CommandGroup, _super);
|
|
1024
|
+
function CommandGroup(parent) {
|
|
1025
|
+
var _this = _super.call(this) || this;
|
|
1026
|
+
_this.parent = parent;
|
|
1027
|
+
_this._rootTemplate = new pectin.MutableValueModel();
|
|
1028
|
+
_this._registrations = new pectin.MutableListModel();
|
|
1029
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1030
|
+
_this.childTemplates = chain(_this._rootTemplate).pluckList('children');
|
|
1031
|
+
_this.initialised = chain(_this._rootTemplate).isNotNil();
|
|
1032
|
+
return _this;
|
|
1033
|
+
}
|
|
1034
|
+
CommandGroup.prototype.initialise = function () {
|
|
1035
|
+
this.rebuildTemplates();
|
|
1036
|
+
};
|
|
1037
|
+
Object.defineProperty(CommandGroup.prototype, "rootTemplate", {
|
|
1038
|
+
get: function () {
|
|
1039
|
+
return this._rootTemplate.readonly;
|
|
1040
|
+
},
|
|
1041
|
+
enumerable: true,
|
|
1042
|
+
configurable: true
|
|
1043
|
+
});
|
|
1044
|
+
Object.defineProperty(CommandGroup.prototype, "registrations", {
|
|
1045
|
+
get: function () {
|
|
1046
|
+
return this._registrations.readonly;
|
|
1047
|
+
},
|
|
1048
|
+
enumerable: true,
|
|
1049
|
+
configurable: true
|
|
1050
|
+
});
|
|
1051
|
+
CommandGroup.prototype.notifyChanged = function () {
|
|
1052
|
+
if (this.parent) {
|
|
1053
|
+
this.parent.notifyChanged();
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
this.rebuildTemplates();
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
CommandGroup.prototype.notifyChildFaceChanged = function (is, was) {
|
|
1060
|
+
this.notifyChanged();
|
|
1061
|
+
};
|
|
1062
|
+
CommandGroup.prototype.rebuildTemplates = function () {
|
|
1063
|
+
this._rootTemplate.value = new exports.ViewData.GroupData(this.faceModel.value, this.xPosition, this.yPosition, this.registrations.value.map(function (r) { return r.toTemplate(); }));
|
|
1064
|
+
};
|
|
1065
|
+
Object.defineProperty(CommandGroup.prototype, "depth", {
|
|
1066
|
+
get: function () {
|
|
1067
|
+
return this.isRoot() ? 0 : this.parent.depth + 1;
|
|
1068
|
+
},
|
|
1069
|
+
enumerable: true,
|
|
1070
|
+
configurable: true
|
|
1071
|
+
});
|
|
1072
|
+
CommandGroup.prototype.isRoot = function () {
|
|
1073
|
+
return false;
|
|
1074
|
+
};
|
|
1075
|
+
CommandGroup.prototype.registerCommand = function (command, faceModel) {
|
|
1076
|
+
return this.register(new exports.Registration.CommandRegistration(faceModel, command));
|
|
1077
|
+
};
|
|
1078
|
+
CommandGroup.prototype.registerGroup = function (group, faceModel) {
|
|
1079
|
+
return this.register(new exports.Registration.GroupRegistration(faceModel, group));
|
|
1080
|
+
};
|
|
1081
|
+
CommandGroup.prototype.registerFlex = function (component) {
|
|
1082
|
+
return this.register(new exports.Registration.FlexRegistration());
|
|
1083
|
+
};
|
|
1084
|
+
CommandGroup.prototype.registerSeparator = function (component) {
|
|
1085
|
+
return this.register(new exports.Registration.SeparatorRegistration());
|
|
1086
|
+
};
|
|
1087
|
+
CommandGroup.prototype.register = function (registration) {
|
|
1088
|
+
var _this = this;
|
|
1089
|
+
this._registrations.push(registration);
|
|
1090
|
+
if (registration instanceof exports.Registration.FaceRegistration) {
|
|
1091
|
+
var when = pectin.Dsl.disposeWith(registration).when;
|
|
1092
|
+
when(registration.faceModel).changes(function (is, was) {
|
|
1093
|
+
_this.notifyChildFaceChanged(is, was);
|
|
1094
|
+
}, { asLongAs: this.initialised });
|
|
1095
|
+
}
|
|
1096
|
+
registration.onDispose(function () { return _this._registrations.remove(registration); });
|
|
1097
|
+
return registration;
|
|
1098
|
+
};
|
|
1099
|
+
return CommandGroup;
|
|
1100
|
+
}(pectin.GarbageCollector));
|
|
1101
|
+
(function (CommandGroup) {
|
|
1102
|
+
var Root = /** @class */ (function (_super) {
|
|
1103
|
+
__extends(Root, _super);
|
|
1104
|
+
function Root() {
|
|
1105
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1106
|
+
}
|
|
1107
|
+
Root.prototype.isRoot = function () {
|
|
1108
|
+
return true;
|
|
1109
|
+
};
|
|
1110
|
+
__decorate([
|
|
1111
|
+
pectin.TrackExternal(),
|
|
1112
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1113
|
+
], Root.prototype, "faceModel", void 0);
|
|
1114
|
+
__decorate([
|
|
1115
|
+
pectin.TrackExternal({ defaultValue: 'after' }),
|
|
1116
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1117
|
+
], Root.prototype, "xPositionModel", void 0);
|
|
1118
|
+
__decorate([
|
|
1119
|
+
pectin.StoreInValueModel('xPositionModel'),
|
|
1120
|
+
__metadata("design:type", String)
|
|
1121
|
+
], Root.prototype, "xPosition", void 0);
|
|
1122
|
+
__decorate([
|
|
1123
|
+
pectin.TrackExternal({ defaultValue: 'below' }),
|
|
1124
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1125
|
+
], Root.prototype, "yPositionModel", void 0);
|
|
1126
|
+
__decorate([
|
|
1127
|
+
pectin.StoreInValueModel('yPositionModel'),
|
|
1128
|
+
__metadata("design:type", String)
|
|
1129
|
+
], Root.prototype, "yPosition", void 0);
|
|
1130
|
+
return Root;
|
|
1131
|
+
}(CommandGroup));
|
|
1132
|
+
CommandGroup.Root = Root;
|
|
1133
|
+
function factory() {
|
|
1134
|
+
return new Root();
|
|
1135
|
+
}
|
|
1136
|
+
CommandGroup.factory = factory;
|
|
1137
|
+
})(exports.ɵbo || (exports.ɵbo = {}));
|
|
1138
|
+
|
|
1139
|
+
var CommandGroupComponent = /** @class */ (function (_super) {
|
|
1140
|
+
__extends(CommandGroupComponent, _super);
|
|
1141
|
+
function CommandGroupComponent(parent) {
|
|
1142
|
+
var _this = _super.call(this, parent) || this;
|
|
1143
|
+
_this.parent = parent;
|
|
1144
|
+
_this.xPosition = 'after';
|
|
1145
|
+
_this.yPosition = 'below';
|
|
1146
|
+
_this.parent.registerGroup(_this, _this.faceModel);
|
|
1147
|
+
return _this;
|
|
1148
|
+
}
|
|
1149
|
+
CommandGroupComponent_1 = CommandGroupComponent;
|
|
1150
|
+
var CommandGroupComponent_1;
|
|
1151
|
+
CommandGroupComponent.ctorParameters = function () { return [
|
|
1152
|
+
{ type: exports.ɵbo, decorators: [{ type: core.SkipSelf }] }
|
|
1153
|
+
]; };
|
|
1154
|
+
__decorate([
|
|
1155
|
+
core.Input(), pectin.TrackExternal(),
|
|
1156
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1157
|
+
], CommandGroupComponent.prototype, "faceModel", void 0);
|
|
1158
|
+
__decorate([
|
|
1159
|
+
core.Input(), pectin.StoreInValueModel('faceModel'),
|
|
1160
|
+
__metadata("design:type", Object)
|
|
1161
|
+
], CommandGroupComponent.prototype, "face", void 0);
|
|
1162
|
+
__decorate([
|
|
1163
|
+
core.Input(),
|
|
1164
|
+
__metadata("design:type", String)
|
|
1165
|
+
], CommandGroupComponent.prototype, "xPosition", void 0);
|
|
1166
|
+
__decorate([
|
|
1167
|
+
core.Input(),
|
|
1168
|
+
__metadata("design:type", String)
|
|
1169
|
+
], CommandGroupComponent.prototype, "yPosition", void 0);
|
|
1170
|
+
CommandGroupComponent = CommandGroupComponent_1 = __decorate([
|
|
1171
|
+
core.Component({
|
|
1172
|
+
selector: 'aup-command-group',
|
|
1173
|
+
template: '',
|
|
1174
|
+
providers: [
|
|
1175
|
+
{ provide: exports.ɵbo, useExisting: CommandGroupComponent_1 }
|
|
1176
|
+
]
|
|
1177
|
+
}),
|
|
1178
|
+
__param(0, core.SkipSelf()),
|
|
1179
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1180
|
+
], CommandGroupComponent);
|
|
1181
|
+
return CommandGroupComponent;
|
|
1182
|
+
}(exports.ɵbo));
|
|
1183
|
+
|
|
1184
|
+
/**
|
|
1185
|
+
* Custom CSS:
|
|
1186
|
+
* @example
|
|
1187
|
+
* root: { // globally
|
|
1188
|
+
* --aup-command-face-icon-gap: 8px;
|
|
1189
|
+
* }
|
|
1190
|
+
* aup-command-face { // per instance
|
|
1191
|
+
* --icon-gap: 4px;
|
|
1192
|
+
* }
|
|
1193
|
+
*/
|
|
1194
|
+
var CommandFaceComponent = /** @class */ (function (_super) {
|
|
1195
|
+
__extends(CommandFaceComponent, _super);
|
|
1196
|
+
function CommandFaceComponent() {
|
|
1197
|
+
var _this = _super.call(this) || this;
|
|
1198
|
+
_this.faceModel = new pectin.MutableValueModel();
|
|
1199
|
+
_this.ignoreIcon = false;
|
|
1200
|
+
_this.ignoreText = false;
|
|
1201
|
+
_this.includeMissingIconInLayout = false;
|
|
1202
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1203
|
+
// overkill /c: when all you have is a hammer...
|
|
1204
|
+
var faceAdapter = chain(_this.faceModel).map(function (face) { return new exports.CommandFace.Adapter(face); });
|
|
1205
|
+
_this.iconModel = faceAdapter.pluck('icon');
|
|
1206
|
+
_this.textModel = faceAdapter.pluck('text');
|
|
1207
|
+
_this.positionModel = faceAdapter.pluck('iconPosition');
|
|
1208
|
+
_this.colorModel = faceAdapter.pluck('color');
|
|
1209
|
+
return _this;
|
|
1210
|
+
}
|
|
1211
|
+
Object.defineProperty(CommandFaceComponent.prototype, "requiresMissingIconInLayout", {
|
|
1212
|
+
get: function () {
|
|
1213
|
+
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
1214
|
+
},
|
|
1215
|
+
enumerable: true,
|
|
1216
|
+
configurable: true
|
|
1217
|
+
});
|
|
1218
|
+
CommandFaceComponent.prototype.ngOnInit = function () {
|
|
1219
|
+
};
|
|
1220
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconPosition", {
|
|
1221
|
+
get: function () {
|
|
1222
|
+
var _a;
|
|
1223
|
+
return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : exports.CommandFace.Position.START;
|
|
1224
|
+
},
|
|
1225
|
+
enumerable: true,
|
|
1226
|
+
configurable: true
|
|
1227
|
+
});
|
|
1228
|
+
Object.defineProperty(CommandFaceComponent.prototype, "shouldIncludeIcon", {
|
|
1229
|
+
get: function () {
|
|
1230
|
+
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
1231
|
+
},
|
|
1232
|
+
enumerable: true,
|
|
1233
|
+
configurable: true
|
|
1234
|
+
});
|
|
1235
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconStart", {
|
|
1236
|
+
get: function () {
|
|
1237
|
+
return this.shouldIncludeIcon && this.iconPosition === exports.CommandFace.Position.START;
|
|
1238
|
+
},
|
|
1239
|
+
enumerable: true,
|
|
1240
|
+
configurable: true
|
|
1241
|
+
});
|
|
1242
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconEnd", {
|
|
1243
|
+
get: function () {
|
|
1244
|
+
return this.shouldIncludeIcon && this.iconPosition === exports.CommandFace.Position.END;
|
|
1245
|
+
},
|
|
1246
|
+
enumerable: true,
|
|
1247
|
+
configurable: true
|
|
1248
|
+
});
|
|
1249
|
+
Object.defineProperty(CommandFaceComponent.prototype, "text", {
|
|
1250
|
+
get: function () {
|
|
1251
|
+
return this.ignoreText ? undefined : this.textModel.value;
|
|
1252
|
+
},
|
|
1253
|
+
enumerable: true,
|
|
1254
|
+
configurable: true
|
|
1255
|
+
});
|
|
1256
|
+
Object.defineProperty(CommandFaceComponent.prototype, "color", {
|
|
1257
|
+
get: function () {
|
|
1258
|
+
return this.colorModel.value;
|
|
1259
|
+
},
|
|
1260
|
+
enumerable: true,
|
|
1261
|
+
configurable: true
|
|
1262
|
+
});
|
|
1263
|
+
__decorate([
|
|
1264
|
+
core.Input('face'), pectin.StoreInValueModel('faceModel'),
|
|
1265
|
+
__metadata("design:type", Object)
|
|
1266
|
+
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
1267
|
+
__decorate([
|
|
1268
|
+
core.Input(),
|
|
1269
|
+
__metadata("design:type", Object)
|
|
1270
|
+
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
1271
|
+
__decorate([
|
|
1272
|
+
core.Input(),
|
|
1273
|
+
__metadata("design:type", Object)
|
|
1274
|
+
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
1275
|
+
__decorate([
|
|
1276
|
+
core.Input(),
|
|
1277
|
+
__metadata("design:type", Object)
|
|
1278
|
+
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
1279
|
+
__decorate([
|
|
1280
|
+
core.HostBinding('class.hide-icon'),
|
|
1281
|
+
__metadata("design:type", Object),
|
|
1282
|
+
__metadata("design:paramtypes", [])
|
|
1283
|
+
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
1284
|
+
__decorate([
|
|
1285
|
+
core.HostBinding('attr.color'),
|
|
1286
|
+
__metadata("design:type", String),
|
|
1287
|
+
__metadata("design:paramtypes", [])
|
|
1288
|
+
], CommandFaceComponent.prototype, "color", null);
|
|
1289
|
+
CommandFaceComponent = __decorate([
|
|
1290
|
+
core.Component({
|
|
1291
|
+
selector: 'aup-command-face',
|
|
1292
|
+
template: "<aup-icon *ngIf=\"iconStart\" [icon]=\"iconModel.value\"></aup-icon>\n<span *ngIf=\"this.text\">{{this.text}}</span>\n<aup-icon *ngIf=\"iconEnd\" [icon]=\"iconModel.value\"></aup-icon>\n",
|
|
1293
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
1294
|
+
styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:inline-flex;flex-direction:row;align-items:center}aup-command-face *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}"]
|
|
1295
|
+
}),
|
|
1296
|
+
__metadata("design:paramtypes", [])
|
|
1297
|
+
], CommandFaceComponent);
|
|
1298
|
+
return CommandFaceComponent;
|
|
1299
|
+
}(DisposableComponent));
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
*
|
|
1303
|
+
*/
|
|
1304
|
+
var CommandComponent = /** @class */ (function (_super) {
|
|
1305
|
+
__extends(CommandComponent, _super);
|
|
1306
|
+
function CommandComponent(parent) {
|
|
1307
|
+
var _this = _super.call(this) || this;
|
|
1308
|
+
_this.parent = parent;
|
|
1309
|
+
_this.CommandFace = exports.CommandFace;
|
|
1310
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
|
|
1311
|
+
_this.activeFaceModel = switchOn(_this.command.busy).toValue(function (when) {
|
|
1312
|
+
when.equalTo(true, _this.busyFaceModel);
|
|
1313
|
+
when.otherwise(_this.faceModel);
|
|
1314
|
+
}).otherwise(_this.faceModel);
|
|
1315
|
+
_this.buttonStyle = chain(_this.activeFaceModel).map(function (f) { return exports.CommandFace.getStyleOf(f); });
|
|
1316
|
+
_this.colorModel = chain(_this.activeFaceModel).map(function (f) { return exports.CommandFace.getColorOf(f); });
|
|
1317
|
+
if (parent) {
|
|
1318
|
+
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.activeFaceModel));
|
|
1319
|
+
}
|
|
1320
|
+
return _this;
|
|
1321
|
+
}
|
|
1322
|
+
CommandComponent.prototype.ngOnInit = function () {
|
|
1323
|
+
};
|
|
1324
|
+
CommandComponent.ctorParameters = function () { return [
|
|
1325
|
+
{ type: exports.ɵbo, decorators: [{ type: core.Optional }] }
|
|
1326
|
+
]; };
|
|
1327
|
+
__decorate([
|
|
1328
|
+
core.Input(), pectin.TrackExternal(),
|
|
1329
|
+
__metadata("design:type", pectin.Command)
|
|
1330
|
+
], CommandComponent.prototype, "command", void 0);
|
|
1331
|
+
__decorate([
|
|
1332
|
+
core.Input(), pectin.TrackExternal(),
|
|
1333
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1334
|
+
], CommandComponent.prototype, "faceModel", void 0);
|
|
1335
|
+
__decorate([
|
|
1336
|
+
core.Input(), pectin.StoreInValueModel('faceModel'),
|
|
1337
|
+
__metadata("design:type", Object)
|
|
1338
|
+
], CommandComponent.prototype, "face", void 0);
|
|
1339
|
+
__decorate([
|
|
1340
|
+
core.Input(), pectin.TrackExternal(),
|
|
1341
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1342
|
+
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
1343
|
+
__decorate([
|
|
1344
|
+
core.Input(), pectin.StoreInValueModel('busyFaceModel'),
|
|
1345
|
+
__metadata("design:type", Object)
|
|
1346
|
+
], CommandComponent.prototype, "busyFace", void 0);
|
|
1347
|
+
CommandComponent = __decorate([
|
|
1348
|
+
core.Component({
|
|
1349
|
+
selector: 'aup-command',
|
|
1350
|
+
template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <button *ngSwitchCase=\"CommandFace.Style.STROKED\" mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"CommandFace.Style.RAISED\" mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n <button *ngSwitchDefault mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n"
|
|
1351
|
+
}),
|
|
1352
|
+
__param(0, core.Optional()),
|
|
1353
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1354
|
+
], CommandComponent);
|
|
1355
|
+
return CommandComponent;
|
|
1356
|
+
}(DisposableComponent));
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
*
|
|
1360
|
+
*/
|
|
1361
|
+
var FlexComponent = /** @class */ (function (_super) {
|
|
1362
|
+
__extends(FlexComponent, _super);
|
|
1363
|
+
function FlexComponent(parent) {
|
|
1364
|
+
var _this = _super.call(this) || this;
|
|
1365
|
+
_this.parent = parent;
|
|
1366
|
+
if (parent) {
|
|
1367
|
+
parent.registerFlex(_this);
|
|
1368
|
+
}
|
|
1369
|
+
return _this;
|
|
1370
|
+
}
|
|
1371
|
+
FlexComponent.prototype.ngOnInit = function () {
|
|
1372
|
+
};
|
|
1373
|
+
FlexComponent.ctorParameters = function () { return [
|
|
1374
|
+
{ type: exports.ɵbo }
|
|
1375
|
+
]; };
|
|
1376
|
+
FlexComponent = __decorate([
|
|
1377
|
+
core.Component({
|
|
1378
|
+
selector: 'aup-flex',
|
|
1379
|
+
template: ""
|
|
1380
|
+
}),
|
|
1381
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1382
|
+
], FlexComponent);
|
|
1383
|
+
return FlexComponent;
|
|
1384
|
+
}(DisposableComponent));
|
|
1385
|
+
|
|
1386
|
+
var ɵ0 = exports.ɵbo.factory;
|
|
1387
|
+
/**
|
|
1388
|
+
*
|
|
1389
|
+
*/
|
|
1390
|
+
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
1391
|
+
__extends(MoreMenuComponent, _super);
|
|
1392
|
+
function MoreMenuComponent(group) {
|
|
1393
|
+
var _this = _super.call(this) || this;
|
|
1394
|
+
_this.group = group;
|
|
1395
|
+
_this.tooltipModel = new pectin.MutableValueModel();
|
|
1396
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1397
|
+
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
1398
|
+
group.faceModel = chain(_this.tooltipModel).map(function (tooltip) {
|
|
1399
|
+
return {
|
|
1400
|
+
icon: function () { return 'mat:more_vert'; },
|
|
1401
|
+
tooltip: function () {
|
|
1402
|
+
return tooltip;
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
}, { allowNil: true });
|
|
1406
|
+
return _this;
|
|
1407
|
+
}
|
|
1408
|
+
MoreMenuComponent.prototype.ngOnInit = function () {
|
|
1409
|
+
};
|
|
1410
|
+
MoreMenuComponent.prototype.ngAfterContentInit = function () {
|
|
1411
|
+
this.group.initialise();
|
|
1412
|
+
};
|
|
1413
|
+
MoreMenuComponent.ctorParameters = function () { return [
|
|
1414
|
+
{ type: exports.ɵbo }
|
|
1415
|
+
]; };
|
|
1416
|
+
__decorate([
|
|
1417
|
+
core.Input(), pectin.StoreInValueModel('tooltipModel'),
|
|
1418
|
+
__metadata("design:type", String)
|
|
1419
|
+
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
1420
|
+
__decorate([
|
|
1421
|
+
pectin.Trace(),
|
|
1422
|
+
__metadata("design:type", Function),
|
|
1423
|
+
__metadata("design:paramtypes", []),
|
|
1424
|
+
__metadata("design:returntype", void 0)
|
|
1425
|
+
], MoreMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1426
|
+
MoreMenuComponent = __decorate([
|
|
1427
|
+
core.Component({
|
|
1428
|
+
selector: 'aup-more-menu',
|
|
1429
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1430
|
+
providers: [{ provide: exports.ɵbo, useFactory: ɵ0 }]
|
|
1431
|
+
}),
|
|
1432
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1433
|
+
], MoreMenuComponent);
|
|
1434
|
+
return MoreMenuComponent;
|
|
1435
|
+
}(DisposableComponent));
|
|
1436
|
+
|
|
1437
|
+
var ɵ0$1 = exports.ɵbo.factory;
|
|
1438
|
+
/**
|
|
1439
|
+
*
|
|
1440
|
+
*/
|
|
1441
|
+
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
1442
|
+
__extends(PopupMenuComponent, _super);
|
|
1443
|
+
function PopupMenuComponent(group) {
|
|
1444
|
+
var _this = _super.call(this) || this;
|
|
1445
|
+
_this.group = group;
|
|
1446
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1447
|
+
group.faceModel = _this.faceModel;
|
|
1448
|
+
return _this;
|
|
1449
|
+
}
|
|
1450
|
+
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
1451
|
+
};
|
|
1452
|
+
PopupMenuComponent.prototype.ngAfterContentInit = function () {
|
|
1453
|
+
this.group.initialise();
|
|
1454
|
+
};
|
|
1455
|
+
PopupMenuComponent.prototype.ngAfterViewInit = function () {
|
|
1456
|
+
};
|
|
1457
|
+
PopupMenuComponent.ctorParameters = function () { return [
|
|
1458
|
+
{ type: exports.ɵbo }
|
|
1459
|
+
]; };
|
|
1460
|
+
__decorate([
|
|
1461
|
+
core.Input(), pectin.TrackExternal(),
|
|
1462
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1463
|
+
], PopupMenuComponent.prototype, "faceModel", void 0);
|
|
1464
|
+
__decorate([
|
|
1465
|
+
core.Input(), pectin.StoreInValueModel('faceModel'),
|
|
1466
|
+
__metadata("design:type", Object)
|
|
1467
|
+
], PopupMenuComponent.prototype, "face", void 0);
|
|
1468
|
+
__decorate([
|
|
1469
|
+
pectin.Trace(),
|
|
1470
|
+
__metadata("design:type", Function),
|
|
1471
|
+
__metadata("design:paramtypes", []),
|
|
1472
|
+
__metadata("design:returntype", void 0)
|
|
1473
|
+
], PopupMenuComponent.prototype, "ngOnInit", null);
|
|
1474
|
+
__decorate([
|
|
1475
|
+
pectin.Trace(),
|
|
1476
|
+
__metadata("design:type", Function),
|
|
1477
|
+
__metadata("design:paramtypes", []),
|
|
1478
|
+
__metadata("design:returntype", void 0)
|
|
1479
|
+
], PopupMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1480
|
+
__decorate([
|
|
1481
|
+
pectin.Trace(),
|
|
1482
|
+
__metadata("design:type", Function),
|
|
1483
|
+
__metadata("design:paramtypes", []),
|
|
1484
|
+
__metadata("design:returntype", void 0)
|
|
1485
|
+
], PopupMenuComponent.prototype, "ngAfterViewInit", null);
|
|
1486
|
+
PopupMenuComponent = __decorate([
|
|
1487
|
+
core.Component({
|
|
1488
|
+
selector: 'aup-popup-menu',
|
|
1489
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1490
|
+
providers: [{ provide: exports.ɵbo, useFactory: ɵ0$1 }]
|
|
1491
|
+
}),
|
|
1492
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1493
|
+
], PopupMenuComponent);
|
|
1494
|
+
return PopupMenuComponent;
|
|
1495
|
+
}(DisposableComponent));
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
*
|
|
1499
|
+
*/
|
|
1500
|
+
var SeparatorComponent = /** @class */ (function (_super) {
|
|
1501
|
+
__extends(SeparatorComponent, _super);
|
|
1502
|
+
function SeparatorComponent(parent) {
|
|
1503
|
+
var _this = _super.call(this) || this;
|
|
1504
|
+
_this.parent = parent;
|
|
1505
|
+
if (parent) {
|
|
1506
|
+
parent.registerSeparator(_this);
|
|
1507
|
+
}
|
|
1508
|
+
return _this;
|
|
1509
|
+
}
|
|
1510
|
+
SeparatorComponent.prototype.isVertical = function () {
|
|
1511
|
+
return this === null || this === void 0 ? void 0 : this.parent.isRoot();
|
|
1512
|
+
};
|
|
1513
|
+
SeparatorComponent.prototype.ngOnInit = function () {
|
|
1514
|
+
};
|
|
1515
|
+
SeparatorComponent.ctorParameters = function () { return [
|
|
1516
|
+
{ type: exports.ɵbo, decorators: [{ type: core.Optional }] }
|
|
1517
|
+
]; };
|
|
1518
|
+
SeparatorComponent = __decorate([
|
|
1519
|
+
core.Component({
|
|
1520
|
+
selector: 'aup-separator',
|
|
1521
|
+
template: "\n <mat-divider [vertical]=\"isVertical()\"></mat-divider>"
|
|
1522
|
+
}),
|
|
1523
|
+
__param(0, core.Optional()),
|
|
1524
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1525
|
+
], SeparatorComponent);
|
|
1526
|
+
return SeparatorComponent;
|
|
1527
|
+
}(DisposableComponent));
|
|
1528
|
+
|
|
1529
|
+
var ɵ0$2 = exports.ɵbo.factory;
|
|
1530
|
+
/**
|
|
1531
|
+
*
|
|
1532
|
+
*/
|
|
1533
|
+
var ToolBarComponent = /** @class */ (function (_super) {
|
|
1534
|
+
__extends(ToolBarComponent, _super);
|
|
1535
|
+
function ToolBarComponent(group) {
|
|
1536
|
+
var _this = _super.call(this) || this;
|
|
1537
|
+
_this.group = group;
|
|
1538
|
+
return _this;
|
|
1539
|
+
}
|
|
1540
|
+
ToolBarComponent.prototype.ngOnInit = function () {
|
|
1541
|
+
};
|
|
1542
|
+
ToolBarComponent.prototype.ngAfterContentInit = function () {
|
|
1543
|
+
this.group.initialise();
|
|
1544
|
+
};
|
|
1545
|
+
ToolBarComponent.prototype.ngAfterViewInit = function () {
|
|
1546
|
+
};
|
|
1547
|
+
ToolBarComponent.ctorParameters = function () { return [
|
|
1548
|
+
{ type: exports.ɵbo }
|
|
1549
|
+
]; };
|
|
1550
|
+
__decorate([
|
|
1551
|
+
pectin.Trace(),
|
|
1552
|
+
__metadata("design:type", Function),
|
|
1553
|
+
__metadata("design:paramtypes", []),
|
|
1554
|
+
__metadata("design:returntype", void 0)
|
|
1555
|
+
], ToolBarComponent.prototype, "ngOnInit", null);
|
|
1556
|
+
__decorate([
|
|
1557
|
+
pectin.Trace(),
|
|
1558
|
+
__metadata("design:type", Function),
|
|
1559
|
+
__metadata("design:paramtypes", []),
|
|
1560
|
+
__metadata("design:returntype", void 0)
|
|
1561
|
+
], ToolBarComponent.prototype, "ngAfterContentInit", null);
|
|
1562
|
+
__decorate([
|
|
1563
|
+
pectin.Trace(),
|
|
1564
|
+
__metadata("design:type", Function),
|
|
1565
|
+
__metadata("design:paramtypes", []),
|
|
1566
|
+
__metadata("design:returntype", void 0)
|
|
1567
|
+
], ToolBarComponent.prototype, "ngAfterViewInit", null);
|
|
1568
|
+
ToolBarComponent = __decorate([
|
|
1569
|
+
core.Component({
|
|
1570
|
+
selector: 'aup-tool-bar',
|
|
1571
|
+
template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1572
|
+
providers: [{ provide: exports.ɵbo, useFactory: ɵ0$2 }],
|
|
1573
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host span.flex{flex:1}:host>*+*{margin-left:8px}"]
|
|
1574
|
+
}),
|
|
1575
|
+
__metadata("design:paramtypes", [exports.ɵbo])
|
|
1576
|
+
], ToolBarComponent);
|
|
1577
|
+
return ToolBarComponent;
|
|
1578
|
+
}(DisposableComponent));
|
|
1579
|
+
|
|
588
1580
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
589
1581
|
__extends(FocusContainerComponent, _super);
|
|
590
1582
|
function FocusContainerComponent(focusManager) {
|
|
@@ -693,6 +1685,7 @@
|
|
|
693
1685
|
__extends(AbstractInputComponent, _super);
|
|
694
1686
|
function AbstractInputComponent() {
|
|
695
1687
|
var _this = _super.call(this) || this;
|
|
1688
|
+
_this.onValueEditedListeners = new pectin.EventListenerList();
|
|
696
1689
|
_this.dense = false;
|
|
697
1690
|
// TODO: fix this.
|
|
698
1691
|
// tslint:disable-next-line:no-output-native
|
|
@@ -743,7 +1736,7 @@
|
|
|
743
1736
|
};
|
|
744
1737
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
745
1738
|
get: function () {
|
|
746
|
-
return this.
|
|
1739
|
+
return this.formValueModel.enabled;
|
|
747
1740
|
},
|
|
748
1741
|
enumerable: true,
|
|
749
1742
|
configurable: true
|
|
@@ -753,7 +1746,7 @@
|
|
|
753
1746
|
};
|
|
754
1747
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
755
1748
|
get: function () {
|
|
756
|
-
return this.
|
|
1749
|
+
return this.formValueModel.errorList;
|
|
757
1750
|
},
|
|
758
1751
|
enumerable: true,
|
|
759
1752
|
configurable: true
|
|
@@ -767,7 +1760,7 @@
|
|
|
767
1760
|
});
|
|
768
1761
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
769
1762
|
get: function () {
|
|
770
|
-
return this.
|
|
1763
|
+
return this.formValueModel.focusContext;
|
|
771
1764
|
},
|
|
772
1765
|
enumerable: true,
|
|
773
1766
|
configurable: true
|
|
@@ -786,6 +1779,13 @@
|
|
|
786
1779
|
enumerable: true,
|
|
787
1780
|
configurable: true
|
|
788
1781
|
});
|
|
1782
|
+
/**
|
|
1783
|
+
* Invokes the callback when this components value is changed by a user edit.
|
|
1784
|
+
* @param callback
|
|
1785
|
+
*/
|
|
1786
|
+
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
1787
|
+
return this.onValueEditedListeners.add(callback);
|
|
1788
|
+
};
|
|
789
1789
|
__decorate([
|
|
790
1790
|
core.Input(),
|
|
791
1791
|
__metadata("design:type", String)
|
|
@@ -887,34 +1887,47 @@
|
|
|
887
1887
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
888
1888
|
*/
|
|
889
1889
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
890
|
-
_this.
|
|
891
|
-
_this.
|
|
1890
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
|
|
1891
|
+
_this.componentListModel = new pectin.MutableListModel();
|
|
1892
|
+
_this.setValueIsInProgress = new pectin.Guard();
|
|
892
1893
|
_this.valueChange = new core.EventEmitter();
|
|
893
|
-
var
|
|
894
|
-
|
|
1894
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
1895
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentListModel).writeRight();
|
|
1896
|
+
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
1897
|
+
when(_this.componentListModel).changes(function (is, was) {
|
|
1898
|
+
_this.valueChange.emit(is);
|
|
1899
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1900
|
+
}, {
|
|
895
1901
|
initialValue: 'ignore',
|
|
896
|
-
|
|
1902
|
+
// we never fire events during an external changes to the value. This allows
|
|
1903
|
+
// the component to behave when used in the conventional angular
|
|
1904
|
+
// fashion, i.e. [(value)]="..."
|
|
1905
|
+
unless: inExternalChange
|
|
897
1906
|
});
|
|
1907
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
898
1908
|
return _this;
|
|
899
1909
|
}
|
|
900
1910
|
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
1911
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
1912
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
1913
|
+
// and the like.
|
|
901
1914
|
set: function (value) {
|
|
902
1915
|
var _this = this;
|
|
903
|
-
|
|
904
|
-
|
|
1916
|
+
this.setValueIsInProgress.whileTrue(function () {
|
|
1917
|
+
if (!_this.listHolder) {
|
|
905
1918
|
_this.listHolder = new pectin.MutableListModel(value);
|
|
906
1919
|
_this.listModel = _this.listHolder;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
1920
|
+
}
|
|
1921
|
+
else {
|
|
1922
|
+
_this.listHolder.value = value;
|
|
1923
|
+
}
|
|
1924
|
+
});
|
|
912
1925
|
},
|
|
913
1926
|
enumerable: true,
|
|
914
1927
|
configurable: true
|
|
915
1928
|
});
|
|
916
1929
|
__decorate([
|
|
917
|
-
core.Input(), pectin.TrackExternal({ delegateTo: '
|
|
1930
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
918
1931
|
__metadata("design:type", Object)
|
|
919
1932
|
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
920
1933
|
__decorate([
|
|
@@ -948,29 +1961,39 @@
|
|
|
948
1961
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
949
1962
|
*/
|
|
950
1963
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
951
|
-
_this.
|
|
1964
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
|
|
952
1965
|
_this.setValueInProgress = new pectin.Guard();
|
|
1966
|
+
_this.componentValueModel = new pectin.MutableValueModel();
|
|
953
1967
|
_this.valueChange = new core.EventEmitter();
|
|
954
|
-
var
|
|
955
|
-
|
|
1968
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
1969
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentValueModel).writeRight();
|
|
1970
|
+
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
1971
|
+
when(_this.componentValueModel).changes(function (is, was) {
|
|
1972
|
+
_this.valueChange.emit(is);
|
|
1973
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1974
|
+
}, {
|
|
956
1975
|
initialValue: 'ignore',
|
|
957
|
-
|
|
1976
|
+
// we never fire events during an external set value operation. This allows
|
|
1977
|
+
// the component to behave when used in the conventional angular
|
|
1978
|
+
// fashion, i.e. [(value)]="..."
|
|
1979
|
+
unless: inExternalChange
|
|
958
1980
|
});
|
|
1981
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
959
1982
|
return _this;
|
|
960
1983
|
}
|
|
961
1984
|
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
1985
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
1986
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
1987
|
+
// and the like.
|
|
962
1988
|
set: function (value) {
|
|
963
1989
|
var _this = this;
|
|
964
|
-
// we never fire events during an external set value operation. This allows
|
|
965
|
-
// the component to behave when used in the conventional angular
|
|
966
|
-
// fashion, i.e. [(value)]="..."
|
|
967
1990
|
this.setValueInProgress.whileTrue(function () {
|
|
968
|
-
if (!_this.
|
|
969
|
-
_this.
|
|
970
|
-
_this.valueModel = _this.
|
|
1991
|
+
if (!_this.plainValueHolder) {
|
|
1992
|
+
_this.plainValueHolder = new pectin.MutableValueModel(value);
|
|
1993
|
+
_this.valueModel = _this.plainValueHolder;
|
|
971
1994
|
}
|
|
972
1995
|
else {
|
|
973
|
-
_this.
|
|
1996
|
+
_this.plainValueHolder.value = value;
|
|
974
1997
|
}
|
|
975
1998
|
});
|
|
976
1999
|
},
|
|
@@ -978,7 +2001,7 @@
|
|
|
978
2001
|
configurable: true
|
|
979
2002
|
});
|
|
980
2003
|
__decorate([
|
|
981
|
-
core.Input(), pectin.TrackExternal({ delegateTo: '
|
|
2004
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
982
2005
|
__metadata("design:type", Object)
|
|
983
2006
|
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
984
2007
|
__decorate([
|
|
@@ -1020,9 +2043,15 @@
|
|
|
1020
2043
|
}
|
|
1021
2044
|
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
1022
2045
|
};
|
|
2046
|
+
AutocompleteInputComponent.prototype.formatOption = function (option) {
|
|
2047
|
+
return this.optionLabelFormat(option);
|
|
2048
|
+
};
|
|
1023
2049
|
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
1024
2050
|
this.filterValue.value = $event;
|
|
1025
2051
|
};
|
|
2052
|
+
AutocompleteInputComponent.prototype.onSelect = function ($event) {
|
|
2053
|
+
this.valueModel.value = $event.option.value;
|
|
2054
|
+
};
|
|
1026
2055
|
__decorate([
|
|
1027
2056
|
core.Input(), pectin.TrackExternal(),
|
|
1028
2057
|
__metadata("design:type", pectin.ListModel)
|
|
@@ -1050,7 +2079,7 @@
|
|
|
1050
2079
|
AutocompleteInputComponent = __decorate([
|
|
1051
2080
|
core.Component({
|
|
1052
2081
|
selector: 'aup-autocomplete-input',
|
|
1053
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"
|
|
2082
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1054
2083
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1055
2084
|
}),
|
|
1056
2085
|
__metadata("design:paramtypes", [])
|
|
@@ -1081,7 +2110,7 @@
|
|
|
1081
2110
|
CheckboxInputComponent = __decorate([
|
|
1082
2111
|
core.Component({
|
|
1083
2112
|
selector: 'aup-checkbox-input',
|
|
1084
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
2113
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
1085
2114
|
styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
1086
2115
|
}),
|
|
1087
2116
|
__metadata("design:paramtypes", [])
|
|
@@ -1093,7 +2122,7 @@
|
|
|
1093
2122
|
* Using templates:
|
|
1094
2123
|
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1095
2124
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1096
|
-
* <ng-template #
|
|
2125
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1097
2126
|
* </aup-multiple-select_input>
|
|
1098
2127
|
*/
|
|
1099
2128
|
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -1117,18 +2146,10 @@
|
|
|
1117
2146
|
core.Input(),
|
|
1118
2147
|
__metadata("design:type", Object)
|
|
1119
2148
|
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
1120
|
-
__decorate([
|
|
1121
|
-
core.Input(),
|
|
1122
|
-
__metadata("design:type", Boolean)
|
|
1123
|
-
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
1124
2149
|
__decorate([
|
|
1125
2150
|
core.ContentChild('optionTemplate'),
|
|
1126
2151
|
__metadata("design:type", core.TemplateRef)
|
|
1127
2152
|
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1128
|
-
__decorate([
|
|
1129
|
-
core.ContentChild('nilOptionTemplate'),
|
|
1130
|
-
__metadata("design:type", core.TemplateRef)
|
|
1131
|
-
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1132
2153
|
__decorate([
|
|
1133
2154
|
core.Input(),
|
|
1134
2155
|
__metadata("design:type", Function)
|
|
@@ -1136,7 +2157,7 @@
|
|
|
1136
2157
|
MultipleSelectInputComponent = __decorate([
|
|
1137
2158
|
core.Component({
|
|
1138
2159
|
selector: 'aup-multiple-select-input',
|
|
1139
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"
|
|
2160
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1140
2161
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1141
2162
|
}),
|
|
1142
2163
|
__metadata("design:paramtypes", [])
|
|
@@ -1167,7 +2188,7 @@
|
|
|
1167
2188
|
NumberInputComponent = __decorate([
|
|
1168
2189
|
core.Component({
|
|
1169
2190
|
selector: 'aup-number-input',
|
|
1170
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
2191
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1171
2192
|
styles: [""]
|
|
1172
2193
|
}),
|
|
1173
2194
|
__metadata("design:paramtypes", [])
|
|
@@ -1187,7 +2208,7 @@
|
|
|
1187
2208
|
PasswordInputComponent = __decorate([
|
|
1188
2209
|
core.Component({
|
|
1189
2210
|
selector: 'aup-password-input',
|
|
1190
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
2211
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1191
2212
|
styles: [""]
|
|
1192
2213
|
}),
|
|
1193
2214
|
__metadata("design:paramtypes", [])
|
|
@@ -1199,7 +2220,7 @@
|
|
|
1199
2220
|
* Using templates:
|
|
1200
2221
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1201
2222
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1202
|
-
* <ng-template #
|
|
2223
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1203
2224
|
* </aup-select_input>
|
|
1204
2225
|
*/
|
|
1205
2226
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -1242,7 +2263,7 @@
|
|
|
1242
2263
|
SelectInputComponent = __decorate([
|
|
1243
2264
|
core.Component({
|
|
1244
2265
|
selector: 'aup-select-input',
|
|
1245
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
2266
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1246
2267
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1247
2268
|
}),
|
|
1248
2269
|
__metadata("design:paramtypes", [])
|
|
@@ -1256,9 +2277,9 @@
|
|
|
1256
2277
|
var _this = _super.call(this) || this;
|
|
1257
2278
|
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1258
2279
|
_this.clearCommand = pectin.Command.create(function () {
|
|
1259
|
-
_this.
|
|
2280
|
+
_this.componentValueModel.value = null;
|
|
1260
2281
|
});
|
|
1261
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
2282
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
|
|
1262
2283
|
return _this;
|
|
1263
2284
|
}
|
|
1264
2285
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
@@ -1274,7 +2295,7 @@
|
|
|
1274
2295
|
StringInputComponent = __decorate([
|
|
1275
2296
|
core.Component({
|
|
1276
2297
|
selector: 'aup-string-input',
|
|
1277
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
2298
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
1278
2299
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1279
2300
|
}),
|
|
1280
2301
|
__metadata("design:paramtypes", [])
|
|
@@ -1305,7 +2326,7 @@
|
|
|
1305
2326
|
TextInputComponent = __decorate([
|
|
1306
2327
|
core.Component({
|
|
1307
2328
|
selector: 'aup-text-input',
|
|
1308
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
2329
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1309
2330
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1310
2331
|
}),
|
|
1311
2332
|
__metadata("design:paramtypes", [])
|
|
@@ -1313,9 +2334,12 @@
|
|
|
1313
2334
|
return TextInputComponent;
|
|
1314
2335
|
}(AbstractValueInputComponent));
|
|
1315
2336
|
|
|
1316
|
-
|
|
2337
|
+
exports.ɵbk = /** @class */ (function () {
|
|
1317
2338
|
function IconComponent() {
|
|
2339
|
+
this.allowedPrefixes = typescriptStringEnums.Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
2340
|
+
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1318
2341
|
}
|
|
2342
|
+
IconComponent_1 = IconComponent;
|
|
1319
2343
|
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1320
2344
|
get: function () {
|
|
1321
2345
|
return this._icon;
|
|
@@ -1335,25 +2359,33 @@
|
|
|
1335
2359
|
if (this.prefix) {
|
|
1336
2360
|
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1337
2361
|
}
|
|
1338
|
-
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "
|
|
2362
|
+
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
1339
2363
|
},
|
|
1340
2364
|
enumerable: true,
|
|
1341
2365
|
configurable: true
|
|
1342
2366
|
});
|
|
2367
|
+
var IconComponent_1;
|
|
1343
2368
|
__decorate([
|
|
1344
2369
|
core.Input(),
|
|
1345
2370
|
__metadata("design:type", String),
|
|
1346
2371
|
__metadata("design:paramtypes", [String])
|
|
1347
2372
|
], IconComponent.prototype, "icon", null);
|
|
1348
|
-
IconComponent = __decorate([
|
|
2373
|
+
IconComponent = IconComponent_1 = __decorate([
|
|
1349
2374
|
core.Component({
|
|
1350
2375
|
selector: 'aup-icon',
|
|
1351
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"
|
|
2376
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
1352
2377
|
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
1353
2378
|
})
|
|
1354
2379
|
], IconComponent);
|
|
1355
2380
|
return IconComponent;
|
|
1356
2381
|
}());
|
|
2382
|
+
(function (IconComponent) {
|
|
2383
|
+
IconComponent.IconPrefix = typescriptStringEnums.Enum({
|
|
2384
|
+
SVG: 'svg',
|
|
2385
|
+
FONT_AWESOME: 'fa',
|
|
2386
|
+
MATERIAL: 'mat'
|
|
2387
|
+
});
|
|
2388
|
+
})(exports.ɵbk || (exports.ɵbk = {}));
|
|
1357
2389
|
|
|
1358
2390
|
var NoopComponent = /** @class */ (function () {
|
|
1359
2391
|
function NoopComponent() {
|
|
@@ -1830,7 +2862,8 @@
|
|
|
1830
2862
|
|
|
1831
2863
|
var noop = function () {
|
|
1832
2864
|
};
|
|
1833
|
-
var ɵ0 = noop;
|
|
2865
|
+
var ɵ0$3 = noop;
|
|
2866
|
+
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1834
2867
|
var ColumnModel = /** @class */ (function () {
|
|
1835
2868
|
function ColumnModel(columnId, defaults) {
|
|
1836
2869
|
this.columnId = columnId;
|
|
@@ -1948,6 +2981,35 @@
|
|
|
1948
2981
|
}));
|
|
1949
2982
|
return this;
|
|
1950
2983
|
};
|
|
2984
|
+
PropertyColumnModel.prototype.mutableCellRenderer = function (componentType, options) {
|
|
2985
|
+
var _this = this;
|
|
2986
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2987
|
+
// keep a local copy most recent row value so it's available to teh
|
|
2988
|
+
// edit callback without having to add/remove subscribers all the time.
|
|
2989
|
+
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2990
|
+
var disableEditCallback = false;
|
|
2991
|
+
if (firstTime) {
|
|
2992
|
+
if (___default__default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2993
|
+
options.onComponentInit(component);
|
|
2994
|
+
}
|
|
2995
|
+
// install our edit callback
|
|
2996
|
+
component.onValueEdited(function (is, was) {
|
|
2997
|
+
if (!disableEditCallback) {
|
|
2998
|
+
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2999
|
+
}
|
|
3000
|
+
});
|
|
3001
|
+
}
|
|
3002
|
+
// now push the value the component and disable the callback just incase the component misbehaves
|
|
3003
|
+
// and fires a value change during the operation.
|
|
3004
|
+
disableEditCallback = true;
|
|
3005
|
+
component.value = rowData.row[_this.property];
|
|
3006
|
+
disableEditCallback = false;
|
|
3007
|
+
if (!___default__default.isFunction(options) && ___default__default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
3008
|
+
options.onRowUpdate(component, rowData.row);
|
|
3009
|
+
}
|
|
3010
|
+
}));
|
|
3011
|
+
return this;
|
|
3012
|
+
};
|
|
1951
3013
|
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, onComponentInit) {
|
|
1952
3014
|
var _this = this;
|
|
1953
3015
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
@@ -2024,10 +3086,23 @@
|
|
|
2024
3086
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2025
3087
|
return _this;
|
|
2026
3088
|
}
|
|
2027
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
3089
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
2028
3090
|
var _this = this;
|
|
2029
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
3091
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
3092
|
+
if (firstTime) {
|
|
3093
|
+
if (___default__default.isFunction(onComponentInitOrOptions)) {
|
|
3094
|
+
onComponentInitOrOptions(component);
|
|
3095
|
+
}
|
|
3096
|
+
else {
|
|
3097
|
+
if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3098
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
2030
3102
|
component.value = _this.getValue(rowData.row);
|
|
3103
|
+
if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
3104
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
3105
|
+
}
|
|
2031
3106
|
}));
|
|
2032
3107
|
return this;
|
|
2033
3108
|
};
|
|
@@ -2200,6 +3275,9 @@
|
|
|
2200
3275
|
this._editorSessions = new pectin.MutableListModel();
|
|
2201
3276
|
this.rowClassNamePredicates = [];
|
|
2202
3277
|
this._createForm = function (row) { return new pectin.DirtyTrackingForm(); };
|
|
3278
|
+
this.trackBy = function (index, item) {
|
|
3279
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
3280
|
+
};
|
|
2203
3281
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2204
3282
|
var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2205
3283
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2226,12 +3304,6 @@
|
|
|
2226
3304
|
enumerable: true,
|
|
2227
3305
|
configurable: true
|
|
2228
3306
|
});
|
|
2229
|
-
TableModel.prototype.getTrackByFunction = function () {
|
|
2230
|
-
var _this = this;
|
|
2231
|
-
return function (index, item) {
|
|
2232
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2233
|
-
};
|
|
2234
|
-
};
|
|
2235
3307
|
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2236
3308
|
get: function () {
|
|
2237
3309
|
return this._columns.readonly;
|
|
@@ -2257,6 +3329,9 @@
|
|
|
2257
3329
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2258
3330
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2259
3331
|
};
|
|
3332
|
+
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
3333
|
+
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
3334
|
+
};
|
|
2260
3335
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
2261
3336
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2262
3337
|
};
|
|
@@ -2285,12 +3360,14 @@
|
|
|
2285
3360
|
}
|
|
2286
3361
|
return column;
|
|
2287
3362
|
};
|
|
3363
|
+
// removeColumn(column: ColumnModel<Row>) {
|
|
3364
|
+
//
|
|
3365
|
+
// }
|
|
2288
3366
|
TableModel.prototype.columnTextProperties = function (columnTextProperties) {
|
|
2289
3367
|
this._columnTextPropertiesLookup = columnTextProperties;
|
|
2290
3368
|
};
|
|
2291
3369
|
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
2292
|
-
|
|
2293
|
-
return factory ? factory() : undefined;
|
|
3370
|
+
return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
|
|
2294
3371
|
};
|
|
2295
3372
|
TableModel.prototype.startEditSession = function (row) {
|
|
2296
3373
|
var _this = this;
|
|
@@ -2408,7 +3485,7 @@
|
|
|
2408
3485
|
TableComponent = __decorate([
|
|
2409
3486
|
core.Component({
|
|
2410
3487
|
selector: 'aup-table',
|
|
2411
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.
|
|
3488
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n</table>\n",
|
|
2412
3489
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2413
3490
|
}),
|
|
2414
3491
|
__metadata("design:paramtypes", [])
|
|
@@ -2582,14 +3659,71 @@
|
|
|
2582
3659
|
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
2583
3660
|
TableHeaderCellRendererComponent = __decorate([
|
|
2584
3661
|
core.Component({
|
|
2585
|
-
selector: 'aup-table-header-cell-renderer',
|
|
2586
|
-
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
2587
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
3662
|
+
selector: 'aup-table-header-cell-renderer',
|
|
3663
|
+
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
3664
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
3665
|
+
}),
|
|
3666
|
+
__metadata("design:paramtypes", [])
|
|
3667
|
+
], TableHeaderCellRendererComponent);
|
|
3668
|
+
return TableHeaderCellRendererComponent;
|
|
3669
|
+
}());
|
|
3670
|
+
|
|
3671
|
+
var MenuItemData = /** @class */ (function () {
|
|
3672
|
+
function MenuItemData(factory, face) {
|
|
3673
|
+
this.factory = factory;
|
|
3674
|
+
this.face = face;
|
|
3675
|
+
}
|
|
3676
|
+
return MenuItemData;
|
|
3677
|
+
}());
|
|
3678
|
+
/**
|
|
3679
|
+
*
|
|
3680
|
+
*/
|
|
3681
|
+
var TableRowMenuComponent = /** @class */ (function (_super) {
|
|
3682
|
+
__extends(TableRowMenuComponent, _super);
|
|
3683
|
+
function TableRowMenuComponent() {
|
|
3684
|
+
var _this = _super.call(this) || this;
|
|
3685
|
+
_this.actions = [];
|
|
3686
|
+
_this.moreActions = [];
|
|
3687
|
+
return _this;
|
|
3688
|
+
}
|
|
3689
|
+
TableRowMenuComponent.prototype.registerAction = function (commandFactory, properties) {
|
|
3690
|
+
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
3691
|
+
};
|
|
3692
|
+
TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
|
|
3693
|
+
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3694
|
+
};
|
|
3695
|
+
TableRowMenuComponent.prototype.ngOnInit = function () {
|
|
3696
|
+
};
|
|
3697
|
+
TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
|
|
3698
|
+
var _this = this;
|
|
3699
|
+
var when = pectin.Dsl.disposeWith(this).when;
|
|
3700
|
+
var command = item.factory.create(value);
|
|
3701
|
+
when(command.busy).becomesFalsey(function () {
|
|
3702
|
+
_this.closeMoreMenu();
|
|
3703
|
+
});
|
|
3704
|
+
return command;
|
|
3705
|
+
};
|
|
3706
|
+
TableRowMenuComponent.prototype.closeMoreMenu = function () {
|
|
3707
|
+
this.menu.closeMenu();
|
|
3708
|
+
};
|
|
3709
|
+
__decorate([
|
|
3710
|
+
core.Input(),
|
|
3711
|
+
__metadata("design:type", Object)
|
|
3712
|
+
], TableRowMenuComponent.prototype, "value", void 0);
|
|
3713
|
+
__decorate([
|
|
3714
|
+
core.ViewChild(menu.MatMenuTrigger),
|
|
3715
|
+
__metadata("design:type", menu.MatMenuTrigger)
|
|
3716
|
+
], TableRowMenuComponent.prototype, "menu", void 0);
|
|
3717
|
+
TableRowMenuComponent = __decorate([
|
|
3718
|
+
core.Component({
|
|
3719
|
+
selector: 'aup-table-row-menu',
|
|
3720
|
+
template: "\n <aup-tool-bar>\n <aup-command *ngFor=\"let action of actions\" [command]=\"action.factory.create(value)\"\n [face]=\"action.faceModel\"></aup-command>\n </aup-tool-bar>\n <ng-container *ngIf=\"moreActions.length > 0\">\n <aup-more-menu>\n <aup-command *ngFor=\"let action of moreActions\" [command]=\"action.factory.create(value)\"\n [face]=\"action.faceModel\"></aup-command>\n </aup-more-menu>\n </ng-container>\n ",
|
|
3721
|
+
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
2588
3722
|
}),
|
|
2589
3723
|
__metadata("design:paramtypes", [])
|
|
2590
|
-
],
|
|
2591
|
-
return
|
|
2592
|
-
}());
|
|
3724
|
+
], TableRowMenuComponent);
|
|
3725
|
+
return TableRowMenuComponent;
|
|
3726
|
+
}(DisposableComponent));
|
|
2593
3727
|
|
|
2594
3728
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
2595
3729
|
__extends(VerticalFocusContainerComponent, _super);
|
|
@@ -2715,8 +3849,19 @@
|
|
|
2715
3849
|
SelectHeaderCellRendererComponent,
|
|
2716
3850
|
DefaultHeaderCellRendererComponent,
|
|
2717
3851
|
TableHeaderCellRendererComponent,
|
|
2718
|
-
|
|
2719
|
-
SectionHeaderComponent
|
|
3852
|
+
exports.ɵbk,
|
|
3853
|
+
SectionHeaderComponent,
|
|
3854
|
+
TableRowMenuComponent,
|
|
3855
|
+
ToolBarComponent,
|
|
3856
|
+
CommandComponent,
|
|
3857
|
+
PopupMenuComponent,
|
|
3858
|
+
CommandGroupComponent,
|
|
3859
|
+
CommandFaceComponent,
|
|
3860
|
+
MoreMenuComponent,
|
|
3861
|
+
SeparatorComponent,
|
|
3862
|
+
FlexComponent,
|
|
3863
|
+
CommandGroupMenuRendererComponent,
|
|
3864
|
+
CommandGroupRendererComponent
|
|
2720
3865
|
],
|
|
2721
3866
|
imports: [
|
|
2722
3867
|
common.CommonModule,
|
|
@@ -2735,7 +3880,9 @@
|
|
|
2735
3880
|
scrolling.CdkScrollableModule,
|
|
2736
3881
|
angularFontawesome.FontAwesomeModule,
|
|
2737
3882
|
tooltip.MatTooltipModule,
|
|
2738
|
-
autocomplete.MatAutocompleteModule
|
|
3883
|
+
autocomplete.MatAutocompleteModule,
|
|
3884
|
+
menu.MatMenuModule,
|
|
3885
|
+
divider.MatDividerModule
|
|
2739
3886
|
],
|
|
2740
3887
|
exports: [
|
|
2741
3888
|
NumberInputComponent,
|
|
@@ -2758,23 +3905,20 @@
|
|
|
2758
3905
|
TableComponent,
|
|
2759
3906
|
EditRowControls,
|
|
2760
3907
|
ColumnTemplateDirective,
|
|
2761
|
-
|
|
2762
|
-
SectionHeaderComponent
|
|
3908
|
+
exports.ɵbk,
|
|
3909
|
+
SectionHeaderComponent,
|
|
3910
|
+
TableRowMenuComponent,
|
|
3911
|
+
CommandGroupComponent,
|
|
3912
|
+
ToolBarComponent,
|
|
3913
|
+
CommandComponent,
|
|
3914
|
+
PopupMenuComponent,
|
|
3915
|
+
CommandFaceComponent,
|
|
3916
|
+
MoreMenuComponent,
|
|
3917
|
+
SeparatorComponent,
|
|
3918
|
+
FlexComponent
|
|
2763
3919
|
],
|
|
2764
3920
|
providers: [
|
|
2765
3921
|
FocusBindingFactory
|
|
2766
|
-
// {
|
|
2767
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2768
|
-
// type: 'string',
|
|
2769
|
-
// editorClass: StringInputComponent
|
|
2770
|
-
// }, multi: true
|
|
2771
|
-
// },
|
|
2772
|
-
// {
|
|
2773
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2774
|
-
// type: 'number',
|
|
2775
|
-
// editorClass: NumberInputComponent
|
|
2776
|
-
// }, multi: true
|
|
2777
|
-
// }
|
|
2778
3922
|
]
|
|
2779
3923
|
}),
|
|
2780
3924
|
__metadata("design:paramtypes", [angularFontawesome.FaIconLibrary])
|
|
@@ -2853,7 +3997,7 @@
|
|
|
2853
3997
|
core.Component({
|
|
2854
3998
|
selector: 'aup-activity-actions',
|
|
2855
3999
|
template: "<ng-container *ngIf=\"hasCancelCommand()\">\n <button class=\"cancel\" *ngIf=\"!hasCancelText()\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <aup-icon icon=\"mat:clear\"></aup-icon>\n </button>\n <button class=\"cancel\" *ngIf=\"hasCancelText()\" mat-button [pectinCommand]=\"cancelCommand\">{{cancelText}}</button>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmCommand()\">\n <button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <aup-icon icon=\"mat:done\"></aup-icon>\n </button>\n <button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n</ng-container>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
2856
|
-
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}:host.align-stretch>.cancel{-ms-grid-row:1;-ms-grid-column:1}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}:host.align-stretch>.confirm{-ms-grid-row:1;-ms-grid-column:3}.
|
|
4000
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}:host.align-stretch>.cancel{-ms-grid-row:1;-ms-grid-column:1}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}:host.align-stretch>.confirm{-ms-grid-row:1;-ms-grid-column:3}.column{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-row:1;-ms-grid-column:1}:host.align-stretch>.column{-ms-grid-row:1;-ms-grid-column:2}"]
|
|
2857
4001
|
})
|
|
2858
4002
|
], ActivityActionsComponent);
|
|
2859
4003
|
return ActivityActionsComponent;
|
|
@@ -2865,13 +4009,27 @@
|
|
|
2865
4009
|
function Activity() {
|
|
2866
4010
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2867
4011
|
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
4012
|
+
_this._focusedModel = _this.registerDisposable(new pectin.DelegatingValueModel());
|
|
2868
4013
|
_this.class = 'aup-activity';
|
|
2869
4014
|
return _this;
|
|
2870
4015
|
}
|
|
4016
|
+
Object.defineProperty(Activity.prototype, "isFocused", {
|
|
4017
|
+
get: function () {
|
|
4018
|
+
return this._focusedModel.value;
|
|
4019
|
+
},
|
|
4020
|
+
enumerable: true,
|
|
4021
|
+
configurable: true
|
|
4022
|
+
});
|
|
2871
4023
|
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
4024
|
+
var _this = this;
|
|
4025
|
+
var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, when = _a.when;
|
|
2872
4026
|
typescriptUtilities.assert.isNil(this._activityContext);
|
|
2873
4027
|
this._activityContext = activityContext;
|
|
2874
4028
|
this._interactionContext = nestedInteractionContext;
|
|
4029
|
+
this._focusedModel.setDelegate(activityContext.focused);
|
|
4030
|
+
when(this._focusedModel).becomesTruthy(function () {
|
|
4031
|
+
_this.onActivityReady();
|
|
4032
|
+
});
|
|
2875
4033
|
};
|
|
2876
4034
|
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
2877
4035
|
get: function () {
|
|
@@ -2897,6 +4055,13 @@
|
|
|
2897
4055
|
enumerable: true,
|
|
2898
4056
|
configurable: true
|
|
2899
4057
|
});
|
|
4058
|
+
Object.defineProperty(Activity.prototype, "focused", {
|
|
4059
|
+
get: function () {
|
|
4060
|
+
return this._focusedModel.readonly;
|
|
4061
|
+
},
|
|
4062
|
+
enumerable: true,
|
|
4063
|
+
configurable: true
|
|
4064
|
+
});
|
|
2900
4065
|
Activity.prototype.busyWhile = function (busyModel) {
|
|
2901
4066
|
this._busyModel.setDelegate(busyModel);
|
|
2902
4067
|
};
|
|
@@ -2910,6 +4075,11 @@
|
|
|
2910
4075
|
core.HostBinding('class'),
|
|
2911
4076
|
__metadata("design:type", Object)
|
|
2912
4077
|
], Activity.prototype, "class", void 0);
|
|
4078
|
+
__decorate([
|
|
4079
|
+
core.HostBinding('attr.focused'),
|
|
4080
|
+
__metadata("design:type", Object),
|
|
4081
|
+
__metadata("design:paramtypes", [])
|
|
4082
|
+
], Activity.prototype, "isFocused", null);
|
|
2913
4083
|
return Activity;
|
|
2914
4084
|
}(DisposableComponent));
|
|
2915
4085
|
|
|
@@ -3048,6 +4218,7 @@
|
|
|
3048
4218
|
this.onComplete = onComplete;
|
|
3049
4219
|
this._complete = false;
|
|
3050
4220
|
this.deferredResult = pectin.Deferred.defer();
|
|
4221
|
+
this.focusedModel = new pectin.MutableValueModel();
|
|
3051
4222
|
}
|
|
3052
4223
|
ActivityRef.prototype.isActivityRealised = function () {
|
|
3053
4224
|
return !!this._activity;
|
|
@@ -3063,6 +4234,16 @@
|
|
|
3063
4234
|
enumerable: true,
|
|
3064
4235
|
configurable: true
|
|
3065
4236
|
});
|
|
4237
|
+
ActivityRef.prototype.setFocused = function (focused) {
|
|
4238
|
+
this.focusedModel.value = focused;
|
|
4239
|
+
};
|
|
4240
|
+
Object.defineProperty(ActivityRef.prototype, "focused", {
|
|
4241
|
+
get: function () {
|
|
4242
|
+
return this.focusedModel.value;
|
|
4243
|
+
},
|
|
4244
|
+
enumerable: true,
|
|
4245
|
+
configurable: true
|
|
4246
|
+
});
|
|
3066
4247
|
ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
|
|
3067
4248
|
pectin.assert.isNil(this._activity);
|
|
3068
4249
|
this._activity = activity;
|
|
@@ -3073,7 +4254,8 @@
|
|
|
3073
4254
|
},
|
|
3074
4255
|
onCancel: function (error) {
|
|
3075
4256
|
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
3076
|
-
}
|
|
4257
|
+
},
|
|
4258
|
+
focused: this.focusedModel.readonly
|
|
3077
4259
|
});
|
|
3078
4260
|
};
|
|
3079
4261
|
ActivityRef.prototype.finishActivity = function (resolveOrReject) {
|
|
@@ -3111,7 +4293,7 @@
|
|
|
3111
4293
|
},
|
|
3112
4294
|
set: function (activityRef) {
|
|
3113
4295
|
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
3114
|
-
typescriptUtilities.lang.illegalState(
|
|
4296
|
+
typescriptUtilities.lang.illegalState('changing activity before previous one has completed');
|
|
3115
4297
|
}
|
|
3116
4298
|
this._activityRef = activityRef;
|
|
3117
4299
|
this.loadActivity(activityRef);
|
|
@@ -3174,8 +4356,9 @@
|
|
|
3174
4356
|
function ActivityContainerComponent() {
|
|
3175
4357
|
var _this = _super.call(this) || this;
|
|
3176
4358
|
_this.dynamicHeight = false;
|
|
3177
|
-
_this.
|
|
4359
|
+
_this.activityRefs = [];
|
|
3178
4360
|
_this.garbage = new pectin.GarbageCollector();
|
|
4361
|
+
_this.inAnimation = new pectin.MutableValueModel(false);
|
|
3179
4362
|
return _this;
|
|
3180
4363
|
}
|
|
3181
4364
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -3213,6 +4396,7 @@
|
|
|
3213
4396
|
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
3214
4397
|
return this.garbage.registerDisposable(disposable);
|
|
3215
4398
|
};
|
|
4399
|
+
// @Trace()
|
|
3216
4400
|
ActivityContainerComponent.prototype.dispose = function () {
|
|
3217
4401
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
3218
4402
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -3223,7 +4407,7 @@
|
|
|
3223
4407
|
if (!this.isActive()) {
|
|
3224
4408
|
typescriptUtilities.lang.illegalState('no activity in progress');
|
|
3225
4409
|
}
|
|
3226
|
-
return ___default__default.findLast(this.
|
|
4410
|
+
return ___default__default.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
|
|
3227
4411
|
};
|
|
3228
4412
|
/**
|
|
3229
4413
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3262,14 +4446,14 @@
|
|
|
3262
4446
|
});
|
|
3263
4447
|
this.launchActivity(activityRef);
|
|
3264
4448
|
// if this is the first activity let the interaction service know.
|
|
3265
|
-
if (this.
|
|
4449
|
+
if (this.activityRefs.length === 1) {
|
|
3266
4450
|
// console.log('Now active!!!');
|
|
3267
4451
|
this.interactionServiceApi.notifyActive(this);
|
|
3268
4452
|
}
|
|
3269
4453
|
return activityRef.activityResult;
|
|
3270
4454
|
};
|
|
3271
4455
|
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
3272
|
-
return this.
|
|
4456
|
+
return this.activityRefs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
3273
4457
|
};
|
|
3274
4458
|
/**
|
|
3275
4459
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3296,7 +4480,7 @@
|
|
|
3296
4480
|
// Without this our animation done wasn't called when a single
|
|
3297
4481
|
// new activity followed a single tab activity (since we're tracking
|
|
3298
4482
|
// by activity index)
|
|
3299
|
-
this.
|
|
4483
|
+
this.activityRefs = [];
|
|
3300
4484
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
3301
4485
|
this._deferredCleanUp = promise
|
|
3302
4486
|
.finally(function () {
|
|
@@ -3306,14 +4490,15 @@
|
|
|
3306
4490
|
};
|
|
3307
4491
|
// @Trace()
|
|
3308
4492
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
3309
|
-
var cleanedTabs = this.
|
|
3310
|
-
this.
|
|
4493
|
+
var cleanedTabs = this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
4494
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3311
4495
|
this.synchroniseSelectedTabIndex();
|
|
3312
4496
|
};
|
|
3313
4497
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
3314
4498
|
return index;
|
|
3315
4499
|
};
|
|
3316
4500
|
;
|
|
4501
|
+
// @Trace()
|
|
3317
4502
|
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
3318
4503
|
if (this.onAnimationFinishedJob) {
|
|
3319
4504
|
this.onAnimationFinishedJob();
|
|
@@ -3323,15 +4508,21 @@
|
|
|
3323
4508
|
/**
|
|
3324
4509
|
* Synchronises the selected tab index.
|
|
3325
4510
|
*/
|
|
4511
|
+
// @Trace()
|
|
3326
4512
|
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
3327
4513
|
var _this = this;
|
|
3328
4514
|
var previousIndex = this.tabs.selectedIndex;
|
|
3329
4515
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
3330
4516
|
if (previousIndex !== newIndex) {
|
|
4517
|
+
this.inAnimation.value = true;
|
|
4518
|
+
this.activityRefs[newIndex].setFocused(false);
|
|
3331
4519
|
this.tabs.selectedIndex = newIndex;
|
|
3332
4520
|
this.onAnimationFinishedJob = function () {
|
|
3333
|
-
_this.
|
|
3334
|
-
_this.
|
|
4521
|
+
_this.activityRefs = _this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
4522
|
+
_this.inAnimation.value = false;
|
|
4523
|
+
_this.activityRefs.forEach(function (ref, index) {
|
|
4524
|
+
ref.setFocused(index === newIndex);
|
|
4525
|
+
});
|
|
3335
4526
|
};
|
|
3336
4527
|
}
|
|
3337
4528
|
};
|
|
@@ -3339,6 +4530,10 @@
|
|
|
3339
4530
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
3340
4531
|
};
|
|
3341
4532
|
// @Trace()
|
|
4533
|
+
ActivityContainerComponent.prototype.getSelectedTabIndex = function () {
|
|
4534
|
+
return this.tabs.selectedIndex;
|
|
4535
|
+
};
|
|
4536
|
+
// @Trace()
|
|
3342
4537
|
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
3343
4538
|
var _this = this;
|
|
3344
4539
|
if (this.syncSelectedTabTimeout) {
|
|
@@ -3361,16 +4556,10 @@
|
|
|
3361
4556
|
core.ViewChildren(ActivityOutletComponent),
|
|
3362
4557
|
__metadata("design:type", core.QueryList)
|
|
3363
4558
|
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
3364
|
-
__decorate([
|
|
3365
|
-
pectin.Trace(),
|
|
3366
|
-
__metadata("design:type", Function),
|
|
3367
|
-
__metadata("design:paramtypes", []),
|
|
3368
|
-
__metadata("design:returntype", void 0)
|
|
3369
|
-
], ActivityContainerComponent.prototype, "dispose", null);
|
|
3370
4559
|
ActivityContainerComponent = __decorate([
|
|
3371
4560
|
core.Component({
|
|
3372
4561
|
selector: 'aup-activity-container',
|
|
3373
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let
|
|
4562
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </mat-tab>\n</mat-tab-group>\n",
|
|
3374
4563
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3375
4564
|
}),
|
|
3376
4565
|
__metadata("design:paramtypes", [])
|
|
@@ -3415,7 +4604,7 @@
|
|
|
3415
4604
|
}());
|
|
3416
4605
|
|
|
3417
4606
|
var inplaceMonitorCount = 0;
|
|
3418
|
-
exports.ɵ
|
|
4607
|
+
exports.ɵci = /** @class */ (function () {
|
|
3419
4608
|
function InteractionService(modelInteractionContextFactory) {
|
|
3420
4609
|
this.modelInteractionContextFactory = modelInteractionContextFactory;
|
|
3421
4610
|
this.garbage = new pectin.GarbageCollector();
|
|
@@ -3560,7 +4749,7 @@
|
|
|
3560
4749
|
return ApiAdapter;
|
|
3561
4750
|
}());
|
|
3562
4751
|
InteractionService.ApiAdapter = ApiAdapter;
|
|
3563
|
-
})(exports.ɵ
|
|
4752
|
+
})(exports.ɵci || (exports.ɵci = {}));
|
|
3564
4753
|
|
|
3565
4754
|
var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
3566
4755
|
__extends(InPlaceInteractionContextComponent, _super);
|
|
@@ -3618,7 +4807,7 @@
|
|
|
3618
4807
|
return this.activityContainerComponent.startActivity(activityType, data, options);
|
|
3619
4808
|
};
|
|
3620
4809
|
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
3621
|
-
{ type: exports.ɵ
|
|
4810
|
+
{ type: exports.ɵci },
|
|
3622
4811
|
{ type: undefined, decorators: [{ type: core.Inject, args: [tabs.MAT_TABS_CONFIG,] }, { type: core.Optional }] }
|
|
3623
4812
|
]; };
|
|
3624
4813
|
__decorate([
|
|
@@ -3636,7 +4825,7 @@
|
|
|
3636
4825
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3637
4826
|
}),
|
|
3638
4827
|
__param(1, core.Inject(tabs.MAT_TABS_CONFIG)), __param(1, core.Optional()),
|
|
3639
|
-
__metadata("design:paramtypes", [exports.ɵ
|
|
4828
|
+
__metadata("design:paramtypes", [exports.ɵci, Object])
|
|
3640
4829
|
], InPlaceInteractionContextComponent);
|
|
3641
4830
|
return InPlaceInteractionContextComponent;
|
|
3642
4831
|
}(DisposableComponent));
|
|
@@ -4175,7 +5364,7 @@
|
|
|
4175
5364
|
AlertDialogComponent
|
|
4176
5365
|
],
|
|
4177
5366
|
providers: [
|
|
4178
|
-
exports.ɵ
|
|
5367
|
+
exports.ɵci
|
|
4179
5368
|
// {
|
|
4180
5369
|
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
4181
5370
|
// }
|
|
@@ -4441,6 +5630,9 @@
|
|
|
4441
5630
|
var _this = _super.call(this) || this;
|
|
4442
5631
|
_this.visitModel = new pectin.MutableValueModel();
|
|
4443
5632
|
_this._inVisitUpdate = new pectin.Guard();
|
|
5633
|
+
_this._active = new pectin.MutableValueModel(false);
|
|
5634
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
5635
|
+
when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
|
|
4444
5636
|
return _this;
|
|
4445
5637
|
}
|
|
4446
5638
|
PlaceComponent_1 = PlaceComponent;
|
|
@@ -4450,7 +5642,7 @@
|
|
|
4450
5642
|
pectin.assert.isNil(this.visitModel.value);
|
|
4451
5643
|
var when = pectin.Dsl.disposeWith(this).when;
|
|
4452
5644
|
this.visitModel.value = visit;
|
|
4453
|
-
pectin.DebugContext.
|
|
5645
|
+
pectin.DebugContext.getOrCreate(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
4454
5646
|
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
4455
5647
|
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
4456
5648
|
notifyVisitChanged(current, previous);
|
|
@@ -4498,6 +5690,19 @@
|
|
|
4498
5690
|
enumerable: true,
|
|
4499
5691
|
configurable: true
|
|
4500
5692
|
});
|
|
5693
|
+
Object.defineProperty(PlaceComponent.prototype, "active", {
|
|
5694
|
+
get: function () {
|
|
5695
|
+
return this._active.readonly;
|
|
5696
|
+
},
|
|
5697
|
+
enumerable: true,
|
|
5698
|
+
configurable: true
|
|
5699
|
+
});
|
|
5700
|
+
/**
|
|
5701
|
+
* Called by the router when the place is ready to interact after any animations have run.
|
|
5702
|
+
*/
|
|
5703
|
+
PlaceComponent.prototype._notifyActive = function (active) {
|
|
5704
|
+
this._active.value = active;
|
|
5705
|
+
};
|
|
4501
5706
|
PlaceComponent.prototype.onPlaceReady = function () {
|
|
4502
5707
|
};
|
|
4503
5708
|
var PlaceComponent_1;
|
|
@@ -5297,7 +6502,7 @@
|
|
|
5297
6502
|
return PopStateNavigation;
|
|
5298
6503
|
}(AbstractPopStateNavigation));
|
|
5299
6504
|
|
|
5300
|
-
exports.ɵ
|
|
6505
|
+
exports.ɵcl = /** @class */ (function () {
|
|
5301
6506
|
function PlaceHistory() {
|
|
5302
6507
|
this._archive = new Map();
|
|
5303
6508
|
this.placeHistoryDepth = 4;
|
|
@@ -5434,7 +6639,7 @@
|
|
|
5434
6639
|
// }
|
|
5435
6640
|
//
|
|
5436
6641
|
// }
|
|
5437
|
-
})(exports.ɵ
|
|
6642
|
+
})(exports.ɵcl || (exports.ɵcl = {}));
|
|
5438
6643
|
|
|
5439
6644
|
exports.UrlSnapshot = /** @class */ (function () {
|
|
5440
6645
|
// TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
|
|
@@ -5598,75 +6803,6 @@
|
|
|
5598
6803
|
return UrlService;
|
|
5599
6804
|
}());
|
|
5600
6805
|
|
|
5601
|
-
var Visit = /** @class */ (function () {
|
|
5602
|
-
function Visit(placeDefinition, visitParameters) {
|
|
5603
|
-
if (visitParameters === void 0) { visitParameters = {}; }
|
|
5604
|
-
this.placeDefinition = placeDefinition;
|
|
5605
|
-
this.visitParameters = visitParameters;
|
|
5606
|
-
}
|
|
5607
|
-
// @Trace()
|
|
5608
|
-
Visit.prototype.getRouteId = function () {
|
|
5609
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
5610
|
-
};
|
|
5611
|
-
// @Trace()
|
|
5612
|
-
Visit.prototype.hasRouteId = function () {
|
|
5613
|
-
return !___default.isNil(this.getRouteId());
|
|
5614
|
-
};
|
|
5615
|
-
/**
|
|
5616
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
5617
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
5618
|
-
* same as the the ValueModel property name.
|
|
5619
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
5620
|
-
*/
|
|
5621
|
-
Visit.prototype.getParameter = function (parameterName) {
|
|
5622
|
-
return this.visitParameters[parameterName];
|
|
5623
|
-
};
|
|
5624
|
-
// @Trace()
|
|
5625
|
-
Visit.prototype.hasParameter = function (parameterName) {
|
|
5626
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
5627
|
-
};
|
|
5628
|
-
Visit.prototype.replace = function (parameter, value) {
|
|
5629
|
-
var _a;
|
|
5630
|
-
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
5631
|
-
};
|
|
5632
|
-
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
5633
|
-
var _this = this;
|
|
5634
|
-
// todo: whitelist parameters.
|
|
5635
|
-
var routeParameterKeys = Object.keys(routeParams);
|
|
5636
|
-
var params = {};
|
|
5637
|
-
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
5638
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
5639
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
5640
|
-
params[def.name] = routeParams[def.name];
|
|
5641
|
-
}
|
|
5642
|
-
}
|
|
5643
|
-
else {
|
|
5644
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
5645
|
-
// defaults and remember sanitisation process.
|
|
5646
|
-
var value = _this.getParameter(def.name);
|
|
5647
|
-
if (_this.hasParameter(def.name)) {
|
|
5648
|
-
params[def.name] = value;
|
|
5649
|
-
}
|
|
5650
|
-
}
|
|
5651
|
-
});
|
|
5652
|
-
return new Visit(this.placeDefinition, params);
|
|
5653
|
-
};
|
|
5654
|
-
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
5655
|
-
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
5656
|
-
var sameRouteParameters = ___default.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
5657
|
-
return !samePlace || !sameRouteParameters;
|
|
5658
|
-
};
|
|
5659
|
-
Visit.prototype.hasChangedFrom = function (other) {
|
|
5660
|
-
var sameNonRouteParameters = ___default.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
5661
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
5662
|
-
};
|
|
5663
|
-
Visit.prototype.toDebugString = function () {
|
|
5664
|
-
var _this = this;
|
|
5665
|
-
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
5666
|
-
};
|
|
5667
|
-
return Visit;
|
|
5668
|
-
}());
|
|
5669
|
-
|
|
5670
6806
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
5671
6807
|
__extends(PlaceRouter, _super);
|
|
5672
6808
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
@@ -5862,6 +6998,7 @@
|
|
|
5862
6998
|
enumerable: true,
|
|
5863
6999
|
configurable: true
|
|
5864
7000
|
});
|
|
7001
|
+
// @Trace()
|
|
5865
7002
|
PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
|
|
5866
7003
|
return __awaiter(this, void 0, void 0, function () {
|
|
5867
7004
|
var _this = this;
|
|
@@ -5957,30 +7094,93 @@
|
|
|
5957
7094
|
PlaceRouter.ctorParameters = function () { return [
|
|
5958
7095
|
{ type: router.Router },
|
|
5959
7096
|
{ type: common.Location },
|
|
5960
|
-
{ type: exports.ɵ
|
|
7097
|
+
{ type: exports.ɵci },
|
|
5961
7098
|
{ type: UrlService },
|
|
5962
|
-
{ type: exports.ɵ
|
|
7099
|
+
{ type: exports.ɵcl }
|
|
5963
7100
|
]; };
|
|
5964
|
-
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵ
|
|
5965
|
-
__decorate([
|
|
5966
|
-
pectin.Trace(),
|
|
5967
|
-
__metadata("design:type", Function),
|
|
5968
|
-
__metadata("design:paramtypes", [Visit, Visit]),
|
|
5969
|
-
__metadata("design:returntype", Promise)
|
|
5970
|
-
], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
|
|
7101
|
+
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵci), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵcl)); }, token: PlaceRouter, providedIn: "root" });
|
|
5971
7102
|
PlaceRouter = __decorate([
|
|
5972
7103
|
core.Injectable({
|
|
5973
7104
|
providedIn: 'root'
|
|
5974
7105
|
}),
|
|
5975
7106
|
__metadata("design:paramtypes", [router.Router,
|
|
5976
7107
|
common.Location,
|
|
5977
|
-
exports.ɵ
|
|
7108
|
+
exports.ɵci,
|
|
5978
7109
|
UrlService,
|
|
5979
|
-
exports.ɵ
|
|
7110
|
+
exports.ɵcl])
|
|
5980
7111
|
], PlaceRouter);
|
|
5981
7112
|
return PlaceRouter;
|
|
5982
7113
|
}(pectin.GarbageCollector));
|
|
5983
7114
|
|
|
7115
|
+
var Visit = /** @class */ (function () {
|
|
7116
|
+
function Visit(placeDefinition, visitParameters) {
|
|
7117
|
+
if (visitParameters === void 0) { visitParameters = {}; }
|
|
7118
|
+
this.placeDefinition = placeDefinition;
|
|
7119
|
+
this.visitParameters = visitParameters;
|
|
7120
|
+
}
|
|
7121
|
+
// @Trace()
|
|
7122
|
+
Visit.prototype.getRouteId = function () {
|
|
7123
|
+
return this.placeDefinition.getRouteIdFrom(this);
|
|
7124
|
+
};
|
|
7125
|
+
// @Trace()
|
|
7126
|
+
Visit.prototype.hasRouteId = function () {
|
|
7127
|
+
return !___default.isNil(this.getRouteId());
|
|
7128
|
+
};
|
|
7129
|
+
/**
|
|
7130
|
+
* Returns the value of the place parameter with the specified name. The parameter
|
|
7131
|
+
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
7132
|
+
* same as the the ValueModel property name.
|
|
7133
|
+
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
7134
|
+
*/
|
|
7135
|
+
Visit.prototype.getParameter = function (parameterName) {
|
|
7136
|
+
return this.visitParameters[parameterName];
|
|
7137
|
+
};
|
|
7138
|
+
// @Trace()
|
|
7139
|
+
Visit.prototype.hasParameter = function (parameterName) {
|
|
7140
|
+
return Object.keys(this.visitParameters).includes(parameterName);
|
|
7141
|
+
};
|
|
7142
|
+
Visit.prototype.replace = function (parameter, value) {
|
|
7143
|
+
var _a;
|
|
7144
|
+
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
7145
|
+
};
|
|
7146
|
+
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
7147
|
+
var _this = this;
|
|
7148
|
+
// todo: whitelist parameters.
|
|
7149
|
+
var routeParameterKeys = Object.keys(routeParams);
|
|
7150
|
+
var params = {};
|
|
7151
|
+
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
7152
|
+
if (def.isRouteId || def.isRouteParameter) {
|
|
7153
|
+
if (routeParameterKeys.includes(def.name)) {
|
|
7154
|
+
params[def.name] = routeParams[def.name];
|
|
7155
|
+
}
|
|
7156
|
+
}
|
|
7157
|
+
else {
|
|
7158
|
+
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
7159
|
+
// defaults and remember sanitisation process.
|
|
7160
|
+
var value = _this.getParameter(def.name);
|
|
7161
|
+
if (_this.hasParameter(def.name)) {
|
|
7162
|
+
params[def.name] = value;
|
|
7163
|
+
}
|
|
7164
|
+
}
|
|
7165
|
+
});
|
|
7166
|
+
return new Visit(this.placeDefinition, params);
|
|
7167
|
+
};
|
|
7168
|
+
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
7169
|
+
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
7170
|
+
var sameRouteParameters = ___default.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
7171
|
+
return !samePlace || !sameRouteParameters;
|
|
7172
|
+
};
|
|
7173
|
+
Visit.prototype.hasChangedFrom = function (other) {
|
|
7174
|
+
var sameNonRouteParameters = ___default.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
7175
|
+
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
7176
|
+
};
|
|
7177
|
+
Visit.prototype.toDebugString = function () {
|
|
7178
|
+
var _this = this;
|
|
7179
|
+
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
7180
|
+
};
|
|
7181
|
+
return Visit;
|
|
7182
|
+
}());
|
|
7183
|
+
|
|
5984
7184
|
var AUP_PLACE_CONFIG = new core.InjectionToken('AUP_PLACE_CONFIG');
|
|
5985
7185
|
|
|
5986
7186
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -6040,6 +7240,7 @@
|
|
|
6040
7240
|
_this._activePlaceModel = new pectin.MutableValueModel();
|
|
6041
7241
|
_this.initialPlaceIndex = null;
|
|
6042
7242
|
_this._isPushingVisitToRoute = new pectin.MutableValueModel(false);
|
|
7243
|
+
_this.isVeryFirstLoad = true;
|
|
6043
7244
|
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
6044
7245
|
_this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
|
|
6045
7246
|
var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
|
|
@@ -6048,8 +7249,9 @@
|
|
|
6048
7249
|
.pluckList('children')
|
|
6049
7250
|
.pluck('component');
|
|
6050
7251
|
var activatePlaceType = chain(_this.activePlaceModel).map(function (p) { return p.constructor; });
|
|
6051
|
-
_this.
|
|
6052
|
-
.otherwise(defaultPlaceAnimationOrder)
|
|
7252
|
+
_this.placesInAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
|
|
7253
|
+
.otherwise(defaultPlaceAnimationOrder);
|
|
7254
|
+
_this.activePlaceAnimationPosition = _this.placesInAnimationOrder
|
|
6053
7255
|
.reduce(function (placesInOrder) {
|
|
6054
7256
|
var placeIndex = 0;
|
|
6055
7257
|
if (activatePlaceType.value) {
|
|
@@ -6060,14 +7262,16 @@
|
|
|
6060
7262
|
}
|
|
6061
7263
|
return ___default.isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
|
|
6062
7264
|
}, { dependsOn: activatePlaceType });
|
|
7265
|
+
_this.animationSupported = _this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
7266
|
+
_this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
|
|
6063
7267
|
// Extract our visit model from the place router.
|
|
6064
7268
|
_this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
|
|
6065
7269
|
_this.routerVisitModel = _this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
|
|
6066
7270
|
_this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
|
|
6067
|
-
when
|
|
7271
|
+
when(_this.navigationInProgress).becomesFalsey(function () {
|
|
6068
7272
|
_this.checkStateAndInitialise();
|
|
6069
7273
|
});
|
|
6070
|
-
when
|
|
7274
|
+
when(_this.outletActivated).becomesTruthy(function () {
|
|
6071
7275
|
_this.checkStateAndInitialise();
|
|
6072
7276
|
});
|
|
6073
7277
|
chain(_this._activePlaceModel)
|
|
@@ -6080,7 +7284,7 @@
|
|
|
6080
7284
|
};
|
|
6081
7285
|
// @Trace()
|
|
6082
7286
|
PlaceOutletComponent.prototype.getAnimationOrder = function () {
|
|
6083
|
-
return this.
|
|
7287
|
+
return this.activePlaceAnimationPosition.value;
|
|
6084
7288
|
};
|
|
6085
7289
|
Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
|
|
6086
7290
|
get: function () {
|
|
@@ -6091,7 +7295,10 @@
|
|
|
6091
7295
|
});
|
|
6092
7296
|
// @Trace()
|
|
6093
7297
|
PlaceOutletComponent.prototype.navigate = function (visit) {
|
|
6094
|
-
//
|
|
7298
|
+
// const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
|
|
7299
|
+
// if (!place) {
|
|
7300
|
+
// lang.illegalState()
|
|
7301
|
+
// }
|
|
6095
7302
|
this.placeRouter.navigate(visit, {
|
|
6096
7303
|
relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
|
|
6097
7304
|
});
|
|
@@ -6117,14 +7324,25 @@
|
|
|
6117
7324
|
enumerable: true,
|
|
6118
7325
|
configurable: true
|
|
6119
7326
|
});
|
|
6120
|
-
// @Trace()
|
|
6121
7327
|
PlaceOutletComponent.prototype.onOutletActivated = function (routerOutlet, place) {
|
|
6122
7328
|
this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
6123
7329
|
this._activePlaceModel.value = place;
|
|
7330
|
+
this.validateAnimationState(place);
|
|
6124
7331
|
this.outletActivated.value = true;
|
|
6125
7332
|
this.checkStateAndInitialise();
|
|
6126
7333
|
};
|
|
6127
|
-
|
|
7334
|
+
PlaceOutletComponent.prototype.validateAnimationState = function (place) {
|
|
7335
|
+
if (this.animateModel.value) {
|
|
7336
|
+
if (this.placesInAnimationOrder.length < 1) {
|
|
7337
|
+
console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');
|
|
7338
|
+
}
|
|
7339
|
+
else {
|
|
7340
|
+
if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {
|
|
7341
|
+
console.error("PlaceOutlet.animate === true but placeAnimationOrder doesn't contain " + place.placeDefinition.component.name + ".");
|
|
7342
|
+
}
|
|
7343
|
+
}
|
|
7344
|
+
}
|
|
7345
|
+
};
|
|
6128
7346
|
PlaceOutletComponent.prototype.onOutletDeactivated = function () {
|
|
6129
7347
|
this.outletActivated.value = false;
|
|
6130
7348
|
this._activePlaceModel.value = null;
|
|
@@ -6141,7 +7359,6 @@
|
|
|
6141
7359
|
this.initialisePlace(routerVisit, activePlace);
|
|
6142
7360
|
}
|
|
6143
7361
|
};
|
|
6144
|
-
// @Trace()
|
|
6145
7362
|
PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
|
|
6146
7363
|
var _this = this;
|
|
6147
7364
|
var visitModel = new pectin.MutableValueModel(routerVisit);
|
|
@@ -6149,9 +7366,18 @@
|
|
|
6149
7366
|
activePlace.initialiseVisit(routerVisit, function (current, previous) {
|
|
6150
7367
|
_this.pushVisitChangeToRoute(previous, current);
|
|
6151
7368
|
});
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
7369
|
+
var finishPlaceLoad = function () {
|
|
7370
|
+
_this._activePlaceModel.value._notifyActive(true);
|
|
7371
|
+
};
|
|
7372
|
+
if (!this.animationEnabled.value || this.isVeryFirstLoad) {
|
|
7373
|
+
// if animation is disabled or this is the very first load then
|
|
7374
|
+
// we won't get our animation done callback so we finish the
|
|
7375
|
+
// process here and now.
|
|
7376
|
+
this.isVeryFirstLoad = false;
|
|
7377
|
+
finishPlaceLoad();
|
|
7378
|
+
}
|
|
7379
|
+
else {
|
|
7380
|
+
this.onAnimationFinishedJob = finishPlaceLoad;
|
|
6155
7381
|
}
|
|
6156
7382
|
var _a = pectin.Dsl.disposeWith(activePlace), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
6157
7383
|
when.valueOf(this.routerVisitModel)
|
|
@@ -6174,8 +7400,9 @@
|
|
|
6174
7400
|
};
|
|
6175
7401
|
// @Trace()
|
|
6176
7402
|
PlaceOutletComponent.prototype.animationDone = function () {
|
|
6177
|
-
if (this.
|
|
6178
|
-
this.
|
|
7403
|
+
if (this.onAnimationFinishedJob) {
|
|
7404
|
+
this.onAnimationFinishedJob();
|
|
7405
|
+
this.onAnimationFinishedJob = undefined;
|
|
6179
7406
|
}
|
|
6180
7407
|
};
|
|
6181
7408
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
@@ -6208,10 +7435,22 @@
|
|
|
6208
7435
|
core.ViewChild('routeOutlet', { static: true }),
|
|
6209
7436
|
__metadata("design:type", router.RouterOutlet)
|
|
6210
7437
|
], PlaceOutletComponent.prototype, "routerOut", void 0);
|
|
7438
|
+
__decorate([
|
|
7439
|
+
pectin.Trace(),
|
|
7440
|
+
__metadata("design:type", Function),
|
|
7441
|
+
__metadata("design:paramtypes", [router.RouterOutlet, exports.PlaceComponent]),
|
|
7442
|
+
__metadata("design:returntype", void 0)
|
|
7443
|
+
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
7444
|
+
__decorate([
|
|
7445
|
+
pectin.Trace(),
|
|
7446
|
+
__metadata("design:type", Function),
|
|
7447
|
+
__metadata("design:paramtypes", []),
|
|
7448
|
+
__metadata("design:returntype", void 0)
|
|
7449
|
+
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
6211
7450
|
PlaceOutletComponent = __decorate([
|
|
6212
7451
|
core.Component({
|
|
6213
7452
|
selector: 'aup-place-outlet',
|
|
6214
|
-
template: "<ng-container *ngIf=\"
|
|
7453
|
+
template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
|
|
6215
7454
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
6216
7455
|
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:scroll}router-outlet{display:none}"]
|
|
6217
7456
|
}),
|
|
@@ -6242,10 +7481,10 @@
|
|
|
6242
7481
|
_this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
|
|
6243
7482
|
return _this;
|
|
6244
7483
|
}
|
|
6245
|
-
AbstractPlaceNavigationComponent.prototype.
|
|
7484
|
+
AbstractPlaceNavigationComponent.prototype.getNavigationFace = function (placeDef) {
|
|
6246
7485
|
var navItem = placeDef.getPlaceData('nav');
|
|
6247
7486
|
return {
|
|
6248
|
-
|
|
7487
|
+
text: function () { return navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']); },
|
|
6249
7488
|
tooltip: function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null); },
|
|
6250
7489
|
icon: function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); }
|
|
6251
7490
|
};
|
|
@@ -6279,7 +7518,7 @@
|
|
|
6279
7518
|
__metadata("design:type", Function),
|
|
6280
7519
|
__metadata("design:paramtypes", [PlaceDefinition]),
|
|
6281
7520
|
__metadata("design:returntype", Object)
|
|
6282
|
-
], AbstractPlaceNavigationComponent.prototype, "
|
|
7521
|
+
], AbstractPlaceNavigationComponent.prototype, "getNavigationFace", null);
|
|
6283
7522
|
AbstractPlaceNavigationComponent = __decorate([
|
|
6284
7523
|
core.Component({
|
|
6285
7524
|
template: ''
|
|
@@ -6340,7 +7579,7 @@
|
|
|
6340
7579
|
ListPlaceNavComponent = __decorate([
|
|
6341
7580
|
core.Component({
|
|
6342
7581
|
selector: 'aup-list-place-nav',
|
|
6343
|
-
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"
|
|
7582
|
+
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [face]=\"getNavigationFace(placeDefinition)\"></aup-command-face>\n </a>\n</mat-nav-list>\n",
|
|
6344
7583
|
styles: [":host{display:flex;flex-direction:column;--selected-border-color:#838383;--selected-color:inherit;--selected-background:#f1f1f1}mat-nav-list{padding-top:0}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}"]
|
|
6345
7584
|
}),
|
|
6346
7585
|
__metadata("design:paramtypes", [PlaceRouter])
|
|
@@ -6348,25 +7587,6 @@
|
|
|
6348
7587
|
return ListPlaceNavComponent;
|
|
6349
7588
|
}(AbstractPlaceNavigationComponent));
|
|
6350
7589
|
|
|
6351
|
-
var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
6352
|
-
__extends(TabbedPlaceNavigationComponent, _super);
|
|
6353
|
-
function TabbedPlaceNavigationComponent(placeRouter) {
|
|
6354
|
-
return _super.call(this, placeRouter) || this;
|
|
6355
|
-
}
|
|
6356
|
-
TabbedPlaceNavigationComponent.ctorParameters = function () { return [
|
|
6357
|
-
{ type: PlaceRouter }
|
|
6358
|
-
]; };
|
|
6359
|
-
TabbedPlaceNavigationComponent = __decorate([
|
|
6360
|
-
core.Component({
|
|
6361
|
-
selector: 'aup-tabbed-place-navigation',
|
|
6362
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNav(placeDefinition).icon()\" [icon]=\"getNav(placeDefinition).icon()\"></aup-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n",
|
|
6363
|
-
styles: [""]
|
|
6364
|
-
}),
|
|
6365
|
-
__metadata("design:paramtypes", [PlaceRouter])
|
|
6366
|
-
], TabbedPlaceNavigationComponent);
|
|
6367
|
-
return TabbedPlaceNavigationComponent;
|
|
6368
|
-
}(AbstractPlaceNavigationComponent));
|
|
6369
|
-
|
|
6370
7590
|
/**
|
|
6371
7591
|
* @example
|
|
6372
7592
|
* // Usage
|
|
@@ -6405,7 +7625,7 @@
|
|
|
6405
7625
|
* (at)Place({
|
|
6406
7626
|
* path: 'myPlace',
|
|
6407
7627
|
* data: {
|
|
6408
|
-
* nav: I18n.places.myPlace.nav
|
|
7628
|
+
* nav: I18n.places.myPlace.nav
|
|
6409
7629
|
* }
|
|
6410
7630
|
* })
|
|
6411
7631
|
*/
|
|
@@ -6441,7 +7661,7 @@
|
|
|
6441
7661
|
SidePlaceNavigationComponent = __decorate([
|
|
6442
7662
|
core.Component({
|
|
6443
7663
|
selector: 'aup-side-place-navigation',
|
|
6444
|
-
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"
|
|
7664
|
+
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(placeDefinition).icon()\" [icon]=\"getNavigationFace(placeDefinition).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
|
|
6445
7665
|
styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width, 56px);--resolved-nav-item-height:var(--nav-item-height, var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width, 235px);--resolved-color:var(--nav-color, rgba(255, 255, 255, 0.9));--resolved-background-color:var(--nav-background-color, #555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]
|
|
6446
7666
|
}),
|
|
6447
7667
|
__metadata("design:paramtypes", [router.Router, PlaceRouter])
|
|
@@ -6449,6 +7669,25 @@
|
|
|
6449
7669
|
return SidePlaceNavigationComponent;
|
|
6450
7670
|
}(AbstractPlaceNavigationComponent));
|
|
6451
7671
|
|
|
7672
|
+
var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
7673
|
+
__extends(TabbedPlaceNavigationComponent, _super);
|
|
7674
|
+
function TabbedPlaceNavigationComponent(placeRouter) {
|
|
7675
|
+
return _super.call(this, placeRouter) || this;
|
|
7676
|
+
}
|
|
7677
|
+
TabbedPlaceNavigationComponent.ctorParameters = function () { return [
|
|
7678
|
+
{ type: PlaceRouter }
|
|
7679
|
+
]; };
|
|
7680
|
+
TabbedPlaceNavigationComponent = __decorate([
|
|
7681
|
+
core.Component({
|
|
7682
|
+
selector: 'aup-tabbed-place-navigation',
|
|
7683
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [face]=\"getNavigationFace(placeDefinition)\"></aup-command-face>\n </a>\n</nav>\n",
|
|
7684
|
+
styles: [""]
|
|
7685
|
+
}),
|
|
7686
|
+
__metadata("design:paramtypes", [PlaceRouter])
|
|
7687
|
+
], TabbedPlaceNavigationComponent);
|
|
7688
|
+
return TabbedPlaceNavigationComponent;
|
|
7689
|
+
}(AbstractPlaceNavigationComponent));
|
|
7690
|
+
|
|
6452
7691
|
var PlaceModule = /** @class */ (function () {
|
|
6453
7692
|
function PlaceModule() {
|
|
6454
7693
|
}
|
|
@@ -6995,8 +8234,7 @@
|
|
|
6995
8234
|
binding: null
|
|
6996
8235
|
};
|
|
6997
8236
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
6998
|
-
pectin.DebugContext.
|
|
6999
|
-
pectin.Logger.get(mechanics.backingModel).tag(tag);
|
|
8237
|
+
pectin.DebugContext.getOrCreate(mechanics.backingModel).tag(tag);
|
|
7000
8238
|
Object.defineProperty(prototype, propertyKey, {
|
|
7001
8239
|
get: function () {
|
|
7002
8240
|
return mechanics.backingModel;
|
|
@@ -7079,7 +8317,13 @@
|
|
|
7079
8317
|
exports.CheckboxInputComponent = CheckboxInputComponent;
|
|
7080
8318
|
exports.ColumnModel = ColumnModel;
|
|
7081
8319
|
exports.ColumnTemplateDirective = ColumnTemplateDirective;
|
|
8320
|
+
exports.CommandComponent = CommandComponent;
|
|
7082
8321
|
exports.CommandDirective = CommandDirective;
|
|
8322
|
+
exports.CommandFaceComponent = CommandFaceComponent;
|
|
8323
|
+
exports.CommandGroup = exports.ɵbo;
|
|
8324
|
+
exports.CommandGroupComponent = CommandGroupComponent;
|
|
8325
|
+
exports.CommandGroupMenuRendererComponent = CommandGroupMenuRendererComponent;
|
|
8326
|
+
exports.CommandGroupRendererComponent = CommandGroupRendererComponent;
|
|
7083
8327
|
exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
|
|
7084
8328
|
exports.ComponentsModule = ComponentsModule;
|
|
7085
8329
|
exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
|
|
@@ -7101,22 +8345,24 @@
|
|
|
7101
8345
|
exports.EditorControlColumnModel = EditorControlColumnModel;
|
|
7102
8346
|
exports.EmptyStateComponent = EmptyStateComponent;
|
|
7103
8347
|
exports.EventCleanUpSession = EventCleanUpSession;
|
|
8348
|
+
exports.FlexComponent = FlexComponent;
|
|
7104
8349
|
exports.FocusBinding = FocusBinding;
|
|
7105
8350
|
exports.FocusBindingDirective = FocusBindingDirective;
|
|
7106
8351
|
exports.FocusBindingFactory = FocusBindingFactory;
|
|
7107
8352
|
exports.FocusContainerComponent = FocusContainerComponent;
|
|
7108
8353
|
exports.FocusableComponent = FocusableComponent;
|
|
7109
8354
|
exports.HEADER_CELL_RENDERER_PORTAL = HEADER_CELL_RENDERER_PORTAL;
|
|
7110
|
-
exports.IconComponent =
|
|
8355
|
+
exports.IconComponent = exports.ɵbk;
|
|
7111
8356
|
exports.InPlaceInteractionContextComponent = InPlaceInteractionContextComponent;
|
|
7112
8357
|
exports.InteractionContextTriggerFor = InteractionContextTriggerFor;
|
|
7113
8358
|
exports.InteractionModule = InteractionModule;
|
|
7114
|
-
exports.InteractionService = exports.ɵ
|
|
8359
|
+
exports.InteractionService = exports.ɵci;
|
|
7115
8360
|
exports.InteractionServiceRoutingAdapter = InteractionServiceRoutingAdapter;
|
|
7116
8361
|
exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
|
|
7117
8362
|
exports.ListPlaceNavComponent = ListPlaceNavComponent;
|
|
7118
8363
|
exports.ListPropertyColumnModel = ListPropertyColumnModel;
|
|
7119
8364
|
exports.ModalInteractionContextFactory = ModalInteractionContextFactory;
|
|
8365
|
+
exports.MoreMenuComponent = MoreMenuComponent;
|
|
7120
8366
|
exports.MultipleSelectInputComponent = MultipleSelectInputComponent;
|
|
7121
8367
|
exports.Navigating = Navigating;
|
|
7122
8368
|
exports.NavigatingDuringInteraction = NavigatingDuringInteraction;
|
|
@@ -7131,7 +8377,7 @@
|
|
|
7131
8377
|
exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
|
|
7132
8378
|
exports.PlaceDefinition = PlaceDefinition;
|
|
7133
8379
|
exports.PlaceGuard = PlaceGuard;
|
|
7134
|
-
exports.PlaceHistory = exports.ɵ
|
|
8380
|
+
exports.PlaceHistory = exports.ɵcl;
|
|
7135
8381
|
exports.PlaceModule = PlaceModule;
|
|
7136
8382
|
exports.PlaceOutletComponent = PlaceOutletComponent;
|
|
7137
8383
|
exports.PlaceRouter = PlaceRouter;
|
|
@@ -7139,6 +8385,7 @@
|
|
|
7139
8385
|
exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
|
|
7140
8386
|
exports.PopStateNavigation = PopStateNavigation;
|
|
7141
8387
|
exports.PopupInteractionContextComponent = PopupInteractionContextComponent;
|
|
8388
|
+
exports.PopupMenuComponent = PopupMenuComponent;
|
|
7142
8389
|
exports.PropertyColumnModel = PropertyColumnModel;
|
|
7143
8390
|
exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
|
|
7144
8391
|
exports.RemoveLastInteractionFromUrlNavigationSession = RemoveLastInteractionFromUrlNavigationSession;
|
|
@@ -7151,6 +8398,7 @@
|
|
|
7151
8398
|
exports.SelectInputActivity = SelectInputActivity;
|
|
7152
8399
|
exports.SelectInputComponent = SelectInputComponent;
|
|
7153
8400
|
exports.SelectionColumnModel = SelectionColumnModel;
|
|
8401
|
+
exports.SeparatorComponent = SeparatorComponent;
|
|
7154
8402
|
exports.SidePlaceNavigationComponent = SidePlaceNavigationComponent;
|
|
7155
8403
|
exports.StringInputActivity = StringInputActivity;
|
|
7156
8404
|
exports.StringInputComponent = StringInputComponent;
|
|
@@ -7164,8 +8412,10 @@
|
|
|
7164
8412
|
exports.TableComponent = TableComponent;
|
|
7165
8413
|
exports.TableHeaderCellRendererComponent = TableHeaderCellRendererComponent;
|
|
7166
8414
|
exports.TableModel = TableModel;
|
|
8415
|
+
exports.TableRowMenuComponent = TableRowMenuComponent;
|
|
7167
8416
|
exports.TemplateCellRendererPortalRef = TemplateCellRendererPortalRef;
|
|
7168
8417
|
exports.TextInputComponent = TextInputComponent;
|
|
8418
|
+
exports.ToolBarComponent = ToolBarComponent;
|
|
7169
8419
|
exports.UrlService = UrlService;
|
|
7170
8420
|
exports.VerticalFocusContainerComponent = VerticalFocusContainerComponent;
|
|
7171
8421
|
exports.Visit = Visit;
|
|
@@ -7191,42 +8441,52 @@
|
|
|
7191
8441
|
exports.ɵbh = SelectHeaderCellRendererComponent;
|
|
7192
8442
|
exports.ɵbi = DefaultHeaderCellRendererComponent;
|
|
7193
8443
|
exports.ɵbj = TableHeaderCellRendererComponent;
|
|
7194
|
-
exports.ɵbk = IconComponent;
|
|
7195
8444
|
exports.ɵbl = SectionHeaderComponent;
|
|
7196
|
-
exports.ɵbm =
|
|
7197
|
-
exports.ɵbn =
|
|
7198
|
-
exports.ɵ
|
|
7199
|
-
exports.ɵ
|
|
7200
|
-
exports.ɵ
|
|
7201
|
-
exports.ɵ
|
|
7202
|
-
exports.ɵ
|
|
7203
|
-
exports.ɵ
|
|
7204
|
-
exports.ɵbv =
|
|
7205
|
-
exports.ɵ
|
|
7206
|
-
exports.ɵ
|
|
8445
|
+
exports.ɵbm = TableRowMenuComponent;
|
|
8446
|
+
exports.ɵbn = ToolBarComponent;
|
|
8447
|
+
exports.ɵbp = CommandComponent;
|
|
8448
|
+
exports.ɵbq = PopupMenuComponent;
|
|
8449
|
+
exports.ɵbr = CommandGroupComponent;
|
|
8450
|
+
exports.ɵbs = CommandFaceComponent;
|
|
8451
|
+
exports.ɵbt = MoreMenuComponent;
|
|
8452
|
+
exports.ɵbu = SeparatorComponent;
|
|
8453
|
+
exports.ɵbv = FlexComponent;
|
|
8454
|
+
exports.ɵbw = CommandGroupMenuRendererComponent;
|
|
8455
|
+
exports.ɵbx = CommandGroupRendererComponent;
|
|
8456
|
+
exports.ɵby = PlaceModule;
|
|
8457
|
+
exports.ɵbz = ComponentsModule;
|
|
7207
8458
|
exports.ɵc = FocusBindingDirective;
|
|
7208
|
-
exports.ɵca =
|
|
7209
|
-
exports.ɵcb =
|
|
7210
|
-
exports.ɵcc =
|
|
7211
|
-
exports.ɵcd =
|
|
7212
|
-
exports.ɵce =
|
|
7213
|
-
exports.ɵcf =
|
|
7214
|
-
exports.ɵ
|
|
7215
|
-
exports.ɵ
|
|
7216
|
-
exports.ɵ
|
|
7217
|
-
exports.ɵ
|
|
7218
|
-
exports.ɵ
|
|
7219
|
-
exports.ɵ
|
|
7220
|
-
exports.ɵ
|
|
7221
|
-
exports.ɵ
|
|
7222
|
-
exports.ɵ
|
|
7223
|
-
exports.ɵ
|
|
7224
|
-
exports.ɵ
|
|
7225
|
-
exports.ɵ
|
|
7226
|
-
exports.ɵ
|
|
7227
|
-
exports.ɵ
|
|
7228
|
-
exports.ɵ
|
|
8459
|
+
exports.ɵca = EmptyStateComponent;
|
|
8460
|
+
exports.ɵcb = BusyOverlayComponent;
|
|
8461
|
+
exports.ɵcc = PlaceOutletComponent;
|
|
8462
|
+
exports.ɵcd = leftRightPlaceAnimation;
|
|
8463
|
+
exports.ɵce = LEFT_RIGHT_PLACE_ANIMATION;
|
|
8464
|
+
exports.ɵcf = AUP_PLACE_CONFIG;
|
|
8465
|
+
exports.ɵch = PlaceRouter;
|
|
8466
|
+
exports.ɵcj = ModalInteractionContextFactory;
|
|
8467
|
+
exports.ɵck = UrlService;
|
|
8468
|
+
exports.ɵcm = TabbedPlaceNavigationComponent;
|
|
8469
|
+
exports.ɵcn = AbstractPlaceNavigationComponent;
|
|
8470
|
+
exports.ɵco = ListPlaceNavComponent;
|
|
8471
|
+
exports.ɵcp = SidePlaceNavigationComponent;
|
|
8472
|
+
exports.ɵcq = InteractionModule;
|
|
8473
|
+
exports.ɵcr = ActivityContainerComponent;
|
|
8474
|
+
exports.ɵcs = AbstractInteractionContext;
|
|
8475
|
+
exports.ɵct = ActivityOutletComponent;
|
|
8476
|
+
exports.ɵcu = ConfirmationDialogComponent;
|
|
8477
|
+
exports.ɵcv = ACTIVITY_DATA;
|
|
8478
|
+
exports.ɵcw = Activity;
|
|
8479
|
+
exports.ɵcy = ConfirmThenDialogComponent;
|
|
8480
|
+
exports.ɵcz = AlertDialogComponent;
|
|
7229
8481
|
exports.ɵd = DisposableComponent;
|
|
8482
|
+
exports.ɵdb = InPlaceInteractionContextComponent;
|
|
8483
|
+
exports.ɵdc = AddItemInteractionContextComponent;
|
|
8484
|
+
exports.ɵdd = ActivityActionsComponent;
|
|
8485
|
+
exports.ɵde = PopupInteractionContextComponent;
|
|
8486
|
+
exports.ɵdf = StringInputActivity;
|
|
8487
|
+
exports.ɵdg = AbstractInputActivity;
|
|
8488
|
+
exports.ɵdh = SelectInputActivity;
|
|
8489
|
+
exports.ɵdi = InteractionContextTriggerFor;
|
|
7230
8490
|
exports.ɵe = FocusBindingFactory;
|
|
7231
8491
|
exports.ɵf = ComponentsModule;
|
|
7232
8492
|
exports.ɵg = AbstractInputComponent;
|