@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,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, ElementRef, HostListener, Inject, Input } from '@angular/core';
|
|
1
|
+
import { __decorate, __extends, __metadata, __param } from "tslib";
|
|
2
|
+
import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';
|
|
7
3
|
import { assert, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';
|
|
8
|
-
/**
|
|
9
|
-
* @template P
|
|
10
|
-
*/
|
|
11
4
|
var CommandDirective = /** @class */ (function (_super) {
|
|
12
|
-
|
|
5
|
+
__extends(CommandDirective, _super);
|
|
13
6
|
function CommandDirective(elementRef) {
|
|
14
7
|
var _this = _super.call(this) || this;
|
|
15
8
|
_this.elementRef = elementRef;
|
|
@@ -18,17 +11,10 @@ var CommandDirective = /** @class */ (function (_super) {
|
|
|
18
11
|
return _this;
|
|
19
12
|
}
|
|
20
13
|
Object.defineProperty(CommandDirective.prototype, "pectinCommand", {
|
|
21
|
-
get:
|
|
22
|
-
* @return {?}
|
|
23
|
-
*/
|
|
24
|
-
function () {
|
|
14
|
+
get: function () {
|
|
25
15
|
return this._command;
|
|
26
16
|
},
|
|
27
|
-
set:
|
|
28
|
-
* @param {?} command
|
|
29
|
-
* @return {?}
|
|
30
|
-
*/
|
|
31
|
-
function (command) {
|
|
17
|
+
set: function (command) {
|
|
32
18
|
this._command = command;
|
|
33
19
|
this._commandEnabled.setDelegate(command ? command.enabled : null);
|
|
34
20
|
},
|
|
@@ -36,30 +22,17 @@ var CommandDirective = /** @class */ (function (_super) {
|
|
|
36
22
|
configurable: true
|
|
37
23
|
});
|
|
38
24
|
Object.defineProperty(CommandDirective.prototype, "commandParameter", {
|
|
39
|
-
get:
|
|
40
|
-
* @return {?}
|
|
41
|
-
*/
|
|
42
|
-
function () {
|
|
25
|
+
get: function () {
|
|
43
26
|
return this._commandParameter;
|
|
44
27
|
},
|
|
45
|
-
set:
|
|
46
|
-
* @param {?} value
|
|
47
|
-
* @return {?}
|
|
48
|
-
*/
|
|
49
|
-
function (value) {
|
|
28
|
+
set: function (value) {
|
|
50
29
|
this._commandParameterProvided = true;
|
|
51
30
|
this._commandParameter = value;
|
|
52
31
|
},
|
|
53
32
|
enumerable: true,
|
|
54
33
|
configurable: true
|
|
55
34
|
});
|
|
56
|
-
|
|
57
|
-
* @return {?}
|
|
58
|
-
*/
|
|
59
|
-
CommandDirective.prototype.ngOnInit = /**
|
|
60
|
-
* @return {?}
|
|
61
|
-
*/
|
|
62
|
-
function () {
|
|
35
|
+
CommandDirective.prototype.ngOnInit = function () {
|
|
63
36
|
assert.notNil(this.pectinCommand);
|
|
64
37
|
if (this.pectinCommand instanceof UnaryCommand) {
|
|
65
38
|
if (!this._commandParameterProvided) {
|
|
@@ -72,22 +45,12 @@ var CommandDirective = /** @class */ (function (_super) {
|
|
|
72
45
|
}
|
|
73
46
|
}
|
|
74
47
|
};
|
|
75
|
-
|
|
76
|
-
* @return {?}
|
|
77
|
-
*/
|
|
78
|
-
CommandDirective.prototype.ngAfterViewInit = /**
|
|
79
|
-
* @return {?}
|
|
80
|
-
*/
|
|
81
|
-
function () {
|
|
48
|
+
CommandDirective.prototype.ngAfterViewInit = function () {
|
|
82
49
|
var _this = this;
|
|
83
50
|
// for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
|
|
84
51
|
// we need to do this.
|
|
85
52
|
var chain = Dsl.disposeWith(this).chain;
|
|
86
|
-
chain(this._commandEnabled).subscribe((
|
|
87
|
-
* @param {?} enabled
|
|
88
|
-
* @return {?}
|
|
89
|
-
*/
|
|
90
|
-
function (enabled) {
|
|
53
|
+
chain(this._commandEnabled).subscribe(function (enabled) {
|
|
91
54
|
if (enabled) {
|
|
92
55
|
_this.elementRef.nativeElement.removeAttribute('disabled');
|
|
93
56
|
if (_this.elementRef.nativeElement.tagName === 'A') {
|
|
@@ -100,26 +63,12 @@ var CommandDirective = /** @class */ (function (_super) {
|
|
|
100
63
|
_this.elementRef.nativeElement.removeAttribute('href');
|
|
101
64
|
}
|
|
102
65
|
}
|
|
103
|
-
})
|
|
66
|
+
});
|
|
104
67
|
};
|
|
105
|
-
|
|
106
|
-
* @return {?}
|
|
107
|
-
*/
|
|
108
|
-
CommandDirective.prototype.ngOnDestroy = /**
|
|
109
|
-
* @return {?}
|
|
110
|
-
*/
|
|
111
|
-
function () {
|
|
68
|
+
CommandDirective.prototype.ngOnDestroy = function () {
|
|
112
69
|
this.dispose();
|
|
113
70
|
};
|
|
114
|
-
|
|
115
|
-
* @param {?} $event
|
|
116
|
-
* @return {?}
|
|
117
|
-
*/
|
|
118
|
-
CommandDirective.prototype.notifyClick = /**
|
|
119
|
-
* @param {?} $event
|
|
120
|
-
* @return {?}
|
|
121
|
-
*/
|
|
122
|
-
function ($event) {
|
|
71
|
+
CommandDirective.prototype.notifyClick = function ($event) {
|
|
123
72
|
$event.preventDefault();
|
|
124
73
|
$event.stopPropagation();
|
|
125
74
|
if (this.pectinCommand.enabled.value) {
|
|
@@ -134,49 +83,34 @@ var CommandDirective = /** @class */ (function (_super) {
|
|
|
134
83
|
console.warn('disabled command clicked, ignoring.');
|
|
135
84
|
}
|
|
136
85
|
};
|
|
137
|
-
CommandDirective.decorators = [
|
|
138
|
-
{ type: Directive, args: [{
|
|
139
|
-
// tslint:disable-next-line:directive-selector
|
|
140
|
-
selector: '[pectinCommand]'
|
|
141
|
-
},] }
|
|
142
|
-
];
|
|
143
|
-
/** @nocollapse */
|
|
144
86
|
CommandDirective.ctorParameters = function () { return [
|
|
145
87
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
146
88
|
]; };
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
89
|
+
__decorate([
|
|
90
|
+
Input(),
|
|
91
|
+
__metadata("design:type", Object),
|
|
92
|
+
__metadata("design:paramtypes", [Object])
|
|
93
|
+
], CommandDirective.prototype, "pectinCommand", null);
|
|
94
|
+
__decorate([
|
|
95
|
+
Input(),
|
|
96
|
+
__metadata("design:type", Object),
|
|
97
|
+
__metadata("design:paramtypes", [Object])
|
|
98
|
+
], CommandDirective.prototype, "commandParameter", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
HostListener('click', ['$event']),
|
|
101
|
+
__metadata("design:type", Function),
|
|
102
|
+
__metadata("design:paramtypes", [Event]),
|
|
103
|
+
__metadata("design:returntype", void 0)
|
|
104
|
+
], CommandDirective.prototype, "notifyClick", null);
|
|
105
|
+
CommandDirective = __decorate([
|
|
106
|
+
Directive({
|
|
107
|
+
// tslint:disable-next-line:directive-selector
|
|
108
|
+
selector: '[pectinCommand]'
|
|
109
|
+
}),
|
|
110
|
+
__param(0, Inject(ElementRef)),
|
|
111
|
+
__metadata("design:paramtypes", [ElementRef])
|
|
112
|
+
], CommandDirective);
|
|
152
113
|
return CommandDirective;
|
|
153
114
|
}(GarbageCollector));
|
|
154
115
|
export { CommandDirective };
|
|
155
|
-
if (false) {
|
|
156
|
-
/**
|
|
157
|
-
* @type {?}
|
|
158
|
-
* @private
|
|
159
|
-
*/
|
|
160
|
-
CommandDirective.prototype._command;
|
|
161
|
-
/**
|
|
162
|
-
* @type {?}
|
|
163
|
-
* @private
|
|
164
|
-
*/
|
|
165
|
-
CommandDirective.prototype._commandEnabled;
|
|
166
|
-
/**
|
|
167
|
-
* @type {?}
|
|
168
|
-
* @private
|
|
169
|
-
*/
|
|
170
|
-
CommandDirective.prototype._commandParameter;
|
|
171
|
-
/**
|
|
172
|
-
* @type {?}
|
|
173
|
-
* @private
|
|
174
|
-
*/
|
|
175
|
-
CommandDirective.prototype._commandParameterProvided;
|
|
176
|
-
/**
|
|
177
|
-
* @type {?}
|
|
178
|
-
* @private
|
|
179
|
-
*/
|
|
180
|
-
CommandDirective.prototype.elementRef;
|
|
181
|
-
}
|
|
182
116
|
//# sourceMappingURL=command.directive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/command.directive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/command.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,MAAM,EAAW,oBAAoB,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMlH;IAA+C,oCAAgB;IA2B7D,0BAAwC,UAAsB;QAA9D,YACE,iBAAO,SACR;QAFuC,gBAAU,GAAV,UAAU,CAAY;QAxBtD,qBAAe,GAAG,IAAI,oBAAoB,EAAW,CAAC,WAAW,CA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YACT,8CAA8C;YAC9C,QAAQ,EAAE,iBAAiB;SAC5B,CAAC;QA4Ba,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;yCAAqB,UAAU;OA3BnD,gBAAgB,CAkF5B;IAAD,uBAAC;CAAA,AAlFD,CAA+C,gBAAgB,GAkF9D;SAlFY,gBAAgB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { assert, Command, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinCommand]'\n})\nexport class CommandDirective<P = any> extends GarbageCollector implements OnInit, OnDestroy, AfterViewInit {\n\n private _command: Command<any> | UnaryCommand<P>;\n private _commandEnabled = new DelegatingValueModel<boolean>().withDefault(false);\n\n @Input()\n set pectinCommand(command: Command<any> | UnaryCommand<P>) {\n this._command = command;\n this._commandEnabled.setDelegate(command ? command.enabled : null);\n }\n get pectinCommand():Command<any> | UnaryCommand<P> {\n return this._command;\n }\n\n private _commandParameter: P;\n private _commandParameterProvided = false;\n\n @Input()\n set commandParameter(value: P) {\n this._commandParameterProvided = true;\n this._commandParameter = value;\n }\n\n get commandParameter(): P {\n return this._commandParameter;\n }\n\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {\n super();\n }\n\n ngOnInit(): void {\n assert.notNil(this.pectinCommand);\n if (this.pectinCommand instanceof UnaryCommand) {\n if (!this._commandParameterProvided) {\n lang.illegalState('UnaryCommands required the command parameter to be specified.');\n }\n } else {\n if (this._commandParameterProvided) {\n lang.illegalState('command parameters are only supported by UnaryCommands');\n }\n }\n }\n\n ngAfterViewInit(): void {\n // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now\n // we need to do this.\n const { chain } = Dsl.disposeWith(this);\n chain(this._commandEnabled).subscribe(enabled => {\n if (enabled) {\n this.elementRef.nativeElement.removeAttribute('disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.setAttribute('href', 'javascript:void');\n }\n } else {\n this.elementRef.nativeElement.setAttribute('disabled', 'disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.removeAttribute('href');\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n\n @HostListener('click', ['$event'])\n notifyClick($event: Event) {\n $event.preventDefault();\n $event.stopPropagation();\n if (this.pectinCommand.enabled.value) {\n if (this.pectinCommand instanceof UnaryCommand) {\n this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);\n } else {\n this.pectinCommand.withContext({ event: $event }).execute();\n }\n } else {\n console.warn('disabled command clicked, ignoring.');\n }\n }\n}\n"]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
1
|
+
import { __decorate } from "tslib";
|
|
5
2
|
import { CommonModule } from '@angular/common';
|
|
6
3
|
import { NgModule } from '@angular/core';
|
|
7
4
|
import { FormsModule } from '@angular/forms';
|
|
8
|
-
import { MatFormFieldModule
|
|
5
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
|
+
import { MatInputModule } from '@angular/material/input';
|
|
7
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
9
8
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
10
9
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
11
10
|
import { CommandDirective } from './command.directive';
|
|
@@ -13,27 +12,27 @@ import { FocusBindingDirective } from './focus-binding.directive';
|
|
|
13
12
|
var DirectivesModule = /** @class */ (function () {
|
|
14
13
|
function DirectivesModule() {
|
|
15
14
|
}
|
|
16
|
-
DirectivesModule
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
];
|
|
15
|
+
DirectivesModule = __decorate([
|
|
16
|
+
NgModule({
|
|
17
|
+
declarations: [
|
|
18
|
+
CommandDirective,
|
|
19
|
+
FocusBindingDirective
|
|
20
|
+
],
|
|
21
|
+
imports: [
|
|
22
|
+
CommonModule,
|
|
23
|
+
BrowserAnimationsModule,
|
|
24
|
+
FormsModule,
|
|
25
|
+
MatInputModule,
|
|
26
|
+
MatFormFieldModule,
|
|
27
|
+
MatSelectModule,
|
|
28
|
+
MatTabsModule
|
|
29
|
+
],
|
|
30
|
+
exports: [
|
|
31
|
+
CommandDirective,
|
|
32
|
+
FocusBindingDirective
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
], DirectivesModule);
|
|
37
36
|
return DirectivesModule;
|
|
38
37
|
}());
|
|
39
38
|
export { DirectivesModule };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"directives.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAsBlE;IAAA;IACA,CAAC;IADY,gBAAgB;QApB5B,QAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,gBAAgB;gBAChB,qBAAqB;aACtB;YACD,OAAO,EAAE;gBACP,YAAY;gBACZ,uBAAuB;gBACvB,WAAW;gBACX,cAAc;gBACd,kBAAkB;gBAClB,eAAe;gBACf,aAAa;aACd;YACD,OAAO,EAAE;gBACP,gBAAgB;gBAChB,qBAAqB;aACtB;SAEF,CAAC;OACW,gBAAgB,CAC5B;IAAD,uBAAC;CAAA,AADD,IACC;SADY,gBAAgB","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { CommandDirective } from './command.directive';\nimport { FocusBindingDirective } from './focus-binding.directive';\n\n@NgModule({\n declarations: [\n CommandDirective,\n FocusBindingDirective\n ],\n imports: [\n CommonModule,\n BrowserAnimationsModule,\n FormsModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatTabsModule\n ],\n exports: [\n CommandDirective,\n FocusBindingDirective\n ]\n\n})\nexport class DirectivesModule {\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.module.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './directives.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/forms';\nimport * as i4 from '@angular/cdk/text-field';\nimport * as i5 from '@angular/material/form-field';\nimport * as i6 from '@angular/material/input';\nimport * as i7 from '@angular/material/core';\nimport * as
|
|
1
|
+
{"version":3,"file":"directives.module.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './directives.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/forms';\nimport * as i4 from '@angular/cdk/text-field';\nimport * as i5 from '@angular/material/form-field';\nimport * as i6 from '@angular/material/input';\nimport * as i7 from '@angular/cdk/scrolling';\nimport * as i8 from '@angular/material/core';\nimport * as i9 from '@angular/cdk/bidi';\nimport * as i10 from '@angular/material/select';\nimport * as i11 from '@angular/material/tabs';\nimport * as i12 from './command.directive';\nimport * as i13 from './focus-binding.directive';\nimport * as i14 from '@angular/platform-browser/animations';\nexport const DirectivesModuleNgFactory:i0.NgModuleFactory<i1.DirectivesModule> = (null as any);\nvar _decl0_0:i2.NgClass = (<any>(null as any));\nvar _decl0_1:i2.NgComponentOutlet = (<any>(null as any));\nvar _decl0_2:i2.NgForOf<any,any> = (<any>(null as any));\nvar _decl0_3:i2.NgIf<any> = (<any>(null as any));\nvar _decl0_4:i2.NgTemplateOutlet = (<any>(null as any));\nvar _decl0_5:i2.NgStyle = (<any>(null as any));\nvar _decl0_6:i2.NgSwitch = (<any>(null as any));\nvar _decl0_7:i2.NgSwitchCase = (<any>(null as any));\nvar _decl0_8:i2.NgSwitchDefault = (<any>(null as any));\nvar _decl0_9:i2.NgPlural = (<any>(null as any));\nvar _decl0_10:i2.NgPluralCase = (<any>(null as any));\nvar _decl0_11:i3.ɵangular_packages_forms_forms_y = (<any>(null as any));\nvar _decl0_12:i3.NgSelectOption = (<any>(null as any));\nvar _decl0_13:i3.ɵangular_packages_forms_forms_x = (<any>(null as any));\nvar _decl0_14:i3.DefaultValueAccessor = (<any>(null as any));\nvar _decl0_15:i3.NumberValueAccessor = (<any>(null as any));\nvar _decl0_16:i3.RangeValueAccessor = (<any>(null as any));\nvar _decl0_17:i3.CheckboxControlValueAccessor = (<any>(null as any));\nvar _decl0_18:i3.SelectControlValueAccessor = (<any>(null as any));\nvar _decl0_19:i3.SelectMultipleControlValueAccessor = (<any>(null as any));\nvar _decl0_20:i3.RadioControlValueAccessor = (<any>(null as any));\nvar _decl0_21:i3.NgControlStatus = (<any>(null as any));\nvar _decl0_22:i3.NgControlStatusGroup = (<any>(null as any));\nvar _decl0_23:i3.RequiredValidator = (<any>(null as any));\nvar _decl0_24:i3.MinLengthValidator = (<any>(null as any));\nvar _decl0_25:i3.MaxLengthValidator = (<any>(null as any));\nvar _decl0_26:i3.PatternValidator = (<any>(null as any));\nvar _decl0_27:i3.CheckboxRequiredValidator = (<any>(null as any));\nvar _decl0_28:i3.EmailValidator = (<any>(null as any));\nvar _decl0_29:i3.NgModel = (<any>(null as any));\nvar _decl0_30:i3.NgModelGroup = (<any>(null as any));\nvar _decl0_31:i3.NgForm = (<any>(null as any));\nvar _decl0_32:i4.CdkAutofill = (<any>(null as any));\nvar _decl0_33:i4.CdkTextareaAutosize = (<any>(null as any));\nvar _decl0_34:i5.MatError = (<any>(null as any));\nvar _decl0_35:i5.MatFormField = (<any>(null as any));\nvar _decl0_36:i5.MatHint = (<any>(null as any));\nvar _decl0_37:i5.MatLabel = (<any>(null as any));\nvar _decl0_38:i5.MatPlaceholder = (<any>(null as any));\nvar _decl0_39:i5.MatPrefix = (<any>(null as any));\nvar _decl0_40:i5.MatSuffix = (<any>(null as any));\nvar _decl0_41:i6.MatInput = (<any>(null as any));\nvar _decl0_42:i6.MatTextareaAutosize = (<any>(null as any));\nvar _decl0_43:i7.CdkScrollable = (<any>(null as any));\nvar _decl0_44:i8.MatOption = (<any>(null as any));\nvar _decl0_45:i8.MatOptgroup = (<any>(null as any));\nvar _decl0_46:i9.Dir = (<any>(null as any));\nvar _decl0_47:i10.MatSelect = (<any>(null as any));\nvar _decl0_48:i10.MatSelectTrigger = (<any>(null as any));\nvar _decl0_49:i11.MatTabGroup = (<any>(null as any));\nvar _decl0_50:i11.MatTabLabel = (<any>(null as any));\nvar _decl0_51:i11.MatTab = (<any>(null as any));\nvar _decl0_52:i11.MatTabNav = (<any>(null as any));\nvar _decl0_53:i11.MatTabLink = (<any>(null as any));\nvar _decl0_54:i11.MatTabContent = (<any>(null as any));\nvar _decl0_55:i12.CommandDirective<any> = (<any>(null as any));\nvar _decl0_56:i13.FocusBindingDirective = (<any>(null as any));\nvar _decl0_57:i2.AsyncPipe = (<any>(null as any));\nvar _decl0_58:i2.UpperCasePipe = (<any>(null as any));\nvar _decl0_59:i2.LowerCasePipe = (<any>(null as any));\nvar _decl0_60:i2.JsonPipe = (<any>(null as any));\nvar _decl0_61:i2.SlicePipe = (<any>(null as any));\nvar _decl0_62:i2.DecimalPipe = (<any>(null as any));\nvar _decl0_63:i2.PercentPipe = (<any>(null as any));\nvar _decl0_64:i2.TitleCasePipe = (<any>(null as any));\nvar _decl0_65:i2.CurrencyPipe = (<any>(null as any));\nvar _decl0_66:i2.DatePipe = (<any>(null as any));\nvar _decl0_67:i2.I18nPluralPipe = (<any>(null as any));\nvar _decl0_68:i2.I18nSelectPipe = (<any>(null as any));\nvar _decl0_69:i2.KeyValuePipe = (<any>(null as any));\nvar _decl0_70:i2.CommonModule = (<any>(null as any));\nvar _decl0_71:i14.BrowserAnimationsModule = (<any>(null as any));\nvar _decl0_72:i3.FormsModule = (<any>(null as any));\nvar _decl0_73:i6.MatInputModule = (<any>(null as any));\nvar _decl0_74:i5.MatFormFieldModule = (<any>(null as any));\nvar _decl0_75:i10.MatSelectModule = (<any>(null as any));\nvar _decl0_76:i11.MatTabsModule = (<any>(null as any));\nvar _decl0_77:i0.TemplateRef<any> = (<any>(null as any));\nvar _decl0_78:i0.ElementRef<any> = (<any>(null as any));\n"]}
|
|
@@ -1,125 +1,57 @@
|
|
|
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, __extends, __metadata, __param } from "tslib";
|
|
6
2
|
import { DOCUMENT } from '@angular/common';
|
|
7
|
-
import { Directive, ElementRef, HostListener, Inject, Input, NgZone } from '@angular/core';
|
|
3
|
+
import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';
|
|
8
4
|
import { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';
|
|
9
5
|
import { DisposableComponent } from '../components/disposable-component';
|
|
10
6
|
var FocusBindingDirective = /** @class */ (function (_super) {
|
|
11
|
-
|
|
7
|
+
__extends(FocusBindingDirective, _super);
|
|
12
8
|
function FocusBindingDirective(el, ngZone, document) {
|
|
13
9
|
var _this = _super.call(this) || this;
|
|
14
10
|
_this.el = el;
|
|
15
11
|
_this.ngZone = ngZone;
|
|
16
12
|
// @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
|
|
17
|
-
_this.document =
|
|
13
|
+
_this.document = document;
|
|
18
14
|
return _this;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
|
-
* @return {?}
|
|
22
|
-
*/
|
|
23
|
-
FocusBindingDirective.prototype.onFocusIn = /**
|
|
24
|
-
* @return {?}
|
|
25
|
-
*/
|
|
26
|
-
function () {
|
|
16
|
+
FocusBindingDirective.prototype.onFocusIn = function () {
|
|
27
17
|
if (this.hasBinding()) {
|
|
28
18
|
this.pectinFocusBinding.focusContext.notifyFocusIn();
|
|
29
19
|
}
|
|
30
20
|
};
|
|
31
|
-
|
|
32
|
-
* @return {?}
|
|
33
|
-
*/
|
|
34
|
-
FocusBindingDirective.prototype.onFocusOut = /**
|
|
35
|
-
* @return {?}
|
|
36
|
-
*/
|
|
37
|
-
function () {
|
|
21
|
+
FocusBindingDirective.prototype.onFocusOut = function () {
|
|
38
22
|
if (this.hasBinding()) {
|
|
39
23
|
this.pectinFocusBinding.focusContext.notifyFocusOut();
|
|
40
24
|
}
|
|
41
25
|
};
|
|
42
|
-
|
|
43
|
-
* @return {?}
|
|
44
|
-
*/
|
|
45
|
-
FocusBindingDirective.prototype.ngOnInit = /**
|
|
46
|
-
* @return {?}
|
|
47
|
-
*/
|
|
48
|
-
function () {
|
|
26
|
+
FocusBindingDirective.prototype.ngOnInit = function () {
|
|
49
27
|
};
|
|
50
|
-
|
|
51
|
-
* @return {?}
|
|
52
|
-
*/
|
|
53
|
-
FocusBindingDirective.prototype.ngAfterViewInit = /**
|
|
54
|
-
* @return {?}
|
|
55
|
-
*/
|
|
56
|
-
function () {
|
|
28
|
+
FocusBindingDirective.prototype.ngAfterViewInit = function () {
|
|
57
29
|
var _this = this;
|
|
58
30
|
// TODO: Make this also track the current enabled/disabled state.
|
|
59
31
|
if (this.hasBinding()) {
|
|
60
32
|
var chain = Dsl.disposeWith(this).chain;
|
|
61
|
-
chain(this.pectinFocusBinding.focusContext.focused).subscribe((
|
|
62
|
-
* @param {?} focused
|
|
63
|
-
* @return {?}
|
|
64
|
-
*/
|
|
65
|
-
function (focused) {
|
|
33
|
+
chain(this.pectinFocusBinding.focusContext.focused).subscribe(function (focused) {
|
|
66
34
|
if (focused && !_this.alreadyHasFocus()) {
|
|
67
35
|
_this.tryAndFocus();
|
|
68
36
|
}
|
|
69
|
-
})
|
|
37
|
+
});
|
|
70
38
|
}
|
|
71
39
|
else {
|
|
72
40
|
Logger.get(this).warn('pectinFocusBinding was nil');
|
|
73
41
|
}
|
|
74
42
|
};
|
|
75
|
-
|
|
76
|
-
* @private
|
|
77
|
-
* @return {?}
|
|
78
|
-
*/
|
|
79
|
-
FocusBindingDirective.prototype.hasBinding = /**
|
|
80
|
-
* @private
|
|
81
|
-
* @return {?}
|
|
82
|
-
*/
|
|
83
|
-
function () {
|
|
43
|
+
FocusBindingDirective.prototype.hasBinding = function () {
|
|
84
44
|
return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
|
|
85
45
|
};
|
|
86
46
|
// Hook method for debugging via tracing.
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @return {?}
|
|
90
|
-
*/
|
|
91
|
-
FocusBindingDirective.prototype.alreadyHasFocus =
|
|
92
|
-
// Hook method for debugging via tracing.
|
|
93
|
-
/**
|
|
94
|
-
* @return {?}
|
|
95
|
-
*/
|
|
96
|
-
function () {
|
|
47
|
+
FocusBindingDirective.prototype.alreadyHasFocus = function () {
|
|
97
48
|
return this.isFocused(this.focusTarget);
|
|
98
49
|
};
|
|
99
50
|
// Hook method for debugging via tracing.
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @param {?} element
|
|
103
|
-
* @return {?}
|
|
104
|
-
*/
|
|
105
|
-
FocusBindingDirective.prototype.isFocused =
|
|
106
|
-
// Hook method for debugging via tracing.
|
|
107
|
-
/**
|
|
108
|
-
* @param {?} element
|
|
109
|
-
* @return {?}
|
|
110
|
-
*/
|
|
111
|
-
function (element) {
|
|
51
|
+
FocusBindingDirective.prototype.isFocused = function (element) {
|
|
112
52
|
return this.document.activeElement === element;
|
|
113
53
|
};
|
|
114
|
-
|
|
115
|
-
* @param {?=} retries
|
|
116
|
-
* @return {?}
|
|
117
|
-
*/
|
|
118
|
-
FocusBindingDirective.prototype.tryAndFocus = /**
|
|
119
|
-
* @param {?=} retries
|
|
120
|
-
* @return {?}
|
|
121
|
-
*/
|
|
122
|
-
function (retries) {
|
|
54
|
+
FocusBindingDirective.prototype.tryAndFocus = function (retries) {
|
|
123
55
|
var _this = this;
|
|
124
56
|
if (retries === void 0) { retries = 5; }
|
|
125
57
|
if (this.modelShouldStillHaveFocus() && this.canFocus()) {
|
|
@@ -132,12 +64,9 @@ var FocusBindingDirective = /** @class */ (function (_super) {
|
|
|
132
64
|
if (retries > 0) {
|
|
133
65
|
// try again on the next paint
|
|
134
66
|
// TODO: is there an angular way of doing this without calling a window function.
|
|
135
|
-
requestAnimationFrame((
|
|
136
|
-
* @return {?}
|
|
137
|
-
*/
|
|
138
|
-
function () {
|
|
67
|
+
requestAnimationFrame(function () {
|
|
139
68
|
_this.tryAndFocus(retries - 1);
|
|
140
|
-
})
|
|
69
|
+
});
|
|
141
70
|
}
|
|
142
71
|
else {
|
|
143
72
|
Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.");
|
|
@@ -146,86 +75,60 @@ var FocusBindingDirective = /** @class */ (function (_super) {
|
|
|
146
75
|
}
|
|
147
76
|
};
|
|
148
77
|
Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
|
|
149
|
-
get:
|
|
150
|
-
* @return {?}
|
|
151
|
-
*/
|
|
152
|
-
function () {
|
|
78
|
+
get: function () {
|
|
153
79
|
return this.focusBindingTarget || this.el.nativeElement;
|
|
154
80
|
},
|
|
155
81
|
enumerable: true,
|
|
156
82
|
configurable: true
|
|
157
83
|
});
|
|
158
84
|
// Hook method for debugging via tracing.
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* @return {?}
|
|
162
|
-
*/
|
|
163
|
-
FocusBindingDirective.prototype.modelShouldStillHaveFocus =
|
|
164
|
-
// Hook method for debugging via tracing.
|
|
165
|
-
/**
|
|
166
|
-
* @return {?}
|
|
167
|
-
*/
|
|
168
|
-
function () {
|
|
85
|
+
FocusBindingDirective.prototype.modelShouldStillHaveFocus = function () {
|
|
169
86
|
return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
|
|
170
87
|
};
|
|
171
88
|
// Hook method for debugging via tracing.
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @return {?}
|
|
175
|
-
*/
|
|
176
|
-
FocusBindingDirective.prototype.canFocus =
|
|
177
|
-
// Hook method for debugging via tracing.
|
|
178
|
-
/**
|
|
179
|
-
* @return {?}
|
|
180
|
-
*/
|
|
181
|
-
function () {
|
|
182
|
-
/** @type {?} */
|
|
89
|
+
FocusBindingDirective.prototype.canFocus = function () {
|
|
183
90
|
var dimension = this.focusTarget.getBoundingClientRect();
|
|
184
|
-
/** @type {?} */
|
|
185
91
|
var hasSize = dimension.height >= 0 && dimension.height >= 0;
|
|
186
92
|
// tslint:disable-next-line:no-string-literal
|
|
187
93
|
return hasSize && !this.focusTarget['disabled'];
|
|
188
94
|
};
|
|
189
|
-
FocusBindingDirective.decorators = [
|
|
190
|
-
{ type: Directive, args: [{
|
|
191
|
-
// tslint:disable-next-line:directive-selector
|
|
192
|
-
selector: '[pectinFocusBinding]'
|
|
193
|
-
},] }
|
|
194
|
-
];
|
|
195
|
-
/** @nocollapse */
|
|
196
95
|
FocusBindingDirective.ctorParameters = function () { return [
|
|
197
96
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
198
97
|
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
199
98
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
200
99
|
]; };
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
100
|
+
__decorate([
|
|
101
|
+
Input(),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], FocusBindingDirective.prototype, "pectinFocusBinding", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
Input(),
|
|
106
|
+
__metadata("design:type", HTMLElement)
|
|
107
|
+
], FocusBindingDirective.prototype, "focusBindingTarget", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
HostListener('focusin'),
|
|
110
|
+
__metadata("design:type", Function),
|
|
111
|
+
__metadata("design:paramtypes", []),
|
|
112
|
+
__metadata("design:returntype", void 0)
|
|
113
|
+
], FocusBindingDirective.prototype, "onFocusIn", null);
|
|
114
|
+
__decorate([
|
|
115
|
+
HostListener('focusout'),
|
|
116
|
+
__metadata("design:type", Function),
|
|
117
|
+
__metadata("design:paramtypes", []),
|
|
118
|
+
__metadata("design:returntype", void 0)
|
|
119
|
+
], FocusBindingDirective.prototype, "onFocusOut", null);
|
|
120
|
+
FocusBindingDirective = __decorate([
|
|
121
|
+
Directive({
|
|
122
|
+
// tslint:disable-next-line:directive-selector
|
|
123
|
+
selector: '[pectinFocusBinding]'
|
|
124
|
+
}),
|
|
125
|
+
__param(0, Inject(ElementRef)),
|
|
126
|
+
__param(1, Inject(NgZone)),
|
|
127
|
+
__param(2, Inject(DOCUMENT)),
|
|
128
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
129
|
+
NgZone, Object])
|
|
130
|
+
], FocusBindingDirective);
|
|
207
131
|
return FocusBindingDirective;
|
|
208
132
|
}(DisposableComponent));
|
|
209
133
|
export { FocusBindingDirective };
|
|
210
|
-
if (false) {
|
|
211
|
-
/**
|
|
212
|
-
* @type {?}
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
FocusBindingDirective.prototype.document;
|
|
216
|
-
/** @type {?} */
|
|
217
|
-
FocusBindingDirective.prototype.pectinFocusBinding;
|
|
218
|
-
/** @type {?} */
|
|
219
|
-
FocusBindingDirective.prototype.focusBindingTarget;
|
|
220
|
-
/**
|
|
221
|
-
* @type {?}
|
|
222
|
-
* @private
|
|
223
|
-
*/
|
|
224
|
-
FocusBindingDirective.prototype.el;
|
|
225
|
-
/**
|
|
226
|
-
* @type {?}
|
|
227
|
-
* @private
|
|
228
|
-
*/
|
|
229
|
-
FocusBindingDirective.prototype.ngZone;
|
|
230
|
-
}
|
|
231
134
|
//# sourceMappingURL=focus-binding.directive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.directive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.directive.ts"],"names":[],"mappings":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EAAE,CAAC,aAAa,CAAC;QAC1D,CAAC;;;OAAA;IAED,yCAAyC;IACzC,yDAAyB,GAAzB;QACE,OAAO,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;IACjF,CAAC;IAED,yCAAyC;IACzC,wCAAQ,GAAR;QACE,IAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;QAC3D,IAAM,OAAO,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;QAC/D,6CAA6C;QAC7C,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;;gBA3EoD,UAAU,uBAAlD,MAAM,SAAC,UAAU;gBACuB,MAAM,uBAA9C,MAAM,SAAC,MAAM;gDACb,MAAM,SAAC,QAAQ;;IAnBnB;QAAR,KAAK,EAAE;;qEAAsC;IACrC;QAAR,KAAK,EAAE;kCAAqB,WAAW;qEAAC;IAGzC;QADC,YAAY,CAAC,SAAS,CAAC;;;;0DAKvB;IAGD;QADC,YAAY,CAAC,UAAU,CAAC;;;;2DAKxB;IAnBU,qBAAqB;QAJjC,SAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,sBAAsB;SACjC,CAAC;QAsBa,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;yCAFwB,UAAU;YACV,MAAM;OAtBhD,qBAAqB,CAiGjC;IAAD,4BAAC;CAAA,AAjGD,CAA2C,mBAAmB,GAiG7D;SAjGY,qBAAqB","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';\nimport { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';\nimport { DisposableComponent } from '../components/disposable-component';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinFocusBinding]'\n})\nexport class FocusBindingDirective extends DisposableComponent implements OnInit, AfterViewInit {\n\n private readonly document: Document;\n\n @Input() pectinFocusBinding: HasFocusTracking;\n @Input() focusBindingTarget: HTMLElement;\n\n @HostListener('focusin')\n onFocusIn() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusIn();\n }\n }\n\n @HostListener('focusout')\n onFocusOut() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusOut();\n }\n }\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any) {\n super();\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n // TODO: Make this also track the current enabled/disabled state.\n if (this.hasBinding()) {\n const { chain } = Dsl.disposeWith(this);\n chain(this.pectinFocusBinding.focusContext.focused).subscribe((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n });\n } else {\n Logger.get(this).warn('pectinFocusBinding was nil');\n }\n }\n\n private hasBinding() {\n return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;\n }\n\n// Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isFocused(element: Element): boolean {\n return this.document.activeElement === element;\n }\n\n tryAndFocus(retries: number = 5) {\n if (this.modelShouldStillHaveFocus() && this.canFocus()) {\n if (!this.alreadyHasFocus()) {\n this.focusTarget.focus();\n }\n // if we didn't get the focus we try again later.\n if (!this.alreadyHasFocus()) {\n Logger.get(this).log(`focus failed, trying ${retries} more times`);\n if (retries > 0) {\n // try again on the next paint\n // TODO: is there an angular way of doing this without calling a window function.\n requestAnimationFrame(() => {\n this.tryAndFocus(retries - 1);\n });\n } else {\n Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);\n }\n }\n }\n }\n\n get focusTarget(): HTMLElement {\n return this.focusBindingTarget || this.el.nativeElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;\n }\n\n // Hook method for debugging via tracing.\n canFocus(): boolean {\n const dimension = this.focusTarget.getBoundingClientRect();\n const hasSize = dimension.height >= 0 && dimension.height >= 0;\n // tslint:disable-next-line:no-string-literal\n return hasSize && !this.focusTarget['disabled'];\n }\n}\n"]}
|