@coolon/angular-ui-powerups 1.3.4 → 1.3.6
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 +9 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +130 -184
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +13 -13
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +13 -13
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/focus-container/focus-container.component.js +4 -2
- package/esm2015/lib/components/focus-container/focus-container.component.js.map +1 -1
- package/esm2015/lib/components/focus-container/focus-container.component.metadata.json +1 -1
- package/esm2015/lib/components/focusable.component.js +1 -1
- package/esm2015/lib/components/focusable.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +1 -1
- 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 +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/directives/focus-binding-factory.js +2 -1
- package/esm2015/lib/directives/focus-binding-factory.js.map +1 -1
- package/esm2015/lib/directives/focus-binding.directive.js +11 -62
- package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
- package/esm2015/lib/directives/focus-binding.directive.metadata.json +1 -1
- package/esm2015/lib/directives/focus-binding.js +1 -0
- package/esm2015/lib/directives/focus-binding.js.map +1 -1
- package/esm2015/lib/directives/focus-binding.metadata.json +1 -1
- package/esm2015/lib/place/route/visit-sanitiser.js +2 -9
- package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
- package/esm2015/lib/place/route/visit-sanitiser.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +13 -13
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/focus-container/focus-container.component.js +10 -6
- package/esm5/lib/components/focus-container/focus-container.component.js.map +1 -1
- package/esm5/lib/components/focusable.component.js +1 -1
- package/esm5/lib/components/focusable.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/directives/focus-binding-factory.js +2 -1
- package/esm5/lib/directives/focus-binding-factory.js.map +1 -1
- package/esm5/lib/directives/focus-binding.directive.js +11 -65
- package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
- package/esm5/lib/directives/focus-binding.js +1 -0
- package/esm5/lib/directives/focus-binding.js.map +1 -1
- package/esm5/lib/place/route/visit-sanitiser.js +2 -9
- package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +96 -149
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +116 -170
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/focus-container/focus-container.component.d.ts +2 -1
- package/lib/components/forms/abstract-input.component.d.ts +1 -1
- package/lib/directives/focus-binding-factory.d.ts +2 -2
- package/lib/directives/focus-binding.directive.d.ts +6 -11
- package/package.json +10 -2
|
@@ -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":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAO9D;IAA2C,yCAAmB;IAoB5D,+BAAiD,EAAc,EAC1C,mBA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C9C,QAAQ,EAAE,sBAAsB;SACjC,CAAC;QAqBa,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;yCAAsB,UAAU;YACrB,mBAAmB;OArBlD,qBAAqB,CA4CjC;IAAD,4BAAC;CAAA,AA5CD,CAA2C,mBAAmB,GA4C7D;SA5CY,qBAAqB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnInit } from '@angular/core';\nimport { FocusManager, Logger } from '@coolon/pectin';\nimport { DisposableComponent } from '../components/disposable-component';\nimport { FocusBindingFactory } from './focus-binding-factory';\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\n @Input() pectinFocusBinding: FocusManager.Context; // TODO: Support @TrackExternal()\n @Input() focusBindingTarget: HTMLElement;\n\n @HostListener('focusin')\n onFocusIn() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.notifyFocusIn();\n }\n }\n\n @HostListener('focusout')\n onFocusOut() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.notifyFocusOut();\n }\n }\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef,\n readonly focusBindingFactory: FocusBindingFactory) {\n super();\n }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n if (this.hasBinding()) {\n this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget, this.pectinFocusBinding));\n } else {\n Logger.get(this).warn('pectinFocusBinding was nil');\n }\n }\n\n private hasBinding() {\n return !!this.pectinFocusBinding && !!this.pectinFocusBinding;\n }\n\n get focusTarget(): HTMLElement {\n return this.focusBindingTarget || this.el.nativeElement;\n }\n\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import { Inject, NgZone } from '@angular/core';
|
|
|
4
4
|
import { Dsl, FocusManager, GarbageCollector, Logger } from '@coolon/pectin';
|
|
5
5
|
var FocusBinding = /** @class */ (function (_super) {
|
|
6
6
|
__extends(FocusBinding, _super);
|
|
7
|
+
// TODO: update to support alternate focus mechanisms so we can interoperate with mat-checkbox
|
|
7
8
|
function FocusBinding(focusTargetElement, ngZone, document, focusContext) {
|
|
8
9
|
var _this = _super.call(this) || this;
|
|
9
10
|
_this.focusTargetElement = focusTargetElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-binding.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"focus-binding.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7E;IAAkC,gCAAgB;IAIhD,8FAA8F;IAC9F,sBAA6B,kBAA+B,EACf,MAAc,EAC7B,QAAa,EACtB,YAAkC;QAHvD,YAIE,iBAAO,SAWR;QAf4B,wBAAkB,GAAlB,kBAAkB,CAAa;QACf,YAAM,GAAN,MAAM,CAAQ;QAEtC,kBAAY,GAAZ,YAAY,CAAsB;QAErD,kHAAkH;QAClH,KAAI,CAAC,QAAQ,GAAG,QAAoB,CAAC;QAErC,iEAAiE;QACzD,IAAA,kCAAI,CAA2B;QACvC,IAAI,CAAC,OAAO,CAAC,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAC,OAAO;YACtD,IAAI,OAAO,IAAI,CAAC,KAAI,CAAC,eAAe,EAAE,EAAE;gBACtC,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,EAAE,EAAE,YAAY,EAA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ED,yCAAyC;IACzC,gDAAyB,GAAzB;QACE,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;IACzC,CAAC;IAED,yCAAyC;IACzC,+BAAQ,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;IA5EU,YAAY;QAMV,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;yCAFoB,WAAW;YACP,MAAM;OANhD,YAAY,CA6ExB;IAAD,mBAAC;CAAA,AA7ED,CAAkC,gBAAgB,GA6EjD;SA7EY,YAAY","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { Inject, NgZone } from '@angular/core';\nimport { Dsl, FocusManager, GarbageCollector, Logger } from '@coolon/pectin';\n\nexport class FocusBinding extends GarbageCollector {\n\n private readonly document: Document;\n\n // TODO: update to support alternate focus mechanisms so we can interoperate with mat-checkbox\n constructor(private readonly focusTargetElement: HTMLElement,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any,\n readonly focusContext: FocusManager.Context) {\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 // TODO: Make this also track the current enabled/disabled state.\n const { when } = Dsl.disposeWith(this);\n when.valueOf(this.focusContext.focused).changes((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n }, { initialValue: 'triggerChangeUnlessNil' });\n }\n\n onFocusIn() {\n this.focusContext.notifyFocusIn();\n }\n\n onFocusOut() {\n this.focusContext.notifyFocusOut();\n }\n\n // Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isElementFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isElementFocused(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.focusTargetElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.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"]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { __awaiter,
|
|
2
|
-
import { Trace } from '@coolon/pectin';
|
|
3
|
-
import { Visit } from '../visit';
|
|
1
|
+
import { __awaiter, __generator } from "tslib";
|
|
4
2
|
var VisitSanitiser = /** @class */ (function () {
|
|
5
3
|
function VisitSanitiser(navigationSession, activatedRoute, router, placeHistory, injector) {
|
|
6
4
|
this.navigationSession = navigationSession;
|
|
@@ -9,6 +7,7 @@ var VisitSanitiser = /** @class */ (function () {
|
|
|
9
7
|
this.placeHistory = placeHistory;
|
|
10
8
|
this.injector = injector;
|
|
11
9
|
}
|
|
10
|
+
// @Trace()
|
|
12
11
|
VisitSanitiser.prototype.sanitise = function (visit) {
|
|
13
12
|
return __awaiter(this, void 0, void 0, function () {
|
|
14
13
|
var placeDef, routeIdDef, routeId, sanitisedValue, parameterDefs, sanitisedVisit, i, def, value, sanitisedValue;
|
|
@@ -57,12 +56,6 @@ var VisitSanitiser = /** @class */ (function () {
|
|
|
57
56
|
});
|
|
58
57
|
});
|
|
59
58
|
};
|
|
60
|
-
__decorate([
|
|
61
|
-
Trace(),
|
|
62
|
-
__metadata("design:type", Function),
|
|
63
|
-
__metadata("design:paramtypes", [Visit]),
|
|
64
|
-
__metadata("design:returntype", Promise)
|
|
65
|
-
], VisitSanitiser.prototype, "sanitise", null);
|
|
66
59
|
return VisitSanitiser;
|
|
67
60
|
}());
|
|
68
61
|
export { VisitSanitiser };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visit-sanitiser.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/visit-sanitiser.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"visit-sanitiser.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/visit-sanitiser.ts"],"names":[],"mappings":";AAOA;IACE,wBAAoB,iBAAoC,EAAU,cAAsC,EAAU,MAAc,EAAU,YAA0B,EAAU,QAAkB;QAA5K,sBAAiB,GAAjB,iBAAiB,CAAmB;QAAU,mBAAc,GAAd,cAAc,CAAwB;QAAU,WAAM,GAAN,MAAM,CAAQ;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAAU,aAAQ,GAAR,QAAQ,CAAU;IAEhM,CAAC;IAED,WAAW;IACL,iCAAQ,GAAd,UAAe,KAAY;;;;;;wBACnB,QAAQ,GAAG,KAAK,CAAC,eAAe,CAAC;6BACnC,QAAQ,CAAC,UAAU,EAAE,EAArB,wBAAqB;wBACjB,UAAU,GAAG,QAAQ,CAAC,sBAAsB,EAAE,CAAC;wBAC/C,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;wBACZ,qBAAM,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,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tE;IAEH,qBAAC;AAAD,CAAC,AAvCD,IAuCC","sourcesContent":["import { Injector } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { Trace } from '@coolon/pectin';\nimport { NavigationSession } from '../navigation/session/navigation-session';\nimport { PlaceHistory } from '../place-history';\nimport { Visit } from '../visit';\n\nexport class VisitSanitiser {\n constructor(private navigationSession: NavigationSession, private activatedRoute: ActivatedRouteSnapshot, private router: Router, private placeHistory: PlaceHistory, private injector: Injector) {\n\n }\n\n // @Trace()\n async sanitise(visit: Visit): Promise<Visit> {\n const placeDef = visit.placeDefinition;\n if (placeDef.hasRouteId()) {\n const routeIdDef = placeDef.getRouteIdParameterDef();\n const routeId = visit.getRouteId();\n const sanitisedValue = await routeIdDef.sanitise(routeId, visit, this.placeHistory, this.injector, this.navigationSession.isPopState);\n console.log({routeId, sanitisedValue});\n // ###------- EARLY EXIT --------###\n if (routeIdDef.hasChanged(routeId, sanitisedValue)) {\n // if the route id has changed we redirect immediately as other\n // parameter sanitisers might use it.\n return visit.replace(routeIdDef, sanitisedValue);\n }\n }\n\n // if we didn't replace the routeId we continue the url present parameters.\n const parameterDefs = placeDef.getVisitParameterDefs({\n includeRouteParameters: true,\n includeNonRouteParameters: true\n });\n let sanitisedVisit: Visit = visit;\n for (let i = 0; i < parameterDefs.length; i++) {\n const def = parameterDefs[i];\n const value = visit.getParameter(def.name);\n const sanitisedValue = await def.sanitise(value, sanitisedVisit, this.placeHistory, this.injector, this.navigationSession.isPopState);\n if (def.hasChanged(value, sanitisedValue)) {\n sanitisedVisit = sanitisedVisit.replace(def, sanitisedValue);\n }\n }\n\n return sanitisedVisit.hasChangedFrom(visit) ? sanitisedVisit : visit;\n }\n\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param, __awaiter } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
|
-
import { ElementRef, Inject, Input, HostListener, Directive, NgZone,
|
|
3
|
+
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Host, HostBinding, Component, EventEmitter, Output, ContentChild, TemplateRef, ChangeDetectorRef, ContentChildren, QueryList, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Optional, SkipSelf } from '@angular/core';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -135,49 +135,35 @@ DisposableComponent = __decorate([
|
|
|
135
135
|
Directive()
|
|
136
136
|
], DisposableComponent);
|
|
137
137
|
|
|
138
|
-
let
|
|
139
|
-
|
|
138
|
+
let FocusBinding = class FocusBinding extends GarbageCollector {
|
|
139
|
+
// TODO: update to support alternate focus mechanisms so we can interoperate with mat-checkbox
|
|
140
|
+
constructor(focusTargetElement, ngZone, document, focusContext) {
|
|
140
141
|
super();
|
|
141
|
-
this.
|
|
142
|
+
this.focusTargetElement = focusTargetElement;
|
|
142
143
|
this.ngZone = ngZone;
|
|
144
|
+
this.focusContext = focusContext;
|
|
143
145
|
// @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
|
|
144
146
|
this.document = document;
|
|
147
|
+
// TODO: Make this also track the current enabled/disabled state.
|
|
148
|
+
const { when } = Dsl.disposeWith(this);
|
|
149
|
+
when.valueOf(this.focusContext.focused).changes((focused) => {
|
|
150
|
+
if (focused && !this.alreadyHasFocus()) {
|
|
151
|
+
this.tryAndFocus();
|
|
152
|
+
}
|
|
153
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
145
154
|
}
|
|
146
155
|
onFocusIn() {
|
|
147
|
-
|
|
148
|
-
this.pectinFocusBinding.focusContext.notifyFocusIn();
|
|
149
|
-
}
|
|
156
|
+
this.focusContext.notifyFocusIn();
|
|
150
157
|
}
|
|
151
158
|
onFocusOut() {
|
|
152
|
-
|
|
153
|
-
this.pectinFocusBinding.focusContext.notifyFocusOut();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
ngOnInit() {
|
|
157
|
-
}
|
|
158
|
-
ngAfterViewInit() {
|
|
159
|
-
// TODO: Make this also track the current enabled/disabled state.
|
|
160
|
-
if (this.hasBinding()) {
|
|
161
|
-
const { when } = Dsl.disposeWith(this);
|
|
162
|
-
when.valueOf(this.pectinFocusBinding.focusContext.focused).changes((focused) => {
|
|
163
|
-
if (focused && !this.alreadyHasFocus()) {
|
|
164
|
-
this.tryAndFocus();
|
|
165
|
-
}
|
|
166
|
-
}, { initialValue: 'triggerChange' });
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
Logger.get(this).warn('pectinFocusBinding was nil');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
hasBinding() {
|
|
173
|
-
return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
|
|
159
|
+
this.focusContext.notifyFocusOut();
|
|
174
160
|
}
|
|
175
161
|
// Hook method for debugging via tracing.
|
|
176
162
|
alreadyHasFocus() {
|
|
177
|
-
return this.
|
|
163
|
+
return this.isElementFocused(this.focusTarget);
|
|
178
164
|
}
|
|
179
165
|
// Hook method for debugging via tracing.
|
|
180
|
-
|
|
166
|
+
isElementFocused(element) {
|
|
181
167
|
return this.document.activeElement === element;
|
|
182
168
|
}
|
|
183
169
|
tryAndFocus(retries = 5) {
|
|
@@ -202,11 +188,11 @@ let FocusBindingDirective = class FocusBindingDirective extends DisposableCompon
|
|
|
202
188
|
}
|
|
203
189
|
}
|
|
204
190
|
get focusTarget() {
|
|
205
|
-
return this.
|
|
191
|
+
return this.focusTargetElement;
|
|
206
192
|
}
|
|
207
193
|
// Hook method for debugging via tracing.
|
|
208
194
|
modelShouldStillHaveFocus() {
|
|
209
|
-
return this.
|
|
195
|
+
return this.focusContext.focused.value;
|
|
210
196
|
}
|
|
211
197
|
// Hook method for debugging via tracing.
|
|
212
198
|
canFocus() {
|
|
@@ -216,11 +202,74 @@ let FocusBindingDirective = class FocusBindingDirective extends DisposableCompon
|
|
|
216
202
|
return hasSize && !this.focusTarget['disabled'];
|
|
217
203
|
}
|
|
218
204
|
};
|
|
219
|
-
|
|
220
|
-
|
|
205
|
+
FocusBinding = __decorate([
|
|
206
|
+
__param(1, Inject(NgZone)),
|
|
207
|
+
__param(2, Inject(DOCUMENT)),
|
|
208
|
+
__metadata("design:paramtypes", [HTMLElement,
|
|
209
|
+
NgZone, Object, Object])
|
|
210
|
+
], FocusBinding);
|
|
211
|
+
|
|
212
|
+
let FocusBindingFactory = class FocusBindingFactory {
|
|
213
|
+
constructor(ngZone, document) {
|
|
214
|
+
this.ngZone = ngZone;
|
|
215
|
+
// @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
|
|
216
|
+
this.document = document;
|
|
217
|
+
}
|
|
218
|
+
// @Trace()
|
|
219
|
+
createBinding(el, focusContext) {
|
|
220
|
+
return new FocusBinding(el, this.ngZone, this.document, focusContext);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
FocusBindingFactory.ctorParameters = () => [
|
|
221
224
|
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
222
225
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
223
226
|
];
|
|
227
|
+
FocusBindingFactory.ɵprov = ɵɵdefineInjectable({ factory: function FocusBindingFactory_Factory() { return new FocusBindingFactory(ɵɵinject(NgZone), ɵɵinject(DOCUMENT)); }, token: FocusBindingFactory, providedIn: "root" });
|
|
228
|
+
FocusBindingFactory = __decorate([
|
|
229
|
+
Injectable({
|
|
230
|
+
providedIn: 'root'
|
|
231
|
+
}),
|
|
232
|
+
__param(0, Inject(NgZone)), __param(1, Inject(DOCUMENT)),
|
|
233
|
+
__metadata("design:paramtypes", [NgZone, Object])
|
|
234
|
+
], FocusBindingFactory);
|
|
235
|
+
|
|
236
|
+
let FocusBindingDirective = class FocusBindingDirective extends DisposableComponent {
|
|
237
|
+
constructor(el, focusBindingFactory) {
|
|
238
|
+
super();
|
|
239
|
+
this.el = el;
|
|
240
|
+
this.focusBindingFactory = focusBindingFactory;
|
|
241
|
+
}
|
|
242
|
+
onFocusIn() {
|
|
243
|
+
if (this.hasBinding()) {
|
|
244
|
+
this.pectinFocusBinding.notifyFocusIn();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
onFocusOut() {
|
|
248
|
+
if (this.hasBinding()) {
|
|
249
|
+
this.pectinFocusBinding.notifyFocusOut();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
ngOnInit() {
|
|
253
|
+
}
|
|
254
|
+
ngAfterViewInit() {
|
|
255
|
+
if (this.hasBinding()) {
|
|
256
|
+
this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget, this.pectinFocusBinding));
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
Logger.get(this).warn('pectinFocusBinding was nil');
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
hasBinding() {
|
|
263
|
+
return !!this.pectinFocusBinding && !!this.pectinFocusBinding;
|
|
264
|
+
}
|
|
265
|
+
get focusTarget() {
|
|
266
|
+
return this.focusBindingTarget || this.el.nativeElement;
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
FocusBindingDirective.ctorParameters = () => [
|
|
270
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
271
|
+
{ type: FocusBindingFactory }
|
|
272
|
+
];
|
|
224
273
|
__decorate([
|
|
225
274
|
Input(),
|
|
226
275
|
__metadata("design:type", Object)
|
|
@@ -247,10 +296,8 @@ FocusBindingDirective = __decorate([
|
|
|
247
296
|
selector: '[pectinFocusBinding]'
|
|
248
297
|
}),
|
|
249
298
|
__param(0, Inject(ElementRef)),
|
|
250
|
-
__param(1, Inject(NgZone)),
|
|
251
|
-
__param(2, Inject(DOCUMENT)),
|
|
252
299
|
__metadata("design:paramtypes", [ElementRef,
|
|
253
|
-
|
|
300
|
+
FocusBindingFactory])
|
|
254
301
|
], FocusBindingDirective);
|
|
255
302
|
|
|
256
303
|
let DirectivesModule = class DirectivesModule {
|
|
@@ -277,104 +324,9 @@ DirectivesModule = __decorate([
|
|
|
277
324
|
})
|
|
278
325
|
], DirectivesModule);
|
|
279
326
|
|
|
280
|
-
let
|
|
281
|
-
constructor(focusTargetElement, ngZone, document, focusContext) {
|
|
282
|
-
super();
|
|
283
|
-
this.focusTargetElement = focusTargetElement;
|
|
284
|
-
this.ngZone = ngZone;
|
|
285
|
-
this.focusContext = focusContext;
|
|
286
|
-
// @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
|
|
287
|
-
this.document = document;
|
|
288
|
-
// TODO: Make this also track the current enabled/disabled state.
|
|
289
|
-
const { when } = Dsl.disposeWith(this);
|
|
290
|
-
when.valueOf(this.focusContext.focused).changes((focused) => {
|
|
291
|
-
if (focused && !this.alreadyHasFocus()) {
|
|
292
|
-
this.tryAndFocus();
|
|
293
|
-
}
|
|
294
|
-
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
295
|
-
}
|
|
296
|
-
onFocusIn() {
|
|
297
|
-
this.focusContext.notifyFocusIn();
|
|
298
|
-
}
|
|
299
|
-
onFocusOut() {
|
|
300
|
-
this.focusContext.notifyFocusOut();
|
|
301
|
-
}
|
|
302
|
-
// Hook method for debugging via tracing.
|
|
303
|
-
alreadyHasFocus() {
|
|
304
|
-
return this.isElementFocused(this.focusTarget);
|
|
305
|
-
}
|
|
306
|
-
// Hook method for debugging via tracing.
|
|
307
|
-
isElementFocused(element) {
|
|
308
|
-
return this.document.activeElement === element;
|
|
309
|
-
}
|
|
310
|
-
tryAndFocus(retries = 5) {
|
|
311
|
-
if (this.modelShouldStillHaveFocus() && this.canFocus()) {
|
|
312
|
-
if (!this.alreadyHasFocus()) {
|
|
313
|
-
this.focusTarget.focus();
|
|
314
|
-
}
|
|
315
|
-
// if we didn't get the focus we try again later.
|
|
316
|
-
if (!this.alreadyHasFocus()) {
|
|
317
|
-
Logger.get(this).log(`focus failed, trying ${retries} more times`);
|
|
318
|
-
if (retries > 0) {
|
|
319
|
-
// try again on the next paint
|
|
320
|
-
// TODO: is there an angular way of doing this without calling a window function.
|
|
321
|
-
requestAnimationFrame(() => {
|
|
322
|
-
this.tryAndFocus(retries - 1);
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
get focusTarget() {
|
|
332
|
-
return this.focusTargetElement;
|
|
333
|
-
}
|
|
334
|
-
// Hook method for debugging via tracing.
|
|
335
|
-
modelShouldStillHaveFocus() {
|
|
336
|
-
return this.focusContext.focused.value;
|
|
337
|
-
}
|
|
338
|
-
// Hook method for debugging via tracing.
|
|
339
|
-
canFocus() {
|
|
340
|
-
const dimension = this.focusTarget.getBoundingClientRect();
|
|
341
|
-
const hasSize = dimension.height >= 0 && dimension.height >= 0;
|
|
342
|
-
// tslint:disable-next-line:no-string-literal
|
|
343
|
-
return hasSize && !this.focusTarget['disabled'];
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
FocusBinding = __decorate([
|
|
347
|
-
__param(1, Inject(NgZone)),
|
|
348
|
-
__param(2, Inject(DOCUMENT)),
|
|
349
|
-
__metadata("design:paramtypes", [HTMLElement,
|
|
350
|
-
NgZone, Object, Object])
|
|
351
|
-
], FocusBinding);
|
|
352
|
-
|
|
353
|
-
let FocusBindingFactory = class FocusBindingFactory {
|
|
354
|
-
constructor(ngZone, document) {
|
|
355
|
-
this.ngZone = ngZone;
|
|
356
|
-
// @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
|
|
357
|
-
this.document = document;
|
|
358
|
-
}
|
|
359
|
-
createBinding(el, focusContext) {
|
|
360
|
-
return new FocusBinding(el.nativeElement, this.ngZone, this.document, focusContext);
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
FocusBindingFactory.ctorParameters = () => [
|
|
364
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
365
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
366
|
-
];
|
|
367
|
-
FocusBindingFactory.ɵprov = ɵɵdefineInjectable({ factory: function FocusBindingFactory_Factory() { return new FocusBindingFactory(ɵɵinject(NgZone), ɵɵinject(DOCUMENT)); }, token: FocusBindingFactory, providedIn: "root" });
|
|
368
|
-
FocusBindingFactory = __decorate([
|
|
369
|
-
Injectable({
|
|
370
|
-
providedIn: 'root'
|
|
371
|
-
}),
|
|
372
|
-
__param(0, Inject(NgZone)), __param(1, Inject(DOCUMENT)),
|
|
373
|
-
__metadata("design:paramtypes", [NgZone, Object])
|
|
374
|
-
], FocusBindingFactory);
|
|
375
|
-
|
|
376
|
-
let FocusContainerComponent = class FocusContainerComponent {
|
|
327
|
+
let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
|
|
377
328
|
constructor(focusManager) {
|
|
329
|
+
super();
|
|
378
330
|
this.focusManager = focusManager;
|
|
379
331
|
this.tabIndex = -1;
|
|
380
332
|
}
|
|
@@ -388,7 +340,7 @@ FocusContainerComponent.ctorParameters = () => [
|
|
|
388
340
|
{ type: FocusManager, decorators: [{ type: Host }] }
|
|
389
341
|
];
|
|
390
342
|
__decorate([
|
|
391
|
-
HostBinding(
|
|
343
|
+
HostBinding('attr.tabindex'),
|
|
392
344
|
__metadata("design:type", Object)
|
|
393
345
|
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
394
346
|
__decorate([
|
|
@@ -418,7 +370,7 @@ let FocusableComponent = class FocusableComponent extends DisposableComponent {
|
|
|
418
370
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
419
371
|
if (this.focusManager) {
|
|
420
372
|
this._focusContext = this.focusManager.registerFocusable(this);
|
|
421
|
-
this.registerDisposable(focusBindingFactory.createBinding(el, this.focusContext));
|
|
373
|
+
this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, this.focusContext));
|
|
422
374
|
}
|
|
423
375
|
}
|
|
424
376
|
get focusable() {
|
|
@@ -635,7 +587,7 @@ __decorate([
|
|
|
635
587
|
CheckboxInputComponent = __decorate([
|
|
636
588
|
Component({
|
|
637
589
|
selector: 'aup-checkbox-input',
|
|
638
|
-
template: "<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
590
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
639
591
|
styles: [":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
640
592
|
}),
|
|
641
593
|
__metadata("design:paramtypes", [])
|
|
@@ -655,7 +607,7 @@ __decorate([
|
|
|
655
607
|
NumberInputComponent = __decorate([
|
|
656
608
|
Component({
|
|
657
609
|
selector: 'aup-number-input',
|
|
658
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
610
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel?.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
659
611
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
660
612
|
}),
|
|
661
613
|
__metadata("design:paramtypes", [])
|
|
@@ -675,7 +627,7 @@ __decorate([
|
|
|
675
627
|
PasswordInputComponent = __decorate([
|
|
676
628
|
Component({
|
|
677
629
|
selector: 'aup-password-input',
|
|
678
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
630
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
679
631
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
680
632
|
}),
|
|
681
633
|
__metadata("design:paramtypes", [])
|
|
@@ -724,7 +676,7 @@ __decorate([
|
|
|
724
676
|
SelectInputComponent = __decorate([
|
|
725
677
|
Component({
|
|
726
678
|
selector: 'aup-select-input',
|
|
727
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
679
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
728
680
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
729
681
|
}),
|
|
730
682
|
__metadata("design:paramtypes", [])
|
|
@@ -757,7 +709,7 @@ __decorate([
|
|
|
757
709
|
StringInputComponent = __decorate([
|
|
758
710
|
Component({
|
|
759
711
|
selector: 'aup-string-input',
|
|
760
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
712
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
|
|
761
713
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}"]
|
|
762
714
|
}),
|
|
763
715
|
__metadata("design:paramtypes", [])
|
|
@@ -4018,6 +3970,7 @@ class VisitSanitiser {
|
|
|
4018
3970
|
this.placeHistory = placeHistory;
|
|
4019
3971
|
this.injector = injector;
|
|
4020
3972
|
}
|
|
3973
|
+
// @Trace()
|
|
4021
3974
|
sanitise(visit) {
|
|
4022
3975
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4023
3976
|
const placeDef = visit.placeDefinition;
|
|
@@ -4051,12 +4004,6 @@ class VisitSanitiser {
|
|
|
4051
4004
|
});
|
|
4052
4005
|
}
|
|
4053
4006
|
}
|
|
4054
|
-
__decorate([
|
|
4055
|
-
Trace(),
|
|
4056
|
-
__metadata("design:type", Function),
|
|
4057
|
-
__metadata("design:paramtypes", [Visit]),
|
|
4058
|
-
__metadata("design:returntype", Promise)
|
|
4059
|
-
], VisitSanitiser.prototype, "sanitise", null);
|
|
4060
4007
|
|
|
4061
4008
|
class PlaceGuard {
|
|
4062
4009
|
constructor(router, urlService, placeRouter, placeHistory, interactionService, injector) {
|
|
@@ -4259,5 +4206,5 @@ function VisitParameterList(options) {
|
|
|
4259
4206
|
* Generated bundle index. Do not edit.
|
|
4260
4207
|
*/
|
|
4261
4208
|
|
|
4262
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, UrlService, UrlSnapshot, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, AUP_PLACE_CONFIG as ɵba, PlaceRouter as ɵbc, InteractionService as ɵbd, ModalInteractionContextFactory as ɵbe, UrlService as ɵbf, PlaceHistory as ɵbg, TabbedPlaceNavigationComponent as ɵbh, AbstractPlaceNavigationComponent as ɵbi, ListPlaceNavComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, FocusBindingDirective as ɵc, DisposableComponent as ɵd,
|
|
4209
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, UrlService, UrlSnapshot, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, AUP_PLACE_CONFIG as ɵba, PlaceRouter as ɵbc, InteractionService as ɵbd, ModalInteractionContextFactory as ɵbe, UrlService as ɵbf, PlaceHistory as ɵbg, TabbedPlaceNavigationComponent as ɵbh, AbstractPlaceNavigationComponent as ɵbi, ListPlaceNavComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, FocusBindingDirective as ɵc, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, NumberInputComponent as ɵg, AbstractInputComponent as ɵh, StringInputComponent as ɵi, PasswordInputComponent as ɵj, SelectInputComponent as ɵk, CheckboxInputComponent as ɵl, ScrollContainerComponent as ɵm, NoopComponent as ɵn, SwitchCaseOption as ɵo, SwitchCaseWhenDirective as ɵp, SwitchCaseDefaultDirective as ɵq, SwitchCaseComponent as ɵr, FocusContainerComponent as ɵs, FocusableComponent as ɵt, PlaceModule as ɵu, EmptyStateComponent as ɵv, BusyOverlayComponent as ɵw, PlaceOutletComponent as ɵx, leftRightPlaceAnimation as ɵy, LEFT_RIGHT_PLACE_ANIMATION as ɵz };
|
|
4263
4210
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|