@coolon/angular-ui-powerups 16.1.0-aplpha.142 → 16.1.0-aplpha.144
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/esm2022/lib/interaction/activity-context.mjs +3 -0
- package/esm2022/lib/interaction/activity.mjs +20 -17
- package/esm2022/lib/interaction/components/abstract-confirm-dialog.component.mjs +4 -5
- package/esm2022/lib/interaction/components/abstract-dialog.component.mjs +1 -41
- package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +19 -13
- package/esm2022/lib/interaction/components/activity-container/activity-container.component.mjs +11 -3
- package/esm2022/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.mjs +48 -15
- package/esm2022/lib/interaction/components/alert-dialog/alert-dialog.component.mjs +10 -10
- package/esm2022/lib/interaction/components/alert-renderer/alert-renderer.component.mjs +55 -0
- package/esm2022/lib/interaction/components/confirm-renderer/confirm-renderer.component.mjs +54 -0
- package/esm2022/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.mjs +4 -8
- package/esm2022/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.mjs +4 -8
- package/esm2022/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.mjs +7 -9
- package/esm2022/lib/interaction/confirm.mjs +26 -2
- package/esm2022/lib/interaction/exports.mjs +4 -1
- package/esm2022/lib/interaction/interaction-context-provider.mjs +4 -1
- package/esm2022/lib/interaction/interaction-context.mjs +1 -1
- package/esm2022/lib/interaction/interaction.module.mjs +18 -8
- package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.mjs +7 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +351 -218
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/interaction/activity-context.d.ts +8 -0
- package/lib/interaction/activity.d.ts +9 -6
- package/lib/interaction/components/abstract-confirm-dialog.component.d.ts +1 -1
- package/lib/interaction/components/abstract-dialog.component.d.ts +5 -14
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +4 -6
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +1 -0
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -3
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +6 -1
- package/lib/interaction/components/alert-renderer/alert-renderer.component.d.ts +17 -0
- package/lib/interaction/components/confirm-renderer/confirm-renderer.component.d.ts +15 -0
- package/lib/interaction/confirm.d.ts +4 -0
- package/lib/interaction/exports.d.ts +3 -0
- package/lib/interaction/interaction-context-provider.d.ts +6 -0
- package/lib/interaction/interaction-context.d.ts +3 -0
- package/lib/interaction/interaction.module.d.ts +16 -14
- package/package.json +2 -2
|
@@ -6694,146 +6694,16 @@ class AbstractCellRenderer extends LoadableComponent {
|
|
|
6694
6694
|
*/
|
|
6695
6695
|
|
|
6696
6696
|
/**
|
|
6697
|
-
* @
|
|
6698
|
-
* <aup-activity-actions [confirmFace]="saveFace" [cancelFace]="cancelFace">
|
|
6699
|
-
* </aup-activity-actions>
|
|
6700
|
-
*
|
|
6701
|
-
* <aup-activity-actions [faces]="{confirm: saveFace, cancel: cancelFace}">
|
|
6702
|
-
* </aup-activity-actions>
|
|
6703
|
-
*
|
|
6704
|
-
* // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default
|
|
6705
|
-
* // style definitions
|
|
6706
|
-
* <aup-activity-actions [faces]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
6707
|
-
* </aup-activity-actions>
|
|
6708
|
-
*
|
|
6709
|
-
* // you can also add additional content that will be displayed along with the buttons.
|
|
6710
|
-
* // The location of the content depends on the alignment attribute.
|
|
6711
|
-
* <aup-activity-actions
|
|
6712
|
-
* align="stretch"
|
|
6713
|
-
* [faces]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
6714
|
-
* <span>This content will be between the two commands</span>
|
|
6715
|
-
* </aup-activity-actions>
|
|
6697
|
+
* @deprecated, inject ActivityContext instead
|
|
6716
6698
|
*/
|
|
6717
|
-
class ActivityActionsComponent extends DisposableComponent {
|
|
6718
|
-
confirmCommandComponent;
|
|
6719
|
-
cancelCommandComponent;
|
|
6720
|
-
#confirmCommand_accessor_storage = proxify((Command));
|
|
6721
|
-
/**
|
|
6722
|
-
* @deprecated activity actions now use the confirm command of the activity automatically
|
|
6723
|
-
*/
|
|
6724
|
-
get confirmCommand() { return this.#confirmCommand_accessor_storage; }
|
|
6725
|
-
set confirmCommand(value) { this.#confirmCommand_accessor_storage = value; }
|
|
6726
|
-
#cancelCommand_accessor_storage = proxify((Command));
|
|
6727
|
-
/**
|
|
6728
|
-
* @deprecated activity actions now use the cancel command of the activity automatically
|
|
6729
|
-
*/
|
|
6730
|
-
get cancelCommand() { return this.#cancelCommand_accessor_storage; }
|
|
6731
|
-
set cancelCommand(value) { this.#cancelCommand_accessor_storage = value; }
|
|
6732
|
-
set faces(faces) {
|
|
6733
|
-
this.confirmFace = faces.confirm;
|
|
6734
|
-
this.cancelFace = faces.cancel;
|
|
6735
|
-
}
|
|
6736
|
-
confirmFace;
|
|
6737
|
-
cancelFace;
|
|
6738
|
-
/**
|
|
6739
|
-
* @deprecated use #faces instead.
|
|
6740
|
-
*/
|
|
6741
|
-
set style(style) {
|
|
6742
|
-
this.faces = style;
|
|
6743
|
-
}
|
|
6744
|
-
layout = ActivityActionsComponent.Layout.BLOCK;
|
|
6745
|
-
align = ActivityActionsComponent.Align.STRETCH;
|
|
6746
|
-
alignContent = ActivityActionsComponent.AlignContent.CENTER;
|
|
6747
|
-
constructor() {
|
|
6748
|
-
super();
|
|
6749
|
-
}
|
|
6750
|
-
hasConfirmFace() {
|
|
6751
|
-
return !!this.confirmFace;
|
|
6752
|
-
}
|
|
6753
|
-
hasCancelFace() {
|
|
6754
|
-
return !!this.cancelFace;
|
|
6755
|
-
}
|
|
6756
|
-
initCommands(activity) {
|
|
6757
|
-
this.confirmCommand = activity.confirmCommand;
|
|
6758
|
-
this.cancelCommand = activity.cancelCommand;
|
|
6759
|
-
this.cdr.detectChanges();
|
|
6760
|
-
}
|
|
6761
|
-
focusConfirm() {
|
|
6762
|
-
this.confirmCommandComponent.requestFocus();
|
|
6763
|
-
}
|
|
6764
|
-
focusCancel() {
|
|
6765
|
-
this.cancelCommandComponent.requestFocus();
|
|
6766
|
-
}
|
|
6767
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6768
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: { confirmCommand: "confirmCommand", cancelCommand: "cancelCommand", faces: "faces", confirmFace: "confirmFace", cancelFace: "cancelFace", style: "style", layout: "layout", align: "align", alignContent: "alignContent" }, host: { properties: { "attr.layout": "this.layout", "attr.align": "this.align", "attr.align-content": "this.alignContent" } }, viewQueries: [{ propertyName: "confirmCommandComponent", first: true, predicate: ["confirmCommandComponent"], descendants: true }, { propertyName: "cancelCommandComponent", first: true, predicate: ["cancelCommandComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command #cancelCommandComponent class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command #confirmCommandComponent class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px);grid-gap:var(--resolved-activity-actions-gap)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}:host .cancel{grid-area:cancel}:host .confirm{grid-area:confirm}:host .content{display:flex;flex-direction:row;align-items:center}:host[align-content=start] .content{justify-items:start}:host[align-content=end]{justify-items:end}:host[align-content=center]{justify-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }] });
|
|
6769
|
-
}
|
|
6770
|
-
__decorate([
|
|
6771
|
-
Proxify(),
|
|
6772
|
-
__metadata("design:type", Object)
|
|
6773
|
-
], ActivityActionsComponent.prototype, "confirmCommand", null);
|
|
6774
|
-
__decorate([
|
|
6775
|
-
Proxify(),
|
|
6776
|
-
__metadata("design:type", Object)
|
|
6777
|
-
], ActivityActionsComponent.prototype, "cancelCommand", null);
|
|
6778
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityActionsComponent, decorators: [{
|
|
6779
|
-
type: Component,
|
|
6780
|
-
args: [{ selector: 'aup-activity-actions', template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command #cancelCommandComponent class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command #confirmCommandComponent class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px);grid-gap:var(--resolved-activity-actions-gap)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}:host .cancel{grid-area:cancel}:host .confirm{grid-area:confirm}:host .content{display:flex;flex-direction:row;align-items:center}:host[align-content=start] .content{justify-items:start}:host[align-content=end]{justify-items:end}:host[align-content=center]{justify-items:center}\n"] }]
|
|
6781
|
-
}], ctorParameters: function () { return []; }, propDecorators: { confirmCommandComponent: [{
|
|
6782
|
-
type: ViewChild,
|
|
6783
|
-
args: ["confirmCommandComponent"]
|
|
6784
|
-
}], cancelCommandComponent: [{
|
|
6785
|
-
type: ViewChild,
|
|
6786
|
-
args: ["cancelCommandComponent"]
|
|
6787
|
-
}], confirmCommand: [{
|
|
6788
|
-
type: Input
|
|
6789
|
-
}], cancelCommand: [{
|
|
6790
|
-
type: Input
|
|
6791
|
-
}], faces: [{
|
|
6792
|
-
type: Input
|
|
6793
|
-
}], confirmFace: [{
|
|
6794
|
-
type: Input
|
|
6795
|
-
}], cancelFace: [{
|
|
6796
|
-
type: Input
|
|
6797
|
-
}], style: [{
|
|
6798
|
-
type: Input
|
|
6799
|
-
}], layout: [{
|
|
6800
|
-
type: Input
|
|
6801
|
-
}, {
|
|
6802
|
-
type: HostBinding,
|
|
6803
|
-
args: ['attr.layout']
|
|
6804
|
-
}], align: [{
|
|
6805
|
-
type: Input
|
|
6806
|
-
}, {
|
|
6807
|
-
type: HostBinding,
|
|
6808
|
-
args: ['attr.align']
|
|
6809
|
-
}], alignContent: [{
|
|
6810
|
-
type: Input
|
|
6811
|
-
}, {
|
|
6812
|
-
type: HostBinding,
|
|
6813
|
-
args: ['attr.align-content']
|
|
6814
|
-
}] } });
|
|
6815
|
-
(function (ActivityActionsComponent) {
|
|
6816
|
-
ActivityActionsComponent.Layout = Enum({
|
|
6817
|
-
INLINE: 'inline',
|
|
6818
|
-
BLOCK: 'block'
|
|
6819
|
-
});
|
|
6820
|
-
ActivityActionsComponent.Align = Enum({
|
|
6821
|
-
START: 'start',
|
|
6822
|
-
STRETCH: 'stretch',
|
|
6823
|
-
END: 'end'
|
|
6824
|
-
});
|
|
6825
|
-
ActivityActionsComponent.AlignContent = Enum({
|
|
6826
|
-
START: 'start',
|
|
6827
|
-
CENTER: 'center',
|
|
6828
|
-
END: 'end'
|
|
6829
|
-
});
|
|
6830
|
-
})(ActivityActionsComponent || (ActivityActionsComponent = {}));
|
|
6831
|
-
|
|
6832
6699
|
const INTERACTION_CONTEXT_PROVIDER = new InjectionToken("INTERACTION_CONTEXT_PROVIDER");
|
|
6833
6700
|
|
|
6834
6701
|
const ACTIVITY_DATA = new InjectionToken("InteractionActivityData");
|
|
6835
6702
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
6836
6703
|
class Activity extends LoadableComponent {
|
|
6704
|
+
/**
|
|
6705
|
+
* @deprecated, inject ActivityContext instead
|
|
6706
|
+
*/
|
|
6837
6707
|
static asInteractionContextProvider() {
|
|
6838
6708
|
return {
|
|
6839
6709
|
provide: INTERACTION_CONTEXT_PROVIDER, useExisting: this
|
|
@@ -6842,10 +6712,10 @@ class Activity extends LoadableComponent {
|
|
|
6842
6712
|
activityData = inject(ACTIVITY_DATA);
|
|
6843
6713
|
activityReadyListeners = new EventListenerList();
|
|
6844
6714
|
_busy$ = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
6715
|
+
#disableClose$ = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
6845
6716
|
_focused$ = this.registerDisposable(new DelegatingValueModel());
|
|
6846
6717
|
_activityContext;
|
|
6847
6718
|
_ready$ = new MutableValueModel(false);
|
|
6848
|
-
activityActions;
|
|
6849
6719
|
#confirmCommand_accessor_storage = proxify((Command));
|
|
6850
6720
|
get confirmCommand() { return this.#confirmCommand_accessor_storage; }
|
|
6851
6721
|
set confirmCommand(value) { this.#confirmCommand_accessor_storage = value; }
|
|
@@ -6872,14 +6742,6 @@ class Activity extends LoadableComponent {
|
|
|
6872
6742
|
this.notifyActivityReady();
|
|
6873
6743
|
});
|
|
6874
6744
|
}
|
|
6875
|
-
ngAfterViewInit() {
|
|
6876
|
-
if (this.activityActions) {
|
|
6877
|
-
this.initialiseActivityAction(this.activityActions);
|
|
6878
|
-
}
|
|
6879
|
-
}
|
|
6880
|
-
initialiseActivityAction(activityActions) {
|
|
6881
|
-
activityActions.initCommands(this);
|
|
6882
|
-
}
|
|
6883
6745
|
get interactionContext() {
|
|
6884
6746
|
assert$1.isTruthy(this.isInitialised());
|
|
6885
6747
|
return this._interactionContext;
|
|
@@ -6895,6 +6757,9 @@ class Activity extends LoadableComponent {
|
|
|
6895
6757
|
this._ready$.value = true;
|
|
6896
6758
|
}
|
|
6897
6759
|
onActivityReady(callback) {
|
|
6760
|
+
if (this.ready$.value) {
|
|
6761
|
+
callback(this);
|
|
6762
|
+
}
|
|
6898
6763
|
return this.activityReadyListeners.add(callback);
|
|
6899
6764
|
}
|
|
6900
6765
|
autoFocus(focusable) {
|
|
@@ -6913,6 +6778,9 @@ class Activity extends LoadableComponent {
|
|
|
6913
6778
|
get busy$() {
|
|
6914
6779
|
return this._busy$.readonly$;
|
|
6915
6780
|
}
|
|
6781
|
+
get disableClose$() {
|
|
6782
|
+
return this.#disableClose$.readonly$;
|
|
6783
|
+
}
|
|
6916
6784
|
get focused$() {
|
|
6917
6785
|
return this._focused$.readonly$;
|
|
6918
6786
|
}
|
|
@@ -6922,6 +6790,12 @@ class Activity extends LoadableComponent {
|
|
|
6922
6790
|
isBusy() {
|
|
6923
6791
|
return this._busy$.value;
|
|
6924
6792
|
}
|
|
6793
|
+
get disableClose() {
|
|
6794
|
+
return this.#disableClose$.value;
|
|
6795
|
+
}
|
|
6796
|
+
disableCloseWhile(condition) {
|
|
6797
|
+
this.#disableClose$.setDelegate(condition);
|
|
6798
|
+
}
|
|
6925
6799
|
isInitialised() {
|
|
6926
6800
|
return !!this._activityContext;
|
|
6927
6801
|
}
|
|
@@ -6929,7 +6803,7 @@ class Activity extends LoadableComponent {
|
|
|
6929
6803
|
return this.interactionContext;
|
|
6930
6804
|
}
|
|
6931
6805
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: Activity, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6932
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: Activity, selector: "ng-component", host: { properties: { "class": "this.class", "attr.focused": "this.isFocused" } },
|
|
6806
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: Activity, selector: "ng-component", host: { properties: { "class": "this.class", "attr.focused": "this.isFocused" } }, usesInheritance: true, ngImport: i0, template: "", isInline: true });
|
|
6933
6807
|
}
|
|
6934
6808
|
__decorate([
|
|
6935
6809
|
Proxify(),
|
|
@@ -6944,10 +6818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6944
6818
|
args: [{
|
|
6945
6819
|
template: "",
|
|
6946
6820
|
}]
|
|
6947
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
6948
|
-
type: ViewChild,
|
|
6949
|
-
args: [ActivityActionsComponent]
|
|
6950
|
-
}], confirmCommand: [], cancelCommand: [], class: [{
|
|
6821
|
+
}], ctorParameters: function () { return []; }, propDecorators: { confirmCommand: [], cancelCommand: [], class: [{
|
|
6951
6822
|
type: HostBinding,
|
|
6952
6823
|
args: ["class"]
|
|
6953
6824
|
}], isFocused: [{
|
|
@@ -6972,36 +6843,11 @@ var Alert;
|
|
|
6972
6843
|
Alert.getColor = getColor;
|
|
6973
6844
|
})(Alert || (Alert = {}));
|
|
6974
6845
|
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
config
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
content;
|
|
6981
|
-
color;
|
|
6982
|
-
constructor(config) {
|
|
6983
|
-
super();
|
|
6984
|
-
this.config = config;
|
|
6985
|
-
assert.notNil(config);
|
|
6986
|
-
this.title = Alert.getTitle(config);
|
|
6987
|
-
this.color = this.checkColor(Alert.getColor(config));
|
|
6988
|
-
this.content = Alert.getContent(config);
|
|
6989
|
-
this.confirmFace = {
|
|
6990
|
-
text: () => config.ok(),
|
|
6991
|
-
color: () => this.color || 'primary',
|
|
6992
|
-
style: () => 'raised'
|
|
6993
|
-
};
|
|
6994
|
-
this.onActivityReady(() => {
|
|
6995
|
-
if (this.activityActions) {
|
|
6996
|
-
this.isDestructive() ? this.activityActions.focusCancel() : this.activityActions.focusConfirm();
|
|
6997
|
-
}
|
|
6998
|
-
});
|
|
6999
|
-
}
|
|
7000
|
-
getConfig() {
|
|
7001
|
-
return lang$1.abstractMethod(this.constructor);
|
|
7002
|
-
}
|
|
7003
|
-
checkColor(rawColor) {
|
|
7004
|
-
if (this.isDestructive()) {
|
|
6846
|
+
var Confirm;
|
|
6847
|
+
(function (Confirm) {
|
|
6848
|
+
function checkColor(config) {
|
|
6849
|
+
const rawColor = Alert.getColor(config);
|
|
6850
|
+
if (isDestructive(config)) {
|
|
7005
6851
|
return 'warn';
|
|
7006
6852
|
}
|
|
7007
6853
|
else {
|
|
@@ -7014,8 +6860,20 @@ class AbstractDialogComponent extends Activity {
|
|
|
7014
6860
|
}
|
|
7015
6861
|
}
|
|
7016
6862
|
}
|
|
7017
|
-
|
|
7018
|
-
|
|
6863
|
+
Confirm.checkColor = checkColor;
|
|
6864
|
+
function isDestructive(config) {
|
|
6865
|
+
return isFunction(config['destructive']) && config["destructive"]();
|
|
6866
|
+
}
|
|
6867
|
+
Confirm.isDestructive = isDestructive;
|
|
6868
|
+
})(Confirm || (Confirm = {}));
|
|
6869
|
+
|
|
6870
|
+
const ALERT_CONFIG = new InjectionToken('AlertConfig');
|
|
6871
|
+
class AbstractDialogComponent extends Activity {
|
|
6872
|
+
config;
|
|
6873
|
+
constructor(config) {
|
|
6874
|
+
super();
|
|
6875
|
+
this.config = config;
|
|
6876
|
+
assert.notNil(config);
|
|
7019
6877
|
}
|
|
7020
6878
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AbstractDialogComponent, deps: [{ token: ALERT_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
7021
6879
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AbstractDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
@@ -7035,9 +6893,6 @@ class AbstractConfirmDialogComponent extends AbstractDialogComponent {
|
|
|
7035
6893
|
confirmClass = "aup-confirm-activity";
|
|
7036
6894
|
constructor(config) {
|
|
7037
6895
|
super(config);
|
|
7038
|
-
this.cancelFace = {
|
|
7039
|
-
text: () => config.cancel()
|
|
7040
|
-
};
|
|
7041
6896
|
this.cancelCommand = Command.create(() => {
|
|
7042
6897
|
return this.cancel();
|
|
7043
6898
|
});
|
|
@@ -7050,7 +6905,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
7050
6905
|
args: [{
|
|
7051
6906
|
template: ''
|
|
7052
6907
|
}]
|
|
7053
|
-
}], ctorParameters: function () { return [{ type:
|
|
6908
|
+
}], ctorParameters: function () { return [{ type: Confirm, decorators: [{
|
|
7054
6909
|
type: Inject,
|
|
7055
6910
|
args: [ALERT_CONFIG]
|
|
7056
6911
|
}] }]; }, propDecorators: { confirmClass: [{
|
|
@@ -7058,6 +6913,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
7058
6913
|
args: ["class"]
|
|
7059
6914
|
}] } });
|
|
7060
6915
|
|
|
6916
|
+
class ActivityContext {
|
|
6917
|
+
}
|
|
6918
|
+
|
|
6919
|
+
/**
|
|
6920
|
+
* @example
|
|
6921
|
+
* <aup-activity-actions [confirmFace]="saveFace" [cancelFace]="cancelFace">
|
|
6922
|
+
* </aup-activity-actions>
|
|
6923
|
+
*
|
|
6924
|
+
* <aup-activity-actions [faces]="{confirm: saveFace, cancel: cancelFace}">
|
|
6925
|
+
* </aup-activity-actions>
|
|
6926
|
+
*
|
|
6927
|
+
* // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default
|
|
6928
|
+
* // style definitions
|
|
6929
|
+
* <aup-activity-actions [faces]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
6930
|
+
* </aup-activity-actions>
|
|
6931
|
+
*
|
|
6932
|
+
* // you can also add additional content that will be displayed along with the buttons.
|
|
6933
|
+
* // The location of the content depends on the alignment attribute.
|
|
6934
|
+
* <aup-activity-actions
|
|
6935
|
+
* align="stretch"
|
|
6936
|
+
* [faces]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
6937
|
+
* <span>This content will be between the two commands</span>
|
|
6938
|
+
* </aup-activity-actions>
|
|
6939
|
+
*/
|
|
6940
|
+
class ActivityActionsComponent extends DisposableComponent {
|
|
6941
|
+
activityContext;
|
|
6942
|
+
confirmCommandComponent;
|
|
6943
|
+
cancelCommandComponent;
|
|
6944
|
+
#confirmCommand_accessor_storage = proxify((Command));
|
|
6945
|
+
/**
|
|
6946
|
+
* @deprecated activity actions now use the confirm command of the activity automatically
|
|
6947
|
+
*/
|
|
6948
|
+
get confirmCommand() { return this.#confirmCommand_accessor_storage; }
|
|
6949
|
+
set confirmCommand(value) { this.#confirmCommand_accessor_storage = value; }
|
|
6950
|
+
#cancelCommand_accessor_storage = proxify((Command));
|
|
6951
|
+
/**
|
|
6952
|
+
* @deprecated activity actions now use the cancel command of the activity automatically
|
|
6953
|
+
*/
|
|
6954
|
+
get cancelCommand() { return this.#cancelCommand_accessor_storage; }
|
|
6955
|
+
set cancelCommand(value) { this.#cancelCommand_accessor_storage = value; }
|
|
6956
|
+
set faces(faces) {
|
|
6957
|
+
this.confirmFace = faces.confirm;
|
|
6958
|
+
this.cancelFace = faces.cancel;
|
|
6959
|
+
}
|
|
6960
|
+
confirmFace;
|
|
6961
|
+
cancelFace;
|
|
6962
|
+
/**
|
|
6963
|
+
* @deprecated use #faces instead.
|
|
6964
|
+
*/
|
|
6965
|
+
set style(style) {
|
|
6966
|
+
this.faces = style;
|
|
6967
|
+
}
|
|
6968
|
+
layout = ActivityActionsComponent.Layout.BLOCK;
|
|
6969
|
+
align = ActivityActionsComponent.Align.STRETCH;
|
|
6970
|
+
alignContent = ActivityActionsComponent.AlignContent.CENTER;
|
|
6971
|
+
constructor(activityContext) {
|
|
6972
|
+
super();
|
|
6973
|
+
this.activityContext = activityContext;
|
|
6974
|
+
console.log(activityContext);
|
|
6975
|
+
if (activityContext) {
|
|
6976
|
+
this.confirmCommand = activityContext.confirmCommand;
|
|
6977
|
+
this.cancelCommand = activityContext.cancelCommand;
|
|
6978
|
+
}
|
|
6979
|
+
}
|
|
6980
|
+
hasConfirmFace() {
|
|
6981
|
+
return !!this.confirmFace;
|
|
6982
|
+
}
|
|
6983
|
+
hasCancelFace() {
|
|
6984
|
+
return !!this.cancelFace;
|
|
6985
|
+
}
|
|
6986
|
+
focusConfirm() {
|
|
6987
|
+
this.confirmCommandComponent.requestFocus();
|
|
6988
|
+
}
|
|
6989
|
+
focusCancel() {
|
|
6990
|
+
this.cancelCommandComponent.requestFocus();
|
|
6991
|
+
}
|
|
6992
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityActionsComponent, deps: [{ token: ActivityContext, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
6993
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: { confirmCommand: "confirmCommand", cancelCommand: "cancelCommand", faces: "faces", confirmFace: "confirmFace", cancelFace: "cancelFace", style: "style", layout: "layout", align: "align", alignContent: "alignContent" }, host: { properties: { "attr.layout": "this.layout", "attr.align": "this.align", "attr.align-content": "this.alignContent" } }, viewQueries: [{ propertyName: "confirmCommandComponent", first: true, predicate: ["confirmCommandComponent"], descendants: true }, { propertyName: "cancelCommandComponent", first: true, predicate: ["cancelCommandComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command #cancelCommandComponent class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command #confirmCommandComponent class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px);grid-gap:var(--resolved-activity-actions-gap)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}:host .cancel{grid-area:cancel}:host .confirm{grid-area:confirm}:host .content{display:flex;flex-direction:row;align-items:center}:host[align-content=start] .content{justify-items:start}:host[align-content=end]{justify-items:end}:host[align-content=center]{justify-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }] });
|
|
6994
|
+
}
|
|
6995
|
+
__decorate([
|
|
6996
|
+
Proxify(),
|
|
6997
|
+
__metadata("design:type", Object)
|
|
6998
|
+
], ActivityActionsComponent.prototype, "confirmCommand", null);
|
|
6999
|
+
__decorate([
|
|
7000
|
+
Proxify(),
|
|
7001
|
+
__metadata("design:type", Object)
|
|
7002
|
+
], ActivityActionsComponent.prototype, "cancelCommand", null);
|
|
7003
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityActionsComponent, decorators: [{
|
|
7004
|
+
type: Component,
|
|
7005
|
+
args: [{ selector: 'aup-activity-actions', template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command #cancelCommandComponent class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command #confirmCommandComponent class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px);grid-gap:var(--resolved-activity-actions-gap)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}:host .cancel{grid-area:cancel}:host .confirm{grid-area:confirm}:host .content{display:flex;flex-direction:row;align-items:center}:host[align-content=start] .content{justify-items:start}:host[align-content=end]{justify-items:end}:host[align-content=center]{justify-items:center}\n"] }]
|
|
7006
|
+
}], ctorParameters: function () { return [{ type: ActivityContext, decorators: [{
|
|
7007
|
+
type: Optional
|
|
7008
|
+
}] }]; }, propDecorators: { confirmCommandComponent: [{
|
|
7009
|
+
type: ViewChild,
|
|
7010
|
+
args: ["confirmCommandComponent"]
|
|
7011
|
+
}], cancelCommandComponent: [{
|
|
7012
|
+
type: ViewChild,
|
|
7013
|
+
args: ["cancelCommandComponent"]
|
|
7014
|
+
}], confirmCommand: [{
|
|
7015
|
+
type: Input
|
|
7016
|
+
}], cancelCommand: [{
|
|
7017
|
+
type: Input
|
|
7018
|
+
}], faces: [{
|
|
7019
|
+
type: Input
|
|
7020
|
+
}], confirmFace: [{
|
|
7021
|
+
type: Input
|
|
7022
|
+
}], cancelFace: [{
|
|
7023
|
+
type: Input
|
|
7024
|
+
}], style: [{
|
|
7025
|
+
type: Input
|
|
7026
|
+
}], layout: [{
|
|
7027
|
+
type: Input
|
|
7028
|
+
}, {
|
|
7029
|
+
type: HostBinding,
|
|
7030
|
+
args: ['attr.layout']
|
|
7031
|
+
}], align: [{
|
|
7032
|
+
type: Input
|
|
7033
|
+
}, {
|
|
7034
|
+
type: HostBinding,
|
|
7035
|
+
args: ['attr.align']
|
|
7036
|
+
}], alignContent: [{
|
|
7037
|
+
type: Input
|
|
7038
|
+
}, {
|
|
7039
|
+
type: HostBinding,
|
|
7040
|
+
args: ['attr.align-content']
|
|
7041
|
+
}] } });
|
|
7042
|
+
(function (ActivityActionsComponent) {
|
|
7043
|
+
ActivityActionsComponent.Layout = Enum({
|
|
7044
|
+
INLINE: 'inline',
|
|
7045
|
+
BLOCK: 'block'
|
|
7046
|
+
});
|
|
7047
|
+
ActivityActionsComponent.Align = Enum({
|
|
7048
|
+
START: 'start',
|
|
7049
|
+
STRETCH: 'stretch',
|
|
7050
|
+
END: 'end'
|
|
7051
|
+
});
|
|
7052
|
+
ActivityActionsComponent.AlignContent = Enum({
|
|
7053
|
+
START: 'start',
|
|
7054
|
+
CENTER: 'center',
|
|
7055
|
+
END: 'end'
|
|
7056
|
+
});
|
|
7057
|
+
})(ActivityActionsComponent || (ActivityActionsComponent = {}));
|
|
7058
|
+
|
|
7061
7059
|
class ActivityBodyComponent extends DisposableComponent {
|
|
7062
7060
|
fullWidth = false;
|
|
7063
7061
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityBodyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -9641,7 +9639,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
9641
9639
|
args: ['attr.color']
|
|
9642
9640
|
}] } });
|
|
9643
9641
|
|
|
9642
|
+
class AlertRendererComponent extends DisposableComponent {
|
|
9643
|
+
config;
|
|
9644
|
+
#confirmCommand_accessor_storage = proxify(Command);
|
|
9645
|
+
get confirmCommand() { return this.#confirmCommand_accessor_storage; }
|
|
9646
|
+
set confirmCommand(value) { this.#confirmCommand_accessor_storage = value; }
|
|
9647
|
+
confirmFace;
|
|
9648
|
+
title;
|
|
9649
|
+
content;
|
|
9650
|
+
color;
|
|
9651
|
+
constructor(activityContext) {
|
|
9652
|
+
super();
|
|
9653
|
+
this.onInit(() => {
|
|
9654
|
+
assert.notNil(this.config);
|
|
9655
|
+
this.title = Alert.getTitle(this.config);
|
|
9656
|
+
this.color = Confirm.checkColor(this.config);
|
|
9657
|
+
this.content = Alert.getContent(this.config);
|
|
9658
|
+
this.confirmFace = {
|
|
9659
|
+
text: () => this.config.ok(),
|
|
9660
|
+
color: () => this.color || 'primary',
|
|
9661
|
+
style: () => 'raised'
|
|
9662
|
+
};
|
|
9663
|
+
});
|
|
9664
|
+
}
|
|
9665
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AlertRendererComponent, deps: [{ token: ActivityContext, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
9666
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AlertRendererComponent, selector: "aup-alert-renderer", inputs: { config: "config", confirmCommand: "confirmCommand" }, usesInheritance: true, ngImport: i0, template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\"></aup-activity-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MarkdownComponent, selector: "aup-markdown, [aupMarkdown]", inputs: ["content$", "content", "inline"] }, { kind: "component", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: ["confirmCommand", "cancelCommand", "faces", "confirmFace", "cancelFace", "style", "layout", "align", "alignContent"] }, { kind: "component", type: ActivityTitleComponent, selector: "aup-activity-title", inputs: ["hasTransparentBackground", "color"] }, { kind: "component", type: ActivityBodyComponent, selector: "aup-activity-body", inputs: ["fullWidth"] }] });
|
|
9667
|
+
}
|
|
9668
|
+
__decorate([
|
|
9669
|
+
Proxify(),
|
|
9670
|
+
__metadata("design:type", Command)
|
|
9671
|
+
], AlertRendererComponent.prototype, "confirmCommand", null);
|
|
9672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AlertRendererComponent, decorators: [{
|
|
9673
|
+
type: Component,
|
|
9674
|
+
args: [{ selector: 'aup-alert-renderer', template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\"></aup-activity-actions>\n" }]
|
|
9675
|
+
}], ctorParameters: function () { return [{ type: ActivityContext, decorators: [{
|
|
9676
|
+
type: Optional
|
|
9677
|
+
}] }]; }, propDecorators: { config: [{
|
|
9678
|
+
type: Input
|
|
9679
|
+
}], confirmCommand: [{
|
|
9680
|
+
type: Input
|
|
9681
|
+
}] } });
|
|
9682
|
+
|
|
9644
9683
|
class AlertDialogComponent extends AbstractDialogComponent {
|
|
9684
|
+
confirmFace;
|
|
9685
|
+
title;
|
|
9686
|
+
content;
|
|
9687
|
+
color;
|
|
9645
9688
|
constructor(alert) {
|
|
9646
9689
|
super(alert);
|
|
9647
9690
|
this.confirmCommand = Command.create(() => {
|
|
@@ -9649,16 +9692,56 @@ class AlertDialogComponent extends AbstractDialogComponent {
|
|
|
9649
9692
|
});
|
|
9650
9693
|
}
|
|
9651
9694
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AlertDialogComponent, deps: [{ token: ACTIVITY_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
9652
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AlertDialogComponent, selector: "aup-alert-dialog", usesInheritance: true, ngImport: i0, template: "<aup-
|
|
9695
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AlertDialogComponent, selector: "aup-alert-dialog", usesInheritance: true, ngImport: i0, template: "<aup-alert-renderer [config]=\"activityData\"></aup-alert-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: AlertRendererComponent, selector: "aup-alert-renderer", inputs: ["config", "confirmCommand"] }] });
|
|
9653
9696
|
}
|
|
9654
9697
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AlertDialogComponent, decorators: [{
|
|
9655
9698
|
type: Component,
|
|
9656
|
-
args: [{ selector: 'aup-alert-dialog', template: "<aup-
|
|
9699
|
+
args: [{ selector: 'aup-alert-dialog', template: "<aup-alert-renderer [config]=\"activityData\"></aup-alert-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"] }]
|
|
9657
9700
|
}], ctorParameters: function () { return [{ type: Alert, decorators: [{
|
|
9658
9701
|
type: Inject,
|
|
9659
9702
|
args: [ACTIVITY_DATA]
|
|
9660
9703
|
}] }]; } });
|
|
9661
9704
|
|
|
9705
|
+
class ConfirmRendererComponent extends AlertRendererComponent {
|
|
9706
|
+
#cancelCommand_accessor_storage = proxify(Command);
|
|
9707
|
+
get cancelCommand() { return this.#cancelCommand_accessor_storage; }
|
|
9708
|
+
set cancelCommand(value) { this.#cancelCommand_accessor_storage = value; }
|
|
9709
|
+
activityActions;
|
|
9710
|
+
cancelFace;
|
|
9711
|
+
constructor(activityContext) {
|
|
9712
|
+
super(activityContext);
|
|
9713
|
+
if (activityContext) {
|
|
9714
|
+
activityContext.onActivityReady(() => {
|
|
9715
|
+
if (this.activityActions) {
|
|
9716
|
+
Confirm.isDestructive(this.config) ? this.activityActions.focusCancel() : this.activityActions.focusConfirm();
|
|
9717
|
+
}
|
|
9718
|
+
});
|
|
9719
|
+
}
|
|
9720
|
+
this.onInit(() => {
|
|
9721
|
+
this.cancelFace = {
|
|
9722
|
+
text: () => this.config.cancel(),
|
|
9723
|
+
};
|
|
9724
|
+
});
|
|
9725
|
+
}
|
|
9726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmRendererComponent, deps: [{ token: ActivityContext, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
9727
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmRendererComponent, selector: "aup-confirm-renderer", inputs: { cancelCommand: "cancelCommand" }, viewQueries: [{ propertyName: "activityActions", first: true, predicate: ActivityActionsComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MarkdownComponent, selector: "aup-markdown, [aupMarkdown]", inputs: ["content$", "content", "inline"] }, { kind: "component", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: ["confirmCommand", "cancelCommand", "faces", "confirmFace", "cancelFace", "style", "layout", "align", "alignContent"] }, { kind: "component", type: ActivityTitleComponent, selector: "aup-activity-title", inputs: ["hasTransparentBackground", "color"] }, { kind: "component", type: ActivityBodyComponent, selector: "aup-activity-body", inputs: ["fullWidth"] }] });
|
|
9728
|
+
}
|
|
9729
|
+
__decorate([
|
|
9730
|
+
Proxify(),
|
|
9731
|
+
__metadata("design:type", Command)
|
|
9732
|
+
], ConfirmRendererComponent.prototype, "cancelCommand", null);
|
|
9733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmRendererComponent, decorators: [{
|
|
9734
|
+
type: Component,
|
|
9735
|
+
args: [{ selector: 'aup-confirm-renderer', template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n\n" }]
|
|
9736
|
+
}], ctorParameters: function () { return [{ type: ActivityContext, decorators: [{
|
|
9737
|
+
type: Optional
|
|
9738
|
+
}] }]; }, propDecorators: { cancelCommand: [{
|
|
9739
|
+
type: Input
|
|
9740
|
+
}], activityActions: [{
|
|
9741
|
+
type: ViewChild,
|
|
9742
|
+
args: [ActivityActionsComponent]
|
|
9743
|
+
}] } });
|
|
9744
|
+
|
|
9662
9745
|
class ConfirmThenDialogComponent extends AbstractConfirmDialogComponent {
|
|
9663
9746
|
constructor(config) {
|
|
9664
9747
|
super(config.confirm);
|
|
@@ -9669,11 +9752,11 @@ class ConfirmThenDialogComponent extends AbstractConfirmDialogComponent {
|
|
|
9669
9752
|
});
|
|
9670
9753
|
}
|
|
9671
9754
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmThenDialogComponent, deps: [{ token: ACTIVITY_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
9672
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmThenDialogComponent, selector: "aup-confirmation-then-dialog", usesInheritance: true, ngImport: i0, template: "<aup-
|
|
9755
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmThenDialogComponent, selector: "aup-confirmation-then-dialog", usesInheritance: true, ngImport: i0, template: "<aup-confirm-renderer [config]=\"config\" [confirmCommand]=\"confirmCommand\" [cancelCommand]=\"cancelCommand\"></aup-confirm-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: ConfirmRendererComponent, selector: "aup-confirm-renderer", inputs: ["cancelCommand"] }] });
|
|
9673
9756
|
}
|
|
9674
9757
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmThenDialogComponent, decorators: [{
|
|
9675
9758
|
type: Component,
|
|
9676
|
-
args: [{ selector: 'aup-confirmation-then-dialog', template: "<aup-
|
|
9759
|
+
args: [{ selector: 'aup-confirmation-then-dialog', template: "<aup-confirm-renderer [config]=\"config\" [confirmCommand]=\"confirmCommand\" [cancelCommand]=\"cancelCommand\"></aup-confirm-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"] }]
|
|
9677
9760
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9678
9761
|
type: Inject,
|
|
9679
9762
|
args: [ACTIVITY_DATA]
|
|
@@ -9693,11 +9776,11 @@ class ConfirmThenExecuteDialogComponent extends AbstractConfirmDialogComponent {
|
|
|
9693
9776
|
});
|
|
9694
9777
|
}
|
|
9695
9778
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmThenExecuteDialogComponent, deps: [{ token: ACTIVITY_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
9696
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmThenExecuteDialogComponent, selector: "aup-confirmation-execute-dialog", usesInheritance: true, ngImport: i0, template: "<aup-
|
|
9779
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmThenExecuteDialogComponent, selector: "aup-confirmation-execute-dialog", usesInheritance: true, ngImport: i0, template: "<aup-confirm-renderer [config]=\"config\" [confirmCommand]=\"confirmCommand\" [cancelCommand]=\"cancelCommand\"></aup-confirm-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: ConfirmRendererComponent, selector: "aup-confirm-renderer", inputs: ["cancelCommand"] }] });
|
|
9697
9780
|
}
|
|
9698
9781
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmThenExecuteDialogComponent, decorators: [{
|
|
9699
9782
|
type: Component,
|
|
9700
|
-
args: [{ selector: 'aup-confirmation-execute-dialog', template: "<aup-
|
|
9783
|
+
args: [{ selector: 'aup-confirmation-execute-dialog', template: "<aup-confirm-renderer [config]=\"config\" [confirmCommand]=\"confirmCommand\" [cancelCommand]=\"cancelCommand\"></aup-confirm-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"] }]
|
|
9701
9784
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9702
9785
|
type: Inject,
|
|
9703
9786
|
args: [ACTIVITY_DATA]
|
|
@@ -9713,12 +9796,12 @@ class ConfirmationDialogComponent extends AbstractConfirmDialogComponent {
|
|
|
9713
9796
|
});
|
|
9714
9797
|
}
|
|
9715
9798
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: ACTIVITY_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
9716
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmationDialogComponent, selector: "aup-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<aup-
|
|
9799
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ConfirmationDialogComponent, selector: "aup-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<aup-confirm-renderer [config]=\"config\" [confirmCommand]=\"confirmCommand\" [cancelCommand]=\"cancelCommand\"></aup-confirm-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: ConfirmRendererComponent, selector: "aup-confirm-renderer", inputs: ["cancelCommand"] }] });
|
|
9717
9800
|
}
|
|
9718
9801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
9719
9802
|
type: Component,
|
|
9720
|
-
args: [{ selector: 'aup-confirmation-dialog', template: "<aup-
|
|
9721
|
-
}], ctorParameters: function () { return [{ type:
|
|
9803
|
+
args: [{ selector: 'aup-confirmation-dialog', template: "<aup-confirm-renderer [config]=\"config\" [confirmCommand]=\"confirmCommand\" [cancelCommand]=\"cancelCommand\"></aup-confirm-renderer>\n", styles: [":host{display:block}.mat-mdc-dialog-content{margin:0;padding:0}.mat-mdc-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"] }]
|
|
9804
|
+
}], ctorParameters: function () { return [{ type: Confirm, decorators: [{
|
|
9722
9805
|
type: Inject,
|
|
9723
9806
|
args: [ACTIVITY_DATA]
|
|
9724
9807
|
}] }]; } });
|
|
@@ -9829,12 +9912,42 @@ class ActivityRef {
|
|
|
9829
9912
|
}
|
|
9830
9913
|
}
|
|
9831
9914
|
|
|
9915
|
+
const INTERACTION_CONTEXT = new InjectionToken('interactionContext');
|
|
9916
|
+
|
|
9917
|
+
class ActivityContextImpl extends ActivityContext {
|
|
9918
|
+
activityContainer;
|
|
9919
|
+
readyListeners = [];
|
|
9920
|
+
confirmCommand = new DelegatingCommand();
|
|
9921
|
+
cancelCommand = new DelegatingCommand();
|
|
9922
|
+
activity;
|
|
9923
|
+
constructor(activityContainer) {
|
|
9924
|
+
super();
|
|
9925
|
+
this.activityContainer = activityContainer;
|
|
9926
|
+
}
|
|
9927
|
+
init(activity) {
|
|
9928
|
+
this.activity = activity;
|
|
9929
|
+
this.confirmCommand.setDelegate(activity.confirmCommand);
|
|
9930
|
+
this.cancelCommand.setDelegate(activity.cancelCommand);
|
|
9931
|
+
this.readyListeners.forEach((listener) => listener(this.activity));
|
|
9932
|
+
}
|
|
9933
|
+
get interactionContext() {
|
|
9934
|
+
return this.activityContainer;
|
|
9935
|
+
}
|
|
9936
|
+
onActivityReady(callback) {
|
|
9937
|
+
if (this.activity) {
|
|
9938
|
+
this.activity.onActivityReady(callback);
|
|
9939
|
+
}
|
|
9940
|
+
else {
|
|
9941
|
+
this.readyListeners.push(callback);
|
|
9942
|
+
}
|
|
9943
|
+
}
|
|
9944
|
+
}
|
|
9832
9945
|
/**
|
|
9833
9946
|
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
9834
9947
|
* external service.
|
|
9835
9948
|
*/
|
|
9836
9949
|
class ActivityOutletComponent {
|
|
9837
|
-
|
|
9950
|
+
interactionContext;
|
|
9838
9951
|
viewContainerRef;
|
|
9839
9952
|
injector;
|
|
9840
9953
|
activityComponentRef;
|
|
@@ -9851,37 +9964,39 @@ class ActivityOutletComponent {
|
|
|
9851
9964
|
get activityRef() {
|
|
9852
9965
|
return this._activityRef;
|
|
9853
9966
|
}
|
|
9854
|
-
constructor(
|
|
9855
|
-
this.
|
|
9967
|
+
constructor(interactionContext, viewContainerRef, injector) {
|
|
9968
|
+
this.interactionContext = interactionContext;
|
|
9856
9969
|
this.viewContainerRef = viewContainerRef;
|
|
9857
9970
|
this.injector = injector;
|
|
9858
9971
|
}
|
|
9859
9972
|
loadActivity(activityRef) {
|
|
9973
|
+
this.viewContainerRef.clear();
|
|
9974
|
+
const activityContext = new ActivityContextImpl(this.interactionContext);
|
|
9860
9975
|
const injector = Injector.create({
|
|
9861
9976
|
providers: [
|
|
9862
|
-
{
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
}
|
|
9977
|
+
{ provide: ACTIVITY_DATA, useValue: activityRef.activityData },
|
|
9978
|
+
{ provide: ActivityContext, useValue: activityContext },
|
|
9979
|
+
{ provide: INTERACTION_CONTEXT, useValue: this.interactionContext },
|
|
9866
9980
|
],
|
|
9867
9981
|
parent: this.injector
|
|
9868
9982
|
});
|
|
9869
|
-
|
|
9870
|
-
this.
|
|
9871
|
-
// console.log(`creating component -> ${activityRef.activityClass.name}`);
|
|
9872
|
-
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
9983
|
+
this.activityComponentRef = this.viewContainerRef.createComponent(activityRef.activityClass, { index: 0, injector });
|
|
9984
|
+
activityContext.init(this.activityComponentRef.instance);
|
|
9873
9985
|
this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);
|
|
9874
9986
|
}
|
|
9875
9987
|
get component() {
|
|
9876
9988
|
return this.activityComponentRef.instance;
|
|
9877
9989
|
}
|
|
9878
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityOutletComponent, deps: [{ token:
|
|
9990
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityOutletComponent, deps: [{ token: INTERACTION_CONTEXT }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
9879
9991
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ActivityOutletComponent, selector: "aup-activity-outlet", inputs: { nestedInteractionContext: "nestedInteractionContext", activityRef: "activityRef" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:block}\n"] });
|
|
9880
9992
|
}
|
|
9881
9993
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityOutletComponent, decorators: [{
|
|
9882
9994
|
type: Component,
|
|
9883
9995
|
args: [{ selector: 'aup-activity-outlet', template: '', styles: [":host{display:block}\n"] }]
|
|
9884
|
-
}], ctorParameters: function () { return [{ type:
|
|
9996
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9997
|
+
type: Inject,
|
|
9998
|
+
args: [INTERACTION_CONTEXT]
|
|
9999
|
+
}] }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { nestedInteractionContext: [{
|
|
9885
10000
|
type: Input
|
|
9886
10001
|
}], activityRef: [{
|
|
9887
10002
|
type: Input
|
|
@@ -9966,6 +10081,9 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
9966
10081
|
}
|
|
9967
10082
|
return findLast(this.activityRefs, tab => !tab.isComplete());
|
|
9968
10083
|
}
|
|
10084
|
+
get disableClose() {
|
|
10085
|
+
return this.getActiveActivityRef().activity.disableClose;
|
|
10086
|
+
}
|
|
9969
10087
|
/**
|
|
9970
10088
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
9971
10089
|
* there is still another activity running.
|
|
@@ -10121,11 +10239,15 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
10121
10239
|
this.finaliseActivityStates();
|
|
10122
10240
|
}
|
|
10123
10241
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityContainerComponent, deps: [{ token: PlaceRouter }], target: i0.ɵɵFactoryTarget.Component });
|
|
10124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ActivityContainerComponent, selector: "aup-activity-container", inputs: { dynamicHeight: "dynamicHeight", animationDuration: "animationDuration" },
|
|
10242
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ActivityContainerComponent, selector: "aup-activity-container", inputs: { dynamicHeight: "dynamicHeight", animationDuration: "animationDuration" }, providers: [
|
|
10243
|
+
{ provide: INTERACTION_CONTEXT, useClass: ActivityContainerComponent },
|
|
10244
|
+
], viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true, static: true }, { propertyName: "activityOutlets", predicate: ActivityOutletComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\"\n [animationDuration]=\"getTabAnimationDuration()\"\n (animationDone)=\"onAnimationDone()\"\n>\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busy$]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\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 </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}.activity-outlet-wrapper{flex:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$3.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i3$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: BusyOverlayComponent, selector: "aup-busy-overlay", inputs: ["busy$", "busy"] }, { kind: "directive", type: i5$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActivityOutletComponent, selector: "aup-activity-outlet", inputs: ["nestedInteractionContext", "activityRef"] }] });
|
|
10125
10245
|
}
|
|
10126
10246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityContainerComponent, decorators: [{
|
|
10127
10247
|
type: Component,
|
|
10128
|
-
args: [{ selector: "aup-activity-container",
|
|
10248
|
+
args: [{ selector: "aup-activity-container", providers: [
|
|
10249
|
+
{ provide: INTERACTION_CONTEXT, useClass: ActivityContainerComponent },
|
|
10250
|
+
], template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\"\n [animationDuration]=\"getTabAnimationDuration()\"\n (animationDone)=\"onAnimationDone()\"\n>\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busy$]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\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 </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}.activity-outlet-wrapper{flex:1}\n"] }]
|
|
10129
10251
|
}], ctorParameters: function () { return [{ type: PlaceRouter }]; }, propDecorators: { dynamicHeight: [{
|
|
10130
10252
|
type: Input
|
|
10131
10253
|
}], tabs: [{
|
|
@@ -10236,8 +10358,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
10236
10358
|
args: ['class.active']
|
|
10237
10359
|
}] } });
|
|
10238
10360
|
|
|
10239
|
-
const INTERACTION_CONTEXT = new InjectionToken('interactionContext');
|
|
10240
|
-
|
|
10241
10361
|
const cssDurationRegex$1 = /(\d+)(m?s)/;
|
|
10242
10362
|
/**
|
|
10243
10363
|
* @example
|
|
@@ -11427,7 +11547,9 @@ class InteractionModule {
|
|
|
11427
11547
|
AddCardActivityComponent,
|
|
11428
11548
|
InlineStringEditorComponent,
|
|
11429
11549
|
AbstractDialogComponent,
|
|
11430
|
-
AbstractConfirmDialogComponent
|
|
11550
|
+
AbstractConfirmDialogComponent,
|
|
11551
|
+
ConfirmRendererComponent,
|
|
11552
|
+
AlertRendererComponent], imports: [CommonModule,
|
|
11431
11553
|
MatButtonModule,
|
|
11432
11554
|
MatDialogModule,
|
|
11433
11555
|
MatTabsModule,
|
|
@@ -11455,9 +11577,11 @@ class InteractionModule {
|
|
|
11455
11577
|
ModalActivityTriggerComponent,
|
|
11456
11578
|
AddCardActivityComponent,
|
|
11457
11579
|
InlineStringEditorComponent,
|
|
11458
|
-
SlideDownInteractionContextComponent
|
|
11580
|
+
SlideDownInteractionContextComponent,
|
|
11581
|
+
ConfirmRendererComponent,
|
|
11582
|
+
AlertRendererComponent] });
|
|
11459
11583
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InteractionModule, providers: [
|
|
11460
|
-
InteractionService
|
|
11584
|
+
InteractionService,
|
|
11461
11585
|
// {
|
|
11462
11586
|
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
11463
11587
|
// }
|
|
@@ -11491,7 +11615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
11491
11615
|
FormsModule,
|
|
11492
11616
|
MatInputModule,
|
|
11493
11617
|
MatFormFieldModule,
|
|
11494
|
-
A11yModule
|
|
11618
|
+
A11yModule,
|
|
11495
11619
|
],
|
|
11496
11620
|
declarations: [
|
|
11497
11621
|
ActivityContainerComponent,
|
|
@@ -11521,6 +11645,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
11521
11645
|
InlineStringEditorComponent,
|
|
11522
11646
|
AbstractDialogComponent,
|
|
11523
11647
|
AbstractConfirmDialogComponent,
|
|
11648
|
+
ConfirmRendererComponent,
|
|
11649
|
+
AlertRendererComponent
|
|
11524
11650
|
],
|
|
11525
11651
|
exports: [
|
|
11526
11652
|
ActivityContainerComponent,
|
|
@@ -11540,13 +11666,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
11540
11666
|
AddCardActivityComponent,
|
|
11541
11667
|
InlineStringEditorComponent,
|
|
11542
11668
|
SlideDownInteractionContextComponent,
|
|
11669
|
+
ConfirmRendererComponent,
|
|
11670
|
+
AlertRendererComponent
|
|
11543
11671
|
],
|
|
11544
11672
|
providers: [
|
|
11545
|
-
InteractionService
|
|
11673
|
+
InteractionService,
|
|
11546
11674
|
// {
|
|
11547
11675
|
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
11548
11676
|
// }
|
|
11549
|
-
]
|
|
11677
|
+
],
|
|
11550
11678
|
}]
|
|
11551
11679
|
}] });
|
|
11552
11680
|
|
|
@@ -12310,7 +12438,7 @@ class DialogInteractionContext extends AbstractInteractionContext {
|
|
|
12310
12438
|
const config = {
|
|
12311
12439
|
...this.config,
|
|
12312
12440
|
...{
|
|
12313
|
-
disableClose,
|
|
12441
|
+
disableClose: true,
|
|
12314
12442
|
panelClass: 'dialog-interaction-context'
|
|
12315
12443
|
}
|
|
12316
12444
|
};
|
|
@@ -12322,6 +12450,11 @@ class DialogInteractionContext extends AbstractInteractionContext {
|
|
|
12322
12450
|
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
12323
12451
|
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
12324
12452
|
// activity.
|
|
12453
|
+
matDialogRef.backdropClick().subscribe(event => {
|
|
12454
|
+
if (this.activityContainer.isActive() && (!this.activityContainer.disableClose && !disableClose)) {
|
|
12455
|
+
activityContainer.cancelActiveActivity();
|
|
12456
|
+
}
|
|
12457
|
+
});
|
|
12325
12458
|
matDialogRef.afterClosed().subscribe(promiseAlreadyFinished => {
|
|
12326
12459
|
if (activityContainer.isActive()) {
|
|
12327
12460
|
activityContainer.cancelActiveActivity();
|
|
@@ -12807,5 +12940,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
12807
12940
|
* Generated bundle index. Do not edit.
|
|
12808
12941
|
*/
|
|
12809
12942
|
|
|
12810
|
-
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControlsComponent, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, INTERACTION_CONTEXT, INTERACTION_CONTEXT_PROVIDER, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableMoreMenuComponent, TableMoreMenuPopupComponent, TableRowAttributesDirective, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, TextSearchContext, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
12943
|
+
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControlsComponent, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, INTERACTION_CONTEXT, INTERACTION_CONTEXT_PROVIDER, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableMoreMenuComponent, TableMoreMenuPopupComponent, TableRowAttributesDirective, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, TextSearchContext, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
12811
12944
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|