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