@acorex/components 18.12.40 → 18.12.42

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- (options.icon = options.icon ?? this.detectIcon(options.type)),
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) {
124
- resolve({ name: b.name ?? b.text });
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLnNlcn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yZWFrO1xuICAgIH1cbiAgICByZXR1cm4gaWNvbjtcbiAgfVxuICAvKipcbiAgICogIFNob3cgYW4gYWxlcnQgYm94IHdpdGggJ09rYXknIGJ1dHRvbi5cbiAgICovXG4gIGFsZXJ0KFxuICAgIHRpdGxlOiBzdHJpbmcsXG4gICAgY29udGVudDogc3RyaW5nLFxuICAgIHR5cGU6IEFYU3R5bGVDb2xvclR5cGUgPSAncHJpbWFyeScsXG4gICAgb3JpZW50YXRpb246ICdob3Jpem9udGFsJyB8ICd2ZXJ0aWNhbCcgPSAnaG9yaXpvbnRhbCcsXG4gICAgZHJhZ2dhYmxlPzogYm9vbGVhbixcbiAgKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICBjb25zdCBwb3B1cCA9IHRoaXMub3Blbih7XG4gICAgICAgIHRpdGxlLFxuICAgICAgICB0eXBlOiB0eXBlLFxuICAgICAgICBjb250ZW50LFxuICAgICAgICBpY29uOiB0aGlzLmRldGVjdEljb24odHlwZSksXG4gICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICBkcmFnZ2FibGUsXG4gICAgICAgIGJ1dHRvbnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnY29uZmlybScsXG4gICAgICAgICAgICB0ZXh0OiAnb2theScsXG4gICAgICAgICAgICBjb2xvcjogdHlwZSxcbiAgICAgICAgICAgIGF1dG9mb2N1czogdHJ1ZSxcbiAgICAgICAgICAgIG9uQ2xpY2s6ICgpID0+IHtcbiAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgaWYgKHJlc29sdmUpIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqICBTaG93IGEgY29uZmlybSBib3ggd2l0aCAnT2theScgJiAnQ2FuY2VsJyBidXR0b25zLlxuICAgKi9cblxuICBjb25maXJtKFxuICAgIHRpdGxlOiBzdHJpbmcsXG4gICAgY29udGVudDogc3RyaW5nLFxuICAgIHR5cGU6IEFYU3R5bGVDb2xvclR5cGUgPSAncHJpbWFyeScsXG4gICAgb3JpZW50YXRpb246ICdob3Jpem9udGFsJyB8ICd2ZXJ0aWNhbCcgPSAnaG9yaXpvbnRhbCcsXG4gICAgZHJhZ2dhYmxlPzogYm9vbGVhbixcbiAgKTogUHJvbWlzZTx7IHJlc3VsdDogYm9vbGVhbiB9PiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlPHsgcmVzdWx0OiBib29sZWFuIH0+KChyZXNvbHZlKSA9PiB7XG4gICAgICBjb25zdCBwb3B1cCA9IHRoaXMub3Blbih7XG4gICAgICAgIHRpdGxlLFxuICAgICAgICBjb250ZW50LFxuICAgICAgICB0eXBlLFxuICAgICAgICBpY29uOiB0aGlzLmRldGVjdEljb24odHlwZSksXG4gICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICBkcmFnZ2FibGUsXG4gICAgICAgIGJ1dHRvbnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnY29uZmlybScsXG4gICAgICAgICAgICB0ZXh0OiAnb2theScsXG4gICAgICAgICAgICBjb2xvcjogdHlwZSxcbiAgICAgICAgICAgIGF1dG9mb2N1czogdHJ1ZSxcbiAgICAgICAgICAgIG9uQ2xpY2s6ICgpID0+IHtcbiAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgaWYgKHJlc29sdmUpIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKHsgcmVzdWx0OiB0cnVlIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ2NhbmNlbCcsXG4gICAgICAgICAgICB0ZXh0OiAnY2FuY2VsJyxcbiAgICAgICAgICAgIGNvbG9yOiBgZ2hvc3RgLFxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoeyByZXN1bHQ6IGZhbHNlIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaG90a2V5OiB7XG4gICAgICAgICAgICAgIEVzY2FwZTogKCkgPT4ge1xuICAgICAgICAgICAgICAgIHBvcHVwLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgaWYgKHJlc29sdmUpIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmUoeyByZXN1bHQ6IGZhbHNlIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqICBTaG93IGEgY3VzdG9tIGRpYWxvZyBib3guXG4gICAqL1xuICBzaG93KG9wdGlvbnM6IEFYRGlhbG9nQ29uZmlnKTogUHJvbWlzZTx7IG5hbWU6IHN0cmluZyB9PiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICBjb25zdCBwb3B1cCA9IHRoaXMub3BlbihvcHRpb25zKTtcbiAgICAgIG9wdGlvbnMub3JpZW50YXRpb24gPSBvcHRpb25zLm9yaWVudGF0aW9uIHx8ICdob3Jpem9udGFsJztcbiAgICAgIChvcHRpb25zLmljb24gPSBvcHRpb25zLmljb24gPz8gdGhpcy5kZXRlY3RJY29uKG9wdGlvbnMudHlwZSkpLFxuICAgICAgICBvcHRpb25zLmJ1dHRvbnM/LmZvckVhY2goKGIpID0+IHtcbiAgICAgICAgICBjb25zdCBvcmdpbmFsQ2xpY2sgPSBiLm9uQ2xpY2s7XG4gICAgICAgICAgYi5vbkNsaWNrID0gKCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgZSA9IHsgc291cmNlOiBiLCBoYW5kbGVkOiBmYWxzZSB9O1xuICAgICAgICAgICAgaWYgKG9yZ2luYWxDbGljaykge1xuICAgICAgICAgICAgICBvcmdpbmFsQ2xpY2soZSk7XG4gICAgICAgICAgICAgIGlmIChlLmhhbmRsZWQpIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKHsgbmFtZTogYi5uYW1lID8/IGIudGV4dCB9KTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIHJlc29sdmUoeyBuYW1lOiBiLm5hbWUgPz8gYi50ZXh0IH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlc29sdmUpIHtcbiAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgcmVzb2x2ZSh7IG5hbWU6IGIubmFtZSA/PyBiLnRleHQgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgb3Blbihjb25maWc6IEFYRGlhbG9nQ29uZmlnKTogQVhEaWFsb2dSZWYge1xuICAgIGNvbnN0IGRpYWxvZ1JlZiA9IHRoaXMuZGlhbG9nLm9wZW4oQVhEaWFsb2dDb21wb25lbnQsIHtcbiAgICAgIGRhdGE6IGNvbmZpZyxcbiAgICAgIHJvbGU6ICdhbGVydGRpYWxvZycsXG4gICAgICBhcmlhTW9kYWw6IHRydWUsXG4gICAgICByZXN0b3JlRm9jdXM6IHRydWU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mV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgIGNvbnN0IHBvcHVwID0gdGhpcy5vcGVuKHtcbiAgICAgICAgdGl0bGUsXG4gICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgIGNvbnRlbnQsXG4gICAgICAgIGljb246IHRoaXMuZGV0ZWN0SWNvbih0eXBlKSxcbiAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgIGRyYWdnYWJsZSxcbiAgICAgICAgYnV0dG9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdjb25maXJtJyxcbiAgICAgICAgICAgIHRleHQ6ICdva2F5JyxcbiAgICAgICAgICAgIGNvbG9yOiB0eXBlLFxuICAgICAgICAgICAgYXV0b2ZvY3VzOiB0cnVlLFxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogIFNob3cgYSBjb25maXJtIGJveCB3aXRoICdPa2F5JyAmICdDYW5jZWwnIGJ1dHRvbnMuXG4gICAqL1xuXG4gIGNvbmZpcm0oXG4gICAgdGl0bGU6IHN0cmluZyxcbiAgICBjb250ZW50OiBzdHJpbmcsXG4gICAgdHlwZTogQVhTdHlsZUNvbG9yVHlwZSA9ICdwcmltYXJ5JyxcbiAgICBvcmllbnRhdGlvbjogJ2hvcml6b250YWwnIHwgJ3ZlcnRpY2FsJyA9ICdob3Jpem9udGFsJyxcbiAgICBkcmFnZ2FibGU/OiBib29sZWFuLFxuICApOiBQcm9taXNlPHsgcmVzdWx0OiBib29sZWFuIH0+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2U8eyByZXN1bHQ6IGJvb2xlYW4gfT4oKHJlc29sdmUpID0+IHtcbiAgICAgIGNvbnN0IHBvcHVwID0gdGhpcy5vcGVuKHtcbiAgICAgICAgdGl0bGUsXG4gICAgICAgIGNvbnRlbnQsXG4gICAgICAgIHR5cGUsXG4gICAgICAgIGljb246IHRoaXMuZGV0ZWN0SWNvbih0eXBlKSxcbiAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgIGRyYWdnYWJsZSxcbiAgICAgICAgYnV0dG9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdjb25maXJtJyxcbiAgICAgICAgICAgIHRleHQ6ICdva2F5JyxcbiAgICAgICAgICAgIGNvbG9yOiB0eXBlLFxuICAgICAgICAgICAgYXV0b2ZvY3VzOiB0cnVlLFxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICBwb3B1cC5jbG9zZSgpO1xuICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoeyByZXN1bHQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnY2FuY2VsJyxcbiAgICAgICAgICAgIHRleHQ6ICdjYW5jZWwnLFxuICAgICAgICAgICAgY29sb3I6IGBnaG9zdGAsXG4gICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICAgIHBvcHVwLmNsb3NlKCk7XG4gICAgICAgICAgICAgIGlmIChyZXNvbHZlKSB7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHJlc3VsdDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBob3RrZXk6IHtcbiAgICAgICAgICAgICAgRXNjYXBlOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgcG9wdXAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh7IHJlc3VsdDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogIFNob3cgYSBjdXN0b20gZGlhbG9nIGJveC5cbiAgICovXG4gIHNob3cob3B0aW9uczogQVhEaWFsb2dDb25maWcpOiBQcm9taXNlPHsgbmFtZTogc3RyaW5nIH0+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgIG9wdGlvbnMub3JpZW50YXRpb24gPSBvcHRpb25zLm9yaWVudGF0aW9uIHx8ICdob3Jpem9udGFsJztcbiAgICAgIG9wdGlvbnMuaWNvbiA9IG9wdGlvbnMuaWNvbiA/PyB0aGlzLmRldGVjdEljb24ob3B0aW9ucy50eXBlKTtcblxuICAgICAgY29uc3QgcG9wdXAgPSB0aGlzLm9wZW4ob3B0aW9ucyk7XG5cbiAgICAgIG9wdGlvbnMuYnV0dG9ucz8uZm9yRWFjaCgoYikgPT4ge1xuICAgICAgICBjb25zdCBvcmdpbmFsQ2xpY2sgPSBiLm9uQ2xpY2s7XG4gICAgICAgIGIub25DbGljayA9ICgpID0+IHtcbiAgICAgICAgICBjb25zdCBlID0geyBzb3VyY2U6IGIsIGhhbmRsZWQ6IGZhbHNlIH07XG4gICAgICAgICAgaWYgKG9yZ2luYWxDbGljaykge1xuICAgICAgICAgICAgb3JnaW5hbENsaWNrKGUpO1xuICAgICAgICAgICAgaWYgKGUuaGFuZGxlZCkge1xuICAgICAgICAgICAgICByZXNvbHZlKHsgbmFtZTogYi5uYW1lID8/IGIudGV4dCB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAg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IHJldHVybiB7XG4gICAgICBjbG9zZTogKCkgPT4ge1xuICAgICAgICBkaWFsb2dSZWYuY29tcG9uZW50SW5zdGFuY2U/LmNsb3NlKCk7XG4gICAgICB9LFxuICAgIH07XG4gIH1cbn1cbiJdfQ==
@@ -9,6 +9,7 @@ export const AXNotificationDefaultConfig = {
9
9
  timeOutProgress: true,
10
10
  closeButton: true,
11
11
  location: 'top-end',
12
+ limit: 3,
12
13
  };
13
14
  export function notificationConfig(config = {}) {
14
15
  const result = {
@@ -17,4 +18,4 @@ export function notificationConfig(config = {}) {
17
18
  };
18
19
  return result;
19
20
  }
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9ub3RpZmljYXRpb24vc3JjL2xpYi9ub3RpZmljYXRpb24uY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFVL0MsTUFBTSxDQUFDLE1BQU0sc0JBQXNCLEdBQUcsSUFBSSxjQUFjLENBQXVCLHdCQUF3QixFQUFFO0lBQ3ZHLFVBQVUsRUFBRSxNQUFNO0lBQ2xCLE9BQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQywyQkFBMkI7Q0FDM0MsQ0FBQyxDQUFDO0FBRUgsTUFBTSxDQUFDLE1BQU0sMkJBQTJCLEdBQXlCO0lBQy9ELEdBQUcsRUFBRSxDQUFDO0lBQ04sT0FBTyxFQUFFLElBQUk7SUFDYixlQUFlLEVBQUUsSUFBSTtJQUNyQixXQUFXLEVBQUUsSUFBSTtJQUNqQixRQUFRLEVBQUUsU0FBUztDQUNwQixDQUFDO0FBSUYsTUFBTSxVQUFVLGtCQUFrQixDQUFD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mZpZyA9IFBhcnRpYWw8QVhOb3RpZmljYXRpb25Db25maWc+O1xuXG5leHBvcnQgZnVuY3Rpb24gbm90aWZpY2F0aW9uQ29uZmlnKGNvbmZpZzogUGFydGlhbE5vdGlmaWNhdGlvbkNvbmZpZyA9IHt9KTogQVhOb3RpZmljYXRpb25Db25maWcge1xuICBjb25zdCByZXN1bHQgPSB7XG4gICAgLi4uQVhOb3RpZmljYXRpb25EZWZhdWx0Q29uZmlnLFxuICAgIC4uLmNvbmZpZyxcbiAgfTtcbiAgcmV0dXJuIHJlc3VsdDtcbn1cbiJdfQ==
@@ -1,6 +1,6 @@
1
1
  import { Dialog } from '@angular/cdk/dialog';
2
2
  import { GlobalPositionStrategy } from '@angular/cdk/overlay';
3
- import { Injectable, inject } from '@angular/core';
3
+ import { Injectable, effect, inject, signal } from '@angular/core';
4
4
  import { AXNotificationComponent } from './notification.component';
5
5
  import { AX_NOTIFICATION_CONFIG } from './notification.config';
6
6
  import * as i0 from "@angular/core";
@@ -8,12 +8,38 @@ export class AXNotificationService {
8
8
  constructor() {
9
9
  this.dialog = inject(Dialog);
10
10
  this.defaultConfig = inject(AX_NOTIFICATION_CONFIG);
11
+ this.activeNotifications = signal([]);
12
+ this.reservedNotifications = signal([]);
13
+ this.notificationCounterElement = signal(null);
14
+ this.moreNotificationsColor = signal('primary');
15
+ this.moreNotificationsLocation = signal('bottom-center');
16
+ this.reserveCounter = signal(0);
17
+ this.#effect = effect(() => {
18
+ if (this.defaultConfig.limit <= 0)
19
+ return;
20
+ this.handleShowReservedNotification();
21
+ this.handleShowReservedNotificationCounter();
22
+ this.handleReserveCounter();
23
+ }, { allowSignalWrites: true });
11
24
  }
25
+ #effect;
12
26
  show(config) {
13
27
  config = Object.assign({
14
28
  closeButton: true,
15
29
  location: this.defaultConfig.location,
16
30
  }, config);
31
+ this.moreNotificationsColor.set(config.color);
32
+ this.moreNotificationsLocation.set(config.location);
33
+ if (this.defaultConfig.limit > 0) {
34
+ if (this.activeNotifications().length >= this.defaultConfig.limit) {
35
+ this.reservedNotifications.update((value) => [...value, config]);
36
+ return {
37
+ close: () => {
38
+ //TODO close reserved notification
39
+ },
40
+ };
41
+ }
42
+ }
17
43
  const gap = this.defaultConfig.gap;
18
44
  const pos = this.getPosition(config.location) + gap + 'px';
19
45
  const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(), config.location, pos, gap);
@@ -29,34 +55,89 @@ export class AXNotificationService {
29
55
  panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],
30
56
  positionStrategy,
31
57
  });
