@coolon/angular-ui-powerups 0.0.134 → 1.0.0-alpha.11
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 +301 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +1178 -6280
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +16 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +27 -26
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +26 -29
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/index.js +1 -5
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.js +32 -32
- package/esm2015/lib/angular-ui-powerups.module.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/animations/index.js +1 -5
- package/esm2015/lib/animations/index.js.map +1 -1
- package/esm2015/lib/animations/slide-animations.js +0 -8
- package/esm2015/lib/animations/slide-animations.js.map +1 -1
- package/esm2015/lib/components/components.module.js +40 -37
- 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/disposable-component.js +8 -9
- package/esm2015/lib/components/disposable-component.js.map +1 -1
- package/esm2015/lib/components/disposable-component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +82 -114
- 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/number-input/number-input.component.js +12 -18
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +12 -18
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +38 -57
- 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 +19 -41
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/index.js +13 -16
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/noop/noop.component.js +12 -15
- package/esm2015/lib/components/noop/noop.component.js.map +1 -1
- package/esm2015/lib/components/resize-aware.component.js +17 -64
- package/esm2015/lib/components/resize-aware.component.js.map +1 -1
- package/esm2015/lib/components/resize-aware.component.metadata.json +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js +17 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/types/bounds.class.js +0 -29
- package/esm2015/lib/components/types/bounds.class.js.map +1 -1
- package/esm2015/lib/components/types/dimension.class.js +0 -14
- package/esm2015/lib/components/types/dimension.class.js.map +1 -1
- package/esm2015/lib/components/types/point.class.js +0 -23
- package/esm2015/lib/components/types/point.class.js.map +1 -1
- package/esm2015/lib/directives/command.directive.js +31 -85
- package/esm2015/lib/directives/command.directive.js.map +1 -1
- package/esm2015/lib/directives/directives.module.js +28 -28
- package/esm2015/lib/directives/directives.module.js.map +1 -1
- package/esm2015/lib/directives/directives.module.metadata.json +1 -1
- package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm2015/lib/directives/focus-binding.directive.js +41 -96
- package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
- package/esm2015/lib/directives/index.js +3 -7
- package/esm2015/lib/directives/index.js.map +1 -1
- package/esm2015/lib/interaction/abstract-interaction-context.js +4 -73
- package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/activity-ref.js +2 -79
- package/esm2015/lib/interaction/activity-ref.js.map +1 -1
- package/esm2015/lib/interaction/activity.js +0 -72
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/alert.js +0 -22
- package/esm2015/lib/interaction/alert.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +41 -187
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +24 -74
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +13 -24
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +15 -62
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -27
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +16 -71
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/confirm.js +0 -16
- package/esm2015/lib/interaction/confirm.js.map +1 -1
- package/esm2015/lib/interaction/index.js +15 -24
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/interaction-context.js +0 -50
- package/esm2015/lib/interaction/interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.js +41 -41
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/result.js +2 -23
- package/esm2015/lib/interaction/result.js.map +1 -1
- package/esm2015/lib/interaction/route-synchronisation-adapter.js +0 -16
- package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +0 -43
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.js +22 -172
- package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +17 -40
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +7 -86
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +0 -16
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +36 -105
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +17 -34
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
- package/esm2015/lib/place/components/empty-state/empty-state.component.js +12 -18
- package/esm2015/lib/place/components/empty-state/empty-state.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +16 -33
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -240
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -12
- package/esm2015/lib/place/components/place-outlet/route-animations.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +12 -17
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/guards/consolidated-param-map.js +9 -92
- package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
- package/esm2015/lib/place/guards/noop-auth-guard.service.js +12 -21
- package/esm2015/lib/place/guards/noop-auth-guard.service.js.map +1 -1
- package/esm2015/lib/place/guards/noop-auth-guard.service.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +10 -119
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/index.js +38 -46
- package/esm2015/lib/place/index.js.map +1 -1
- package/esm2015/lib/place/nav-item.js +0 -22
- package/esm2015/lib/place/nav-item.js.map +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -49
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +0 -23
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +0 -11
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +2 -51
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +2 -54
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +2 -60
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +0 -24
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +1 -19
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +0 -55
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +4 -60
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
- package/esm2015/lib/place/navigation/session/navigating.js +0 -31
- package/esm2015/lib/place/navigation/session/navigating.js.map +1 -1
- package/esm2015/lib/place/navigation/session/navigation-context.js +0 -24
- package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -1
- package/esm2015/lib/place/navigation/session/navigation-session.js +12 -178
- package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js +0 -16
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
- package/esm2015/lib/place/place-component.js +22 -107
- 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-config.js +0 -13
- package/esm2015/lib/place/place-config.js.map +1 -1
- package/esm2015/lib/place/place-definition.js +26 -163
- package/esm2015/lib/place/place-definition.js.map +1 -1
- package/esm2015/lib/place/place-history.js +11 -38
- package/esm2015/lib/place/place-history.js.map +1 -1
- package/esm2015/lib/place/place-history.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +38 -247
- 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.decorator.js +3 -38
- package/esm2015/lib/place/place.decorator.js.map +1 -1
- package/esm2015/lib/place/place.module.js +40 -42
- 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/formatter.js +0 -30
- package/esm2015/lib/place/route/formatter.js.map +1 -1
- package/esm2015/lib/place/route/json-types.js +0 -12
- package/esm2015/lib/place/route/json-types.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +14 -133
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-definition.class.js +2 -147
- package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
- package/esm2015/lib/place/route/parameter-sanitiser.js +0 -18
- package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
- package/esm2015/lib/place/route/parameter-snapshot.js +0 -19
- package/esm2015/lib/place/route/parameter-snapshot.js.map +1 -1
- package/esm2015/lib/place/route/visit-sanitiser.js +2 -47
- package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
- package/esm2015/lib/place/url-service.js +13 -68
- package/esm2015/lib/place/url-service.js.map +1 -1
- package/esm2015/lib/place/url-service.metadata.json +1 -1
- package/esm2015/lib/place/url-snapshot.js +3 -86
- package/esm2015/lib/place/url-snapshot.js.map +1 -1
- package/esm2015/lib/place/visit.js +5 -73
- package/esm2015/lib/place/visit.js.map +1 -1
- package/esm2015/public_api.js +6 -10
- package/esm2015/public_api.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +26 -29
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/index.js +1 -5
- package/esm5/index.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.js +29 -30
- package/esm5/lib/angular-ui-powerups.module.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/animations/index.js +1 -5
- package/esm5/lib/animations/index.js.map +1 -1
- package/esm5/lib/animations/slide-animations.js +0 -8
- package/esm5/lib/animations/slide-animations.js.map +1 -1
- package/esm5/lib/components/components.module.js +37 -35
- 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/disposable-component.js +7 -13
- package/esm5/lib/components/disposable-component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +95 -157
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +11 -22
- 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 +11 -22
- 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 +38 -61
- 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 +19 -45
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/index.js +13 -16
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/noop/noop.component.js +9 -13
- package/esm5/lib/components/noop/noop.component.js.map +1 -1
- package/esm5/lib/components/resize-aware.component.js +21 -80
- package/esm5/lib/components/resize-aware.component.js.map +1 -1
- package/esm5/lib/components/scroll-container/scroll-container.component.js +19 -0
- package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -0
- package/esm5/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/types/bounds.class.js +3 -30
- package/esm5/lib/components/types/bounds.class.js.map +1 -1
- package/esm5/lib/components/types/dimension.class.js +0 -10
- package/esm5/lib/components/types/dimension.class.js.map +1 -1
- package/esm5/lib/components/types/point.class.js +2 -30
- package/esm5/lib/components/types/point.class.js.map +1 -1
- package/esm5/lib/directives/command.directive.js +37 -103
- package/esm5/lib/directives/command.directive.js.map +1 -1
- package/esm5/lib/directives/directives.module.js +25 -26
- package/esm5/lib/directives/directives.module.js.map +1 -1
- package/esm5/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm5/lib/directives/focus-binding.directive.js +50 -147
- package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
- package/esm5/lib/directives/index.js +3 -7
- package/esm5/lib/directives/index.js.map +1 -1
- package/esm5/lib/interaction/abstract-interaction-context.js +7 -114
- package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -1
- package/esm5/lib/interaction/activity-ref.js +12 -109
- package/esm5/lib/interaction/activity-ref.js.map +1 -1
- package/esm5/lib/interaction/activity.js +12 -121
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/alert.js +0 -22
- package/esm5/lib/interaction/alert.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +64 -330
- 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 +26 -79
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +12 -25
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +17 -72
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -32
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +24 -117
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm5/lib/interaction/confirm.js +0 -16
- package/esm5/lib/interaction/confirm.js.map +1 -1
- package/esm5/lib/interaction/index.js +15 -24
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction-context.js +0 -50
- package/esm5/lib/interaction/interaction-context.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +38 -39
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/result.js +2 -23
- package/esm5/lib/interaction/result.js.map +1 -1
- package/esm5/lib/interaction/route-synchronisation-adapter.js +0 -16
- package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -1
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +6 -73
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
- package/esm5/lib/interaction/services/interaction.service.js +33 -290
- package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +16 -41
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +14 -109
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js +1 -23
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +37 -115
- package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +16 -37
- package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
- package/esm5/lib/place/components/empty-state/empty-state.component.js +10 -20
- package/esm5/lib/place/components/empty-state/empty-state.component.js.map +1 -1
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +17 -42
- 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 +64 -314
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/route-animations.js +0 -12
- package/esm5/lib/place/components/place-outlet/route-animations.js.map +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +10 -14
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/guards/consolidated-param-map.js +17 -117
- package/esm5/lib/place/guards/consolidated-param-map.js.map +1 -1
- package/esm5/lib/place/guards/noop-auth-guard.service.js +11 -26
- package/esm5/lib/place/guards/noop-auth-guard.service.js.map +1 -1
- package/esm5/lib/place/guards/place.guard.js +24 -172
- package/esm5/lib/place/guards/place.guard.js.map +1 -1
- package/esm5/lib/place/index.js +38 -46
- package/esm5/lib/place/index.js.map +1 -1
- package/esm5/lib/place/nav-item.js +0 -22
- package/esm5/lib/place/nav-item.js.map +1 -1
- package/esm5/lib/place/navigation/place-component-deactivation-handler.js +11 -86
- package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +4 -34
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +4 -25
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +11 -110
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +12 -147
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +11 -126
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +7 -71
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +6 -49
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +11 -120
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +13 -106
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
- package/esm5/lib/place/navigation/session/navigating.js +6 -53
- package/esm5/lib/place/navigation/session/navigating.js.map +1 -1
- package/esm5/lib/place/navigation/session/navigation-context.js +0 -17
- package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -1
- package/esm5/lib/place/navigation/session/navigation-session.js +39 -306
- package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -1
- package/esm5/lib/place/navigation/session/pop-state-navigation.js +5 -33
- package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
- package/esm5/lib/place/place-component.js +30 -142
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-config.js +0 -13
- package/esm5/lib/place/place-config.js.map +1 -1
- package/esm5/lib/place/place-definition.js +37 -219
- package/esm5/lib/place/place-definition.js.map +1 -1
- package/esm5/lib/place/place-history.js +11 -56
- package/esm5/lib/place/place-history.js.map +1 -1
- package/esm5/lib/place/place-router.js +59 -372
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.decorator.js +3 -38
- package/esm5/lib/place/place.decorator.js.map +1 -1
- package/esm5/lib/place/place.module.js +37 -40
- 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/formatter.js +6 -60
- package/esm5/lib/place/route/formatter.js.map +1 -1
- package/esm5/lib/place/route/json-types.js +0 -12
- package/esm5/lib/place/route/json-types.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +14 -133
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/route/parameter-definition.class.js +21 -222
- package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
- package/esm5/lib/place/route/parameter-sanitiser.js +0 -18
- package/esm5/lib/place/route/parameter-sanitiser.js.map +1 -1
- package/esm5/lib/place/route/parameter-snapshot.js +0 -19
- package/esm5/lib/place/route/parameter-snapshot.js.map +1 -1
- package/esm5/lib/place/route/visit-sanitiser.js +4 -42
- package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
- package/esm5/lib/place/url-service.js +20 -119
- package/esm5/lib/place/url-service.js.map +1 -1
- package/esm5/lib/place/url-snapshot.js +15 -143
- package/esm5/lib/place/url-snapshot.js.map +1 -1
- package/esm5/lib/place/visit.js +14 -132
- package/esm5/lib/place/visit.js.map +1 -1
- package/esm5/public_api.js +6 -10
- package/esm5/public_api.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +866 -4507
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1136 -6252
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +9 -9
- package/lib/components/index.d.ts +1 -0
- package/lib/components/resize-aware.component.d.ts +3 -3
- package/lib/components/scroll-container/scroll-container.component.d.ts +5 -0
- package/lib/directives/command.directive.d.ts +4 -2
- package/lib/directives/focus-binding.directive.d.ts +1 -1
- package/lib/interaction/activity-ref.d.ts +2 -2
- package/lib/interaction/activity.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -2
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
- package/lib/interaction/services/interaction.service.d.ts +1 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -4
- package/lib/place/guards/consolidated-param-map.d.ts +1 -1
- package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
- package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
- package/lib/place/navigation/session/navigation-session.d.ts +4 -4
- package/lib/place/place-component.d.ts +2 -2
- package/lib/place/place-router.d.ts +3 -3
- package/lib/place/route/formatter.d.ts +4 -3
- package/lib/place/route/parameter-definition.class.d.ts +2 -2
- package/package.json +10 -10
- package/schematics/place-routes/place-builder.js +4 -2
- package/schematics/place-routes/place-builder.js.map +1 -1
- package/schematics/place-routes/place-class-scanner.d.ts +3 -3
- package/schematics/place-routes/place-class-scanner.js +1 -1
- package/schematics/place-routes/place-class-scanner.js.map +1 -1
- package/schematics/place-routes/place-def.d.ts +9 -9
- /package/{styles → assets}/styles.scss +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
1
|
+
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
6
3
|
import { assert, Binding, DebugContext, Dsl, Guard, lang, MutableValueModel } from '@coolon/pectin';
|
|
7
4
|
import { Klass } from '@coolon/typescript-utilities';
|
|
8
5
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
@@ -10,119 +7,52 @@ import 'reflect-metadata';
|
|
|
10
7
|
import { DisposableComponent } from '../components/disposable-component';
|
|
11
8
|
import { PlaceDefinition } from './place-definition';
|
|
12
9
|
// RAKE: making this Symbol(...) broke things.
|
|
13
|
-
/** @type {?} */
|
|
14
10
|
export var DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
15
11
|
// this one seems ok.
|
|
16
|
-
/** @type {?} */
|
|
17
12
|
export var ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
18
13
|
var PlaceComponent = /** @class */ (function (_super) {
|
|
19
|
-
|
|
14
|
+
__extends(PlaceComponent, _super);
|
|
20
15
|
function PlaceComponent() {
|
|
21
16
|
var _this = _super.call(this) || this;
|
|
22
17
|
_this.visitModel = new MutableValueModel();
|
|
23
18
|
_this._inVisitUpdate = new Guard();
|
|
24
19
|
return _this;
|
|
25
20
|
}
|
|
21
|
+
PlaceComponent_1 = PlaceComponent;
|
|
26
22
|
// @Trace()
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {?} visit
|
|
30
|
-
* @param {?} notifyVisitChanged
|
|
31
|
-
* @return {?}
|
|
32
|
-
*/
|
|
33
|
-
PlaceComponent.prototype.initialiseVisit =
|
|
34
|
-
// @Trace()
|
|
35
|
-
/**
|
|
36
|
-
* @param {?} visit
|
|
37
|
-
* @param {?} notifyVisitChanged
|
|
38
|
-
* @return {?}
|
|
39
|
-
*/
|
|
40
|
-
function (visit, notifyVisitChanged) {
|
|
23
|
+
PlaceComponent.prototype.initialiseVisit = function (visit, notifyVisitChanged) {
|
|
41
24
|
var _this = this;
|
|
42
25
|
assert.isNil(this.visitModel.value);
|
|
43
26
|
var when = Dsl.disposeWith(this).when;
|
|
44
27
|
this.visitModel.value = visit;
|
|
45
28
|
DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
46
|
-
this.placeDefinition.getVisitParameterDefs().forEach((
|
|
47
|
-
|
|
48
|
-
* @return {?}
|
|
49
|
-
*/
|
|
50
|
-
function (parameterDef) { return _this.installBinding(parameterDef); }));
|
|
51
|
-
when.valueOf(this.visitModel).changes((/**
|
|
52
|
-
* @param {?} current
|
|
53
|
-
* @param {?} previous
|
|
54
|
-
* @return {?}
|
|
55
|
-
*/
|
|
56
|
-
function (current, previous) {
|
|
29
|
+
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
30
|
+
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
57
31
|
notifyVisitChanged(current, previous);
|
|
58
|
-
}
|
|
32
|
+
}, { unless: this._inVisitUpdate });
|
|
59
33
|
};
|
|
60
|
-
|
|
61
|
-
* @param {?} visit
|
|
62
|
-
* @return {?}
|
|
63
|
-
*/
|
|
64
|
-
PlaceComponent.prototype.updateVisit = /**
|
|
65
|
-
* @param {?} visit
|
|
66
|
-
* @return {?}
|
|
67
|
-
*/
|
|
68
|
-
function (visit) {
|
|
34
|
+
PlaceComponent.prototype.updateVisit = function (visit) {
|
|
69
35
|
var _this = this;
|
|
70
36
|
assert.isTruthy(this.isInitialised());
|
|
71
37
|
assert.notNil(visit);
|
|
72
|
-
this._inVisitUpdate.whileTrue((
|
|
73
|
-
* @return {?}
|
|
74
|
-
*/
|
|
75
|
-
function () {
|
|
38
|
+
this._inVisitUpdate.whileTrue(function () {
|
|
76
39
|
_this.visitModel.value = visit;
|
|
77
|
-
})
|
|
40
|
+
});
|
|
78
41
|
};
|
|
79
|
-
|
|
80
|
-
* @return {?}
|
|
81
|
-
*/
|
|
82
|
-
PlaceComponent.prototype.isInitialised = /**
|
|
83
|
-
* @return {?}
|
|
84
|
-
*/
|
|
85
|
-
function () {
|
|
42
|
+
PlaceComponent.prototype.isInitialised = function () {
|
|
86
43
|
return !!this.visitModel.value;
|
|
87
44
|
};
|
|
88
45
|
// @Trace()
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @private
|
|
92
|
-
* @template T, S
|
|
93
|
-
* @param {?} parameterDef
|
|
94
|
-
* @return {?}
|
|
95
|
-
*/
|
|
96
|
-
PlaceComponent.prototype.installBinding =
|
|
97
|
-
// @Trace()
|
|
98
|
-
/**
|
|
99
|
-
* @private
|
|
100
|
-
* @template T, S
|
|
101
|
-
* @param {?} parameterDef
|
|
102
|
-
* @return {?}
|
|
103
|
-
*/
|
|
104
|
-
function (parameterDef) {
|
|
105
|
-
/** @type {?} */
|
|
106
|
-
var model = (/** @type {?} */ (this[parameterDef.propertyName]));
|
|
46
|
+
PlaceComponent.prototype.installBinding = function (parameterDef) {
|
|
47
|
+
var model = this[parameterDef.propertyName];
|
|
107
48
|
DebugContext.tag(model, this.placeDefinition.component.name + "." + parameterDef.propertyName);
|
|
108
|
-
/** @type {?} */
|
|
109
49
|
var binding = this.registerDisposable(new Binding(this.visitModel, model, {
|
|
110
|
-
toRight:
|
|
111
|
-
* @param {?} visit
|
|
112
|
-
* @return {?}
|
|
113
|
-
*/
|
|
114
|
-
function (visit) {
|
|
115
|
-
/** @type {?} */
|
|
50
|
+
toRight: function (visit) {
|
|
116
51
|
var value = visit.getParameter(parameterDef.name);
|
|
117
52
|
console.log('push to component', { name: parameterDef.name, value: value, visit: visit });
|
|
118
53
|
return value;
|
|
119
54
|
},
|
|
120
|
-
toLeft:
|
|
121
|
-
* @param {?} value
|
|
122
|
-
* @param {?=} currentVisit
|
|
123
|
-
* @return {?}
|
|
124
|
-
*/
|
|
125
|
-
function (value, currentVisit) {
|
|
55
|
+
toLeft: function (value, currentVisit) {
|
|
126
56
|
console.log('push to route', { name: parameterDef.name, value: value, currentVisit: currentVisit });
|
|
127
57
|
return currentVisit.replace(parameterDef, value);
|
|
128
58
|
}
|
|
@@ -130,89 +60,47 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
130
60
|
binding.writeRight();
|
|
131
61
|
};
|
|
132
62
|
Object.defineProperty(PlaceComponent.prototype, "placeDefinition", {
|
|
133
|
-
get:
|
|
134
|
-
|
|
135
|
-
*/
|
|
136
|
-
function () {
|
|
137
|
-
return PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
63
|
+
get: function () {
|
|
64
|
+
return PlaceComponent_1.getDefinition(this.constructor);
|
|
138
65
|
},
|
|
139
66
|
enumerable: true,
|
|
140
67
|
configurable: true
|
|
141
68
|
});
|
|
142
69
|
Object.defineProperty(PlaceComponent.prototype, "childPlaces", {
|
|
143
|
-
get:
|
|
144
|
-
|
|
145
|
-
*/
|
|
146
|
-
function () {
|
|
147
|
-
return this.placeDefinition.children.map((/**
|
|
148
|
-
* @param {?} d
|
|
149
|
-
* @return {?}
|
|
150
|
-
*/
|
|
151
|
-
function (d) { return d.component; }));
|
|
70
|
+
get: function () {
|
|
71
|
+
return this.placeDefinition.children.map(function (d) { return d.component; });
|
|
152
72
|
},
|
|
153
73
|
enumerable: true,
|
|
154
74
|
configurable: true
|
|
155
75
|
});
|
|
156
|
-
|
|
157
|
-
* @return {?}
|
|
158
|
-
*/
|
|
159
|
-
PlaceComponent.prototype.onPlaceReady = /**
|
|
160
|
-
* @return {?}
|
|
161
|
-
*/
|
|
162
|
-
function () {
|
|
76
|
+
PlaceComponent.prototype.onPlaceReady = function () {
|
|
163
77
|
};
|
|
164
|
-
|
|
78
|
+
var PlaceComponent_1;
|
|
79
|
+
__decorate([
|
|
165
80
|
Memoize(),
|
|
166
|
-
|
|
167
|
-
|
|
81
|
+
__metadata("design:type", PlaceDefinition),
|
|
82
|
+
__metadata("design:paramtypes", [])
|
|
168
83
|
], PlaceComponent.prototype, "placeDefinition", null);
|
|
84
|
+
PlaceComponent = PlaceComponent_1 = __decorate([
|
|
85
|
+
Directive(),
|
|
86
|
+
__metadata("design:paramtypes", [])
|
|
87
|
+
], PlaceComponent);
|
|
169
88
|
return PlaceComponent;
|
|
170
89
|
}(DisposableComponent));
|
|
171
90
|
export { PlaceComponent };
|
|
172
|
-
if (false) {
|
|
173
|
-
/**
|
|
174
|
-
* @type {?}
|
|
175
|
-
* @private
|
|
176
|
-
*/
|
|
177
|
-
PlaceComponent.prototype.visitModel;
|
|
178
|
-
/**
|
|
179
|
-
* @type {?}
|
|
180
|
-
* @private
|
|
181
|
-
*/
|
|
182
|
-
PlaceComponent.prototype._inVisitUpdate;
|
|
183
|
-
/** @type {?} */
|
|
184
|
-
PlaceComponent.prototype.interactionContext;
|
|
185
|
-
}
|
|
186
91
|
(function (PlaceComponent) {
|
|
187
|
-
/**
|
|
188
|
-
* @param {?} target
|
|
189
|
-
* @return {?}
|
|
190
|
-
*/
|
|
191
92
|
function isPlaceComponentConstructor(target) {
|
|
192
|
-
return lang.constructorChain(
|
|
93
|
+
return lang.constructorChain(target).includes(PlaceComponent);
|
|
193
94
|
}
|
|
194
95
|
PlaceComponent.isPlaceComponentConstructor = isPlaceComponentConstructor;
|
|
195
|
-
/**
|
|
196
|
-
* @param {?} klass
|
|
197
|
-
* @return {?}
|
|
198
|
-
*/
|
|
199
96
|
function getRouteParameters(klass) {
|
|
200
97
|
return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY);
|
|
201
98
|
}
|
|
202
99
|
PlaceComponent.getRouteParameters = getRouteParameters;
|
|
203
|
-
/**
|
|
204
|
-
* @param {?} klass
|
|
205
|
-
* @return {?}
|
|
206
|
-
*/
|
|
207
100
|
function getDefinition(klass) {
|
|
208
101
|
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
209
102
|
}
|
|
210
103
|
PlaceComponent.getDefinition = getDefinition;
|
|
211
|
-
/**
|
|
212
|
-
* @param {?} klass
|
|
213
|
-
* @param {?} definition
|
|
214
|
-
* @return {?}
|
|
215
|
-
*/
|
|
216
104
|
function injectDefinition(klass, definition) {
|
|
217
105
|
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);
|
|
218
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"place-component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-component.ts"],"names":[],"mappings":"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","sourcesContent":["import { Directive } from '@angular/core';\nimport {\n assert,\n Binding,\n Constructable,\n DebugContext,\n Dsl,\n Guard,\n IMutableHasValue,\n lang,\n MutableValueModel\n} from '@coolon/pectin';\nimport { Klass } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator';\nimport 'reflect-metadata';\nimport { DisposableComponent } from '../components/disposable-component';\nimport { InteractionContext } from '../interaction/interaction-context';\nimport { PlaceDefinition } from './place-definition';\nimport { ParameterDefinition } from './route/parameter-definition.class';\nimport { Visit } from './visit';\n\n// RAKE: making this Symbol(...) broke things.\nexport const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';\n// this one seems ok.\nexport const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');\n\n@Directive()\nexport class PlaceComponent extends DisposableComponent {\n\n private visitModel = new MutableValueModel<Visit>();\n private _inVisitUpdate = new Guard();\n\n interactionContext?: InteractionContext;\n\n canDeactivate?(interactionContext: InteractionContext): boolean | Promise<boolean>;\n\n constructor() {\n super();\n }\n\n // @Trace()\n public initialiseVisit(visit: Visit, notifyVisitChanged: (current: Visit, previous:Visit) => void) {\n assert.isNil(this.visitModel.value);\n\n const { when } = Dsl.disposeWith(this);\n\n this.visitModel.value = visit;\n DebugContext.get(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);\n this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => this.installBinding(parameterDef));\n when.valueOf(this.visitModel).changes((current,previous) => {\n notifyVisitChanged(current, previous);\n }, {unless: this._inVisitUpdate});\n }\n\n public updateVisit(visit: Visit) {\n assert.isTruthy(this.isInitialised());\n assert.notNil(visit);\n this._inVisitUpdate.whileTrue(() => {\n this.visitModel.value = visit;\n });\n }\n\n isInitialised() {\n return !!this.visitModel.value;\n }\n\n // @Trace()\n private installBinding<T, S>(parameterDef: ParameterDefinition<T, S>) {\n const model = this[parameterDef.propertyName] as IMutableHasValue<S>;\n DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);\n const binding = this.registerDisposable(new Binding(this.visitModel, model, {\n toRight(visit: Visit): S {\n const value = visit.getParameter(parameterDef.name);\n console.log('push to component', { name: parameterDef.name, value, visit });\n return value;\n },\n toLeft(value: S, currentVisit?: Visit): Visit {\n console.log('push to route', { name: parameterDef.name, value, currentVisit });\n return currentVisit.replace(parameterDef, value);\n }\n }));\n\n binding.writeRight();\n }\n\n @Memoize()\n get placeDefinition(): PlaceDefinition {\n return PlaceComponent.getDefinition(this.constructor as any as Constructable<PlaceComponent>);\n }\n\n get childPlaces(): Constructable<PlaceComponent>[] {\n return this.placeDefinition.children.map(d => d.component);\n }\n\n onPlaceReady() {\n }\n\n}\n\nexport namespace PlaceComponent {\n\n export function isPlaceComponentConstructor(target: any): target is Constructable<PlaceComponent> {\n return lang.constructorChain(target as Constructable<any>).includes(PlaceComponent);\n }\n\n export function getRouteParameters(klass: Constructable<PlaceComponent>): ParameterDefinition<any>[] {\n return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY) as ParameterDefinition<any>[];\n }\n\n export function getDefinition(klass: Constructable<PlaceComponent>): PlaceDefinition {\n return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);\n }\n\n export function injectDefinition(klass: Constructable<PlaceComponent>, definition: PlaceDefinition) {\n Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);\n }\n\n}\n"]}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
1
|
import { InjectionToken } from '@angular/core';
|
|
6
|
-
/** @type {?} */
|
|
7
2
|
export var AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
8
|
-
/**
|
|
9
|
-
* @record
|
|
10
|
-
*/
|
|
11
|
-
export function PlaceConfig() { }
|
|
12
|
-
if (false) {
|
|
13
|
-
/** @type {?} */
|
|
14
|
-
PlaceConfig.prototype.animationDuration;
|
|
15
|
-
}
|
|
16
3
|
//# sourceMappingURL=place-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-config.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"place-config.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,IAAM,gBAAgB,GAAG,IAAI,cAAc,CAAc,kBAAkB,CAAC,CAAC","sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const AUP_PLACE_CONFIG = new InjectionToken<PlaceConfig>('AUP_PLACE_CONFIG');\n\nexport interface PlaceConfig {\n animationDuration: string;\n}\n"]}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
6
2
|
import { assert } from '@coolon/pectin';
|
|
7
3
|
import { Opts } from '@coolon/typescript-utilities';
|
|
8
4
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
@@ -17,249 +13,100 @@ var PlaceDefinition = /** @class */ (function () {
|
|
|
17
13
|
this.routeParameters = routeParameters;
|
|
18
14
|
this.children = children;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
|
-
* @return {?}
|
|
22
|
-
*/
|
|
23
|
-
PlaceDefinition.prototype.hasRouteId = /**
|
|
24
|
-
* @return {?}
|
|
25
|
-
*/
|
|
26
|
-
function () {
|
|
16
|
+
PlaceDefinition.prototype.hasRouteId = function () {
|
|
27
17
|
return !!this.getRouteIdParameterDef();
|
|
28
18
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
PlaceDefinition.prototype.getRouteIdParameterDef = /**
|
|
33
|
-
* @return {?}
|
|
34
|
-
*/
|
|
35
|
-
function () {
|
|
36
|
-
return this.routeParameters.find((/**
|
|
37
|
-
* @param {?} p
|
|
38
|
-
* @return {?}
|
|
39
|
-
*/
|
|
40
|
-
function (p) { return p.isRouteId; }));
|
|
19
|
+
PlaceDefinition.prototype.getRouteIdParameterDef = function () {
|
|
20
|
+
return this.routeParameters.find(function (p) { return p.isRouteId; });
|
|
41
21
|
};
|
|
42
|
-
|
|
43
|
-
* @param {?=} includeRouteId
|
|
44
|
-
* @return {?}
|
|
45
|
-
*/
|
|
46
|
-
PlaceDefinition.prototype.getRouteParameterDefs = /**
|
|
47
|
-
* @param {?=} includeRouteId
|
|
48
|
-
* @return {?}
|
|
49
|
-
*/
|
|
50
|
-
function (includeRouteId) {
|
|
22
|
+
PlaceDefinition.prototype.getRouteParameterDefs = function (includeRouteId) {
|
|
51
23
|
if (includeRouteId === void 0) { includeRouteId = false; }
|
|
52
24
|
return this.getVisitParameterDefs({ includeRouteId: includeRouteId, includeRouteParameters: true });
|
|
53
25
|
};
|
|
54
|
-
|
|
55
|
-
* @param {?=} include
|
|
56
|
-
* @return {?}
|
|
57
|
-
*/
|
|
58
|
-
PlaceDefinition.prototype.getVisitParameterDefs = /**
|
|
59
|
-
* @param {?=} include
|
|
60
|
-
* @return {?}
|
|
61
|
-
*/
|
|
62
|
-
function (include) {
|
|
63
|
-
/** @type {?} */
|
|
26
|
+
PlaceDefinition.prototype.getVisitParameterDefs = function (include) {
|
|
64
27
|
var opts = Opts.get(include);
|
|
65
28
|
// includes
|
|
66
|
-
/** @type {?} */
|
|
67
29
|
var includeRouteId = !include || opts.getOptional('includeRouteId', false);
|
|
68
|
-
/** @type {?} */
|
|
69
30
|
var includeRouteParameters = !include || opts.getOptional('includeRouteParameters', false);
|
|
70
|
-
/** @type {?} */
|
|
71
31
|
var includeNonRouteParameters = !include || opts.getOptional('includeNonRouteParameters', false);
|
|
72
|
-
return this.routeParameters.filter((
|
|
73
|
-
* @param {?} p
|
|
74
|
-
* @return {?}
|
|
75
|
-
*/
|
|
76
|
-
function (p) {
|
|
32
|
+
return this.routeParameters.filter(function (p) {
|
|
77
33
|
return (includeRouteId && p.isRouteId)
|
|
78
34
|
|| (includeRouteParameters && p.isRouteParameter && !p.isRouteId) // route id is included in the line above
|
|
79
35
|
|| (includeNonRouteParameters && !p.isRouteParameter);
|
|
80
|
-
})
|
|
36
|
+
});
|
|
81
37
|
};
|
|
82
|
-
|
|
83
|
-
* @template T
|
|
84
|
-
* @param {?} key
|
|
85
|
-
* @param {?=} defaultValue
|
|
86
|
-
* @return {?}
|
|
87
|
-
*/
|
|
88
|
-
PlaceDefinition.prototype.getPlaceData = /**
|
|
89
|
-
* @template T
|
|
90
|
-
* @param {?} key
|
|
91
|
-
* @param {?=} defaultValue
|
|
92
|
-
* @return {?}
|
|
93
|
-
*/
|
|
94
|
-
function (key, defaultValue) {
|
|
38
|
+
PlaceDefinition.prototype.getPlaceData = function (key, defaultValue) {
|
|
95
39
|
return this.data ?
|
|
96
40
|
_.isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
97
41
|
defaultValue;
|
|
98
42
|
};
|
|
99
|
-
|
|
100
|
-
* @template T
|
|
101
|
-
* @param {?} keys
|
|
102
|
-
* @param {?=} defaultValue
|
|
103
|
-
* @return {?}
|
|
104
|
-
*/
|
|
105
|
-
PlaceDefinition.prototype.searchPlaceData = /**
|
|
106
|
-
* @template T
|
|
107
|
-
* @param {?} keys
|
|
108
|
-
* @param {?=} defaultValue
|
|
109
|
-
* @return {?}
|
|
110
|
-
*/
|
|
111
|
-
function (keys, defaultValue) {
|
|
43
|
+
PlaceDefinition.prototype.searchPlaceData = function (keys, defaultValue) {
|
|
112
44
|
var _this = this;
|
|
113
45
|
if (this.data) {
|
|
114
|
-
|
|
115
|
-
var found = keys.find((/**
|
|
116
|
-
* @param {?} key
|
|
117
|
-
* @return {?}
|
|
118
|
-
*/
|
|
119
|
-
function (key) { return !_.isNil(_this.data[key]); }));
|
|
46
|
+
var found = keys.find(function (key) { return !_.isNil(_this.data[key]); });
|
|
120
47
|
return found ? this.data[found] : defaultValue;
|
|
121
48
|
}
|
|
122
49
|
else {
|
|
123
50
|
return defaultValue;
|
|
124
51
|
}
|
|
125
52
|
};
|
|
126
|
-
|
|
127
|
-
* @param {?} visit
|
|
128
|
-
* @return {?}
|
|
129
|
-
*/
|
|
130
|
-
PlaceDefinition.prototype.getRouteIdFrom = /**
|
|
131
|
-
* @param {?} visit
|
|
132
|
-
* @return {?}
|
|
133
|
-
*/
|
|
134
|
-
function (visit) {
|
|
135
|
-
/** @type {?} */
|
|
53
|
+
PlaceDefinition.prototype.getRouteIdFrom = function (visit) {
|
|
136
54
|
var routeIdParameterDef = this.getRouteIdParameterDef();
|
|
137
55
|
return routeIdParameterDef ? visit.getParameter(routeIdParameterDef.name) : null;
|
|
138
56
|
};
|
|
139
|
-
|
|
140
|
-
* @param {?} visit
|
|
141
|
-
* @return {?}
|
|
142
|
-
*/
|
|
143
|
-
PlaceDefinition.prototype.getFormattedRouteId = /**
|
|
144
|
-
* @param {?} visit
|
|
145
|
-
* @return {?}
|
|
146
|
-
*/
|
|
147
|
-
function (visit) {
|
|
57
|
+
PlaceDefinition.prototype.getFormattedRouteId = function (visit) {
|
|
148
58
|
// Note: RouteIds are always present in the url and are just empty strings when not defined. This is
|
|
149
59
|
// mandated by the fact that redirects from <path> to <path>/:id always include the id parameter as
|
|
150
60
|
// an empty string.
|
|
151
61
|
return visit.hasRouteId() ? this.getRouteIdParameterDef().urlFormat.format(visit.getRouteId()) : "";
|
|
152
62
|
};
|
|
153
63
|
// @Trace()
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @param {?} visit
|
|
157
|
-
* @param {?=} includeRouteId
|
|
158
|
-
* @return {?}
|
|
159
|
-
*/
|
|
160
|
-
PlaceDefinition.prototype.getFormattedRouteParameters =
|
|
161
|
-
// @Trace()
|
|
162
|
-
/**
|
|
163
|
-
* @param {?} visit
|
|
164
|
-
* @param {?=} includeRouteId
|
|
165
|
-
* @return {?}
|
|
166
|
-
*/
|
|
167
|
-
function (visit, includeRouteId) {
|
|
64
|
+
PlaceDefinition.prototype.getFormattedRouteParameters = function (visit, includeRouteId) {
|
|
168
65
|
if (includeRouteId === void 0) { includeRouteId = false; }
|
|
169
|
-
/** @type {?} */
|
|
170
66
|
var result = {};
|
|
171
67
|
this.getVisitParameterDefs({
|
|
172
68
|
includeRouteId: includeRouteId, includeRouteParameters: true
|
|
173
|
-
}).forEach((
|
|
174
|
-
* @param {?} def
|
|
175
|
-
* @return {?}
|
|
176
|
-
*/
|
|
177
|
-
function (def) {
|
|
178
|
-
/** @type {?} */
|
|
69
|
+
}).forEach(function (def) {
|
|
179
70
|
var value = visit.getParameter(def.name);
|
|
180
71
|
if (!def.isEmptyValue(value)) {
|
|
181
72
|
if (def.isArray) {
|
|
182
73
|
assert.isArray(value);
|
|
183
|
-
result[def.name] = value.map((
|
|
184
|
-
* @param {?} v
|
|
185
|
-
* @return {?}
|
|
186
|
-
*/
|
|
187
|
-
function (v) { return def.urlFormat.format(v); }));
|
|
74
|
+
result[def.name] = value.map(function (v) { return def.urlFormat.format(v); });
|
|
188
75
|
}
|
|
189
76
|
else {
|
|
190
77
|
assert.isFalsey(Array.isArray(value));
|
|
191
78
|
result[def.name] = def.urlFormat.format(value);
|
|
192
79
|
}
|
|
193
80
|
}
|
|
194
|
-
})
|
|
81
|
+
});
|
|
195
82
|
return result;
|
|
196
83
|
};
|
|
197
|
-
|
|
198
|
-
* @param {?} visit
|
|
199
|
-
* @return {?}
|
|
200
|
-
*/
|
|
201
|
-
PlaceDefinition.prototype.getNonRouteParameters = /**
|
|
202
|
-
* @param {?} visit
|
|
203
|
-
* @return {?}
|
|
204
|
-
*/
|
|
205
|
-
function (visit) {
|
|
206
|
-
/** @type {?} */
|
|
84
|
+
PlaceDefinition.prototype.getNonRouteParameters = function (visit) {
|
|
207
85
|
var result = {};
|
|
208
|
-
this.getVisitParameterDefs({ includeNonRouteParameters: true }).forEach((
|
|
209
|
-
* @param {?} def
|
|
210
|
-
* @return {?}
|
|
211
|
-
*/
|
|
212
|
-
function (def) {
|
|
213
|
-
/** @type {?} */
|
|
86
|
+
this.getVisitParameterDefs({ includeNonRouteParameters: true }).forEach(function (def) {
|
|
214
87
|
var value = visit.getParameter(def.name);
|
|
215
88
|
if (!def.isEmptyValue(value)) {
|
|
216
89
|
result[def.name] = value;
|
|
217
90
|
}
|
|
218
|
-
})
|
|
91
|
+
});
|
|
219
92
|
return result;
|
|
220
93
|
};
|
|
221
94
|
// @Trace()
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @param {?} params
|
|
225
|
-
* @return {?}
|
|
226
|
-
*/
|
|
227
|
-
PlaceDefinition.prototype.parseRouteParams =
|
|
228
|
-
// @Trace()
|
|
229
|
-
/**
|
|
230
|
-
* @param {?} params
|
|
231
|
-
* @return {?}
|
|
232
|
-
*/
|
|
233
|
-
function (params) {
|
|
234
|
-
/** @type {?} */
|
|
95
|
+
PlaceDefinition.prototype.parseRouteParams = function (params) {
|
|
235
96
|
var result = {};
|
|
236
97
|
this.getVisitParameterDefs({
|
|
237
98
|
includeRouteId: true,
|
|
238
99
|
includeRouteParameters: true,
|
|
239
100
|
includeNonRouteParameters: false
|
|
240
|
-
}).forEach((
|
|
241
|
-
* @param {?} def
|
|
242
|
-
* @return {?}
|
|
243
|
-
*/
|
|
244
|
-
function (def) {
|
|
101
|
+
}).forEach(function (def) {
|
|
245
102
|
// params will return null for non existent names
|
|
246
103
|
if (params.has(def.name)) {
|
|
247
104
|
if (def.isArray) {
|
|
248
105
|
// const values = params.getAll(def.name); // TODO: EEEK getAll is returning ["1,2,3,4"] when we gave it ["1","2","3","4"].
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
* @param {?} s
|
|
252
|
-
* @return {?}
|
|
253
|
-
*/
|
|
254
|
-
function (s) { return s.trim(); }));
|
|
255
|
-
result[def.name] = values.map((/**
|
|
256
|
-
* @param {?} v
|
|
257
|
-
* @return {?}
|
|
258
|
-
*/
|
|
259
|
-
function (v) { return def.urlFormat.parse(v); }));
|
|
106
|
+
var values = params.get(def.name).split(',').map(function (s) { return s.trim(); });
|
|
107
|
+
result[def.name] = values.map(function (v) { return def.urlFormat.parse(v); });
|
|
260
108
|
}
|
|
261
109
|
else {
|
|
262
|
-
/** @type {?} */
|
|
263
110
|
var value = params.get(def.name);
|
|
264
111
|
if (def.isRouteId) { // TODO: Move this to parameter def so it's a strategy pattern
|
|
265
112
|
// because our id routes redirect if the id isn't present we always have a id
|
|
@@ -274,57 +121,28 @@ var PlaceDefinition = /** @class */ (function () {
|
|
|
274
121
|
}
|
|
275
122
|
}
|
|
276
123
|
}
|
|
277
|
-
})
|
|
124
|
+
});
|
|
278
125
|
return result;
|
|
279
126
|
};
|
|
280
|
-
|
|
127
|
+
__decorate([
|
|
281
128
|
Memoize(),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
129
|
+
__metadata("design:type", Function),
|
|
130
|
+
__metadata("design:paramtypes", []),
|
|
131
|
+
__metadata("design:returntype", ParameterDefinition)
|
|
285
132
|
], PlaceDefinition.prototype, "getRouteIdParameterDef", null);
|
|
286
|
-
|
|
133
|
+
__decorate([
|
|
287
134
|
Memoize(),
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
135
|
+
__metadata("design:type", Function),
|
|
136
|
+
__metadata("design:paramtypes", [Object]),
|
|
137
|
+
__metadata("design:returntype", Array)
|
|
291
138
|
], PlaceDefinition.prototype, "getRouteParameterDefs", null);
|
|
292
|
-
|
|
139
|
+
__decorate([
|
|
293
140
|
Memoize(),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
141
|
+
__metadata("design:type", Function),
|
|
142
|
+
__metadata("design:paramtypes", [Object]),
|
|
143
|
+
__metadata("design:returntype", Array)
|
|
297
144
|
], PlaceDefinition.prototype, "getVisitParameterDefs", null);
|
|
298
145
|
return PlaceDefinition;
|
|
299
146
|
}());
|
|
300
147
|
export { PlaceDefinition };
|
|
301
|
-
if (false) {
|
|
302
|
-
/** @type {?} */
|
|
303
|
-
PlaceDefinition.prototype.component;
|
|
304
|
-
/** @type {?} */
|
|
305
|
-
PlaceDefinition.prototype.path;
|
|
306
|
-
/** @type {?} */
|
|
307
|
-
PlaceDefinition.prototype.authenticate;
|
|
308
|
-
/** @type {?} */
|
|
309
|
-
PlaceDefinition.prototype.data;
|
|
310
|
-
/** @type {?} */
|
|
311
|
-
PlaceDefinition.prototype.routeParameters;
|
|
312
|
-
/** @type {?} */
|
|
313
|
-
PlaceDefinition.prototype.children;
|
|
314
|
-
}
|
|
315
|
-
(function (PlaceDefinition) {
|
|
316
|
-
/**
|
|
317
|
-
* @record
|
|
318
|
-
*/
|
|
319
|
-
function ParameterOptions() { }
|
|
320
|
-
PlaceDefinition.ParameterOptions = ParameterOptions;
|
|
321
|
-
if (false) {
|
|
322
|
-
/** @type {?|undefined} */
|
|
323
|
-
ParameterOptions.prototype.includeRouteId;
|
|
324
|
-
/** @type {?|undefined} */
|
|
325
|
-
ParameterOptions.prototype.includeRouteParameters;
|
|
326
|
-
/** @type {?|undefined} */
|
|
327
|
-
ParameterOptions.prototype.includeNonRouteParameters;
|
|
328
|
-
}
|
|
329
|
-
})(PlaceDefinition || (PlaceDefinition = {}));
|
|
330
148
|
//# sourceMappingURL=place-definition.js.map
|