@genesislcap/foundation-notifications 14.305.0 → 14.306.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.
- package/dist/dts/dialog/dialog-builder.d.ts +1 -1
- package/dist/dts/dialog/dialog-builder.d.ts.map +1 -1
- package/dist/dts/dialog/dialog-launcher.d.ts +3 -2
- package/dist/dts/dialog/dialog-launcher.d.ts.map +1 -1
- package/dist/esm/dialog/dialog-builder.js +2 -2
- package/dist/esm/dialog/dialog-launcher.js +22 -3
- package/dist/esm/notification-util.js +1 -1
- package/dist/foundation-notifications.api.json +19 -2
- package/dist/foundation-notifications.d.ts +4 -3
- package/docs/api/foundation-notifications.md +1 -1
- package/docs/api/foundation-notifications.shownotificationdialog.md +17 -1
- package/docs/api-report.md.api.md +2 -2
- package/package.json +11 -11
|
@@ -3,5 +3,5 @@ import { DialogStructure } from '../types';
|
|
|
3
3
|
* Shows the notification dialog
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export declare const showNotificationDialog: (configuration: DialogStructure, tagName: String) => void;
|
|
6
|
+
export declare const showNotificationDialog: (configuration: DialogStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
7
7
|
//# sourceMappingURL=dialog-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-builder.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"dialog-builder.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,eAAe,eAAe,EAC9B,SAAS,MAAM,EACf,uBAAuB,WAAW,KACjC,IA0BF,CAAC"}
|
|
@@ -2,9 +2,10 @@ import { NotificationStructure } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Shows the dialog
|
|
4
4
|
* @internal
|
|
5
|
-
* @param
|
|
5
|
+
* @param notificationStructure - The NotificationStructure object
|
|
6
6
|
* @param tagName - The tag name to create prefix for the design system provider & notification component
|
|
7
|
+
* @param notificationBoundary - Optional boundary element to place the dialog within. If provided, the dialog will be created within this element's context, which can help with z-index stacking issues when the dialog needs to appear above modals or other elements.
|
|
7
8
|
* @returns
|
|
8
9
|
* */
|
|
9
|
-
export declare const showDialog: (notificationStructure: NotificationStructure, tagName: String) => void;
|
|
10
|
+
export declare const showDialog: (notificationStructure: NotificationStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
10
11
|
//# sourceMappingURL=dialog-launcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-launcher.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAiB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog-launcher.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAiB,MAAM,UAAU,CAAC;AAmBhE;;;;;;;KAOK;AACL,eAAO,MAAM,UAAU,GACrB,uBAAuB,qBAAqB,EAC5C,SAAS,MAAM,EACf,uBAAuB,WAAW,KACjC,IAaF,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { showDialog } from './dialog-launcher';
|
|
|
4
4
|
* Shows the notification dialog
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export const showNotificationDialog = (configuration, tagName) => {
|
|
7
|
+
export const showNotificationDialog = (configuration, tagName, notificationBoundary) => {
|
|
8
8
|
if (!configuration.title) {
|
|
9
9
|
throw new Error('Title is required');
|
|
10
10
|
}
|
|
@@ -23,5 +23,5 @@ export const showNotificationDialog = (configuration, tagName) => {
|
|
|
23
23
|
config = Object.assign({ dialog: configuration.dialog }, config);
|
|
24
24
|
notificationStructure = Object.assign({ config }, notificationStructure);
|
|
25
25
|
}
|
|
26
|
-
showDialog(notificationStructure, tagName);
|
|
26
|
+
showDialog(notificationStructure, tagName, notificationBoundary);
|
|
27
27
|
};
|
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
import { getNotificationContainer, showLoggerLogLevel } from '../notification-util';
|
|
2
|
+
/**
|
|
3
|
+
* Gets or creates a dialog container within the provided boundary element.
|
|
4
|
+
* @internal
|
|
5
|
+
* @param notificationBoundary - The boundary element to search for or create the container within
|
|
6
|
+
* @returns The dialog container element
|
|
7
|
+
*/
|
|
8
|
+
const getBoundaryContainer = (notificationBoundary) => {
|
|
9
|
+
let boundaryContainer = notificationBoundary.querySelector('#dialog-container');
|
|
10
|
+
if (!boundaryContainer) {
|
|
11
|
+
boundaryContainer = document.createElement('div');
|
|
12
|
+
boundaryContainer.setAttribute('id', 'dialog-container');
|
|
13
|
+
boundaryContainer.style.position = 'relative';
|
|
14
|
+
notificationBoundary.appendChild(boundaryContainer);
|
|
15
|
+
}
|
|
16
|
+
return boundaryContainer;
|
|
17
|
+
};
|
|
2
18
|
/**
|
|
3
19
|
* Shows the dialog
|
|
4
20
|
* @internal
|
|
5
|
-
* @param
|
|
21
|
+
* @param notificationStructure - The NotificationStructure object
|
|
6
22
|
* @param tagName - The tag name to create prefix for the design system provider & notification component
|
|
23
|
+
* @param notificationBoundary - Optional boundary element to place the dialog within. If provided, the dialog will be created within this element's context, which can help with z-index stacking issues when the dialog needs to appear above modals or other elements.
|
|
7
24
|
* @returns
|
|
8
25
|
* */
|
|
9
|
-
export const showDialog = (notificationStructure, tagName) => {
|
|
26
|
+
export const showDialog = (notificationStructure, tagName, notificationBoundary) => {
|
|
10
27
|
showLoggerLogLevel(notificationStructure);
|
|
11
28
|
const tagPrefix = tagName.split('-')[0];
|
|
12
29
|
const dialog = document.createElement(`${tagPrefix}-dialog`);
|
|
13
|
-
const container =
|
|
30
|
+
const container = notificationBoundary
|
|
31
|
+
? getBoundaryContainer(notificationBoundary)
|
|
32
|
+
: getNotificationContainer('dialog-container', tagName);
|
|
14
33
|
container.appendChild(dialog);
|
|
15
34
|
dialog.notification = notificationStructure;
|
|
16
35
|
dialog.show();
|
|
@@ -68,7 +68,7 @@ export const getNotificationContainer = (id, tagName) => {
|
|
|
68
68
|
if (!container) {
|
|
69
69
|
container = document.createElement('div');
|
|
70
70
|
container.setAttribute('id', id);
|
|
71
|
-
container.style.zIndex = '
|
|
71
|
+
container.style.zIndex = '9999';
|
|
72
72
|
// Get the current design system prefix using the existing utility
|
|
73
73
|
const currentPrefix = getCurrentDesignSystemPrefix(document.body, 'rapid');
|
|
74
74
|
// Search for existing provider including shadow DOMs
|
|
@@ -2879,6 +2879,15 @@
|
|
|
2879
2879
|
"text": "String",
|
|
2880
2880
|
"canonicalReference": "!String:interface"
|
|
2881
2881
|
},
|
|
2882
|
+
{
|
|
2883
|
+
"kind": "Content",
|
|
2884
|
+
"text": ", notificationBoundary?: "
|
|
2885
|
+
},
|
|
2886
|
+
{
|
|
2887
|
+
"kind": "Reference",
|
|
2888
|
+
"text": "HTMLElement",
|
|
2889
|
+
"canonicalReference": "!HTMLElement:interface"
|
|
2890
|
+
},
|
|
2882
2891
|
{
|
|
2883
2892
|
"kind": "Content",
|
|
2884
2893
|
"text": ") => "
|
|
@@ -2890,8 +2899,8 @@
|
|
|
2890
2899
|
],
|
|
2891
2900
|
"fileUrlPath": "src/dialog/dialog-builder.ts",
|
|
2892
2901
|
"returnTypeTokenRange": {
|
|
2893
|
-
"startIndex":
|
|
2894
|
-
"endIndex":
|
|
2902
|
+
"startIndex": 7,
|
|
2903
|
+
"endIndex": 8
|
|
2895
2904
|
},
|
|
2896
2905
|
"releaseTag": "Public",
|
|
2897
2906
|
"overloadIndex": 1,
|
|
@@ -2911,6 +2920,14 @@
|
|
|
2911
2920
|
"endIndex": 4
|
|
2912
2921
|
},
|
|
2913
2922
|
"isOptional": false
|
|
2923
|
+
},
|
|
2924
|
+
{
|
|
2925
|
+
"parameterName": "notificationBoundary",
|
|
2926
|
+
"parameterTypeTokenRange": {
|
|
2927
|
+
"startIndex": 5,
|
|
2928
|
+
"endIndex": 6
|
|
2929
|
+
},
|
|
2930
|
+
"isOptional": true
|
|
2914
2931
|
}
|
|
2915
2932
|
],
|
|
2916
2933
|
"name": "showNotificationDialog"
|
|
@@ -386,11 +386,12 @@ export declare const showBanner: (notificationStructure: NotificationStructure,
|
|
|
386
386
|
/**
|
|
387
387
|
* Shows the dialog
|
|
388
388
|
* @internal
|
|
389
|
-
* @param
|
|
389
|
+
* @param notificationStructure - The NotificationStructure object
|
|
390
390
|
* @param tagName - The tag name to create prefix for the design system provider & notification component
|
|
391
|
+
* @param notificationBoundary - Optional boundary element to place the dialog within. If provided, the dialog will be created within this element's context, which can help with z-index stacking issues when the dialog needs to appear above modals or other elements.
|
|
391
392
|
* @returns
|
|
392
393
|
* */
|
|
393
|
-
export declare const showDialog: (notificationStructure: NotificationStructure, tagName: String) => void;
|
|
394
|
+
export declare const showDialog: (notificationStructure: NotificationStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
394
395
|
|
|
395
396
|
/**
|
|
396
397
|
* Shows logger with log level from NotificationStructure object
|
|
@@ -425,7 +426,7 @@ export declare const showNotificationBanner: (configuration: BannerStructure, ta
|
|
|
425
426
|
* Shows the notification dialog
|
|
426
427
|
* @public
|
|
427
428
|
*/
|
|
428
|
-
export declare const showNotificationDialog: (configuration: DialogStructure, tagName: String) => void;
|
|
429
|
+
export declare const showNotificationDialog: (configuration: DialogStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
429
430
|
|
|
430
431
|
/**
|
|
431
432
|
* Shows the notification snackbar
|
|
@@ -267,7 +267,7 @@ Shows the notification banner
|
|
|
267
267
|
</td></tr>
|
|
268
268
|
<tr><td>
|
|
269
269
|
|
|
270
|
-
[showNotificationDialog(configuration, tagName)](./foundation-notifications.shownotificationdialog.md)
|
|
270
|
+
[showNotificationDialog(configuration, tagName, notificationBoundary)](./foundation-notifications.shownotificationdialog.md)
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
</td><td>
|
|
@@ -9,7 +9,7 @@ Shows the notification dialog
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
showNotificationDialog: (configuration: DialogStructure, tagName: String) => void
|
|
12
|
+
showNotificationDialog: (configuration: DialogStructure, tagName: String, notificationBoundary?: HTMLElement) => void
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -57,6 +57,22 @@ String
|
|
|
57
57
|
</td><td>
|
|
58
58
|
|
|
59
59
|
|
|
60
|
+
</td></tr>
|
|
61
|
+
<tr><td>
|
|
62
|
+
|
|
63
|
+
notificationBoundary
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</td><td>
|
|
67
|
+
|
|
68
|
+
HTMLElement
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</td><td>
|
|
72
|
+
|
|
73
|
+
_(Optional)_
|
|
74
|
+
|
|
75
|
+
|
|
60
76
|
</td></tr>
|
|
61
77
|
</tbody></table>
|
|
62
78
|
|
|
@@ -223,7 +223,7 @@ export const showBanner: (notificationStructure: NotificationStructure, tagName:
|
|
|
223
223
|
// Warning: (ae-internal-missing-underscore) The name "showDialog" should be prefixed with an underscore because the declaration is marked as @internal
|
|
224
224
|
//
|
|
225
225
|
// @internal
|
|
226
|
-
export const showDialog: (notificationStructure: NotificationStructure, tagName: String) => void;
|
|
226
|
+
export const showDialog: (notificationStructure: NotificationStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
227
227
|
|
|
228
228
|
// @public
|
|
229
229
|
export const showLoggerLogLevel: (notificationStructure: NotificationStructure) => void;
|
|
@@ -238,7 +238,7 @@ export const showNotificationAlert: (configuration: AlertStructure) => void;
|
|
|
238
238
|
export const showNotificationBanner: (configuration: BannerStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
239
239
|
|
|
240
240
|
// @public
|
|
241
|
-
export const showNotificationDialog: (configuration: DialogStructure, tagName: String) => void;
|
|
241
|
+
export const showNotificationDialog: (configuration: DialogStructure, tagName: String, notificationBoundary?: HTMLElement) => void;
|
|
242
242
|
|
|
243
243
|
// @public
|
|
244
244
|
export const showNotificationSnackbar: (configuration: SnackbarStructure, tagName: String) => void;
|
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.
|
|
4
|
+
"version": "14.306.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@genesislcap/foundation-testing": "14.
|
|
53
|
-
"@genesislcap/genx": "14.
|
|
54
|
-
"@genesislcap/rollup-builder": "14.
|
|
55
|
-
"@genesislcap/ts-builder": "14.
|
|
56
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
57
|
-
"@genesislcap/vite-builder": "14.
|
|
58
|
-
"@genesislcap/webpack-builder": "14.
|
|
52
|
+
"@genesislcap/foundation-testing": "14.306.0",
|
|
53
|
+
"@genesislcap/genx": "14.306.0",
|
|
54
|
+
"@genesislcap/rollup-builder": "14.306.0",
|
|
55
|
+
"@genesislcap/ts-builder": "14.306.0",
|
|
56
|
+
"@genesislcap/uvu-playwright-builder": "14.306.0",
|
|
57
|
+
"@genesislcap/vite-builder": "14.306.0",
|
|
58
|
+
"@genesislcap/webpack-builder": "14.306.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@genesislcap/foundation-logger": "14.
|
|
62
|
-
"@genesislcap/foundation-utils": "14.
|
|
61
|
+
"@genesislcap/foundation-logger": "14.306.0",
|
|
62
|
+
"@genesislcap/foundation-utils": "14.306.0"
|
|
63
63
|
},
|
|
64
64
|
"repository": {
|
|
65
65
|
"type": "git",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "df5d88c4e8e25a56d2bf22dab70ca551784e6df0"
|
|
73
73
|
}
|