32
- const toastRef = dialogRef.componentInstance;
58
+ this.activeNotifications.update((value) => [...value, dialogRef.id]);
59
+ const notificationRef = dialogRef.componentInstance;
33
60
  dialogRef.closed.subscribe(() => {
34
- this.reposition(toastRef.config.location, gap);
61
+ this.activeNotifications.update((value) => [...value].filter((dialogID) => dialogID !== dialogRef.id));
62
+ setTimeout(() => {
63
+ this.reposition(config.location, gap);
64
+ }, 0);
35
65
  });
36
66
  return {
37
67
  close: () => {
38
- toastRef.close();
68
+ notificationRef.close();
39
69
  },
40
70
  };
41
71
  }
42
72
  hideAll() {
43
73
  this.dialog.closeAll();
44
74
  }
45
- reposition(toastLocation, gap) {
75
+ handleShowReservedNotification() {
76
+ if (this.activeNotifications().length > this.defaultConfig.limit - 1)
77
+ return;
78
+ if (!this.reservedNotifications().length)
79
+ return;
80
+ this.show(this.reservedNotifications()[0]);
81
+ this.reservedNotifications.update((value) => {
82
+ const arr = [...value];
83
+ arr.shift();
84
+ return arr;
85
+ });
86
+ }
87
+ handleShowReservedNotificationCounter() {
88
+ if (this.reservedNotifications().length === this.reserveCounter())
89
+ return;
90
+ this.reserveCounter.set(this.reservedNotifications().length);
91
+ if (this.notificationCounterElement() !== null)
92
+ this.notificationCounterElement().close();
93
+ this.createReservedCounterToast();
94
+ }
95
+ handleReserveCounter() {
96
+ if (this.reserveCounter() !== 0)
97
+ return;
98
+ if (this.notificationCounterElement() === null)
99
+ return;
100
+ this.notificationCounterElement().close();
101
+ }
102
+ createReservedCounterToast() {
103
+ const opt = {
104
+ closeButton: false,
105
+ color: this.moreNotificationsColor(),
106
+ location: this.moreNotificationsLocation(),
107
+ title: `And ${this.reserveCounter()} more...`,
108
+ timeOutProgress: false,
109
+ };
110
+ const gap = this.defaultConfig.gap;
111
+ const pos = this.getPosition(opt.location) + gap + 'px';
112
+ const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(), opt.location, pos, gap);
113
+ const dialogRef = this.dialog.open(AXNotificationComponent, {
114
+ data: opt,
115
+ autoFocus: '__no_element__',
116
+ restoreFocus: true,
117
+ role: 'dialog',
118
+ ariaModal: true,
119
+ closeOnNavigation: true,
120
+ closeOnDestroy: true,
121
+ hasBackdrop: false,
122
+ panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],
123
+ positionStrategy,
124
+ });
125
+ this.notificationCounterElement.set(dialogRef.componentInstance);
126
+ }
127
+ reposition(notificationLocation, gap) {
46
128
  const list = this.dialog.openDialogs
47
129
  .map((c) => c.componentInstance)
48
- .filter((c) => c.config?.location == toastLocation);
130
+ .filter((c) => c.config?.location == notificationLocation);
49
131
  list.forEach((element, index) => {
50
- const pos = this.getRepositionPosition(index, gap, list, toastLocation);
51
- this.getPositionStrategy(element.dialogRef.config.positionStrategy, toastLocation, pos, gap).apply();
132
+ const pos = this.getRepositionPosition(index, gap, list, notificationLocation);
133
+ this.getPositionStrategy(element.dialogRef.config.positionStrategy, notificationLocation, pos, gap).apply();
52
134
  });
53
135
  }
