@coolon/angular-ui-powerups 2.0.0-alpha.32 → 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 +14 -0
- package/assets/interaction.scss +5 -0
- package/assets/tabs.scss +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +127 -36
- 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/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/activity-ref.js +10 -2
- package/esm2015/lib/interaction/activity-ref.js.map +1 -1
- package/esm2015/lib/interaction/activity-ref.metadata.json +1 -1
- package/esm2015/lib/interaction/activity.js +18 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.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 +16 -17
- 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/components/activity-container/activity-outlet/activity-outlet.component.js +0 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.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/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/interaction/activity-ref.js +14 -2
- package/esm5/lib/interaction/activity-ref.js.map +1 -1
- package/esm5/lib/interaction/activity.js +27 -1
- package/esm5/lib/interaction/activity.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 +16 -17
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +0 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.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 +111 -37
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +128 -37
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/activity-ref.d.ts +3 -0
- package/lib/interaction/activity.d.ts +6 -2
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +0 -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
|
@@ -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';
|
|
@@ -372,7 +372,7 @@ CardContainerComponent = __decorate([
|
|
|
372
372
|
Component({
|
|
373
373
|
selector: 'aup-card-container',
|
|
374
374
|
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-icon icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
|
|
375
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
375
|
+
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.activity-outlet-wrapper{display:flex;flex-direction:column;align-items:stretch}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
376
376
|
}),
|
|
377
377
|
__metadata("design:paramtypes", [])
|
|
378
378
|
], CardContainerComponent);
|
|
@@ -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
|
|
|
@@ -3057,12 +3057,21 @@ class Activity extends DisposableComponent {
|
|
|
3057
3057
|
constructor() {
|
|
3058
3058
|
super(...arguments);
|
|
3059
3059
|
this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
3060
|
+
this._focusedModel = this.registerDisposable(new DelegatingValueModel());
|
|
3060
3061
|
this.class = 'aup-activity';
|
|
3061
3062
|
}
|
|
3063
|
+
get isFocused() {
|
|
3064
|
+
return this._focusedModel.value;
|
|
3065
|
+
}
|
|
3062
3066
|
initialise(nestedInteractionContext, activityContext) {
|
|
3067
|
+
const { chain, when } = Dsl.disposeWith(this);
|
|
3063
3068
|
assert$1.isNil(this._activityContext);
|
|
3064
3069
|
this._activityContext = activityContext;
|
|
3065
3070
|
this._interactionContext = nestedInteractionContext;
|
|
3071
|
+
this._focusedModel.setDelegate(activityContext.focused);
|
|
3072
|
+
when(this._focusedModel).becomesTruthy(() => {
|
|
3073
|
+
this.onActivityReady();
|
|
3074
|
+
});
|
|
3066
3075
|
}
|
|
3067
3076
|
get interactionContext() {
|
|
3068
3077
|
assert$1.isTruthy(this.isInitialised());
|
|
@@ -3080,6 +3089,9 @@ class Activity extends DisposableComponent {
|
|
|
3080
3089
|
get busy() {
|
|
3081
3090
|
return this._busyModel.readonly;
|
|
3082
3091
|
}
|
|
3092
|
+
get focused() {
|
|
3093
|
+
return this._focusedModel.readonly;
|
|
3094
|
+
}
|
|
3083
3095
|
busyWhile(busyModel) {
|
|
3084
3096
|
this._busyModel.setDelegate(busyModel);
|
|
3085
3097
|
}
|
|
@@ -3094,6 +3106,11 @@ __decorate([
|
|
|
3094
3106
|
HostBinding('class'),
|
|
3095
3107
|
__metadata("design:type", Object)
|
|
3096
3108
|
], Activity.prototype, "class", void 0);
|
|
3109
|
+
__decorate([
|
|
3110
|
+
HostBinding('attr.focused'),
|
|
3111
|
+
__metadata("design:type", Object),
|
|
3112
|
+
__metadata("design:paramtypes", [])
|
|
3113
|
+
], Activity.prototype, "isFocused", null);
|
|
3097
3114
|
|
|
3098
3115
|
let AlertDialogComponent = class AlertDialogComponent extends Activity {
|
|
3099
3116
|
constructor(alert) {
|
|
@@ -3213,6 +3230,7 @@ class ActivityRef {
|
|
|
3213
3230
|
this.onComplete = onComplete;
|
|
3214
3231
|
this._complete = false;
|
|
3215
3232
|
this.deferredResult = Deferred.defer();
|
|
3233
|
+
this.focusedModel = new MutableValueModel();
|
|
3216
3234
|
}
|
|
3217
3235
|
isActivityRealised() {
|
|
3218
3236
|
return !!this._activity;
|
|
@@ -3224,6 +3242,12 @@ class ActivityRef {
|
|
|
3224
3242
|
assert.isTruthy(this.isActivityRealised());
|
|
3225
3243
|
return this._activity;
|
|
3226
3244
|
}
|
|
3245
|
+
setFocused(focused) {
|
|
3246
|
+
this.focusedModel.value = focused;
|
|
3247
|
+
}
|
|
3248
|
+
get focused() {
|
|
3249
|
+
return this.focusedModel.value;
|
|
3250
|
+
}
|
|
3227
3251
|
notifyActivityCreated(activity, nestedInteractionContext) {
|
|
3228
3252
|
assert.isNil(this._activity);
|
|
3229
3253
|
this._activity = activity;
|
|
@@ -3234,7 +3258,8 @@ class ActivityRef {
|
|
|
3234
3258
|
},
|
|
3235
3259
|
onCancel(error) {
|
|
3236
3260
|
self.finishActivity(deferred => deferred.reject(error));
|
|
3237
|
-
}
|
|
3261
|
+
},
|
|
3262
|
+
focused: this.focusedModel.readonly
|
|
3238
3263
|
});
|
|
3239
3264
|
}
|
|
3240
3265
|
finishActivity(resolveOrReject) {
|
|
@@ -3260,7 +3285,6 @@ let ActivityOutletComponent = class ActivityOutletComponent {
|
|
|
3260
3285
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
3261
3286
|
this.viewContainerRef = viewContainerRef;
|
|
3262
3287
|
this.injector = injector;
|
|
3263
|
-
this._disableAnimation = false;
|
|
3264
3288
|
}
|
|
3265
3289
|
set activityRef(activityRef) {
|
|
3266
3290
|
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
@@ -3321,13 +3345,9 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3321
3345
|
constructor() {
|
|
3322
3346
|
super();
|
|
3323
3347
|
this.dynamicHeight = false;
|
|
3324
|
-
this.
|
|
3348
|
+
this.activityRefs = [];
|
|
3325
3349
|
this.garbage = new GarbageCollector();
|
|
3326
|
-
|
|
3327
|
-
// new activity is started, but is not running the enter animation
|
|
3328
|
-
// when it is scrolled back into view. So we track the tab changes and
|
|
3329
|
-
// disable all animations inside the tab while we're animating.
|
|
3330
|
-
this.inTabChange = new MutableValueModel(false);
|
|
3350
|
+
this.inAnimation = new MutableValueModel(false);
|
|
3331
3351
|
}
|
|
3332
3352
|
ngOnInit() {
|
|
3333
3353
|
}
|
|
@@ -3370,7 +3390,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3370
3390
|
if (!this.isActive()) {
|
|
3371
3391
|
lang$1.illegalState('no activity in progress');
|
|
3372
3392
|
}
|
|
3373
|
-
return ___default.findLast(this.
|
|
3393
|
+
return ___default.findLast(this.activityRefs, tab => !tab.isComplete());
|
|
3374
3394
|
}
|
|
3375
3395
|
/**
|
|
3376
3396
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3404,14 +3424,14 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3404
3424
|
});
|
|
3405
3425
|
this.launchActivity(activityRef);
|
|
3406
3426
|
// if this is the first activity let the interaction service know.
|
|
3407
|
-
if (this.
|
|
3427
|
+
if (this.activityRefs.length === 1) {
|
|
3408
3428
|
// console.log('Now active!!!');
|
|
3409
3429
|
this.interactionServiceApi.notifyActive(this);
|
|
3410
3430
|
}
|
|
3411
3431
|
return activityRef.activityResult;
|
|
3412
3432
|
}
|
|
3413
3433
|
getActiveActivityCount() {
|
|
3414
|
-
return this.
|
|
3434
|
+
return this.activityRefs.filter(ref => !ref.isComplete()).length;
|
|
3415
3435
|
}
|
|
3416
3436
|
/**
|
|
3417
3437
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3435,7 +3455,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3435
3455
|
// Without this our animation done wasn't called when a single
|
|
3436
3456
|
// new activity followed a single tab activity (since we're tracking
|
|
3437
3457
|
// by activity index)
|
|
3438
|
-
this.
|
|
3458
|
+
this.activityRefs = [];
|
|
3439
3459
|
const promise = this.interactionServiceApi.notifyFinished(this);
|
|
3440
3460
|
this._deferredCleanUp = promise
|
|
3441
3461
|
.finally(() => {
|
|
@@ -3445,8 +3465,8 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3445
3465
|
}
|
|
3446
3466
|
// @Trace()
|
|
3447
3467
|
launchActivity(activityRef) {
|
|
3448
|
-
const cleanedTabs = this.
|
|
3449
|
-
this.
|
|
3468
|
+
const cleanedTabs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
3469
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3450
3470
|
this.synchroniseSelectedTabIndex();
|
|
3451
3471
|
}
|
|
3452
3472
|
activityIndex(index, activityRef) {
|
|
@@ -3459,7 +3479,6 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3459
3479
|
this.onAnimationFinishedJob();
|
|
3460
3480
|
this.onAnimationFinishedJob = undefined;
|
|
3461
3481
|
}
|
|
3462
|
-
this.inTabChange.value = false;
|
|
3463
3482
|
}
|
|
3464
3483
|
/**
|
|
3465
3484
|
* Synchronises the selected tab index.
|
|
@@ -3469,11 +3488,15 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3469
3488
|
const previousIndex = this.tabs.selectedIndex;
|
|
3470
3489
|
const newIndex = this.getActiveActivityCount() - 1;
|
|
3471
3490
|
if (previousIndex !== newIndex) {
|
|
3472
|
-
this.
|
|
3491
|
+
this.inAnimation.value = true;
|
|
3492
|
+
this.activityRefs[newIndex].setFocused(false);
|
|
3473
3493
|
this.tabs.selectedIndex = newIndex;
|
|
3474
3494
|
this.onAnimationFinishedJob = () => {
|
|
3475
|
-
this.
|
|
3476
|
-
this.
|
|
3495
|
+
this.activityRefs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
3496
|
+
this.inAnimation.value = false;
|
|
3497
|
+
this.activityRefs.forEach((ref, index) => {
|
|
3498
|
+
ref.setFocused(index === newIndex);
|
|
3499
|
+
});
|
|
3477
3500
|
};
|
|
3478
3501
|
}
|
|
3479
3502
|
}
|
|
@@ -3510,7 +3533,7 @@ __decorate([
|
|
|
3510
3533
|
ActivityContainerComponent = __decorate([
|
|
3511
3534
|
Component({
|
|
3512
3535
|
selector: 'aup-activity-container',
|
|
3513
|
-
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",
|
|
3514
3537
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3515
3538
|
}),
|
|
3516
3539
|
__metadata("design:paramtypes", [])
|
|
@@ -4487,6 +4510,9 @@ let PlaceComponent = PlaceComponent_1 = class PlaceComponent extends DisposableC
|
|
|
4487
4510
|
super();
|
|
4488
4511
|
this.visitModel = new MutableValueModel();
|
|
4489
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());
|
|
4490
4516
|
}
|
|
4491
4517
|
// @Trace()
|
|
4492
4518
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
@@ -4532,6 +4558,15 @@ let PlaceComponent = PlaceComponent_1 = class PlaceComponent extends DisposableC
|
|
|
4532
4558
|
get childPlaces() {
|
|
4533
4559
|
return this.placeDefinition.children.map(d => d.component);
|
|
4534
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
|
+
}
|
|
4535
4570
|
onPlaceReady() {
|
|
4536
4571
|
}
|
|
4537
4572
|
};
|
|
@@ -5924,6 +5959,7 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5924
5959
|
this._activePlaceModel = new MutableValueModel();
|
|
5925
5960
|
this.initialPlaceIndex = null;
|
|
5926
5961
|
this._isPushingVisitToRoute = new MutableValueModel(false);
|
|
5962
|
+
this.isVeryFirstLoad = true;
|
|
5927
5963
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
5928
5964
|
this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
5929
5965
|
const defaultPlaceAnimationOrder = chain(this.parentOutletModel)
|
|
@@ -5932,8 +5968,9 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5932
5968
|
.pluckList('children')
|
|
5933
5969
|
.pluck('component');
|
|
5934
5970
|
const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor);
|
|
5935
|
-
this.
|
|
5936
|
-
.otherwise(defaultPlaceAnimationOrder)
|
|
5971
|
+
this.placesInAnimationOrder = chain(this.customPlaceAnimationOrderModel)
|
|
5972
|
+
.otherwise(defaultPlaceAnimationOrder);
|
|
5973
|
+
this.activePlaceAnimationPosition = this.placesInAnimationOrder
|
|
5937
5974
|
.reduce((placesInOrder) => {
|
|
5938
5975
|
let placeIndex = 0;
|
|
5939
5976
|
if (activatePlaceType.value) {
|
|
@@ -5944,14 +5981,16 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5944
5981
|
}
|
|
5945
5982
|
return isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;
|
|
5946
5983
|
}, { dependsOn: activatePlaceType });
|
|
5984
|
+
this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
5985
|
+
this.animationEnabled = valueOf.all(this.animateModel, this.animationSupported).areTruthy();
|
|
5947
5986
|
// Extract our visit model from the place router.
|
|
5948
5987
|
this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');
|
|
5949
5988
|
this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
|
|
5950
5989
|
this.navigationInProgress = chain(this.placeRouter.navigationInProgress);
|
|
5951
|
-
when
|
|
5990
|
+
when(this.navigationInProgress).becomesFalsey(() => {
|
|
5952
5991
|
this.checkStateAndInitialise();
|
|
5953
5992
|
});
|
|
5954
|
-
when
|
|
5993
|
+
when(this.outletActivated).becomesTruthy(() => {
|
|
5955
5994
|
this.checkStateAndInitialise();
|
|
5956
5995
|
});
|
|
5957
5996
|
chain(this._activePlaceModel)
|
|
@@ -5963,14 +6002,17 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5963
6002
|
}
|
|
5964
6003
|
// @Trace()
|
|
5965
6004
|
getAnimationOrder() {
|
|
5966
|
-
return this.
|
|
6005
|
+
return this.activePlaceAnimationPosition.value;
|
|
5967
6006
|
}
|
|
5968
6007
|
get animationDuration() {
|
|
5969
6008
|
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
5970
6009
|
}
|
|
5971
6010
|
// @Trace()
|
|
5972
6011
|
navigate(visit) {
|
|
5973
|
-
//
|
|
6012
|
+
// const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
|
|
6013
|
+
// if (!place) {
|
|
6014
|
+
// lang.illegalState()
|
|
6015
|
+
// }
|
|
5974
6016
|
this.placeRouter.navigate(visit, {
|
|
5975
6017
|
relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
|
|
5976
6018
|
});
|
|
@@ -5984,14 +6026,25 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
5984
6026
|
get activatedRouteModel() {
|
|
5985
6027
|
return this._activatedRouteModel.readonly;
|
|
5986
6028
|
}
|
|
5987
|
-
// @Trace()
|
|
5988
6029
|
onOutletActivated(routerOutlet, place) {
|
|
5989
6030
|
this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
5990
6031
|
this._activePlaceModel.value = place;
|
|
6032
|
+
this.validateAnimationState(place);
|
|
5991
6033
|
this.outletActivated.value = true;
|
|
5992
6034
|
this.checkStateAndInitialise();
|
|
5993
6035
|
}
|
|
5994
|
-
|
|
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
|
+
}
|
|
5995
6048
|
onOutletDeactivated() {
|
|
5996
6049
|
this.outletActivated.value = false;
|
|
5997
6050
|
this._activePlaceModel.value = null;
|
|
@@ -6008,16 +6061,24 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6008
6061
|
this.initialisePlace(routerVisit, activePlace);
|
|
6009
6062
|
}
|
|
6010
6063
|
}
|
|
6011
|
-
// @Trace()
|
|
6012
6064
|
initialisePlace(routerVisit, activePlace) {
|
|
6013
6065
|
const visitModel = new MutableValueModel(routerVisit);
|
|
6014
6066
|
DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);
|
|
6015
6067
|
activePlace.initialiseVisit(routerVisit, (current, previous) => {
|
|
6016
6068
|
this.pushVisitChangeToRoute(previous, current);
|
|
6017
6069
|
});
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
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;
|
|
6021
6082
|
}
|
|
6022
6083
|
const { when, chain, valueOf } = Dsl.disposeWith(activePlace);
|
|
6023
6084
|
when.valueOf(this.routerVisitModel)
|
|
@@ -6039,8 +6100,9 @@ let PlaceOutletComponent = class PlaceOutletComponent extends DisposableComponen
|
|
|
6039
6100
|
}
|
|
6040
6101
|
// @Trace()
|
|
6041
6102
|
animationDone() {
|
|
6042
|
-
if (this.
|
|
6043
|
-
this.
|
|
6103
|
+
if (this.onAnimationFinishedJob) {
|
|
6104
|
+
this.onAnimationFinishedJob();
|
|
6105
|
+
this.onAnimationFinishedJob = undefined;
|
|
6044
6106
|
}
|
|
6045
6107
|
}
|
|
6046
6108
|
};
|
|
@@ -6074,10 +6136,22 @@ __decorate([
|
|
|
6074
6136
|
ViewChild('routeOutlet', { static: true }),
|
|
6075
6137
|
__metadata("design:type", RouterOutlet)
|
|
6076
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);
|
|
6077
6151
|
PlaceOutletComponent = __decorate([
|
|
6078
6152
|
Component({
|
|
6079
6153
|
selector: 'aup-place-outlet',
|
|
6080
|
-
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",
|
|
6081
6155
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
6082
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}"]
|
|
6083
6157
|
}),
|