@acorex/components 18.12.41 → 18.12.42
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AXStyleColorType } from '@acorex/components/common';
|
2
|
-
import { AXDialogConfig } from './dialog.class';
|
2
|
+
import { AXDialogConfig, AXDialogRef } from './dialog.class';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
/**
|
5
5
|
* The Button is a component which detects user interaction and triggers a corresponding event
|
@@ -7,7 +7,6 @@ import * as i0 from "@angular/core";
|
|
7
7
|
* @category Components
|
8
8
|
*/
|
9
9
|
export declare class AXDialogService {
|
10
|
-
#private;
|
11
10
|
private dialog;
|
12
11
|
private detectIcon;
|
13
12
|
/**
|
@@ -26,6 +25,7 @@ export declare class AXDialogService {
|
|
26
25
|
show(options: AXDialogConfig): Promise<{
|
27
26
|
name: string;
|
28
27
|
}>;
|
28
|
+
open(config: AXDialogConfig): AXDialogRef;
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDialogService, never>;
|
30
30
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXDialogService>;
|
31
31
|
}
|
@@ -34,7 +34,7 @@ export class AXDialogService {
|
|
34
34
|
*/
|
35
35
|
alert(title, content, type = 'primary', orientation = 'horizontal', draggable) {
|
36
36
|
return new Promise((resolve) => {
|
37
|
-
const popup = this
|
37
|
+
const popup = this.open({
|
38
38
|
title,
|
39
39
|
type: type,
|
40
40
|
content,
|
@@ -63,7 +63,7 @@ export class AXDialogService {
|
|
63
63
|
*/
|
64
64
|
confirm(title, content, type = 'primary', orientation = 'horizontal', draggable) {
|
65
65
|
return new Promise((resolve) => {
|
66
|
-
const popup = this
|
66
|
+
const popup = this.open({
|
67
67
|
title,
|
68
68
|
content,
|
69
69
|
type,
|
@@ -111,35 +111,37 @@ export class AXDialogService {
|
|
111
111
|
*/
|
112
112
|
show(options) {
|
113
113
|
return new Promise((resolve) => {
|
114
|
-
const popup = this.#open(options);
|
115
114
|
options.orientation = options.orientation || 'horizontal';
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
}
|
126
|
-
else {
|
127
|
-
popup.close();
|
128
|
-
resolve({ name: b.name ?? b.text });
|
129
|
-
}
|
130
|
-
}
|
131
|
-
else if (resolve) {
|
132
|
-
popup.close();
|
115
|
+
options.icon = options.icon ?? this.detectIcon(options.type);
|
116
|
+
const popup = this.open(options);
|
117
|
+
options.buttons?.forEach((b) => {
|
118
|
+
const orginalClick = b.onClick;
|
119
|
+
b.onClick = () => {
|
120
|
+
const e = { source: b, handled: false };
|
121
|
+
if (orginalClick) {
|
122
|
+
orginalClick(e);
|
123
|
+
if (e.handled) {
|
133
124
|
resolve({ name: b.name ?? b.text });
|
134
125
|
}
|
135
126
|
else {
|
136
127
|
popup.close();
|
128
|
+
resolve({ name: b.name ?? b.text });
|
137
129
|
}
|
138
|
-
}
|
139
|
-
|
130
|
+
}
|
131
|
+
else if (resolve) {
|
132
|
+
popup.close();
|
133
|
+
resolve({ name: b.name ?? b.text });
|
134
|
+
}
|
135
|
+
else {
|
136
|
+
popup.close();
|
137
|
+
}
|
138
|
+
};
|
139
|
+
});
|
140
140
|
});
|
141
141
|
}
|
142
|
-
|
142
|
+
open(config) {
|
143
|
+
config.orientation = config.orientation || 'horizontal';
|
144
|
+
config.icon = config.icon ?? this.detectIcon(config.type);
|
143
145
|
const dialogRef = this.dialog.open(AXDialogComponent, {
|
144
146
|
data: config,
|
145
147
|
role: 'alertdialog',
|
@@ -163,4 +165,4 @@ export class AXDialogService {
|
|
163
165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDialogService, decorators: [{
|
164
166
|
type: Injectable
|
165
167
|
}] });
|
166
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291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aWNvbjtcbiAgfVxuICAvKipcbiAgICogIFNob3cgYW4gYWxlcnQgYm94IHdpdGggJ09rYXknIGJ1dHRvbi5cbiAgICovXG4gIGFsZXJ0KFxuICAgIHRpdGxlOiBzdHJpbmcsXG4gICAgY29udGVudDogc3RyaW5nLFxuICAgIHR5cGU6IEFYU3R5bGVDb2xvclR5cGUgPSAncHJpbWFyeScsXG4gICAgb3JpZW50YXRpb246ICdob3Jpem9udGFsJyB8ICd2ZXJ0aWNhbCcgPSAnaG9yaXpvbnRhbCcsXG4gICAgZHJhZ2dhYmxlPzogYm9vbGVhbixcbiAgKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICBjb25zdCBwb3B1cCA9IHRoaXMuI29wZW4oe1xuICAgICAgICB0aXRsZSxcbiAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgY29udGVudCxcbiAgICAgICAgaWNvbjogdGhpcy5kZXRlY3RJY29uKHR5cGUpLFxuICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgZHJhZ2dhYmxlLFxuICAgICAgICBidXR0b25zOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ2NvbmZpcm0nLFxuICAgICAgICAgICAgdGV4dDogJ29rYXknLFxuICAgICAgICAgICAgY29sb3I6IHR5cGUsXG4gICAgICAgICAgICBhdXRvZm9jdXM6IHRydWUsXG4gICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICAgIHBvcHVwLmNsb3NlKCk7XG4gICAgICAgICAgICAgIGlmIChyZXNvbHZlKSB7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAgKiAgU2hvdyBhIGNvbmZpcm0gYm94IHdpdGggJ09rYXknICYgJ0NhbmNlbCcgYnV0dG9ucy5cbiAgICovXG5cbiAgY29uZmlybShcbiAgICB0aXRsZTogc3RyaW5nLFxuICAgIGNvbnRlbnQ6IHN0cmluZyxcbiAgICB0eXBlOiBBWFN0eWxlQ29sb3JUeXBlID0gJ3ByaW1hcnknLFxuICAgIG9yaWVudGF0aW9uOiAnaG9yaXpvbnRhbCcgfCAndmVydGljYWwnID0gJ2hvcml6b250YWwnLFxuICAgIGRyYWdnYWJsZT86IGJvb2xlYW4sXG4gICk6IFByb21pc2U8eyByZXN1bHQ6IGJvb2xlYW4gfT4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZTx7IHJlc3VsdDogYm9vbGVhbiB9PigocmVzb2x2ZSkgPT4ge1xuICAgICAgY29uc3QgcG9wdXAgPSB0aGlzLiNvcGVuKHtcbiAgICAgICAgdGl0bGUsXG4gICAgICAgIGNvbnRlbnQsXG4gICAgICAgIHR5cGUsXG4gICAgICAgIGljb246IHRoaXMuZGV0ZWN0SWNvbih0eXBlKSxcbiAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgIGRyYWdnYWJsZSxcbiAgICAgICAgYnV0dG9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdjb25maXJtJyxcbiAgICAgICAgICAgIHRleHQ6ICdva2F5JyxcbiAgICAgICAgICAgIGNvbG9yOiB0eXBlLFxuICAgICAgICAgICAgYXV0b2ZvY3VzOiB0cnVlLFxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoeyByZXN1bHQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnY2FuY2VsJyxcbiAgICAgICAgICAgIHRleHQ6ICdjYW5jZWwnLFxuICAgICAgICAgICAgY29sb3I6IGBnaG9zdGAsXG4gICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICAgIHBvcHVwLmNsb3NlKCk7XG4gICAgICAgICAgICAgIGlmIChyZXNvbHZlKSB7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHJlc3VsdDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBob3RrZXk6IHtcbiAgICAgICAgICAgICAgRXNjYXBlOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHJlc3VsdDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogIFNob3cgYSBjdXN0b20gZGlhbG9nIGJveC5cbiAgICovXG4gIHNob3cob3B0aW9uczogQVhEaWFsb2dDb25maWcpOiBQcm9taXNlPHsgbmFtZTogc3RyaW5nIH0+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgIGNvbnN0IHBvcHVwID0gdGhpcy4jb3BlbihvcHRpb25zKTtcbiAgICAgIG9wdGlvbnMub3JpZW50YXRpb24gPSBvcHRpb25zLm9yaWVudGF0aW9uIHx8ICdob3Jpem9udGFsJztcbiAgICAgIChvcHRpb25zLmljb24gPSBvcHRpb25zLmljb24gPz8gdGhpcy5kZXRlY3RJY29uKG9wdGlvbnMudHlwZSkpLFxuICAgICAgICBvcHRpb25zLmJ1dHRvbnM/LmZvckVhY2goKGIpID0+IHtcbiAgICAgICAgICBjb25zdCBvcmdpbmFsQ2xpY2sgPSBiLm9uQ2xpY2s7XG4gICAgICAgICAgYi5vbkNsaWNrID0gKCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgZSA9IHsgc291cmNlOiBiLCBoYW5kbGVkOiBmYWxzZSB9O1xuICAgICAgICAgICAgaWYgKG9yZ2luYWxDbGljaykge1xuICAgICAgICAgICAgICBvcmdpbmFsQ2xpY2soZSk7XG4gICAgICAgICAgICAgIGlmIChlLmhhbmRsZWQpIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKHsgbmFtZTogYi5uYW1lID8/IGIudGV4dCB9KTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIHJlc29sdmUoeyBuYW1lOiBiLm5hbWUgPz8gYi50ZXh0IH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlc29sdmUpIHtcbiAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgcmVzb2x2ZSh7IG5hbWU6IGIubmFtZSA/PyBiLnRleHQgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgI29wZW4oY29uZmlnOiBBWERpYWxvZ0NvbmZpZyk6IEFYRGlhbG9nUmVmIHtcbiAgICBjb25zdCBkaWFsb2dSZWYgPSB0aGlzLmRpYWxvZy5vcGVuKEFYRGlhbG9nQ29tcG9uZW50LCB7XG4gICAgICBkYXRhOiBjb25maWcsXG4gICAgICByb2xlOiAnYWxlcnRkaWFsb2cnLFxuICAgICAgYXJpYU1vZGFsOiB0cnVlLFxuICAgICAgcmVzdG9yZUZvY3VzOiB0cnVlLFxuICAgICAgY2xv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KHJlc29sdmUpID0+IHtcbiAgICAgIGNvbnN0IHBvcHVwID0gdGhpcy5vcGVuKHtcbiAgICAgICAgdGl0bGUsXG4gICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgIGNvbnRlbnQsXG4gICAgICAgIGljb246IHRoaXMuZGV0ZWN0SWNvbih0eXBlKSxcbiAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgIGRyYWdnYWJsZSxcbiAgICAgICAgYnV0dG9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdjb25maXJtJyxcbiAgICAgICAgICAgIHRleHQ6ICdva2F5JyxcbiAgICAgICAgICAgIGNvbG9yOiB0eXBlLFxuICAgICAgICAgICAgYXV0b2ZvY3VzOiB0cnVlLFxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogIFNob3cgYSBjb25maXJtIGJveCB3aXRoICdPa2F5JyAmICdDYW5jZWwnIGJ1dHRvbnMuXG4gICAqL1xuXG4gIGNvbmZpcm0oXG4gICAgdGl0bGU6IHN0cmluZyxcbiAgICBjb250ZW50OiBzdHJpbmcsXG4gICAgdHlwZTogQVhTdHlsZUNvbG9yVHlwZSA9ICdwcmltYXJ5JyxcbiAgICBvcmllbnRhdGlvbjogJ2hvcml6b250YWwnIHwgJ3ZlcnRpY2FsJyA9ICdob3Jpem9udGFsJyxcbiAgICBkcmFnZ2FibGU/OiBib29sZWFuLFxuICApOiBQcm9taXNlPHsgcmVzdWx0OiBib29sZWFuIH0+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2U8eyByZXN1bHQ6IGJvb2xlYW4gfT4oKHJlc29sdmUpID0+IHtcbiAgICAgIGNvbnN0IHBvcHVwID0gdGhpcy5vcGVuKHtcbiAgICAgICAgdGl0bGUsXG4gICAgICAgIGNvbnRlbnQsXG4gICAgICAgIHR5cGUsXG4gICAgICAgIGljb246IHRoaXMuZGV0ZWN0SWNvbih0eXBlKSxcbiAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgIGRyYWdnYWJsZSxcbiAgICAgICAgYnV0dG9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdjb25maXJtJyxcbiAgICAgICAgICAgIHRleHQ6ICdva2F5JyxcbiAgICAgICAgICAgIGNvbG9yOiB0eXBlLFxuICAgICAgICAgICAgYXV0b2ZvY3VzOiB0cnVlLFxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoeyByZXN1bHQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnY2FuY2VsJyxcbiAgICAgICAgICAgIHRleHQ6ICdjYW5jZWwnLFxuICAgICAgICAgICAgY29sb3I6IGBnaG9zdGAsXG4gICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICAgIHBvcHVwLmNsb3NlKCk7XG4gICAgICAgICAgICAgIGlmIChyZXNvbHZlKSB7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHJlc3VsdDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBob3RrZXk6IHtcbiAgICAgICAgICAgICAgRXNjYXBlOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHJlc3VsdDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogIFNob3cgYSBjdXN0b20gZGlhbG9nIGJveC5cbiAgICovXG4gIHNob3cob3B0aW9uczogQVhEaWFsb2dDb25maWcpOiBQcm9taXNlPHsgbmFtZTogc3RyaW5nIH0+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgIG9wdGlvbnMub3JpZW50YXRpb24gPSBvcHRpb25zLm9yaWVudGF0aW9uIHx8ICdob3Jpem9udGFsJztcbiAgICAgIG9wdGlvbnMuaWNvbiA9IG9wdGlvbnMuaWNvbiA/PyB0aGlzLmRldGVjdEljb24ob3B0aW9ucy50eXBlKTtcblxuICAgICAgY29uc3QgcG9wdXAgPSB0aGlzLm9wZW4ob3B0aW9ucyk7XG5cbiAgICAgIG9wdGlvbnMuYnV0dG9ucz8uZm9yRWFjaCgoYikgPT4ge1xuICAgICAgICBjb25zdCBvcmdpbmFsQ2xpY2sgPSBiLm9uQ2xpY2s7XG4gICAgICAgIGIub25DbGljayA9ICgpID0+IHtcbiAgICAgICAgICBjb25zdCBlID0geyBzb3VyY2U6IGIsIGhhbmRsZWQ6IGZhbHNlIH07XG4gICAgICAgICAgaWYgKG9yZ2luYWxDbGljaykge1xuICAgICAgICAgICAgb3JnaW5hbENsaWNrKGUpO1xuICAgICAgICAgICAgaWYgKGUuaGFuZGxlZCkge1xuICAgICAgICAgICAgICByZXNvbHZlKHsgbmFtZTogYi5uYW1lID8/IGIudGV4dCB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHBvcHV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gICAgICBjbG9zZTogKCkgPT4ge1xuICAgICAgICBkaWFsb2dSZWYuY29tcG9uZW50SW5zdGFuY2U/LmNsb3NlKCk7XG4gICAgICB9LFxuICAgIH07XG4gIH1cbn1cbiJdfQ==
|
@@ -115,7 +115,7 @@ class AXDialogService {
|
|
115
115
|
*/
|
116
116
|
alert(title, content, type = 'primary', orientation = 'horizontal', draggable) {
|
117
117
|
return new Promise((resolve) => {
|
118
|
-
const popup = this
|
118
|
+
const popup = this.open({
|
119
119
|
title,
|
120
120
|
type: type,
|
121
121
|
content,
|
@@ -144,7 +144,7 @@ class AXDialogService {
|
|
144
144
|
*/
|
145
145
|
confirm(title, content, type = 'primary', orientation = 'horizontal', draggable) {
|
146
146
|
return new Promise((resolve) => {
|
147
|
-
const popup = this
|
147
|
+
const popup = this.open({
|
148
148
|
title,
|
149
149
|
content,
|
150
150
|
type,
|
@@ -192,35 +192,37 @@ class AXDialogService {
|
|
192
192
|
*/
|
193
193
|
show(options) {
|
194
194
|
return new Promise((resolve) => {
|
195
|
-
const popup = this.#open(options);
|
196
195
|
options.orientation = options.orientation || 'horizontal';
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
}
|
207
|
-
else {
|
208
|
-
popup.close();
|
209
|
-
resolve({ name: b.name ?? b.text });
|
210
|
-
}
|
211
|
-
}
|
212
|
-
else if (resolve) {
|
213
|
-
popup.close();
|
196
|
+
options.icon = options.icon ?? this.detectIcon(options.type);
|
197
|
+
const popup = this.open(options);
|
198
|
+
options.buttons?.forEach((b) => {
|
199
|
+
const orginalClick = b.onClick;
|
200
|
+
b.onClick = () => {
|
201
|
+
const e = { source: b, handled: false };
|
202
|
+
if (orginalClick) {
|
203
|
+
orginalClick(e);
|
204
|
+
if (e.handled) {
|
214
205
|
resolve({ name: b.name ?? b.text });
|
215
206
|
}
|
216
207
|
else {
|
217
208
|
popup.close();
|
209
|
+
resolve({ name: b.name ?? b.text });
|
218
210
|
}
|
219
|
-
}
|
220
|
-
|
211
|
+
}
|
212
|
+
else if (resolve) {
|
213
|
+
popup.close();
|
214
|
+
resolve({ name: b.name ?? b.text });
|
215
|
+
}
|
216
|
+
else {
|
217
|
+
popup.close();
|
218
|
+
}
|
219
|
+
};
|
220
|
+
});
|
221
221
|
});
|
222
222
|
}
|
223
|
-
|
223
|
+
open(config) {
|
224
|
+
config.orientation = config.orientation || 'horizontal';
|
225
|
+
config.icon = config.icon ?? this.detectIcon(config.type);
|
224
226
|
const dialogRef = this.dialog.open(AXDialogComponent, {
|
225
227
|
data: config,
|
226
228
|
role: 'alertdialog',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-dialog.mjs","sources":["../../../../libs/components/dialog/src/lib/dialog.component.ts","../../../../libs/components/dialog/src/lib/dialog.component.html","../../../../libs/components/dialog/src/lib/dialog.service.ts","../../../../libs/components/dialog/src/lib/dialog.module.ts","../../../../libs/components/dialog/src/acorex-components-dialog.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, ViewEncapsulation } from '@angular/core';\nimport { AXDialogButtonItem, AXDialogData } from './dialog.class';\n\n/**\n * A dialog component that provides a modal interface for user interactions.\n * @category Components\n */\n@Component({\n selector: 'ax-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDialogComponent,\n },\n ],\n})\nexport class AXDialogComponent extends MXBaseComponent {\n /**\n * @ignore\n */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n protected data: AXDialogData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /**\n * @ignore\n */\n protected _handleButtonClick(button: AXDialogButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /**\n * @ignore\n */\n protected _hasAutoFocus(button: AXDialogButtonItem) {\n const result =\n button.autofocus || this.data.buttons.length == 1 || !this.data.buttons.some((c) => c.autofocus);\n return result;\n }\n\n /**\n * Closes the dialog.\n * @ignore\n */\n close() {\n this.dialogRef.close();\n }\n\n /**\n * @ignore\n */\n @HostBinding('attr.tabIndex') get tabIndex() {\n return '-1';\n }\n}\n","<div\n class=\"ax-dialog ax-{{ data.type }}-default ax-orientation-{{ data.orientation }}\"\n tabindex=\"-1\"\n cdkDrag\n cdkDragHandle\n [cdkDragDisabled]=\"!data.draggable\"\n>\n <div class=\"ax-dialog-content-wrapper\">\n @if (data.icon !== 'none') {\n <div class=\"ax-dialog-icon-side\">\n <i class=\"ax-dialog-icon {{ data.icon }}\"></i>\n </div>\n }\n <div class=\"ax-dialog-content-side\">\n <div class=\"ax-dialog-title\">{{ data.title }}</div>\n <div class=\"ax-dialog-content\">{{ data.content }}</div>\n </div>\n <div class=\"ax-dialog-dismiss-icon\">\n @if (data.closeButton) {\n <i class=\"ax-icon ax-icon-close\"></i>\n }\n </div>\n </div>\n <ax-footer>\n @for (button of data.buttons; let i = $index; track i) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"i\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </ax-footer>\n</div>\n","import { AXStyleColorType } from '@acorex/components/common';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { AXDialogConfig, AXDialogRef } from './dialog.class';\nimport { AXDialogComponent } from './dialog.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Injectable()\nexport class AXDialogService {\n private dialog: Dialog = inject(Dialog);\n\n private detectIcon(type) {\n let icon: string;\n switch (type) {\n case 'success':\n icon = 'ax-icon ax-icon-check';\n break;\n case 'danger':\n icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n icon = 'ax-icon ax-icon-warning';\n break;\n default:\n icon = 'ax-icon ax-icon-info';\n break;\n }\n return icon;\n }\n /**\n * Show an alert box with 'Okay' button.\n */\n alert(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<void> {\n return new Promise((resolve) => {\n const popup = this.#open({\n title,\n type: type,\n content,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve();\n }\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a confirm box with 'Okay' & 'Cancel' buttons.\n */\n\n confirm(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<{ result: boolean }> {\n return new Promise<{ result: boolean }>((resolve) => {\n const popup = this.#open({\n title,\n content,\n type,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: true });\n }\n },\n },\n {\n name: 'cancel',\n text: 'cancel',\n color: `ghost`,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n hotkey: {\n Escape: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a custom dialog box.\n */\n show(options: AXDialogConfig): Promise<{ name: string }> {\n return new Promise((resolve) => {\n const popup = this.#open(options);\n options.orientation = options.orientation || 'horizontal';\n (options.icon = options.icon ?? this.detectIcon(options.type)),\n options.buttons?.forEach((b) => {\n const orginalClick = b.onClick;\n b.onClick = () => {\n const e = { source: b, handled: false };\n if (orginalClick) {\n orginalClick(e);\n if (e.handled) {\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n resolve({ name: b.name ?? b.text });\n }\n } else if (resolve) {\n popup.close();\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n }\n };\n });\n });\n }\n\n #open(config: AXDialogConfig): AXDialogRef {\n const dialogRef = this.dialog.open(AXDialogComponent, {\n data: config,\n role: 'alertdialog',\n ariaModal: true,\n restoreFocus: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: true,\n disableClose: true,\n panelClass: ['ax-animate-bounceIn', 'ax-animate-faster'],\n });\n return {\n close: () => {\n dialogRef.componentInstance?.close();\n },\n };\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule, AXHotkeysService } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDialogComponent } from './dialog.component';\nimport { AXDialogService } from './dialog.service';\n\nconst COMPONENT = [AXDialogComponent];\nconst MODULES = [\n CommonModule,\n AXCommonModule,\n DragDropModule,\n A11yModule,\n AXButtonModule,\n AXDecoratorModule,\n AXLoadingModule,\n DialogModule,\n AXTranslationModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXDialogService, AXHotkeysService],\n})\nexport class AXDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":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A,CAAA;AAmBvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,aAFd,CAAC,eAAe,EAAE,gBAAgB,CAAC,YAFjC,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,CAAC,eAAe,EAAE,gBAAgB,CAAC;AAC/C,iBAAA;;;AC/BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-dialog.mjs","sources":["../../../../libs/components/dialog/src/lib/dialog.component.ts","../../../../libs/components/dialog/src/lib/dialog.component.html","../../../../libs/components/dialog/src/lib/dialog.service.ts","../../../../libs/components/dialog/src/lib/dialog.module.ts","../../../../libs/components/dialog/src/acorex-components-dialog.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, ViewEncapsulation } from '@angular/core';\nimport { AXDialogButtonItem, AXDialogData } from './dialog.class';\n\n/**\n * A dialog component that provides a modal interface for user interactions.\n * @category Components\n */\n@Component({\n selector: 'ax-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDialogComponent,\n },\n ],\n})\nexport class AXDialogComponent extends MXBaseComponent {\n /**\n * @ignore\n */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n protected data: AXDialogData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /**\n * @ignore\n */\n protected _handleButtonClick(button: AXDialogButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /**\n * @ignore\n */\n protected _hasAutoFocus(button: AXDialogButtonItem) {\n const result =\n button.autofocus || this.data.buttons.length == 1 || !this.data.buttons.some((c) => c.autofocus);\n return result;\n }\n\n /**\n * Closes the dialog.\n * @ignore\n */\n close() {\n this.dialogRef.close();\n }\n\n /**\n * @ignore\n */\n @HostBinding('attr.tabIndex') get tabIndex() {\n return '-1';\n }\n}\n","<div\n class=\"ax-dialog ax-{{ data.type }}-default ax-orientation-{{ data.orientation }}\"\n tabindex=\"-1\"\n cdkDrag\n cdkDragHandle\n [cdkDragDisabled]=\"!data.draggable\"\n>\n <div class=\"ax-dialog-content-wrapper\">\n @if (data.icon !== 'none') {\n <div class=\"ax-dialog-icon-side\">\n <i class=\"ax-dialog-icon {{ data.icon }}\"></i>\n </div>\n }\n <div class=\"ax-dialog-content-side\">\n <div class=\"ax-dialog-title\">{{ data.title }}</div>\n <div class=\"ax-dialog-content\">{{ data.content }}</div>\n </div>\n <div class=\"ax-dialog-dismiss-icon\">\n @if (data.closeButton) {\n <i class=\"ax-icon ax-icon-close\"></i>\n }\n </div>\n </div>\n <ax-footer>\n @for (button of data.buttons; let i = $index; track i) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"i\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </ax-footer>\n</div>\n","import { AXStyleColorType } from '@acorex/components/common';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { AXDialogConfig, AXDialogRef } from './dialog.class';\nimport { AXDialogComponent } from './dialog.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Injectable()\nexport class AXDialogService {\n private dialog: Dialog = inject(Dialog);\n\n private detectIcon(type) {\n let icon: string;\n switch (type) {\n case 'success':\n icon = 'ax-icon ax-icon-check';\n break;\n case 'danger':\n icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n icon = 'ax-icon ax-icon-warning';\n break;\n default:\n icon = 'ax-icon ax-icon-info';\n break;\n }\n return icon;\n }\n /**\n * Show an alert box with 'Okay' button.\n */\n alert(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<void> {\n return new Promise((resolve) => {\n const popup = this.open({\n title,\n type: type,\n content,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve();\n }\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a confirm box with 'Okay' & 'Cancel' buttons.\n */\n\n confirm(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<{ result: boolean }> {\n return new Promise<{ result: boolean }>((resolve) => {\n const popup = this.open({\n title,\n content,\n type,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: true });\n }\n },\n },\n {\n name: 'cancel',\n text: 'cancel',\n color: `ghost`,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n hotkey: {\n Escape: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a custom dialog box.\n */\n show(options: AXDialogConfig): Promise<{ name: string }> {\n return new Promise((resolve) => {\n options.orientation = options.orientation || 'horizontal';\n options.icon = options.icon ?? this.detectIcon(options.type);\n\n const popup = this.open(options);\n\n options.buttons?.forEach((b) => {\n const orginalClick = b.onClick;\n b.onClick = () => {\n const e = { source: b, handled: false };\n if (orginalClick) {\n orginalClick(e);\n if (e.handled) {\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n resolve({ name: b.name ?? b.text });\n }\n } else if (resolve) {\n popup.close();\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n }\n };\n });\n });\n }\n\n open(config: AXDialogConfig): AXDialogRef {\n config.orientation = config.orientation || 'horizontal';\n config.icon = config.icon ?? this.detectIcon(config.type);\n\n const dialogRef = this.dialog.open(AXDialogComponent, {\n data: config,\n role: 'alertdialog',\n ariaModal: true,\n restoreFocus: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: true,\n disableClose: true,\n panelClass: ['ax-animate-bounceIn', 'ax-animate-faster'],\n });\n return {\n close: () => {\n dialogRef.componentInstance?.close();\n },\n };\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule, AXHotkeysService } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDialogComponent } from './dialog.component';\nimport { AXDialogService } from './dialog.service';\n\nconst COMPONENT = [AXDialogComponent];\nconst MODULES = [\n CommonModule,\n AXCommonModule,\n DragDropModule,\n A11yModule,\n AXButtonModule,\n AXDecoratorModule,\n AXLoadingModule,\n DialogModule,\n AXTranslationModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXDialogService, AXHotkeysService],\n})\nexport class AXDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA;;;AAGG;AAcG,MAAO,iBAAkB,SAAQ,eAAe,CAAA;AAMpD;;AAEG;IACH,WAEY,CAAA,IAAkB,EACpB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE;QAHG,IAAI,CAAA,IAAA,GAAJ,IAAI;QACN,IAAS,CAAA,SAAA,GAAT,SAAS;;AAKnB;;AAEG;AACO,IAAA,kBAAkB,CAAC,MAA0B,EAAA;AACrD,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;;;AAItC;;AAEG;AACO,IAAA,aAAa,CAAC,MAA0B,EAAA;AAChD,QAAA,MAAM,MAAM,GACV,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;AAClG,QAAA,OAAO,MAAM;;AAGf;;;AAGG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;AAGxB;;AAEG;AACH,IAAA,IAAkC,QAAQ,GAAA;AACxC,QAAA,OAAO,IAAI;;AA/CF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,kBAUlB,WAAW,EAAA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