54
- getRepositionPosition(index, gap, list, toastLocation) {
55
- if (index === 0) {
136
+ getRepositionPosition(index, gap, list, notificationLocation) {
137
+ if (index === 0)
56
138
  return gap + 'px';
57
- }
58
139
  const previouseElement = list[index - 1];
59
- if (toastLocation.split('-')[0] == 'bottom') {
140
+ if (notificationLocation.split('-')[0] == 'bottom') {
60
141
  return window.innerHeight - previouseElement.getHostElement().offsetTop + gap + 'px';
61
142
  }
62
143
  return (previouseElement.getHostElement().offsetTop +
@@ -109,4 +190,4 @@ export class AXNotificationService {
109
190
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXNotificationService, decorators: [{
110
191
  type: Injectable
111
192
  }] });
112
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvbm90aWZpY2F0aW9uL3NyYy9saWIvbm90aWZpY2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQzlELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBS25ELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ25FLE9BQU8sRUFBd0Isc0JBQXNCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQzs7QUFHckYsTUFBTSxPQUFPLHFCQUFxQjtJQURsQztRQUVVLFdBQU0sR0FBVyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDaEMsa0JBQWEsR0FBeUIsTUFBTSxDQUFDLHNCQUFzQixDQUFDLENBQUM7S0FvSTlFO0lBbElDLElBQUksQ0FBQyxNQUFtQztRQUN0QyxNQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FDcEI7WUFDRSxXQUFXLEVBQUUsSUFBSTtZQUNqQixRQUFRLEVBQUUsSUFBSSxDQUFDLGFBQWEsQ0FBQyxRQUFRO1NBQ3RDLEVBQ0QsTUF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LFxuICAgIHBvczogc3RyaW5nLFxuICAgIGdhcDogbnVtYmVyLFxuICApIHtcbiAgICBzd2l0Y2ggKGxvY2F0aW9uKSB7XG4gICAgICBjYXNlICdib3R0b20tY2VudGVyJzpcbiAgICAgICAgcmV0dXJuIHBvc2l0aW9uU3RyYXRlZ3kuYm90dG9tKHBvcykuY2VudGVySG9yaXpvbnRhbGx5KCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnYm90dG9tLWVuZCc6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LmJvdHRvbShwb3MpLnJpZ2h0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2JvdHRvbS1zdGFydCc6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LmJvdHRvbShwb3MpLmxlZnQoZ2FwICsgJ3B4Jyk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAndG9wLWNlbnRlcic6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LnRvcChwb3MpLmNlbnRlckhvcml6b250YWxseSgpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3RvcC1lbmQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5yaWdodChnYXAgKyAncHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICd0b3Atc3RhcnQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NlbnRlci1zdGFydCc6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LmNlbnRlclZlcnRpY2FsbHkoKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NlbnRlci1lbmQnOlxuICAgICAg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biAgICBwb3M6IHN0cmluZyxcbiAgICBnYXA6IG51bWJlcixcbiAgKSB7XG4gICAgc3dpdGNoIChsb2NhdGlvbikge1xuICAgICAgY2FzZSAnYm90dG9tLWNlbnRlcic6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LmJvdHRvbShwb3MpLmNlbnRlckhvcml6b250YWxseSgpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2JvdHRvbS1lbmQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS5ib3R0b20ocG9zKS5yaWdodChnYXAgKyAncHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdib3R0b20tc3RhcnQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS5ib3R0b20ocG9zKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3RvcC1jZW50ZXInOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5jZW50ZXJIb3Jpem9udGFsbHkoKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICd0b3AtZW5kJzpcbiAgICAgICAgcmV0dXJuIHBvc2l0aW9uU3RyYXRlZ3kudG9wKHBvcykucmlnaHQoZ2FwICsgJ3B4Jyk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAndG9wLXN0YXJ0JzpcbiAgICAgICAgcmV0dXJuIHBvc2l0aW9uU3RyYXRlZ3kudG9wKHBvcykubGVmdChnYXAgKyAncHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdjZW50ZXItc3RhcnQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS5jZW50ZXJWZXJ0aWNhbGx5KCkubGVmdChnYXAgKyAncHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdjZW50ZXItZW5kJzpcbiAgICAgICAgcmV0dXJuIHBvc2l0aW9uU3RyYXRlZ3kuY2VudGVyVmVydGljYWxseSgpLnJpZ2h0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICB9XG4gIH1cbn1cbiJdfQ==
@@ -23,4 +23,4 @@ export function toastConfig(config = {}) {
23
23
  };
24
24
  return result;
25
25
  }
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3QuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3RvYXN0L3NyYy9saWIvdG9hc3QuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFVaEMsTUFBTSxDQUFDLE1BQU0sZUFBZSxHQUFHLElBQUksY0FBYyxDQUFnQixpQkFBaUIsRUFBRTtJQUNsRixVQUFVLEVBQUUsTUFBTTtJQUNsQixPQUFPLEVBQUUsR0FBRyxFQUFFO1FBQ1osTUFBTSxNQUFNLEdBQUcsTUFBTSxDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFDeEMsR0FBRyxDQUFDLE1BQU0sRUFBRSxjQUFjLEVBQUUsZUFBZSxDQUFDLENBQUM7UUFDN0MsT0FBTyxvQkFBb0IsQ0FBQztJQUM5QixDQUFDO0NBQ0YsQ0FBQyxDQUFDO0FBRUgsTUFBTSxDQUFDLE1BQU0sb0JBQW9CLEdBQWtCO0lBQ2pELEdBQUcsRUFBRSxDQUFDO0lBQ04sT0FBTyxFQUFFLElBQUk7SUFDYixlQUFlLEVBQUUs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XI7XG59XG5cbmV4cG9ydCBjb25zdCBBWF9UT0FTVF9DT05GSUcgPSBuZXcgSW5qZWN0aW9uVG9rZW48QVhUb2FzdENvbmZpZz4oJ0FYX1RPQVNUX0NPTkZJRycsIHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxuICBmYWN0b3J5OiAoKSA9PiB7XG4gICAgY29uc3QgZ2xvYmFsID0gaW5qZWN0KEFYX0dMT0JBTF9DT05GSUcpO1xuICAgIHNldChnbG9iYWwsICdsYXlvdXQudG9hc3QnLCBBWF9UT0FTVF9DT05GSUcpO1xuICAgIHJldHVybiBBWFRvYXN0RGVmYXVsdENvbmZpZztcbiAgfSxcbn0pO1xuXG5leHBvcnQgY29uc3QgQVhUb2FzdERlZmF1bHRDb25maWc6IEFYVG9hc3RDb25maWcgPSB7XG4gIGdhcDogNSxcbiAgdGltZU91dDogMjUwMCxcbiAgdGltZU91dFByb2dyZXNzOiB0cnVlLFxuICBsb2NhdGlvbjogJ2JvdHRvbS1jZW50ZXInLFxuICBsaW1pdDogMyxcbn07XG5cbmV4cG9ydCB0eXBlIFBhcnRpYWxUb2FzdENvbmZpZyA9IFBhcnRpYWw8QVhUb2FzdENvbmZpZz47XG5cbmV4cG9ydCBmdW5jdGlvbiB0b2FzdENvbmZpZyhjb25maWc6IFBhcnRpYWxUb2FzdENvbmZpZyA9IHt9KTogQVhUb2FzdENvbmZpZyB7XG4gIGNvbnN0IHJlc3VsdCA9IHtcbiAgICAuLi5BWFRvYXN0RGVmYXVsdENvbmZpZyxcbiAgICAuLi5jb25maWcsXG4gIH07XG4gIHJldHVybiByZXN1bHQ7XG59XG4iXX0=
@@ -13,34 +13,19 @@ export class AXToastService {
13
13
  this.activeToasts = signal([]);
14
14
  this.reservedToasts = signal([]);
15
15
  this.toastCounterElement = signal(null);
16
- this.reserveCounter = signal(0);
17
16
  this.moreToastsColor = signal('primary');
17
+ this.moreToastsLocation = signal('bottom-center');
18
+ this.reserveCounter = signal(0);
19
+ this.#effect = effect(() => {
20
+ if (this.defaultConfig.limit <= 0)
21
+ return;
22
+ this.handleShowReservedToast();
23
+ this.handleShowReservedToastCounter();
24
+ this.handleReserveCounter();
25
+ }, { allowSignalWrites: true });
18
26
  this.scrollStrategy = this.scrollStrategyOptions.noop();
19
- if (this.defaultConfig.limit) {
20
- effect(() => {
21
- if (this.activeToasts().length <= this.defaultConfig.limit - 1 && this.reservedToasts().length) {
22
- this.show(this.reservedToasts()[0]);
23
- this.reservedToasts.update((value) => {
24
- const arr = [...value];
25
- arr.shift();
26
- return arr;
27
- });
28
- }
29
- if (this.reservedToasts().length !== this.reserveCounter()) {
30
- this.reserveCounter.set(this.reservedToasts().length);
31
- if (this.toastCounterElement() !== null) {
32
- this.toastCounterElement().close();
33
- }
34
- this.createReservedCounterToast();
35
- }
36
- if (this.reserveCounter() === 0) {
37
- if (this.toastCounterElement() !== null) {
38
- this.toastCounterElement().close();
39
- }
40
- }
41
- }, { allowSignalWrites: true });
42
- }
43
27
  }
