@genesislcap/foundation-errors 14.38.0 → 14.40.0

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.
@@ -1,12 +1,20 @@
1
- import { ErrorNotification, ErrorNotificationType } from '../types';
1
+ import { ErrorNotification, ErrorNotificationPosition, ErrorNotificationType } from '../types';
2
2
  /**
3
3
  * NotificationBuilder to build ErrorNotification
4
4
  * @public
5
5
  */
6
6
  export declare class NotificationBuilder {
7
+ private position;
7
8
  private autoClose;
8
9
  private closeTimeout;
9
10
  private type;
11
+ /**
12
+ * Add position to notification
13
+ * @public
14
+ * @param position - {@link ErrorNotificationPosition}
15
+ * @returns
16
+ */
17
+ withPosition(position: ErrorNotificationPosition): NotificationBuilder;
10
18
  /**
11
19
  * Add auto close to notification
12
20
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"notification-builder.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEpE;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,IAAI,CAAwB;IAEpC;;;;;OAKG;IACI,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,mBAAmB;IAK7D;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,mBAAmB;IAKlE;;;;;OAKG;IACI,QAAQ,CAAC,IAAI,EAAE,qBAAqB,GAAG,mBAAmB;IAKjE;;;OAGG;IACI,KAAK,IAAI,iBAAiB;CAalC;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,mBAAgD,CAAC"}
1
+ {"version":3,"file":"notification-builder.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE/F;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,IAAI,CAAwB;IAEpC;;;;;OAKG;IACI,YAAY,CAAC,QAAQ,EAAE,yBAAyB,GAAG,mBAAmB;IAK7E;;;;;OAKG;IACI,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,mBAAmB;IAK7D;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,mBAAmB;IAKlE;;;;;OAKG;IACI,QAAQ,CAAC,IAAI,EAAE,qBAAqB,GAAG,mBAAmB;IAKjE;;;OAGG;IACI,KAAK,IAAI,iBAAiB;CAgBlC;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,mBAAgD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"notification-launcher.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;KAMK;AACL,eAAO,MAAM,gBAAgB,UAAW,cAAc,WAAW,MAAM,KAAG,IAmCzE,CAAC"}
1
+ {"version":3,"file":"notification-launcher.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;KAMK;AACL,eAAO,MAAM,gBAAgB,UAAW,cAAc,WAAW,MAAM,KAAG,IAkDzE,CAAC"}
@@ -11,11 +11,17 @@ export declare enum ErrorBoundaryEvent {
11
11
  * type for error notification type
12
12
  */
13
13
  export type ErrorNotificationType = 'warning' | 'success';
14
+ /**
15
+ * @public
16
+ * type for error notification position
17
+ */
18
+ export type ErrorNotificationPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
14
19
  /**
15
20
  * Interface for Error Notification configuration
16
21
  * @public
17
22
  */
18
23
  export interface ErrorNotification {
24
+ readonly position?: ErrorNotificationPosition;
19
25
  readonly type?: ErrorNotificationType;
20
26
  readonly autoClose?: boolean;
21
27
  readonly closeTimeout?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,oBAAoB,yBAAyB;CAC9C;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACrD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAC7C,QAAQ,CAAC,iBAAiB,CA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AED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB;;WAEG;QACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;QAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC/B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC"}
@@ -3,6 +3,16 @@
3
3
  * @public
4
4
  */
5
5
  export class NotificationBuilder {
6
+ /**
7
+ * Add position to notification
8
+ * @public
9
+ * @param position - {@link ErrorNotificationPosition}
10
+ * @returns
11
+ */
12
+ withPosition(position) {
13
+ this.position = position;
14
+ return this;
15
+ }
6
16
  /**
7
17
  * Add auto close to notification
8
18
  * @public
@@ -39,6 +49,9 @@ export class NotificationBuilder {
39
49
  */
40
50
  build() {
41
51
  let notification = {};
52
+ if (this.position) {
53
+ notification = Object.assign({ position: this.position }, notification);
54
+ }
42
55
  if (this.autoClose) {
43
56
  notification = Object.assign({ autoClose: this.autoClose }, notification);
44
57
  }
@@ -7,30 +7,45 @@ import { getErrorContainer } from '../error-util';
7
7
  * @returns
8
8
  * */
9
9
  export const showNotification = (error, tagName) => {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
11
11
  const tagPrefix = tagName.split('-')[0];
12
12
  const container = getErrorContainer('notify-container', tagName);
13
13
  if (container) {
14
14
  container.style.position = 'fixed';
15
- container.style.top = '0';
16
- container.style.right = '0';
15
+ switch ((_b = (_a = error === null || error === void 0 ? void 0 : error.config) === null || _a === void 0 ? void 0 : _a.notification) === null || _b === void 0 ? void 0 : _b.position) {
16
+ case 'top-left':
17
+ container.style.top = '0';
18
+ container.style.left = '0';
19
+ break;
20
+ case 'bottom-left':
21
+ container.style.bottom = '0';
22
+ container.style.left = '0';
23
+ break;
24
+ case 'bottom-right':
25
+ container.style.bottom = '0';
26
+ container.style.right = '0';
27
+ break;
28
+ default:
29
+ container.style.top = '0';
30
+ container.style.right = '0';
31
+ }
17
32
  }
18
33
  const toastNotify = document.createElement(`${tagPrefix}-toast`);
19
34
  const errorTitle = document.createElement('div');
20
35
  errorTitle.setAttribute('slot', 'top');
21
- errorTitle.textContent = (_a = error.title) !== null && _a !== void 0 ? _a : 'Error';
36
+ errorTitle.textContent = (_c = error.title) !== null && _c !== void 0 ? _c : 'Error';
22
37
  const errorDetails = document.createElement('div');
23
38
  errorDetails.setAttribute('slot', 'content');
24
39
  errorDetails.textContent = (error === null || error === void 0 ? void 0 : error.errorDetails) || '';
25
40
  const errorDate = document.createElement('div');
26
41
  errorDate.setAttribute('slot', 'date');
27
42
  errorDate.textContent = new Date().toLocaleTimeString();
28
- toastNotify.setAttribute('notify', ((_c = (_b = error === null || error === void 0 ? void 0 : error.config) === null || _b === void 0 ? void 0 : _b.notification) === null || _c === void 0 ? void 0 : _c.type) || '');
29
- ((_e = (_d = error === null || error === void 0 ? void 0 : error.config) === null || _d === void 0 ? void 0 : _d.notification) === null || _e === void 0 ? void 0 : _e.autoClose)
30
- ? toastNotify.setAttribute('auto-close', `${(_g = (_f = error === null || error === void 0 ? void 0 : error.config) === null || _f === void 0 ? void 0 : _f.notification) === null || _g === void 0 ? void 0 : _g.autoClose}`)
43
+ toastNotify.setAttribute('notify', ((_e = (_d = error === null || error === void 0 ? void 0 : error.config) === null || _d === void 0 ? void 0 : _d.notification) === null || _e === void 0 ? void 0 : _e.type) || '');
44
+ ((_g = (_f = error === null || error === void 0 ? void 0 : error.config) === null || _f === void 0 ? void 0 : _f.notification) === null || _g === void 0 ? void 0 : _g.autoClose)
45
+ ? toastNotify.setAttribute('auto-close', `${(_j = (_h = error === null || error === void 0 ? void 0 : error.config) === null || _h === void 0 ? void 0 : _h.notification) === null || _j === void 0 ? void 0 : _j.autoClose}`)
31
46
  : '';
32
- ((_j = (_h = error === null || error === void 0 ? void 0 : error.config) === null || _h === void 0 ? void 0 : _h.notification) === null || _j === void 0 ? void 0 : _j.closeTimeout)
33
- ? toastNotify.setAttribute('close-timeout', `${(_l = (_k = error === null || error === void 0 ? void 0 : error.config) === null || _k === void 0 ? void 0 : _k.notification) === null || _l === void 0 ? void 0 : _l.closeTimeout}`)
47
+ ((_l = (_k = error === null || error === void 0 ? void 0 : error.config) === null || _k === void 0 ? void 0 : _k.notification) === null || _l === void 0 ? void 0 : _l.closeTimeout)
48
+ ? toastNotify.setAttribute('close-timeout', `${(_o = (_m = error === null || error === void 0 ? void 0 : error.config) === null || _m === void 0 ? void 0 : _m.notification) === null || _o === void 0 ? void 0 : _o.closeTimeout}`)
34
49
  : '';
35
50
  toastNotify.appendChild(errorTitle);
36
51
  toastNotify.appendChild(errorDetails);
@@ -1351,6 +1351,34 @@
1351
1351
  "endIndex": 2
1352
1352
  }
1353
1353
  },
1354
+ {
1355
+ "kind": "PropertySignature",
1356
+ "canonicalReference": "@genesislcap/foundation-errors!ErrorNotification#position:member",
1357
+ "docComment": "",
1358
+ "excerptTokens": [
1359
+ {
1360
+ "kind": "Content",
1361
+ "text": "readonly position?: "
1362
+ },
1363
+ {
1364
+ "kind": "Reference",
1365
+ "text": "ErrorNotificationPosition",
1366
+ "canonicalReference": "@genesislcap/foundation-errors!ErrorNotificationPosition:type"
1367
+ },
1368
+ {
1369
+ "kind": "Content",
1370
+ "text": ";"
1371
+ }
1372
+ ],
1373
+ "isReadonly": true,
1374
+ "isOptional": true,
1375
+ "releaseTag": "Public",
1376
+ "name": "position",
1377
+ "propertyTypeTokenRange": {
1378
+ "startIndex": 1,
1379
+ "endIndex": 2
1380
+ }
1381
+ },
1354
1382
  {
1355
1383
  "kind": "PropertySignature",
1356
1384
  "canonicalReference": "@genesislcap/foundation-errors!ErrorNotification#type:member",
@@ -1382,6 +1410,32 @@
1382
1410
  ],
1383
1411
  "extendsTokenRanges": []
1384
1412
  },
1413
+ {
1414
+ "kind": "TypeAlias",
1415
+ "canonicalReference": "@genesislcap/foundation-errors!ErrorNotificationPosition:type",
1416
+ "docComment": "/**\n * type for error notification position\n *\n * @public\n */\n",
1417
+ "excerptTokens": [
1418
+ {
1419
+ "kind": "Content",
1420
+ "text": "export type ErrorNotificationPosition = "
1421
+ },
1422
+ {
1423
+ "kind": "Content",
1424
+ "text": "'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'"
1425
+ },
1426
+ {
1427
+ "kind": "Content",
1428
+ "text": ";"
1429
+ }
1430
+ ],
1431
+ "fileUrlPath": "src/types.ts",
1432
+ "releaseTag": "Public",
1433
+ "name": "ErrorNotificationPosition",
1434
+ "typeTokenRange": {
1435
+ "startIndex": 1,
1436
+ "endIndex": 2
1437
+ }
1438
+ },
1385
1439
  {
1386
1440
  "kind": "TypeAlias",
1387
1441
  "canonicalReference": "@genesislcap/foundation-errors!ErrorNotificationType:type",
@@ -2004,6 +2058,56 @@
2004
2058
  "isAbstract": false,
2005
2059
  "name": "withCloseTimeout"
2006
2060
  },
2061
+ {
2062
+ "kind": "Method",
2063
+ "canonicalReference": "@genesislcap/foundation-errors!NotificationBuilder#withPosition:member(1)",
2064
+ "docComment": "/**\n * Add position to notification\n *\n * @param position - {@link ErrorNotificationPosition}\n *\n * @returns \n *\n * @public\n */\n",
2065
+ "excerptTokens": [
2066
+ {
2067
+ "kind": "Content",
2068
+ "text": "withPosition(position: "
2069
+ },
2070
+ {
2071
+ "kind": "Reference",
2072
+ "text": "ErrorNotificationPosition",
2073
+ "canonicalReference": "@genesislcap/foundation-errors!ErrorNotificationPosition:type"
2074
+ },
2075
+ {
2076
+ "kind": "Content",
2077
+ "text": "): "
2078
+ },
2079
+ {
2080
+ "kind": "Reference",
2081
+ "text": "NotificationBuilder",
2082
+ "canonicalReference": "@genesislcap/foundation-errors!NotificationBuilder:class"
2083
+ },
2084
+ {
2085
+ "kind": "Content",
2086
+ "text": ";"
2087
+ }
2088
+ ],
2089
+ "isStatic": false,
2090
+ "returnTypeTokenRange": {
2091
+ "startIndex": 3,
2092
+ "endIndex": 4
2093
+ },
2094
+ "releaseTag": "Public",
2095
+ "isProtected": false,
2096
+ "overloadIndex": 1,
2097
+ "parameters": [
2098
+ {
2099
+ "parameterName": "position",
2100
+ "parameterTypeTokenRange": {
2101
+ "startIndex": 1,
2102
+ "endIndex": 2
2103
+ },
2104
+ "isOptional": false
2105
+ }
2106
+ ],
2107
+ "isOptional": false,
2108
+ "isAbstract": false,
2109
+ "name": "withPosition"
2110
+ },
2007
2111
  {
2008
2112
  "kind": "Method",
2009
2113
  "canonicalReference": "@genesislcap/foundation-errors!NotificationBuilder#withType:member(1)",
@@ -197,11 +197,18 @@ export declare type ErrorElement = HTMLElement & {
197
197
  * @public
198
198
  */
199
199
  export declare interface ErrorNotification {
200
+ readonly position?: ErrorNotificationPosition;
200
201
  readonly type?: ErrorNotificationType;
201
202
  readonly autoClose?: boolean;
202
203
  readonly closeTimeout?: number;
203
204
  }
204
205
 
206
+ /**
207
+ * @public
208
+ * type for error notification position
209
+ */
210
+ export declare type ErrorNotificationPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
211
+
205
212
  /**
206
213
  * @public
207
214
  * type for error notification type
@@ -297,9 +304,17 @@ export declare const getSnackbarBuilder: () => SnackbarBuilder;
297
304
  * @public
298
305
  */
299
306
  export declare class NotificationBuilder {
307
+ private position;
300
308
  private autoClose;
301
309
  private closeTimeout;
302
310
  private type;
311
+ /**
312
+ * Add position to notification
313
+ * @public
314
+ * @param position - {@link ErrorNotificationPosition}
315
+ * @returns
316
+ */
317
+ withPosition(position: ErrorNotificationPosition): NotificationBuilder;
303
318
  /**
304
319
  * Add auto close to notification
305
320
  * @public
@@ -18,5 +18,6 @@ export interface ErrorNotification
18
18
  | --- | --- | --- | --- |
19
19
  | [autoClose?](./foundation-errors.errornotification.autoclose.md) | <code>readonly</code> | boolean | _(Optional)_ |
20
20
  | [closeTimeout?](./foundation-errors.errornotification.closetimeout.md) | <code>readonly</code> | number | _(Optional)_ |
21
+ | [position?](./foundation-errors.errornotification.position.md) | <code>readonly</code> | [ErrorNotificationPosition](./foundation-errors.errornotificationposition.md) | _(Optional)_ |
21
22
  | [type?](./foundation-errors.errornotification.type.md) | <code>readonly</code> | [ErrorNotificationType](./foundation-errors.errornotificationtype.md) | _(Optional)_ |
22
23
 
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-errors](./foundation-errors.md) &gt; [ErrorNotification](./foundation-errors.errornotification.md) &gt; [position](./foundation-errors.errornotification.position.md)
4
+
5
+ ## ErrorNotification.position property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ readonly position?: ErrorNotificationPosition;
11
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-errors](./foundation-errors.md) &gt; [ErrorNotificationPosition](./foundation-errors.errornotificationposition.md)
4
+
5
+ ## ErrorNotificationPosition type
6
+
7
+ type for error notification position
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type ErrorNotificationPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
13
+ ```
@@ -52,6 +52,7 @@
52
52
 
53
53
  | Type Alias | Description |
54
54
  | --- | --- |
55
+ | [ErrorNotificationPosition](./foundation-errors.errornotificationposition.md) | type for error notification position |
55
56
  | [ErrorNotificationType](./foundation-errors.errornotificationtype.md) | type for error notification type |
56
57
  | [SnackbarType](./foundation-errors.snackbartype.md) | type for snackbar type |
57
58
 
@@ -19,5 +19,6 @@ export declare class NotificationBuilder
19
19
  | [build()](./foundation-errors.notificationbuilder.build.md) | | Build notification |
20
20
  | [withAutoClose(autoClose)](./foundation-errors.notificationbuilder.withautoclose.md) | | Add auto close to notification |
21
21
  | [withCloseTimeout(closeTimeout)](./foundation-errors.notificationbuilder.withclosetimeout.md) | | Add close timeout to notification |
22
+ | [withPosition(position)](./foundation-errors.notificationbuilder.withposition.md) | | Add position to notification |
22
23
  | [withType(type)](./foundation-errors.notificationbuilder.withtype.md) | | Add type to notification, if the type is anything other than 'warning' or 'success' do not add it |
23
24
 
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-errors](./foundation-errors.md) &gt; [NotificationBuilder](./foundation-errors.notificationbuilder.md) &gt; [withPosition](./foundation-errors.notificationbuilder.withposition.md)
4
+
5
+ ## NotificationBuilder.withPosition() method
6
+
7
+ Add position to notification
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ withPosition(position: ErrorNotificationPosition): NotificationBuilder;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | position | [ErrorNotificationPosition](./foundation-errors.errornotificationposition.md) | [ErrorNotificationPosition](./foundation-errors.errornotificationposition.md) |
20
+
21
+ **Returns:**
22
+
23
+ [NotificationBuilder](./foundation-errors.notificationbuilder.md)
24
+
25
+
@@ -92,9 +92,14 @@ export interface ErrorNotification {
92
92
  // (undocumented)
93
93
  readonly closeTimeout?: number;
94
94
  // (undocumented)
95
+ readonly position?: ErrorNotificationPosition;
96
+ // (undocumented)
95
97
  readonly type?: ErrorNotificationType;
96
98
  }
97
99
 
100
+ // @public
101
+ export type ErrorNotificationPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
102
+
98
103
  // @public
99
104
  export type ErrorNotificationType = 'warning' | 'success';
100
105
 
@@ -149,6 +154,7 @@ export class NotificationBuilder {
149
154
  build(): ErrorNotification;
150
155
  withAutoClose(autoClose: boolean): NotificationBuilder;
151
156
  withCloseTimeout(closeTimeout: number): NotificationBuilder;
157
+ withPosition(position: ErrorNotificationPosition): NotificationBuilder;
152
158
  withType(type: ErrorNotificationType): NotificationBuilder;
153
159
  }
154
160
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-errors",
3
3
  "description": "Genesis Foundation UI Error Utils",
4
- "version": "14.38.0",
4
+ "version": "14.40.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -37,11 +37,11 @@
37
37
  "test:debug": "genx test --debug"
38
38
  },
39
39
  "devDependencies": {
40
- "@genesislcap/foundation-testing": "^14.38.0",
41
- "@genesislcap/genx": "^14.38.0"
40
+ "@genesislcap/foundation-testing": "^14.40.0",
41
+ "@genesislcap/genx": "^14.40.0"
42
42
  },
43
43
  "dependencies": {
44
- "@genesislcap/foundation-utils": "^14.38.0",
44
+ "@genesislcap/foundation-utils": "^14.40.0",
45
45
  "@microsoft/fast-element": "^1.7.0",
46
46
  "tslib": "^2.3.1"
47
47
  },
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "66657747f1b3e7b22eff8232ccd9e945be1c92e4"
56
+ "gitHead": "bfb6182d5f6ff239ac98056df49fa92b76ec584e"
57
57
  }