@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 { __decorate, __metadata, __param, __awaiter } 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 { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, 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 { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, 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';
|
|
@@ -373,840 +369,11 @@ CardContainerComponent = __decorate([
|
|
|
373
369
|
Component({
|
|
374
370
|
selector: 'aup-card-container',
|
|
375
371
|
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",
|
|
376
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white
|
|
372
|
+
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}"]
|
|
377
373
|
}),
|
|
378
374
|
__metadata("design:paramtypes", [])
|
|
379
375
|
], CardContainerComponent);
|
|
380
376
|
|
|
381
|
-
var TrackBy;
|
|
382
|
-
(function (TrackBy) {
|
|
383
|
-
TrackBy.byIndex = (data, index) => index;
|
|
384
|
-
})(TrackBy || (TrackBy = {}));
|
|
385
|
-
|
|
386
|
-
var CommandFace;
|
|
387
|
-
(function (CommandFace) {
|
|
388
|
-
let Position;
|
|
389
|
-
(function (Position) {
|
|
390
|
-
Position["START"] = "start";
|
|
391
|
-
Position["END"] = "end";
|
|
392
|
-
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
393
|
-
CommandFace.Style = Enum({
|
|
394
|
-
FLAT: 'flat',
|
|
395
|
-
STROKED: 'stroked',
|
|
396
|
-
RAISED: 'raised'
|
|
397
|
-
});
|
|
398
|
-
function getColorOf(face) {
|
|
399
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
|
|
400
|
-
}
|
|
401
|
-
CommandFace.getColorOf = getColorOf;
|
|
402
|
-
function getStyleOf(face) {
|
|
403
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
|
|
404
|
-
}
|
|
405
|
-
CommandFace.getStyleOf = getStyleOf;
|
|
406
|
-
function getIconOf(face) {
|
|
407
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
408
|
-
}
|
|
409
|
-
CommandFace.getIconOf = getIconOf;
|
|
410
|
-
function getTooltipOf(face) {
|
|
411
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
412
|
-
}
|
|
413
|
-
CommandFace.getTooltipOf = getTooltipOf;
|
|
414
|
-
function getTextOf(face) {
|
|
415
|
-
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
|
|
416
|
-
}
|
|
417
|
-
CommandFace.getTextOf = getTextOf;
|
|
418
|
-
class Adapter {
|
|
419
|
-
constructor(face) {
|
|
420
|
-
this.face = face;
|
|
421
|
-
}
|
|
422
|
-
get text() {
|
|
423
|
-
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
424
|
-
}
|
|
425
|
-
get icon() {
|
|
426
|
-
return CommandFace.getIconOf(this.face);
|
|
427
|
-
}
|
|
428
|
-
get iconPosition() {
|
|
429
|
-
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
430
|
-
}
|
|
431
|
-
get tooltip() {
|
|
432
|
-
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
433
|
-
}
|
|
434
|
-
get iconPositionStart() {
|
|
435
|
-
return this.iconPosition === CommandFace.Position.START;
|
|
436
|
-
}
|
|
437
|
-
get iconPositionEnd() {
|
|
438
|
-
return this.iconPosition === CommandFace.Position.END;
|
|
439
|
-
}
|
|
440
|
-
get color() {
|
|
441
|
-
return CommandFace.getColorOf(this.face);
|
|
442
|
-
}
|
|
443
|
-
get style() {
|
|
444
|
-
return CommandFace.getStyleOf(this.face);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
__decorate([
|
|
448
|
-
Memoize(),
|
|
449
|
-
__metadata("design:type", Object),
|
|
450
|
-
__metadata("design:paramtypes", [])
|
|
451
|
-
], Adapter.prototype, "text", null);
|
|
452
|
-
__decorate([
|
|
453
|
-
Memoize(),
|
|
454
|
-
__metadata("design:type", Object),
|
|
455
|
-
__metadata("design:paramtypes", [])
|
|
456
|
-
], Adapter.prototype, "icon", null);
|
|
457
|
-
__decorate([
|
|
458
|
-
Memoize(),
|
|
459
|
-
__metadata("design:type", Object),
|
|
460
|
-
__metadata("design:paramtypes", [])
|
|
461
|
-
], Adapter.prototype, "iconPosition", null);
|
|
462
|
-
__decorate([
|
|
463
|
-
Memoize(),
|
|
464
|
-
__metadata("design:type", Object),
|
|
465
|
-
__metadata("design:paramtypes", [])
|
|
466
|
-
], Adapter.prototype, "tooltip", null);
|
|
467
|
-
__decorate([
|
|
468
|
-
Memoize(),
|
|
469
|
-
__metadata("design:type", Boolean),
|
|
470
|
-
__metadata("design:paramtypes", [])
|
|
471
|
-
], Adapter.prototype, "iconPositionStart", null);
|
|
472
|
-
__decorate([
|
|
473
|
-
Memoize(),
|
|
474
|
-
__metadata("design:type", Boolean),
|
|
475
|
-
__metadata("design:paramtypes", [])
|
|
476
|
-
], Adapter.prototype, "iconPositionEnd", null);
|
|
477
|
-
__decorate([
|
|
478
|
-
Memoize(),
|
|
479
|
-
__metadata("design:type", String),
|
|
480
|
-
__metadata("design:paramtypes", [])
|
|
481
|
-
], Adapter.prototype, "color", null);
|
|
482
|
-
__decorate([
|
|
483
|
-
Memoize(),
|
|
484
|
-
__metadata("design:type", String),
|
|
485
|
-
__metadata("design:paramtypes", [])
|
|
486
|
-
], Adapter.prototype, "style", null);
|
|
487
|
-
CommandFace.Adapter = Adapter;
|
|
488
|
-
})(CommandFace || (CommandFace = {}));
|
|
489
|
-
|
|
490
|
-
class ViewData {
|
|
491
|
-
}
|
|
492
|
-
(function (ViewData) {
|
|
493
|
-
class FaceData extends ViewData {
|
|
494
|
-
constructor(face) {
|
|
495
|
-
super();
|
|
496
|
-
this.faceAdapter = new CommandFace.Adapter(face);
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
ViewData.FaceData = FaceData;
|
|
500
|
-
class GroupData extends FaceData {
|
|
501
|
-
constructor(face, xPosition, yPosition, children) {
|
|
502
|
-
super(face);
|
|
503
|
-
this.xPosition = xPosition;
|
|
504
|
-
this.yPosition = yPosition;
|
|
505
|
-
this.children = children;
|
|
506
|
-
}
|
|
507
|
-
get hasMixedIcons() {
|
|
508
|
-
const hasFaces = this.children.filter(c => ViewData.hasFace(c));
|
|
509
|
-
const iconCount = hasFaces.filter(c => !!c.faceAdapter.icon).length;
|
|
510
|
-
return iconCount > 0 && hasFaces.length !== iconCount;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
__decorate([
|
|
514
|
-
Memoize(),
|
|
515
|
-
__metadata("design:type", Boolean),
|
|
516
|
-
__metadata("design:paramtypes", [])
|
|
517
|
-
], GroupData.prototype, "hasMixedIcons", null);
|
|
518
|
-
ViewData.GroupData = GroupData;
|
|
519
|
-
class CommandData extends FaceData {
|
|
520
|
-
constructor(face, command) {
|
|
521
|
-
super(face);
|
|
522
|
-
this.command = command;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
ViewData.CommandData = CommandData;
|
|
526
|
-
class SeparatorData extends ViewData {
|
|
527
|
-
}
|
|
528
|
-
ViewData.SeparatorData = SeparatorData;
|
|
529
|
-
class FlexData extends ViewData {
|
|
530
|
-
}
|
|
531
|
-
ViewData.FlexData = FlexData;
|
|
532
|
-
function as(type, viewData) {
|
|
533
|
-
return viewData instanceof type ? viewData : lang.illegalState(`expected instance of ${type.name}, got ${viewData.constructor.name}`);
|
|
534
|
-
}
|
|
535
|
-
ViewData.as = as;
|
|
536
|
-
function getCommand(data) {
|
|
537
|
-
return as(CommandData, data).command;
|
|
538
|
-
}
|
|
539
|
-
ViewData.getCommand = getCommand;
|
|
540
|
-
function getTooltip(data) {
|
|
541
|
-
return as(FaceData, data).faceAdapter.tooltip;
|
|
542
|
-
}
|
|
543
|
-
ViewData.getTooltip = getTooltip;
|
|
544
|
-
function getStyle(data) {
|
|
545
|
-
return as(FaceData, data).faceAdapter.style;
|
|
546
|
-
}
|
|
547
|
-
ViewData.getStyle = getStyle;
|
|
548
|
-
function getColor(data) {
|
|
549
|
-
return as(FaceData, data).faceAdapter.color;
|
|
550
|
-
}
|
|
551
|
-
ViewData.getColor = getColor;
|
|
552
|
-
function hasText(data) {
|
|
553
|
-
return !!as(FaceData, data).faceAdapter.text;
|
|
554
|
-
}
|
|
555
|
-
ViewData.hasText = hasText;
|
|
556
|
-
function getFace(data) {
|
|
557
|
-
return as(FaceData, data).faceAdapter.face;
|
|
558
|
-
}
|
|
559
|
-
ViewData.getFace = getFace;
|
|
560
|
-
function asGroup(viewData) {
|
|
561
|
-
return as(GroupData, viewData);
|
|
562
|
-
}
|
|
563
|
-
ViewData.asGroup = asGroup;
|
|
564
|
-
function hasMixedIcons(data) {
|
|
565
|
-
return as(GroupData, data).hasMixedIcons;
|
|
566
|
-
}
|
|
567
|
-
ViewData.hasMixedIcons = hasMixedIcons;
|
|
568
|
-
function isGroup(data) {
|
|
569
|
-
return data instanceof GroupData;
|
|
570
|
-
}
|
|
571
|
-
ViewData.isGroup = isGroup;
|
|
572
|
-
function hasFace(data) {
|
|
573
|
-
return data instanceof FaceData;
|
|
574
|
-
}
|
|
575
|
-
ViewData.hasFace = hasFace;
|
|
576
|
-
function isCommand(data) {
|
|
577
|
-
return data instanceof CommandData;
|
|
578
|
-
}
|
|
579
|
-
ViewData.isCommand = isCommand;
|
|
580
|
-
function isSeparator(data) {
|
|
581
|
-
return data instanceof SeparatorData;
|
|
582
|
-
}
|
|
583
|
-
ViewData.isSeparator = isSeparator;
|
|
584
|
-
function isFlex(data) {
|
|
585
|
-
return data instanceof FlexData;
|
|
586
|
-
}
|
|
587
|
-
ViewData.isFlex = isFlex;
|
|
588
|
-
})(ViewData || (ViewData = {}));
|
|
589
|
-
|
|
590
|
-
let CommandGroupMenuRendererComponent = class CommandGroupMenuRendererComponent extends DisposableComponent {
|
|
591
|
-
constructor(parent) {
|
|
592
|
-
super();
|
|
593
|
-
this.parent = parent;
|
|
594
|
-
this.groupViewDataModel = new MutableValueModel();
|
|
595
|
-
this.commandFired = new EventEmitter();
|
|
596
|
-
this.ViewData = ViewData;
|
|
597
|
-
this.TrackBy = TrackBy;
|
|
598
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
599
|
-
this.children = chain(this.groupViewDataModel).pluckList('children');
|
|
600
|
-
this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
|
|
601
|
-
}
|
|
602
|
-
getCommand(data) {
|
|
603
|
-
const command = ViewData.getCommand(data);
|
|
604
|
-
const { when } = Dsl.disposeWith(this);
|
|
605
|
-
when(command.busy).becomesFalsey(() => this.commandFired.emit());
|
|
606
|
-
return command;
|
|
607
|
-
}
|
|
608
|
-
};
|
|
609
|
-
CommandGroupMenuRendererComponent.ctorParameters = () => [
|
|
610
|
-
{ type: CommandGroupMenuRendererComponent, decorators: [{ type: Optional }, { type: SkipSelf }] }
|
|
611
|
-
];
|
|
612
|
-
__decorate([
|
|
613
|
-
ViewChild('menu', { static: true }),
|
|
614
|
-
__metadata("design:type", MatMenu)
|
|
615
|
-
], CommandGroupMenuRendererComponent.prototype, "menuComponent", void 0);
|
|
616
|
-
__decorate([
|
|
617
|
-
Input(), StoreInValueModel('groupViewDataModel'),
|
|
618
|
-
__metadata("design:type", ViewData.GroupData)
|
|
619
|
-
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
620
|
-
__decorate([
|
|
621
|
-
Output(),
|
|
622
|
-
__metadata("design:type", Object)
|
|
623
|
-
], CommandGroupMenuRendererComponent.prototype, "commandFired", void 0);
|
|
624
|
-
__decorate([
|
|
625
|
-
ViewChildren(MatMenuTrigger),
|
|
626
|
-
__metadata("design:type", QueryList)
|
|
627
|
-
], CommandGroupMenuRendererComponent.prototype, "triggers", void 0);
|
|
628
|
-
CommandGroupMenuRendererComponent = __decorate([
|
|
629
|
-
Component({
|
|
630
|
-
selector: 'aup-command-group-menu',
|
|
631
|
-
template: "<mat-menu #menu [xPosition]=\"groupViewData.xPosition\" [yPosition]=\"groupViewData.yPosition\">\n <ng-container *ngFor=\"let data of children.value; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"ViewData.isCommand(data)\"\n [pectinCommand]=\"getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n mat-menu-item>\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n\n <ng-container *ngIf=\"ViewData.isGroup(data)\">\n <button mat-menu-item\n #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"innerPanel.menuComponent\"\n >\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n <aup-command-group-menu #innerPanel\n [groupViewData]=\"ViewData.asGroup(data)\"\n (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\"></mat-divider>\n\n </ng-container>\n</mat-menu>\n"
|
|
632
|
-
}),
|
|
633
|
-
__param(0, Optional()), __param(0, SkipSelf()),
|
|
634
|
-
__metadata("design:paramtypes", [CommandGroupMenuRendererComponent])
|
|
635
|
-
], CommandGroupMenuRendererComponent);
|
|
636
|
-
|
|
637
|
-
let CommandGroupRendererComponent = class CommandGroupRendererComponent extends DisposableComponent {
|
|
638
|
-
constructor() {
|
|
639
|
-
super();
|
|
640
|
-
this.renderRootNode = true;
|
|
641
|
-
this.ViewData = ViewData;
|
|
642
|
-
this.TrackBy = TrackBy;
|
|
643
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
644
|
-
this.childViewDataModels = chain(this.groupViewDataModel).pluckList('children');
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
__decorate([
|
|
648
|
-
Input(), TrackExternal(),
|
|
649
|
-
__metadata("design:type", ValueModel)
|
|
650
|
-
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
651
|
-
__decorate([
|
|
652
|
-
Input(), StoreInValueModel('groupViewDataModel'),
|
|
653
|
-
__metadata("design:type", ViewData.GroupData)
|
|
654
|
-
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
655
|
-
__decorate([
|
|
656
|
-
Input(),
|
|
657
|
-
HostBinding('class.render-root'),
|
|
658
|
-
__metadata("design:type", Object)
|
|
659
|
-
], CommandGroupRendererComponent.prototype, "renderRootNode", void 0);
|
|
660
|
-
CommandGroupRendererComponent = __decorate([
|
|
661
|
-
Component({
|
|
662
|
-
selector: 'aup-command-group-renderer',
|
|
663
|
-
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",
|
|
664
|
-
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}"]
|
|
665
|
-
}),
|
|
666
|
-
__metadata("design:paramtypes", [])
|
|
667
|
-
], CommandGroupRendererComponent);
|
|
668
|
-
|
|
669
|
-
class Registration extends GarbageCollector {
|
|
670
|
-
}
|
|
671
|
-
(function (Registration) {
|
|
672
|
-
class FaceRegistration extends Registration {
|
|
673
|
-
constructor(faceModel) {
|
|
674
|
-
super();
|
|
675
|
-
this.faceModel = faceModel;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
Registration.FaceRegistration = FaceRegistration;
|
|
679
|
-
class CommandRegistration extends FaceRegistration {
|
|
680
|
-
constructor(faceModel, command) {
|
|
681
|
-
super(faceModel);
|
|
682
|
-
this.command = command;
|
|
683
|
-
}
|
|
684
|
-
toTemplate() {
|
|
685
|
-
return new ViewData.CommandData(this.faceModel.value, this.command);
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
Registration.CommandRegistration = CommandRegistration;
|
|
689
|
-
class GroupRegistration extends FaceRegistration {
|
|
690
|
-
constructor(faceModel, group) {
|
|
691
|
-
super(faceModel);
|
|
692
|
-
this.group = group;
|
|
693
|
-
}
|
|
694
|
-
toTemplate() {
|
|
695
|
-
return new ViewData.GroupData(this.faceModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(r => r.toTemplate()));
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
Registration.GroupRegistration = GroupRegistration;
|
|
699
|
-
class SeparatorRegistration extends Registration {
|
|
700
|
-
constructor() {
|
|
701
|
-
super(...arguments);
|
|
702
|
-
this.template = new ViewData.SeparatorData();
|
|
703
|
-
}
|
|
704
|
-
toTemplate() {
|
|
705
|
-
return this.template;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
Registration.SeparatorRegistration = SeparatorRegistration;
|
|
709
|
-
class FlexRegistration extends Registration {
|
|
710
|
-
constructor() {
|
|
711
|
-
super(...arguments);
|
|
712
|
-
this.template = new ViewData.FlexData();
|
|
713
|
-
}
|
|
714
|
-
toTemplate() {
|
|
715
|
-
return this.template;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
Registration.FlexRegistration = FlexRegistration;
|
|
719
|
-
function hasFace(entry) {
|
|
720
|
-
return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
|
|
721
|
-
}
|
|
722
|
-
Registration.hasFace = hasFace;
|
|
723
|
-
})(Registration || (Registration = {}));
|
|
724
|
-
|
|
725
|
-
class CommandGroup extends GarbageCollector {
|
|
726
|
-
constructor(parent) {
|
|
727
|
-
super();
|
|
728
|
-
this.parent = parent;
|
|
729
|
-
this._rootTemplate = new MutableValueModel();
|
|
730
|
-
this._registrations = new MutableListModel();
|
|
731
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
732
|
-
this.childTemplates = chain(this._rootTemplate).pluckList('children');
|
|
733
|
-
this.initialised = chain(this._rootTemplate).isNotNil();
|
|
734
|
-
}
|
|
735
|
-
initialise() {
|
|
736
|
-
this.rebuildTemplates();
|
|
737
|
-
}
|
|
738
|
-
get rootTemplate() {
|
|
739
|
-
return this._rootTemplate.readonly;
|
|
740
|
-
}
|
|
741
|
-
get registrations() {
|
|
742
|
-
return this._registrations.readonly;
|
|
743
|
-
}
|
|
744
|
-
notifyChanged() {
|
|
745
|
-
if (this.parent) {
|
|
746
|
-
this.parent.notifyChanged();
|
|
747
|
-
}
|
|
748
|
-
else {
|
|
749
|
-
this.rebuildTemplates();
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
notifyChildFaceChanged(is, was) {
|
|
753
|
-
this.notifyChanged();
|
|
754
|
-
}
|
|
755
|
-
rebuildTemplates() {
|
|
756
|
-
this._rootTemplate.value = new ViewData.GroupData(this.faceModel.value, this.xPosition, this.yPosition, this.registrations.value.map(r => r.toTemplate()));
|
|
757
|
-
}
|
|
758
|
-
get depth() {
|
|
759
|
-
return this.isRoot() ? 0 : this.parent.depth + 1;
|
|
760
|
-
}
|
|
761
|
-
isRoot() {
|
|
762
|
-
return false;
|
|
763
|
-
}
|
|
764
|
-
registerCommand(command, faceModel) {
|
|
765
|
-
return this.register(new Registration.CommandRegistration(faceModel, command));
|
|
766
|
-
}
|
|
767
|
-
registerGroup(group, faceModel) {
|
|
768
|
-
return this.register(new Registration.GroupRegistration(faceModel, group));
|
|
769
|
-
}
|
|
770
|
-
registerFlex(component) {
|
|
771
|
-
return this.register(new Registration.FlexRegistration());
|
|
772
|
-
}
|
|
773
|
-
registerSeparator(component) {
|
|
774
|
-
return this.register(new Registration.SeparatorRegistration());
|
|
775
|
-
}
|
|
776
|
-
register(registration) {
|
|
777
|
-
this._registrations.push(registration);
|
|
778
|
-
if (registration instanceof Registration.FaceRegistration) {
|
|
779
|
-
const { when } = Dsl.disposeWith(registration);
|
|
780
|
-
when(registration.faceModel).changes((is, was) => {
|
|
781
|
-
this.notifyChildFaceChanged(is, was);
|
|
782
|
-
}, { asLongAs: this.initialised });
|
|
783
|
-
}
|
|
784
|
-
registration.onDispose(() => this._registrations.remove(registration));
|
|
785
|
-
return registration;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
(function (CommandGroup) {
|
|
789
|
-
class Root extends CommandGroup {
|
|
790
|
-
isRoot() {
|
|
791
|
-
return true;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
__decorate([
|
|
795
|
-
TrackExternal(),
|
|
796
|
-
__metadata("design:type", ValueModel)
|
|
797
|
-
], Root.prototype, "faceModel", void 0);
|
|
798
|
-
__decorate([
|
|
799
|
-
TrackExternal({ defaultValue: 'after' }),
|
|
800
|
-
__metadata("design:type", ValueModel)
|
|
801
|
-
], Root.prototype, "xPositionModel", void 0);
|
|
802
|
-
__decorate([
|
|
803
|
-
StoreInValueModel('xPositionModel'),
|
|
804
|
-
__metadata("design:type", String)
|
|
805
|
-
], Root.prototype, "xPosition", void 0);
|
|
806
|
-
__decorate([
|
|
807
|
-
TrackExternal({ defaultValue: 'below' }),
|
|
808
|
-
__metadata("design:type", ValueModel)
|
|
809
|
-
], Root.prototype, "yPositionModel", void 0);
|
|
810
|
-
__decorate([
|
|
811
|
-
StoreInValueModel('yPositionModel'),
|
|
812
|
-
__metadata("design:type", String)
|
|
813
|
-
], Root.prototype, "yPosition", void 0);
|
|
814
|
-
CommandGroup.Root = Root;
|
|
815
|
-
function factory() {
|
|
816
|
-
return new Root();
|
|
817
|
-
}
|
|
818
|
-
CommandGroup.factory = factory;
|
|
819
|
-
})(CommandGroup || (CommandGroup = {}));
|
|
820
|
-
|
|
821
|
-
var CommandGroupComponent_1;
|
|
822
|
-
let CommandGroupComponent = CommandGroupComponent_1 = class CommandGroupComponent extends CommandGroup {
|
|
823
|
-
constructor(parent) {
|
|
824
|
-
super(parent);
|
|
825
|
-
this.parent = parent;
|
|
826
|
-
this.xPosition = 'after';
|
|
827
|
-
this.yPosition = 'below';
|
|
828
|
-
this.parent.registerGroup(this, this.faceModel);
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
CommandGroupComponent.ctorParameters = () => [
|
|
832
|
-
{ type: CommandGroup, decorators: [{ type: SkipSelf }] }
|
|
833
|
-
];
|
|
834
|
-
__decorate([
|
|
835
|
-
Input(), TrackExternal(),
|
|
836
|
-
__metadata("design:type", ValueModel)
|
|
837
|
-
], CommandGroupComponent.prototype, "faceModel", void 0);
|
|
838
|
-
__decorate([
|
|
839
|
-
Input(), StoreInValueModel('faceModel'),
|
|
840
|
-
__metadata("design:type", Object)
|
|
841
|
-
], CommandGroupComponent.prototype, "face", void 0);
|
|
842
|
-
__decorate([
|
|
843
|
-
Input(),
|
|
844
|
-
__metadata("design:type", String)
|
|
845
|
-
], CommandGroupComponent.prototype, "xPosition", void 0);
|
|
846
|
-
__decorate([
|
|
847
|
-
Input(),
|
|
848
|
-
__metadata("design:type", String)
|
|
849
|
-
], CommandGroupComponent.prototype, "yPosition", void 0);
|
|
850
|
-
CommandGroupComponent = CommandGroupComponent_1 = __decorate([
|
|
851
|
-
Component({
|
|
852
|
-
selector: 'aup-command-group',
|
|
853
|
-
template: '',
|
|
854
|
-
providers: [
|
|
855
|
-
{ provide: CommandGroup, useExisting: CommandGroupComponent_1 }
|
|
856
|
-
]
|
|
857
|
-
}),
|
|
858
|
-
__param(0, SkipSelf()),
|
|
859
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
860
|
-
], CommandGroupComponent);
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Custom CSS:
|
|
864
|
-
* @example
|
|
865
|
-
* root: { // globally
|
|
866
|
-
* --aup-command-face-icon-gap: 8px;
|
|
867
|
-
* }
|
|
868
|
-
* aup-command-face { // per instance
|
|
869
|
-
* --icon-gap: 4px;
|
|
870
|
-
* }
|
|
871
|
-
*/
|
|
872
|
-
let CommandFaceComponent = class CommandFaceComponent extends DisposableComponent {
|
|
873
|
-
constructor() {
|
|
874
|
-
super();
|
|
875
|
-
this.faceModel = new MutableValueModel();
|
|
876
|
-
this.ignoreIcon = false;
|
|
877
|
-
this.ignoreText = false;
|
|
878
|
-
this.includeMissingIconInLayout = false;
|
|
879
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
880
|
-
// overkill /c: when all you have is a hammer...
|
|
881
|
-
const faceAdapter = chain(this.faceModel).map(face => new CommandFace.Adapter(face));
|
|
882
|
-
this.iconModel = faceAdapter.pluck('icon');
|
|
883
|
-
this.textModel = faceAdapter.pluck('text');
|
|
884
|
-
this.positionModel = faceAdapter.pluck('iconPosition');
|
|
885
|
-
this.colorModel = faceAdapter.pluck('color');
|
|
886
|
-
}
|
|
887
|
-
get requiresMissingIconInLayout() {
|
|
888
|
-
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
889
|
-
}
|
|
890
|
-
ngOnInit() {
|
|
891
|
-
}
|
|
892
|
-
get iconPosition() {
|
|
893
|
-
var _a;
|
|
894
|
-
return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : CommandFace.Position.START;
|
|
895
|
-
}
|
|
896
|
-
get shouldIncludeIcon() {
|
|
897
|
-
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
898
|
-
}
|
|
899
|
-
get iconStart() {
|
|
900
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.START;
|
|
901
|
-
}
|
|
902
|
-
get iconEnd() {
|
|
903
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.END;
|
|
904
|
-
}
|
|
905
|
-
get text() {
|
|
906
|
-
return this.ignoreText ? undefined : this.textModel.value;
|
|
907
|
-
}
|
|
908
|
-
get color() {
|
|
909
|
-
return this.colorModel.value;
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
__decorate([
|
|
913
|
-
Input('face'), StoreInValueModel('faceModel'),
|
|
914
|
-
__metadata("design:type", Object)
|
|
915
|
-
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
916
|
-
__decorate([
|
|
917
|
-
Input(),
|
|
918
|
-
__metadata("design:type", Object)
|
|
919
|
-
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
920
|
-
__decorate([
|
|
921
|
-
Input(),
|
|
922
|
-
__metadata("design:type", Object)
|
|
923
|
-
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
924
|
-
__decorate([
|
|
925
|
-
Input(),
|
|
926
|
-
__metadata("design:type", Object)
|
|
927
|
-
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
928
|
-
__decorate([
|
|
929
|
-
HostBinding('class.hide-icon'),
|
|
930
|
-
__metadata("design:type", Object),
|
|
931
|
-
__metadata("design:paramtypes", [])
|
|
932
|
-
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
933
|
-
__decorate([
|
|
934
|
-
HostBinding('attr.color'),
|
|
935
|
-
__metadata("design:type", String),
|
|
936
|
-
__metadata("design:paramtypes", [])
|
|
937
|
-
], CommandFaceComponent.prototype, "color", null);
|
|
938
|
-
CommandFaceComponent = __decorate([
|
|
939
|
-
Component({
|
|
940
|
-
selector: 'aup-command-face',
|
|
941
|
-
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",
|
|
942
|
-
encapsulation: ViewEncapsulation.None,
|
|
943
|
-
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}"]
|
|
944
|
-
}),
|
|
945
|
-
__metadata("design:paramtypes", [])
|
|
946
|
-
], CommandFaceComponent);
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
*
|
|
950
|
-
*/
|
|
951
|
-
let CommandComponent = class CommandComponent extends DisposableComponent {
|
|
952
|
-
constructor(parent) {
|
|
953
|
-
super();
|
|
954
|
-
this.parent = parent;
|
|
955
|
-
this.CommandFace = CommandFace;
|
|
956
|
-
const { chain, switchOn } = Dsl.disposeWith(this);
|
|
957
|
-
this.activeFaceModel = switchOn(this.command.busy).toValue(when => {
|
|
958
|
-
when.equalTo(true, this.busyFaceModel);
|
|
959
|
-
when.otherwise(this.faceModel);
|
|
960
|
-
}).otherwise(this.faceModel);
|
|
961
|
-
this.buttonStyle = chain(this.activeFaceModel).map(f => CommandFace.getStyleOf(f));
|
|
962
|
-
this.colorModel = chain(this.activeFaceModel).map(f => CommandFace.getColorOf(f));
|
|
963
|
-
if (parent) {
|
|
964
|
-
this.registerDisposable(this.parent.registerCommand(this.command, this.activeFaceModel));
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
ngOnInit() {
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
CommandComponent.ctorParameters = () => [
|
|
971
|
-
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
972
|
-
];
|
|
973
|
-
__decorate([
|
|
974
|
-
Input(), TrackExternal(),
|
|
975
|
-
__metadata("design:type", Command)
|
|
976
|
-
], CommandComponent.prototype, "command", void 0);
|
|
977
|
-
__decorate([
|
|
978
|
-
Input(), TrackExternal(),
|
|
979
|
-
__metadata("design:type", ValueModel)
|
|
980
|
-
], CommandComponent.prototype, "faceModel", void 0);
|
|
981
|
-
__decorate([
|
|
982
|
-
Input(), StoreInValueModel('faceModel'),
|
|
983
|
-
__metadata("design:type", Object)
|
|
984
|
-
], CommandComponent.prototype, "face", void 0);
|
|
985
|
-
__decorate([
|
|
986
|
-
Input(), TrackExternal(),
|
|
987
|
-
__metadata("design:type", ValueModel)
|
|
988
|
-
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
989
|
-
__decorate([
|
|
990
|
-
Input(), StoreInValueModel('busyFaceModel'),
|
|
991
|
-
__metadata("design:type", Object)
|
|
992
|
-
], CommandComponent.prototype, "busyFace", void 0);
|
|
993
|
-
CommandComponent = __decorate([
|
|
994
|
-
Component({
|
|
995
|
-
selector: 'aup-command',
|
|
996
|
-
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"
|
|
997
|
-
}),
|
|
998
|
-
__param(0, Optional()),
|
|
999
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1000
|
-
], CommandComponent);
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
*
|
|
1004
|
-
*/
|
|
1005
|
-
let FlexComponent = class FlexComponent extends DisposableComponent {
|
|
1006
|
-
constructor(parent) {
|
|
1007
|
-
super();
|
|
1008
|
-
this.parent = parent;
|
|
1009
|
-
if (parent) {
|
|
1010
|
-
parent.registerFlex(this);
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
ngOnInit() {
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
FlexComponent.ctorParameters = () => [
|
|
1017
|
-
{ type: CommandGroup }
|
|
1018
|
-
];
|
|
1019
|
-
FlexComponent = __decorate([
|
|
1020
|
-
Component({
|
|
1021
|
-
selector: 'aup-flex',
|
|
1022
|
-
template: ``
|
|
1023
|
-
}),
|
|
1024
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1025
|
-
], FlexComponent);
|
|
1026
|
-
|
|
1027
|
-
const ɵ0 = CommandGroup.factory;
|
|
1028
|
-
/**
|
|
1029
|
-
*
|
|
1030
|
-
*/
|
|
1031
|
-
let MoreMenuComponent = class MoreMenuComponent extends DisposableComponent {
|
|
1032
|
-
constructor(group) {
|
|
1033
|
-
super();
|
|
1034
|
-
this.group = group;
|
|
1035
|
-
this.tooltipModel = new MutableValueModel();
|
|
1036
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1037
|
-
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
1038
|
-
group.faceModel = chain(this.tooltipModel).map(tooltip => {
|
|
1039
|
-
return {
|
|
1040
|
-
icon: () => 'mat:more_vert',
|
|
1041
|
-
tooltip() {
|
|
1042
|
-
return tooltip;
|
|
1043
|
-
}
|
|
1044
|
-
};
|
|
1045
|
-
}, { allowNil: true });
|
|
1046
|
-
}
|
|
1047
|
-
ngOnInit() {
|
|
1048
|
-
}
|
|
1049
|
-
ngAfterContentInit() {
|
|
1050
|
-
this.group.initialise();
|
|
1051
|
-
}
|
|
1052
|
-
};
|
|
1053
|
-
MoreMenuComponent.ctorParameters = () => [
|
|
1054
|
-
{ type: CommandGroup }
|
|
1055
|
-
];
|
|
1056
|
-
__decorate([
|
|
1057
|
-
Input(), StoreInValueModel('tooltipModel'),
|
|
1058
|
-
__metadata("design:type", String)
|
|
1059
|
-
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
1060
|
-
__decorate([
|
|
1061
|
-
Trace(),
|
|
1062
|
-
__metadata("design:type", Function),
|
|
1063
|
-
__metadata("design:paramtypes", []),
|
|
1064
|
-
__metadata("design:returntype", void 0)
|
|
1065
|
-
], MoreMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1066
|
-
MoreMenuComponent = __decorate([
|
|
1067
|
-
Component({
|
|
1068
|
-
selector: 'aup-more-menu',
|
|
1069
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1070
|
-
providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
|
|
1071
|
-
}),
|
|
1072
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1073
|
-
], MoreMenuComponent);
|
|
1074
|
-
|
|
1075
|
-
const ɵ0$1 = CommandGroup.factory;
|
|
1076
|
-
/**
|
|
1077
|
-
*
|
|
1078
|
-
*/
|
|
1079
|
-
let PopupMenuComponent = class PopupMenuComponent extends DisposableComponent {
|
|
1080
|
-
constructor(group) {
|
|
1081
|
-
super();
|
|
1082
|
-
this.group = group;
|
|
1083
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1084
|
-
group.faceModel = this.faceModel;
|
|
1085
|
-
}
|
|
1086
|
-
ngOnInit() {
|
|
1087
|
-
}
|
|
1088
|
-
ngAfterContentInit() {
|
|
1089
|
-
this.group.initialise();
|
|
1090
|
-
}
|
|
1091
|
-
ngAfterViewInit() {
|
|
1092
|
-
}
|
|
1093
|
-
};
|
|
1094
|
-
PopupMenuComponent.ctorParameters = () => [
|
|
1095
|
-
{ type: CommandGroup }
|
|
1096
|
-
];
|
|
1097
|
-
__decorate([
|
|
1098
|
-
Input(), TrackExternal(),
|
|
1099
|
-
__metadata("design:type", ValueModel)
|
|
1100
|
-
], PopupMenuComponent.prototype, "faceModel", void 0);
|
|
1101
|
-
__decorate([
|
|
1102
|
-
Input(), StoreInValueModel('faceModel'),
|
|
1103
|
-
__metadata("design:type", Object)
|
|
1104
|
-
], PopupMenuComponent.prototype, "face", void 0);
|
|
1105
|
-
__decorate([
|
|
1106
|
-
Trace(),
|
|
1107
|
-
__metadata("design:type", Function),
|
|
1108
|
-
__metadata("design:paramtypes", []),
|
|
1109
|
-
__metadata("design:returntype", void 0)
|
|
1110
|
-
], PopupMenuComponent.prototype, "ngOnInit", null);
|
|
1111
|
-
__decorate([
|
|
1112
|
-
Trace(),
|
|
1113
|
-
__metadata("design:type", Function),
|
|
1114
|
-
__metadata("design:paramtypes", []),
|
|
1115
|
-
__metadata("design:returntype", void 0)
|
|
1116
|
-
], PopupMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1117
|
-
__decorate([
|
|
1118
|
-
Trace(),
|
|
1119
|
-
__metadata("design:type", Function),
|
|
1120
|
-
__metadata("design:paramtypes", []),
|
|
1121
|
-
__metadata("design:returntype", void 0)
|
|
1122
|
-
], PopupMenuComponent.prototype, "ngAfterViewInit", null);
|
|
1123
|
-
PopupMenuComponent = __decorate([
|
|
1124
|
-
Component({
|
|
1125
|
-
selector: 'aup-popup-menu',
|
|
1126
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1127
|
-
providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
|
|
1128
|
-
}),
|
|
1129
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1130
|
-
], PopupMenuComponent);
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
*
|
|
1134
|
-
*/
|
|
1135
|
-
let SeparatorComponent = class SeparatorComponent extends DisposableComponent {
|
|
1136
|
-
constructor(parent) {
|
|
1137
|
-
super();
|
|
1138
|
-
this.parent = parent;
|
|
1139
|
-
if (parent) {
|
|
1140
|
-
parent.registerSeparator(this);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
isVertical() {
|
|
1144
|
-
return this === null || this === void 0 ? void 0 : this.parent.isRoot();
|
|
1145
|
-
}
|
|
1146
|
-
ngOnInit() {
|
|
1147
|
-
}
|
|
1148
|
-
};
|
|
1149
|
-
SeparatorComponent.ctorParameters = () => [
|
|
1150
|
-
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
1151
|
-
];
|
|
1152
|
-
SeparatorComponent = __decorate([
|
|
1153
|
-
Component({
|
|
1154
|
-
selector: 'aup-separator',
|
|
1155
|
-
template: `
|
|
1156
|
-
<mat-divider [vertical]="isVertical()"></mat-divider>`
|
|
1157
|
-
}),
|
|
1158
|
-
__param(0, Optional()),
|
|
1159
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1160
|
-
], SeparatorComponent);
|
|
1161
|
-
|
|
1162
|
-
const ɵ0$2 = CommandGroup.factory;
|
|
1163
|
-
/**
|
|
1164
|
-
*
|
|
1165
|
-
*/
|
|
1166
|
-
let ToolBarComponent = class ToolBarComponent extends DisposableComponent {
|
|
1167
|
-
constructor(group) {
|
|
1168
|
-
super();
|
|
1169
|
-
this.group = group;
|
|
1170
|
-
}
|
|
1171
|
-
ngOnInit() {
|
|
1172
|
-
}
|
|
1173
|
-
ngAfterContentInit() {
|
|
1174
|
-
this.group.initialise();
|
|
1175
|
-
}
|
|
1176
|
-
ngAfterViewInit() {
|
|
1177
|
-
}
|
|
1178
|
-
};
|
|
1179
|
-
ToolBarComponent.ctorParameters = () => [
|
|
1180
|
-
{ type: CommandGroup }
|
|
1181
|
-
];
|
|
1182
|
-
__decorate([
|
|
1183
|
-
Trace(),
|
|
1184
|
-
__metadata("design:type", Function),
|
|
1185
|
-
__metadata("design:paramtypes", []),
|
|
1186
|
-
__metadata("design:returntype", void 0)
|
|
1187
|
-
], ToolBarComponent.prototype, "ngOnInit", null);
|
|
1188
|
-
__decorate([
|
|
1189
|
-
Trace(),
|
|
1190
|
-
__metadata("design:type", Function),
|
|
1191
|
-
__metadata("design:paramtypes", []),
|
|
1192
|
-
__metadata("design:returntype", void 0)
|
|
1193
|
-
], ToolBarComponent.prototype, "ngAfterContentInit", null);
|
|
1194
|
-
__decorate([
|
|
1195
|
-
Trace(),
|
|
1196
|
-
__metadata("design:type", Function),
|
|
1197
|
-
__metadata("design:paramtypes", []),
|
|
1198
|
-
__metadata("design:returntype", void 0)
|
|
1199
|
-
], ToolBarComponent.prototype, "ngAfterViewInit", null);
|
|
1200
|
-
ToolBarComponent = __decorate([
|
|
1201
|
-
Component({
|
|
1202
|
-
selector: 'aup-tool-bar',
|
|
1203
|
-
template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1204
|
-
providers: [{ provide: CommandGroup, useFactory: ɵ0$2 }],
|
|
1205
|
-
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}"]
|
|
1206
|
-
}),
|
|
1207
|
-
__metadata("design:paramtypes", [CommandGroup])
|
|
1208
|
-
], ToolBarComponent);
|
|
1209
|
-
|
|
1210
377
|
let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
|
|
1211
378
|
constructor(focusManager) {
|
|
1212
379
|
super();
|
|
@@ -1300,7 +467,6 @@ FocusableComponent = __decorate([
|
|
|
1300
467
|
let AbstractInputComponent = class AbstractInputComponent extends DisposableComponent {
|
|
1301
468
|
constructor() {
|
|
1302
469
|
super();
|
|
1303
|
-
this.onValueEditedListeners = new EventListenerList();
|
|
1304
470
|
this.dense = false;
|
|
1305
471
|
// TODO: fix this.
|
|
1306
472
|
// tslint:disable-next-line:no-output-native
|
|
@@ -1349,19 +515,19 @@ let AbstractInputComponent = class AbstractInputComponent extends DisposableComp
|
|
|
1349
515
|
return this.enabled.value;
|
|
1350
516
|
}
|
|
1351
517
|
get enabled() {
|
|
1352
|
-
return this.
|
|
518
|
+
return this.inputModel.enabled;
|
|
1353
519
|
}
|
|
1354
520
|
hasErrors() {
|
|
1355
521
|
return !this.errorList.query().isEmpty();
|
|
1356
522
|
}
|
|
1357
523
|
get errorList() {
|
|
1358
|
-
return this.
|
|
524
|
+
return this.inputModel.errorList;
|
|
1359
525
|
}
|
|
1360
526
|
get firstError() {
|
|
1361
527
|
return this.hasErrors() ? this.errorList.value[0] : null;
|
|
1362
528
|
}
|
|
1363
529
|
get focusContext() {
|
|
1364
|
-
return this.
|
|
530
|
+
return this.inputModel.focusContext;
|
|
1365
531
|
}
|
|
1366
532
|
get floatLabel() {
|
|
1367
533
|
return this.dense ? 'never' : this.userFloatLabel;
|
|
@@ -1369,13 +535,6 @@ let AbstractInputComponent = class AbstractInputComponent extends DisposableComp
|
|
|
1369
535
|
get showHint() {
|
|
1370
536
|
return this.dense ? false : !!this.hint;
|
|
1371
537
|
}
|
|
1372
|
-
/**
|
|
1373
|
-
* Invokes the callback when this components value is changed by a user edit.
|
|
1374
|
-
* @param callback
|
|
1375
|
-
*/
|
|
1376
|
-
onValueEdited(callback) {
|
|
1377
|
-
return this.onValueEditedListeners.add(callback);
|
|
1378
|
-
}
|
|
1379
538
|
};
|
|
1380
539
|
__decorate([
|
|
1381
540
|
Input(),
|
|
@@ -1463,7 +622,7 @@ AbstractInputComponent = __decorate([
|
|
|
1463
622
|
|
|
1464
623
|
let AbstractListInputComponent = class AbstractListInputComponent extends AbstractInputComponent {
|
|
1465
624
|
constructor() {
|
|
1466
|
-
super();
|
|
625
|
+
super(...arguments);
|
|
1467
626
|
/**
|
|
1468
627
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1469
628
|
*
|
|
@@ -1475,56 +634,11 @@ let AbstractListInputComponent = class AbstractListInputComponent extends Abstra
|
|
|
1475
634
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1476
635
|
*/
|
|
1477
636
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1478
|
-
this.
|
|
1479
|
-
this.componentListModel = new MutableListModel();
|
|
1480
|
-
this.setValueIsInProgress = new Guard();
|
|
1481
|
-
this.valueChange = new EventEmitter();
|
|
1482
|
-
const { when, valueOf, chain } = Dsl.disposeWith(this);
|
|
1483
|
-
const binding = new Binding.Identity(this.formValueModel, this.componentListModel).writeRight();
|
|
1484
|
-
const inExternalChange = valueOf.any(this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1485
|
-
when(this.componentListModel).changes((is, was) => {
|
|
1486
|
-
this.valueChange.emit(is);
|
|
1487
|
-
this.onValueEditedListeners.fire(l => l(is, was));
|
|
1488
|
-
}, {
|
|
1489
|
-
initialValue: 'ignore',
|
|
1490
|
-
// we never fire events during an external changes to the value. This allows
|
|
1491
|
-
// the component to behave when used in the conventional angular
|
|
1492
|
-
// fashion, i.e. [(value)]="..."
|
|
1493
|
-
unless: inExternalChange
|
|
1494
|
-
});
|
|
1495
|
-
DebugContext.tag(this.formValueModel, `${this.constructor.name}.formValueModel`);
|
|
1496
|
-
}
|
|
1497
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1498
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1499
|
-
// and the like.
|
|
1500
|
-
set value(value) {
|
|
1501
|
-
this.setValueIsInProgress.whileTrue(() => {
|
|
1502
|
-
if (!this.listHolder) {
|
|
1503
|
-
this.listHolder = new MutableListModel(value);
|
|
1504
|
-
this.listModel = this.listHolder;
|
|
1505
|
-
}
|
|
1506
|
-
else {
|
|
1507
|
-
this.listHolder.value = value;
|
|
1508
|
-
}
|
|
1509
|
-
});
|
|
637
|
+
this.inputModel = this.registerDisposable(new Form.DelegatingListModel());
|
|
1510
638
|
}
|
|
1511
639
|
};
|
|
1512
|
-
__decorate([
|
|
1513
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1514
|
-
__metadata("design:type", Object)
|
|
1515
|
-
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
1516
|
-
__decorate([
|
|
1517
|
-
Input(),
|
|
1518
|
-
__metadata("design:type", Array),
|
|
1519
|
-
__metadata("design:paramtypes", [Array])
|
|
1520
|
-
], AbstractListInputComponent.prototype, "value", null);
|
|
1521
|
-
__decorate([
|
|
1522
|
-
Output(),
|
|
1523
|
-
__metadata("design:type", Object)
|
|
1524
|
-
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
1525
640
|
AbstractListInputComponent = __decorate([
|
|
1526
|
-
Component({ template: '' })
|
|
1527
|
-
__metadata("design:paramtypes", [])
|
|
641
|
+
Component({ template: '' })
|
|
1528
642
|
], AbstractListInputComponent);
|
|
1529
643
|
|
|
1530
644
|
let AbstractValueInputComponent = class AbstractValueInputComponent extends AbstractInputComponent {
|
|
@@ -1532,142 +646,36 @@ let AbstractValueInputComponent = class AbstractValueInputComponent extends Abst
|
|
|
1532
646
|
super();
|
|
1533
647
|
/**
|
|
1534
648
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1535
|
-
*
|
|
1536
|
-
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1537
|
-
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
1538
|
-
*
|
|
1539
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1540
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1541
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1542
|
-
*/
|
|
1543
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1544
|
-
this.
|
|
1545
|
-
this.setValueInProgress = new Guard();
|
|
1546
|
-
this.componentValueModel = new MutableValueModel();
|
|
1547
|
-
this.valueChange = new EventEmitter();
|
|
1548
|
-
const { when, chain, valueOf } = Dsl.disposeWith(this);
|
|
1549
|
-
const binding = new Binding.Identity(this.formValueModel, this.componentValueModel).writeRight();
|
|
1550
|
-
const inExternalChange = valueOf.any(this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1551
|
-
when(this.componentValueModel).changes((is, was) => {
|
|
1552
|
-
this.valueChange.emit(is);
|
|
1553
|
-
this.onValueEditedListeners.fire(l => l(is, was));
|
|
1554
|
-
}, {
|
|
1555
|
-
initialValue: 'ignore',
|
|
1556
|
-
// we never fire events during an external set value operation. This allows
|
|
1557
|
-
// the component to behave when used in the conventional angular
|
|
1558
|
-
// fashion, i.e. [(value)]="..."
|
|
1559
|
-
unless: inExternalChange
|
|
1560
|
-
});
|
|
1561
|
-
DebugContext.tag(this.formValueModel, `${this.constructor.name}.formValueModel`);
|
|
1562
|
-
}
|
|
1563
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1564
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1565
|
-
// and the like.
|
|
1566
|
-
set value(value) {
|
|
1567
|
-
this.setValueInProgress.whileTrue(() => {
|
|
1568
|
-
if (!this.plainValueHolder) {
|
|
1569
|
-
this.plainValueHolder = new MutableValueModel(value);
|
|
1570
|
-
this.valueModel = this.plainValueHolder;
|
|
1571
|
-
}
|
|
1572
|
-
else {
|
|
1573
|
-
this.plainValueHolder.value = value;
|
|
1574
|
-
}
|
|
1575
|
-
});
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
__decorate([
|
|
1579
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1580
|
-
__metadata("design:type", Object)
|
|
1581
|
-
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
1582
|
-
__decorate([
|
|
1583
|
-
Input(),
|
|
1584
|
-
__metadata("design:type", Object),
|
|
1585
|
-
__metadata("design:paramtypes", [Object])
|
|
1586
|
-
], AbstractValueInputComponent.prototype, "value", null);
|
|
1587
|
-
__decorate([
|
|
1588
|
-
Output(),
|
|
1589
|
-
__metadata("design:type", Object)
|
|
1590
|
-
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
1591
|
-
AbstractValueInputComponent = __decorate([
|
|
1592
|
-
Component({ template: '' }),
|
|
1593
|
-
__metadata("design:paramtypes", [])
|
|
1594
|
-
], AbstractValueInputComponent);
|
|
1595
|
-
|
|
1596
|
-
/**
|
|
1597
|
-
* Using templates (not only supported for nil values:
|
|
1598
|
-
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
1599
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1600
|
-
* </aup-autocomplete-input>
|
|
1601
|
-
*/
|
|
1602
|
-
let AutocompleteInputComponent = class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
1603
|
-
constructor() {
|
|
1604
|
-
super();
|
|
1605
|
-
this.filterValue = new MutableValueModel();
|
|
1606
|
-
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
1607
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1608
|
-
const lowerCaseFilterValue = chain(this.filterValue)
|
|
1609
|
-
.map(v => ___default.isString(v) ? v.toLowerCase() : '');
|
|
1610
|
-
this.filteredOptions = chain(this.optionsModel)
|
|
1611
|
-
.select(option => {
|
|
1612
|
-
return ___default.isEmpty(this.filterValue.value) || this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
1613
|
-
}, { dependsOn: lowerCaseFilterValue });
|
|
1614
|
-
}
|
|
1615
|
-
ngOnInit() {
|
|
1616
|
-
}
|
|
1617
|
-
formatOption(option) {
|
|
1618
|
-
return this.optionLabelFormat(option);
|
|
1619
|
-
}
|
|
1620
|
-
updateFilter($event) {
|
|
1621
|
-
this.filterValue.value = $event;
|
|
1622
|
-
}
|
|
1623
|
-
onSelect($event) {
|
|
1624
|
-
this.valueModel.value = $event.option.value;
|
|
649
|
+
*
|
|
650
|
+
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
651
|
+
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
652
|
+
*
|
|
653
|
+
* This approach allows the input to accept plain or form models but all backed by a form
|
|
654
|
+
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
655
|
+
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
656
|
+
*/
|
|
657
|
+
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
658
|
+
this.inputModel = this.registerDisposable(new Form.DelegatingValueModel());
|
|
1625
659
|
}
|
|
1626
660
|
};
|
|
1627
|
-
__decorate([
|
|
1628
|
-
|
|
1629
|
-
__metadata("design:type", ListModel)
|
|
1630
|
-
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
1631
|
-
__decorate([
|
|
1632
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1633
|
-
__metadata("design:type", Array)
|
|
1634
|
-
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
1635
|
-
__decorate([
|
|
1636
|
-
Input(),
|
|
1637
|
-
__metadata("design:type", Object)
|
|
1638
|
-
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
1639
|
-
__decorate([
|
|
1640
|
-
Input(),
|
|
1641
|
-
__metadata("design:type", Boolean)
|
|
1642
|
-
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
1643
|
-
__decorate([
|
|
1644
|
-
ContentChild('nilOptionTemplate'),
|
|
1645
|
-
__metadata("design:type", TemplateRef)
|
|
1646
|
-
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1647
|
-
__decorate([
|
|
1648
|
-
Input(),
|
|
1649
|
-
__metadata("design:type", Function)
|
|
1650
|
-
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1651
|
-
AutocompleteInputComponent = __decorate([
|
|
1652
|
-
Component({
|
|
1653
|
-
selector: 'aup-autocomplete-input',
|
|
1654
|
-
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",
|
|
1655
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1656
|
-
}),
|
|
661
|
+
AbstractValueInputComponent = __decorate([
|
|
662
|
+
Component({ template: '' }),
|
|
1657
663
|
__metadata("design:paramtypes", [])
|
|
1658
|
-
],
|
|
664
|
+
], AbstractValueInputComponent);
|
|
1659
665
|
|
|
1660
666
|
let CheckboxInputComponent = class CheckboxInputComponent extends AbstractValueInputComponent {
|
|
1661
667
|
constructor() {
|
|
1662
668
|
super();
|
|
1663
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1664
|
-
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
1665
669
|
this.color = 'accent';
|
|
1666
670
|
this.labelPosition = 'after';
|
|
1667
671
|
}
|
|
1668
672
|
ngOnInit() {
|
|
1669
673
|
}
|
|
1670
674
|
};
|
|
675
|
+
__decorate([
|
|
676
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
677
|
+
__metadata("design:type", Object)
|
|
678
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1671
679
|
__decorate([
|
|
1672
680
|
Input(),
|
|
1673
681
|
__metadata("design:type", String)
|
|
@@ -1679,67 +687,25 @@ __decorate([
|
|
|
1679
687
|
CheckboxInputComponent = __decorate([
|
|
1680
688
|
Component({
|
|
1681
689
|
selector: 'aup-checkbox-input',
|
|
1682
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
690
|
+
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",
|
|
1683
691
|
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}"]
|
|
1684
692
|
}),
|
|
1685
693
|
__metadata("design:paramtypes", [])
|
|
1686
694
|
], CheckboxInputComponent);
|
|
1687
695
|
|
|
1688
|
-
/**
|
|
1689
|
-
* Using templates:
|
|
1690
|
-
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1691
|
-
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1692
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1693
|
-
* </aup-multiple-select_input>
|
|
1694
|
-
*/
|
|
1695
|
-
let MultipleSelectInputComponent = class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
1696
|
-
constructor() {
|
|
1697
|
-
super();
|
|
1698
|
-
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
1699
|
-
}
|
|
1700
|
-
ngOnInit() {
|
|
1701
|
-
}
|
|
1702
|
-
};
|
|
1703
|
-
__decorate([
|
|
1704
|
-
Input(), TrackExternal(),
|
|
1705
|
-
__metadata("design:type", ListModel)
|
|
1706
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
1707
|
-
__decorate([
|
|
1708
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1709
|
-
__metadata("design:type", Array)
|
|
1710
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
1711
|
-
__decorate([
|
|
1712
|
-
Input(),
|
|
1713
|
-
__metadata("design:type", Object)
|
|
1714
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
1715
|
-
__decorate([
|
|
1716
|
-
ContentChild('optionTemplate'),
|
|
1717
|
-
__metadata("design:type", TemplateRef)
|
|
1718
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1719
|
-
__decorate([
|
|
1720
|
-
Input(),
|
|
1721
|
-
__metadata("design:type", Function)
|
|
1722
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1723
|
-
MultipleSelectInputComponent = __decorate([
|
|
1724
|
-
Component({
|
|
1725
|
-
selector: 'aup-multiple-select-input',
|
|
1726
|
-
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",
|
|
1727
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1728
|
-
}),
|
|
1729
|
-
__metadata("design:paramtypes", [])
|
|
1730
|
-
], MultipleSelectInputComponent);
|
|
1731
|
-
|
|
1732
696
|
let NumberInputComponent = class NumberInputComponent extends AbstractValueInputComponent {
|
|
1733
697
|
constructor() {
|
|
1734
698
|
super();
|
|
1735
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1736
|
-
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
1737
699
|
this.min = Number.MIN_SAFE_INTEGER;
|
|
1738
700
|
this.max = Number.MAX_SAFE_INTEGER;
|
|
1739
701
|
}
|
|
1740
702
|
ngOnInit() {
|
|
1741
703
|
}
|
|
1742
704
|
};
|
|
705
|
+
__decorate([
|
|
706
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
707
|
+
__metadata("design:type", Object)
|
|
708
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
1743
709
|
__decorate([
|
|
1744
710
|
Input(),
|
|
1745
711
|
__metadata("design:type", Object)
|
|
@@ -1751,25 +717,27 @@ __decorate([
|
|
|
1751
717
|
NumberInputComponent = __decorate([
|
|
1752
718
|
Component({
|
|
1753
719
|
selector: 'aup-number-input',
|
|
1754
|
-
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)]=\"
|
|
720
|
+
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",
|
|
1755
721
|
styles: [""]
|
|
1756
722
|
}),
|
|
1757
723
|
__metadata("design:paramtypes", [])
|
|
1758
724
|
], NumberInputComponent);
|
|
1759
725
|
|
|
1760
726
|
let PasswordInputComponent = class PasswordInputComponent extends AbstractValueInputComponent {
|
|
1761
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1762
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1763
727
|
constructor() {
|
|
1764
728
|
super();
|
|
1765
729
|
}
|
|
1766
730
|
ngOnInit() {
|
|
1767
731
|
}
|
|
1768
732
|
};
|
|
733
|
+
__decorate([
|
|
734
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
735
|
+
__metadata("design:type", Object)
|
|
736
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
1769
737
|
PasswordInputComponent = __decorate([
|
|
1770
738
|
Component({
|
|
1771
739
|
selector: 'aup-password-input',
|
|
1772
|
-
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)]=\"
|
|
740
|
+
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",
|
|
1773
741
|
styles: [""]
|
|
1774
742
|
}),
|
|
1775
743
|
__metadata("design:paramtypes", [])
|
|
@@ -1779,7 +747,6 @@ PasswordInputComponent = __decorate([
|
|
|
1779
747
|
* Using templates:
|
|
1780
748
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1781
749
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1782
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1783
750
|
* </aup-select_input>
|
|
1784
751
|
*/
|
|
1785
752
|
let SelectInputComponent = class SelectInputComponent extends AbstractValueInputComponent {
|
|
@@ -1790,6 +757,10 @@ let SelectInputComponent = class SelectInputComponent extends AbstractValueInput
|
|
|
1790
757
|
ngOnInit() {
|
|
1791
758
|
}
|
|
1792
759
|
};
|
|
760
|
+
__decorate([
|
|
761
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
762
|
+
__metadata("design:type", Object)
|
|
763
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1793
764
|
__decorate([
|
|
1794
765
|
Input(), TrackExternal(),
|
|
1795
766
|
__metadata("design:type", ListModel)
|
|
@@ -1821,7 +792,7 @@ __decorate([
|
|
|
1821
792
|
SelectInputComponent = __decorate([
|
|
1822
793
|
Component({
|
|
1823
794
|
selector: 'aup-select-input',
|
|
1824
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
795
|
+
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",
|
|
1825
796
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1826
797
|
}),
|
|
1827
798
|
__metadata("design:paramtypes", [])
|
|
@@ -1832,13 +803,17 @@ let StringInputComponent = class StringInputComponent extends AbstractValueInput
|
|
|
1832
803
|
super();
|
|
1833
804
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1834
805
|
this.clearCommand = Command.create(() => {
|
|
1835
|
-
this.
|
|
806
|
+
this.valueModel.value = null;
|
|
1836
807
|
});
|
|
1837
|
-
this.clearCommand.disableWhile(chain.stringValue(this.
|
|
808
|
+
this.clearCommand.disableWhile(chain.stringValue(this.valueModel).isBlank());
|
|
1838
809
|
}
|
|
1839
810
|
ngOnInit() {
|
|
1840
811
|
}
|
|
1841
812
|
};
|
|
813
|
+
__decorate([
|
|
814
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
815
|
+
__metadata("design:type", Object)
|
|
816
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
1842
817
|
__decorate([
|
|
1843
818
|
Input(), TrackExternal({ defaultValue: false }),
|
|
1844
819
|
__metadata("design:type", ValueModel)
|
|
@@ -1850,7 +825,7 @@ __decorate([
|
|
|
1850
825
|
StringInputComponent = __decorate([
|
|
1851
826
|
Component({
|
|
1852
827
|
selector: 'aup-string-input',
|
|
1853
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
828
|
+
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",
|
|
1854
829
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1855
830
|
}),
|
|
1856
831
|
__metadata("design:paramtypes", [])
|
|
@@ -1859,14 +834,16 @@ StringInputComponent = __decorate([
|
|
|
1859
834
|
let TextInputComponent = class TextInputComponent extends AbstractValueInputComponent {
|
|
1860
835
|
constructor() {
|
|
1861
836
|
super();
|
|
1862
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1863
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1864
837
|
this.rows = 2;
|
|
1865
838
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1866
839
|
}
|
|
1867
840
|
ngOnInit() {
|
|
1868
841
|
}
|
|
1869
842
|
};
|
|
843
|
+
__decorate([
|
|
844
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
845
|
+
__metadata("design:type", Object)
|
|
846
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1870
847
|
__decorate([
|
|
1871
848
|
Input(),
|
|
1872
849
|
__metadata("design:type", Object)
|
|
@@ -1878,59 +855,12 @@ __decorate([
|
|
|
1878
855
|
TextInputComponent = __decorate([
|
|
1879
856
|
Component({
|
|
1880
857
|
selector: 'aup-text-input',
|
|
1881
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
858
|
+
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",
|
|
1882
859
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1883
860
|
}),
|
|
1884
861
|
__metadata("design:paramtypes", [])
|
|
1885
862
|
], TextInputComponent);
|
|
1886
863
|
|
|
1887
|
-
var IconComponent_1;
|
|
1888
|
-
let IconComponent = IconComponent_1 = class IconComponent {
|
|
1889
|
-
constructor() {
|
|
1890
|
-
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(p => `${p}:`);
|
|
1891
|
-
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1892
|
-
}
|
|
1893
|
-
set icon(iconName) {
|
|
1894
|
-
this._icon = iconName;
|
|
1895
|
-
if (!iconName) {
|
|
1896
|
-
this.errorMessage = 'icon is nil';
|
|
1897
|
-
this.prefix = undefined;
|
|
1898
|
-
return;
|
|
1899
|
-
}
|
|
1900
|
-
const colonIndex = iconName.indexOf(':');
|
|
1901
|
-
if (colonIndex > 0) {
|
|
1902
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
1903
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1904
|
-
}
|
|
1905
|
-
if (this.prefix) {
|
|
1906
|
-
this.errorMessage = `Unknown icon "${iconName}"`;
|
|
1907
|
-
}
|
|
1908
|
-
this.errorMessage = `Unknown icon prefix, expected one of [${this.allowedPrefixes.join(',')}] got "${this.prefix}:"`;
|
|
1909
|
-
}
|
|
1910
|
-
get icon() {
|
|
1911
|
-
return this._icon;
|
|
1912
|
-
}
|
|
1913
|
-
};
|
|
1914
|
-
__decorate([
|
|
1915
|
-
Input(),
|
|
1916
|
-
__metadata("design:type", String),
|
|
1917
|
-
__metadata("design:paramtypes", [String])
|
|
1918
|
-
], IconComponent.prototype, "icon", null);
|
|
1919
|
-
IconComponent = IconComponent_1 = __decorate([
|
|
1920
|
-
Component({
|
|
1921
|
-
selector: 'aup-icon',
|
|
1922
|
-
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",
|
|
1923
|
-
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}"]
|
|
1924
|
-
})
|
|
1925
|
-
], IconComponent);
|
|
1926
|
-
(function (IconComponent) {
|
|
1927
|
-
IconComponent.IconPrefix = Enum({
|
|
1928
|
-
SVG: 'svg',
|
|
1929
|
-
FONT_AWESOME: 'fa',
|
|
1930
|
-
MATERIAL: 'mat'
|
|
1931
|
-
});
|
|
1932
|
-
})(IconComponent || (IconComponent = {}));
|
|
1933
|
-
|
|
1934
864
|
let NoopComponent = class NoopComponent {
|
|
1935
865
|
constructor() {
|
|
1936
866
|
}
|
|
@@ -2115,7 +1045,6 @@ class CellHeaderPortalRef extends CellPortalRef {
|
|
|
2115
1045
|
assert$1.isTruthy(host);
|
|
2116
1046
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
2117
1047
|
}
|
|
2118
|
-
// @Trace()
|
|
2119
1048
|
onPortalAttached(host, portalComponent) {
|
|
2120
1049
|
this.initialiseHeader(portalComponent, host.column);
|
|
2121
1050
|
}
|
|
@@ -2131,15 +1060,13 @@ class ComponentCellRendererPortalRef extends CellRendererPortalRef {
|
|
|
2131
1060
|
initialiseHost(host, columnModel) {
|
|
2132
1061
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
2133
1062
|
}
|
|
2134
|
-
// @Trace()
|
|
2135
1063
|
onPortalAttached(host, portalComponent) {
|
|
2136
1064
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
2137
|
-
this.updateComponent(portalComponent, host.getRowData()
|
|
1065
|
+
this.updateComponent(portalComponent, host.getRowData());
|
|
2138
1066
|
}
|
|
2139
|
-
// @Trace()
|
|
2140
1067
|
pushState(host) {
|
|
2141
1068
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
2142
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData()
|
|
1069
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
2143
1070
|
}
|
|
2144
1071
|
}
|
|
2145
1072
|
}
|
|
@@ -2176,7 +1103,6 @@ class TemplateCellRendererPortalRef extends CellRendererPortalRef {
|
|
|
2176
1103
|
onPortalAttached(host, portalComponent) {
|
|
2177
1104
|
// don't care
|
|
2178
1105
|
}
|
|
2179
|
-
// @Trace()
|
|
2180
1106
|
pushState(host) {
|
|
2181
1107
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
2182
1108
|
host.fillCell = this.fillCell;
|
|
@@ -2344,8 +1270,7 @@ SelectHeaderCellRendererComponent = __decorate([
|
|
|
2344
1270
|
|
|
2345
1271
|
const noop = () => {
|
|
2346
1272
|
};
|
|
2347
|
-
const ɵ0
|
|
2348
|
-
const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1273
|
+
const ɵ0 = noop;
|
|
2349
1274
|
class ColumnModel {
|
|
2350
1275
|
constructor(columnId, defaults) {
|
|
2351
1276
|
this.columnId = columnId;
|
|
@@ -2434,62 +1359,21 @@ __decorate([
|
|
|
2434
1359
|
__metadata("design:returntype", Object)
|
|
2435
1360
|
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
2436
1361
|
class PropertyColumnModel extends ColumnModel {
|
|
2437
|
-
constructor(
|
|
2438
|
-
super(
|
|
1362
|
+
constructor(property, defaults) {
|
|
1363
|
+
super(property.toString(), defaults);
|
|
2439
1364
|
this.property = property;
|
|
2440
1365
|
this._format = (value) => value;
|
|
2441
1366
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
2442
1367
|
}
|
|
2443
|
-
cellRenderer(componentType
|
|
2444
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData
|
|
2445
|
-
if (firstTime) {
|
|
2446
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2447
|
-
onComponentInitOrOptions(component);
|
|
2448
|
-
}
|
|
2449
|
-
else {
|
|
2450
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2451
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
1368
|
+
cellRenderer(componentType) {
|
|
1369
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
2455
1370
|
component.value = this._format(rowData.row[this.property]);
|
|
2456
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2457
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2458
|
-
}
|
|
2459
|
-
}));
|
|
2460
|
-
return this;
|
|
2461
|
-
}
|
|
2462
|
-
mutableCellRenderer(componentType, options) {
|
|
2463
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
2464
|
-
// keep a local copy most recent row value so it's available to teh
|
|
2465
|
-
// edit callback without having to add/remove subscribers all the time.
|
|
2466
|
-
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2467
|
-
let disableEditCallback = false;
|
|
2468
|
-
if (firstTime) {
|
|
2469
|
-
if (___default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2470
|
-
options.onComponentInit(component);
|
|
2471
|
-
}
|
|
2472
|
-
// install our edit callback
|
|
2473
|
-
component.onValueEdited((is, was) => {
|
|
2474
|
-
if (!disableEditCallback) {
|
|
2475
|
-
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2476
|
-
}
|
|
2477
|
-
});
|
|
2478
|
-
}
|
|
2479
|
-
// now push the value the component and disable the callback just incase the component misbehaves
|
|
2480
|
-
// and fires a value change during the operation.
|
|
2481
|
-
disableEditCallback = true;
|
|
2482
|
-
component.value = rowData.row[this.property];
|
|
2483
|
-
disableEditCallback = false;
|
|
2484
|
-
if (!___default.isFunction(options) && ___default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
2485
|
-
options.onRowUpdate(component, rowData.row);
|
|
2486
|
-
}
|
|
2487
1371
|
}));
|
|
2488
1372
|
return this;
|
|
2489
1373
|
}
|
|
2490
|
-
cellEditor(editor, validatorsOrInitialiser,
|
|
1374
|
+
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2491
1375
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2492
|
-
const initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
1376
|
+
const initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2493
1377
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
2494
1378
|
const formValueModel = editSession.form.pluck(this.property);
|
|
2495
1379
|
if (validators) {
|
|
@@ -2512,8 +1396,8 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2512
1396
|
}
|
|
2513
1397
|
}
|
|
2514
1398
|
class ListPropertyColumnModel extends ColumnModel {
|
|
2515
|
-
constructor(
|
|
2516
|
-
super(
|
|
1399
|
+
constructor(property, defaults) {
|
|
1400
|
+
super(property.toString(), defaults);
|
|
2517
1401
|
this.property = property;
|
|
2518
1402
|
this._format = (value) => value.map(v => v === null || v === void 0 ? void 0 : v.toString()).join(', ');
|
|
2519
1403
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -2554,22 +1438,9 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
2554
1438
|
this.getValue = getValue;
|
|
2555
1439
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
2556
1440
|
}
|
|
2557
|
-
cellRenderer(componentType
|
|
2558
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData
|
|
2559
|
-
if (firstTime) {
|
|
2560
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2561
|
-
onComponentInitOrOptions(component);
|
|
2562
|
-
}
|
|
2563
|
-
else {
|
|
2564
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2565
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
1441
|
+
cellRenderer(componentType) {
|
|
1442
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
2569
1443
|
component.value = this.getValue(rowData.row);
|
|
2570
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2571
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2572
|
-
}
|
|
2573
1444
|
}));
|
|
2574
1445
|
return this;
|
|
2575
1446
|
}
|
|
@@ -2731,9 +1602,6 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2731
1602
|
this._editorSessions = new MutableListModel();
|
|
2732
1603
|
this.rowClassNamePredicates = [];
|
|
2733
1604
|
this._createForm = (row) => new DirtyTrackingForm();
|
|
2734
|
-
this.trackBy = (index, item) => {
|
|
2735
|
-
return this.identityOf ? this.identityOf(item) : index;
|
|
2736
|
-
};
|
|
2737
1605
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2738
1606
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this._garbage);
|
|
2739
1607
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2745,7 +1613,7 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2745
1613
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2746
1614
|
this.firstEditableColumn = chain(this.columns).select(c => c.hasEditorPortal()).first();
|
|
2747
1615
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(column => column.isRowSelectionExplicitlyEnabled()).isGreaterThanOrEqualTo(0);
|
|
2748
|
-
this.addRowClass(
|
|
1616
|
+
this.addRowClass("enable-hover", () => this.isRowSelectionEnabled());
|
|
2749
1617
|
}
|
|
2750
1618
|
static fromList(sourceOfTruth, builder) {
|
|
2751
1619
|
const model = new TableModel_1(sourceOfTruth);
|
|
@@ -2755,14 +1623,19 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2755
1623
|
get rowsBeingEdited() {
|
|
2756
1624
|
return this._rowsBeingEdited.readonly;
|
|
2757
1625
|
}
|
|
1626
|
+
getTrackByFunction() {
|
|
1627
|
+
return (index, item) => {
|
|
1628
|
+
return this.identityOf ? this.identityOf(item) : index;
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
2758
1631
|
get columns() {
|
|
2759
1632
|
return this._columns.readonly;
|
|
2760
1633
|
}
|
|
2761
|
-
pluck(property
|
|
2762
|
-
return this.addColumn(new PropertyColumnModel(
|
|
1634
|
+
pluck(property) {
|
|
1635
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2763
1636
|
}
|
|
2764
|
-
pluckList(property
|
|
2765
|
-
return this.addColumn(new ListPropertyColumnModel(
|
|
1637
|
+
pluckList(property) {
|
|
1638
|
+
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2766
1639
|
}
|
|
2767
1640
|
addSelectionColumn(selectionModel) {
|
|
2768
1641
|
assert.isNil(this.selectionColumnModel);
|
|
@@ -2776,9 +1649,6 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2776
1649
|
addCustomColumn(columnId, dataAccessor) {
|
|
2777
1650
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2778
1651
|
}
|
|
2779
|
-
addComponentColumn(columnId, component, onComponentInitOrOptions) {
|
|
2780
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, row => row)).cellRenderer(component, onComponentInitOrOptions);
|
|
2781
|
-
}
|
|
2782
1652
|
addTemplateColumn(columnId) {
|
|
2783
1653
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2784
1654
|
}
|
|
@@ -2807,14 +1677,12 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2807
1677
|
}
|
|
2808
1678
|
return column;
|
|
2809
1679
|
}
|
|
2810
|
-
// removeColumn(column: ColumnModel<Row>) {
|
|
2811
|
-
//
|
|
2812
|
-
// }
|
|
2813
1680
|
columnTextProperties(columnTextProperties) {
|
|
2814
1681
|
this._columnTextPropertiesLookup = columnTextProperties;
|
|
2815
1682
|
}
|
|
2816
1683
|
getColumnTextProperties(column) {
|
|
2817
|
-
|
|
1684
|
+
const factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
|
|
1685
|
+
return factory ? factory() : undefined;
|
|
2818
1686
|
}
|
|
2819
1687
|
startEditSession(row) {
|
|
2820
1688
|
const rowId = this.identityOf(row);
|
|
@@ -2928,7 +1796,7 @@ __decorate([
|
|
|
2928
1796
|
TableComponent = __decorate([
|
|
2929
1797
|
Component({
|
|
2930
1798
|
selector: 'aup-table',
|
|
2931
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.
|
|
1799
|
+
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",
|
|
2932
1800
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2933
1801
|
}),
|
|
2934
1802
|
__metadata("design:paramtypes", [])
|
|
@@ -3103,73 +1971,6 @@ TableHeaderCellRendererComponent = __decorate([
|
|
|
3103
1971
|
__metadata("design:paramtypes", [])
|
|
3104
1972
|
], TableHeaderCellRendererComponent);
|
|
3105
1973
|
|
|
3106
|
-
class MenuItemData {
|
|
3107
|
-
constructor(factory, face) {
|
|
3108
|
-
this.factory = factory;
|
|
3109
|
-
this.face = face;
|
|
3110
|
-
}
|
|
3111
|
-
}
|
|
3112
|
-
/**
|
|
3113
|
-
*
|
|
3114
|
-
*/
|
|
3115
|
-
let TableRowMenuComponent = class TableRowMenuComponent extends DisposableComponent {
|
|
3116
|
-
constructor() {
|
|
3117
|
-
super();
|
|
3118
|
-
this.actions = [];
|
|
3119
|
-
this.moreActions = [];
|
|
3120
|
-
}
|
|
3121
|
-
registerAction(commandFactory, properties) {
|
|
3122
|
-
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
3123
|
-
}
|
|
3124
|
-
registerMoreAction(commandFactory, properties) {
|
|
3125
|
-
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3126
|
-
}
|
|
3127
|
-
ngOnInit() {
|
|
3128
|
-
}
|
|
3129
|
-
createMoreMenuCommand(item, value) {
|
|
3130
|
-
const { when } = Dsl.disposeWith(this);
|
|
3131
|
-
const command = item.factory.create(value);
|
|
3132
|
-
when(command.busy).becomesFalsey(() => {
|
|
3133
|
-
this.closeMoreMenu();
|
|
3134
|
-
});
|
|
3135
|
-
return command;
|
|
3136
|
-
}
|
|
3137
|
-
closeMoreMenu() {
|
|
3138
|
-
this.menu.closeMenu();
|
|
3139
|
-
}
|
|
3140
|
-
};
|
|
3141
|
-
__decorate([
|
|
3142
|
-
Input(),
|
|
3143
|
-
__metadata("design:type", Object)
|
|
3144
|
-
], TableRowMenuComponent.prototype, "value", void 0);
|
|
3145
|
-
__decorate([
|
|
3146
|
-
ViewChild(MatMenuTrigger),
|
|
3147
|
-
__metadata("design:type", MatMenuTrigger)
|
|
3148
|
-
], TableRowMenuComponent.prototype, "menu", void 0);
|
|
3149
|
-
TableRowMenuComponent = __decorate([
|
|
3150
|
-
Component({
|
|
3151
|
-
selector: 'aup-table-row-menu',
|
|
3152
|
-
template: `
|
|
3153
|
-
<aup-tool-bar>
|
|
3154
|
-
<aup-command *ngFor="let action of actions" [command]="action.factory.create(value)"
|
|
3155
|
-
[face]="action.faceModel"></aup-command>
|
|
3156
|
-
</aup-tool-bar>
|
|
3157
|
-
<ng-container *ngIf="moreActions.length > 0">
|
|
3158
|
-
<aup-more-menu>
|
|
3159
|
-
<aup-command *ngFor="let action of moreActions" [command]="action.factory.create(value)"
|
|
3160
|
-
[face]="action.faceModel"></aup-command>
|
|
3161
|
-
</aup-more-menu>
|
|
3162
|
-
</ng-container>
|
|
3163
|
-
`,
|
|
3164
|
-
styles: [`:host {
|
|
3165
|
-
display: inline-flex;
|
|
3166
|
-
flex-direction: row;
|
|
3167
|
-
align-items: center;
|
|
3168
|
-
}`]
|
|
3169
|
-
}),
|
|
3170
|
-
__metadata("design:paramtypes", [])
|
|
3171
|
-
], TableRowMenuComponent);
|
|
3172
|
-
|
|
3173
1974
|
let VerticalFocusContainerComponent = class VerticalFocusContainerComponent extends FocusContainerComponent {
|
|
3174
1975
|
constructor(focusManager) {
|
|
3175
1976
|
super(focusManager);
|
|
@@ -3234,23 +2035,107 @@ __decorate([
|
|
|
3234
2035
|
__metadata("design:returntype", void 0)
|
|
3235
2036
|
], VerticalFocusContainerComponent.prototype, "arrowDown", null);
|
|
3236
2037
|
__decorate([
|
|
3237
|
-
HostListener('keyup.arrowUp', ['$event']),
|
|
3238
|
-
__metadata("design:type", Function),
|
|
3239
|
-
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3240
|
-
__metadata("design:returntype", void 0)
|
|
3241
|
-
], VerticalFocusContainerComponent.prototype, "arrowUp", null);
|
|
3242
|
-
VerticalFocusContainerComponent = __decorate([
|
|
2038
|
+
HostListener('keyup.arrowUp', ['$event']),
|
|
2039
|
+
__metadata("design:type", Function),
|
|
2040
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
2041
|
+
__metadata("design:returntype", void 0)
|
|
2042
|
+
], VerticalFocusContainerComponent.prototype, "arrowUp", null);
|
|
2043
|
+
VerticalFocusContainerComponent = __decorate([
|
|
2044
|
+
Component({
|
|
2045
|
+
selector: 'aup-vertical-focus-container',
|
|
2046
|
+
template: "<ng-content></ng-content>\n",
|
|
2047
|
+
providers: [
|
|
2048
|
+
{ provide: FocusManager }
|
|
2049
|
+
],
|
|
2050
|
+
styles: [":host{display:block}"]
|
|
2051
|
+
}),
|
|
2052
|
+
__param(0, Self()),
|
|
2053
|
+
__metadata("design:paramtypes", [FocusManager])
|
|
2054
|
+
], VerticalFocusContainerComponent);
|
|
2055
|
+
|
|
2056
|
+
let MultipleSelectInputComponent = class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
2057
|
+
constructor() {
|
|
2058
|
+
super();
|
|
2059
|
+
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
2060
|
+
}
|
|
2061
|
+
ngOnInit() {
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
__decorate([
|
|
2065
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
2066
|
+
__metadata("design:type", Object)
|
|
2067
|
+
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
2068
|
+
__decorate([
|
|
2069
|
+
Input(), TrackExternal(),
|
|
2070
|
+
__metadata("design:type", ListModel)
|
|
2071
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2072
|
+
__decorate([
|
|
2073
|
+
Input(), StoreInListModel('optionsModel'),
|
|
2074
|
+
__metadata("design:type", Array)
|
|
2075
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2076
|
+
__decorate([
|
|
2077
|
+
Input(),
|
|
2078
|
+
__metadata("design:type", Object)
|
|
2079
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2080
|
+
__decorate([
|
|
2081
|
+
Input(),
|
|
2082
|
+
__metadata("design:type", Boolean)
|
|
2083
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2084
|
+
__decorate([
|
|
2085
|
+
ContentChild('optionTemplate'),
|
|
2086
|
+
__metadata("design:type", TemplateRef)
|
|
2087
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2088
|
+
__decorate([
|
|
2089
|
+
ContentChild('nilOptionTemplate'),
|
|
2090
|
+
__metadata("design:type", TemplateRef)
|
|
2091
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2092
|
+
__decorate([
|
|
2093
|
+
Input(),
|
|
2094
|
+
__metadata("design:type", Function)
|
|
2095
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2096
|
+
MultipleSelectInputComponent = __decorate([
|
|
2097
|
+
Component({
|
|
2098
|
+
selector: 'aup-multiple-select-input',
|
|
2099
|
+
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",
|
|
2100
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2101
|
+
}),
|
|
2102
|
+
__metadata("design:paramtypes", [])
|
|
2103
|
+
], MultipleSelectInputComponent);
|
|
2104
|
+
|
|
2105
|
+
let IconComponent = class IconComponent {
|
|
2106
|
+
set icon(iconName) {
|
|
2107
|
+
this._icon = iconName;
|
|
2108
|
+
if (!iconName) {
|
|
2109
|
+
this.errorMessage = 'icon is nil';
|
|
2110
|
+
this.prefix = undefined;
|
|
2111
|
+
return;
|
|
2112
|
+
}
|
|
2113
|
+
const colonIndex = iconName.indexOf(':');
|
|
2114
|
+
if (colonIndex > 0) {
|
|
2115
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
2116
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2117
|
+
}
|
|
2118
|
+
if (this.prefix) {
|
|
2119
|
+
this.errorMessage = `Unknown icon "${iconName}"`;
|
|
2120
|
+
}
|
|
2121
|
+
this.errorMessage = `Unknown icon prefix "${this.prefix}"`;
|
|
2122
|
+
}
|
|
2123
|
+
get icon() {
|
|
2124
|
+
return this._icon;
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
__decorate([
|
|
2128
|
+
Input(),
|
|
2129
|
+
__metadata("design:type", String),
|
|
2130
|
+
__metadata("design:paramtypes", [String])
|
|
2131
|
+
], IconComponent.prototype, "icon", null);
|
|
2132
|
+
IconComponent = __decorate([
|
|
3243
2133
|
Component({
|
|
3244
|
-
selector: 'aup-
|
|
3245
|
-
template: "<ng-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
styles: [":host{display:block}"]
|
|
3250
|
-
}),
|
|
3251
|
-
__param(0, Self()),
|
|
3252
|
-
__metadata("design:paramtypes", [FocusManager])
|
|
3253
|
-
], VerticalFocusContainerComponent);
|
|
2134
|
+
selector: 'aup-icon',
|
|
2135
|
+
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",
|
|
2136
|
+
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}"]
|
|
2137
|
+
})
|
|
2138
|
+
], IconComponent);
|
|
3254
2139
|
|
|
3255
2140
|
let ComponentsModule = class ComponentsModule {
|
|
3256
2141
|
constructor(faIconLibrary) {
|
|
@@ -3271,8 +2156,6 @@ ComponentsModule = __decorate([
|
|
|
3271
2156
|
TextInputComponent,
|
|
3272
2157
|
PasswordInputComponent,
|
|
3273
2158
|
SelectInputComponent,
|
|
3274
|
-
MultipleSelectInputComponent,
|
|
3275
|
-
AutocompleteInputComponent,
|
|
3276
2159
|
CheckboxInputComponent,
|
|
3277
2160
|
ScrollContainerComponent,
|
|
3278
2161
|
NoopComponent,
|
|
@@ -3292,19 +2175,9 @@ ComponentsModule = __decorate([
|
|
|
3292
2175
|
SelectHeaderCellRendererComponent,
|
|
3293
2176
|
DefaultHeaderCellRendererComponent,
|
|
3294
2177
|
TableHeaderCellRendererComponent,
|
|
2178
|
+
MultipleSelectInputComponent,
|
|
3295
2179
|
IconComponent,
|
|
3296
|
-
SectionHeaderComponent
|
|
3297
|
-
TableRowMenuComponent,
|
|
3298
|
-
ToolBarComponent,
|
|
3299
|
-
CommandComponent,
|
|
3300
|
-
PopupMenuComponent,
|
|
3301
|
-
CommandGroupComponent,
|
|
3302
|
-
CommandFaceComponent,
|
|
3303
|
-
MoreMenuComponent,
|
|
3304
|
-
SeparatorComponent,
|
|
3305
|
-
FlexComponent,
|
|
3306
|
-
CommandGroupMenuRendererComponent,
|
|
3307
|
-
CommandGroupRendererComponent
|
|
2180
|
+
SectionHeaderComponent
|
|
3308
2181
|
],
|
|
3309
2182
|
imports: [
|
|
3310
2183
|
CommonModule,
|
|
@@ -3322,10 +2195,7 @@ ComponentsModule = __decorate([
|
|
|
3322
2195
|
PortalModule,
|
|
3323
2196
|
CdkScrollableModule,
|
|
3324
2197
|
FontAwesomeModule,
|
|
3325
|
-
MatTooltipModule
|
|
3326
|
-
MatAutocompleteModule,
|
|
3327
|
-
MatMenuModule,
|
|
3328
|
-
MatDividerModule
|
|
2198
|
+
MatTooltipModule
|
|
3329
2199
|
],
|
|
3330
2200
|
exports: [
|
|
3331
2201
|
NumberInputComponent,
|
|
@@ -3334,8 +2204,6 @@ ComponentsModule = __decorate([
|
|
|
3334
2204
|
PasswordInputComponent,
|
|
3335
2205
|
CheckboxInputComponent,
|
|
3336
2206
|
SelectInputComponent,
|
|
3337
|
-
MultipleSelectInputComponent,
|
|
3338
|
-
AutocompleteInputComponent,
|
|
3339
2207
|
ScrollContainerComponent,
|
|
3340
2208
|
NoopComponent,
|
|
3341
2209
|
SwitchCaseComponent,
|
|
@@ -3348,20 +2216,12 @@ ComponentsModule = __decorate([
|
|
|
3348
2216
|
TableComponent,
|
|
3349
2217
|
EditRowControls,
|
|
3350
2218
|
ColumnTemplateDirective,
|
|
2219
|
+
MultipleSelectInputComponent,
|
|
3351
2220
|
IconComponent,
|
|
3352
|
-
SectionHeaderComponent
|
|
3353
|
-
TableRowMenuComponent,
|
|
3354
|
-
CommandGroupComponent,
|
|
3355
|
-
ToolBarComponent,
|
|
3356
|
-
CommandComponent,
|
|
3357
|
-
PopupMenuComponent,
|
|
3358
|
-
CommandFaceComponent,
|
|
3359
|
-
MoreMenuComponent,
|
|
3360
|
-
SeparatorComponent,
|
|
3361
|
-
FlexComponent
|
|
2221
|
+
SectionHeaderComponent
|
|
3362
2222
|
],
|
|
3363
2223
|
providers: [
|
|
3364
|
-
FocusBindingFactory
|
|
2224
|
+
FocusBindingFactory,
|
|
3365
2225
|
]
|
|
3366
2226
|
}),
|
|
3367
2227
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -3429,7 +2289,7 @@ ActivityActionsComponent = __decorate([
|
|
|
3429
2289
|
Component({
|
|
3430
2290
|
selector: 'aup-activity-actions',
|
|
3431
2291
|
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",
|
|
3432
|
-
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}.
|
|
2292
|
+
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}"]
|
|
3433
2293
|
})
|
|
3434
2294
|
], ActivityActionsComponent);
|
|
3435
2295
|
|
|
@@ -3438,21 +2298,12 @@ class Activity extends DisposableComponent {
|
|
|
3438
2298
|
constructor() {
|
|
3439
2299
|
super(...arguments);
|
|
3440
2300
|
this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
3441
|
-
this._focusedModel = this.registerDisposable(new DelegatingValueModel());
|
|
3442
2301
|
this.class = 'aup-activity';
|
|
3443
2302
|
}
|
|
3444
|
-
get isFocused() {
|
|
3445
|
-
return this._focusedModel.value;
|
|
3446
|
-
}
|
|
3447
2303
|
initialise(nestedInteractionContext, activityContext) {
|
|
3448
|
-
const { chain, when } = Dsl.disposeWith(this);
|
|
3449
2304
|
assert$1.isNil(this._activityContext);
|
|
3450
2305
|
this._activityContext = activityContext;
|
|
3451
2306
|
this._interactionContext = nestedInteractionContext;
|
|
3452
|
-
this._focusedModel.setDelegate(activityContext.focused);
|
|
3453
|
-
when(this._focusedModel).becomesTruthy(() => {
|
|
3454
|
-
this.onActivityReady();
|
|
3455
|
-
});
|
|
3456
2307
|
}
|
|
3457
2308
|
get interactionContext() {
|
|
3458
2309
|
assert$1.isTruthy(this.isInitialised());
|
|
@@ -3470,9 +2321,6 @@ class Activity extends DisposableComponent {
|
|
|
3470
2321
|
get busy() {
|
|
3471
2322
|
return this._busyModel.readonly;
|
|
3472
2323
|
}
|
|
3473
|
-
get focused() {
|
|
3474
|
-
return this._focusedModel.readonly;
|
|
3475
|
-
}
|
|
3476
2324
|
busyWhile(busyModel) {
|
|
3477
2325
|
this._busyModel.setDelegate(busyModel);
|
|
3478
2326
|
}
|
|
@@ -3487,11 +2335,6 @@ __decorate([
|
|
|
3487
2335
|
HostBinding('class'),
|
|
3488
2336
|
__metadata("design:type", Object)
|
|
3489
2337
|
], Activity.prototype, "class", void 0);
|
|
3490
|
-
__decorate([
|
|
3491
|
-
HostBinding('attr.focused'),
|
|
3492
|
-
__metadata("design:type", Object),
|
|
3493
|
-
__metadata("design:paramtypes", [])
|
|
3494
|
-
], Activity.prototype, "isFocused", null);
|
|
3495
2338
|
|
|
3496
2339
|
let AlertDialogComponent = class AlertDialogComponent extends Activity {
|
|
3497
2340
|
constructor(alert) {
|
|
@@ -3611,7 +2454,6 @@ class ActivityRef {
|
|
|
3611
2454
|
this.onComplete = onComplete;
|
|
3612
2455
|
this._complete = false;
|
|
3613
2456
|
this.deferredResult = Deferred.defer();
|
|
3614
|
-
this.focusedModel = new MutableValueModel();
|
|
3615
2457
|
}
|
|
3616
2458
|
isActivityRealised() {
|
|
3617
2459
|
return !!this._activity;
|
|
@@ -3623,12 +2465,6 @@ class ActivityRef {
|
|
|
3623
2465
|
assert.isTruthy(this.isActivityRealised());
|
|
3624
2466
|
return this._activity;
|
|
3625
2467
|
}
|
|
3626
|
-
setFocused(focused) {
|
|
3627
|
-
this.focusedModel.value = focused;
|
|
3628
|
-
}
|
|
3629
|
-
get focused() {
|
|
3630
|
-
return this.focusedModel.value;
|
|
3631
|
-
}
|
|
3632
2468
|
notifyActivityCreated(activity, nestedInteractionContext) {
|
|
3633
2469
|
assert.isNil(this._activity);
|
|
3634
2470
|
this._activity = activity;
|
|
@@ -3639,8 +2475,7 @@ class ActivityRef {
|
|
|
3639
2475
|
},
|
|
3640
2476
|
onCancel(error) {
|
|
3641
2477
|
self.finishActivity(deferred => deferred.reject(error));
|
|
3642
|
-
}
|
|
3643
|
-
focused: this.focusedModel.readonly
|
|
2478
|
+
}
|
|
3644
2479
|
});
|
|
3645
2480
|
}
|
|
3646
2481
|
finishActivity(resolveOrReject) {
|
|
@@ -3669,7 +2504,7 @@ let ActivityOutletComponent = class ActivityOutletComponent {
|
|
|
3669
2504
|
}
|
|
3670
2505
|
set activityRef(activityRef) {
|
|
3671
2506
|
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
3672
|
-
lang$1.illegalState(
|
|
2507
|
+
lang$1.illegalState("changing activity before previous one has completed");
|
|
3673
2508
|
}
|
|
3674
2509
|
this._activityRef = activityRef;
|
|
3675
2510
|
this.loadActivity(activityRef);
|
|
@@ -3726,9 +2561,8 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3726
2561
|
constructor() {
|
|
3727
2562
|
super();
|
|
3728
2563
|
this.dynamicHeight = false;
|
|
3729
|
-
this.
|
|
2564
|
+
this.activityTabs = [];
|
|
3730
2565
|
this.garbage = new GarbageCollector();
|
|
3731
|
-
this.inAnimation = new MutableValueModel(false);
|
|
3732
2566
|
}
|
|
3733
2567
|
ngOnInit() {
|
|
3734
2568
|
}
|
|
@@ -3760,7 +2594,6 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3760
2594
|
registerDisposable(disposable) {
|
|
3761
2595
|
return this.garbage.registerDisposable(disposable);
|
|
3762
2596
|
}
|
|
3763
|
-
// @Trace()
|
|
3764
2597
|
dispose() {
|
|
3765
2598
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
3766
2599
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -3771,7 +2604,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3771
2604
|
if (!this.isActive()) {
|
|
3772
2605
|
lang$1.illegalState('no activity in progress');
|
|
3773
2606
|
}
|
|
3774
|
-
return ___default.findLast(this.
|
|
2607
|
+
return ___default.findLast(this.activityTabs, tab => !tab.isComplete());
|
|
3775
2608
|
}
|
|
3776
2609
|
/**
|
|
3777
2610
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3805,14 +2638,14 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3805
2638
|
});
|
|
3806
2639
|
this.launchActivity(activityRef);
|
|
3807
2640
|
// if this is the first activity let the interaction service know.
|
|
3808
|
-
if (this.
|
|
2641
|
+
if (this.activityTabs.length === 1) {
|
|
3809
2642
|
// console.log('Now active!!!');
|
|
3810
2643
|
this.interactionServiceApi.notifyActive(this);
|
|
3811
2644
|
}
|
|
3812
2645
|
return activityRef.activityResult;
|
|
3813
2646
|
}
|
|
3814
2647
|
getActiveActivityCount() {
|
|
3815
|
-
return this.
|
|
2648
|
+
return this.activityTabs.filter(ref => !ref.isComplete()).length;
|
|
3816
2649
|
}
|
|
3817
2650
|
/**
|
|
3818
2651
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3836,7 +2669,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3836
2669
|
// Without this our animation done wasn't called when a single
|
|
3837
2670
|
// new activity followed a single tab activity (since we're tracking
|
|
3838
2671
|
// by activity index)
|
|
3839
|
-
this.
|
|
2672
|
+
this.activityTabs = [];
|
|
3840
2673
|
const promise = this.interactionServiceApi.notifyFinished(this);
|
|
3841
2674
|
this._deferredCleanUp = promise
|
|
3842
2675
|
.finally(() => {
|
|
@@ -3846,15 +2679,14 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3846
2679
|
}
|
|
3847
2680
|
// @Trace()
|
|
3848
2681
|
launchActivity(activityRef) {
|
|
3849
|
-
const cleanedTabs = this.
|
|
3850
|
-
this.
|
|
2682
|
+
const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());
|
|
2683
|
+
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
3851
2684
|
this.synchroniseSelectedTabIndex();
|
|
3852
2685
|
}
|
|
3853
2686
|
activityIndex(index, activityRef) {
|
|
3854
2687
|
return index;
|
|
3855
2688
|
}
|
|
3856
2689
|
;
|
|
3857
|
-
// @Trace()
|
|
3858
2690
|
onAnimationFinished() {
|
|
3859
2691
|
if (this.onAnimationFinishedJob) {
|
|
3860
2692
|
this.onAnimationFinishedJob();
|
|
@@ -3864,20 +2696,14 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3864
2696
|
/**
|
|
3865
2697
|
* Synchronises the selected tab index.
|
|
3866
2698
|
*/
|
|
3867
|
-
// @Trace()
|
|
3868
2699
|
synchroniseSelectedTabIndex() {
|
|
3869
2700
|
const previousIndex = this.tabs.selectedIndex;
|
|
3870
2701
|
const newIndex = this.getActiveActivityCount() - 1;
|
|
3871
2702
|
if (previousIndex !== newIndex) {
|
|
3872
|
-
this.inAnimation.value = true;
|
|
3873
|
-
this.activityRefs[newIndex].setFocused(false);
|
|
3874
2703
|
this.tabs.selectedIndex = newIndex;
|
|
3875
2704
|
this.onAnimationFinishedJob = () => {
|
|
3876
|
-
this.
|
|
3877
|
-
this.
|
|
3878
|
-
this.activityRefs.forEach((ref, index) => {
|
|
3879
|
-
ref.setFocused(index === newIndex);
|
|
3880
|
-
});
|
|
2705
|
+
this.getSelectedOutlet().component.onActivityReady();
|
|
2706
|
+
this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());
|
|
3881
2707
|
};
|
|
3882
2708
|
}
|
|
3883
2709
|
}
|
|
@@ -3885,10 +2711,6 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3885
2711
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
3886
2712
|
}
|
|
3887
2713
|
// @Trace()
|
|
3888
|
-
getSelectedTabIndex() {
|
|
3889
|
-
return this.tabs.selectedIndex;
|
|
3890
|
-
}
|
|
3891
|
-
// @Trace()
|
|
3892
2714
|
triggerTabSynchronisation() {
|
|
3893
2715
|
if (this.syncSelectedTabTimeout) {
|
|
3894
2716
|
clearTimeout(this.syncSelectedTabTimeout);
|
|
@@ -3911,10 +2733,16 @@ __decorate([
|
|
|
3911
2733
|
ViewChildren(ActivityOutletComponent),
|
|
3912
2734
|
__metadata("design:type", QueryList)
|
|
3913
2735
|
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
2736
|
+
__decorate([
|
|
2737
|
+
Trace(),
|
|
2738
|
+
__metadata("design:type", Function),
|
|
2739
|
+
__metadata("design:paramtypes", []),
|
|
2740
|
+
__metadata("design:returntype", void 0)
|
|
2741
|
+
], ActivityContainerComponent.prototype, "dispose", null);
|
|
3914
2742
|
ActivityContainerComponent = __decorate([
|
|
3915
2743
|
Component({
|
|
3916
2744
|
selector: 'aup-activity-container',
|
|
3917
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let
|
|
2745
|
+
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",
|
|
3918
2746
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3919
2747
|
}),
|
|
3920
2748
|
__metadata("design:paramtypes", [])
|
|
@@ -4891,16 +3719,13 @@ let PlaceComponent = PlaceComponent_1 = class PlaceComponent extends DisposableC
|
|
|
4891
3719
|
super();
|
|
4892
3720
|
this.visitModel = new MutableValueModel();
|
|
4893
3721
|
this._inVisitUpdate = new Guard();
|
|
4894
|
-
this._active = new MutableValueModel(false);
|
|
4895
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
4896
|
-
when(this._active).becomesTruthy(() => this.onPlaceReady());
|
|
4897
3722
|
}
|
|
4898
3723
|
// @Trace()
|
|
4899
3724
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
4900
3725
|
assert.isNil(this.visitModel.value);
|
|
4901
3726
|
const { when } = Dsl.disposeWith(this);
|
|
4902
3727
|
this.visitModel.value = visit;
|
|
4903
|
-
DebugContext.
|
|
3728
|
+
DebugContext.get(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);
|
|
4904
3729
|
this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => this.installBinding(parameterDef));
|
|
4905
3730
|
when.valueOf(this.visitModel).changes((current, previous) => {
|
|
4906
3731
|
notifyVisitChanged(current, previous);
|
|
@@ -4939,15 +3764,6 @@ let PlaceComponent = PlaceComponent_1 = class PlaceComponent extends DisposableC
|
|
|
4939
3764
|
get childPlaces() {
|
|
4940
3765
|
return this.placeDefinition.children.map(d => d.component);
|
|
4941
3766
|
}
|
|
4942
|
-
get active() {
|
|
4943
|
-
return this._active.readonly;
|
|
4944
|
-
}
|
|
4945
|
-
/**
|
|
4946
|
-
* Called by the router when the place is ready to interact after any animations have run.
|
|
4947
|
-
*/
|
|
4948
|
-
_notifyActive(active) {
|
|
4949
|
-
this._active.value = active;
|
|
4950
|
-
}
|
|
4951
3767
|
onPlaceReady() {
|
|
4952
3768
|
}
|
|
4953
3769
|
};
|
|
@@ -5949,6 +4765,70 @@ UrlService = __decorate([
|
|
|
5949
4765
|
__metadata("design:paramtypes", [Router, Location, UrlSerializer])
|
|
5950
4766
|
], UrlService);
|
|
5951
4767
|
|
|
4768
|
+
class Visit {
|
|
4769
|
+
constructor(placeDefinition, visitParameters = {}) {
|
|
4770
|
+
this.placeDefinition = placeDefinition;
|
|
4771
|
+
this.visitParameters = visitParameters;
|
|
4772
|
+
}
|
|
4773
|
+
// @Trace()
|
|
4774
|
+
getRouteId() {
|
|
4775
|
+
return this.placeDefinition.getRouteIdFrom(this);
|
|
4776
|
+
}
|
|
4777
|
+
// @Trace()
|
|
4778
|
+
hasRouteId() {
|
|
4779
|
+
return !isNil(this.getRouteId());
|
|
4780
|
+
}
|
|
4781
|
+
/**
|
|
4782
|
+
* Returns the value of the place parameter with the specified name. The parameter
|
|
4783
|
+
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
4784
|
+
* same as the the ValueModel property name.
|
|
4785
|
+
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
4786
|
+
*/
|
|
4787
|
+
getParameter(parameterName) {
|
|
4788
|
+
return this.visitParameters[parameterName];
|
|
4789
|
+
}
|
|
4790
|
+
// @Trace()
|
|
4791
|
+
hasParameter(parameterName) {
|
|
4792
|
+
return Object.keys(this.visitParameters).includes(parameterName);
|
|
4793
|
+
}
|
|
4794
|
+
replace(parameter, value) {
|
|
4795
|
+
return new Visit(this.placeDefinition, Object.assign(Object.assign({}, this.visitParameters), { [parameter.name]: value }));
|
|
4796
|
+
}
|
|
4797
|
+
mergeRouteParameters(routeParams) {
|
|
4798
|
+
// todo: whitelist parameters.
|
|
4799
|
+
const routeParameterKeys = Object.keys(routeParams);
|
|
4800
|
+
const params = {};
|
|
4801
|
+
this.placeDefinition.getVisitParameterDefs().forEach(def => {
|
|
4802
|
+
if (def.isRouteId || def.isRouteParameter) {
|
|
4803
|
+
if (routeParameterKeys.includes(def.name)) {
|
|
4804
|
+
params[def.name] = routeParams[def.name];
|
|
4805
|
+
}
|
|
4806
|
+
}
|
|
4807
|
+
else {
|
|
4808
|
+
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
4809
|
+
// defaults and remember sanitisation process.
|
|
4810
|
+
const value = this.getParameter(def.name);
|
|
4811
|
+
if (this.hasParameter(def.name)) {
|
|
4812
|
+
params[def.name] = value;
|
|
4813
|
+
}
|
|
4814
|
+
}
|
|
4815
|
+
});
|
|
4816
|
+
return new Visit(this.placeDefinition, params);
|
|
4817
|
+
}
|
|
4818
|
+
hasRoutingChangedFrom(other) {
|
|
4819
|
+
const samePlace = other.placeDefinition === this.placeDefinition;
|
|
4820
|
+
const sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
4821
|
+
return !samePlace || !sameRouteParameters;
|
|
4822
|
+
}
|
|
4823
|
+
hasChangedFrom(other) {
|
|
4824
|
+
const sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
4825
|
+
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
4826
|
+
}
|
|
4827
|
+
toDebugString() {
|
|
4828
|
+
return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(",");
|
|
4829
|
+
}
|
|
4830
|
+
}
|
|
4831
|
+
|
|
5952
4832
|
let PlaceRouter = class PlaceRouter extends GarbageCollector {
|
|
5953
4833
|
constructor(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
5954
4834
|
super();
|
|
@@ -6110,7 +4990,6 @@ let PlaceRouter = class PlaceRouter extends GarbageCollector {
|
|
|
6110
4990
|
get activeVisits() {
|
|
6111
4991
|
return this._activeVisits.readonly;
|
|
6112
4992
|
}
|
|
6113
|
-
// @Trace()
|
|
6114
4993
|
pushVisitChangesToRoute(previous, next) {
|
|
6115
4994
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6116
4995
|
this.placeHistory.updateVisit(next);
|
|
@@ -6207,6 +5086,12 @@ PlaceRouter.ctorParameters = () => [
|
|
|
6207
5086
|
{ type: PlaceHistory }
|
|
6208
5087
|
];
|
|
6209
5088
|
PlaceRouter.ɵprov = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(Location), ɵɵinject(InteractionService), ɵɵinject(UrlService), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
5089
|
+
__decorate([
|
|
5090
|
+
Trace(),
|
|
5091
|
+
__metadata("design:type", Function),
|
|
5092
|
+
__metadata("design:paramtypes", [Visit, Visit]),
|
|
5093
|
+
__metadata("design:returntype", Promise)
|
|
5094
|
+
], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
|
|
6210
5095
|
PlaceRouter = __decorate([
|
|
6211
5096
|
Injectable({
|
|
6212
5097
|
providedIn: 'root'
|
|
@@ -6218,70 +5103,6 @@ PlaceRouter = __decorate([
|
|
|
6218
5103
|
PlaceHistory])
|
|
6219
5104
|
], PlaceRouter);
|
|
6220
5105
|
|
|
6221
|
-
class Visit {
|
|
6222
|
-
constructor(placeDefinition, visitParameters = {}) {
|
|
6223
|
-
this.placeDefinition = placeDefinition;
|
|
6224
|
-
this.visitParameters = visitParameters;
|
|
6225
|
-
}
|
|
6226
|
-
// @Trace()
|
|
6227
|
-
getRouteId() {
|
|
6228
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
6229
|
-
}
|
|
6230
|
-
// @Trace()
|
|
6231
|
-
hasRouteId() {
|
|
6232
|
-
return !isNil(this.getRouteId());
|
|
6233
|
-
}
|
|
6234
|
-
/**
|
|
6235
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
6236
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
6237
|
-
* same as the the ValueModel property name.
|
|
6238
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
6239
|
-
*/
|
|
6240
|
-
getParameter(parameterName) {
|
|
6241
|
-
return this.visitParameters[parameterName];
|
|
6242
|
-
}
|
|
6243
|
-
// @Trace()
|
|
6244
|
-
hasParameter(parameterName) {
|
|
6245
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
6246
|
-
}
|
|
6247
|
-
replace(parameter, value) {
|
|
6248
|
-
return new Visit(this.placeDefinition, Object.assign(Object.assign({}, this.visitParameters), { [parameter.name]: value }));
|
|
6249
|
-
}
|
|
6250
|
-
mergeRouteParameters(routeParams) {
|
|
6251
|
-
// todo: whitelist parameters.
|
|
6252
|
-
const routeParameterKeys = Object.keys(routeParams);
|
|
6253
|
-
const params = {};
|
|
6254
|
-
this.placeDefinition.getVisitParameterDefs().forEach(def => {
|
|
6255
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
6256
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
6257
|
-
params[def.name] = routeParams[def.name];
|
|
6258
|
-
}
|
|
6259
|
-
}
|
|
6260
|
-
else {
|
|
6261
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
6262
|
-
// defaults and remember sanitisation process.
|
|
6263
|
-
const value = this.getParameter(def.name);
|
|
6264
|
-
if (this.hasParameter(def.name)) {
|
|
6265
|
-
params[def.name] = value;
|
|
6266
|
-
}
|
|
6267
|
-
}
|
|
6268
|
-
});
|
|
6269
|
-
return new Visit(this.placeDefinition, params);
|
|
6270
|
-
}
|
|
6271
|
-
hasRoutingChangedFrom(other) {
|
|
6272
|
-
const samePlace = other.placeDefinition === this.placeDefinition;
|
|
6273
|
-
const sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
6274
|
-
return !samePlace || !sameRouteParameters;
|
|
6275
|
-
}
|
|
6276
|
-
hasChangedFrom(other) {
|
|
6277
|
-
const sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
6278
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
6279
|
-
}
|
|
6280
|
-
toDebugString() {
|
|
6281
|
-
return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(",");
|
|
6282
|
-
}
|
|
6283
|
-
}
|
|
6284
|
-
|
|
6285
5106
|
const AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
6286
5107
|
|
|
6287
5108
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -6340,7 +5161,6 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6340
5161
|
this._activePlaceModel = new MutableValueModel();
|
|
6341
5162
|
this.initialPlaceIndex = null;
|
|
6342
5163
|
this._isPushingVisitToRoute = new MutableValueModel(false);
|
|
6343
|
-
this.isVeryFirstLoad = true;
|
|
6344
5164
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
6345
5165
|
this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
6346
5166
|
const defaultPlaceAnimationOrder = chain(this.parentOutletModel)
|
|
@@ -6349,9 +5169,8 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6349
5169
|
.pluckList('children')
|
|
6350
5170
|
.pluck('component');
|
|
6351
5171
|
const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor);
|
|
6352
|
-
this.
|
|
6353
|
-
.otherwise(defaultPlaceAnimationOrder)
|
|
6354
|
-
this.activePlaceAnimationPosition = this.placesInAnimationOrder
|
|
5172
|
+
this.placeAnimationOrder = chain(this.customPlaceAnimationOrderModel)
|
|
5173
|
+
.otherwise(defaultPlaceAnimationOrder)
|
|
6355
5174
|
.reduce((placesInOrder) => {
|
|
6356
5175
|
let placeIndex = 0;
|
|
6357
5176
|
if (activatePlaceType.value) {
|
|
@@ -6362,16 +5181,14 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6362
5181
|
}
|
|
6363
5182
|
return isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;
|
|
6364
5183
|
}, { dependsOn: activatePlaceType });
|
|
6365
|
-
this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
6366
|
-
this.animationEnabled = valueOf.all(this.animateModel, this.animationSupported).areTruthy();
|
|
6367
5184
|
// Extract our visit model from the place router.
|
|
6368
5185
|
this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');
|
|
6369
5186
|
this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
|
|
6370
5187
|
this.navigationInProgress = chain(this.placeRouter.navigationInProgress);
|
|
6371
|
-
when(this.navigationInProgress).becomesFalsey(() => {
|
|
5188
|
+
when.valueOf(this.navigationInProgress).becomesFalsey(() => {
|
|
6372
5189
|
this.checkStateAndInitialise();
|
|
6373
5190
|
});
|
|
6374
|
-
when(this.outletActivated).becomesTruthy(() => {
|
|
5191
|
+
when.valueOf(this.outletActivated).becomesTruthy(() => {
|
|
6375
5192
|
this.checkStateAndInitialise();
|
|
6376
5193
|
});
|
|
6377
5194
|
chain(this._activePlaceModel)
|
|
@@ -6383,17 +5200,14 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6383
5200
|
}
|
|
6384
5201
|
// @Trace()
|
|
6385
5202
|
getAnimationOrder() {
|
|
6386
|
-
return this.
|
|
5203
|
+
return this.placeAnimationOrder.value;
|
|
6387
5204
|
}
|
|
6388
5205
|
get animationDuration() {
|
|
6389
5206
|
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
6390
5207
|
}
|
|
6391
5208
|
// @Trace()
|
|
6392
5209
|
navigate(visit) {
|
|
6393
|
-
//
|
|
6394
|
-
// if (!place) {
|
|
6395
|
-
// lang.illegalState()
|
|
6396
|
-
// }
|
|
5210
|
+
// console.log({ activatedRoute: this._activatedRouteModel.value });
|
|
6397
5211
|
this.placeRouter.navigate(visit, {
|
|
6398
5212
|
relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
|
|
6399
5213
|
});
|
|
@@ -6407,25 +5221,14 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6407
5221
|
get activatedRouteModel() {
|
|
6408
5222
|
return this._activatedRouteModel.readonly;
|
|
6409
5223
|
}
|
|
5224
|
+
// @Trace()
|
|
6410
5225
|
onOutletActivated(routerOutlet, place) {
|
|
6411
5226
|
this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
6412
5227
|
this._activePlaceModel.value = place;
|
|
6413
|
-
this.validateAnimationState(place);
|
|
6414
5228
|
this.outletActivated.value = true;
|
|
6415
5229
|
this.checkStateAndInitialise();
|
|
6416
5230
|
}
|
|
6417
|
-
|
|
6418
|
-
if (this.animateModel.value) {
|
|
6419
|
-
if (this.placesInAnimationOrder.length < 1) {
|
|
6420
|
-
console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');
|
|
6421
|
-
}
|
|
6422
|
-
else {
|
|
6423
|
-
if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {
|
|
6424
|
-
console.error(`PlaceOutlet.animate === true but placeAnimationOrder doesn't contain ${place.placeDefinition.component.name}.`);
|
|
6425
|
-
}
|
|
6426
|
-
}
|
|
6427
|
-
}
|
|
6428
|
-
}
|
|
5231
|
+
// @Trace()
|
|
6429
5232
|
onOutletDeactivated() {
|
|
6430
5233
|
this.outletActivated.value = false;
|
|
6431
5234
|
this._activePlaceModel.value = null;
|
|
@@ -6442,24 +5245,16 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6442
5245
|
this.initialisePlace(routerVisit, activePlace);
|
|
6443
5246
|
}
|
|
6444
5247
|
}
|
|
5248
|
+
// @Trace()
|
|
6445
5249
|
initialisePlace(routerVisit, activePlace) {
|
|
6446
5250
|
const visitModel = new MutableValueModel(routerVisit);
|
|
6447
5251
|
DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);
|
|
6448
5252
|
activePlace.initialiseVisit(routerVisit, (current, previous) => {
|
|
6449
5253
|
this.pushVisitChangeToRoute(previous, current);
|
|
6450
5254
|
});
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
if (!this.animationEnabled.value || this.isVeryFirstLoad) {
|
|
6455
|
-
// if animation is disabled or this is the very first load then
|
|
6456
|
-
// we won't get our animation done callback so we finish the
|
|
6457
|
-
// process here and now.
|
|
6458
|
-
this.isVeryFirstLoad = false;
|
|
6459
|
-
finishPlaceLoad();
|
|
6460
|
-
}
|
|
6461
|
-
else {
|
|
6462
|
-
this.onAnimationFinishedJob = finishPlaceLoad;
|
|
5255
|
+
if (!this.animateModel.value) {
|
|
5256
|
+
// we're not animating so trigger any post animation callbacks now.
|
|
5257
|
+
this.animationDone();
|
|
6463
5258
|
}
|
|
6464
5259
|
const { when, chain, valueOf } = Dsl.disposeWith(activePlace);
|
|
6465
5260
|
when.valueOf(this.routerVisitModel)
|
|
@@ -6481,9 +5276,8 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6481
5276
|
}
|
|
6482
5277
|
// @Trace()
|
|
6483
5278
|
animationDone() {
|
|
6484
|
-
if (this.
|
|
6485
|
-
this.
|
|
6486
|
-
this.onAnimationFinishedJob = undefined;
|
|
5279
|
+
if (this._activePlaceModel.value) {
|
|
5280
|
+
this._activePlaceModel.value.onPlaceReady();
|
|
6487
5281
|
}
|
|
6488
5282
|
}
|
|
6489
5283
|
};
|
|
@@ -6517,22 +5311,10 @@ __decorate([
|
|
|
6517
5311
|
ViewChild('routeOutlet', { static: true }),
|
|
6518
5312
|
__metadata("design:type", RouterOutlet)
|
|
6519
5313
|
], PlaceOutletComponent.prototype, "routerOut", void 0);
|
|
6520
|
-
__decorate([
|
|
6521
|
-
Trace(),
|
|
6522
|
-
__metadata("design:type", Function),
|
|
6523
|
-
__metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
|
|
6524
|
-
__metadata("design:returntype", void 0)
|
|
6525
|
-
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
6526
|
-
__decorate([
|
|
6527
|
-
Trace(),
|
|
6528
|
-
__metadata("design:type", Function),
|
|
6529
|
-
__metadata("design:paramtypes", []),
|
|
6530
|
-
__metadata("design:returntype", void 0)
|
|
6531
|
-
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
6532
5314
|
PlaceOutletComponent = __decorate([
|
|
6533
5315
|
Component({
|
|
6534
5316
|
selector: 'aup-place-outlet',
|
|
6535
|
-
template: "<ng-container *ngIf=\"
|
|
5317
|
+
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",
|
|
6536
5318
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
6537
5319
|
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}"]
|
|
6538
5320
|
}),
|
|
@@ -6559,10 +5341,10 @@ let AbstractPlaceNavigationComponent = class AbstractPlaceNavigationComponent ex
|
|
|
6559
5341
|
});
|
|
6560
5342
|
this.activePlaceDefinition = chain(this._activePlaceComponent).pluck('placeDefinition');
|
|
6561
5343
|
}
|
|
6562
|
-
|
|
5344
|
+
getNav(placeDef) {
|
|
6563
5345
|
const navItem = placeDef.getPlaceData('nav');
|
|
6564
5346
|
return {
|
|
6565
|
-
|
|
5347
|
+
title: () => navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']),
|
|
6566
5348
|
tooltip: () => navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null),
|
|
6567
5349
|
icon: () => navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null)
|
|
6568
5350
|
};
|
|
@@ -6597,7 +5379,7 @@ __decorate([
|
|
|
6597
5379
|
__metadata("design:type", Function),
|
|
6598
5380
|
__metadata("design:paramtypes", [PlaceDefinition]),
|
|
6599
5381
|
__metadata("design:returntype", Object)
|
|
6600
|
-
], AbstractPlaceNavigationComponent.prototype, "
|
|
5382
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
6601
5383
|
AbstractPlaceNavigationComponent = __decorate([
|
|
6602
5384
|
Component({
|
|
6603
5385
|
template: ''
|
|
@@ -6658,12 +5440,29 @@ ListPlaceNavComponent.ctorParameters = () => [
|
|
|
6658
5440
|
ListPlaceNavComponent = __decorate([
|
|
6659
5441
|
Component({
|
|
6660
5442
|
selector: 'aup-list-place-nav',
|
|
6661
|
-
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]=\"
|
|
5443
|
+
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",
|
|
6662
5444
|
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)}"]
|
|
6663
5445
|
}),
|
|
6664
5446
|
__metadata("design:paramtypes", [PlaceRouter])
|
|
6665
5447
|
], ListPlaceNavComponent);
|
|
6666
5448
|
|
|
5449
|
+
let TabbedPlaceNavigationComponent = class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
5450
|
+
constructor(placeRouter) {
|
|
5451
|
+
super(placeRouter);
|
|
5452
|
+
}
|
|
5453
|
+
};
|
|
5454
|
+
TabbedPlaceNavigationComponent.ctorParameters = () => [
|
|
5455
|
+
{ type: PlaceRouter }
|
|
5456
|
+
];
|
|
5457
|
+
TabbedPlaceNavigationComponent = __decorate([
|
|
5458
|
+
Component({
|
|
5459
|
+
selector: 'aup-tabbed-place-navigation',
|
|
5460
|
+
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",
|
|
5461
|
+
styles: [""]
|
|
5462
|
+
}),
|
|
5463
|
+
__metadata("design:paramtypes", [PlaceRouter])
|
|
5464
|
+
], TabbedPlaceNavigationComponent);
|
|
5465
|
+
|
|
6667
5466
|
/**
|
|
6668
5467
|
* @example
|
|
6669
5468
|
* // Usage
|
|
@@ -6702,7 +5501,7 @@ ListPlaceNavComponent = __decorate([
|
|
|
6702
5501
|
* (at)Place({
|
|
6703
5502
|
* path: 'myPlace',
|
|
6704
5503
|
* data: {
|
|
6705
|
-
* nav: I18n.places.myPlace.nav
|
|
5504
|
+
* nav: I18n.places.myPlace.nav()
|
|
6706
5505
|
* }
|
|
6707
5506
|
* })
|
|
6708
5507
|
*/
|
|
@@ -6737,29 +5536,12 @@ __decorate([
|
|
|
6737
5536
|
SidePlaceNavigationComponent = __decorate([
|
|
6738
5537
|
Component({
|
|
6739
5538
|
selector: 'aup-side-place-navigation',
|
|
6740
|
-
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]=\"
|
|
5539
|
+
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",
|
|
6741
5540
|
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)}"]
|
|
6742
5541
|
}),
|
|
6743
5542
|
__metadata("design:paramtypes", [Router, PlaceRouter])
|
|
6744
5543
|
], SidePlaceNavigationComponent);
|
|
6745
5544
|
|
|
6746
|
-
let TabbedPlaceNavigationComponent = class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
6747
|
-
constructor(placeRouter) {
|
|
6748
|
-
super(placeRouter);
|
|
6749
|
-
}
|
|
6750
|
-
};
|
|
6751
|
-
TabbedPlaceNavigationComponent.ctorParameters = () => [
|
|
6752
|
-
{ type: PlaceRouter }
|
|
6753
|
-
];
|
|
6754
|
-
TabbedPlaceNavigationComponent = __decorate([
|
|
6755
|
-
Component({
|
|
6756
|
-
selector: 'aup-tabbed-place-navigation',
|
|
6757
|
-
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",
|
|
6758
|
-
styles: [""]
|
|
6759
|
-
}),
|
|
6760
|
-
__metadata("design:paramtypes", [PlaceRouter])
|
|
6761
|
-
], TabbedPlaceNavigationComponent);
|
|
6762
|
-
|
|
6763
5545
|
let PlaceModule = class PlaceModule {
|
|
6764
5546
|
};
|
|
6765
5547
|
PlaceModule = __decorate([
|
|
@@ -7206,7 +5988,8 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
|
|
|
7206
5988
|
binding: null
|
|
7207
5989
|
};
|
|
7208
5990
|
const tag = `${tagPrefix}(${prototype.constructor.name}.${propertyKey.toString()})`;
|
|
7209
|
-
DebugContext.
|
|
5991
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
5992
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
7210
5993
|
Object.defineProperty(prototype, propertyKey, {
|
|
7211
5994
|
get: function () {
|
|
7212
5995
|
return mechanics.backingModel;
|
|
@@ -7268,5 +6051,5 @@ function VisitParameterList(options) {
|
|
|
7268
6051
|
* Generated bundle index. Do not edit.
|
|
7269
6052
|
*/
|
|
7270
6053
|
|
|
7271
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule,
|
|
6054
|
+
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 };
|
|
7272
6055
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|