28
+ #effect;
44
29
  primary(content) {
45
30
  this.show({
46
31
  timeOut: this.defaultConfig.timeOut,
@@ -82,12 +67,15 @@ export class AXToastService {
82
67
  location: this.defaultConfig.location ?? 'bottom-center',
83
68
  }, config);
84
69
  this.moreToastsColor.set(opt.color);
85
- if (this.defaultConfig.limit) {
70
+ this.moreToastsLocation.set(opt.location);
71
+ if (this.defaultConfig.limit > 0) {
86
72
  if (this.activeToasts().length >= this.defaultConfig.limit) {
87
- this.reservedToasts.update((value) => {
88
- return [...value, opt];
89
- });
90
- return;
73
+ this.reservedToasts.update((value) => [...value, opt]);
74
+ return {
75
+ close: () => {
76
+ //TODO close reserved toast
77
+ },
78
+ };
91
79
  }
92
80
  }
93
81
  const gap = this.defaultConfig.gap;
@@ -106,14 +94,10 @@ export class AXToastService {
106
94
  positionStrategy,
107
95
  scrollStrategy: this.scrollStrategy,
108
96
  });
109
- this.activeToasts.update((value) => {
110
- return [...value, dialogRef.id];
111
- });
97
+ this.activeToasts.update((value) => [...value, dialogRef.id]);
112
98
  const toastRef = dialogRef.componentInstance;
113
99
  dialogRef.closed.subscribe(() => {
114
- this.activeToasts.update((value) => {
115
- return [...value].filter((dialogID) => dialogID !== dialogRef.id);
116
- });
100
+ this.activeToasts.update((value) => [...value].filter((dialogID) => dialogID !== dialogRef.id));
117
101
  setTimeout(() => {
118
102
  this.reposition(opt.location, gap);
119
103
  }, 0);
@@ -127,11 +111,38 @@ export class AXToastService {
127
111
  hideAll() {
128
112
  this.dialog.closeAll();
129
113
  }
114
+ handleShowReservedToast() {
115
+ if (this.activeToasts().length > this.defaultConfig.limit - 1)
116
+ return;
117
+ if (!this.reservedToasts().length)
118
+ return;
119
+ this.show(this.reservedToasts()[0]);
120
+ this.reservedToasts.update((value) => {
121
+ const toasts = [...value];
122
+ toasts.shift();
123
+ return toasts;
124
+ });
125
+ }
126
+ handleShowReservedToastCounter() {
127
+ if (this.reservedToasts().length === this.reserveCounter())
128
+ return;
129
+ this.reserveCounter.set(this.reservedToasts().length);
130
+ if (this.toastCounterElement() !== null)
131
+ this.toastCounterElement().close();
132
+ this.createReservedCounterToast();
133
+ }
134
+ handleReserveCounter() {
135
+ if (this.reserveCounter() !== 0)
136
+ return;
137
+ if (this.toastCounterElement() === null)
138
+ return;
139
+ this.toastCounterElement().close();
140
+ }
130
141
  createReservedCounterToast() {
131
142
  const opt = {
132
143
  closeButton: false,
133
144
  color: this.moreToastsColor(),
134
- location: 'bottom-center',
145
+ location: this.moreToastsLocation(),
135
146
  title: `And ${this.reserveCounter()} more...`,
136
147
  timeOutProgress: false,
137
148
  };
@@ -164,9 +175,8 @@ export class AXToastService {
164
175
  });
165
176
  }
166
177
  getRepositionPosition(index, gap, list, toastLocation) {
167
- if (index === 0) {
178
+ if (index === 0)
168
179
  return gap + 'px';
169
- }
170
180
  const previouseElement = list[index - 1];
171
181
  if (toastLocation.split('-')[0] == 'bottom') {
172
182
  return window.innerHeight - previouseElement.getHostElement().offsetTop + gap + 'px';
@@ -221,4 +231,4 @@ export class AXToastService {
221
231
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXToastService, decorators: [{
222
232
  type: Injectable
223
233
  }], ctorParameters: () => [{ type: i1.ScrollStrategyOptions }] });
224
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3Quc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy90b2FzdC9zcmMvbGliL3RvYXN0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxzQkFBc0IsRUFBa0IscUJBQXFCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRyxPQUFPLEVBQUUsVUFBVSxFQUFrQixNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUVuRixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNyRCxPQUFPLEVBQWlCLGVBQWUsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7QUFHaEUsTUFBTSxPQUFPLGNBQWM7SUFXekIsWUFBNkIscUJBQTRDO1FBQTVDLDBCQUFxQixHQUFyQixxQkFBcUIsQ0FBdUI7UUFWakUsV0FBTSxHQUFXLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUNoQyxrQkFBYSxHQUFrQixNQUFNLENBQUMsZUFBZSxDQUFDLENBQUM7UUFDdkQsaUJBQVksR0FBNkIsTUFBTSxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBQ3BELG1CQUFjLEdBQTJDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0F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xuICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZVRvYXN0cygpLmxlbmd0aCA8PSB0aGlzLmRlZmF1bHRDb25maWcubGltaXQgLSAxICYmIHRoaXMucmVzZXJ2ZWRUb2FzdHMoKS5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRoaXMuc2hvdyh0aGlzLnJlc2VydmVkVG9hc3RzKClbMF0pO1xuICAgICAgICAgICAgdGhpcy5yZXNlcnZlZFRvYXN0cy51cGRhdGUoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IGFyciA9IFsuLi52YWx1ZV07XG4gICAgICAgICAgICAgIGFyci5zaGlmdCgpO1xuICAgICAgICAgICAgICByZXR1cm4gYXJyO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh0aGlzLnJlc2VydmVkVG9hc3RzKCkubGVuZ3RoICE9PSB0aGlzLnJlc2VydmVDb3VudGVyKCkpIHtcbiAgICAgICAgICAgIHRoaXMucmVzZXJ2ZUNvdW50ZXIuc2V0KHRoaXMucmVzZXJ2ZWRUb2FzdHMoKS5sZW5ndGgpO1xuICAgICAgICAgICAgaWYgKHRoaXMudG9hc3RDb3VudGVyRWxlbWVudCgpICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHRoaXMudG9hc3RDb3VudGVyRWxlbWVudCgpLmNsb3NlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmNyZWF0ZVJlc2VydmVkQ291bnRlclRvYXN0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh0aGlzLnJlc2VydmVDb3VudGVyKCkgPT09IDApIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRvYXN0Q291bnRlckVsZW1lbnQoKSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aGlzLnRvYXN0Q291bnRlckVsZW1lbnQoKS5jbG9zZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgeyBhbGxvd1NpZ25hbFdyaXRlczogdHJ1ZSB9LFxuICAgICAgKTtcbiAgICB9XG4gIH1cblxuICBwcmltYXJ5KGNvbnRlbnQ6IHN0cmluZykge1xuICAgIHRoaXMuc2hvdyh7XG4gICAgICB0aW1lT3V0OiB0aGlzLmRlZmF1bHRDb25maWcudGltZU91dCxcbiAgICAgIGNvbG9yOiAncHJpbWFyeScsXG4gICAgICBjb250ZW50OiBjb250ZW50LFxuICAgIH0pO1xuICB9XG4gIHNlY29uZGFyeShjb250ZW50OiBzdHJpbmcpIHtcbiAgICB0aGlzLnNob3coe1xuICAgICAgdGltZU91dDogdGhpcy5kZWZhdWx0Q29uZmlnLnRpbWVPdXQsXG4gICAgICBjb2xvcjogJ3NlY29uZGFyeScsXG4gICAgICBjb250ZW50OiBjb250ZW50LFxuICAgIH0pO1xuICB9XG4gIHN1Y2Nlc3MoY29udGVudDogc3RyaW5nKSB7XG4gICAgdGhpcy5zaG93KHtcbiAgICAgIHRpbWVPdXQ6IHRoaXMuZGVmYXVsdENvbmZpZy50aW1lT3V0LFxuICAgICAgY29sb3I6ICdzdWNjZXNzJyxcbiAgICAgIGNvbnRlbnQ6IGNvbnRlbnQsXG4gICAgfSk7XG4gIH1cbiAgd2FybmluZyhjb250ZW50OiBzdHJpbmcpIHtcbiAgICB0aGlzLnNob3coe1xuICAgICAgdGltZU91dDogdGhpcy5kZWZhdWx0Q29uZmlnLnRpbWVPdXQsXG4gICAgICBjb2xvcjogJ3dhcm5pbmcnLFxuICAgICAgY29udGVudDogY29udGVudCxcbiAgICB9KTtcbiAgfVxuICBkYW5nZXIoY29udGVudDogc3RyaW5nKSB7XG4gICAgdGhpcy5zaG93KHtcbiAgICAgIHRpbWVPdXQ6IHRoaXMuZGVmYXVsdENvbmZpZy50aW1lT3V0LFxuICAgICAgY29sb3I6ICdkYW5nZXInLFxuICAgICAgY29udGVudDogY29udGVudCxcbiAgICB9KTtcbiAgfVxuXG4gIHNob3co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AgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LnRvcChwb3MpLmNlbnRlckhvcml6b250YWxseSgpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3RvcC1lbmQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5yaWdodChnYXAgKyAncHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICd0b3Atc3RhcnQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NlbnRlci1zdGFydCc6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LmNlbnRlclZlcnRpY2FsbHkoKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NlbnRlci1lbmQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS5jZW50ZXJWZXJ0aWNhbGx5KCkucmlnaHQoZ2FwICsgJ3B4Jyk7XG4gICAgICAgIGJyZWFrO1xuICAgIH1cbiAgfVxufVxuIl19
234
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3Quc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy90b2FzdC9zcmMvbGliL3RvYXN0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxzQkFBc0IsRUFBa0IscUJBQXFCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0s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SxcbiAgKTtcblxuICBwcmltYXJ5KGNvbnRlbnQ6IHN0cmluZykge1xuICAgIHRoaXMuc2hvdyh7XG4gICAgICB0aW1lT3V0OiB0aGlzLmRlZmF1bHRDb25maWcudGltZU91dCxcbiAgICAgIGNvbG9yOiAncHJpbWFyeScsXG4gICAgICBjb250ZW50OiBjb250ZW50LFxuICAgIH0pO1xuICB9XG4gIHNlY29uZGFyeShjb250ZW50OiBzdHJpbmcpIHtcbiAgICB0aGlzLnNob3coe1xuICAgICAgdGltZU91dDogdGhpcy5kZWZhdWx0Q29uZmlnLnRpbWVPdXQsXG4gICAgICBjb2xvcjogJ3NlY29uZGFyeScsXG4gICAgICBjb250ZW50OiBjb250ZW50LFxuICAgIH0pO1xuICB9XG4gIHN1Y2Nlc3MoY29udGVudDogc3RyaW5nKSB7XG4gICAgdGhpcy5zaG93KHtcbiAgICAgIHRpbWVPdXQ6IHRoaXMuZGVmYXVsdENvbmZpZy50aW1lT3V0LFxuICAgICAgY29sb3I6ICdzdWNjZXNzJyxcbiAgICAgIGNvbnRlbnQ6IGNvbnRlbnQsXG4gICAgfSk7XG4gIH1cbiAgd2FybmluZyhjb250ZW50OiBzdHJpbmcpIHtcbiAgICB0aGlzLnNob3coe1xuICAgICAgdGltZU91dDogdGhpcy5kZWZhdWx0Q29uZmlnLnRpbWVPdXQsXG4gICAgICBjb2xvcjogJ3dhcm5pbmcnLFxuICAgICAgY29udGVudDogY29udGVudCxcbiAgICB9KTtcbiAgfVxuICBkYW5nZXIoY29udGVudDogc3RyaW5nKSB7XG4gICAgdGhpcy5zaG93KHtcbiAgICAgIHRpbWVPdXQ6IHRoaXMuZGVmYXVsdENvbmZpZy50aW1lT3V0LFxuICAgICAgY29sb3I6ICdkYW5nZXInLFxuICAgICAgY29udGVudDogY29udGVudCxcbiAgICB9KTtcbiAgfVxuXG4gIHNob3coY29uZmlnOiBBWFRvYXN0RGlzcGxheUNvbmZpZyk6IEFYVG9hc3RSZWYge1xuICAgIGNvbnN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WNlbnRlcic6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LnRvcChwb3MpLmNlbnRlckhvcml6b250YWxseSgpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3RvcC1lbmQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5yaWdodChnYXAgKyAncHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICd0b3Atc3RhcnQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS50b3AocG9zKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NlbnRlci1zdGFydCc6XG4gICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5LmNlbnRlclZlcnRpY2FsbHkoKS5sZWZ0KGdhcCArICdweCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NlbnRlci1lbmQnOlxuICAgICAgICByZXR1cm4gcG9zaXRpb25TdHJhdGVneS5jZW50ZXJWZXJ0aWNhbGx5KCkucmlnaHQoZ2FwICsgJ3B4Jyk7XG4gICAgICAgIGJyZWFrO1xuICAgIH1cbiAgfVxufVxuIl19
@@ -274,7 +274,13 @@ const AX_PLACEMENT_MAP = {
274
274
  },
275
275
  'bottom-start': {
276
276
  origin: AX_PLACEMENT_BOTTOM_START,
277
- alts: [AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_TOP_START, AX_PLACEMENT_TOP_END],
277
+ alts: [
278
+ AX_PLACEMENT_BOTTOM_END,
279
+ AX_PLACEMENT_TOP_START,
280
+ AX_PLACEMENT_TOP_END,
281
+ AX_PLACEMENT_START,
282
+ AX_PLACEMENT_END,
283
+ ],
278
284
  },
279
285
  'bottom-end': {
280
286
  origin: AX_PLACEMENT_BOTTOM_END,