@coolon/angular-ui-powerups 2.0.0-alpha.33 → 2.0.0-alpha.34
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 +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +73 -21
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -5
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +56 -16
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/place-component.js +12 -0
- 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.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -5
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +56 -16
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/place-component.js +16 -0
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +70 -22
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +74 -22
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +8 -2
- package/lib/place/place-component.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-outlet.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/place-outlet/place-outlet.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAU,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAEL,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,UAAU,EAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAe,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAiBhE;IAA0C,wCAAmB;IAoC3D,8BAA6B,MAAc,EACd,WAAwB,EACM,WAAwB,EAC/C,YAAkC;QAHtE,YAIE,iBAAO,SAyCR;QA7C4B,YAAM,GAAN,MAAM,CAAQ;QACd,iBAAW,GAAX,WAAW,CAAa;QACM,iBAAW,GAAX,WAAW,CAAa;QArB1E,kBAAY,GAAG,IAAI,Y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A4C;YAE5C,UAAU,EAAE,CAAC,0BAA0B,CAAC;;SACzC,CAAC;QAuCa,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACpC,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,QAAQ,EAAE,CAAA;yCAHE,MAAM;YACD,WAAW,UAEH,oBAAoB;OAvC3D,oBAAoB,CA0LhC;IAAD,2BAAC;CAAA,AA1LD,CAA0C,mBAAmB,GA0L5D;SA1LY,oBAAoB","sourcesContent":["import { Component, EventEmitter, Inject, Input, OnInit, Optional, Output, SkipSelf, ViewChild } from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport {\n Constructable,\n DebugContext,\n Dsl,\n lang,\n ListModel,\n MutableValueModel,\n StoreInListModel,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { PlaceComponent } from '../../place-component';\nimport { AUP_PLACE_CONFIG, PlaceConfig } from '../../place-config';\nimport { PlaceDefinition } from '../../place-definition';\nimport { PlaceRouter } from '../../place-router';\n\nimport { Visit } from '../../visit';\nimport { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';\n\n// Quick hack to avoid circular references between this and PlaceComponents.\ninterface PlaceRef {\n readonly placeDefinition: PlaceDefinition\n\n initialiseBindings(param: ValueModel<Visit>): void;\n\n onPlaceReady(): void;\n}\n\n@Component({\n selector: 'aup-place-outlet',\n templateUrl: './place-outlet.component.html',\n styleUrls: ['./place-outlet.component.scss'],\n animations: [LEFT_RIGHT_PLACE_ANIMATION]\n})\nexport class PlaceOutletComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInValueModel('animateModel')\n animate: boolean;\n\n @Input() @TrackExternal({ defaultValue: true })\n animateModel: ValueModel<boolean>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrderModel') @TrackExternal()\n customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrder') @StoreInListModel('customPlaceAnimationOrderModel')\n customPlaceAnimationOrder: Constructable<PlaceComponent>[];\n\n @Output()\n readonly placeChanged = new EventEmitter<PlaceComponent>();\n\n @ViewChild('routeOutlet', { static: true })\n routerOut: RouterOutlet;\n\n\n private outletActivated = new MutableValueModel(false);\n private readonly _activatedRouteModel = new MutableValueModel<ActivatedRoute>();\n private readonly _activePlaceModel = new MutableValueModel<PlaceComponent>();\n private readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n private parentOutletModel: MutableValueModel<PlaceOutletComponent>;\n public readonly placeAnimationOrder: ValueModelChain<number>;\n\n private initialPlaceIndex: number = null;\n private routerVisitModel: ValueModelChain<Visit>;\n private _isPushingVisitToRoute = new MutableValueModel<boolean>(false);\n private navigationInProgress: ValueModelChain<boolean>;\n\n constructor(private readonly router: Router,\n private readonly placeRouter: PlaceRouter,\n @Optional() @Inject(AUP_PLACE_CONFIG) readonly placeConfig: PlaceConfig,\n @SkipSelf() @Optional() parentOutlet: PlaceOutletComponent) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.parentOutletModel = new MutableValueModel(parentOutlet);\n\n const defaultPlaceAnimationOrder = chain(this.parentOutletModel)\n .pullValueModel(o => o.activePlaceModel)\n .pluck('placeDefinition')\n .pluckList('children')\n .pluck('component');\n\n const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor as Constructable<PlaceComponent>);\n this.placeAnimationOrder = chain(this.customPlaceAnimationOrderModel)\n .otherwise(defaultPlaceAnimationOrder)\n .reduce((placesInOrder) => {\n let placeIndex = 0;\n if (activatePlaceType.value) {\n placeIndex = placesInOrder.indexOf(activatePlaceType.value);\n if (_.isNil(this.initialPlaceIndex)) {\n this.initialPlaceIndex = placeIndex;\n }\n }\n return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;\n }, { dependsOn: activatePlaceType });\n\n // Extract our visit model from the place router.\n this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');\n this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));\n\n this.navigationInProgress = chain(this.placeRouter.navigationInProgress);\n when.valueOf(this.navigationInProgress).becomesFalsey(() => {\n this.checkStateAndInitialise();\n });\n when.valueOf(this.outletActivated).becomesTruthy(() => {\n this.checkStateAndInitialise();\n });\n\n chain(this._activePlaceModel)\n .postponeWhile(this.navigationInProgress)\n .subscribe(place => this.placeChanged.emit(place));\n\n }\n\n // @Trace()\n ngOnInit() {\n }\n\n // @Trace()\n getAnimationOrder() {\n return this.placeAnimationOrder.value;\n }\n\n get animationDuration() {\n return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';\n }\n\n // @Trace()\n navigate(visit: Visit) {\n // console.log({ activatedRoute: this._activatedRouteModel.value });\n this.placeRouter.navigate(visit, {\n relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null\n });\n }\n\n get parentOutlet(): PlaceOutletComponent {\n return this.parentOutletModel.value;\n }\n\n\n get activePlaceModel(): ValueModel<PlaceComponent> {\n return this._activePlaceModel.readonly;\n }\n\n get activatedRouteModel(): ValueModel<ActivatedRoute> {\n return this._activatedRouteModel.readonly;\n }\n\n // @Trace()\n onOutletActivated(routerOutlet: RouterOutlet, place: PlaceComponent) {\n this._activatedRouteModel.value = routerOutlet.activatedRoute;\n this._activePlaceModel.value = place;\n this.outletActivated.value = true;\n this.checkStateAndInitialise();\n }\n\n // @Trace()\n onOutletDeactivated() {\n this.outletActivated.value = false;\n this._activePlaceModel.value = null;\n this._activatedRouteModel.value = null;\n }\n\n // @Trace()\n private checkStateAndInitialise() {\n const routerVisit = this.routerVisitModel.value;\n const activePlace = this.activePlaceModel.value;\n if (routerVisit && activePlace && !activePlace.isInitialised()) {\n if (routerVisit.placeDefinition !== activePlace.placeDefinition) {\n lang.illegalState('wrong visit!!!');\n }\n this.initialisePlace(routerVisit, activePlace);\n }\n }\n\n // @Trace()\n private initialisePlace(routerVisit: Visit, activePlace: PlaceComponent) {\n const visitModel = new MutableValueModel<Visit>(routerVisit);\n DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);\n activePlace.initialiseVisit(routerVisit, (current, previous) => {\n this.pushVisitChangeToRoute(previous, current);\n });\n if (!this.animateModel.value) {\n // we're not animating so trigger any post animation callbacks now.\n this.animationDone();\n }\n const { when, chain, valueOf } = Dsl.disposeWith(activePlace);\n when.valueOf(this.routerVisitModel)\n .changes(visit => {\n activePlace.updateVisit(visit);\n }, {\n unless: valueOf.any(\n this._isPushingVisitToRoute,\n this.routerVisitModel.isNil()\n ).areTruthy()\n });\n }\n\n private pushVisitChangeToRoute(previous: Visit, current: Visit) {\n this._isPushingVisitToRoute.value = true;\n this.placeRouter.pushVisitChangesToRoute(previous, current).finally(() => {\n this._isPushingVisitToRoute.value = false;\n });\n }\n\n// @Trace()\n animationStarted() {\n // console.log({ activePlace: this._activePlaceModel.value });\n }\n\n // @Trace()\n animationDone() {\n if (this._activePlaceModel.value) {\n this._activePlaceModel.value.onPlaceReady();\n }\n }\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"place-outlet.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/place-outlet/place-outlet.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAU,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAGL,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,E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C,cAAc,CAAC;;yDAC1B;IAGjB;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;kCACjC,UAAU;8DAAU;IAIlC;QADC,KAAK,CAAC,0BAA0B,CAAC,EAAE,aAAa,EAAE;kCACnB,SAAS;gFAAgC;IAIzE;QADC,KAAK,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAC,gCAAgC,CAAC;;2EACtB;IAG3D;QADC,MAAM,EAAE;;8DACkD;IAG3D;QADC,SAAS,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;kCAChC,YAAY;2DAAC;IAsHxB;QADC,KAAK,EAAE;;yCACwB,YAAY,EAAS,cAAc;;iEAMlE;IAeD;QADC,KAAK,EAAE;;;;mEAKP;IAnKU,oBAAoB;QANhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,i4BAA4C;YAE5C,UAAU,EAAE,CAAC,0BAA0B,CAAC;;SACzC,CAAC;QA8Ca,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACpC,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,QAAQ,EAAE,CAAA;yCAHE,MAAM;YACD,WAAW,UAEH,oBAAoB;OA9C3D,oBAAoB,CAmOhC;IAAD,2BAAC;CAAA,AAnOD,CAA0C,mBAAmB,GAmO5D;SAnOY,oBAAoB","sourcesContent":["import { Component, EventEmitter, Inject, Input, OnInit, Optional, Output, SkipSelf, ViewChild } from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport {\n BooleanValueModelChain,\n Constructable,\n DebugContext,\n Dsl,\n lang,\n ListModel, ListModelChain,\n MutableValueModel,\n StoreInListModel,\n StoreInValueModel, Trace,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { PlaceComponent } from '../../place-component';\nimport { AUP_PLACE_CONFIG, PlaceConfig } from '../../place-config';\nimport { PlaceDefinition } from '../../place-definition';\nimport { PlaceRouter } from '../../place-router';\n\nimport { Visit } from '../../visit';\nimport { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';\n\n// Quick hack to avoid circular references between this and PlaceComponents.\ninterface PlaceRef {\n readonly placeDefinition: PlaceDefinition\n\n initialiseBindings(param: ValueModel<Visit>): void;\n\n onPlaceReady(): void;\n}\n\n@Component({\n selector: 'aup-place-outlet',\n templateUrl: './place-outlet.component.html',\n styleUrls: ['./place-outlet.component.scss'],\n animations: [LEFT_RIGHT_PLACE_ANIMATION]\n})\nexport class PlaceOutletComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInValueModel('animateModel')\n animate: boolean;\n\n @Input() @TrackExternal({ defaultValue: true })\n animateModel: ValueModel<boolean>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrderModel') @TrackExternal()\n customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrder') @StoreInListModel('customPlaceAnimationOrderModel')\n customPlaceAnimationOrder: Constructable<PlaceComponent>[];\n\n @Output()\n readonly placeChanged = new EventEmitter<PlaceComponent>();\n\n @ViewChild('routeOutlet', { static: true })\n routerOut: RouterOutlet;\n\n private onAnimationFinishedJob: () => void;\n\n\n private outletActivated = new MutableValueModel(false);\n private readonly _activatedRouteModel = new MutableValueModel<ActivatedRoute>();\n private readonly _activePlaceModel = new MutableValueModel<PlaceComponent>();\n private readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n private parentOutletModel: MutableValueModel<PlaceOutletComponent>;\n public readonly activePlaceAnimationPosition: ValueModelChain<number>;\n\n private initialPlaceIndex: number = null;\n private routerVisitModel: ValueModelChain<Visit>;\n private _isPushingVisitToRoute = new MutableValueModel<boolean>(false);\n private navigationInProgress: ValueModelChain<boolean>;\n\n private isVeryFirstLoad = true;\n private placesInAnimationOrder: ListModelChain<Constructable<PlaceComponent>>;\n private animationSupported: BooleanValueModelChain;\n readonly animationEnabled: BooleanValueModelChain;\n\n constructor(private readonly router: Router,\n private readonly placeRouter: PlaceRouter,\n @Optional() @Inject(AUP_PLACE_CONFIG) readonly placeConfig: PlaceConfig,\n @SkipSelf() @Optional() parentOutlet: PlaceOutletComponent) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.parentOutletModel = new MutableValueModel(parentOutlet);\n\n const defaultPlaceAnimationOrder = chain(this.parentOutletModel)\n .pullValueModel(o => o.activePlaceModel)\n .pluck('placeDefinition')\n .pluckList('children')\n .pluck('component');\n\n const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor as Constructable<PlaceComponent>);\n\n this.placesInAnimationOrder = chain(this.customPlaceAnimationOrderModel)\n .otherwise(defaultPlaceAnimationOrder);\n\n this.activePlaceAnimationPosition = this.placesInAnimationOrder\n .reduce((placesInOrder) => {\n let placeIndex = 0;\n if (activatePlaceType.value) {\n placeIndex = placesInOrder.indexOf(activatePlaceType.value);\n if (_.isNil(this.initialPlaceIndex)) {\n this.initialPlaceIndex = placeIndex;\n }\n }\n return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;\n }, { dependsOn: activatePlaceType });\n\n this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);\n this.animationEnabled = valueOf.all(\n this.animateModel,\n this.animationSupported\n ).areTruthy();\n\n // Extract our visit model from the place router.\n this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');\n this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));\n\n this.navigationInProgress = chain(this.placeRouter.navigationInProgress);\n\n when(this.navigationInProgress).becomesFalsey(() => {\n this.checkStateAndInitialise();\n });\n when(this.outletActivated).becomesTruthy(() => {\n this.checkStateAndInitialise();\n });\n\n chain(this._activePlaceModel)\n .postponeWhile(this.navigationInProgress)\n .subscribe(place => this.placeChanged.emit(place));\n\n }\n\n // @Trace()\n ngOnInit() {\n }\n\n // @Trace()\n getAnimationOrder() {\n return this.activePlaceAnimationPosition.value;\n }\n\n get animationDuration() {\n return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';\n }\n\n // @Trace()\n navigate(visit: Visit) {\n // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);\n // if (!place) {\n // lang.illegalState()\n // }\n this.placeRouter.navigate(visit, {\n relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null\n });\n }\n\n get parentOutlet(): PlaceOutletComponent {\n return this.parentOutletModel.value;\n }\n\n\n get activePlaceModel(): ValueModel<PlaceComponent> {\n return this._activePlaceModel.readonly;\n }\n\n get activatedRouteModel(): ValueModel<ActivatedRoute> {\n return this._activatedRouteModel.readonly;\n }\n\n @Trace()\n onOutletActivated(routerOutlet: RouterOutlet, place: PlaceComponent) {\n this._activatedRouteModel.value = routerOutlet.activatedRoute;\n this._activePlaceModel.value = place;\n this.validateAnimationState(place);\n this.outletActivated.value = true;\n this.checkStateAndInitialise();\n }\n\n private validateAnimationState(place: PlaceComponent) {\n if (this.animateModel.value) {\n if (this.placesInAnimationOrder.length < 1) {\n console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');\n } else {\n if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {\n console.error(`PlaceOutlet.animate === true but placeAnimationOrder doesn't contain ${place.placeDefinition.component.name}.`);\n }\n }\n }\n }\n\n @Trace()\n onOutletDeactivated() {\n this.outletActivated.value = false;\n this._activePlaceModel.value = null;\n this._activatedRouteModel.value = null;\n }\n\n // @Trace()\n private checkStateAndInitialise() {\n const routerVisit = this.routerVisitModel.value;\n const activePlace = this.activePlaceModel.value;\n if (routerVisit && activePlace && !activePlace.isInitialised()) {\n if (routerVisit.placeDefinition !== activePlace.placeDefinition) {\n lang.illegalState('wrong visit!!!');\n }\n this.initialisePlace(routerVisit, activePlace);\n }\n }\n\n private initialisePlace(routerVisit: Visit, activePlace: PlaceComponent) {\n const visitModel = new MutableValueModel<Visit>(routerVisit);\n DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);\n activePlace.initialiseVisit(routerVisit, (current, previous) => {\n this.pushVisitChangeToRoute(previous, current);\n });\n const finishPlaceLoad = () => {\n this._activePlaceModel.value._notifyActive(true);\n }\n if (!this.animationEnabled.value || this.isVeryFirstLoad) {\n // if animation is disabled or this is the very first load then\n // we won't get our animation done callback so we finish the\n // process here and now.\n this.isVeryFirstLoad = false;\n finishPlaceLoad()\n } else {\n this.onAnimationFinishedJob = finishPlaceLoad;\n }\n const { when, chain, valueOf } = Dsl.disposeWith(activePlace);\n when.valueOf(this.routerVisitModel)\n .changes(visit => {\n activePlace.updateVisit(visit);\n }, {\n unless: valueOf.any(\n this._isPushingVisitToRoute,\n this.routerVisitModel.isNil()\n ).areTruthy()\n });\n }\n\n private pushVisitChangeToRoute(previous: Visit, current: Visit) {\n this._isPushingVisitToRoute.value = true;\n this.placeRouter.pushVisitChangesToRoute(previous, current).finally(() => {\n this._isPushingVisitToRoute.value = false;\n });\n }\n\n// @Trace()\n animationStarted() {\n // console.log({ activePlace: this._activePlaceModel.value });\n }\n\n // @Trace()\n animationDone() {\n if (this.onAnimationFinishedJob) {\n this.onAnimationFinishedJob();\n this.onAnimationFinishedJob = undefined;\n }\n }\n\n}\n"]}
|
|
@@ -16,6 +16,9 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
16
16
|
var _this = _super.call(this) || this;
|
|
17
17
|
_this.visitModel = new MutableValueModel();
|
|
18
18
|
_this._inVisitUpdate = new Guard();
|
|
19
|
+
_this._active = new MutableValueModel(false);
|
|
20
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
21
|
+
when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
|
|
19
22
|
return _this;
|
|
20
23
|
}
|
|
21
24
|
PlaceComponent_1 = PlaceComponent;
|
|
@@ -73,6 +76,19 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
73
76
|
enumerable: true,
|
|
74
77
|
configurable: true
|
|
75
78
|
});
|
|
79
|
+
Object.defineProperty(PlaceComponent.prototype, "active", {
|
|
80
|
+
get: function () {
|
|
81
|
+
return this._active.readonly;
|
|
82
|
+
},
|
|
83
|
+
enumerable: true,
|
|
84
|
+
configurable: true
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* Called by the router when the place is ready to interact after any animations have run.
|
|
88
|
+
*/
|
|
89
|
+
PlaceComponent.prototype._notifyActive = function (active) {
|
|
90
|
+
this._active.value = active;
|
|
91
|
+
};
|
|
76
92
|
PlaceComponent.prototype.onPlaceReady = function () {
|
|
77
93
|
};
|
|
78
94
|
var PlaceComponent_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EACL,MAAM,EACN,OAAO,EAEP,YAAY,EACZ,GAAG,EACH,KAAK,EAEL,IAAI,EACJ,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,8CAA8C;AAC9C,MAAM,CAAC,IAAM,wBAAwB,GAAG,0BAA0B,CAAC;AACnE,qBAAqB;AACrB,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BAAC;CAAA,AApFD,CAAoC,mBAAmB,GAoFtD;SApFY,cAAc;AAsF3B,WAAiB,cAAc;IAE7B,SAAgB,2BAA2B,CAAC,MAAW;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAA4B,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACtF,CAAC;IAFe,0CAA2B,8BAE1C,CAAA;IAED,SAAgB,kBAAkB,CAAC,KAAoC;QACrE,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,wBAAwB,CAA+B,CAAC;IAClG,CAAC;IAFe,iCAAkB,qBAEjC,CAAA;IAED,SAAgB,aAAa,CAAC,KAAoC;QAChE,OAAO,OAAO,CAAC,WAAW,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;IAFe,4BAAa,gBAE5B,CAAA;IAED,SAAgB,gBAAgB,CAAC,KAAoC,EAAE,UAA2B;QAChG,OAAO,CAAC,cAAc,CAAC,wBAAwB,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAFe,+BAAgB,mBAE/B,CAAA;AAEH,CAAC,EAlBgB,cAAc,KAAd,cAAc,QAkB9B","sourcesContent":["import { Directive } from '@angular/core';\nimport {\n assert,\n Binding,\n Constructable,\n DebugContext,\n Dsl,\n Guard,\n IMutableHasValue,\n lang,\n MutableValueModel\n} from '@coolon/pectin';\nimport { Klass } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator';\nimport 'reflect-metadata';\nimport { DisposableComponent } from '../components/disposable-component';\nimport { InteractionContext } from '../interaction/interaction-context';\nimport { PlaceDefinition } from './place-definition';\nimport { ParameterDefinition } from './route/parameter-definition.class';\nimport { Visit } from './visit';\n\n// RAKE: making this Symbol(...) broke things.\nexport const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';\n// this one seems ok.\nexport const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');\n\n@Directive()\nexport class PlaceComponent extends DisposableComponent {\n\n private visitModel = new MutableValueModel<Visit>();\n private _inVisitUpdate = new Guard();\n private _active = new MutableValueModel<boolean>(false);\n\n interactionContext?: InteractionContext;\n\n canDeactivate?(interactionContext: InteractionContext): boolean | Promise<boolean>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n when(this._active).becomesTruthy(() => this.onPlaceReady());\n }\n\n // @Trace()\n public initialiseVisit(visit: Visit, notifyVisitChanged: (current: Visit, previous:Visit) => void) {\n assert.isNil(this.visitModel.value);\n\n const { when } = Dsl.disposeWith(this);\n\n this.visitModel.value = visit;\n DebugContext.getOrCreate(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);\n this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => this.installBinding(parameterDef));\n when.valueOf(this.visitModel).changes((current,previous) => {\n notifyVisitChanged(current, previous);\n }, {unless: this._inVisitUpdate});\n }\n\n public updateVisit(visit: Visit) {\n assert.isTruthy(this.isInitialised());\n assert.notNil(visit);\n this._inVisitUpdate.whileTrue(() => {\n this.visitModel.value = visit;\n });\n }\n\n isInitialised() {\n return !!this.visitModel.value;\n }\n\n // @Trace()\n private installBinding<T, S>(parameterDef: ParameterDefinition<T, S>) {\n const model = this[parameterDef.propertyName] as IMutableHasValue<S>;\n DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);\n const binding = this.registerDisposable(new Binding(this.visitModel, model, {\n toRight(visit: Visit): S {\n const value = visit.getParameter(parameterDef.name);\n // console.log('push to component', { name: parameterDef.name, value, visit });\n return value;\n },\n toLeft(value: S, currentVisit?: Visit): Visit {\n // console.log('push to route', { name: parameterDef.name, value, currentVisit });\n return currentVisit.replace(parameterDef, value);\n }\n }));\n\n binding.writeRight();\n }\n\n @Memoize()\n get placeDefinition(): PlaceDefinition {\n return PlaceComponent.getDefinition(this.constructor as any as Constructable<PlaceComponent>);\n }\n\n get childPlaces(): Constructable<PlaceComponent>[] {\n return this.placeDefinition.children.map(d => d.component);\n }\n\n get active() {\n return this._active.readonly;\n }\n\n /**\n * Called by the router when the place is ready to interact after any animations have run.\n */\n _notifyActive(active: boolean) {\n this._active.value = active;\n }\n\n onPlaceReady() {\n }\n\n}\n\nexport namespace PlaceComponent {\n\n export function isPlaceComponentConstructor(target: any): target is Constructable<PlaceComponent> {\n return lang.constructorChain(target as Constructable<any>).includes(PlaceComponent);\n }\n\n export function getRouteParameters(klass: Constructable<PlaceComponent>): ParameterDefinition<any>[] {\n return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY) as ParameterDefinition<any>[];\n }\n\n export function getDefinition(klass: Constructable<PlaceComponent>): PlaceDefinition {\n return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);\n }\n\n export function injectDefinition(klass: Constructable<PlaceComponent>, definition: PlaceDefinition) {\n Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place.module.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './place.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/cdk/bidi';\nimport * as i4 from '@angular/material/progress-spinner';\nimport * as i5 from '@angular/router';\nimport * as i6 from '@angular/material/tabs';\nimport * as i7 from '@angular/material/core';\nimport * as i8 from '@angular/material/divider';\nimport * as i9 from '@angular/material/list';\nimport * as i10 from '@angular/cdk/scrolling';\nimport * as i11 from '@angular/material/tooltip';\nimport * as i12 from '@angular/material/icon';\nimport * as i13 from '../directives/command.directive';\nimport * as i14 from '../directives/focus-binding.directive';\nimport * as i15 from '@angular/flex-layout/flex';\nimport * as i16 from '../components/forms/number-input/number-input.component';\nimport * as i17 from '../components/forms/string-input/string-input.component';\nimport * as i18 from '../components/forms/text-input/text-input.component';\nimport * as i19 from '../components/forms/password-input/password-input.component';\nimport * as i20 from '../components/forms/checkbox-input/checkbox-input.component';\nimport * as i21 from '../components/forms/select-input/select-input.component';\nimport * as i22 from '../components/forms/multiple-select-input/multiple-select-input.component';\nimport * as i23 from '../components/forms/autocomplete-input/autocomplete-input.component';\nimport * as i24 from '../components/scroll-container/scroll-container.component';\nimport * as i25 from '../components/noop/noop.component';\nimport * as i26 from '../components/switch-case/switch-case.component';\nimport * as i27 from '../components/focus-container/focus-container.component';\nimport * as i28 from '../components/vertical-focus-container/vertical-focus-container.component';\nimport * as i29 from '../components/focusable.component';\nimport * as i30 from '../components/card-container/card-container.component';\nimport * as i31 from '../components/table/table.component';\nimport * as i32 from '../components/table/edit-row-controls/edit-row-controls.component';\nimport * as i33 from '../components/table/column-template/column-template.directive';\nimport * as i34 from '../components/icon/icon.component';\nimport * as i35 from '../components/section-header/section-header.component';\nimport * as i36 from '../components/table/table-row-menu/table-row-menu.component';\nimport * as i37 from '../components/commands/command-bar.component';\nimport * as i38 from '../components/commands/command.component';\nimport * as i39 from '../components/commands/popup-menu/abstract-popup-menu.component';\nimport * as i40 from '../components/commands/popup-menu/popup-menu.component';\nimport * as i41 from '../components/commands/command-face/command-face.component';\nimport * as i42 from '../components/commands/popup-menu-renderer/popup-menu-renderer.component';\nimport * as i43 from '../components/commands/popup-menu/more-menu.component';\nimport * as i44 from './components/empty-state/empty-state.component';\nimport * as i45 from './components/busy-overlay/busy-overlay.component';\nimport * as i46 from './components/place-outlet/place-outlet.component';\nimport * as i47 from './components/tabbed-place-navigation/tabbed-place-navigation.component';\nimport * as i48 from './components/list-place-nav/list-place-nav.component';\nimport * as i49 from './components/side-place-navigation/side-place-navigation.component';\nimport * as i50 from './components/abstract-place-navigation.component';\nimport * as i51 from '@angular/platform-browser/animations';\nimport * as i52 from '../directives/directives.module';\nimport * as i53 from '../components/components.module';\nexport const PlaceModuleNgFactory:i0.NgModuleFactory<i1.PlaceModule> = (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.Dir = (<any>(null as any));\nvar _decl0_12:i4.MatProgressSpinner = (<any>(null as any));\nvar _decl0_13:i4.MatSpinner = (<any>(null as any));\nvar _decl0_14:i5.RouterOutlet = (<any>(null as any));\nvar _decl0_15:i5.RouterLink = (<any>(null as any));\nvar _decl0_16:i5.RouterLinkWithHref = (<any>(null as any));\nvar _decl0_17:i5.RouterLinkActive = (<any>(null as any));\nvar _decl0_18:i5.ɵangular_packages_router_router_l = (<any>(null as any));\nvar _decl0_19:i6.MatTabGroup = (<any>(null as any));\nvar _decl0_20:i6.MatTabLabel = (<any>(null as any));\nvar _decl0_21:i6.MatTab = (<any>(null as any));\nvar _decl0_22:i6.MatTabNav = (<any>(null as any));\nvar _decl0_23:i6.MatTabLink = (<any>(null as any));\nvar _decl0_24:i6.MatTabContent = (<any>(null as any));\nvar _decl0_25:i7.MatLine = (<any>(null as any));\nvar _decl0_26:i7.MatPseudoCheckbox = (<any>(null as any));\nvar _decl0_27:i8.MatDivider = (<any>(null as any));\nvar _decl0_28:i9.MatList = (<any>(null as any));\nvar _decl0_29:i9.MatNavList = (<any>(null as any));\nvar _decl0_30:i9.MatListItem = (<any>(null as any));\nvar _decl0_31:i9.MatListAvatarCssMatStyler = (<any>(null as any));\nvar _decl0_32:i9.MatListIconCssMatStyler = (<any>(null as any));\nvar _decl0_33:i9.MatListSubheaderCssMatStyler = (<any>(null as any));\nvar _decl0_34:i9.MatSelectionList = (<any>(null as any));\nvar _decl0_35:i9.MatListOption = (<any>(null as any));\nvar _decl0_36:i10.CdkScrollable = (<any>(null as any));\nvar _decl0_37:i11.MatTooltip = (<any>(null as any));\nvar _decl0_38:i11.TooltipComponent = (<any>(null as any));\nvar _decl0_39:i12.MatIcon = (<any>(null as any));\nvar _decl0_40:i13.CommandDirective<any> = (<any>(null as any));\nvar _decl0_41:i14.FocusBindingDirective = (<any>(null as any));\nvar _decl0_42:i15.DefaultLayoutDirective = (<any>(null as any));\nvar _decl0_43:i15.DefaultLayoutGapDirective = (<any>(null as any));\nvar _decl0_44:i15.DefaultLayoutAlignDirective = (<any>(null as any));\nvar _decl0_45:i15.DefaultFlexOrderDirective = (<any>(null as any));\nvar _decl0_46:i15.DefaultFlexOffsetDirective = (<any>(null as any));\nvar _decl0_47:i15.FlexFillDirective = (<any>(null as any));\nvar _decl0_48:i15.DefaultFlexAlignDirective = (<any>(null as any));\nvar _decl0_49:i15.DefaultFlexDirective = (<any>(null as any));\nvar _decl0_50:i16.NumberInputComponent = (<any>(null as any));\nvar _decl0_51:i17.StringInputComponent = (<any>(null as any));\nvar _decl0_52:i18.TextInputComponent = (<any>(null as any));\nvar _decl0_53:i19.PasswordInputComponent = (<any>(null as any));\nvar _decl0_54:i20.CheckboxInputComponent = (<any>(null as any));\nvar _decl0_55:i21.SelectInputComponent<any> = (<any>(null as any));\nvar _decl0_56:i22.MultipleSelectInputComponent<any> = (<any>(null as any));\nvar _decl0_57:i23.AutocompleteInputComponent<any> = (<any>(null as any));\nvar _decl0_58:i24.ScrollContainerComponent = (<any>(null as any));\nvar _decl0_59:i25.NoopComponent = (<any>(null as any));\nvar _decl0_60:i26.SwitchCaseComponent<any> = (<any>(null as any));\nvar _decl0_61:i26.SwitchCaseWhenDirective<any> = (<any>(null as any));\nvar _decl0_62:i26.SwitchCaseDefaultDirective<any> = (<any>(null as any));\nvar _decl0_63:i27.FocusContainerComponent = (<any>(null as any));\nvar _decl0_64:i28.VerticalFocusContainerComponent = (<any>(null as any));\nvar _decl0_65:i29.FocusableComponent = (<any>(null as any));\nvar _decl0_66:i30.CardContainerComponent = (<any>(null as any));\nvar _decl0_67:i31.TableComponent<any> = (<any>(null as any));\nvar _decl0_68:i32.EditRowControls<any> = (<any>(null as any));\nvar _decl0_69:i33.ColumnTemplateDirective = (<any>(null as any));\nvar _decl0_70:i34.IconComponent = (<any>(null as any));\nvar _decl0_71:i35.SectionHeaderComponent = (<any>(null as any));\nvar _decl0_72:i36.TableRowMenuComponent<any> = (<any>(null as any));\nvar _decl0_73:i37.CommandBarComponent = (<any>(null as any));\nvar _decl0_74:i38.CommandComponent<any> = (<any>(null as any));\nvar _decl0_75:i39.AbstractPopupMenuComponent = (<any>(null as any));\nvar _decl0_76:i40.PopupMenuComponent = (<any>(null as any));\nvar _decl0_77:i41.CommandFaceComponent<any> = (<any>(null as any));\nvar _decl0_78:i42.PopupMenuRendererComponent = (<any>(null as any));\nvar _decl0_79:i43.MoreMenuComponent = (<any>(null as any));\nvar _decl0_80:i44.EmptyStateComponent = (<any>(null as any));\nvar _decl0_81:i45.BusyOverlayComponent = (<any>(null as any));\nvar _decl0_82:i46.PlaceOutletComponent = (<any>(null as any));\nvar _decl0_83:i47.TabbedPlaceNavigationComponent = (<any>(null as any));\nvar _decl0_84:i48.ListPlaceNavComponent = (<any>(null as any));\nvar _decl0_85:i49.SidePlaceNavigationComponent = (<any>(null as any));\nvar _decl0_86:i50.AbstractPlaceNavigationComponent = (<any>(null as any));\nvar _decl0_87:i2.AsyncPipe = (<any>(null as any));\nvar _decl0_88:i2.UpperCasePipe = (<any>(null as any));\nvar _decl0_89:i2.LowerCasePipe = (<any>(null as any));\nvar _decl0_90:i2.JsonPipe = (<any>(null as any));\nvar _decl0_91:i2.SlicePipe = (<any>(null as any));\nvar _decl0_92:i2.DecimalPipe = (<any>(null as any));\nvar _decl0_93:i2.PercentPipe = (<any>(null as any));\nvar _decl0_94:i2.TitleCasePipe = (<any>(null as any));\nvar _decl0_95:i2.CurrencyPipe = (<any>(null as any));\nvar _decl0_96:i2.DatePipe = (<any>(null as any));\nvar _decl0_97:i2.I18nPluralPipe = (<any>(null as any));\nvar _decl0_98:i2.I18nSelectPipe = (<any>(null as any));\nvar _decl0_99:i2.KeyValuePipe = (<any>(null as any));\nvar _decl0_100:i2.CommonModule = (<any>(null as any));\nvar _decl0_101:i51.BrowserAnimationsModule = (<any>(null as any));\nvar _decl0_102:i4.MatProgressSpinnerModule = (<any>(null as any));\nvar _decl0_103:i5.RouterModule = (<any>(null as any));\nvar _decl0_104:i6.MatTabsModule = (<any>(null as any));\nvar _decl0_105:i9.MatListModule = (<any>(null as any));\nvar _decl0_106:i11.MatTooltipModule = (<any>(null as any));\nvar _decl0_107:i12.MatIconModule = (<any>(null as any));\nvar _decl0_108:i52.DirectivesModule = (<any>(null as any));\nvar _decl0_109:i15.FlexModule = (<any>(null as any));\nvar _decl0_110:i53.ComponentsModule = (<any>(null as any));\nvar _decl0_111:i0.TemplateRef<any> = (<any>(null as any));\nvar _decl0_112:i0.ElementRef<any> = (<any>(null as any));\nfunction _View_EmptyStateComponent_Host_1_0():void {\n var _any:any = (null as any);\n}\nfunction _View_EmptyStateComponent_1_0():void {\n var _any:any = (null as any);\n}\nfunction _View_BusyOverlayComponent_Host_2_0():void {\n var _any:any = (null as any);\n}\nfunction _View_BusyOverlayComponent_2_1():void {\n if (_decl0_81.busyModel.value) {\n var _any:any = (null as any);\n const currVal_0:any = 52;\n currVal_0;\n const currVal_1:any = 'indeterminate';\n currVal_1;\n const currVal_2:any = _decl0_12._noopAnimations;\n currVal_2;\n const currVal_3:any = _decl0_12.diameter;\n currVal_3;\n const currVal_4:any = _decl0_12.diameter;\n currVal_4;\n const currVal_5:any = ((_decl0_12.mode === 'determinate')? 0: null);\n currVal_5;\n const currVal_6:any = ((_decl0_12.mode === 'determinate')? 100: null);\n currVal_6;\n const currVal_7:any = ((_decl0_12.mode === 'determinate')? _decl0_12.value: null);\n currVal_7;\n const currVal_8:any = _decl0_12.mode;\n currVal_8;\n }\n}\nfunction _View_BusyOverlayComponent_2_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_81.busyModel.value;\n currVal_0;\n}\nfunction _View_PlaceOutletComponent_Host_3_0():void {\n var _any:any = (null as any);\n}\nfunction _View_PlaceOutletComponent_3_1():void {\n if (_decl0_82.animateModel.value) {\n var _any:any = (null as any);\n const currVal_0:any = {value:_decl0_82.getAnimationOrder(),params:{duration:_decl0_82.animationDuration}};\n currVal_0;\n const pd_1:any = ((<any>_decl0_82.animationStarted()) !== false);\n const pd_2:any = ((<any>_decl0_82.animationDone()) !== false);\n const pd_3:any = ((<any>_decl0_82.onOutletActivated(_decl0_14,_any)) !== false);\n const pd_4:any = ((<any>_decl0_82.onOutletDeactivated()) !== false);\n }\n}\nfunction _View_PlaceOutletComponent_3_2():void {\n if (!_decl0_82.animateModel.value) {\n var _any:any = (null as any);\n const pd_0:any = ((<any>_decl0_82.onOutletActivated(_decl0_14,_any)) !== false);\n const pd_1:any = ((<any>_decl0_82.onOutletDeactivated()) !== false);\n }\n}\nfunction _View_PlaceOutletComponent_3_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_82.animateModel.value;\n currVal_0;\n const currVal_1:any = !_decl0_82.animateModel.value;\n currVal_1;\n}\nfunction _View_TabbedPlaceNavigationComponent_Host_4_0():void {\n var _any:any = (null as any);\n}\nfunction _View_TabbedPlaceNavigationComponent_4_2():void {\n if (_decl0_83.getNav(_any).icon()) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_83.getNav(_any).icon();\n currVal_0;\n }\n}\nfunction _View_TabbedPlaceNavigationComponent_4_1():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_83.isActive(_any);\n currVal_0;\n const currVal_1:any = (_decl0_23.active? 'page': null);\n currVal_1;\n const currVal_2:any = _decl0_23.disabled;\n currVal_2;\n const currVal_3:any = _decl0_23.tabIndex;\n currVal_3;\n const currVal_4:any = _decl0_23.disabled;\n currVal_4;\n const currVal_5:any = _decl0_23.active;\n currVal_5;\n const currVal_6:any = _decl0_83.getNav(_any).tooltip();\n currVal_6;\n const currVal_7:any = _decl0_83.commandFactory.create(_any);\n currVal_7;\n const currVal_8:any = _decl0_83.getNav(_any).icon();\n currVal_8;\n const currVal_9:any = _decl0_83.getNav(_any).title();\n currVal_9;\n const pd_10:any = ((<any>_decl0_40.notifyClick(_any)) !== false);\n}\nfunction _View_TabbedPlaceNavigationComponent_4_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_22._showPaginationControls;\n currVal_0;\n const currVal_1:any = (_decl0_22._getLayoutDirection() == 'rtl');\n currVal_1;\n const currVal_2:any = ((_decl0_22.color !== 'warn') && (_decl0_22.color !== 'accent'));\n currVal_2;\n const currVal_3:any = (_decl0_22.color === 'accent');\n currVal_3;\n const currVal_4:any = (_decl0_22.color === 'warn');\n currVal_4;\n const currVal_5:any = _decl0_83.placeDefinitions.value;\n currVal_5;\n}\nfunction _View_ListPlaceNavComponent_Host_5_0():void {\n var _any:any = (null as any);\n}\nfunction _View_ListPlaceNavComponent_5_2():void {\n if (_decl0_84.getNav(_any).icon()) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_84.getNav(_any).icon();\n currVal_0;\n }\n}\nfunction _View_ListPlaceNavComponent_5_1():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_30.disabled;\n currVal_0;\n const currVal_1:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_1;\n const currVal_2:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_2;\n const currVal_3:any = _decl0_84.getNav(_any).tooltip();\n currVal_3;\n const currVal_4:any = _decl0_84.commandFactory.create(_any);\n currVal_4;\n const currVal_5:any = _decl0_84.isActive(_any);\n currVal_5;\n const currVal_6:any = _decl0_84.getNav(_any).icon();\n currVal_6;\n const currVal_7:any = _decl0_84.getNav(_any).title();\n currVal_7;\n const pd_8:any = ((<any>_decl0_40.notifyClick(_any)) !== false);\n}\nfunction _View_ListPlaceNavComponent_5_0():void {\n var _any:any = (null as any);\n const currVal_0:any = '';\n currVal_0;\n const currVal_1:any = _decl0_84.placeDefinitions.value;\n currVal_1;\n}\nfunction _View_SidePlaceNavigationComponent_Host_6_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_85.expanded;\n currVal_0;\n}\nfunction _View_SidePlaceNavigationComponent_6_2():void {\n if (_decl0_85.getNav(_any).icon()) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_85.getNav(_any).icon();\n currVal_0;\n }\n}\nfunction _View_SidePlaceNavigationComponent_6_1():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_30.disabled;\n currVal_0;\n const currVal_1:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_1;\n const currVal_2:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_2;\n const currVal_3:any = _decl0_85.getNav(_any).tooltip();\n currVal_3;\n const currVal_4:any = _decl0_85.commandFactory.create(_any);\n currVal_4;\n const currVal_5:any = _decl0_85.isActive(_any);\n currVal_5;\n const currVal_6:any = _decl0_85.getNav(_any).icon();\n currVal_6;\n const currVal_7:any = _decl0_85.getNav(_any).title();\n currVal_7;\n const pd_8:any = ((<any>_decl0_40.notifyClick(_any)) !== false);\n}\nfunction _View_SidePlaceNavigationComponent_6_3():void {\n if (_decl0_85.navEndTemplate) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_85.navEndTemplate;\n currVal_0;\n }\n}\nfunction _View_SidePlaceNavigationComponent_6_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_30.disabled;\n currVal_0;\n const currVal_1:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_1;\n const currVal_2:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_2;\n const currVal_3:any = 'mat:menu';\n currVal_3;\n const currVal_4:any = 'mat:arrow_back';\n currVal_4;\n const currVal_5:any = _decl0_85.placeDefinitions.value;\n currVal_5;\n const currVal_6:any = 1;\n currVal_6;\n const currVal_7:any = _decl0_85.navEndTemplate;\n currVal_7;\n const pd_8:any = ((<any>_decl0_85.toggleMenu()) !== false);\n}\nfunction _View_AbstractPlaceNavigationComponent_Host_7_0():void {\n var _any:any = (null as any);\n}\nfunction _View_AbstractPlaceNavigationComponent_7_0():void {\n var _any:any = (null as any);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"place.module.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './place.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/cdk/bidi';\nimport * as i4 from '@angular/material/progress-spinner';\nimport * as i5 from '@angular/router';\nimport * as i6 from '@angular/material/tabs';\nimport * as i7 from '@angular/material/core';\nimport * as i8 from '@angular/material/divider';\nimport * as i9 from '@angular/material/list';\nimport * as i10 from '@angular/cdk/scrolling';\nimport * as i11 from '@angular/material/tooltip';\nimport * as i12 from '@angular/material/icon';\nimport * as i13 from '../directives/command.directive';\nimport * as i14 from '../directives/focus-binding.directive';\nimport * as i15 from '@angular/flex-layout/flex';\nimport * as i16 from '../components/forms/number-input/number-input.component';\nimport * as i17 from '../components/forms/string-input/string-input.component';\nimport * as i18 from '../components/forms/text-input/text-input.component';\nimport * as i19 from '../components/forms/password-input/password-input.component';\nimport * as i20 from '../components/forms/checkbox-input/checkbox-input.component';\nimport * as i21 from '../components/forms/select-input/select-input.component';\nimport * as i22 from '../components/forms/multiple-select-input/multiple-select-input.component';\nimport * as i23 from '../components/forms/autocomplete-input/autocomplete-input.component';\nimport * as i24 from '../components/scroll-container/scroll-container.component';\nimport * as i25 from '../components/noop/noop.component';\nimport * as i26 from '../components/switch-case/switch-case.component';\nimport * as i27 from '../components/focus-container/focus-container.component';\nimport * as i28 from '../components/vertical-focus-container/vertical-focus-container.component';\nimport * as i29 from '../components/focusable.component';\nimport * as i30 from '../components/card-container/card-container.component';\nimport * as i31 from '../components/table/table.component';\nimport * as i32 from '../components/table/edit-row-controls/edit-row-controls.component';\nimport * as i33 from '../components/table/column-template/column-template.directive';\nimport * as i34 from '../components/icon/icon.component';\nimport * as i35 from '../components/section-header/section-header.component';\nimport * as i36 from '../components/table/table-row-menu/table-row-menu.component';\nimport * as i37 from '../components/commands/command-bar.component';\nimport * as i38 from '../components/commands/command.component';\nimport * as i39 from '../components/commands/popup-menu/abstract-popup-menu.component';\nimport * as i40 from '../components/commands/popup-menu/popup-menu.component';\nimport * as i41 from '../components/commands/command-face/command-face.component';\nimport * as i42 from '../components/commands/popup-menu-renderer/popup-menu-renderer.component';\nimport * as i43 from '../components/commands/popup-menu/more-menu.component';\nimport * as i44 from './components/empty-state/empty-state.component';\nimport * as i45 from './components/busy-overlay/busy-overlay.component';\nimport * as i46 from './components/place-outlet/place-outlet.component';\nimport * as i47 from './components/tabbed-place-navigation/tabbed-place-navigation.component';\nimport * as i48 from './components/list-place-nav/list-place-nav.component';\nimport * as i49 from './components/side-place-navigation/side-place-navigation.component';\nimport * as i50 from './components/abstract-place-navigation.component';\nimport * as i51 from '@angular/platform-browser/animations';\nimport * as i52 from '../directives/directives.module';\nimport * as i53 from '../components/components.module';\nexport const PlaceModuleNgFactory:i0.NgModuleFactory<i1.PlaceModule> = (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.Dir = (<any>(null as any));\nvar _decl0_12:i4.MatProgressSpinner = (<any>(null as any));\nvar _decl0_13:i4.MatSpinner = (<any>(null as any));\nvar _decl0_14:i5.RouterOutlet = (<any>(null as any));\nvar _decl0_15:i5.RouterLink = (<any>(null as any));\nvar _decl0_16:i5.RouterLinkWithHref = (<any>(null as any));\nvar _decl0_17:i5.RouterLinkActive = (<any>(null as any));\nvar _decl0_18:i5.ɵangular_packages_router_router_l = (<any>(null as any));\nvar _decl0_19:i6.MatTabGroup = (<any>(null as any));\nvar _decl0_20:i6.MatTabLabel = (<any>(null as any));\nvar _decl0_21:i6.MatTab = (<any>(null as any));\nvar _decl0_22:i6.MatTabNav = (<any>(null as any));\nvar _decl0_23:i6.MatTabLink = (<any>(null as any));\nvar _decl0_24:i6.MatTabContent = (<any>(null as any));\nvar _decl0_25:i7.MatLine = (<any>(null as any));\nvar _decl0_26:i7.MatPseudoCheckbox = (<any>(null as any));\nvar _decl0_27:i8.MatDivider = (<any>(null as any));\nvar _decl0_28:i9.MatList = (<any>(null as any));\nvar _decl0_29:i9.MatNavList = (<any>(null as any));\nvar _decl0_30:i9.MatListItem = (<any>(null as any));\nvar _decl0_31:i9.MatListAvatarCssMatStyler = (<any>(null as any));\nvar _decl0_32:i9.MatListIconCssMatStyler = (<any>(null as any));\nvar _decl0_33:i9.MatListSubheaderCssMatStyler = (<any>(null as any));\nvar _decl0_34:i9.MatSelectionList = (<any>(null as any));\nvar _decl0_35:i9.MatListOption = (<any>(null as any));\nvar _decl0_36:i10.CdkScrollable = (<any>(null as any));\nvar _decl0_37:i11.MatTooltip = (<any>(null as any));\nvar _decl0_38:i11.TooltipComponent = (<any>(null as any));\nvar _decl0_39:i12.MatIcon = (<any>(null as any));\nvar _decl0_40:i13.CommandDirective<any> = (<any>(null as any));\nvar _decl0_41:i14.FocusBindingDirective = (<any>(null as any));\nvar _decl0_42:i15.DefaultLayoutDirective = (<any>(null as any));\nvar _decl0_43:i15.DefaultLayoutGapDirective = (<any>(null as any));\nvar _decl0_44:i15.DefaultLayoutAlignDirective = (<any>(null as any));\nvar _decl0_45:i15.DefaultFlexOrderDirective = (<any>(null as any));\nvar _decl0_46:i15.DefaultFlexOffsetDirective = (<any>(null as any));\nvar _decl0_47:i15.FlexFillDirective = (<any>(null as any));\nvar _decl0_48:i15.DefaultFlexAlignDirective = (<any>(null as any));\nvar _decl0_49:i15.DefaultFlexDirective = (<any>(null as any));\nvar _decl0_50:i16.NumberInputComponent = (<any>(null as any));\nvar _decl0_51:i17.StringInputComponent = (<any>(null as any));\nvar _decl0_52:i18.TextInputComponent = (<any>(null as any));\nvar _decl0_53:i19.PasswordInputComponent = (<any>(null as any));\nvar _decl0_54:i20.CheckboxInputComponent = (<any>(null as any));\nvar _decl0_55:i21.SelectInputComponent<any> = (<any>(null as any));\nvar _decl0_56:i22.MultipleSelectInputComponent<any> = (<any>(null as any));\nvar _decl0_57:i23.AutocompleteInputComponent<any> = (<any>(null as any));\nvar _decl0_58:i24.ScrollContainerComponent = (<any>(null as any));\nvar _decl0_59:i25.NoopComponent = (<any>(null as any));\nvar _decl0_60:i26.SwitchCaseComponent<any> = (<any>(null as any));\nvar _decl0_61:i26.SwitchCaseWhenDirective<any> = (<any>(null as any));\nvar _decl0_62:i26.SwitchCaseDefaultDirective<any> = (<any>(null as any));\nvar _decl0_63:i27.FocusContainerComponent = (<any>(null as any));\nvar _decl0_64:i28.VerticalFocusContainerComponent = (<any>(null as any));\nvar _decl0_65:i29.FocusableComponent = (<any>(null as any));\nvar _decl0_66:i30.CardContainerComponent = (<any>(null as any));\nvar _decl0_67:i31.TableComponent<any> = (<any>(null as any));\nvar _decl0_68:i32.EditRowControls<any> = (<any>(null as any));\nvar _decl0_69:i33.ColumnTemplateDirective = (<any>(null as any));\nvar _decl0_70:i34.IconComponent = (<any>(null as any));\nvar _decl0_71:i35.SectionHeaderComponent = (<any>(null as any));\nvar _decl0_72:i36.TableRowMenuComponent<any> = (<any>(null as any));\nvar _decl0_73:i37.CommandBarComponent = (<any>(null as any));\nvar _decl0_74:i38.CommandComponent<any> = (<any>(null as any));\nvar _decl0_75:i39.AbstractPopupMenuComponent = (<any>(null as any));\nvar _decl0_76:i40.PopupMenuComponent = (<any>(null as any));\nvar _decl0_77:i41.CommandFaceComponent<any> = (<any>(null as any));\nvar _decl0_78:i42.PopupMenuRendererComponent = (<any>(null as any));\nvar _decl0_79:i43.MoreMenuComponent = (<any>(null as any));\nvar _decl0_80:i44.EmptyStateComponent = (<any>(null as any));\nvar _decl0_81:i45.BusyOverlayComponent = (<any>(null as any));\nvar _decl0_82:i46.PlaceOutletComponent = (<any>(null as any));\nvar _decl0_83:i47.TabbedPlaceNavigationComponent = (<any>(null as any));\nvar _decl0_84:i48.ListPlaceNavComponent = (<any>(null as any));\nvar _decl0_85:i49.SidePlaceNavigationComponent = (<any>(null as any));\nvar _decl0_86:i50.AbstractPlaceNavigationComponent = (<any>(null as any));\nvar _decl0_87:i2.AsyncPipe = (<any>(null as any));\nvar _decl0_88:i2.UpperCasePipe = (<any>(null as any));\nvar _decl0_89:i2.LowerCasePipe = (<any>(null as any));\nvar _decl0_90:i2.JsonPipe = (<any>(null as any));\nvar _decl0_91:i2.SlicePipe = (<any>(null as any));\nvar _decl0_92:i2.DecimalPipe = (<any>(null as any));\nvar _decl0_93:i2.PercentPipe = (<any>(null as any));\nvar _decl0_94:i2.TitleCasePipe = (<any>(null as any));\nvar _decl0_95:i2.CurrencyPipe = (<any>(null as any));\nvar _decl0_96:i2.DatePipe = (<any>(null as any));\nvar _decl0_97:i2.I18nPluralPipe = (<any>(null as any));\nvar _decl0_98:i2.I18nSelectPipe = (<any>(null as any));\nvar _decl0_99:i2.KeyValuePipe = (<any>(null as any));\nvar _decl0_100:i2.CommonModule = (<any>(null as any));\nvar _decl0_101:i51.BrowserAnimationsModule = (<any>(null as any));\nvar _decl0_102:i4.MatProgressSpinnerModule = (<any>(null as any));\nvar _decl0_103:i5.RouterModule = (<any>(null as any));\nvar _decl0_104:i6.MatTabsModule = (<any>(null as any));\nvar _decl0_105:i9.MatListModule = (<any>(null as any));\nvar _decl0_106:i11.MatTooltipModule = (<any>(null as any));\nvar _decl0_107:i12.MatIconModule = (<any>(null as any));\nvar _decl0_108:i52.DirectivesModule = (<any>(null as any));\nvar _decl0_109:i15.FlexModule = (<any>(null as any));\nvar _decl0_110:i53.ComponentsModule = (<any>(null as any));\nvar _decl0_111:i0.TemplateRef<any> = (<any>(null as any));\nvar _decl0_112:i0.ElementRef<any> = (<any>(null as any));\nfunction _View_EmptyStateComponent_Host_1_0():void {\n var _any:any = (null as any);\n}\nfunction _View_EmptyStateComponent_1_0():void {\n var _any:any = (null as any);\n}\nfunction _View_BusyOverlayComponent_Host_2_0():void {\n var _any:any = (null as any);\n}\nfunction _View_BusyOverlayComponent_2_1():void {\n if (_decl0_81.busyModel.value) {\n var _any:any = (null as any);\n const currVal_0:any = 52;\n currVal_0;\n const currVal_1:any = 'indeterminate';\n currVal_1;\n const currVal_2:any = _decl0_12._noopAnimations;\n currVal_2;\n const currVal_3:any = _decl0_12.diameter;\n currVal_3;\n const currVal_4:any = _decl0_12.diameter;\n currVal_4;\n const currVal_5:any = ((_decl0_12.mode === 'determinate')? 0: null);\n currVal_5;\n const currVal_6:any = ((_decl0_12.mode === 'determinate')? 100: null);\n currVal_6;\n const currVal_7:any = ((_decl0_12.mode === 'determinate')? _decl0_12.value: null);\n currVal_7;\n const currVal_8:any = _decl0_12.mode;\n currVal_8;\n }\n}\nfunction _View_BusyOverlayComponent_2_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_81.busyModel.value;\n currVal_0;\n}\nfunction _View_PlaceOutletComponent_Host_3_0():void {\n var _any:any = (null as any);\n}\nfunction _View_PlaceOutletComponent_3_1():void {\n if (_decl0_82.animationEnabled.value) {\n var _any:any = (null as any);\n const currVal_0:any = {value:_decl0_82.getAnimationOrder(),params:{duration:_decl0_82.animationDuration}};\n currVal_0;\n const pd_1:any = ((<any>_decl0_82.animationStarted()) !== false);\n const pd_2:any = ((<any>_decl0_82.animationDone()) !== false);\n const pd_3:any = ((<any>_decl0_82.onOutletActivated(_decl0_14,_any)) !== false);\n const pd_4:any = ((<any>_decl0_82.onOutletDeactivated()) !== false);\n }\n}\nfunction _View_PlaceOutletComponent_3_2():void {\n if (!_decl0_82.animationEnabled.value) {\n var _any:any = (null as any);\n const pd_0:any = ((<any>_decl0_82.onOutletActivated(_decl0_14,_any)) !== false);\n const pd_1:any = ((<any>_decl0_82.onOutletDeactivated()) !== false);\n }\n}\nfunction _View_PlaceOutletComponent_3_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_82.animationEnabled.value;\n currVal_0;\n const currVal_1:any = !_decl0_82.animationEnabled.value;\n currVal_1;\n}\nfunction _View_TabbedPlaceNavigationComponent_Host_4_0():void {\n var _any:any = (null as any);\n}\nfunction _View_TabbedPlaceNavigationComponent_4_2():void {\n if (_decl0_83.getNav(_any).icon()) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_83.getNav(_any).icon();\n currVal_0;\n }\n}\nfunction _View_TabbedPlaceNavigationComponent_4_1():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_83.isActive(_any);\n currVal_0;\n const currVal_1:any = (_decl0_23.active? 'page': null);\n currVal_1;\n const currVal_2:any = _decl0_23.disabled;\n currVal_2;\n const currVal_3:any = _decl0_23.tabIndex;\n currVal_3;\n const currVal_4:any = _decl0_23.disabled;\n currVal_4;\n const currVal_5:any = _decl0_23.active;\n currVal_5;\n const currVal_6:any = _decl0_83.getNav(_any).tooltip();\n currVal_6;\n const currVal_7:any = _decl0_83.commandFactory.create(_any);\n currVal_7;\n const currVal_8:any = _decl0_83.getNav(_any).icon();\n currVal_8;\n const currVal_9:any = _decl0_83.getNav(_any).title();\n currVal_9;\n const pd_10:any = ((<any>_decl0_40.notifyClick(_any)) !== false);\n}\nfunction _View_TabbedPlaceNavigationComponent_4_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_22._showPaginationControls;\n currVal_0;\n const currVal_1:any = (_decl0_22._getLayoutDirection() == 'rtl');\n currVal_1;\n const currVal_2:any = ((_decl0_22.color !== 'warn') && (_decl0_22.color !== 'accent'));\n currVal_2;\n const currVal_3:any = (_decl0_22.color === 'accent');\n currVal_3;\n const currVal_4:any = (_decl0_22.color === 'warn');\n currVal_4;\n const currVal_5:any = _decl0_83.placeDefinitions.value;\n currVal_5;\n}\nfunction _View_ListPlaceNavComponent_Host_5_0():void {\n var _any:any = (null as any);\n}\nfunction _View_ListPlaceNavComponent_5_2():void {\n if (_decl0_84.getNav(_any).icon()) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_84.getNav(_any).icon();\n currVal_0;\n }\n}\nfunction _View_ListPlaceNavComponent_5_1():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_30.disabled;\n currVal_0;\n const currVal_1:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_1;\n const currVal_2:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_2;\n const currVal_3:any = _decl0_84.getNav(_any).tooltip();\n currVal_3;\n const currVal_4:any = _decl0_84.commandFactory.create(_any);\n currVal_4;\n const currVal_5:any = _decl0_84.isActive(_any);\n currVal_5;\n const currVal_6:any = _decl0_84.getNav(_any).icon();\n currVal_6;\n const currVal_7:any = _decl0_84.getNav(_any).title();\n currVal_7;\n const pd_8:any = ((<any>_decl0_40.notifyClick(_any)) !== false);\n}\nfunction _View_ListPlaceNavComponent_5_0():void {\n var _any:any = (null as any);\n const currVal_0:any = '';\n currVal_0;\n const currVal_1:any = _decl0_84.placeDefinitions.value;\n currVal_1;\n}\nfunction _View_SidePlaceNavigationComponent_Host_6_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_85.expanded;\n currVal_0;\n}\nfunction _View_SidePlaceNavigationComponent_6_2():void {\n if (_decl0_85.getNav(_any).icon()) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_85.getNav(_any).icon();\n currVal_0;\n }\n}\nfunction _View_SidePlaceNavigationComponent_6_1():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_30.disabled;\n currVal_0;\n const currVal_1:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_1;\n const currVal_2:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_2;\n const currVal_3:any = _decl0_85.getNav(_any).tooltip();\n currVal_3;\n const currVal_4:any = _decl0_85.commandFactory.create(_any);\n currVal_4;\n const currVal_5:any = _decl0_85.isActive(_any);\n currVal_5;\n const currVal_6:any = _decl0_85.getNav(_any).icon();\n currVal_6;\n const currVal_7:any = _decl0_85.getNav(_any).title();\n currVal_7;\n const pd_8:any = ((<any>_decl0_40.notifyClick(_any)) !== false);\n}\nfunction _View_SidePlaceNavigationComponent_6_3():void {\n if (_decl0_85.navEndTemplate) {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_85.navEndTemplate;\n currVal_0;\n }\n}\nfunction _View_SidePlaceNavigationComponent_6_0():void {\n var _any:any = (null as any);\n const currVal_0:any = _decl0_30.disabled;\n currVal_0;\n const currVal_1:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_1;\n const currVal_2:any = (_decl0_30._avatar || _decl0_30._icon);\n currVal_2;\n const currVal_3:any = 'mat:menu';\n currVal_3;\n const currVal_4:any = 'mat:arrow_back';\n currVal_4;\n const currVal_5:any = _decl0_85.placeDefinitions.value;\n currVal_5;\n const currVal_6:any = 1;\n currVal_6;\n const currVal_7:any = _decl0_85.navEndTemplate;\n currVal_7;\n const pd_8:any = ((<any>_decl0_85.toggleMenu()) !== false);\n}\nfunction _View_AbstractPlaceNavigationComponent_Host_7_0():void {\n var _any:any = (null as any);\n}\nfunction _View_AbstractPlaceNavigationComponent_7_0():void {\n var _any:any = (null as any);\n}\n"]}
|
|
@@ -18,7 +18,7 @@ import { MatTableModule } from '@angular/material/table';
|
|
|
18
18
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
19
19
|
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
20
20
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, ListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, StoreInListModel, ValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
21
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, ListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, StoreInListModel, ValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Functions } from '@coolon/pectin';
|
|
22
22
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
23
23
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
24
24
|
import { Enum } from 'typescript-string-enums';
|
|
@@ -3048,7 +3048,7 @@ ActivityActionsComponent = __decorate([
|
|
|
3048
3048
|
Component({
|
|
3049
3049
|
selector: 'aup-activity-actions',
|
|
3050
3050
|
template: "<ng-container *ngIf=\"hasCancelCommand()\">\n <button class=\"cancel\" *ngIf=\"!hasCancelText()\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <aup-icon icon=\"mat:clear\"></aup-icon>\n </button>\n <button class=\"cancel\" *ngIf=\"hasCancelText()\" mat-button [pectinCommand]=\"cancelCommand\">{{cancelText}}</button>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmCommand()\">\n <button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <aup-icon icon=\"mat:done\"></aup-icon>\n </button>\n <button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n</ng-container>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
3051
|
-
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}:host.align-stretch>.cancel{-ms-grid-row:1;-ms-grid-column:1}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}:host.align-stretch>.confirm{-ms-grid-row:1;-ms-grid-column:3}.
|
|
3051
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}:host.align-stretch>.cancel{-ms-grid-row:1;-ms-grid-column:1}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}:host.align-stretch>.confirm{-ms-grid-row:1;-ms-grid-column:3}.column{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-row:1;-ms-grid-column:1}:host.align-stretch>.column{-ms-grid-row:1;-ms-grid-column:2}"]
|
|
3052
3052
|
})
|
|
3053
3053
|
], ActivityActionsComponent);
|
|
3054
3054
|
|
|
@@ -3347,10 +3347,6 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3347
3347
|
this.dynamicHeight = false;
|
|
3348
3348
|
this.activityRefs = [];
|
|
3349
3349
|
this.garbage = new GarbageCollector();
|
|
3350
|
-
// We have issues where angular is triggering a leave animation when an
|
|
3351
|
-
// new activity is started, but is not running the enter animation
|
|
3352
|
-
// when it is scrolled back into view. So we track the tab changes and
|
|
3353
|
-
// disable all animations inside the tab while we're animating.
|
|
3354
3350
|
this.inAnimation = new MutableValueModel(false);
|
|
3355
3351
|
}
|
|
3356
3352
|
ngOnInit() {
|
|
@@ -3493,6 +3489,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3493
3489
|
const newIndex = this.getActiveActivityCount() - 1;
|
|
3494
3490
|
if (previousIndex !== newIndex) {
|
|
3495
3491
|
this.inAnimation.value = true;
|
|
3492
|
+
this.activityRefs[newIndex].setFocused(false);
|
|
3496
3493
|
this.tabs.selectedIndex = newIndex;
|
|
3497
3494
|
this.onAnimationFinishedJob = () => {
|
|
3498
3495
|
this.activityRefs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
@@ -3536,7 +3533,7 @@ __decorate([
|
|
|
3536
3533
|
ActivityContainerComponent = __decorate([
|
|
3537
3534
|
Component({
|
|
3538
3535
|
selector: 'aup-activity-container',
|
|
3539
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let
|
|
3536
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </mat-tab>\n</mat-tab-group>\n",
|
|
3540
3537
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3541
3538
|
}),
|
|
3542
3539
|
__metadata("design:paramtypes", [])
|
|
@@ -4513,6 +4510,9 @@ let PlaceComponent = PlaceComponent_1 = class PlaceComponent extends DisposableC
|
|
|
4513
4510
|
super();
|
|
4514
4511
|
this.visitModel = new MutableValueModel();
|
|
4515
4512
|
this._inVisitUpdate = new Guard();
|
|
4513
|
+
this._active = new MutableValueModel(false);
|
|
4514
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
4515
|
+
when(this._active).becomesTruthy(() => this.onPlaceReady());
|
|
4516
4516
|
}
|
|
4517
4517
|
// @Trace()
|
|
4518
4518
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
@@ -4558,6 +4558,15 @@ let PlaceComponent = PlaceComponent_1 = class PlaceComponent extends DisposableC
|
|
|
4558
4558
|
get childPlaces() {
|
|
4559
4559
|
return this.placeDefinition.children.map(d => d.component);
|
|
4560
4560
|
}
|
|
4561
|
+
get active() {
|
|
4562
|
+
return this._active.readonly;
|
|
4563
|
+
}
|
|
4564
|
+
/**
|
|
4565
|
+
* Called by the router when the place is ready to interact after any animations have run.
|
|
4566
|
+
*/
|
|
4567
|
+
_notifyActive(active) {
|
|
4568
|
+
this._active.value = active;
|
|
4569
|
+
}
|
|
4561
4570
|
onPlaceReady() {
|
|
4562
4571
|
}
|
|
4563
4572
|
};
|
|
@@ -5950,6 +5959,7 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5950
5959
|
this._activePlaceModel = new MutableValueModel();
|
|
5951
5960
|
this.initialPlaceIndex = null;
|
|
5952
5961
|
this._isPushingVisitToRoute = new MutableValueModel(false);
|
|
5962
|
+
this.isVeryFirstLoad = true;
|
|
5953
5963
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
5954
5964
|
this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
5955
5965
|
const defaultPlaceAnimationOrder = chain(this.parentOutletModel)
|
|
@@ -5958,8 +5968,9 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5958
5968
|
.pluckList('children')
|
|
5959
5969
|
.pluck('component');
|
|
5960
5970
|
const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor);
|
|
5961
|
-
this.
|
|
5962
|
-
.otherwise(defaultPlaceAnimationOrder)
|
|
5971
|
+
this.placesInAnimationOrder = chain(this.customPlaceAnimationOrderModel)
|
|
5972
|
+
.otherwise(defaultPlaceAnimationOrder);
|
|
5973
|
+
this.activePlaceAnimationPosition = this.placesInAnimationOrder
|
|
5963
5974
|
.reduce((placesInOrder) => {
|
|
5964
5975
|
let placeIndex = 0;
|
|
5965
5976
|
if (activatePlaceType.value) {
|
|
@@ -5970,14 +5981,16 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5970
5981
|
}
|
|
5971
5982
|
return isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;
|
|
5972
5983
|
}, { dependsOn: activatePlaceType });
|
|
5984
|
+
this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
5985
|
+
this.animationEnabled = valueOf.all(this.animateModel, this.animationSupported).areTruthy();
|
|
5973
5986
|
// Extract our visit model from the place router.
|
|
5974
5987
|
this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');
|
|
5975
5988
|
this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
|
|
5976
5989
|
this.navigationInProgress = chain(this.placeRouter.navigationInProgress);
|
|
5977
|
-
when
|
|
5990
|
+
when(this.navigationInProgress).becomesFalsey(() => {
|
|
5978
5991
|
this.checkStateAndInitialise();
|
|
5979
5992
|
});
|
|
5980
|
-
when
|
|
5993
|
+
when(this.outletActivated).becomesTruthy(() => {
|
|
5981
5994
|
this.checkStateAndInitialise();
|
|
5982
5995
|
});
|
|
5983
5996
|
chain(this._activePlaceModel)
|
|
@@ -5989,14 +6002,17 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5989
6002
|
}
|
|
5990
6003
|
// @Trace()
|
|
5991
6004
|
getAnimationOrder() {
|
|
5992
|
-
return this.
|
|
6005
|
+
return this.activePlaceAnimationPosition.value;
|
|
5993
6006
|
}
|
|
5994
6007
|
get animationDuration() {
|
|
5995
6008
|
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
5996
6009
|
}
|
|
5997
6010
|
// @Trace()
|
|
5998
6011
|
navigate(visit) {
|
|
5999
|
-
//
|
|
6012
|
+
// const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
|
|
6013
|
+
// if (!place) {
|
|
6014
|
+
// lang.illegalState()
|
|
6015
|
+
// }
|
|
6000
6016
|
this.placeRouter.navigate(visit, {
|
|
6001
6017
|
relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
|
|
6002
6018
|
});
|
|
@@ -6010,14 +6026,25 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6010
6026
|
get activatedRouteModel() {
|
|
6011
6027
|
return this._activatedRouteModel.readonly;
|
|
6012
6028
|
}
|
|
6013
|
-
// @Trace()
|
|
6014
6029
|
onOutletActivated(routerOutlet, place) {
|
|
6015
6030
|
this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
6016
6031
|
this._activePlaceModel.value = place;
|
|
6032
|
+
this.validateAnimationState(place);
|
|
6017
6033
|
this.outletActivated.value = true;
|
|
6018
6034
|
this.checkStateAndInitialise();
|
|
6019
6035
|
}
|
|
6020
|
-
|
|
6036
|
+
validateAnimationState(place) {
|
|
6037
|
+
if (this.animateModel.value) {
|
|
6038
|
+
if (this.placesInAnimationOrder.length < 1) {
|
|
6039
|
+
console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');
|
|
6040
|
+
}
|
|
6041
|
+
else {
|
|
6042
|
+
if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {
|
|
6043
|
+
console.error(`PlaceOutlet.animate === true but placeAnimationOrder doesn't contain ${place.placeDefinition.component.name}.`);
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6021
6048
|
onOutletDeactivated() {
|
|
6022
6049
|
this.outletActivated.value = false;
|
|
6023
6050
|
this._activePlaceModel.value = null;
|
|
@@ -6034,16 +6061,24 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6034
6061
|
this.initialisePlace(routerVisit, activePlace);
|
|
6035
6062
|
}
|
|
6036
6063
|
}
|
|
6037
|
-
// @Trace()
|
|
6038
6064
|
initialisePlace(routerVisit, activePlace) {
|
|
6039
6065
|
const visitModel = new MutableValueModel(routerVisit);
|
|
6040
6066
|
DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);
|
|
6041
6067
|
activePlace.initialiseVisit(routerVisit, (current, previous) => {
|
|
6042
6068
|
this.pushVisitChangeToRoute(previous, current);
|
|
6043
6069
|
});
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6070
|
+
const finishPlaceLoad = () => {
|
|
6071
|
+
this._activePlaceModel.value._notifyActive(true);
|
|
6072
|
+
};
|
|
6073
|
+
if (!this.animationEnabled.value || this.isVeryFirstLoad) {
|
|
6074
|
+
// if animation is disabled or this is the very first load then
|
|
6075
|
+
// we won't get our animation done callback so we finish the
|
|
6076
|
+
// process here and now.
|
|
6077
|
+
this.isVeryFirstLoad = false;
|
|
6078
|
+
finishPlaceLoad();
|
|
6079
|
+
}
|
|
6080
|
+
else {
|
|
6081
|
+
this.onAnimationFinishedJob = finishPlaceLoad;
|
|
6047
6082
|
}
|
|
6048
6083
|
const { when, chain, valueOf } = Dsl.disposeWith(activePlace);
|
|
6049
6084
|
when.valueOf(this.routerVisitModel)
|
|
@@ -6065,8 +6100,9 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6065
6100
|
}
|
|
6066
6101
|
// @Trace()
|
|
6067
6102
|
animationDone() {
|
|
6068
|
-
if (this.
|
|
6069
|
-
this.
|
|
6103
|
+
if (this.onAnimationFinishedJob) {
|
|
6104
|
+
this.onAnimationFinishedJob();
|
|
6105
|
+
this.onAnimationFinishedJob = undefined;
|
|
6070
6106
|
}
|
|
6071
6107
|
}
|
|
6072
6108
|
};
|
|
@@ -6100,10 +6136,22 @@ __decorate([
|
|
|
6100
6136
|
ViewChild('routeOutlet', { static: true }),
|
|
6101
6137
|
__metadata("design:type", RouterOutlet)
|
|
6102
6138
|
], PlaceOutletComponent.prototype, "routerOut", void 0);
|
|
6139
|
+
__decorate([
|
|
6140
|
+
Trace(),
|
|
6141
|
+
__metadata("design:type", Function),
|
|
6142
|
+
__metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
|
|
6143
|
+
__metadata("design:returntype", void 0)
|
|
6144
|
+
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
6145
|
+
__decorate([
|
|
6146
|
+
Trace(),
|
|
6147
|
+
__metadata("design:type", Function),
|
|
6148
|
+
__metadata("design:paramtypes", []),
|
|
6149
|
+
__metadata("design:returntype", void 0)
|
|
6150
|
+
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
6103
6151
|
PlaceOutletComponent = __decorate([
|
|
6104
6152
|
Component({
|
|
6105
6153
|
selector: 'aup-place-outlet',
|
|
6106
|
-
template: "<ng-container *ngIf=\"
|
|
6154
|
+
template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
|
|
6107
6155
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
6108
6156
|
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:scroll}router-outlet{display:none}"]
|
|
6109
6157
|
}),
|