@coolon/angular-ui-powerups 0.0.135 → 1.0.0-alpha.12
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 +303 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +1142 -6275
- 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.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +1 -5
- package/esm2015/coolon-angular-ui-powerups.js.map +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 +39 -39
- 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 -17
- package/esm2015/lib/components/index.js.map +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 +12 -18
- package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -1
- 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 +1 -5
- 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 +36 -37
- 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 -17
- 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 +10 -20
- package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -1
- 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 +861 -4526
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1129 -6274
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +9 -9
- package/lib/components/resize-aware.component.d.ts +3 -3
- 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,91 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
1
|
import { Binding, DebugContext, Logger, MutableListModel, MutableValueModel } from '@coolon/pectin';
|
|
6
2
|
import { Klass, Opts } from '@coolon/typescript-utilities';
|
|
7
3
|
import { ROUTE_PARAMETER_LIST_KEY } from '../place-component';
|
|
8
4
|
import { ParameterDefinition } from './parameter-definition.class';
|
|
9
|
-
/**
|
|
10
|
-
* @record
|
|
11
|
-
* @template T
|
|
12
|
-
*/
|
|
13
|
-
export function RouteIdOptions() { }
|
|
14
|
-
if (false) {
|
|
15
|
-
/** @type {?|undefined} */
|
|
16
|
-
RouteIdOptions.prototype.as;
|
|
17
|
-
/** @type {?|undefined} */
|
|
18
|
-
RouteIdOptions.prototype.optional;
|
|
19
|
-
/** @type {?|undefined} */
|
|
20
|
-
RouteIdOptions.prototype.remember;
|
|
21
|
-
/** @type {?|undefined} */
|
|
22
|
-
RouteIdOptions.prototype.defaultValue;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @record
|
|
26
|
-
* @template T
|
|
27
|
-
*/
|
|
28
|
-
export function RouteParameterOptions() { }
|
|
29
|
-
if (false) {
|
|
30
|
-
/** @type {?|undefined} */
|
|
31
|
-
RouteParameterOptions.prototype.as;
|
|
32
|
-
/** @type {?|undefined} */
|
|
33
|
-
RouteParameterOptions.prototype.optional;
|
|
34
|
-
/** @type {?|undefined} */
|
|
35
|
-
RouteParameterOptions.prototype.remember;
|
|
36
|
-
/** @type {?|undefined} */
|
|
37
|
-
RouteParameterOptions.prototype.defaultValue;
|
|
38
|
-
/** @type {?|undefined} */
|
|
39
|
-
RouteParameterOptions.prototype.storeInUrl;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @record
|
|
43
|
-
* @template T
|
|
44
|
-
*/
|
|
45
|
-
export function RouteListParameterOptions() { }
|
|
46
|
-
if (false) {
|
|
47
|
-
/** @type {?|undefined} */
|
|
48
|
-
RouteListParameterOptions.prototype.as;
|
|
49
|
-
/** @type {?|undefined} */
|
|
50
|
-
RouteListParameterOptions.prototype.optional;
|
|
51
|
-
/** @type {?|undefined} */
|
|
52
|
-
RouteListParameterOptions.prototype.remember;
|
|
53
|
-
/** @type {?|undefined} */
|
|
54
|
-
RouteListParameterOptions.prototype.defaultValue;
|
|
55
|
-
/** @type {?|undefined} */
|
|
56
|
-
RouteListParameterOptions.prototype.storeInUrl;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @template M
|
|
60
|
-
* @param {?} prototype
|
|
61
|
-
* @param {?} propertyKey
|
|
62
|
-
* @param {?} backingModel
|
|
63
|
-
* @param {?} tagPrefix
|
|
64
|
-
* @param {?} isEmpty
|
|
65
|
-
* @return {?}
|
|
66
|
-
*/
|
|
67
5
|
function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmpty) {
|
|
68
|
-
/** @type {?} */
|
|
69
6
|
var mechanics = {
|
|
70
7
|
backingModel: backingModel,
|
|
71
|
-
binding:
|
|
8
|
+
binding: null
|
|
72
9
|
};
|
|
73
|
-
/** @type {?} */
|
|
74
10
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
75
11
|
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
76
12
|
Logger.get(mechanics.backingModel).tag(tag);
|
|
77
13
|
Object.defineProperty(prototype, propertyKey, {
|
|
78
|
-
get: (
|
|
79
|
-
* @return {?}
|
|
80
|
-
*/
|
|
81
|
-
function () {
|
|
14
|
+
get: function () {
|
|
82
15
|
return mechanics.backingModel;
|
|
83
|
-
}
|
|
84
|
-
set: (
|
|
85
|
-
* @param {?} userModel
|
|
86
|
-
* @return {?}
|
|
87
|
-
*/
|
|
88
|
-
function (userModel) {
|
|
16
|
+
},
|
|
17
|
+
set: function (userModel) {
|
|
89
18
|
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
90
19
|
// to and from the route.
|
|
91
20
|
if (mechanics.binding) {
|
|
@@ -104,78 +33,30 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
|
|
|
104
33
|
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
105
34
|
}
|
|
106
35
|
}
|
|
107
|
-
}
|
|
36
|
+
}
|
|
108
37
|
});
|
|
109
38
|
}
|
|
110
|
-
/**
|
|
111
|
-
* @template T
|
|
112
|
-
* @param {?} type
|
|
113
|
-
* @param {?=} options
|
|
114
|
-
* @return {?}
|
|
115
|
-
*/
|
|
116
39
|
export function RouteId(type, options) {
|
|
117
|
-
return (
|
|
118
|
-
* @param {?} prototype
|
|
119
|
-
* @param {?} propertyKey
|
|
120
|
-
* @return {?}
|
|
121
|
-
*/
|
|
122
|
-
function (prototype, propertyKey) {
|
|
123
|
-
/** @type {?} */
|
|
40
|
+
return function (prototype, propertyKey) {
|
|
124
41
|
var param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);
|
|
125
42
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
126
|
-
installMechanics(prototype, propertyKey, new MutableValueModel(), "@RouteId", (
|
|
127
|
-
|
|
128
|
-
* @return {?}
|
|
129
|
-
*/
|
|
130
|
-
function (m) { return m.query().isNil(); }));
|
|
131
|
-
});
|
|
43
|
+
installMechanics(prototype, propertyKey, new MutableValueModel(), "@RouteId", function (m) { return m.query().isNil(); });
|
|
44
|
+
};
|
|
132
45
|
}
|
|
133
|
-
/**
|
|
134
|
-
* @template T
|
|
135
|
-
* @param {?=} options
|
|
136
|
-
* @return {?}
|
|
137
|
-
*/
|
|
138
46
|
export function VisitParameter(options) {
|
|
139
|
-
/** @type {?} */
|
|
140
47
|
var opts = Opts.get(options);
|
|
141
|
-
return (
|
|
142
|
-
* @param {?} prototype
|
|
143
|
-
* @param {?} propertyKey
|
|
144
|
-
* @return {?}
|
|
145
|
-
*/
|
|
146
|
-
function (prototype, propertyKey) {
|
|
147
|
-
/** @type {?} */
|
|
48
|
+
return function (prototype, propertyKey) {
|
|
148
49
|
var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
149
50
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
150
|
-
installMechanics(prototype, propertyKey, new MutableValueModel(), "@VisitParameter", (
|
|
151
|
-
|
|
152
|
-
* @return {?}
|
|
153
|
-
*/
|
|
154
|
-
function (m) { return m.query().isNil(); }));
|
|
155
|
-
});
|
|
51
|
+
installMechanics(prototype, propertyKey, new MutableValueModel(), "@VisitParameter", function (m) { return m.query().isNil(); });
|
|
52
|
+
};
|
|
156
53
|
}
|
|
157
|
-
/**
|
|
158
|
-
* @template E
|
|
159
|
-
* @param {?=} options
|
|
160
|
-
* @return {?}
|
|
161
|
-
*/
|
|
162
54
|
export function VisitParameterList(options) {
|
|
163
|
-
/** @type {?} */
|
|
164
55
|
var opts = Opts.get(options);
|
|
165
|
-
return (
|
|
166
|
-
* @param {?} prototype
|
|
167
|
-
* @param {?} propertyKey
|
|
168
|
-
* @return {?}
|
|
169
|
-
*/
|
|
170
|
-
function (prototype, propertyKey) {
|
|
171
|
-
/** @type {?} */
|
|
56
|
+
return function (prototype, propertyKey) {
|
|
172
57
|
var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
173
58
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
174
|
-
installMechanics(prototype, propertyKey, new MutableListModel(), "@VisitParameterList", (
|
|
175
|
-
|
|
176
|
-
* @return {?}
|
|
177
|
-
*/
|
|
178
|
-
function (m) { return m.query().isEmpty(); }));
|
|
179
|
-
});
|
|
59
|
+
installMechanics(prototype, propertyKey, new MutableListModel(), "@VisitParameterList", function (m) { return m.query().isEmpty(); });
|
|
60
|
+
};
|
|
180
61
|
}
|
|
181
62
|
//# sourceMappingURL=parameter-decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-decorators.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-decorators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameter-decorators.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-decorators.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n Binding,\n DebugContext,\n HasValue,\n Logger,\n MutableListModel,\n MutableValueModel,\n UseDelegate\n} from '@coolon/pectin';\nimport { Klass, Opts } from '@coolon/typescript-utilities';\nimport { ROUTE_PARAMETER_LIST_KEY } from '../place-component';\nimport { Formatter } from './formatter';\nimport { ParameterDefinition } from './parameter-definition.class';\n\n\nexport interface RouteIdOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteListParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T[];\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T[]>> | ParameterSanitiser<T[]>;\n}\n\n\nfunction installMechanics<M extends HasValue<any>>(prototype: Object, propertyKey: string | symbol, backingModel: M, tagPrefix: string, isEmpty: (mode: M) => boolean) {\n const mechanics = {\n backingModel: backingModel,\n binding: null as Binding<any, any>\n };\n const tag = `${tagPrefix}(${prototype.constructor.name}.${propertyKey.toString()})`;\n DebugContext.get(mechanics.backingModel).tag(tag);\n Logger.get(mechanics.backingModel).tag(tag);\n Object.defineProperty(prototype, propertyKey, {\n get: function() {\n return mechanics.backingModel;\n },\n set: function(userModel: M) {\n // This handles the scenario where we want to push an existing value model (such as a form model)\n // to and from the route.\n if (mechanics.binding) {\n mechanics.binding.dispose();\n }\n if (userModel) {\n mechanics.binding = new Binding(mechanics.backingModel, userModel);\n if (isEmpty(userModel)) {\n // console.log(`Push visit to model for ${tag}`, {value: mechanics.backingModel.value});\n mechanics.binding.writeRight(); // push the visit into the user model;\n } else {\n if (!isEmpty(mechanics.backingModel)) {\n console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');\n }\n mechanics.binding.writeLeft(); // push the user model into the visit\n }\n }\n }\n });\n}\n\nexport function RouteId<T extends string | number>(type: Formatter<T>, options?: RouteIdOptions<T>): PropertyDecorator {\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), \"@RouteId\", m => m.query().isNil());\n };\n}\n\nexport function VisitParameter<T>(options?: RouteParameterOptions<T>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), \"@VisitParameter\", m => m.query().isNil());\n };\n}\n\nexport function VisitParameterList<E>(options?: RouteListParameterOptions<E>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableListModel<E>(), \"@VisitParameterList\", m => m.query().isEmpty());\n };\n}\n"]}
|
|
@@ -1,19 +1,7 @@
|
|
|
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 { __awaiter, __extends, __generator } from "tslib";
|
|
6
2
|
import { Opts } from '@coolon/typescript-utilities';
|
|
7
3
|
import _ from 'lodash';
|
|
8
|
-
/**
|
|
9
|
-
* @abstract
|
|
10
|
-
* @template T, E
|
|
11
|
-
*/
|
|
12
|
-
var /**
|
|
13
|
-
* @abstract
|
|
14
|
-
* @template T, E
|
|
15
|
-
*/
|
|
16
|
-
ParameterDefinition = /** @class */ (function () {
|
|
4
|
+
var ParameterDefinition = /** @class */ (function () {
|
|
17
5
|
function ParameterDefinition(propertyName, options, urlFormat) {
|
|
18
6
|
this.propertyName = propertyName;
|
|
19
7
|
this.urlFormat = urlFormat;
|
|
@@ -22,10 +10,7 @@ ParameterDefinition = /** @class */ (function () {
|
|
|
22
10
|
this.defaultValue = this.options.getOptional('defaultValue', null);
|
|
23
11
|
}
|
|
24
12
|
Object.defineProperty(ParameterDefinition.prototype, "name", {
|
|
25
|
-
get:
|
|
26
|
-
* @return {?}
|
|
27
|
-
*/
|
|
28
|
-
function () {
|
|
13
|
+
get: function () {
|
|
29
14
|
return this.options.getOptional('as', this.propertyName);
|
|
30
15
|
},
|
|
31
16
|
enumerable: true,
|
|
@@ -33,54 +18,20 @@ ParameterDefinition = /** @class */ (function () {
|
|
|
33
18
|
});
|
|
34
19
|
Object.defineProperty(ParameterDefinition.prototype, "isRouteParameter", {
|
|
35
20
|
// @Trace()
|
|
36
|
-
get:
|
|
37
|
-
// @Trace()
|
|
38
|
-
/**
|
|
39
|
-
* @return {?}
|
|
40
|
-
*/
|
|
41
|
-
function () {
|
|
21
|
+
get: function () {
|
|
42
22
|
return !!this.urlFormat;
|
|
43
23
|
},
|
|
44
24
|
enumerable: true,
|
|
45
25
|
configurable: true
|
|
46
26
|
});
|
|
47
|
-
|
|
48
|
-
* @protected
|
|
49
|
-
* @template K
|
|
50
|
-
* @param {?} key
|
|
51
|
-
* @return {?}
|
|
52
|
-
*/
|
|
53
|
-
ParameterDefinition.prototype.getOptionValue = /**
|
|
54
|
-
* @protected
|
|
55
|
-
* @template K
|
|
56
|
-
* @param {?} key
|
|
57
|
-
* @return {?}
|
|
58
|
-
*/
|
|
59
|
-
function (key) {
|
|
27
|
+
ParameterDefinition.prototype.getOptionValue = function (key) {
|
|
60
28
|
return this.options.getOptional(key, null);
|
|
61
29
|
};
|
|
62
30
|
// @Trace()
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* @param {?} value
|
|
66
|
-
* @param {?} visit
|
|
67
|
-
* @param {?} placeHistory
|
|
68
|
-
* @param {?} injector
|
|
69
|
-
* @return {?}
|
|
70
|
-
*/
|
|
71
|
-
ParameterDefinition.prototype.sanitise =
|
|
72
|
-
// @Trace()
|
|
73
|
-
/**
|
|
74
|
-
* @param {?} value
|
|
75
|
-
* @param {?} visit
|
|
76
|
-
* @param {?} placeHistory
|
|
77
|
-
* @param {?} injector
|
|
78
|
-
* @return {?}
|
|
79
|
-
*/
|
|
80
|
-
function (value, visit, placeHistory, injector) {
|
|
81
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
31
|
+
ParameterDefinition.prototype.sanitise = function (value, visit, placeHistory, injector) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
82
33
|
var previousVisit;
|
|
83
|
-
return
|
|
34
|
+
return __generator(this, function (_a) {
|
|
84
35
|
if (this.isMissingFrom(visit)) {
|
|
85
36
|
previousVisit = _.first(placeHistory.getHistory(visit.placeDefinition));
|
|
86
37
|
if (this.remember && previousVisit) {
|
|
@@ -96,215 +47,63 @@ ParameterDefinition = /** @class */ (function () {
|
|
|
96
47
|
});
|
|
97
48
|
});
|
|
98
49
|
};
|
|
99
|
-
|
|
100
|
-
* @private
|
|
101
|
-
* @param {?} visit
|
|
102
|
-
* @return {?}
|
|
103
|
-
*/
|
|
104
|
-
ParameterDefinition.prototype.isMissingFrom = /**
|
|
105
|
-
* @private
|
|
106
|
-
* @param {?} visit
|
|
107
|
-
* @return {?}
|
|
108
|
-
*/
|
|
109
|
-
function (visit) {
|
|
50
|
+
ParameterDefinition.prototype.isMissingFrom = function (visit) {
|
|
110
51
|
return !visit.hasParameter(this.name);
|
|
111
52
|
};
|
|
112
53
|
return ParameterDefinition;
|
|
113
54
|
}());
|
|
114
|
-
/**
|
|
115
|
-
* @abstract
|
|
116
|
-
* @template T, E
|
|
117
|
-
*/
|
|
118
55
|
export { ParameterDefinition };
|
|
119
|
-
if (false) {
|
|
120
|
-
/** @type {?} */
|
|
121
|
-
ParameterDefinition.prototype.isRouteId;
|
|
122
|
-
/** @type {?} */
|
|
123
|
-
ParameterDefinition.prototype.isArray;
|
|
124
|
-
/** @type {?} */
|
|
125
|
-
ParameterDefinition.prototype.remember;
|
|
126
|
-
/** @type {?} */
|
|
127
|
-
ParameterDefinition.prototype.defaultValue;
|
|
128
|
-
/**
|
|
129
|
-
* @type {?}
|
|
130
|
-
* @private
|
|
131
|
-
*/
|
|
132
|
-
ParameterDefinition.prototype.options;
|
|
133
|
-
/** @type {?} */
|
|
134
|
-
ParameterDefinition.prototype.propertyName;
|
|
135
|
-
/** @type {?} */
|
|
136
|
-
ParameterDefinition.prototype.urlFormat;
|
|
137
|
-
/**
|
|
138
|
-
* @abstract
|
|
139
|
-
* @param {?} value
|
|
140
|
-
* @return {?}
|
|
141
|
-
*/
|
|
142
|
-
ParameterDefinition.prototype.isEmptyValue = function (value) { };
|
|
143
|
-
/**
|
|
144
|
-
* @abstract
|
|
145
|
-
* @param {?} a
|
|
146
|
-
* @param {?} b
|
|
147
|
-
* @return {?}
|
|
148
|
-
*/
|
|
149
|
-
ParameterDefinition.prototype.hasChanged = function (a, b) { };
|
|
150
|
-
}
|
|
151
56
|
(function (ParameterDefinition) {
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
* @template T
|
|
155
|
-
*/
|
|
156
|
-
function Options() { }
|
|
157
|
-
ParameterDefinition.Options = Options;
|
|
158
|
-
if (false) {
|
|
159
|
-
/** @type {?|undefined} */
|
|
160
|
-
Options.prototype.as;
|
|
161
|
-
/** @type {?|undefined} */
|
|
162
|
-
Options.prototype.optional;
|
|
163
|
-
/** @type {?|undefined} */
|
|
164
|
-
Options.prototype.remember;
|
|
165
|
-
/** @type {?|undefined} */
|
|
166
|
-
Options.prototype.defaultValue;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* @template T
|
|
170
|
-
*/
|
|
171
|
-
var /**
|
|
172
|
-
* @template T
|
|
173
|
-
*/
|
|
174
|
-
RouteId = /** @class */ (function (_super) {
|
|
175
|
-
tslib_1.__extends(RouteId, _super);
|
|
57
|
+
var RouteId = /** @class */ (function (_super) {
|
|
58
|
+
__extends(RouteId, _super);
|
|
176
59
|
function RouteId() {
|
|
177
60
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
178
61
|
_this.isRouteId = true;
|
|
179
62
|
_this.isArray = false;
|
|
180
63
|
return _this;
|
|
181
64
|
}
|
|
182
|
-
|
|
183
|
-
* @param {?} value
|
|
184
|
-
* @return {?}
|
|
185
|
-
*/
|
|
186
|
-
RouteId.prototype.isEmptyValue = /**
|
|
187
|
-
* @param {?} value
|
|
188
|
-
* @return {?}
|
|
189
|
-
*/
|
|
190
|
-
function (value) {
|
|
65
|
+
RouteId.prototype.isEmptyValue = function (value) {
|
|
191
66
|
return _.isNil(value);
|
|
192
67
|
};
|
|
193
|
-
|
|
194
|
-
* @param {?} a
|
|
195
|
-
* @param {?} b
|
|
196
|
-
* @return {?}
|
|
197
|
-
*/
|
|
198
|
-
RouteId.prototype.hasChanged = /**
|
|
199
|
-
* @param {?} a
|
|
200
|
-
* @param {?} b
|
|
201
|
-
* @return {?}
|
|
202
|
-
*/
|
|
203
|
-
function (a, b) {
|
|
68
|
+
RouteId.prototype.hasChanged = function (a, b) {
|
|
204
69
|
return a !== b;
|
|
205
70
|
};
|
|
206
71
|
return RouteId;
|
|
207
72
|
}(ParameterDefinition));
|
|
208
73
|
ParameterDefinition.RouteId = RouteId;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
RouteId.prototype.isRouteId;
|
|
212
|
-
/** @type {?} */
|
|
213
|
-
RouteId.prototype.isArray;
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* @template T
|
|
217
|
-
*/
|
|
218
|
-
var /**
|
|
219
|
-
* @template T
|
|
220
|
-
*/
|
|
221
|
-
ValueParameter = /** @class */ (function (_super) {
|
|
222
|
-
tslib_1.__extends(ValueParameter, _super);
|
|
74
|
+
var ValueParameter = /** @class */ (function (_super) {
|
|
75
|
+
__extends(ValueParameter, _super);
|
|
223
76
|
function ValueParameter() {
|
|
224
77
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
225
78
|
_this.isRouteId = false;
|
|
226
79
|
_this.isArray = false;
|
|
227
80
|
return _this;
|
|
228
81
|
}
|
|
229
|
-
|
|
230
|
-
* @param {?} value
|
|
231
|
-
* @return {?}
|
|
232
|
-
*/
|
|
233
|
-
ValueParameter.prototype.isEmptyValue = /**
|
|
234
|
-
* @param {?} value
|
|
235
|
-
* @return {?}
|
|
236
|
-
*/
|
|
237
|
-
function (value) {
|
|
82
|
+
ValueParameter.prototype.isEmptyValue = function (value) {
|
|
238
83
|
return _.isNil(value);
|
|
239
84
|
};
|
|
240
|
-
|
|
241
|
-
* @param {?} a
|
|
242
|
-
* @param {?} b
|
|
243
|
-
* @return {?}
|
|
244
|
-
*/
|
|
245
|
-
ValueParameter.prototype.hasChanged = /**
|
|
246
|
-
* @param {?} a
|
|
247
|
-
* @param {?} b
|
|
248
|
-
* @return {?}
|
|
249
|
-
*/
|
|
250
|
-
function (a, b) {
|
|
85
|
+
ValueParameter.prototype.hasChanged = function (a, b) {
|
|
251
86
|
return a !== b;
|
|
252
87
|
};
|
|
253
88
|
return ValueParameter;
|
|
254
89
|
}(ParameterDefinition));
|
|
255
90
|
ParameterDefinition.ValueParameter = ValueParameter;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
ValueParameter.prototype.isRouteId;
|
|
259
|
-
/** @type {?} */
|
|
260
|
-
ValueParameter.prototype.isArray;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* @template T
|
|
264
|
-
*/
|
|
265
|
-
var /**
|
|
266
|
-
* @template T
|
|
267
|
-
*/
|
|
268
|
-
ArrayParameter = /** @class */ (function (_super) {
|
|
269
|
-
tslib_1.__extends(ArrayParameter, _super);
|
|
91
|
+
var ArrayParameter = /** @class */ (function (_super) {
|
|
92
|
+
__extends(ArrayParameter, _super);
|
|
270
93
|
function ArrayParameter(parameterName, options, urlFormat) {
|
|
271
94
|
var _this = _super.call(this, parameterName, options, urlFormat) || this;
|
|
272
95
|
_this.isRouteId = false;
|
|
273
96
|
_this.isArray = true;
|
|
274
97
|
return _this;
|
|
275
98
|
}
|
|
276
|
-
|
|
277
|
-
* @param {?} value
|
|
278
|
-
* @return {?}
|
|
279
|
-
*/
|
|
280
|
-
ArrayParameter.prototype.isEmptyValue = /**
|
|
281
|
-
* @param {?} value
|
|
282
|
-
* @return {?}
|
|
283
|
-
*/
|
|
284
|
-
function (value) {
|
|
99
|
+
ArrayParameter.prototype.isEmptyValue = function (value) {
|
|
285
100
|
return _.isNil(value) || value.length < 1;
|
|
286
101
|
};
|
|
287
|
-
|
|
288
|
-
* @param {?} a
|
|
289
|
-
* @param {?} b
|
|
290
|
-
* @return {?}
|
|
291
|
-
*/
|
|
292
|
-
ArrayParameter.prototype.hasChanged = /**
|
|
293
|
-
* @param {?} a
|
|
294
|
-
* @param {?} b
|
|
295
|
-
* @return {?}
|
|
296
|
-
*/
|
|
297
|
-
function (a, b) {
|
|
102
|
+
ArrayParameter.prototype.hasChanged = function (a, b) {
|
|
298
103
|
return !_.isEqual(a, b);
|
|
299
104
|
};
|
|
300
105
|
return ArrayParameter;
|
|
301
106
|
}(ParameterDefinition));
|
|
302
107
|
ParameterDefinition.ArrayParameter = ArrayParameter;
|
|
303
|
-
if (false) {
|
|
304
|
-
/** @type {?} */
|
|
305
|
-
ArrayParameter.prototype.isRouteId;
|
|
306
|
-
/** @type {?} */
|
|
307
|
-
ArrayParameter.prototype.isArray;
|
|
308
|
-
}
|
|
309
108
|
})(ParameterDefinition || (ParameterDefinition = {}));
|
|
310
109
|
//# sourceMappingURL=parameter-definition.class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-definition.class.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-definition.class.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameter-definition.class.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-definition.class.ts"],"names":[],"mappings":"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","sourcesContent":["import { Injector } from '@angular/core';\nimport { Trace } from '@coolon/pectin';\nimport { Opts } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { PlaceHistory } from '../place-history';\nimport { Visit } from '../visit';\nimport { Formatter } from './formatter';\n\nexport abstract class ParameterDefinition<T, E = T> {\n\n abstract readonly isRouteId: boolean;\n abstract readonly isArray: boolean;\n\n readonly remember: boolean;\n readonly defaultValue: T;\n private options: Opts<ParameterDefinition.Options<T>>;\n\n constructor(readonly propertyName: string, options: ParameterDefinition.Options<T>, readonly urlFormat?: Formatter<E>) {\n this.options = Opts.get(options);\n this.remember = this.options.getOptional('remember', false);\n this.defaultValue = this.options.getOptional('defaultValue', null);\n }\n\n get name() {\n return this.options.getOptional('as', this.propertyName);\n }\n\n // @Trace()\n get isRouteParameter(): boolean {\n return !!this.urlFormat;\n }\n\n abstract isEmptyValue(value: T): boolean;\n\n abstract hasChanged(a: any, b: any): boolean;\n\n protected getOptionValue<K extends keyof ParameterDefinition.Options<T>>(key: K): ParameterDefinition.Options<T>[K] {\n return this.options.getOptional(key, null);\n }\n\n // @Trace()\n async sanitise(value:T, visit: Visit, placeHistory: PlaceHistory, injector: Injector) {\n if (this.isMissingFrom(visit)) {\n const previousVisit = _.first(placeHistory.getHistory(visit.placeDefinition));\n if (this.remember && previousVisit) {\n value = previousVisit.getParameter(this.name);\n }\n return this.isEmptyValue(value) ? this.defaultValue : value;\n } else {\n // todo: add custom sanitiser\n return value;\n }\n }\n\n private isMissingFrom(visit: Visit) {\n return !visit.hasParameter(this.name);\n }\n}\n\nexport namespace ParameterDefinition {\n\n export interface Options<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser.Options<T>;\n }\n\n export class RouteId<T> extends ParameterDefinition<T> {\n readonly isRouteId = true;\n readonly isArray = false;\n\n isEmptyValue(value: T): boolean {\n return _.isNil(value);\n }\n\n hasChanged(a: any, b: any): boolean {\n return a !== b;\n }\n }\n\n export class ValueParameter<T> extends ParameterDefinition<T> {\n readonly isRouteId = false;\n readonly isArray = false;\n\n isEmptyValue(value: T): boolean {\n return _.isNil(value);\n }\n\n hasChanged(a: any, b: any): boolean {\n return a !== b;\n }\n }\n\n export class ArrayParameter<T> extends ParameterDefinition<T[], T> {\n readonly isRouteId = false;\n readonly isArray = true;\n\n constructor(parameterName: string, options: Options<T[]>, urlFormat: Formatter<T>) {\n super(parameterName, options, urlFormat);\n }\n\n isEmptyValue(value: T[]): boolean {\n return _.isNil(value) || value.length < 1;\n }\n\n hasChanged(a: T[], b: T[]): boolean {\n return !_.isEqual(a, b);\n }\n\n }\n}\n"]}
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @record
|
|
7
|
-
* @template S
|
|
8
|
-
*/
|
|
9
|
-
export function ParameterSanitiser() { }
|
|
10
|
-
if (false) {
|
|
11
|
-
/**
|
|
12
|
-
* @param {?} parameterValue
|
|
13
|
-
* @param {?=} visit
|
|
14
|
-
* @param {?=} injector
|
|
15
|
-
* @return {?}
|
|
16
|
-
*/
|
|
17
|
-
ParameterSanitiser.prototype.sanitise = function (parameterValue, visit, injector) { };
|
|
18
|
-
}
|
|
19
1
|
//# sourceMappingURL=parameter-sanitiser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-sanitiser.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-sanitiser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameter-sanitiser.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-sanitiser.ts"],"names":[],"mappings":"","sourcesContent":["import { Injector } from '@angular/core';\nimport { Visit } from '../visit';\nimport { ParameterSnapshot } from './parameter-snapshot';\n\nexport interface ParameterSanitiser<S> {\n sanitise(parameterValue: ParameterSnapshot<S>, visit?: Visit, injector?: Injector): Promise<S> | S;\n}\n"]}
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @record
|
|
7
|
-
* @template T
|
|
8
|
-
*/
|
|
9
|
-
export function ParameterSnapshot() { }
|
|
10
|
-
if (false) {
|
|
11
|
-
/** @type {?} */
|
|
12
|
-
ParameterSnapshot.prototype.definition;
|
|
13
|
-
/** @type {?} */
|
|
14
|
-
ParameterSnapshot.prototype.value;
|
|
15
|
-
/**
|
|
16
|
-
* @return {?}
|
|
17
|
-
*/
|
|
18
|
-
ParameterSnapshot.prototype.isMissing = function () { };
|
|
19
|
-
}
|
|
20
1
|
//# sourceMappingURL=parameter-snapshot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-snapshot.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-snapshot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameter-snapshot.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-snapshot.ts"],"names":[],"mappings":"","sourcesContent":["import { ParameterDefinition } from './parameter-definition.class';\n\nexport interface ParameterSnapshot<T> {\n definition: ParameterDefinition<T, any>\n readonly value: T;\n isMissing(): boolean;\n}\n"]}
|