@coolon/angular-ui-powerups 2.0.0-alpha.37 → 2.0.0-alpha.4
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 +0 -226
- package/assets/interaction.scss +0 -5
- package/assets/styles.scss +0 -2
- package/assets/tabs.scss +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +399 -1814
- 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 +54 -67
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +52 -65
- 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/components.module.js +14 -54
- 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 +4 -12
- 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 +6 -51
- 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 +3 -47
- 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/checkbox-input/checkbox-input.component.js +6 -3
- 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 +13 -8
- 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 +6 -3
- 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 +7 -4
- 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 +5 -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 +7 -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 +6 -3
- 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 +4 -17
- 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 +1 -18
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm2015/lib/components/table/{cell-portal-ref.js → cell-protal-ref.js} +3 -7
- package/esm2015/lib/components/table/cell-protal-ref.js.map +1 -0
- package/esm2015/lib/components/table/{cell-portal-ref.metadata.json → cell-protal-ref.metadata.json} +1 -1
- package/esm2015/lib/components/table/column-model.js +11 -66
- 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/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-model.js +12 -15
- 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.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/interaction/activity-ref.js +2 -10
- 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 +1 -18
- 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 +17 -24
- 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 +3 -4
- 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 +16 -56
- 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 +1 -13
- 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 +8 -2
- 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 +3 -2
- 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 +52 -65
- 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/components.module.js +14 -54
- 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 +4 -12
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +6 -56
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +3 -52
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +6 -3
- 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 +13 -8
- 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 +6 -3
- 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 +7 -4
- 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 +5 -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 +7 -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 +6 -3
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/icon/icon.component.js +3 -15
- package/esm5/lib/components/icon/icon.component.js.map +1 -1
- package/esm5/lib/components/index.js +1 -18
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js.map +1 -1
- package/esm5/lib/components/table/{cell-portal-ref.js → cell-protal-ref.js} +3 -7
- package/esm5/lib/components/table/cell-protal-ref.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +11 -67
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +13 -15
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/interaction/activity-ref.js +2 -14
- package/esm5/lib/interaction/activity-ref.js.map +1 -1
- package/esm5/lib/interaction/activity.js +1 -27
- 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 +17 -24
- 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 +3 -4
- 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 +16 -56
- 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 +1 -17
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +8 -2
- 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 +3 -2
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +322 -1539
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +403 -1798
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +2 -8
- package/lib/components/forms/abstract-list-input.component.d.ts +3 -10
- package/lib/components/forms/abstract-value-input.component.d.ts +3 -9
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +2 -0
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +4 -8
- package/lib/components/forms/number-input/number-input.component.d.ts +2 -0
- package/lib/components/forms/password-input/password-input.component.d.ts +2 -0
- package/lib/components/forms/select-input/select-input.component.d.ts +2 -2
- package/lib/components/forms/string-input/string-input.component.d.ts +2 -1
- package/lib/components/forms/text-input/text-input.component.d.ts +2 -0
- package/lib/components/icon/icon.component.d.ts +0 -15
- package/lib/components/index.d.ts +1 -19
- package/lib/components/table/cell-editors.d.ts +3 -3
- package/lib/components/table/{cell-portal-ref.d.ts → cell-protal-ref.d.ts} +4 -4
- package/lib/components/table/column-model.d.ts +12 -18
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-model.d.ts +5 -13
- package/lib/interaction/activity-ref.d.ts +0 -3
- package/lib/interaction/activity.d.ts +2 -6
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -4
- package/lib/place/components/abstract-place-navigation.component.d.ts +2 -2
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +2 -8
- package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
- package/lib/place/place-component.d.ts +0 -6
- package/package.json +4 -4
- package/assets/commands.scss +0 -3
- package/assets/icons.scss +0 -30
- package/esm2015/lib/components/commands/command/command.component.js +0 -61
- package/esm2015/lib/components/commands/command/command.component.js.map +0 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command/command.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.js +0 -92
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +0 -1
- package/esm2015/lib/components/commands/command-face.js +0 -108
- package/esm2015/lib/components/commands/command-face.js.map +0 -1
- package/esm2015/lib/components/commands/command-face.metadata.json +0 -1
- package/esm2015/lib/components/commands/flex.component.js +0 -30
- package/esm2015/lib/components/commands/flex.component.js.map +0 -1
- package/esm2015/lib/components/commands/flex.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/flex.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js +0 -47
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +0 -55
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +0 -39
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group.js +0 -100
- package/esm2015/lib/components/commands/group/command-group.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/more-menu.component.js +0 -55
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.js +0 -65
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/registration.js +0 -58
- package/esm2015/lib/components/commands/group/registration.js.map +0 -1
- package/esm2015/lib/components/commands/group/registration.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +0 -55
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/commands/group/view-data.js +0 -104
- package/esm2015/lib/components/commands/group/view-data.js.map +0 -1
- package/esm2015/lib/components/commands/group/view-data.metadata.json +0 -1
- package/esm2015/lib/components/commands/separator.component.js +0 -35
- package/esm2015/lib/components/commands/separator.component.js.map +0 -1
- package/esm2015/lib/components/commands/separator.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/separator.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +0 -70
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/table/cell-portal-ref.js.map +0 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.js +0 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.js.map +0 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +0 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +0 -73
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +0 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/track-by.js +0 -5
- package/esm2015/lib/components/track-by.js.map +0 -1
- package/esm5/lib/components/commands/command/command.component.js +0 -64
- package/esm5/lib/components/commands/command/command.component.js.map +0 -1
- package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-face/command-face.component.js +0 -123
- package/esm5/lib/components/commands/command-face/command-face.component.js.map +0 -1
- package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +0 -1
- package/esm5/lib/components/commands/command-face.js +0 -141
- package/esm5/lib/components/commands/command-face.js.map +0 -1
- package/esm5/lib/components/commands/flex.component.js +0 -33
- package/esm5/lib/components/commands/flex.component.js.map +0 -1
- package/esm5/lib/components/commands/flex.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group/command-group.component.js +0 -51
- package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +0 -59
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +0 -42
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/commands/group/command-group.js +0 -122
- package/esm5/lib/components/commands/group/command-group.js.map +0 -1
- package/esm5/lib/components/commands/group/more-menu.component.js +0 -58
- package/esm5/lib/components/commands/group/more-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/popup-menu.component.js +0 -68
- package/esm5/lib/components/commands/group/popup-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/registration.js +0 -80
- package/esm5/lib/components/commands/group/registration.js.map +0 -1
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +0 -58
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +0 -1
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/commands/group/view-data.js +0 -131
- package/esm5/lib/components/commands/group/view-data.js.map +0 -1
- package/esm5/lib/components/commands/separator.component.js +0 -37
- package/esm5/lib/components/commands/separator.component.js.map +0 -1
- package/esm5/lib/components/commands/separator.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +0 -73
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +0 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/table/cell-portal-ref.js.map +0 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js +0 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js.map +0 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +0 -63
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +0 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/track-by.js +0 -5
- package/esm5/lib/components/track-by.js.map +0 -1
- package/lib/components/commands/command/command.component.d.ts +0 -22
- package/lib/components/commands/command-face/command-face.component.d.ts +0 -34
- package/lib/components/commands/command-face.d.ts +0 -39
- package/lib/components/commands/flex.component.d.ts +0 -11
- package/lib/components/commands/group/command-group/command-group.component.d.ts +0 -11
- package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +0 -21
- package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +0 -13
- package/lib/components/commands/group/command-group.d.ts +0 -41
- package/lib/components/commands/group/more-menu.component.d.ts +0 -14
- package/lib/components/commands/group/popup-menu.component.d.ts +0 -17
- package/lib/components/commands/group/registration.d.ts +0 -32
- package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +0 -13
- package/lib/components/commands/group/view-data.d.ts +0 -40
- package/lib/components/commands/separator.component.d.ts +0 -12
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +0 -25
- package/lib/components/table/mutable-cell-renderer.d.ts +0 -6
- package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +0 -26
- package/lib/components/track-by.d.ts +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends, __decorate, __metadata, __param, __assign, __awaiter, __generator, __spread } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
|
-
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component,
|
|
3
|
+
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, Self, HostBinding, EventEmitter, Output, ChangeDetectorRef, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChild, ViewChildren, Optional, SkipSelf } from '@angular/core';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -9,29 +9,25 @@ import { MatTabsModule, MatTabGroup, MAT_TABS_CONFIG } from '@angular/material/t
|
|
|
9
9
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
10
10
|
import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
11
11
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
12
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
13
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
13
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
|
-
import { MatDividerModule } from '@angular/material/divider';
|
|
16
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
-
import { MatMenu, MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
18
15
|
import { MatTableModule } from '@angular/material/table';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
22
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, MutableValueModel, StoreInValueModel, ValueModel, MutableListModel, Trace, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, StoreInListModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
16
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, MutableListModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
17
|
+
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
23
18
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
24
19
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
25
|
-
import { Enum } from 'typescript-string-enums';
|
|
26
|
-
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
27
20
|
import produce from 'immer';
|
|
21
|
+
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
22
|
+
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
23
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
28
24
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
29
25
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
30
26
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
31
27
|
import { Overlay, CdkScrollable } from '@angular/cdk/overlay';
|
|
32
28
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
33
|
-
import { MatListModule } from '@angular/material/list';
|
|
34
29
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
30
|
+
import { MatListModule } from '@angular/material/list';
|
|
35
31
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
|
|
36
32
|
import 'reflect-metadata';
|
|
37
33
|
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
@@ -410,1110 +406,121 @@ var CardContainerComponent = /** @class */ (function (_super) {
|
|
|
410
406
|
Component({
|
|
411
407
|
selector: 'aup-card-container',
|
|
412
408
|
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",
|
|
413
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white
|
|
409
|
+
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}"]
|
|
414
410
|
}),
|
|
415
411
|
__metadata("design:paramtypes", [])
|
|
416
412
|
], CardContainerComponent);
|
|
417
413
|
return CardContainerComponent;
|
|
418
414
|
}(DisposableComponent));
|
|
419
415
|
|
|
420
|
-
var
|
|
421
|
-
(
|
|
422
|
-
|
|
423
|
-
})(TrackBy || (TrackBy = {}));
|
|
424
|
-
|
|
425
|
-
var CommandFace;
|
|
426
|
-
(function (CommandFace) {
|
|
427
|
-
var Position;
|
|
428
|
-
(function (Position) {
|
|
429
|
-
Position["START"] = "start";
|
|
430
|
-
Position["END"] = "end";
|
|
431
|
-
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
432
|
-
CommandFace.Style = Enum({
|
|
433
|
-
FLAT: 'flat',
|
|
434
|
-
STROKED: 'stroked',
|
|
435
|
-
RAISED: 'raised'
|
|
436
|
-
});
|
|
437
|
-
function getColorOf(face) {
|
|
438
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
|
|
439
|
-
}
|
|
440
|
-
CommandFace.getColorOf = getColorOf;
|
|
441
|
-
function getStyleOf(face) {
|
|
442
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
|
|
443
|
-
}
|
|
444
|
-
CommandFace.getStyleOf = getStyleOf;
|
|
445
|
-
function getIconOf(face) {
|
|
446
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
447
|
-
}
|
|
448
|
-
CommandFace.getIconOf = getIconOf;
|
|
449
|
-
function getTooltipOf(face) {
|
|
450
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
451
|
-
}
|
|
452
|
-
CommandFace.getTooltipOf = getTooltipOf;
|
|
453
|
-
function getTextOf(face) {
|
|
454
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
|
|
455
|
-
}
|
|
456
|
-
CommandFace.getTextOf = getTextOf;
|
|
457
|
-
var Adapter = /** @class */ (function () {
|
|
458
|
-
function Adapter(face) {
|
|
459
|
-
this.face = face;
|
|
460
|
-
}
|
|
461
|
-
Object.defineProperty(Adapter.prototype, "text", {
|
|
462
|
-
get: function () {
|
|
463
|
-
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
464
|
-
},
|
|
465
|
-
enumerable: true,
|
|
466
|
-
configurable: true
|
|
467
|
-
});
|
|
468
|
-
Object.defineProperty(Adapter.prototype, "icon", {
|
|
469
|
-
get: function () {
|
|
470
|
-
return CommandFace.getIconOf(this.face);
|
|
471
|
-
},
|
|
472
|
-
enumerable: true,
|
|
473
|
-
configurable: true
|
|
474
|
-
});
|
|
475
|
-
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
476
|
-
get: function () {
|
|
477
|
-
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
478
|
-
},
|
|
479
|
-
enumerable: true,
|
|
480
|
-
configurable: true
|
|
481
|
-
});
|
|
482
|
-
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
483
|
-
get: function () {
|
|
484
|
-
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
485
|
-
},
|
|
486
|
-
enumerable: true,
|
|
487
|
-
configurable: true
|
|
488
|
-
});
|
|
489
|
-
Object.defineProperty(Adapter.prototype, "iconPositionStart", {
|
|
490
|
-
get: function () {
|
|
491
|
-
return this.iconPosition === CommandFace.Position.START;
|
|
492
|
-
},
|
|
493
|
-
enumerable: true,
|
|
494
|
-
configurable: true
|
|
495
|
-
});
|
|
496
|
-
Object.defineProperty(Adapter.prototype, "iconPositionEnd", {
|
|
497
|
-
get: function () {
|
|
498
|
-
return this.iconPosition === CommandFace.Position.END;
|
|
499
|
-
},
|
|
500
|
-
enumerable: true,
|
|
501
|
-
configurable: true
|
|
502
|
-
});
|
|
503
|
-
Object.defineProperty(Adapter.prototype, "color", {
|
|
504
|
-
get: function () {
|
|
505
|
-
return CommandFace.getColorOf(this.face);
|
|
506
|
-
},
|
|
507
|
-
enumerable: true,
|
|
508
|
-
configurable: true
|
|
509
|
-
});
|
|
510
|
-
Object.defineProperty(Adapter.prototype, "style", {
|
|
511
|
-
get: function () {
|
|
512
|
-
return CommandFace.getStyleOf(this.face);
|
|
513
|
-
},
|
|
514
|
-
enumerable: true,
|
|
515
|
-
configurable: true
|
|
516
|
-
});
|
|
517
|
-
__decorate([
|
|
518
|
-
Memoize(),
|
|
519
|
-
__metadata("design:type", Object),
|
|
520
|
-
__metadata("design:paramtypes", [])
|
|
521
|
-
], Adapter.prototype, "text", null);
|
|
522
|
-
__decorate([
|
|
523
|
-
Memoize(),
|
|
524
|
-
__metadata("design:type", Object),
|
|
525
|
-
__metadata("design:paramtypes", [])
|
|
526
|
-
], Adapter.prototype, "icon", null);
|
|
527
|
-
__decorate([
|
|
528
|
-
Memoize(),
|
|
529
|
-
__metadata("design:type", Object),
|
|
530
|
-
__metadata("design:paramtypes", [])
|
|
531
|
-
], Adapter.prototype, "iconPosition", null);
|
|
532
|
-
__decorate([
|
|
533
|
-
Memoize(),
|
|
534
|
-
__metadata("design:type", Object),
|
|
535
|
-
__metadata("design:paramtypes", [])
|
|
536
|
-
], Adapter.prototype, "tooltip", null);
|
|
537
|
-
__decorate([
|
|
538
|
-
Memoize(),
|
|
539
|
-
__metadata("design:type", Boolean),
|
|
540
|
-
__metadata("design:paramtypes", [])
|
|
541
|
-
], Adapter.prototype, "iconPositionStart", null);
|
|
542
|
-
__decorate([
|
|
543
|
-
Memoize(),
|
|
544
|
-
__metadata("design:type", Boolean),
|
|
545
|
-
__metadata("design:paramtypes", [])
|
|
546
|
-
], Adapter.prototype, "iconPositionEnd", null);
|
|
547
|
-
__decorate([
|
|
548
|
-
Memoize(),
|
|
549
|
-
__metadata("design:type", String),
|
|
550
|
-
__metadata("design:paramtypes", [])
|
|
551
|
-
], Adapter.prototype, "color", null);
|
|
552
|
-
__decorate([
|
|
553
|
-
Memoize(),
|
|
554
|
-
__metadata("design:type", String),
|
|
555
|
-
__metadata("design:paramtypes", [])
|
|
556
|
-
], Adapter.prototype, "style", null);
|
|
557
|
-
return Adapter;
|
|
558
|
-
}());
|
|
559
|
-
CommandFace.Adapter = Adapter;
|
|
560
|
-
})(CommandFace || (CommandFace = {}));
|
|
561
|
-
|
|
562
|
-
var ViewData = /** @class */ (function () {
|
|
563
|
-
function ViewData() {
|
|
564
|
-
}
|
|
565
|
-
return ViewData;
|
|
566
|
-
}());
|
|
567
|
-
(function (ViewData) {
|
|
568
|
-
var FaceData = /** @class */ (function (_super) {
|
|
569
|
-
__extends(FaceData, _super);
|
|
570
|
-
function FaceData(face) {
|
|
571
|
-
var _this = _super.call(this) || this;
|
|
572
|
-
_this.faceAdapter = new CommandFace.Adapter(face);
|
|
573
|
-
return _this;
|
|
574
|
-
}
|
|
575
|
-
return FaceData;
|
|
576
|
-
}(ViewData));
|
|
577
|
-
ViewData.FaceData = FaceData;
|
|
578
|
-
var GroupData = /** @class */ (function (_super) {
|
|
579
|
-
__extends(GroupData, _super);
|
|
580
|
-
function GroupData(face, xPosition, yPosition, children) {
|
|
581
|
-
var _this = _super.call(this, face) || this;
|
|
582
|
-
_this.xPosition = xPosition;
|
|
583
|
-
_this.yPosition = yPosition;
|
|
584
|
-
_this.children = children;
|
|
585
|
-
return _this;
|
|
586
|
-
}
|
|
587
|
-
Object.defineProperty(GroupData.prototype, "hasMixedIcons", {
|
|
588
|
-
get: function () {
|
|
589
|
-
var hasFaces = this.children.filter(function (c) { return ViewData.hasFace(c); });
|
|
590
|
-
var iconCount = hasFaces.filter(function (c) { return !!c.faceAdapter.icon; }).length;
|
|
591
|
-
return iconCount > 0 && hasFaces.length !== iconCount;
|
|
592
|
-
},
|
|
593
|
-
enumerable: true,
|
|
594
|
-
configurable: true
|
|
595
|
-
});
|
|
596
|
-
__decorate([
|
|
597
|
-
Memoize(),
|
|
598
|
-
__metadata("design:type", Boolean),
|
|
599
|
-
__metadata("design:paramtypes", [])
|
|
600
|
-
], GroupData.prototype, "hasMixedIcons", null);
|
|
601
|
-
return GroupData;
|
|
602
|
-
}(FaceData));
|
|
603
|
-
ViewData.GroupData = GroupData;
|
|
604
|
-
var CommandData = /** @class */ (function (_super) {
|
|
605
|
-
__extends(CommandData, _super);
|
|
606
|
-
function CommandData(face, command) {
|
|
607
|
-
var _this = _super.call(this, face) || this;
|
|
608
|
-
_this.command = command;
|
|
609
|
-
return _this;
|
|
610
|
-
}
|
|
611
|
-
return CommandData;
|
|
612
|
-
}(FaceData));
|
|
613
|
-
ViewData.CommandData = CommandData;
|
|
614
|
-
var SeparatorData = /** @class */ (function (_super) {
|
|
615
|
-
__extends(SeparatorData, _super);
|
|
616
|
-
function SeparatorData() {
|
|
617
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
618
|
-
}
|
|
619
|
-
return SeparatorData;
|
|
620
|
-
}(ViewData));
|
|
621
|
-
ViewData.SeparatorData = SeparatorData;
|
|
622
|
-
var FlexData = /** @class */ (function (_super) {
|
|
623
|
-
__extends(FlexData, _super);
|
|
624
|
-
function FlexData() {
|
|
625
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
626
|
-
}
|
|
627
|
-
return FlexData;
|
|
628
|
-
}(ViewData));
|
|
629
|
-
ViewData.FlexData = FlexData;
|
|
630
|
-
function as(type, viewData) {
|
|
631
|
-
return viewData instanceof type ? viewData : lang.illegalState("expected instance of " + type.name + ", got " + viewData.constructor.name);
|
|
632
|
-
}
|
|
633
|
-
ViewData.as = as;
|
|
634
|
-
function getCommand(data) {
|
|
635
|
-
return as(CommandData, data).command;
|
|
636
|
-
}
|
|
637
|
-
ViewData.getCommand = getCommand;
|
|
638
|
-
function getTooltip(data) {
|
|
639
|
-
return as(FaceData, data).faceAdapter.tooltip;
|
|
640
|
-
}
|
|
641
|
-
ViewData.getTooltip = getTooltip;
|
|
642
|
-
function getStyle(data) {
|
|
643
|
-
return as(FaceData, data).faceAdapter.style;
|
|
644
|
-
}
|
|
645
|
-
ViewData.getStyle = getStyle;
|
|
646
|
-
function getColor(data) {
|
|
647
|
-
return as(FaceData, data).faceAdapter.color;
|
|
648
|
-
}
|
|
649
|
-
ViewData.getColor = getColor;
|
|
650
|
-
function hasText(data) {
|
|
651
|
-
return !!as(FaceData, data).faceAdapter.text;
|
|
652
|
-
}
|
|
653
|
-
ViewData.hasText = hasText;
|
|
654
|
-
function getFace(data) {
|
|
655
|
-
return as(FaceData, data).faceAdapter.face;
|
|
656
|
-
}
|
|
657
|
-
ViewData.getFace = getFace;
|
|
658
|
-
function asGroup(viewData) {
|
|
659
|
-
return as(GroupData, viewData);
|
|
660
|
-
}
|
|
661
|
-
ViewData.asGroup = asGroup;
|
|
662
|
-
function hasMixedIcons(data) {
|
|
663
|
-
return as(GroupData, data).hasMixedIcons;
|
|
664
|
-
}
|
|
665
|
-
ViewData.hasMixedIcons = hasMixedIcons;
|
|
666
|
-
function isGroup(data) {
|
|
667
|
-
return data instanceof GroupData;
|
|
668
|
-
}
|
|
669
|
-
ViewData.isGroup = isGroup;
|
|
670
|
-
function hasFace(data) {
|
|
671
|
-
return data instanceof FaceData;
|
|
672
|
-
}
|
|
673
|
-
ViewData.hasFace = hasFace;
|
|
674
|
-
function isCommand(data) {
|
|
675
|
-
return data instanceof CommandData;
|
|
676
|
-
}
|
|
677
|
-
ViewData.isCommand = isCommand;
|
|
678
|
-
function isSeparator(data) {
|
|
679
|
-
return data instanceof SeparatorData;
|
|
680
|
-
}
|
|
681
|
-
ViewData.isSeparator = isSeparator;
|
|
682
|
-
function isFlex(data) {
|
|
683
|
-
return data instanceof FlexData;
|
|
684
|
-
}
|
|
685
|
-
ViewData.isFlex = isFlex;
|
|
686
|
-
})(ViewData || (ViewData = {}));
|
|
687
|
-
|
|
688
|
-
var CommandGroupMenuRendererComponent = /** @class */ (function (_super) {
|
|
689
|
-
__extends(CommandGroupMenuRendererComponent, _super);
|
|
690
|
-
function CommandGroupMenuRendererComponent(parent) {
|
|
416
|
+
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
417
|
+
__extends(FocusContainerComponent, _super);
|
|
418
|
+
function FocusContainerComponent(focusManager) {
|
|
691
419
|
var _this = _super.call(this) || this;
|
|
692
|
-
_this.
|
|
693
|
-
_this.
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
_this.
|
|
697
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
698
|
-
_this.children = chain(_this.groupViewDataModel).pluckList('children');
|
|
699
|
-
_this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
|
|
420
|
+
_this.focusManager = focusManager;
|
|
421
|
+
_this.restoreFocusCommand = Command.create(function () {
|
|
422
|
+
_this.restoreFocus();
|
|
423
|
+
});
|
|
424
|
+
_this.tabIndex = -1;
|
|
700
425
|
return _this;
|
|
701
426
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
return command;
|
|
427
|
+
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
428
|
+
};
|
|
429
|
+
// @Trace()
|
|
430
|
+
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
431
|
+
this.focusManager.restoreFocus();
|
|
708
432
|
};
|
|
709
|
-
|
|
710
|
-
{ type:
|
|
433
|
+
FocusContainerComponent.ctorParameters = function () { return [
|
|
434
|
+
{ type: FocusManager, decorators: [{ type: Self }] }
|
|
711
435
|
]; };
|
|
712
436
|
__decorate([
|
|
713
|
-
|
|
714
|
-
__metadata("design:type", MatMenu)
|
|
715
|
-
], CommandGroupMenuRendererComponent.prototype, "menuComponent", void 0);
|
|
716
|
-
__decorate([
|
|
717
|
-
Input(), StoreInValueModel('groupViewDataModel'),
|
|
718
|
-
__metadata("design:type", ViewData.GroupData)
|
|
719
|
-
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
720
|
-
__decorate([
|
|
721
|
-
Output(),
|
|
437
|
+
HostBinding('attr.tabindex'),
|
|
722
438
|
__metadata("design:type", Object)
|
|
723
|
-
],
|
|
724
|
-
__decorate([
|
|
725
|
-
ViewChildren(MatMenuTrigger),
|
|
726
|
-
__metadata("design:type", QueryList)
|
|
727
|
-
], CommandGroupMenuRendererComponent.prototype, "triggers", void 0);
|
|
728
|
-
CommandGroupMenuRendererComponent = __decorate([
|
|
439
|
+
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
440
|
+
FocusContainerComponent = __decorate([
|
|
729
441
|
Component({
|
|
730
|
-
selector: 'aup-
|
|
731
|
-
template: "<
|
|
442
|
+
selector: 'aup-focus-container',
|
|
443
|
+
template: "<ng-content></ng-content>\n",
|
|
444
|
+
providers: [
|
|
445
|
+
{ provide: FocusManager }
|
|
446
|
+
],
|
|
447
|
+
styles: [":host{display:block}"]
|
|
732
448
|
}),
|
|
733
|
-
__param(0,
|
|
734
|
-
__metadata("design:paramtypes", [
|
|
735
|
-
],
|
|
736
|
-
return
|
|
449
|
+
__param(0, Self()),
|
|
450
|
+
__metadata("design:paramtypes", [FocusManager])
|
|
451
|
+
], FocusContainerComponent);
|
|
452
|
+
return FocusContainerComponent;
|
|
737
453
|
}(DisposableComponent));
|
|
738
454
|
|
|
739
|
-
var
|
|
740
|
-
__extends(
|
|
741
|
-
function
|
|
455
|
+
var FocusableComponent = /** @class */ (function (_super) {
|
|
456
|
+
__extends(FocusableComponent, _super);
|
|
457
|
+
function FocusableComponent(el, focusManager, focusBindingFactory) {
|
|
742
458
|
var _this = _super.call(this) || this;
|
|
743
|
-
_this.
|
|
744
|
-
_this.
|
|
745
|
-
_this.TrackBy = TrackBy;
|
|
459
|
+
_this.el = el;
|
|
460
|
+
_this.focusManager = focusManager;
|
|
746
461
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
Input(), TrackExternal(),
|
|
752
|
-
__metadata("design:type", ValueModel)
|
|
753
|
-
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
754
|
-
__decorate([
|
|
755
|
-
Input(), StoreInValueModel('groupViewDataModel'),
|
|
756
|
-
__metadata("design:type", ViewData.GroupData)
|
|
757
|
-
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
758
|
-
__decorate([
|
|
759
|
-
Input(),
|
|
760
|
-
HostBinding('class.render-root'),
|
|
761
|
-
__metadata("design:type", Object)
|
|
762
|
-
], CommandGroupRendererComponent.prototype, "renderRootNode", void 0);
|
|
763
|
-
CommandGroupRendererComponent = __decorate([
|
|
764
|
-
Component({
|
|
765
|
-
selector: 'aup-command-group-renderer',
|
|
766
|
-
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",
|
|
767
|
-
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}"]
|
|
768
|
-
}),
|
|
769
|
-
__metadata("design:paramtypes", [])
|
|
770
|
-
], CommandGroupRendererComponent);
|
|
771
|
-
return CommandGroupRendererComponent;
|
|
772
|
-
}(DisposableComponent));
|
|
773
|
-
|
|
774
|
-
var Registration = /** @class */ (function (_super) {
|
|
775
|
-
__extends(Registration, _super);
|
|
776
|
-
function Registration() {
|
|
777
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
778
|
-
}
|
|
779
|
-
return Registration;
|
|
780
|
-
}(GarbageCollector));
|
|
781
|
-
(function (Registration) {
|
|
782
|
-
var FaceRegistration = /** @class */ (function (_super) {
|
|
783
|
-
__extends(FaceRegistration, _super);
|
|
784
|
-
function FaceRegistration(faceModel) {
|
|
785
|
-
var _this = _super.call(this) || this;
|
|
786
|
-
_this.faceModel = faceModel;
|
|
787
|
-
return _this;
|
|
788
|
-
}
|
|
789
|
-
return FaceRegistration;
|
|
790
|
-
}(Registration));
|
|
791
|
-
Registration.FaceRegistration = FaceRegistration;
|
|
792
|
-
var CommandRegistration = /** @class */ (function (_super) {
|
|
793
|
-
__extends(CommandRegistration, _super);
|
|
794
|
-
function CommandRegistration(faceModel, command) {
|
|
795
|
-
var _this = _super.call(this, faceModel) || this;
|
|
796
|
-
_this.command = command;
|
|
797
|
-
return _this;
|
|
798
|
-
}
|
|
799
|
-
CommandRegistration.prototype.toTemplate = function () {
|
|
800
|
-
return new ViewData.CommandData(this.faceModel.value, this.command);
|
|
801
|
-
};
|
|
802
|
-
return CommandRegistration;
|
|
803
|
-
}(FaceRegistration));
|
|
804
|
-
Registration.CommandRegistration = CommandRegistration;
|
|
805
|
-
var GroupRegistration = /** @class */ (function (_super) {
|
|
806
|
-
__extends(GroupRegistration, _super);
|
|
807
|
-
function GroupRegistration(faceModel, group) {
|
|
808
|
-
var _this = _super.call(this, faceModel) || this;
|
|
809
|
-
_this.group = group;
|
|
810
|
-
return _this;
|
|
811
|
-
}
|
|
812
|
-
GroupRegistration.prototype.toTemplate = function () {
|
|
813
|
-
return new ViewData.GroupData(this.faceModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(function (r) { return r.toTemplate(); }));
|
|
814
|
-
};
|
|
815
|
-
return GroupRegistration;
|
|
816
|
-
}(FaceRegistration));
|
|
817
|
-
Registration.GroupRegistration = GroupRegistration;
|
|
818
|
-
var SeparatorRegistration = /** @class */ (function (_super) {
|
|
819
|
-
__extends(SeparatorRegistration, _super);
|
|
820
|
-
function SeparatorRegistration() {
|
|
821
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
822
|
-
_this.template = new ViewData.SeparatorData();
|
|
823
|
-
return _this;
|
|
824
|
-
}
|
|
825
|
-
SeparatorRegistration.prototype.toTemplate = function () {
|
|
826
|
-
return this.template;
|
|
827
|
-
};
|
|
828
|
-
return SeparatorRegistration;
|
|
829
|
-
}(Registration));
|
|
830
|
-
Registration.SeparatorRegistration = SeparatorRegistration;
|
|
831
|
-
var FlexRegistration = /** @class */ (function (_super) {
|
|
832
|
-
__extends(FlexRegistration, _super);
|
|
833
|
-
function FlexRegistration() {
|
|
834
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
835
|
-
_this.template = new ViewData.FlexData();
|
|
836
|
-
return _this;
|
|
462
|
+
if (_this.focusManager) {
|
|
463
|
+
_this._focusContext = _this.focusManager.registerFocusable(_this);
|
|
464
|
+
_this.registerDisposable(_this._focusContext);
|
|
465
|
+
_this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
|
|
837
466
|
}
|
|
838
|
-
FlexRegistration.prototype.toTemplate = function () {
|
|
839
|
-
return this.template;
|
|
840
|
-
};
|
|
841
|
-
return FlexRegistration;
|
|
842
|
-
}(Registration));
|
|
843
|
-
Registration.FlexRegistration = FlexRegistration;
|
|
844
|
-
function hasFace(entry) {
|
|
845
|
-
return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
|
|
846
|
-
}
|
|
847
|
-
Registration.hasFace = hasFace;
|
|
848
|
-
})(Registration || (Registration = {}));
|
|
849
|
-
|
|
850
|
-
var CommandGroup = /** @class */ (function (_super) {
|
|
851
|
-
__extends(CommandGroup, _super);
|
|
852
|
-
function CommandGroup(parent) {
|
|
853
|
-
var _this = _super.call(this) || this;
|
|
854
|
-
_this.parent = parent;
|
|
855
|
-
_this._rootTemplate = new MutableValueModel();
|
|
856
|
-
_this._registrations = new MutableListModel();
|
|
857
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
858
|
-
_this.childTemplates = chain(_this._rootTemplate).pluckList('children');
|
|
859
|
-
_this.initialised = chain(_this._rootTemplate).isNotNil();
|
|
860
467
|
return _this;
|
|
861
468
|
}
|
|
862
|
-
|
|
863
|
-
this.rebuildTemplates();
|
|
864
|
-
};
|
|
865
|
-
Object.defineProperty(CommandGroup.prototype, "rootTemplate", {
|
|
866
|
-
get: function () {
|
|
867
|
-
return this._rootTemplate.readonly;
|
|
868
|
-
},
|
|
869
|
-
enumerable: true,
|
|
870
|
-
configurable: true
|
|
871
|
-
});
|
|
872
|
-
Object.defineProperty(CommandGroup.prototype, "registrations", {
|
|
469
|
+
Object.defineProperty(FocusableComponent.prototype, "focusable", {
|
|
873
470
|
get: function () {
|
|
874
|
-
return this.
|
|
471
|
+
return !!this.focusContext ? 0 : undefined;
|
|
875
472
|
},
|
|
876
473
|
enumerable: true,
|
|
877
474
|
configurable: true
|
|
878
475
|
});
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
}
|
|
883
|
-
else {
|
|
884
|
-
this.rebuildTemplates();
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
CommandGroup.prototype.notifyChildFaceChanged = function (is, was) {
|
|
888
|
-
this.notifyChanged();
|
|
476
|
+
FocusableComponent.prototype.onFocus = function () {
|
|
477
|
+
var _a;
|
|
478
|
+
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
|
|
889
479
|
};
|
|
890
|
-
|
|
891
|
-
|
|
480
|
+
FocusableComponent.prototype.onBlur = function () {
|
|
481
|
+
var _a;
|
|
482
|
+
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
|
|
892
483
|
};
|
|
893
|
-
Object.defineProperty(
|
|
484
|
+
Object.defineProperty(FocusableComponent.prototype, "focusContext", {
|
|
894
485
|
get: function () {
|
|
895
|
-
return this.
|
|
486
|
+
return this._focusContext;
|
|
896
487
|
},
|
|
897
488
|
enumerable: true,
|
|
898
489
|
configurable: true
|
|
899
490
|
});
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
return this.register(new Registration.CommandRegistration(faceModel, command));
|
|
905
|
-
};
|
|
906
|
-
CommandGroup.prototype.registerGroup = function (group, faceModel) {
|
|
907
|
-
return this.register(new Registration.GroupRegistration(faceModel, group));
|
|
908
|
-
};
|
|
909
|
-
CommandGroup.prototype.registerFlex = function (component) {
|
|
910
|
-
return this.register(new Registration.FlexRegistration());
|
|
911
|
-
};
|
|
912
|
-
CommandGroup.prototype.registerSeparator = function (component) {
|
|
913
|
-
return this.register(new Registration.SeparatorRegistration());
|
|
914
|
-
};
|
|
915
|
-
CommandGroup.prototype.register = function (registration) {
|
|
916
|
-
var _this = this;
|
|
917
|
-
this._registrations.push(registration);
|
|
918
|
-
if (registration instanceof Registration.FaceRegistration) {
|
|
919
|
-
var when = Dsl.disposeWith(registration).when;
|
|
920
|
-
when(registration.faceModel).changes(function (is, was) {
|
|
921
|
-
_this.notifyChildFaceChanged(is, was);
|
|
922
|
-
}, { asLongAs: this.initialised });
|
|
923
|
-
}
|
|
924
|
-
registration.onDispose(function () { return _this._registrations.remove(registration); });
|
|
925
|
-
return registration;
|
|
926
|
-
};
|
|
927
|
-
return CommandGroup;
|
|
928
|
-
}(GarbageCollector));
|
|
929
|
-
(function (CommandGroup) {
|
|
930
|
-
var Root = /** @class */ (function (_super) {
|
|
931
|
-
__extends(Root, _super);
|
|
932
|
-
function Root() {
|
|
933
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
934
|
-
}
|
|
935
|
-
Root.prototype.isRoot = function () {
|
|
936
|
-
return true;
|
|
937
|
-
};
|
|
938
|
-
__decorate([
|
|
939
|
-
TrackExternal(),
|
|
940
|
-
__metadata("design:type", ValueModel)
|
|
941
|
-
], Root.prototype, "faceModel", void 0);
|
|
942
|
-
__decorate([
|
|
943
|
-
TrackExternal({ defaultValue: 'after' }),
|
|
944
|
-
__metadata("design:type", ValueModel)
|
|
945
|
-
], Root.prototype, "xPositionModel", void 0);
|
|
946
|
-
__decorate([
|
|
947
|
-
StoreInValueModel('xPositionModel'),
|
|
948
|
-
__metadata("design:type", String)
|
|
949
|
-
], Root.prototype, "xPosition", void 0);
|
|
950
|
-
__decorate([
|
|
951
|
-
TrackExternal({ defaultValue: 'below' }),
|
|
952
|
-
__metadata("design:type", ValueModel)
|
|
953
|
-
], Root.prototype, "yPositionModel", void 0);
|
|
954
|
-
__decorate([
|
|
955
|
-
StoreInValueModel('yPositionModel'),
|
|
956
|
-
__metadata("design:type", String)
|
|
957
|
-
], Root.prototype, "yPosition", void 0);
|
|
958
|
-
return Root;
|
|
959
|
-
}(CommandGroup));
|
|
960
|
-
CommandGroup.Root = Root;
|
|
961
|
-
function factory() {
|
|
962
|
-
return new Root();
|
|
963
|
-
}
|
|
964
|
-
CommandGroup.factory = factory;
|
|
965
|
-
})(CommandGroup || (CommandGroup = {}));
|
|
966
|
-
|
|
967
|
-
var CommandGroupComponent = /** @class */ (function (_super) {
|
|
968
|
-
__extends(CommandGroupComponent, _super);
|
|
969
|
-
function CommandGroupComponent(parent) {
|
|
970
|
-
var _this = _super.call(this, parent) || this;
|
|
971
|
-
_this.parent = parent;
|
|
972
|
-
_this.xPosition = 'after';
|
|
973
|
-
_this.yPosition = 'below';
|
|
974
|
-
_this.parent.registerGroup(_this, _this.faceModel);
|
|
975
|
-
return _this;
|
|
976
|
-
}
|
|
977
|
-
CommandGroupComponent_1 = CommandGroupComponent;
|
|
978
|
-
var CommandGroupComponent_1;
|
|
979
|
-
CommandGroupComponent.ctorParameters = function () { return [
|
|
980
|
-
{ type: CommandGroup, decorators: [{ type: SkipSelf }] }
|
|
491
|
+
FocusableComponent.ctorParameters = function () { return [
|
|
492
|
+
{ type: ElementRef },
|
|
493
|
+
{ type: FocusManager },
|
|
494
|
+
{ type: FocusBindingFactory }
|
|
981
495
|
]; };
|
|
982
496
|
__decorate([
|
|
983
|
-
|
|
984
|
-
__metadata("design:type",
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
Input(), StoreInValueModel('faceModel'),
|
|
988
|
-
__metadata("design:type", Object)
|
|
989
|
-
], CommandGroupComponent.prototype, "face", void 0);
|
|
497
|
+
HostBinding('attr.tabindex'),
|
|
498
|
+
__metadata("design:type", Object),
|
|
499
|
+
__metadata("design:paramtypes", [])
|
|
500
|
+
], FocusableComponent.prototype, "focusable", null);
|
|
990
501
|
__decorate([
|
|
991
|
-
|
|
992
|
-
__metadata("design:type",
|
|
993
|
-
|
|
502
|
+
HostListener('focus'),
|
|
503
|
+
__metadata("design:type", Function),
|
|
504
|
+
__metadata("design:paramtypes", []),
|
|
505
|
+
__metadata("design:returntype", void 0)
|
|
506
|
+
], FocusableComponent.prototype, "onFocus", null);
|
|
994
507
|
__decorate([
|
|
995
|
-
|
|
996
|
-
__metadata("design:type",
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
__param(0, SkipSelf()),
|
|
1007
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1008
|
-
], CommandGroupComponent);
|
|
1009
|
-
return CommandGroupComponent;
|
|
1010
|
-
}(CommandGroup));
|
|
508
|
+
HostListener('blur'),
|
|
509
|
+
__metadata("design:type", Function),
|
|
510
|
+
__metadata("design:paramtypes", []),
|
|
511
|
+
__metadata("design:returntype", void 0)
|
|
512
|
+
], FocusableComponent.prototype, "onBlur", null);
|
|
513
|
+
FocusableComponent = __decorate([
|
|
514
|
+
Component({ template: '' }),
|
|
515
|
+
__metadata("design:paramtypes", [ElementRef, FocusManager, FocusBindingFactory])
|
|
516
|
+
], FocusableComponent);
|
|
517
|
+
return FocusableComponent;
|
|
518
|
+
}(DisposableComponent));
|
|
1011
519
|
|
|
1012
|
-
/**
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
* root: { // globally
|
|
1016
|
-
* --aup-command-face-icon-gap: 8px;
|
|
1017
|
-
* }
|
|
1018
|
-
* aup-command-face { // per instance
|
|
1019
|
-
* --icon-gap: 4px;
|
|
1020
|
-
* }
|
|
1021
|
-
*/
|
|
1022
|
-
var CommandFaceComponent = /** @class */ (function (_super) {
|
|
1023
|
-
__extends(CommandFaceComponent, _super);
|
|
1024
|
-
function CommandFaceComponent() {
|
|
520
|
+
var AbstractInputComponent = /** @class */ (function (_super) {
|
|
521
|
+
__extends(AbstractInputComponent, _super);
|
|
522
|
+
function AbstractInputComponent() {
|
|
1025
523
|
var _this = _super.call(this) || this;
|
|
1026
|
-
_this.faceModel = new MutableValueModel();
|
|
1027
|
-
_this.ignoreIcon = false;
|
|
1028
|
-
_this.ignoreText = false;
|
|
1029
|
-
_this.includeMissingIconInLayout = false;
|
|
1030
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1031
|
-
// overkill /c: when all you have is a hammer...
|
|
1032
|
-
var faceAdapter = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
1033
|
-
_this.iconModel = faceAdapter.pluck('icon');
|
|
1034
|
-
_this.textModel = faceAdapter.pluck('text');
|
|
1035
|
-
_this.positionModel = faceAdapter.pluck('iconPosition');
|
|
1036
|
-
_this.colorModel = faceAdapter.pluck('color');
|
|
1037
|
-
return _this;
|
|
1038
|
-
}
|
|
1039
|
-
Object.defineProperty(CommandFaceComponent.prototype, "requiresMissingIconInLayout", {
|
|
1040
|
-
get: function () {
|
|
1041
|
-
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
1042
|
-
},
|
|
1043
|
-
enumerable: true,
|
|
1044
|
-
configurable: true
|
|
1045
|
-
});
|
|
1046
|
-
CommandFaceComponent.prototype.ngOnInit = function () {
|
|
1047
|
-
};
|
|
1048
|
-
Object.defineProperty(CommandFaceComponent.prototype, "iconPosition", {
|
|
1049
|
-
get: function () {
|
|
1050
|
-
var _a;
|
|
1051
|
-
return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : CommandFace.Position.START;
|
|
1052
|
-
},
|
|
1053
|
-
enumerable: true,
|
|
1054
|
-
configurable: true
|
|
1055
|
-
});
|
|
1056
|
-
Object.defineProperty(CommandFaceComponent.prototype, "shouldIncludeIcon", {
|
|
1057
|
-
get: function () {
|
|
1058
|
-
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
1059
|
-
},
|
|
1060
|
-
enumerable: true,
|
|
1061
|
-
configurable: true
|
|
1062
|
-
});
|
|
1063
|
-
Object.defineProperty(CommandFaceComponent.prototype, "iconStart", {
|
|
1064
|
-
get: function () {
|
|
1065
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.START;
|
|
1066
|
-
},
|
|
1067
|
-
enumerable: true,
|
|
1068
|
-
configurable: true
|
|
1069
|
-
});
|
|
1070
|
-
Object.defineProperty(CommandFaceComponent.prototype, "iconEnd", {
|
|
1071
|
-
get: function () {
|
|
1072
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.END;
|
|
1073
|
-
},
|
|
1074
|
-
enumerable: true,
|
|
1075
|
-
configurable: true
|
|
1076
|
-
});
|
|
1077
|
-
Object.defineProperty(CommandFaceComponent.prototype, "text", {
|
|
1078
|
-
get: function () {
|
|
1079
|
-
return this.ignoreText ? undefined : this.textModel.value;
|
|
1080
|
-
},
|
|
1081
|
-
enumerable: true,
|
|
1082
|
-
configurable: true
|
|
1083
|
-
});
|
|
1084
|
-
Object.defineProperty(CommandFaceComponent.prototype, "color", {
|
|
1085
|
-
get: function () {
|
|
1086
|
-
return this.colorModel.value;
|
|
1087
|
-
},
|
|
1088
|
-
enumerable: true,
|
|
1089
|
-
configurable: true
|
|
1090
|
-
});
|
|
1091
|
-
__decorate([
|
|
1092
|
-
Input('face'), StoreInValueModel('faceModel'),
|
|
1093
|
-
__metadata("design:type", Object)
|
|
1094
|
-
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
1095
|
-
__decorate([
|
|
1096
|
-
Input(),
|
|
1097
|
-
__metadata("design:type", Object)
|
|
1098
|
-
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
1099
|
-
__decorate([
|
|
1100
|
-
Input(),
|
|
1101
|
-
__metadata("design:type", Object)
|
|
1102
|
-
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
1103
|
-
__decorate([
|
|
1104
|
-
Input(),
|
|
1105
|
-
__metadata("design:type", Object)
|
|
1106
|
-
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
1107
|
-
__decorate([
|
|
1108
|
-
HostBinding('class.hide-icon'),
|
|
1109
|
-
__metadata("design:type", Object),
|
|
1110
|
-
__metadata("design:paramtypes", [])
|
|
1111
|
-
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
1112
|
-
__decorate([
|
|
1113
|
-
HostBinding('attr.color'),
|
|
1114
|
-
__metadata("design:type", String),
|
|
1115
|
-
__metadata("design:paramtypes", [])
|
|
1116
|
-
], CommandFaceComponent.prototype, "color", null);
|
|
1117
|
-
CommandFaceComponent = __decorate([
|
|
1118
|
-
Component({
|
|
1119
|
-
selector: 'aup-command-face',
|
|
1120
|
-
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",
|
|
1121
|
-
encapsulation: ViewEncapsulation.None,
|
|
1122
|
-
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}"]
|
|
1123
|
-
}),
|
|
1124
|
-
__metadata("design:paramtypes", [])
|
|
1125
|
-
], CommandFaceComponent);
|
|
1126
|
-
return CommandFaceComponent;
|
|
1127
|
-
}(DisposableComponent));
|
|
1128
|
-
|
|
1129
|
-
/**
|
|
1130
|
-
*
|
|
1131
|
-
*/
|
|
1132
|
-
var CommandComponent = /** @class */ (function (_super) {
|
|
1133
|
-
__extends(CommandComponent, _super);
|
|
1134
|
-
function CommandComponent(parent) {
|
|
1135
|
-
var _this = _super.call(this) || this;
|
|
1136
|
-
_this.parent = parent;
|
|
1137
|
-
_this.CommandFace = CommandFace;
|
|
1138
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
|
|
1139
|
-
_this.activeFaceModel = switchOn(_this.command.busy).toValue(function (when) {
|
|
1140
|
-
when.equalTo(true, _this.busyFaceModel);
|
|
1141
|
-
when.otherwise(_this.faceModel);
|
|
1142
|
-
}).otherwise(_this.faceModel);
|
|
1143
|
-
_this.buttonStyle = chain(_this.activeFaceModel).map(function (f) { return CommandFace.getStyleOf(f); });
|
|
1144
|
-
_this.colorModel = chain(_this.activeFaceModel).map(function (f) { return CommandFace.getColorOf(f); });
|
|
1145
|
-
if (parent) {
|
|
1146
|
-
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.activeFaceModel));
|
|
1147
|
-
}
|
|
1148
|
-
return _this;
|
|
1149
|
-
}
|
|
1150
|
-
CommandComponent.prototype.ngOnInit = function () {
|
|
1151
|
-
};
|
|
1152
|
-
CommandComponent.ctorParameters = function () { return [
|
|
1153
|
-
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
1154
|
-
]; };
|
|
1155
|
-
__decorate([
|
|
1156
|
-
Input(), TrackExternal(),
|
|
1157
|
-
__metadata("design:type", Command)
|
|
1158
|
-
], CommandComponent.prototype, "command", void 0);
|
|
1159
|
-
__decorate([
|
|
1160
|
-
Input(), TrackExternal(),
|
|
1161
|
-
__metadata("design:type", ValueModel)
|
|
1162
|
-
], CommandComponent.prototype, "faceModel", void 0);
|
|
1163
|
-
__decorate([
|
|
1164
|
-
Input(), StoreInValueModel('faceModel'),
|
|
1165
|
-
__metadata("design:type", Object)
|
|
1166
|
-
], CommandComponent.prototype, "face", void 0);
|
|
1167
|
-
__decorate([
|
|
1168
|
-
Input(), TrackExternal(),
|
|
1169
|
-
__metadata("design:type", ValueModel)
|
|
1170
|
-
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
1171
|
-
__decorate([
|
|
1172
|
-
Input(), StoreInValueModel('busyFaceModel'),
|
|
1173
|
-
__metadata("design:type", Object)
|
|
1174
|
-
], CommandComponent.prototype, "busyFace", void 0);
|
|
1175
|
-
CommandComponent = __decorate([
|
|
1176
|
-
Component({
|
|
1177
|
-
selector: 'aup-command',
|
|
1178
|
-
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"
|
|
1179
|
-
}),
|
|
1180
|
-
__param(0, Optional()),
|
|
1181
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1182
|
-
], CommandComponent);
|
|
1183
|
-
return CommandComponent;
|
|
1184
|
-
}(DisposableComponent));
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
*
|
|
1188
|
-
*/
|
|
1189
|
-
var FlexComponent = /** @class */ (function (_super) {
|
|
1190
|
-
__extends(FlexComponent, _super);
|
|
1191
|
-
function FlexComponent(parent) {
|
|
1192
|
-
var _this = _super.call(this) || this;
|
|
1193
|
-
_this.parent = parent;
|
|
1194
|
-
if (parent) {
|
|
1195
|
-
parent.registerFlex(_this);
|
|
1196
|
-
}
|
|
1197
|
-
return _this;
|
|
1198
|
-
}
|
|
1199
|
-
FlexComponent.prototype.ngOnInit = function () {
|
|
1200
|
-
};
|
|
1201
|
-
FlexComponent.ctorParameters = function () { return [
|
|
1202
|
-
{ type: CommandGroup }
|
|
1203
|
-
]; };
|
|
1204
|
-
FlexComponent = __decorate([
|
|
1205
|
-
Component({
|
|
1206
|
-
selector: 'aup-flex',
|
|
1207
|
-
template: ""
|
|
1208
|
-
}),
|
|
1209
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1210
|
-
], FlexComponent);
|
|
1211
|
-
return FlexComponent;
|
|
1212
|
-
}(DisposableComponent));
|
|
1213
|
-
|
|
1214
|
-
var ɵ0 = CommandGroup.factory;
|
|
1215
|
-
/**
|
|
1216
|
-
*
|
|
1217
|
-
*/
|
|
1218
|
-
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
1219
|
-
__extends(MoreMenuComponent, _super);
|
|
1220
|
-
function MoreMenuComponent(group) {
|
|
1221
|
-
var _this = _super.call(this) || this;
|
|
1222
|
-
_this.group = group;
|
|
1223
|
-
_this.tooltipModel = new MutableValueModel();
|
|
1224
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1225
|
-
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
1226
|
-
group.faceModel = chain(_this.tooltipModel).map(function (tooltip) {
|
|
1227
|
-
return {
|
|
1228
|
-
icon: function () { return 'mat:more_vert'; },
|
|
1229
|
-
tooltip: function () {
|
|
1230
|
-
return tooltip;
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
}, { allowNil: true });
|
|
1234
|
-
return _this;
|
|
1235
|
-
}
|
|
1236
|
-
MoreMenuComponent.prototype.ngOnInit = function () {
|
|
1237
|
-
};
|
|
1238
|
-
MoreMenuComponent.prototype.ngAfterContentInit = function () {
|
|
1239
|
-
this.group.initialise();
|
|
1240
|
-
};
|
|
1241
|
-
MoreMenuComponent.ctorParameters = function () { return [
|
|
1242
|
-
{ type: CommandGroup }
|
|
1243
|
-
]; };
|
|
1244
|
-
__decorate([
|
|
1245
|
-
Input(), StoreInValueModel('tooltipModel'),
|
|
1246
|
-
__metadata("design:type", String)
|
|
1247
|
-
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
1248
|
-
__decorate([
|
|
1249
|
-
Trace(),
|
|
1250
|
-
__metadata("design:type", Function),
|
|
1251
|
-
__metadata("design:paramtypes", []),
|
|
1252
|
-
__metadata("design:returntype", void 0)
|
|
1253
|
-
], MoreMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1254
|
-
MoreMenuComponent = __decorate([
|
|
1255
|
-
Component({
|
|
1256
|
-
selector: 'aup-more-menu',
|
|
1257
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1258
|
-
providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
|
|
1259
|
-
}),
|
|
1260
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1261
|
-
], MoreMenuComponent);
|
|
1262
|
-
return MoreMenuComponent;
|
|
1263
|
-
}(DisposableComponent));
|
|
1264
|
-
|
|
1265
|
-
var ɵ0$1 = CommandGroup.factory;
|
|
1266
|
-
/**
|
|
1267
|
-
*
|
|
1268
|
-
*/
|
|
1269
|
-
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
1270
|
-
__extends(PopupMenuComponent, _super);
|
|
1271
|
-
function PopupMenuComponent(group) {
|
|
1272
|
-
var _this = _super.call(this) || this;
|
|
1273
|
-
_this.group = group;
|
|
1274
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1275
|
-
group.faceModel = _this.faceModel;
|
|
1276
|
-
return _this;
|
|
1277
|
-
}
|
|
1278
|
-
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
1279
|
-
};
|
|
1280
|
-
PopupMenuComponent.prototype.ngAfterContentInit = function () {
|
|
1281
|
-
this.group.initialise();
|
|
1282
|
-
};
|
|
1283
|
-
PopupMenuComponent.prototype.ngAfterViewInit = function () {
|
|
1284
|
-
};
|
|
1285
|
-
PopupMenuComponent.ctorParameters = function () { return [
|
|
1286
|
-
{ type: CommandGroup }
|
|
1287
|
-
]; };
|
|
1288
|
-
__decorate([
|
|
1289
|
-
Input(), TrackExternal(),
|
|
1290
|
-
__metadata("design:type", ValueModel)
|
|
1291
|
-
], PopupMenuComponent.prototype, "faceModel", void 0);
|
|
1292
|
-
__decorate([
|
|
1293
|
-
Input(), StoreInValueModel('faceModel'),
|
|
1294
|
-
__metadata("design:type", Object)
|
|
1295
|
-
], PopupMenuComponent.prototype, "face", void 0);
|
|
1296
|
-
__decorate([
|
|
1297
|
-
Trace(),
|
|
1298
|
-
__metadata("design:type", Function),
|
|
1299
|
-
__metadata("design:paramtypes", []),
|
|
1300
|
-
__metadata("design:returntype", void 0)
|
|
1301
|
-
], PopupMenuComponent.prototype, "ngOnInit", null);
|
|
1302
|
-
__decorate([
|
|
1303
|
-
Trace(),
|
|
1304
|
-
__metadata("design:type", Function),
|
|
1305
|
-
__metadata("design:paramtypes", []),
|
|
1306
|
-
__metadata("design:returntype", void 0)
|
|
1307
|
-
], PopupMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1308
|
-
__decorate([
|
|
1309
|
-
Trace(),
|
|
1310
|
-
__metadata("design:type", Function),
|
|
1311
|
-
__metadata("design:paramtypes", []),
|
|
1312
|
-
__metadata("design:returntype", void 0)
|
|
1313
|
-
], PopupMenuComponent.prototype, "ngAfterViewInit", null);
|
|
1314
|
-
PopupMenuComponent = __decorate([
|
|
1315
|
-
Component({
|
|
1316
|
-
selector: 'aup-popup-menu',
|
|
1317
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1318
|
-
providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
|
|
1319
|
-
}),
|
|
1320
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1321
|
-
], PopupMenuComponent);
|
|
1322
|
-
return PopupMenuComponent;
|
|
1323
|
-
}(DisposableComponent));
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
*
|
|
1327
|
-
*/
|
|
1328
|
-
var SeparatorComponent = /** @class */ (function (_super) {
|
|
1329
|
-
__extends(SeparatorComponent, _super);
|
|
1330
|
-
function SeparatorComponent(parent) {
|
|
1331
|
-
var _this = _super.call(this) || this;
|
|
1332
|
-
_this.parent = parent;
|
|
1333
|
-
if (parent) {
|
|
1334
|
-
parent.registerSeparator(_this);
|
|
1335
|
-
}
|
|
1336
|
-
return _this;
|
|
1337
|
-
}
|
|
1338
|
-
SeparatorComponent.prototype.isVertical = function () {
|
|
1339
|
-
return this === null || this === void 0 ? void 0 : this.parent.isRoot();
|
|
1340
|
-
};
|
|
1341
|
-
SeparatorComponent.prototype.ngOnInit = function () {
|
|
1342
|
-
};
|
|
1343
|
-
SeparatorComponent.ctorParameters = function () { return [
|
|
1344
|
-
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
1345
|
-
]; };
|
|
1346
|
-
SeparatorComponent = __decorate([
|
|
1347
|
-
Component({
|
|
1348
|
-
selector: 'aup-separator',
|
|
1349
|
-
template: "\n <mat-divider [vertical]=\"isVertical()\"></mat-divider>"
|
|
1350
|
-
}),
|
|
1351
|
-
__param(0, Optional()),
|
|
1352
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1353
|
-
], SeparatorComponent);
|
|
1354
|
-
return SeparatorComponent;
|
|
1355
|
-
}(DisposableComponent));
|
|
1356
|
-
|
|
1357
|
-
var ɵ0$2 = CommandGroup.factory;
|
|
1358
|
-
/**
|
|
1359
|
-
*
|
|
1360
|
-
*/
|
|
1361
|
-
var ToolBarComponent = /** @class */ (function (_super) {
|
|
1362
|
-
__extends(ToolBarComponent, _super);
|
|
1363
|
-
function ToolBarComponent(group) {
|
|
1364
|
-
var _this = _super.call(this) || this;
|
|
1365
|
-
_this.group = group;
|
|
1366
|
-
return _this;
|
|
1367
|
-
}
|
|
1368
|
-
ToolBarComponent.prototype.ngOnInit = function () {
|
|
1369
|
-
};
|
|
1370
|
-
ToolBarComponent.prototype.ngAfterContentInit = function () {
|
|
1371
|
-
this.group.initialise();
|
|
1372
|
-
};
|
|
1373
|
-
ToolBarComponent.prototype.ngAfterViewInit = function () {
|
|
1374
|
-
};
|
|
1375
|
-
ToolBarComponent.ctorParameters = function () { return [
|
|
1376
|
-
{ type: CommandGroup }
|
|
1377
|
-
]; };
|
|
1378
|
-
__decorate([
|
|
1379
|
-
Trace(),
|
|
1380
|
-
__metadata("design:type", Function),
|
|
1381
|
-
__metadata("design:paramtypes", []),
|
|
1382
|
-
__metadata("design:returntype", void 0)
|
|
1383
|
-
], ToolBarComponent.prototype, "ngOnInit", null);
|
|
1384
|
-
__decorate([
|
|
1385
|
-
Trace(),
|
|
1386
|
-
__metadata("design:type", Function),
|
|
1387
|
-
__metadata("design:paramtypes", []),
|
|
1388
|
-
__metadata("design:returntype", void 0)
|
|
1389
|
-
], ToolBarComponent.prototype, "ngAfterContentInit", null);
|
|
1390
|
-
__decorate([
|
|
1391
|
-
Trace(),
|
|
1392
|
-
__metadata("design:type", Function),
|
|
1393
|
-
__metadata("design:paramtypes", []),
|
|
1394
|
-
__metadata("design:returntype", void 0)
|
|
1395
|
-
], ToolBarComponent.prototype, "ngAfterViewInit", null);
|
|
1396
|
-
ToolBarComponent = __decorate([
|
|
1397
|
-
Component({
|
|
1398
|
-
selector: 'aup-tool-bar',
|
|
1399
|
-
template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1400
|
-
providers: [{ provide: CommandGroup, useFactory: ɵ0$2 }],
|
|
1401
|
-
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}"]
|
|
1402
|
-
}),
|
|
1403
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1404
|
-
], ToolBarComponent);
|
|
1405
|
-
return ToolBarComponent;
|
|
1406
|
-
}(DisposableComponent));
|
|
1407
|
-
|
|
1408
|
-
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
1409
|
-
__extends(FocusContainerComponent, _super);
|
|
1410
|
-
function FocusContainerComponent(focusManager) {
|
|
1411
|
-
var _this = _super.call(this) || this;
|
|
1412
|
-
_this.focusManager = focusManager;
|
|
1413
|
-
_this.restoreFocusCommand = Command.create(function () {
|
|
1414
|
-
_this.restoreFocus();
|
|
1415
|
-
});
|
|
1416
|
-
_this.tabIndex = -1;
|
|
1417
|
-
return _this;
|
|
1418
|
-
}
|
|
1419
|
-
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
1420
|
-
};
|
|
1421
|
-
// @Trace()
|
|
1422
|
-
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
1423
|
-
this.focusManager.restoreFocus();
|
|
1424
|
-
};
|
|
1425
|
-
FocusContainerComponent.ctorParameters = function () { return [
|
|
1426
|
-
{ type: FocusManager, decorators: [{ type: Self }] }
|
|
1427
|
-
]; };
|
|
1428
|
-
__decorate([
|
|
1429
|
-
HostBinding('attr.tabindex'),
|
|
1430
|
-
__metadata("design:type", Object)
|
|
1431
|
-
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
1432
|
-
FocusContainerComponent = __decorate([
|
|
1433
|
-
Component({
|
|
1434
|
-
selector: 'aup-focus-container',
|
|
1435
|
-
template: "<ng-content></ng-content>\n",
|
|
1436
|
-
providers: [
|
|
1437
|
-
{ provide: FocusManager }
|
|
1438
|
-
],
|
|
1439
|
-
styles: [":host{display:block}"]
|
|
1440
|
-
}),
|
|
1441
|
-
__param(0, Self()),
|
|
1442
|
-
__metadata("design:paramtypes", [FocusManager])
|
|
1443
|
-
], FocusContainerComponent);
|
|
1444
|
-
return FocusContainerComponent;
|
|
1445
|
-
}(DisposableComponent));
|
|
1446
|
-
|
|
1447
|
-
var FocusableComponent = /** @class */ (function (_super) {
|
|
1448
|
-
__extends(FocusableComponent, _super);
|
|
1449
|
-
function FocusableComponent(el, focusManager, focusBindingFactory) {
|
|
1450
|
-
var _this = _super.call(this) || this;
|
|
1451
|
-
_this.el = el;
|
|
1452
|
-
_this.focusManager = focusManager;
|
|
1453
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1454
|
-
if (_this.focusManager) {
|
|
1455
|
-
_this._focusContext = _this.focusManager.registerFocusable(_this);
|
|
1456
|
-
_this.registerDisposable(_this._focusContext);
|
|
1457
|
-
_this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
|
|
1458
|
-
}
|
|
1459
|
-
return _this;
|
|
1460
|
-
}
|
|
1461
|
-
Object.defineProperty(FocusableComponent.prototype, "focusable", {
|
|
1462
|
-
get: function () {
|
|
1463
|
-
return !!this.focusContext ? 0 : undefined;
|
|
1464
|
-
},
|
|
1465
|
-
enumerable: true,
|
|
1466
|
-
configurable: true
|
|
1467
|
-
});
|
|
1468
|
-
FocusableComponent.prototype.onFocus = function () {
|
|
1469
|
-
var _a;
|
|
1470
|
-
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
|
|
1471
|
-
};
|
|
1472
|
-
FocusableComponent.prototype.onBlur = function () {
|
|
1473
|
-
var _a;
|
|
1474
|
-
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
|
|
1475
|
-
};
|
|
1476
|
-
Object.defineProperty(FocusableComponent.prototype, "focusContext", {
|
|
1477
|
-
get: function () {
|
|
1478
|
-
return this._focusContext;
|
|
1479
|
-
},
|
|
1480
|
-
enumerable: true,
|
|
1481
|
-
configurable: true
|
|
1482
|
-
});
|
|
1483
|
-
FocusableComponent.ctorParameters = function () { return [
|
|
1484
|
-
{ type: ElementRef },
|
|
1485
|
-
{ type: FocusManager },
|
|
1486
|
-
{ type: FocusBindingFactory }
|
|
1487
|
-
]; };
|
|
1488
|
-
__decorate([
|
|
1489
|
-
HostBinding('attr.tabindex'),
|
|
1490
|
-
__metadata("design:type", Object),
|
|
1491
|
-
__metadata("design:paramtypes", [])
|
|
1492
|
-
], FocusableComponent.prototype, "focusable", null);
|
|
1493
|
-
__decorate([
|
|
1494
|
-
HostListener('focus'),
|
|
1495
|
-
__metadata("design:type", Function),
|
|
1496
|
-
__metadata("design:paramtypes", []),
|
|
1497
|
-
__metadata("design:returntype", void 0)
|
|
1498
|
-
], FocusableComponent.prototype, "onFocus", null);
|
|
1499
|
-
__decorate([
|
|
1500
|
-
HostListener('blur'),
|
|
1501
|
-
__metadata("design:type", Function),
|
|
1502
|
-
__metadata("design:paramtypes", []),
|
|
1503
|
-
__metadata("design:returntype", void 0)
|
|
1504
|
-
], FocusableComponent.prototype, "onBlur", null);
|
|
1505
|
-
FocusableComponent = __decorate([
|
|
1506
|
-
Component({ template: '' }),
|
|
1507
|
-
__metadata("design:paramtypes", [ElementRef, FocusManager, FocusBindingFactory])
|
|
1508
|
-
], FocusableComponent);
|
|
1509
|
-
return FocusableComponent;
|
|
1510
|
-
}(DisposableComponent));
|
|
1511
|
-
|
|
1512
|
-
var AbstractInputComponent = /** @class */ (function (_super) {
|
|
1513
|
-
__extends(AbstractInputComponent, _super);
|
|
1514
|
-
function AbstractInputComponent() {
|
|
1515
|
-
var _this = _super.call(this) || this;
|
|
1516
|
-
_this.onValueEditedListeners = new EventListenerList();
|
|
1517
524
|
_this.dense = false;
|
|
1518
525
|
// TODO: fix this.
|
|
1519
526
|
// tslint:disable-next-line:no-output-native
|
|
@@ -1564,7 +571,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1564
571
|
};
|
|
1565
572
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
1566
573
|
get: function () {
|
|
1567
|
-
return this.
|
|
574
|
+
return this.inputModel.enabled;
|
|
1568
575
|
},
|
|
1569
576
|
enumerable: true,
|
|
1570
577
|
configurable: true
|
|
@@ -1574,7 +581,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1574
581
|
};
|
|
1575
582
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
1576
583
|
get: function () {
|
|
1577
|
-
return this.
|
|
584
|
+
return this.inputModel.errorList;
|
|
1578
585
|
},
|
|
1579
586
|
enumerable: true,
|
|
1580
587
|
configurable: true
|
|
@@ -1588,7 +595,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1588
595
|
});
|
|
1589
596
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
1590
597
|
get: function () {
|
|
1591
|
-
return this.
|
|
598
|
+
return this.inputModel.focusContext;
|
|
1592
599
|
},
|
|
1593
600
|
enumerable: true,
|
|
1594
601
|
configurable: true
|
|
@@ -1607,13 +614,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1607
614
|
enumerable: true,
|
|
1608
615
|
configurable: true
|
|
1609
616
|
});
|
|
1610
|
-
/**
|
|
1611
|
-
* Invokes the callback when this components value is changed by a user edit.
|
|
1612
|
-
* @param callback
|
|
1613
|
-
*/
|
|
1614
|
-
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
1615
|
-
return this.onValueEditedListeners.add(callback);
|
|
1616
|
-
};
|
|
1617
617
|
__decorate([
|
|
1618
618
|
Input(),
|
|
1619
619
|
__metadata("design:type", String)
|
|
@@ -1703,7 +703,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1703
703
|
var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
1704
704
|
__extends(AbstractListInputComponent, _super);
|
|
1705
705
|
function AbstractListInputComponent() {
|
|
1706
|
-
var _this = _super.
|
|
706
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1707
707
|
/**
|
|
1708
708
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1709
709
|
*
|
|
@@ -1715,61 +715,11 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
1715
715
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1716
716
|
*/
|
|
1717
717
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1718
|
-
_this.
|
|
1719
|
-
_this.componentListModel = new MutableListModel();
|
|
1720
|
-
_this.setValueIsInProgress = new Guard();
|
|
1721
|
-
_this.valueChange = new EventEmitter();
|
|
1722
|
-
var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
1723
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel).writeRight();
|
|
1724
|
-
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1725
|
-
when(_this.componentListModel).changes(function (is, was) {
|
|
1726
|
-
_this.valueChange.emit(is);
|
|
1727
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1728
|
-
}, {
|
|
1729
|
-
initialValue: 'ignore',
|
|
1730
|
-
// we never fire events during an external changes to the value. This allows
|
|
1731
|
-
// the component to behave when used in the conventional angular
|
|
1732
|
-
// fashion, i.e. [(value)]="..."
|
|
1733
|
-
unless: inExternalChange
|
|
1734
|
-
});
|
|
1735
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
718
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
|
|
1736
719
|
return _this;
|
|
1737
720
|
}
|
|
1738
|
-
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
1739
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1740
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1741
|
-
// and the like.
|
|
1742
|
-
set: function (value) {
|
|
1743
|
-
var _this = this;
|
|
1744
|
-
this.setValueIsInProgress.whileTrue(function () {
|
|
1745
|
-
if (!_this.listHolder) {
|
|
1746
|
-
_this.listHolder = new MutableListModel(value);
|
|
1747
|
-
_this.listModel = _this.listHolder;
|
|
1748
|
-
}
|
|
1749
|
-
else {
|
|
1750
|
-
_this.listHolder.value = value;
|
|
1751
|
-
}
|
|
1752
|
-
});
|
|
1753
|
-
},
|
|
1754
|
-
enumerable: true,
|
|
1755
|
-
configurable: true
|
|
1756
|
-
});
|
|
1757
|
-
__decorate([
|
|
1758
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1759
|
-
__metadata("design:type", Object)
|
|
1760
|
-
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
1761
|
-
__decorate([
|
|
1762
|
-
Input(),
|
|
1763
|
-
__metadata("design:type", Array),
|
|
1764
|
-
__metadata("design:paramtypes", [Array])
|
|
1765
|
-
], AbstractListInputComponent.prototype, "value", null);
|
|
1766
|
-
__decorate([
|
|
1767
|
-
Output(),
|
|
1768
|
-
__metadata("design:type", Object)
|
|
1769
|
-
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
1770
721
|
AbstractListInputComponent = __decorate([
|
|
1771
|
-
Component({ template: '' })
|
|
1772
|
-
__metadata("design:paramtypes", [])
|
|
722
|
+
Component({ template: '' })
|
|
1773
723
|
], AbstractListInputComponent);
|
|
1774
724
|
return AbstractListInputComponent;
|
|
1775
725
|
}(AbstractInputComponent));
|
|
@@ -1779,154 +729,40 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
1779
729
|
function AbstractValueInputComponent() {
|
|
1780
730
|
var _this = _super.call(this) || this;
|
|
1781
731
|
/**
|
|
1782
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1783
|
-
*
|
|
1784
|
-
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1785
|
-
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
1786
|
-
*
|
|
1787
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1788
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1789
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1790
|
-
*/
|
|
1791
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1792
|
-
_this.
|
|
1793
|
-
_this
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel).writeRight();
|
|
1798
|
-
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1799
|
-
when(_this.componentValueModel).changes(function (is, was) {
|
|
1800
|
-
_this.valueChange.emit(is);
|
|
1801
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1802
|
-
}, {
|
|
1803
|
-
initialValue: 'ignore',
|
|
1804
|
-
// we never fire events during an external set value operation. This allows
|
|
1805
|
-
// the component to behave when used in the conventional angular
|
|
1806
|
-
// fashion, i.e. [(value)]="..."
|
|
1807
|
-
unless: inExternalChange
|
|
1808
|
-
});
|
|
1809
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
1810
|
-
return _this;
|
|
1811
|
-
}
|
|
1812
|
-
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
1813
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1814
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1815
|
-
// and the like.
|
|
1816
|
-
set: function (value) {
|
|
1817
|
-
var _this = this;
|
|
1818
|
-
this.setValueInProgress.whileTrue(function () {
|
|
1819
|
-
if (!_this.plainValueHolder) {
|
|
1820
|
-
_this.plainValueHolder = new MutableValueModel(value);
|
|
1821
|
-
_this.valueModel = _this.plainValueHolder;
|
|
1822
|
-
}
|
|
1823
|
-
else {
|
|
1824
|
-
_this.plainValueHolder.value = value;
|
|
1825
|
-
}
|
|
1826
|
-
});
|
|
1827
|
-
},
|
|
1828
|
-
enumerable: true,
|
|
1829
|
-
configurable: true
|
|
1830
|
-
});
|
|
1831
|
-
__decorate([
|
|
1832
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1833
|
-
__metadata("design:type", Object)
|
|
1834
|
-
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
1835
|
-
__decorate([
|
|
1836
|
-
Input(),
|
|
1837
|
-
__metadata("design:type", Object),
|
|
1838
|
-
__metadata("design:paramtypes", [Object])
|
|
1839
|
-
], AbstractValueInputComponent.prototype, "value", null);
|
|
1840
|
-
__decorate([
|
|
1841
|
-
Output(),
|
|
1842
|
-
__metadata("design:type", Object)
|
|
1843
|
-
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
1844
|
-
AbstractValueInputComponent = __decorate([
|
|
1845
|
-
Component({ template: '' }),
|
|
1846
|
-
__metadata("design:paramtypes", [])
|
|
1847
|
-
], AbstractValueInputComponent);
|
|
1848
|
-
return AbstractValueInputComponent;
|
|
1849
|
-
}(AbstractInputComponent));
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* Using templates (not only supported for nil values:
|
|
1853
|
-
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
1854
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1855
|
-
* </aup-autocomplete-input>
|
|
1856
|
-
*/
|
|
1857
|
-
var AutocompleteInputComponent = /** @class */ (function (_super) {
|
|
1858
|
-
__extends(AutocompleteInputComponent, _super);
|
|
1859
|
-
function AutocompleteInputComponent() {
|
|
1860
|
-
var _this = _super.call(this) || this;
|
|
1861
|
-
_this.filterValue = new MutableValueModel();
|
|
1862
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1863
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1864
|
-
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
1865
|
-
.map(function (v) { return ___default.isString(v) ? v.toLowerCase() : ''; });
|
|
1866
|
-
_this.filteredOptions = chain(_this.optionsModel)
|
|
1867
|
-
.select(function (option) {
|
|
1868
|
-
return ___default.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
1869
|
-
}, { dependsOn: lowerCaseFilterValue });
|
|
1870
|
-
return _this;
|
|
1871
|
-
}
|
|
1872
|
-
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
1873
|
-
};
|
|
1874
|
-
AutocompleteInputComponent.prototype.formatOption = function (option) {
|
|
1875
|
-
return this.optionLabelFormat(option);
|
|
1876
|
-
};
|
|
1877
|
-
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
1878
|
-
this.filterValue.value = $event;
|
|
1879
|
-
};
|
|
1880
|
-
AutocompleteInputComponent.prototype.onSelect = function ($event) {
|
|
1881
|
-
this.valueModel.value = $event.option.value;
|
|
1882
|
-
};
|
|
1883
|
-
__decorate([
|
|
1884
|
-
Input(), TrackExternal(),
|
|
1885
|
-
__metadata("design:type", ListModel)
|
|
1886
|
-
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
1887
|
-
__decorate([
|
|
1888
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1889
|
-
__metadata("design:type", Array)
|
|
1890
|
-
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
1891
|
-
__decorate([
|
|
1892
|
-
Input(),
|
|
1893
|
-
__metadata("design:type", Object)
|
|
1894
|
-
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
1895
|
-
__decorate([
|
|
1896
|
-
Input(),
|
|
1897
|
-
__metadata("design:type", Boolean)
|
|
1898
|
-
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
1899
|
-
__decorate([
|
|
1900
|
-
ContentChild('nilOptionTemplate'),
|
|
1901
|
-
__metadata("design:type", TemplateRef)
|
|
1902
|
-
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1903
|
-
__decorate([
|
|
1904
|
-
Input(),
|
|
1905
|
-
__metadata("design:type", Function)
|
|
1906
|
-
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1907
|
-
AutocompleteInputComponent = __decorate([
|
|
1908
|
-
Component({
|
|
1909
|
-
selector: 'aup-autocomplete-input',
|
|
1910
|
-
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",
|
|
1911
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1912
|
-
}),
|
|
732
|
+
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
733
|
+
*
|
|
734
|
+
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
735
|
+
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
736
|
+
*
|
|
737
|
+
* This approach allows the input to accept plain or form models but all backed by a form
|
|
738
|
+
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
739
|
+
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
740
|
+
*/
|
|
741
|
+
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
742
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
743
|
+
return _this;
|
|
744
|
+
}
|
|
745
|
+
AbstractValueInputComponent = __decorate([
|
|
746
|
+
Component({ template: '' }),
|
|
1913
747
|
__metadata("design:paramtypes", [])
|
|
1914
|
-
],
|
|
1915
|
-
return
|
|
1916
|
-
}(
|
|
748
|
+
], AbstractValueInputComponent);
|
|
749
|
+
return AbstractValueInputComponent;
|
|
750
|
+
}(AbstractInputComponent));
|
|
1917
751
|
|
|
1918
752
|
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
1919
753
|
__extends(CheckboxInputComponent, _super);
|
|
1920
754
|
function CheckboxInputComponent() {
|
|
1921
755
|
var _this = _super.call(this) || this;
|
|
1922
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1923
|
-
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
1924
756
|
_this.color = 'accent';
|
|
1925
757
|
_this.labelPosition = 'after';
|
|
1926
758
|
return _this;
|
|
1927
759
|
}
|
|
1928
760
|
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
1929
761
|
};
|
|
762
|
+
__decorate([
|
|
763
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
764
|
+
__metadata("design:type", Object)
|
|
765
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1930
766
|
__decorate([
|
|
1931
767
|
Input(),
|
|
1932
768
|
__metadata("design:type", String)
|
|
@@ -1938,7 +774,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
1938
774
|
CheckboxInputComponent = __decorate([
|
|
1939
775
|
Component({
|
|
1940
776
|
selector: 'aup-checkbox-input',
|
|
1941
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
777
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.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",
|
|
1942
778
|
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}"]
|
|
1943
779
|
}),
|
|
1944
780
|
__metadata("design:paramtypes", [])
|
|
@@ -1946,65 +782,20 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
1946
782
|
return CheckboxInputComponent;
|
|
1947
783
|
}(AbstractValueInputComponent));
|
|
1948
784
|
|
|
1949
|
-
/**
|
|
1950
|
-
* Using templates:
|
|
1951
|
-
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1952
|
-
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1953
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1954
|
-
* </aup-multiple-select_input>
|
|
1955
|
-
*/
|
|
1956
|
-
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
1957
|
-
__extends(MultipleSelectInputComponent, _super);
|
|
1958
|
-
function MultipleSelectInputComponent() {
|
|
1959
|
-
var _this = _super.call(this) || this;
|
|
1960
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1961
|
-
return _this;
|
|
1962
|
-
}
|
|
1963
|
-
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
1964
|
-
};
|
|
1965
|
-
__decorate([
|
|
1966
|
-
Input(), TrackExternal(),
|
|
1967
|
-
__metadata("design:type", ListModel)
|
|
1968
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
1969
|
-
__decorate([
|
|
1970
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1971
|
-
__metadata("design:type", Array)
|
|
1972
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
1973
|
-
__decorate([
|
|
1974
|
-
Input(),
|
|
1975
|
-
__metadata("design:type", Object)
|
|
1976
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
1977
|
-
__decorate([
|
|
1978
|
-
ContentChild('optionTemplate'),
|
|
1979
|
-
__metadata("design:type", TemplateRef)
|
|
1980
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1981
|
-
__decorate([
|
|
1982
|
-
Input(),
|
|
1983
|
-
__metadata("design:type", Function)
|
|
1984
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1985
|
-
MultipleSelectInputComponent = __decorate([
|
|
1986
|
-
Component({
|
|
1987
|
-
selector: 'aup-multiple-select-input',
|
|
1988
|
-
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",
|
|
1989
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1990
|
-
}),
|
|
1991
|
-
__metadata("design:paramtypes", [])
|
|
1992
|
-
], MultipleSelectInputComponent);
|
|
1993
|
-
return MultipleSelectInputComponent;
|
|
1994
|
-
}(AbstractListInputComponent));
|
|
1995
|
-
|
|
1996
785
|
var NumberInputComponent = /** @class */ (function (_super) {
|
|
1997
786
|
__extends(NumberInputComponent, _super);
|
|
1998
787
|
function NumberInputComponent() {
|
|
1999
788
|
var _this = _super.call(this) || this;
|
|
2000
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
2001
|
-
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
2002
789
|
_this.min = Number.MIN_SAFE_INTEGER;
|
|
2003
790
|
_this.max = Number.MAX_SAFE_INTEGER;
|
|
2004
791
|
return _this;
|
|
2005
792
|
}
|
|
2006
793
|
NumberInputComponent.prototype.ngOnInit = function () {
|
|
2007
794
|
};
|
|
795
|
+
__decorate([
|
|
796
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
797
|
+
__metadata("design:type", Object)
|
|
798
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
2008
799
|
__decorate([
|
|
2009
800
|
Input(),
|
|
2010
801
|
__metadata("design:type", Object)
|
|
@@ -2016,7 +807,7 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
2016
807
|
NumberInputComponent = __decorate([
|
|
2017
808
|
Component({
|
|
2018
809
|
selector: 'aup-number-input',
|
|
2019
|
-
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)]=\"
|
|
810
|
+
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)]=\"valueModel.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",
|
|
2020
811
|
styles: [""]
|
|
2021
812
|
}),
|
|
2022
813
|
__metadata("design:paramtypes", [])
|
|
@@ -2026,17 +817,19 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
2026
817
|
|
|
2027
818
|
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
2028
819
|
__extends(PasswordInputComponent, _super);
|
|
2029
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
2030
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
2031
820
|
function PasswordInputComponent() {
|
|
2032
821
|
return _super.call(this) || this;
|
|
2033
822
|
}
|
|
2034
823
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
2035
824
|
};
|
|
825
|
+
__decorate([
|
|
826
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
827
|
+
__metadata("design:type", Object)
|
|
828
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
2036
829
|
PasswordInputComponent = __decorate([
|
|
2037
830
|
Component({
|
|
2038
831
|
selector: 'aup-password-input',
|
|
2039
|
-
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)]=\"
|
|
832
|
+
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)]=\"valueModel.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",
|
|
2040
833
|
styles: [""]
|
|
2041
834
|
}),
|
|
2042
835
|
__metadata("design:paramtypes", [])
|
|
@@ -2048,7 +841,6 @@ var PasswordInputComponent = /** @class */ (function (_super) {
|
|
|
2048
841
|
* Using templates:
|
|
2049
842
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
2050
843
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
2051
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
2052
844
|
* </aup-select_input>
|
|
2053
845
|
*/
|
|
2054
846
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -2060,6 +852,10 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
2060
852
|
}
|
|
2061
853
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
2062
854
|
};
|
|
855
|
+
__decorate([
|
|
856
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
857
|
+
__metadata("design:type", Object)
|
|
858
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
2063
859
|
__decorate([
|
|
2064
860
|
Input(), TrackExternal(),
|
|
2065
861
|
__metadata("design:type", ListModel)
|
|
@@ -2091,7 +887,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
2091
887
|
SelectInputComponent = __decorate([
|
|
2092
888
|
Component({
|
|
2093
889
|
selector: 'aup-select-input',
|
|
2094
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
890
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.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\">{{placeholder}}</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",
|
|
2095
891
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2096
892
|
}),
|
|
2097
893
|
__metadata("design:paramtypes", [])
|
|
@@ -2105,13 +901,17 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
2105
901
|
var _this = _super.call(this) || this;
|
|
2106
902
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2107
903
|
_this.clearCommand = Command.create(function () {
|
|
2108
|
-
_this.
|
|
904
|
+
_this.valueModel.value = null;
|
|
2109
905
|
});
|
|
2110
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
906
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
2111
907
|
return _this;
|
|
2112
908
|
}
|
|
2113
909
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
2114
910
|
};
|
|
911
|
+
__decorate([
|
|
912
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
913
|
+
__metadata("design:type", Object)
|
|
914
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
2115
915
|
__decorate([
|
|
2116
916
|
Input(), TrackExternal({ defaultValue: false }),
|
|
2117
917
|
__metadata("design:type", ValueModel)
|
|
@@ -2123,7 +923,7 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
2123
923
|
StringInputComponent = __decorate([
|
|
2124
924
|
Component({
|
|
2125
925
|
selector: 'aup-string-input',
|
|
2126
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
926
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.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",
|
|
2127
927
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
2128
928
|
}),
|
|
2129
929
|
__metadata("design:paramtypes", [])
|
|
@@ -2135,14 +935,16 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
2135
935
|
__extends(TextInputComponent, _super);
|
|
2136
936
|
function TextInputComponent() {
|
|
2137
937
|
var _this = _super.call(this) || this;
|
|
2138
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
2139
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
2140
938
|
_this.rows = 2;
|
|
2141
939
|
return _this;
|
|
2142
940
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2143
941
|
}
|
|
2144
942
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
2145
943
|
};
|
|
944
|
+
__decorate([
|
|
945
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
946
|
+
__metadata("design:type", Object)
|
|
947
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
2146
948
|
__decorate([
|
|
2147
949
|
Input(),
|
|
2148
950
|
__metadata("design:type", Object)
|
|
@@ -2154,7 +956,7 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
2154
956
|
TextInputComponent = __decorate([
|
|
2155
957
|
Component({
|
|
2156
958
|
selector: 'aup-text-input',
|
|
2157
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
959
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.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",
|
|
2158
960
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
2159
961
|
}),
|
|
2160
962
|
__metadata("design:paramtypes", [])
|
|
@@ -2162,59 +964,6 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
2162
964
|
return TextInputComponent;
|
|
2163
965
|
}(AbstractValueInputComponent));
|
|
2164
966
|
|
|
2165
|
-
var IconComponent = /** @class */ (function () {
|
|
2166
|
-
function IconComponent() {
|
|
2167
|
-
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
2168
|
-
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
2169
|
-
}
|
|
2170
|
-
IconComponent_1 = IconComponent;
|
|
2171
|
-
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2172
|
-
get: function () {
|
|
2173
|
-
return this._icon;
|
|
2174
|
-
},
|
|
2175
|
-
set: function (iconName) {
|
|
2176
|
-
this._icon = iconName;
|
|
2177
|
-
if (!iconName) {
|
|
2178
|
-
this.errorMessage = 'icon is nil';
|
|
2179
|
-
this.prefix = undefined;
|
|
2180
|
-
return;
|
|
2181
|
-
}
|
|
2182
|
-
var colonIndex = iconName.indexOf(':');
|
|
2183
|
-
if (colonIndex > 0) {
|
|
2184
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
2185
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2186
|
-
}
|
|
2187
|
-
if (this.prefix) {
|
|
2188
|
-
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2189
|
-
}
|
|
2190
|
-
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
2191
|
-
},
|
|
2192
|
-
enumerable: true,
|
|
2193
|
-
configurable: true
|
|
2194
|
-
});
|
|
2195
|
-
var IconComponent_1;
|
|
2196
|
-
__decorate([
|
|
2197
|
-
Input(),
|
|
2198
|
-
__metadata("design:type", String),
|
|
2199
|
-
__metadata("design:paramtypes", [String])
|
|
2200
|
-
], IconComponent.prototype, "icon", null);
|
|
2201
|
-
IconComponent = IconComponent_1 = __decorate([
|
|
2202
|
-
Component({
|
|
2203
|
-
selector: 'aup-icon',
|
|
2204
|
-
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",
|
|
2205
|
-
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}"]
|
|
2206
|
-
})
|
|
2207
|
-
], IconComponent);
|
|
2208
|
-
return IconComponent;
|
|
2209
|
-
}());
|
|
2210
|
-
(function (IconComponent) {
|
|
2211
|
-
IconComponent.IconPrefix = Enum({
|
|
2212
|
-
SVG: 'svg',
|
|
2213
|
-
FONT_AWESOME: 'fa',
|
|
2214
|
-
MATERIAL: 'mat'
|
|
2215
|
-
});
|
|
2216
|
-
})(IconComponent || (IconComponent = {}));
|
|
2217
|
-
|
|
2218
967
|
var NoopComponent = /** @class */ (function () {
|
|
2219
968
|
function NoopComponent() {
|
|
2220
969
|
}
|
|
@@ -2425,7 +1174,6 @@ var CellHeaderPortalRef = /** @class */ (function (_super) {
|
|
|
2425
1174
|
assert$1.isTruthy(host);
|
|
2426
1175
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
2427
1176
|
};
|
|
2428
|
-
// @Trace()
|
|
2429
1177
|
CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
2430
1178
|
this.initialiseHeader(portalComponent, host.column);
|
|
2431
1179
|
};
|
|
@@ -2449,15 +1197,13 @@ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
2449
1197
|
ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
|
|
2450
1198
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
2451
1199
|
};
|
|
2452
|
-
// @Trace()
|
|
2453
1200
|
ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
2454
1201
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
2455
|
-
this.updateComponent(portalComponent, host.getRowData()
|
|
1202
|
+
this.updateComponent(portalComponent, host.getRowData());
|
|
2456
1203
|
};
|
|
2457
|
-
// @Trace()
|
|
2458
1204
|
ComponentCellRendererPortalRef.prototype.pushState = function (host) {
|
|
2459
1205
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
2460
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData()
|
|
1206
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
2461
1207
|
}
|
|
2462
1208
|
};
|
|
2463
1209
|
return ComponentCellRendererPortalRef;
|
|
@@ -2499,7 +1245,6 @@ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
2499
1245
|
TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
2500
1246
|
// don't care
|
|
2501
1247
|
};
|
|
2502
|
-
// @Trace()
|
|
2503
1248
|
TemplateCellRendererPortalRef.prototype.pushState = function (host) {
|
|
2504
1249
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
2505
1250
|
host.fillCell = this.fillCell;
|
|
@@ -2690,8 +1435,7 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
|
|
|
2690
1435
|
|
|
2691
1436
|
var noop = function () {
|
|
2692
1437
|
};
|
|
2693
|
-
var ɵ0
|
|
2694
|
-
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1438
|
+
var ɵ0 = noop;
|
|
2695
1439
|
var ColumnModel = /** @class */ (function () {
|
|
2696
1440
|
function ColumnModel(columnId, defaults) {
|
|
2697
1441
|
this.columnId = columnId;
|
|
@@ -2782,66 +1526,24 @@ var ColumnModel = /** @class */ (function () {
|
|
|
2782
1526
|
}());
|
|
2783
1527
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
2784
1528
|
__extends(PropertyColumnModel, _super);
|
|
2785
|
-
function PropertyColumnModel(
|
|
2786
|
-
var _this = _super.call(this,
|
|
1529
|
+
function PropertyColumnModel(property, defaults) {
|
|
1530
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2787
1531
|
_this.property = property;
|
|
2788
1532
|
_this._format = function (value) { return value; };
|
|
2789
1533
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2790
1534
|
return _this;
|
|
2791
1535
|
}
|
|
2792
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType
|
|
1536
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2793
1537
|
var _this = this;
|
|
2794
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
2795
|
-
if (firstTime) {
|
|
2796
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2797
|
-
onComponentInitOrOptions(component);
|
|
2798
|
-
}
|
|
2799
|
-
else {
|
|
2800
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2801
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
1538
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2805
1539
|
component.value = _this._format(rowData.row[_this.property]);
|
|
2806
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2807
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2808
|
-
}
|
|
2809
|
-
}));
|
|
2810
|
-
return this;
|
|
2811
|
-
};
|
|
2812
|
-
PropertyColumnModel.prototype.mutableCellRenderer = function (componentType, options) {
|
|
2813
|
-
var _this = this;
|
|
2814
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2815
|
-
// keep a local copy most recent row value so it's available to teh
|
|
2816
|
-
// edit callback without having to add/remove subscribers all the time.
|
|
2817
|
-
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2818
|
-
var disableEditCallback = false;
|
|
2819
|
-
if (firstTime) {
|
|
2820
|
-
if (___default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2821
|
-
options.onComponentInit(component);
|
|
2822
|
-
}
|
|
2823
|
-
// install our edit callback
|
|
2824
|
-
component.onValueEdited(function (is, was) {
|
|
2825
|
-
if (!disableEditCallback) {
|
|
2826
|
-
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2827
|
-
}
|
|
2828
|
-
});
|
|
2829
|
-
}
|
|
2830
|
-
// now push the value the component and disable the callback just incase the component misbehaves
|
|
2831
|
-
// and fires a value change during the operation.
|
|
2832
|
-
disableEditCallback = true;
|
|
2833
|
-
component.value = rowData.row[_this.property];
|
|
2834
|
-
disableEditCallback = false;
|
|
2835
|
-
if (!___default.isFunction(options) && ___default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
2836
|
-
options.onRowUpdate(component, rowData.row);
|
|
2837
|
-
}
|
|
2838
1540
|
}));
|
|
2839
1541
|
return this;
|
|
2840
1542
|
};
|
|
2841
|
-
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser,
|
|
1543
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2842
1544
|
var _this = this;
|
|
2843
1545
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2844
|
-
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
1546
|
+
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2845
1547
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
2846
1548
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
2847
1549
|
if (validators) {
|
|
@@ -2866,8 +1568,8 @@ var PropertyColumnModel = /** @class */ (function (_super) {
|
|
|
2866
1568
|
}(ColumnModel));
|
|
2867
1569
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
2868
1570
|
__extends(ListPropertyColumnModel, _super);
|
|
2869
|
-
function ListPropertyColumnModel(
|
|
2870
|
-
var _this = _super.call(this,
|
|
1571
|
+
function ListPropertyColumnModel(property, defaults) {
|
|
1572
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2871
1573
|
_this.property = property;
|
|
2872
1574
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
2873
1575
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -2914,23 +1616,10 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
|
2914
1616
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2915
1617
|
return _this;
|
|
2916
1618
|
}
|
|
2917
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType
|
|
1619
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2918
1620
|
var _this = this;
|
|
2919
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
2920
|
-
if (firstTime) {
|
|
2921
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2922
|
-
onComponentInitOrOptions(component);
|
|
2923
|
-
}
|
|
2924
|
-
else {
|
|
2925
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2926
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2927
|
-
}
|
|
2928
|
-
}
|
|
2929
|
-
}
|
|
1621
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2930
1622
|
component.value = _this.getValue(rowData.row);
|
|
2931
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2932
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2933
|
-
}
|
|
2934
1623
|
}));
|
|
2935
1624
|
return this;
|
|
2936
1625
|
};
|
|
@@ -3103,9 +1792,6 @@ var TableModel = /** @class */ (function () {
|
|
|
3103
1792
|
this._editorSessions = new MutableListModel();
|
|
3104
1793
|
this.rowClassNamePredicates = [];
|
|
3105
1794
|
this._createForm = function (row) { return new DirtyTrackingForm(); };
|
|
3106
|
-
this.trackBy = function (index, item) {
|
|
3107
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
3108
|
-
};
|
|
3109
1795
|
this.identityOf = sourceOfTruth.identityOf;
|
|
3110
1796
|
var _a = 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;
|
|
3111
1797
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -3117,7 +1803,7 @@ var TableModel = /** @class */ (function () {
|
|
|
3117
1803
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
3118
1804
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
3119
1805
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
3120
|
-
this.addRowClass(
|
|
1806
|
+
this.addRowClass("enable-hover", function () { return _this.isRowSelectionEnabled(); });
|
|
3121
1807
|
}
|
|
3122
1808
|
TableModel_1 = TableModel;
|
|
3123
1809
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -3132,6 +1818,12 @@ var TableModel = /** @class */ (function () {
|
|
|
3132
1818
|
enumerable: true,
|
|
3133
1819
|
configurable: true
|
|
3134
1820
|
});
|
|
1821
|
+
TableModel.prototype.getTrackByFunction = function () {
|
|
1822
|
+
var _this = this;
|
|
1823
|
+
return function (index, item) {
|
|
1824
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
3135
1827
|
Object.defineProperty(TableModel.prototype, "columns", {
|
|
3136
1828
|
get: function () {
|
|
3137
1829
|
return this._columns.readonly;
|
|
@@ -3139,11 +1831,11 @@ var TableModel = /** @class */ (function () {
|
|
|
3139
1831
|
enumerable: true,
|
|
3140
1832
|
configurable: true
|
|
3141
1833
|
});
|
|
3142
|
-
TableModel.prototype.pluck = function (property
|
|
3143
|
-
return this.addColumn(new PropertyColumnModel(
|
|
1834
|
+
TableModel.prototype.pluck = function (property) {
|
|
1835
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
3144
1836
|
};
|
|
3145
|
-
TableModel.prototype.pluckList = function (property
|
|
3146
|
-
return this.addColumn(new ListPropertyColumnModel(
|
|
1837
|
+
TableModel.prototype.pluckList = function (property) {
|
|
1838
|
+
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
3147
1839
|
};
|
|
3148
1840
|
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
3149
1841
|
assert.isNil(this.selectionColumnModel);
|
|
@@ -3157,9 +1849,6 @@ var TableModel = /** @class */ (function () {
|
|
|
3157
1849
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
3158
1850
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
3159
1851
|
};
|
|
3160
|
-
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
3161
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
3162
|
-
};
|
|
3163
1852
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
3164
1853
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
3165
1854
|
};
|
|
@@ -3188,14 +1877,12 @@ var TableModel = /** @class */ (function () {
|
|
|
3188
1877
|
}
|
|
3189
1878
|
return column;
|
|
3190
1879
|
};
|
|
3191
|
-
// removeColumn(column: ColumnModel<Row>) {
|
|
3192
|
-
//
|
|
3193
|
-
// }
|
|
3194
1880
|
TableModel.prototype.columnTextProperties = function (columnTextProperties) {
|
|
3195
1881
|
this._columnTextPropertiesLookup = columnTextProperties;
|
|
3196
1882
|
};
|
|
3197
1883
|
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
3198
|
-
|
|
1884
|
+
var factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
|
|
1885
|
+
return factory ? factory() : undefined;
|
|
3199
1886
|
};
|
|
3200
1887
|
TableModel.prototype.startEditSession = function (row) {
|
|
3201
1888
|
var _this = this;
|
|
@@ -3313,7 +2000,7 @@ var TableComponent = /** @class */ (function (_super) {
|
|
|
3313
2000
|
TableComponent = __decorate([
|
|
3314
2001
|
Component({
|
|
3315
2002
|
selector: 'aup-table',
|
|
3316
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.
|
|
2003
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\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;\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n ></tr>\n\n</table>\n",
|
|
3317
2004
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
3318
2005
|
}),
|
|
3319
2006
|
__metadata("design:paramtypes", [])
|
|
@@ -3496,63 +2183,6 @@ var TableHeaderCellRendererComponent = /** @class */ (function () {
|
|
|
3496
2183
|
return TableHeaderCellRendererComponent;
|
|
3497
2184
|
}());
|
|
3498
2185
|
|
|
3499
|
-
var MenuItemData = /** @class */ (function () {
|
|
3500
|
-
function MenuItemData(factory, face) {
|
|
3501
|
-
this.factory = factory;
|
|
3502
|
-
this.face = face;
|
|
3503
|
-
}
|
|
3504
|
-
return MenuItemData;
|
|
3505
|
-
}());
|
|
3506
|
-
/**
|
|
3507
|
-
*
|
|
3508
|
-
*/
|
|
3509
|
-
var TableRowMenuComponent = /** @class */ (function (_super) {
|
|
3510
|
-
__extends(TableRowMenuComponent, _super);
|
|
3511
|
-
function TableRowMenuComponent() {
|
|
3512
|
-
var _this = _super.call(this) || this;
|
|
3513
|
-
_this.actions = [];
|
|
3514
|
-
_this.moreActions = [];
|
|
3515
|
-
return _this;
|
|
3516
|
-
}
|
|
3517
|
-
TableRowMenuComponent.prototype.registerAction = function (commandFactory, properties) {
|
|
3518
|
-
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
3519
|
-
};
|
|
3520
|
-
TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
|
|
3521
|
-
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3522
|
-
};
|
|
3523
|
-
TableRowMenuComponent.prototype.ngOnInit = function () {
|
|
3524
|
-
};
|
|
3525
|
-
TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
|
|
3526
|
-
var _this = this;
|
|
3527
|
-
var when = Dsl.disposeWith(this).when;
|
|
3528
|
-
var command = item.factory.create(value);
|
|
3529
|
-
when(command.busy).becomesFalsey(function () {
|
|
3530
|
-
_this.closeMoreMenu();
|
|
3531
|
-
});
|
|
3532
|
-
return command;
|
|
3533
|
-
};
|
|
3534
|
-
TableRowMenuComponent.prototype.closeMoreMenu = function () {
|
|
3535
|
-
this.menu.closeMenu();
|
|
3536
|
-
};
|
|
3537
|
-
__decorate([
|
|
3538
|
-
Input(),
|
|
3539
|
-
__metadata("design:type", Object)
|
|
3540
|
-
], TableRowMenuComponent.prototype, "value", void 0);
|
|
3541
|
-
__decorate([
|
|
3542
|
-
ViewChild(MatMenuTrigger),
|
|
3543
|
-
__metadata("design:type", MatMenuTrigger)
|
|
3544
|
-
], TableRowMenuComponent.prototype, "menu", void 0);
|
|
3545
|
-
TableRowMenuComponent = __decorate([
|
|
3546
|
-
Component({
|
|
3547
|
-
selector: 'aup-table-row-menu',
|
|
3548
|
-
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 ",
|
|
3549
|
-
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
3550
|
-
}),
|
|
3551
|
-
__metadata("design:paramtypes", [])
|
|
3552
|
-
], TableRowMenuComponent);
|
|
3553
|
-
return TableRowMenuComponent;
|
|
3554
|
-
}(DisposableComponent));
|
|
3555
|
-
|
|
3556
2186
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
3557
2187
|
__extends(VerticalFocusContainerComponent, _super);
|
|
3558
2188
|
function VerticalFocusContainerComponent(focusManager) {
|
|
@@ -3638,6 +2268,100 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
|
3638
2268
|
return VerticalFocusContainerComponent;
|
|
3639
2269
|
}(FocusContainerComponent));
|
|
3640
2270
|
|
|
2271
|
+
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
2272
|
+
__extends(MultipleSelectInputComponent, _super);
|
|
2273
|
+
function MultipleSelectInputComponent() {
|
|
2274
|
+
var _this = _super.call(this) || this;
|
|
2275
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2276
|
+
return _this;
|
|
2277
|
+
}
|
|
2278
|
+
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
2279
|
+
};
|
|
2280
|
+
__decorate([
|
|
2281
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
2282
|
+
__metadata("design:type", Object)
|
|
2283
|
+
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
2284
|
+
__decorate([
|
|
2285
|
+
Input(), TrackExternal(),
|
|
2286
|
+
__metadata("design:type", ListModel)
|
|
2287
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2288
|
+
__decorate([
|
|
2289
|
+
Input(), StoreInListModel('optionsModel'),
|
|
2290
|
+
__metadata("design:type", Array)
|
|
2291
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2292
|
+
__decorate([
|
|
2293
|
+
Input(),
|
|
2294
|
+
__metadata("design:type", Object)
|
|
2295
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2296
|
+
__decorate([
|
|
2297
|
+
Input(),
|
|
2298
|
+
__metadata("design:type", Boolean)
|
|
2299
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2300
|
+
__decorate([
|
|
2301
|
+
ContentChild('optionTemplate'),
|
|
2302
|
+
__metadata("design:type", TemplateRef)
|
|
2303
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2304
|
+
__decorate([
|
|
2305
|
+
ContentChild('nilOptionTemplate'),
|
|
2306
|
+
__metadata("design:type", TemplateRef)
|
|
2307
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2308
|
+
__decorate([
|
|
2309
|
+
Input(),
|
|
2310
|
+
__metadata("design:type", Function)
|
|
2311
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2312
|
+
MultipleSelectInputComponent = __decorate([
|
|
2313
|
+
Component({
|
|
2314
|
+
selector: 'aup-multiple-select-input',
|
|
2315
|
+
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)]=\"listModel.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\">{{placeholder}}</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",
|
|
2316
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2317
|
+
}),
|
|
2318
|
+
__metadata("design:paramtypes", [])
|
|
2319
|
+
], MultipleSelectInputComponent);
|
|
2320
|
+
return MultipleSelectInputComponent;
|
|
2321
|
+
}(AbstractListInputComponent));
|
|
2322
|
+
|
|
2323
|
+
var IconComponent = /** @class */ (function () {
|
|
2324
|
+
function IconComponent() {
|
|
2325
|
+
}
|
|
2326
|
+
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2327
|
+
get: function () {
|
|
2328
|
+
return this._icon;
|
|
2329
|
+
},
|
|
2330
|
+
set: function (iconName) {
|
|
2331
|
+
this._icon = iconName;
|
|
2332
|
+
if (!iconName) {
|
|
2333
|
+
this.errorMessage = 'icon is nil';
|
|
2334
|
+
this.prefix = undefined;
|
|
2335
|
+
return;
|
|
2336
|
+
}
|
|
2337
|
+
var colonIndex = iconName.indexOf(':');
|
|
2338
|
+
if (colonIndex > 0) {
|
|
2339
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
2340
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2341
|
+
}
|
|
2342
|
+
if (this.prefix) {
|
|
2343
|
+
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2344
|
+
}
|
|
2345
|
+
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
2346
|
+
},
|
|
2347
|
+
enumerable: true,
|
|
2348
|
+
configurable: true
|
|
2349
|
+
});
|
|
2350
|
+
__decorate([
|
|
2351
|
+
Input(),
|
|
2352
|
+
__metadata("design:type", String),
|
|
2353
|
+
__metadata("design:paramtypes", [String])
|
|
2354
|
+
], IconComponent.prototype, "icon", null);
|
|
2355
|
+
IconComponent = __decorate([
|
|
2356
|
+
Component({
|
|
2357
|
+
selector: 'aup-icon',
|
|
2358
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\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",
|
|
2359
|
+
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}"]
|
|
2360
|
+
})
|
|
2361
|
+
], IconComponent);
|
|
2362
|
+
return IconComponent;
|
|
2363
|
+
}());
|
|
2364
|
+
|
|
3641
2365
|
var ComponentsModule = /** @class */ (function () {
|
|
3642
2366
|
function ComponentsModule(faIconLibrary) {
|
|
3643
2367
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -3656,8 +2380,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3656
2380
|
TextInputComponent,
|
|
3657
2381
|
PasswordInputComponent,
|
|
3658
2382
|
SelectInputComponent,
|
|
3659
|
-
MultipleSelectInputComponent,
|
|
3660
|
-
AutocompleteInputComponent,
|
|
3661
2383
|
CheckboxInputComponent,
|
|
3662
2384
|
ScrollContainerComponent,
|
|
3663
2385
|
NoopComponent,
|
|
@@ -3677,19 +2399,9 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3677
2399
|
SelectHeaderCellRendererComponent,
|
|
3678
2400
|
DefaultHeaderCellRendererComponent,
|
|
3679
2401
|
TableHeaderCellRendererComponent,
|
|
2402
|
+
MultipleSelectInputComponent,
|
|
3680
2403
|
IconComponent,
|
|
3681
|
-
SectionHeaderComponent
|
|
3682
|
-
TableRowMenuComponent,
|
|
3683
|
-
ToolBarComponent,
|
|
3684
|
-
CommandComponent,
|
|
3685
|
-
PopupMenuComponent,
|
|
3686
|
-
CommandGroupComponent,
|
|
3687
|
-
CommandFaceComponent,
|
|
3688
|
-
MoreMenuComponent,
|
|
3689
|
-
SeparatorComponent,
|
|
3690
|
-
FlexComponent,
|
|
3691
|
-
CommandGroupMenuRendererComponent,
|
|
3692
|
-
CommandGroupRendererComponent
|
|
2404
|
+
SectionHeaderComponent
|
|
3693
2405
|
],
|
|
3694
2406
|
imports: [
|
|
3695
2407
|
CommonModule,
|
|
@@ -3707,10 +2419,7 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3707
2419
|
PortalModule,
|
|
3708
2420
|
CdkScrollableModule,
|
|
3709
2421
|
FontAwesomeModule,
|
|
3710
|
-
MatTooltipModule
|
|
3711
|
-
MatAutocompleteModule,
|
|
3712
|
-
MatMenuModule,
|
|
3713
|
-
MatDividerModule
|
|
2422
|
+
MatTooltipModule
|
|
3714
2423
|
],
|
|
3715
2424
|
exports: [
|
|
3716
2425
|
NumberInputComponent,
|
|
@@ -3719,8 +2428,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3719
2428
|
PasswordInputComponent,
|
|
3720
2429
|
CheckboxInputComponent,
|
|
3721
2430
|
SelectInputComponent,
|
|
3722
|
-
MultipleSelectInputComponent,
|
|
3723
|
-
AutocompleteInputComponent,
|
|
3724
2431
|
ScrollContainerComponent,
|
|
3725
2432
|
NoopComponent,
|
|
3726
2433
|
SwitchCaseComponent,
|
|
@@ -3733,20 +2440,12 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3733
2440
|
TableComponent,
|
|
3734
2441
|
EditRowControls,
|
|
3735
2442
|
ColumnTemplateDirective,
|
|
2443
|
+
MultipleSelectInputComponent,
|
|
3736
2444
|
IconComponent,
|
|
3737
|
-
SectionHeaderComponent
|
|
3738
|
-
TableRowMenuComponent,
|
|
3739
|
-
CommandGroupComponent,
|
|
3740
|
-
ToolBarComponent,
|
|
3741
|
-
CommandComponent,
|
|
3742
|
-
PopupMenuComponent,
|
|
3743
|
-
CommandFaceComponent,
|
|
3744
|
-
MoreMenuComponent,
|
|
3745
|
-
SeparatorComponent,
|
|
3746
|
-
FlexComponent
|
|
2445
|
+
SectionHeaderComponent
|
|
3747
2446
|
],
|
|
3748
2447
|
providers: [
|
|
3749
|
-
FocusBindingFactory
|
|
2448
|
+
FocusBindingFactory,
|
|
3750
2449
|
]
|
|
3751
2450
|
}),
|
|
3752
2451
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -3825,7 +2524,7 @@ var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
|
3825
2524
|
Component({
|
|
3826
2525
|
selector: 'aup-activity-actions',
|
|
3827
2526
|
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",
|
|
3828
|
-
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}.
|
|
2527
|
+
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}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}:host.align-stretch>.content{-ms-grid-row:1;-ms-grid-column:2}"]
|
|
3829
2528
|
})
|
|
3830
2529
|
], ActivityActionsComponent);
|
|
3831
2530
|
return ActivityActionsComponent;
|
|
@@ -3837,27 +2536,13 @@ var Activity = /** @class */ (function (_super) {
|
|
|
3837
2536
|
function Activity() {
|
|
3838
2537
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3839
2538
|
_this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
3840
|
-
_this._focusedModel = _this.registerDisposable(new DelegatingValueModel());
|
|
3841
2539
|
_this.class = 'aup-activity';
|
|
3842
2540
|
return _this;
|
|
3843
2541
|
}
|
|
3844
|
-
Object.defineProperty(Activity.prototype, "isFocused", {
|
|
3845
|
-
get: function () {
|
|
3846
|
-
return this._focusedModel.value;
|
|
3847
|
-
},
|
|
3848
|
-
enumerable: true,
|
|
3849
|
-
configurable: true
|
|
3850
|
-
});
|
|
3851
2542
|
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
3852
|
-
var _this = this;
|
|
3853
|
-
var _a = Dsl.disposeWith(this), chain = _a.chain, when = _a.when;
|
|
3854
2543
|
assert$1.isNil(this._activityContext);
|
|
3855
2544
|
this._activityContext = activityContext;
|
|
3856
2545
|
this._interactionContext = nestedInteractionContext;
|
|
3857
|
-
this._focusedModel.setDelegate(activityContext.focused);
|
|
3858
|
-
when(this._focusedModel).becomesTruthy(function () {
|
|
3859
|
-
_this.onActivityReady();
|
|
3860
|
-
});
|
|
3861
2546
|
};
|
|
3862
2547
|
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
3863
2548
|
get: function () {
|
|
@@ -3883,13 +2568,6 @@ var Activity = /** @class */ (function (_super) {
|
|
|
3883
2568
|
enumerable: true,
|
|
3884
2569
|
configurable: true
|
|
3885
2570
|
});
|
|
3886
|
-
Object.defineProperty(Activity.prototype, "focused", {
|
|
3887
|
-
get: function () {
|
|
3888
|
-
return this._focusedModel.readonly;
|
|
3889
|
-
},
|
|
3890
|
-
enumerable: true,
|
|
3891
|
-
configurable: true
|
|
3892
|
-
});
|
|
3893
2571
|
Activity.prototype.busyWhile = function (busyModel) {
|
|
3894
2572
|
this._busyModel.setDelegate(busyModel);
|
|
3895
2573
|
};
|
|
@@ -3903,11 +2581,6 @@ var Activity = /** @class */ (function (_super) {
|
|
|
3903
2581
|
HostBinding('class'),
|
|
3904
2582
|
__metadata("design:type", Object)
|
|
3905
2583
|
], Activity.prototype, "class", void 0);
|
|
3906
|
-
__decorate([
|
|
3907
|
-
HostBinding('attr.focused'),
|
|
3908
|
-
__metadata("design:type", Object),
|
|
3909
|
-
__metadata("design:paramtypes", [])
|
|
3910
|
-
], Activity.prototype, "isFocused", null);
|
|
3911
2584
|
return Activity;
|
|
3912
2585
|
}(DisposableComponent));
|
|
3913
2586
|
|
|
@@ -4046,7 +2719,6 @@ var ActivityRef = /** @class */ (function () {
|
|
|
4046
2719
|
this.onComplete = onComplete;
|
|
4047
2720
|
this._complete = false;
|
|
4048
2721
|
this.deferredResult = Deferred.defer();
|
|
4049
|
-
this.focusedModel = new MutableValueModel();
|
|
4050
2722
|
}
|
|
4051
2723
|
ActivityRef.prototype.isActivityRealised = function () {
|
|
4052
2724
|
return !!this._activity;
|
|
@@ -4062,16 +2734,6 @@ var ActivityRef = /** @class */ (function () {
|
|
|
4062
2734
|
enumerable: true,
|
|
4063
2735
|
configurable: true
|
|
4064
2736
|
});
|
|
4065
|
-
ActivityRef.prototype.setFocused = function (focused) {
|
|
4066
|
-
this.focusedModel.value = focused;
|
|
4067
|
-
};
|
|
4068
|
-
Object.defineProperty(ActivityRef.prototype, "focused", {
|
|
4069
|
-
get: function () {
|
|
4070
|
-
return this.focusedModel.value;
|
|
4071
|
-
},
|
|
4072
|
-
enumerable: true,
|
|
4073
|
-
configurable: true
|
|
4074
|
-
});
|
|
4075
2737
|
ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
|
|
4076
2738
|
assert.isNil(this._activity);
|
|
4077
2739
|
this._activity = activity;
|
|
@@ -4082,8 +2744,7 @@ var ActivityRef = /** @class */ (function () {
|
|
|
4082
2744
|
},
|
|
4083
2745
|
onCancel: function (error) {
|
|
4084
2746
|
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
4085
|
-
}
|
|
4086
|
-
focused: this.focusedModel.readonly
|
|
2747
|
+
}
|
|
4087
2748
|
});
|
|
4088
2749
|
};
|
|
4089
2750
|
ActivityRef.prototype.finishActivity = function (resolveOrReject) {
|
|
@@ -4121,7 +2782,7 @@ var ActivityOutletComponent = /** @class */ (function () {
|
|
|
4121
2782
|
},
|
|
4122
2783
|
set: function (activityRef) {
|
|
4123
2784
|
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
4124
|
-
lang$1.illegalState(
|
|
2785
|
+
lang$1.illegalState("changing activity before previous one has completed");
|
|
4125
2786
|
}
|
|
4126
2787
|
this._activityRef = activityRef;
|
|
4127
2788
|
this.loadActivity(activityRef);
|
|
@@ -4184,9 +2845,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4184
2845
|
function ActivityContainerComponent() {
|
|
4185
2846
|
var _this = _super.call(this) || this;
|
|
4186
2847
|
_this.dynamicHeight = false;
|
|
4187
|
-
_this.
|
|
2848
|
+
_this.activityTabs = [];
|
|
4188
2849
|
_this.garbage = new GarbageCollector();
|
|
4189
|
-
_this.inAnimation = new MutableValueModel(false);
|
|
4190
2850
|
return _this;
|
|
4191
2851
|
}
|
|
4192
2852
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -4224,7 +2884,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4224
2884
|
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
4225
2885
|
return this.garbage.registerDisposable(disposable);
|
|
4226
2886
|
};
|
|
4227
|
-
// @Trace()
|
|
4228
2887
|
ActivityContainerComponent.prototype.dispose = function () {
|
|
4229
2888
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
4230
2889
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -4235,7 +2894,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4235
2894
|
if (!this.isActive()) {
|
|
4236
2895
|
lang$1.illegalState('no activity in progress');
|
|
4237
2896
|
}
|
|
4238
|
-
return ___default.findLast(this.
|
|
2897
|
+
return ___default.findLast(this.activityTabs, function (tab) { return !tab.isComplete(); });
|
|
4239
2898
|
};
|
|
4240
2899
|
/**
|
|
4241
2900
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -4274,14 +2933,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4274
2933
|
});
|
|
4275
2934
|
this.launchActivity(activityRef);
|
|
4276
2935
|
// if this is the first activity let the interaction service know.
|
|
4277
|
-
if (this.
|
|
2936
|
+
if (this.activityTabs.length === 1) {
|
|
4278
2937
|
// console.log('Now active!!!');
|
|
4279
2938
|
this.interactionServiceApi.notifyActive(this);
|
|
4280
2939
|
}
|
|
4281
2940
|
return activityRef.activityResult;
|
|
4282
2941
|
};
|
|
4283
2942
|
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
4284
|
-
return this.
|
|
2943
|
+
return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
4285
2944
|
};
|
|
4286
2945
|
/**
|
|
4287
2946
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -4308,7 +2967,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4308
2967
|
// Without this our animation done wasn't called when a single
|
|
4309
2968
|
// new activity followed a single tab activity (since we're tracking
|
|
4310
2969
|
// by activity index)
|
|
4311
|
-
this.
|
|
2970
|
+
this.activityTabs = [];
|
|
4312
2971
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
4313
2972
|
this._deferredCleanUp = promise
|
|
4314
2973
|
.finally(function () {
|
|
@@ -4318,15 +2977,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4318
2977
|
};
|
|
4319
2978
|
// @Trace()
|
|
4320
2979
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
4321
|
-
var cleanedTabs = this.
|
|
4322
|
-
this.
|
|
2980
|
+
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
2981
|
+
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
4323
2982
|
this.synchroniseSelectedTabIndex();
|
|
4324
2983
|
};
|
|
4325
2984
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
4326
2985
|
return index;
|
|
4327
2986
|
};
|
|
4328
2987
|
;
|
|
4329
|
-
// @Trace()
|
|
4330
2988
|
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
4331
2989
|
if (this.onAnimationFinishedJob) {
|
|
4332
2990
|
this.onAnimationFinishedJob();
|
|
@@ -4336,21 +2994,15 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4336
2994
|
/**
|
|
4337
2995
|
* Synchronises the selected tab index.
|
|
4338
2996
|
*/
|
|
4339
|
-
// @Trace()
|
|
4340
2997
|
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
4341
2998
|
var _this = this;
|
|
4342
2999
|
var previousIndex = this.tabs.selectedIndex;
|
|
4343
3000
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
4344
3001
|
if (previousIndex !== newIndex) {
|
|
4345
|
-
this.inAnimation.value = true;
|
|
4346
|
-
this.activityRefs[newIndex].setFocused(false);
|
|
4347
3002
|
this.tabs.selectedIndex = newIndex;
|
|
4348
3003
|
this.onAnimationFinishedJob = function () {
|
|
4349
|
-
_this.
|
|
4350
|
-
_this.
|
|
4351
|
-
_this.activityRefs.forEach(function (ref, index) {
|
|
4352
|
-
ref.setFocused(index === newIndex);
|
|
4353
|
-
});
|
|
3004
|
+
_this.getSelectedOutlet().component.onActivityReady();
|
|
3005
|
+
_this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
4354
3006
|
};
|
|
4355
3007
|
}
|
|
4356
3008
|
};
|
|
@@ -4358,10 +3010,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4358
3010
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
4359
3011
|
};
|
|
4360
3012
|
// @Trace()
|
|
4361
|
-
ActivityContainerComponent.prototype.getSelectedTabIndex = function () {
|
|
4362
|
-
return this.tabs.selectedIndex;
|
|
4363
|
-
};
|
|
4364
|
-
// @Trace()
|
|
4365
3013
|
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
4366
3014
|
var _this = this;
|
|
4367
3015
|
if (this.syncSelectedTabTimeout) {
|
|
@@ -4384,10 +3032,16 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
4384
3032
|
ViewChildren(ActivityOutletComponent),
|
|
4385
3033
|
__metadata("design:type", QueryList)
|
|
4386
3034
|
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
3035
|
+
__decorate([
|
|
3036
|
+
Trace(),
|
|
3037
|
+
__metadata("design:type", Function),
|
|
3038
|
+
__metadata("design:paramtypes", []),
|
|
3039
|
+
__metadata("design:returntype", void 0)
|
|
3040
|
+
], ActivityContainerComponent.prototype, "dispose", null);
|
|
4387
3041
|
ActivityContainerComponent = __decorate([
|
|
4388
3042
|
Component({
|
|
4389
3043
|
selector: 'aup-activity-container',
|
|
4390
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let
|
|
3044
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
4391
3045
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
4392
3046
|
}),
|
|
4393
3047
|
__metadata("design:paramtypes", [])
|
|
@@ -5458,9 +4112,6 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
5458
4112
|
var _this = _super.call(this) || this;
|
|
5459
4113
|
_this.visitModel = new MutableValueModel();
|
|
5460
4114
|
_this._inVisitUpdate = new Guard();
|
|
5461
|
-
_this._active = new MutableValueModel(false);
|
|
5462
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
5463
|
-
when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
|
|
5464
4115
|
return _this;
|
|
5465
4116
|
}
|
|
5466
4117
|
PlaceComponent_1 = PlaceComponent;
|
|
@@ -5470,7 +4121,7 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
5470
4121
|
assert.isNil(this.visitModel.value);
|
|
5471
4122
|
var when = Dsl.disposeWith(this).when;
|
|
5472
4123
|
this.visitModel.value = visit;
|
|
5473
|
-
DebugContext.
|
|
4124
|
+
DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
5474
4125
|
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
5475
4126
|
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
5476
4127
|
notifyVisitChanged(current, previous);
|
|
@@ -5518,19 +4169,6 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
5518
4169
|
enumerable: true,
|
|
5519
4170
|
configurable: true
|
|
5520
4171
|
});
|
|
5521
|
-
Object.defineProperty(PlaceComponent.prototype, "active", {
|
|
5522
|
-
get: function () {
|
|
5523
|
-
return this._active.readonly;
|
|
5524
|
-
},
|
|
5525
|
-
enumerable: true,
|
|
5526
|
-
configurable: true
|
|
5527
|
-
});
|
|
5528
|
-
/**
|
|
5529
|
-
* Called by the router when the place is ready to interact after any animations have run.
|
|
5530
|
-
*/
|
|
5531
|
-
PlaceComponent.prototype._notifyActive = function (active) {
|
|
5532
|
-
this._active.value = active;
|
|
5533
|
-
};
|
|
5534
4172
|
PlaceComponent.prototype.onPlaceReady = function () {
|
|
5535
4173
|
};
|
|
5536
4174
|
var PlaceComponent_1;
|
|
@@ -6631,6 +5269,75 @@ var UrlService = /** @class */ (function () {
|
|
|
6631
5269
|
return UrlService;
|
|
6632
5270
|
}());
|
|
6633
5271
|
|
|
5272
|
+
var Visit = /** @class */ (function () {
|
|
5273
|
+
function Visit(placeDefinition, visitParameters) {
|
|
5274
|
+
if (visitParameters === void 0) { visitParameters = {}; }
|
|
5275
|
+
this.placeDefinition = placeDefinition;
|
|
5276
|
+
this.visitParameters = visitParameters;
|
|
5277
|
+
}
|
|
5278
|
+
// @Trace()
|
|
5279
|
+
Visit.prototype.getRouteId = function () {
|
|
5280
|
+
return this.placeDefinition.getRouteIdFrom(this);
|
|
5281
|
+
};
|
|
5282
|
+
// @Trace()
|
|
5283
|
+
Visit.prototype.hasRouteId = function () {
|
|
5284
|
+
return !isNil(this.getRouteId());
|
|
5285
|
+
};
|
|
5286
|
+
/**
|
|
5287
|
+
* Returns the value of the place parameter with the specified name. The parameter
|
|
5288
|
+
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
5289
|
+
* same as the the ValueModel property name.
|
|
5290
|
+
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
5291
|
+
*/
|
|
5292
|
+
Visit.prototype.getParameter = function (parameterName) {
|
|
5293
|
+
return this.visitParameters[parameterName];
|
|
5294
|
+
};
|
|
5295
|
+
// @Trace()
|
|
5296
|
+
Visit.prototype.hasParameter = function (parameterName) {
|
|
5297
|
+
return Object.keys(this.visitParameters).includes(parameterName);
|
|
5298
|
+
};
|
|
5299
|
+
Visit.prototype.replace = function (parameter, value) {
|
|
5300
|
+
var _a;
|
|
5301
|
+
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
5302
|
+
};
|
|
5303
|
+
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
5304
|
+
var _this = this;
|
|
5305
|
+
// todo: whitelist parameters.
|
|
5306
|
+
var routeParameterKeys = Object.keys(routeParams);
|
|
5307
|
+
var params = {};
|
|
5308
|
+
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
5309
|
+
if (def.isRouteId || def.isRouteParameter) {
|
|
5310
|
+
if (routeParameterKeys.includes(def.name)) {
|
|
5311
|
+
params[def.name] = routeParams[def.name];
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
else {
|
|
5315
|
+
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
5316
|
+
// defaults and remember sanitisation process.
|
|
5317
|
+
var value = _this.getParameter(def.name);
|
|
5318
|
+
if (_this.hasParameter(def.name)) {
|
|
5319
|
+
params[def.name] = value;
|
|
5320
|
+
}
|
|
5321
|
+
}
|
|
5322
|
+
});
|
|
5323
|
+
return new Visit(this.placeDefinition, params);
|
|
5324
|
+
};
|
|
5325
|
+
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
5326
|
+
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
5327
|
+
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
5328
|
+
return !samePlace || !sameRouteParameters;
|
|
5329
|
+
};
|
|
5330
|
+
Visit.prototype.hasChangedFrom = function (other) {
|
|
5331
|
+
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
5332
|
+
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
5333
|
+
};
|
|
5334
|
+
Visit.prototype.toDebugString = function () {
|
|
5335
|
+
var _this = this;
|
|
5336
|
+
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
5337
|
+
};
|
|
5338
|
+
return Visit;
|
|
5339
|
+
}());
|
|
5340
|
+
|
|
6634
5341
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
6635
5342
|
__extends(PlaceRouter, _super);
|
|
6636
5343
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
@@ -6826,7 +5533,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6826
5533
|
enumerable: true,
|
|
6827
5534
|
configurable: true
|
|
6828
5535
|
});
|
|
6829
|
-
// @Trace()
|
|
6830
5536
|
PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
|
|
6831
5537
|
return __awaiter(this, void 0, void 0, function () {
|
|
6832
5538
|
var _this = this;
|
|
@@ -6927,6 +5633,12 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6927
5633
|
{ type: PlaceHistory }
|
|
6928
5634
|
]; };
|
|
6929
5635
|
PlaceRouter.ɵprov = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(Location), ɵɵinject(InteractionService), ɵɵinject(UrlService), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
5636
|
+
__decorate([
|
|
5637
|
+
Trace(),
|
|
5638
|
+
__metadata("design:type", Function),
|
|
5639
|
+
__metadata("design:paramtypes", [Visit, Visit]),
|
|
5640
|
+
__metadata("design:returntype", Promise)
|
|
5641
|
+
], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
|
|
6930
5642
|
PlaceRouter = __decorate([
|
|
6931
5643
|
Injectable({
|
|
6932
5644
|
providedIn: 'root'
|
|
@@ -6940,75 +5652,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6940
5652
|
return PlaceRouter;
|
|
6941
5653
|
}(GarbageCollector));
|
|
6942
5654
|
|
|
6943
|
-
var Visit = /** @class */ (function () {
|
|
6944
|
-
function Visit(placeDefinition, visitParameters) {
|
|
6945
|
-
if (visitParameters === void 0) { visitParameters = {}; }
|
|
6946
|
-
this.placeDefinition = placeDefinition;
|
|
6947
|
-
this.visitParameters = visitParameters;
|
|
6948
|
-
}
|
|
6949
|
-
// @Trace()
|
|
6950
|
-
Visit.prototype.getRouteId = function () {
|
|
6951
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
6952
|
-
};
|
|
6953
|
-
// @Trace()
|
|
6954
|
-
Visit.prototype.hasRouteId = function () {
|
|
6955
|
-
return !isNil(this.getRouteId());
|
|
6956
|
-
};
|
|
6957
|
-
/**
|
|
6958
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
6959
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
6960
|
-
* same as the the ValueModel property name.
|
|
6961
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
6962
|
-
*/
|
|
6963
|
-
Visit.prototype.getParameter = function (parameterName) {
|
|
6964
|
-
return this.visitParameters[parameterName];
|
|
6965
|
-
};
|
|
6966
|
-
// @Trace()
|
|
6967
|
-
Visit.prototype.hasParameter = function (parameterName) {
|
|
6968
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
6969
|
-
};
|
|
6970
|
-
Visit.prototype.replace = function (parameter, value) {
|
|
6971
|
-
var _a;
|
|
6972
|
-
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
6973
|
-
};
|
|
6974
|
-
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
6975
|
-
var _this = this;
|
|
6976
|
-
// todo: whitelist parameters.
|
|
6977
|
-
var routeParameterKeys = Object.keys(routeParams);
|
|
6978
|
-
var params = {};
|
|
6979
|
-
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
6980
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
6981
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
6982
|
-
params[def.name] = routeParams[def.name];
|
|
6983
|
-
}
|
|
6984
|
-
}
|
|
6985
|
-
else {
|
|
6986
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
6987
|
-
// defaults and remember sanitisation process.
|
|
6988
|
-
var value = _this.getParameter(def.name);
|
|
6989
|
-
if (_this.hasParameter(def.name)) {
|
|
6990
|
-
params[def.name] = value;
|
|
6991
|
-
}
|
|
6992
|
-
}
|
|
6993
|
-
});
|
|
6994
|
-
return new Visit(this.placeDefinition, params);
|
|
6995
|
-
};
|
|
6996
|
-
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
6997
|
-
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
6998
|
-
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
6999
|
-
return !samePlace || !sameRouteParameters;
|
|
7000
|
-
};
|
|
7001
|
-
Visit.prototype.hasChangedFrom = function (other) {
|
|
7002
|
-
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
7003
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
7004
|
-
};
|
|
7005
|
-
Visit.prototype.toDebugString = function () {
|
|
7006
|
-
var _this = this;
|
|
7007
|
-
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
7008
|
-
};
|
|
7009
|
-
return Visit;
|
|
7010
|
-
}());
|
|
7011
|
-
|
|
7012
5655
|
var AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
7013
5656
|
|
|
7014
5657
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -7068,7 +5711,6 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7068
5711
|
_this._activePlaceModel = new MutableValueModel();
|
|
7069
5712
|
_this.initialPlaceIndex = null;
|
|
7070
5713
|
_this._isPushingVisitToRoute = new MutableValueModel(false);
|
|
7071
|
-
_this.isVeryFirstLoad = true;
|
|
7072
5714
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
7073
5715
|
_this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
7074
5716
|
var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
|
|
@@ -7077,9 +5719,8 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7077
5719
|
.pluckList('children')
|
|
7078
5720
|
.pluck('component');
|
|
7079
5721
|
var activatePlaceType = chain(_this.activePlaceModel).map(function (p) { return p.constructor; });
|
|
7080
|
-
_this.
|
|
7081
|
-
.otherwise(defaultPlaceAnimationOrder)
|
|
7082
|
-
_this.activePlaceAnimationPosition = _this.placesInAnimationOrder
|
|
5722
|
+
_this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
|
|
5723
|
+
.otherwise(defaultPlaceAnimationOrder)
|
|
7083
5724
|
.reduce(function (placesInOrder) {
|
|
7084
5725
|
var placeIndex = 0;
|
|
7085
5726
|
if (activatePlaceType.value) {
|
|
@@ -7090,16 +5731,14 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7090
5731
|
}
|
|
7091
5732
|
return isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
|
|
7092
5733
|
}, { dependsOn: activatePlaceType });
|
|
7093
|
-
_this.animationSupported = _this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
7094
|
-
_this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
|
|
7095
5734
|
// Extract our visit model from the place router.
|
|
7096
5735
|
_this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
|
|
7097
5736
|
_this.routerVisitModel = _this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
|
|
7098
5737
|
_this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
|
|
7099
|
-
when(_this.navigationInProgress).becomesFalsey(function () {
|
|
5738
|
+
when.valueOf(_this.navigationInProgress).becomesFalsey(function () {
|
|
7100
5739
|
_this.checkStateAndInitialise();
|
|
7101
5740
|
});
|
|
7102
|
-
when(_this.outletActivated).becomesTruthy(function () {
|
|
5741
|
+
when.valueOf(_this.outletActivated).becomesTruthy(function () {
|
|
7103
5742
|
_this.checkStateAndInitialise();
|
|
7104
5743
|
});
|
|
7105
5744
|
chain(_this._activePlaceModel)
|
|
@@ -7112,7 +5751,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7112
5751
|
};
|
|
7113
5752
|
// @Trace()
|
|
7114
5753
|
PlaceOutletComponent.prototype.getAnimationOrder = function () {
|
|
7115
|
-
return this.
|
|
5754
|
+
return this.placeAnimationOrder.value;
|
|
7116
5755
|
};
|
|
7117
5756
|
Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
|
|
7118
5757
|
get: function () {
|
|
@@ -7123,10 +5762,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7123
5762
|
});
|
|
7124
5763
|
// @Trace()
|
|
7125
5764
|
PlaceOutletComponent.prototype.navigate = function (visit) {
|
|
7126
|
-
//
|
|
7127
|
-
// if (!place) {
|
|
7128
|
-
// lang.illegalState()
|
|
7129
|
-
// }
|
|
5765
|
+
// console.log({ activatedRoute: this._activatedRouteModel.value });
|
|
7130
5766
|
this.placeRouter.navigate(visit, {
|
|
7131
5767
|
relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
|
|
7132
5768
|
});
|
|
@@ -7152,25 +5788,14 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7152
5788
|
enumerable: true,
|
|
7153
5789
|
configurable: true
|
|
7154
5790
|
});
|
|
5791
|
+
// @Trace()
|
|
7155
5792
|
PlaceOutletComponent.prototype.onOutletActivated = function (routerOutlet, place) {
|
|
7156
5793
|
this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
7157
5794
|
this._activePlaceModel.value = place;
|
|
7158
|
-
this.validateAnimationState(place);
|
|
7159
5795
|
this.outletActivated.value = true;
|
|
7160
5796
|
this.checkStateAndInitialise();
|
|
7161
5797
|
};
|
|
7162
|
-
|
|
7163
|
-
if (this.animateModel.value) {
|
|
7164
|
-
if (this.placesInAnimationOrder.length < 1) {
|
|
7165
|
-
console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');
|
|
7166
|
-
}
|
|
7167
|
-
else {
|
|
7168
|
-
if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {
|
|
7169
|
-
console.error("PlaceOutlet.animate === true but placeAnimationOrder doesn't contain " + place.placeDefinition.component.name + ".");
|
|
7170
|
-
}
|
|
7171
|
-
}
|
|
7172
|
-
}
|
|
7173
|
-
};
|
|
5798
|
+
// @Trace()
|
|
7174
5799
|
PlaceOutletComponent.prototype.onOutletDeactivated = function () {
|
|
7175
5800
|
this.outletActivated.value = false;
|
|
7176
5801
|
this._activePlaceModel.value = null;
|
|
@@ -7187,6 +5812,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7187
5812
|
this.initialisePlace(routerVisit, activePlace);
|
|
7188
5813
|
}
|
|
7189
5814
|
};
|
|
5815
|
+
// @Trace()
|
|
7190
5816
|
PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
|
|
7191
5817
|
var _this = this;
|
|
7192
5818
|
var visitModel = new MutableValueModel(routerVisit);
|
|
@@ -7194,18 +5820,9 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7194
5820
|
activePlace.initialiseVisit(routerVisit, function (current, previous) {
|
|
7195
5821
|
_this.pushVisitChangeToRoute(previous, current);
|
|
7196
5822
|
});
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
if (!this.animationEnabled.value || this.isVeryFirstLoad) {
|
|
7201
|
-
// if animation is disabled or this is the very first load then
|
|
7202
|
-
// we won't get our animation done callback so we finish the
|
|
7203
|
-
// process here and now.
|
|
7204
|
-
this.isVeryFirstLoad = false;
|
|
7205
|
-
finishPlaceLoad();
|
|
7206
|
-
}
|
|
7207
|
-
else {
|
|
7208
|
-
this.onAnimationFinishedJob = finishPlaceLoad;
|
|
5823
|
+
if (!this.animateModel.value) {
|
|
5824
|
+
// we're not animating so trigger any post animation callbacks now.
|
|
5825
|
+
this.animationDone();
|
|
7209
5826
|
}
|
|
7210
5827
|
var _a = Dsl.disposeWith(activePlace), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
7211
5828
|
when.valueOf(this.routerVisitModel)
|
|
@@ -7228,9 +5845,8 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7228
5845
|
};
|
|
7229
5846
|
// @Trace()
|
|
7230
5847
|
PlaceOutletComponent.prototype.animationDone = function () {
|
|
7231
|
-
if (this.
|
|
7232
|
-
this.
|
|
7233
|
-
this.onAnimationFinishedJob = undefined;
|
|
5848
|
+
if (this._activePlaceModel.value) {
|
|
5849
|
+
this._activePlaceModel.value.onPlaceReady();
|
|
7234
5850
|
}
|
|
7235
5851
|
};
|
|
7236
5852
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
@@ -7263,22 +5879,10 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
7263
5879
|
ViewChild('routeOutlet', { static: true }),
|
|
7264
5880
|
__metadata("design:type", RouterOutlet)
|
|
7265
5881
|
], PlaceOutletComponent.prototype, "routerOut", void 0);
|
|
7266
|
-
__decorate([
|
|
7267
|
-
Trace(),
|
|
7268
|
-
__metadata("design:type", Function),
|
|
7269
|
-
__metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
|
|
7270
|
-
__metadata("design:returntype", void 0)
|
|
7271
|
-
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
7272
|
-
__decorate([
|
|
7273
|
-
Trace(),
|
|
7274
|
-
__metadata("design:type", Function),
|
|
7275
|
-
__metadata("design:paramtypes", []),
|
|
7276
|
-
__metadata("design:returntype", void 0)
|
|
7277
|
-
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
7278
5882
|
PlaceOutletComponent = __decorate([
|
|
7279
5883
|
Component({
|
|
7280
5884
|
selector: 'aup-place-outlet',
|
|
7281
|
-
template: "<ng-container *ngIf=\"
|
|
5885
|
+
template: "<ng-container *ngIf=\"animateModel.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=\"!animateModel.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",
|
|
7282
5886
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
7283
5887
|
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}"]
|
|
7284
5888
|
}),
|
|
@@ -7309,10 +5913,10 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
7309
5913
|
_this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
|
|
7310
5914
|
return _this;
|
|
7311
5915
|
}
|
|
7312
|
-
AbstractPlaceNavigationComponent.prototype.
|
|
5916
|
+
AbstractPlaceNavigationComponent.prototype.getNav = function (placeDef) {
|
|
7313
5917
|
var navItem = placeDef.getPlaceData('nav');
|
|
7314
5918
|
return {
|
|
7315
|
-
|
|
5919
|
+
title: function () { return navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']); },
|
|
7316
5920
|
tooltip: function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null); },
|
|
7317
5921
|
icon: function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); }
|
|
7318
5922
|
};
|
|
@@ -7346,7 +5950,7 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
7346
5950
|
__metadata("design:type", Function),
|
|
7347
5951
|
__metadata("design:paramtypes", [PlaceDefinition]),
|
|
7348
5952
|
__metadata("design:returntype", Object)
|
|
7349
|
-
], AbstractPlaceNavigationComponent.prototype, "
|
|
5953
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
7350
5954
|
AbstractPlaceNavigationComponent = __decorate([
|
|
7351
5955
|
Component({
|
|
7352
5956
|
template: ''
|
|
@@ -7407,7 +6011,7 @@ var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
|
7407
6011
|
ListPlaceNavComponent = __decorate([
|
|
7408
6012
|
Component({
|
|
7409
6013
|
selector: 'aup-list-place-nav',
|
|
7410
|
-
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]=\"
|
|
6014
|
+
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]=\"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</mat-nav-list>\n",
|
|
7411
6015
|
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)}"]
|
|
7412
6016
|
}),
|
|
7413
6017
|
__metadata("design:paramtypes", [PlaceRouter])
|
|
@@ -7415,6 +6019,25 @@ var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
|
7415
6019
|
return ListPlaceNavComponent;
|
|
7416
6020
|
}(AbstractPlaceNavigationComponent));
|
|
7417
6021
|
|
|
6022
|
+
var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
6023
|
+
__extends(TabbedPlaceNavigationComponent, _super);
|
|
6024
|
+
function TabbedPlaceNavigationComponent(placeRouter) {
|
|
6025
|
+
return _super.call(this, placeRouter) || this;
|
|
6026
|
+
}
|
|
6027
|
+
TabbedPlaceNavigationComponent.ctorParameters = function () { return [
|
|
6028
|
+
{ type: PlaceRouter }
|
|
6029
|
+
]; };
|
|
6030
|
+
TabbedPlaceNavigationComponent = __decorate([
|
|
6031
|
+
Component({
|
|
6032
|
+
selector: 'aup-tabbed-place-navigation',
|
|
6033
|
+
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",
|
|
6034
|
+
styles: [""]
|
|
6035
|
+
}),
|
|
6036
|
+
__metadata("design:paramtypes", [PlaceRouter])
|
|
6037
|
+
], TabbedPlaceNavigationComponent);
|
|
6038
|
+
return TabbedPlaceNavigationComponent;
|
|
6039
|
+
}(AbstractPlaceNavigationComponent));
|
|
6040
|
+
|
|
7418
6041
|
/**
|
|
7419
6042
|
* @example
|
|
7420
6043
|
* // Usage
|
|
@@ -7453,7 +6076,7 @@ var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
|
7453
6076
|
* (at)Place({
|
|
7454
6077
|
* path: 'myPlace',
|
|
7455
6078
|
* data: {
|
|
7456
|
-
* nav: I18n.places.myPlace.nav
|
|
6079
|
+
* nav: I18n.places.myPlace.nav()
|
|
7457
6080
|
* }
|
|
7458
6081
|
* })
|
|
7459
6082
|
*/
|
|
@@ -7489,7 +6112,7 @@ var SidePlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
7489
6112
|
SidePlaceNavigationComponent = __decorate([
|
|
7490
6113
|
Component({
|
|
7491
6114
|
selector: 'aup-side-place-navigation',
|
|
7492
|
-
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]=\"
|
|
6115
|
+
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]=\"getNav(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNav(placeDefinition).icon()\" [icon]=\"getNav(placeDefinition).icon()\"></aup-icon>\n <span\n class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
|
|
7493
6116
|
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)}"]
|
|
7494
6117
|
}),
|
|
7495
6118
|
__metadata("design:paramtypes", [Router, PlaceRouter])
|
|
@@ -7497,25 +6120,6 @@ var SidePlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
7497
6120
|
return SidePlaceNavigationComponent;
|
|
7498
6121
|
}(AbstractPlaceNavigationComponent));
|
|
7499
6122
|
|
|
7500
|
-
var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
7501
|
-
__extends(TabbedPlaceNavigationComponent, _super);
|
|
7502
|
-
function TabbedPlaceNavigationComponent(placeRouter) {
|
|
7503
|
-
return _super.call(this, placeRouter) || this;
|
|
7504
|
-
}
|
|
7505
|
-
TabbedPlaceNavigationComponent.ctorParameters = function () { return [
|
|
7506
|
-
{ type: PlaceRouter }
|
|
7507
|
-
]; };
|
|
7508
|
-
TabbedPlaceNavigationComponent = __decorate([
|
|
7509
|
-
Component({
|
|
7510
|
-
selector: 'aup-tabbed-place-navigation',
|
|
7511
|
-
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",
|
|
7512
|
-
styles: [""]
|
|
7513
|
-
}),
|
|
7514
|
-
__metadata("design:paramtypes", [PlaceRouter])
|
|
7515
|
-
], TabbedPlaceNavigationComponent);
|
|
7516
|
-
return TabbedPlaceNavigationComponent;
|
|
7517
|
-
}(AbstractPlaceNavigationComponent));
|
|
7518
|
-
|
|
7519
6123
|
var PlaceModule = /** @class */ (function () {
|
|
7520
6124
|
function PlaceModule() {
|
|
7521
6125
|
}
|
|
@@ -8062,7 +6666,8 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
|
|
|
8062
6666
|
binding: null
|
|
8063
6667
|
};
|
|
8064
6668
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
8065
|
-
DebugContext.
|
|
6669
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6670
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
8066
6671
|
Object.defineProperty(prototype, propertyKey, {
|
|
8067
6672
|
get: function () {
|
|
8068
6673
|
return mechanics.backingModel;
|
|
@@ -8124,5 +6729,5 @@ function VisitParameterList(options) {
|
|
|
8124
6729
|
* Generated bundle index. Do not edit.
|
|
8125
6730
|
*/
|
|
8126
6731
|
|
|
8127
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule,
|
|
6732
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, EditRowControls as ɵba, ColumnTemplateDirective as ɵbb, DefaultCellRendererComponent as ɵbc, TableCellRendererComponent as ɵbd, SelectCellRendererComponent as ɵbe, SelectHeaderCellRendererComponent as ɵbf, DefaultHeaderCellRendererComponent as ɵbg, TableHeaderCellRendererComponent as ɵbh, MultipleSelectInputComponent as ɵbi, IconComponent as ɵbj, SectionHeaderComponent as ɵbk, PlaceModule as ɵbl, ComponentsModule as ɵbm, EmptyStateComponent as ɵbn, BusyOverlayComponent as ɵbo, PlaceOutletComponent as ɵbp, leftRightPlaceAnimation as ɵbq, LEFT_RIGHT_PLACE_ANIMATION as ɵbr, AUP_PLACE_CONFIG as ɵbs, PlaceRouter as ɵbu, InteractionService as ɵbv, ModalInteractionContextFactory as ɵbw, UrlService as ɵbx, PlaceHistory as ɵby, TabbedPlaceNavigationComponent as ɵbz, FocusBindingDirective as ɵc, AbstractPlaceNavigationComponent as ɵca, ListPlaceNavComponent as ɵcb, SidePlaceNavigationComponent as ɵcc, InteractionModule as ɵcd, ActivityContainerComponent as ɵce, AbstractInteractionContext as ɵcf, ActivityOutletComponent as ɵcg, ConfirmationDialogComponent as ɵch, ACTIVITY_DATA as ɵci, Activity as ɵcj, ConfirmThenDialogComponent as ɵcl, AlertDialogComponent as ɵcm, InPlaceInteractionContextComponent as ɵco, AddItemInteractionContextComponent as ɵcp, ActivityActionsComponent as ɵcq, PopupInteractionContextComponent as ɵcr, StringInputActivity as ɵcs, AbstractInputActivity as ɵct, SelectInputActivity as ɵcu, InteractionContextTriggerFor as ɵcv, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, NumberInputComponent as ɵj, StringInputComponent as ɵk, TextInputComponent as ɵl, PasswordInputComponent as ɵm, SelectInputComponent as ɵn, CheckboxInputComponent as ɵo, ScrollContainerComponent as ɵp, NoopComponent as ɵq, SwitchCaseOption as ɵr, SwitchCaseWhenDirective as ɵs, SwitchCaseDefaultDirective as ɵt, SwitchCaseComponent as ɵu, FocusContainerComponent as ɵv, VerticalFocusContainerComponent as ɵw, FocusableComponent as ɵx, CardContainerComponent as ɵy, TableComponent as ɵz };
|
|
8128
6733
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|