@genesislcap/foundation-notifications 14.129.0 → 14.131.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.
@@ -3,5 +3,5 @@ import { ToastStructure } from '../types';
3
3
  * Shows the notification toast
4
4
  * @public
5
5
  */
6
- export declare const showNotificationToast: (configuration: ToastStructure, tagName: String) => void;
6
+ export declare const showNotificationToast: (configuration: ToastStructure, tagName: String, notificationContainer?: HTMLElement) => void;
7
7
  //# sourceMappingURL=toast-builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast-builder.d.ts","sourceRoot":"","sources":["../../../src/toast/toast-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,cAAc,EAAE,MAAM,UAAU,CAAC;AAGjE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,kBAAmB,cAAc,WAAW,MAAM,KAAG,IA8BtF,CAAC"}
1
+ {"version":3,"file":"toast-builder.d.ts","sourceRoot":"","sources":["../../../src/toast/toast-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,cAAc,EAAE,MAAM,UAAU,CAAC;AAGjE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,kBACjB,cAAc,WACpB,MAAM,0BACS,WAAW,KAClC,IA8BF,CAAC"}
@@ -4,7 +4,8 @@ import { NotificationStructure } from '../types';
4
4
  * @internal
5
5
  * @param notificationStructure - The NotificationStructure object
6
6
  * @param tagName - The tag name to create prefix for the design system provider & notificationStructure component
7
+ * @param notificationContainer - The notificationStructure container element
7
8
  * @returns
8
9
  * */
9
- export declare const showToast: (notificationStructure: NotificationStructure, tagName: String) => void;
10
+ export declare const showToast: (notificationStructure: NotificationStructure, tagName: String, notificationContainer?: HTMLElement) => void;
10
11
  //# sourceMappingURL=toast-launcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast-launcher.d.ts","sourceRoot":"","sources":["../../../src/toast/toast-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;KAMK;AACL,eAAO,MAAM,SAAS,0BAA2B,qBAAqB,WAAW,MAAM,KAAG,IAyFzF,CAAC"}
1
+ {"version":3,"file":"toast-launcher.d.ts","sourceRoot":"","sources":["../../../src/toast/toast-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;;KAOK;AACL,eAAO,MAAM,SAAS,0BACG,qBAAqB,WACnC,MAAM,0BACS,WAAW,KAClC,IA0FF,CAAC"}
@@ -4,7 +4,7 @@ import { showToast } from './toast-launcher';
4
4
  * Shows the notification toast
5
5
  * @public
6
6
  */
7
- export const showNotificationToast = (configuration, tagName) => {
7
+ export const showNotificationToast = (configuration, tagName, notificationContainer) => {
8
8
  if (!configuration.title) {
9
9
  throw new Error('Title is required');
10
10
  }
@@ -26,5 +26,5 @@ export const showNotificationToast = (configuration, tagName) => {
26
26
  config = Object.assign({ toast: configuration.toast }, config);
27
27
  notificationStructure = Object.assign({ config }, notificationStructure);
28
28
  }
29
- showToast(notificationStructure, tagName);
29
+ showToast(notificationStructure, tagName, notificationContainer);
30
30
  };
@@ -4,13 +4,14 @@ import { getNotificationContainer, showLoggerLogLevel } from '../notification-ut
4
4
  * @internal
5
5
  * @param notificationStructure - The NotificationStructure object
6
6
  * @param tagName - The tag name to create prefix for the design system provider & notificationStructure component
7
+ * @param notificationContainer - The notificationStructure container element
7
8
  * @returns
8
9
  * */
9
- export const showToast = (notificationStructure, tagName) => {
10
+ export const showToast = (notificationStructure, tagName, notificationContainer) => {
10
11
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
11
12
  showLoggerLogLevel(notificationStructure);
12
13
  const tagPrefix = tagName.split('-')[0];
13
- const container = getNotificationContainer('notify-container', tagName);
14
+ const container = notificationContainer !== null && notificationContainer !== void 0 ? notificationContainer : getNotificationContainer('notify-container', tagName);
14
15
  if (container) {
15
16
  container.style.position = 'fixed';
16
17
  switch ((_b = (_a = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _a === void 0 ? void 0 : _a.toast) === null || _b === void 0 ? void 0 : _b.position) {
@@ -2830,6 +2830,15 @@
2830
2830
  "text": "String",
2831
2831
  "canonicalReference": "!String:interface"
2832
2832
  },
2833
+ {
2834
+ "kind": "Content",
2835
+ "text": ", notificationContainer?: "
2836
+ },
2837
+ {
2838
+ "kind": "Reference",
2839
+ "text": "HTMLElement",
2840
+ "canonicalReference": "!HTMLElement:interface"
2841
+ },
2833
2842
  {
2834
2843
  "kind": "Content",
2835
2844
  "text": ") => void"
@@ -2841,7 +2850,7 @@
2841
2850
  "name": "showNotificationToast",
2842
2851
  "variableTypeTokenRange": {
2843
2852
  "startIndex": 1,
2844
- "endIndex": 6
2853
+ "endIndex": 8
2845
2854
  }
2846
2855
  },
2847
2856
  {
@@ -437,7 +437,7 @@ export declare const showNotificationSnackbar: (configuration: SnackbarStructure
437
437
  * Shows the notification toast
438
438
  * @public
439
439
  */
440
- export declare const showNotificationToast: (configuration: ToastStructure, tagName: String) => void;
440
+ export declare const showNotificationToast: (configuration: ToastStructure, tagName: String, notificationContainer?: HTMLElement) => void;
441
441
 
442
442
  /**
443
443
  * Shows the snackbar
@@ -453,9 +453,10 @@ export declare const showSnackbar: (notificationStructure: NotificationStructure
453
453
  * @internal
454
454
  * @param notificationStructure - The NotificationStructure object
455
455
  * @param tagName - The tag name to create prefix for the design system provider & notificationStructure component
456
+ * @param notificationContainer - The notificationStructure container element
456
457
  * @returns
457
458
  * */
458
- export declare const showToast: (notificationStructure: NotificationStructure, tagName: String) => void;
459
+ export declare const showToast: (notificationStructure: NotificationStructure, tagName: String, notificationContainer?: HTMLElement) => void;
459
460
 
460
461
  /**
461
462
  * Interface for Snackbar configuration
@@ -9,5 +9,5 @@ Shows the notification toast
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- showNotificationToast: (configuration: ToastStructure, tagName: String) => void
12
+ showNotificationToast: (configuration: ToastStructure, tagName: String, notificationContainer?: HTMLElement) => void
13
13
  ```
@@ -244,7 +244,7 @@ export const showNotificationDialog: (configuration: DialogStructure, tagName: S
244
244
  export const showNotificationSnackbar: (configuration: SnackbarStructure, tagName: String) => void;
245
245
 
246
246
  // @public
247
- export const showNotificationToast: (configuration: ToastStructure, tagName: String) => void;
247
+ export const showNotificationToast: (configuration: ToastStructure, tagName: String, notificationContainer?: HTMLElement) => void;
248
248
 
249
249
  // Warning: (ae-internal-missing-underscore) The name "showSnackbar" should be prefixed with an underscore because the declaration is marked as @internal
250
250
  //
@@ -254,7 +254,7 @@ export const showSnackbar: (notificationStructure: NotificationStructure, tagNam
254
254
  // Warning: (ae-internal-missing-underscore) The name "showToast" should be prefixed with an underscore because the declaration is marked as @internal
255
255
  //
256
256
  // @internal
257
- export const showToast: (notificationStructure: NotificationStructure, tagName: String) => void;
257
+ export const showToast: (notificationStructure: NotificationStructure, tagName: String, notificationContainer?: HTMLElement) => void;
258
258
 
259
259
  // @public
260
260
  export interface Snackbar {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-notifications",
3
3
  "description": "Genesis Foundation UI Notifications Utils",
4
- "version": "14.129.0",
4
+ "version": "14.131.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -40,12 +40,12 @@
40
40
  "test:debug": "genx test --debug"
41
41
  },
42
42
  "devDependencies": {
43
- "@genesislcap/foundation-testing": "14.129.0",
44
- "@genesislcap/genx": "14.129.0",
43
+ "@genesislcap/foundation-testing": "14.131.0",
44
+ "@genesislcap/genx": "14.131.0",
45
45
  "rimraf": "^3.0.2"
46
46
  },
47
47
  "dependencies": {
48
- "@genesislcap/foundation-logger": "14.129.0",
48
+ "@genesislcap/foundation-logger": "14.131.0",
49
49
  "tslib": "^2.3.1"
50
50
  },
51
51
  "repository": {
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "3c5fc48788499117b7acb540f96adb11bc4f05d3"
59
+ "gitHead": "9700c4db04186e6579ff05be972fbab156dd0272"
60
60
  }