@gooddata/sdk-ui-ext 10.19.0-alpha.2 → 10.19.0-alpha.21
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/esm/index.d.ts +0 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +1 -1
- package/esm/internal/translations/de-DE.json +17 -1
- package/esm/internal/translations/en-AU.json +17 -1
- package/esm/internal/translations/en-GB.json +17 -1
- package/esm/internal/translations/en-US.json +15 -0
- package/esm/internal/translations/es-419.json +17 -1
- package/esm/internal/translations/es-ES.json +17 -1
- package/esm/internal/translations/fi-FI.json +17 -1
- package/esm/internal/translations/fr-CA.json +17 -1
- package/esm/internal/translations/fr-FR.json +17 -1
- package/esm/internal/translations/it-IT.json +17 -1
- package/esm/internal/translations/ja-JP.json +17 -1
- package/esm/internal/translations/nl-NL.json +17 -1
- package/esm/internal/translations/pt-BR.json +17 -1
- package/esm/internal/translations/pt-PT.json +17 -1
- package/esm/internal/translations/zh-HK.json +17 -1
- package/esm/internal/translations/zh-Hans.json +17 -1
- package/esm/internal/translations/zh-Hant.json +17 -1
- package/esm/notificationsPanel/Notification/AlertNotification.d.ts.map +1 -1
- package/esm/notificationsPanel/Notification/AlertNotification.js +26 -3
- package/esm/notificationsPanel/Notification/AlertNotification.js.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.js +1 -1
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.js.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js +3 -1
- package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js.map +1 -1
- package/esm/notificationsPanel/components/Popup.d.ts +9 -0
- package/esm/notificationsPanel/components/Popup.d.ts.map +1 -0
- package/esm/notificationsPanel/components/Popup.js +15 -0
- package/esm/notificationsPanel/components/Popup.js.map +1 -0
- package/esm/notificationsPanel/data/useNotifications.d.ts +2 -2
- package/esm/notificationsPanel/data/useNotifications.js +1 -1
- package/esm/sdk-ui-ext.d.ts +0 -48
- package/package.json +17 -17
- package/src/notificationsPanel/Notification/DefaultNotification.scss +31 -4
- package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.scss +1 -0
- package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.scss +1 -0
- package/src/notificationsPanel/notificationPanel.scss +1 -0
- package/styles/css/main.css +523 -2
- package/styles/css/main.css.map +1 -1
- package/styles/internal/css/attribute_hierarchies.css.map +1 -1
- package/styles/internal/css/charts.css.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/components/Popup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAM7D,wBAAgB,KAAK,CAAC,EAClB,QAAQ,EACR,KAAK,GACR,EAAE;IACC,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAClF,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,qBAsBA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// (C) 2024-2025 GoodData Corporation
|
|
2
|
+
import React, { useRef, useState, useCallback } from "react";
|
|
3
|
+
import { Bubble } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { v4 as uuidv4 } from "uuid";
|
|
5
|
+
const ALIGN_POINTS = [{ align: "bc tr" }, { align: "tc br" }];
|
|
6
|
+
export function Popup({ children, popup, }) {
|
|
7
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
8
|
+
const { current: id } = useRef(`popup-${uuidv4()}`);
|
|
9
|
+
const toggle = useCallback(() => setIsOpen((x) => !x), []);
|
|
10
|
+
const close = useCallback(() => setIsOpen(false), []);
|
|
11
|
+
return (React.createElement(React.Fragment, null,
|
|
12
|
+
children({ toggle, id }),
|
|
13
|
+
isOpen ? (React.createElement(Bubble, { alignPoints: ALIGN_POINTS, alignTo: `#${id}`, closeOnOutsideClick: true, closeOnParentScroll: true, onClose: close }, popup)) : null));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=Popup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../src/notificationsPanel/components/Popup.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAE9D,MAAM,UAAU,KAAK,CAAC,EAClB,QAAQ,EACR,KAAK,GAIR;IACG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtD,OAAO,CACH;QACK,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACxB,MAAM,CAAC,CAAC,CAAC,CACN,oBAAC,MAAM,IACH,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,IAAI,EAAE,EAAE,EACjB,mBAAmB,QACnB,mBAAmB,QACnB,OAAO,EAAE,KAAK,IAEb,KAAK,CACD,CACZ,CAAC,CAAC,CAAC,IAAI,CACT,CACN,CAAC;AACN,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
|
2
2
|
/**
|
|
3
3
|
* Hook for fetching all and unread notifications.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export interface IUseNotificationsProps {
|
|
8
8
|
/**
|
|
@@ -26,7 +26,7 @@ export interface IUseNotificationsProps {
|
|
|
26
26
|
itemsPerPage: number;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* @
|
|
29
|
+
* @internal
|
|
30
30
|
*/
|
|
31
31
|
export declare function useNotifications({ workspace, refreshInterval, itemsPerPage }: IUseNotificationsProps): {
|
|
32
32
|
notifications: import("@gooddata/sdk-model").INotification[];
|
|
@@ -4,7 +4,7 @@ import { useCallback, useMemo, useState } from "react";
|
|
|
4
4
|
import { useOrganization } from "../@staging/OrganizationContext/OrganizationContext.js";
|
|
5
5
|
import { useFetchNotifications } from "./useFetchNotifications.js";
|
|
6
6
|
/**
|
|
7
|
-
* @
|
|
7
|
+
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export function useNotifications({ workspace, refreshInterval, itemsPerPage }) {
|
|
10
10
|
const effectiveWorkspace = useWorkspace(workspace);
|
package/esm/sdk-ui-ext.d.ts
CHANGED
|
@@ -1114,33 +1114,6 @@ export declare type ISizeInfoDefault = ISizeInfo & {
|
|
|
1114
1114
|
default: number;
|
|
1115
1115
|
};
|
|
1116
1116
|
|
|
1117
|
-
/**
|
|
1118
|
-
* Hook for fetching all and unread notifications.
|
|
1119
|
-
*
|
|
1120
|
-
* @public
|
|
1121
|
-
*/
|
|
1122
|
-
export declare interface IUseNotificationsProps {
|
|
1123
|
-
/**
|
|
1124
|
-
* Workspace to fetch notifications from.
|
|
1125
|
-
*
|
|
1126
|
-
* - If not provided, the workspace from WorkspaceProvider is used.
|
|
1127
|
-
* - If not provided and there is no WorkspaceProvider, notifications will be loaded from all workspaces.
|
|
1128
|
-
*/
|
|
1129
|
-
workspace?: string;
|
|
1130
|
-
/**
|
|
1131
|
-
* Backend to fetch notifications from.
|
|
1132
|
-
*/
|
|
1133
|
-
backend?: IAnalyticalBackend;
|
|
1134
|
-
/**
|
|
1135
|
-
* Refresh interval in milliseconds.
|
|
1136
|
-
*/
|
|
1137
|
-
refreshInterval: number;
|
|
1138
|
-
/**
|
|
1139
|
-
* Number of items per page.
|
|
1140
|
-
*/
|
|
1141
|
-
itemsPerPage: number;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
1117
|
/**
|
|
1145
1118
|
* @internal
|
|
1146
1119
|
*/
|
|
@@ -1309,27 +1282,6 @@ export declare type TelemetryEvent = "multiple-users-deleted" | "multiple-groups
|
|
|
1309
1282
|
*/
|
|
1310
1283
|
export declare type TrackEventCallback = (event: TelemetryEvent) => void;
|
|
1311
1284
|
|
|
1312
|
-
/**
|
|
1313
|
-
* @public
|
|
1314
|
-
*/
|
|
1315
|
-
export declare function useNotifications({ workspace, refreshInterval, itemsPerPage }: IUseNotificationsProps): {
|
|
1316
|
-
notifications: INotification[];
|
|
1317
|
-
notificationsStatus: "error" | "loading" | "pending" | "success";
|
|
1318
|
-
notificationsError: GoodDataSdkError;
|
|
1319
|
-
notificationsHasNextPage: boolean;
|
|
1320
|
-
notificationsLoadNextPage: () => void;
|
|
1321
|
-
notificationsReset: () => void;
|
|
1322
|
-
unreadNotifications: INotification[];
|
|
1323
|
-
unreadNotificationsStatus: "error" | "loading" | "pending" | "success";
|
|
1324
|
-
unreadNotificationsError: GoodDataSdkError;
|
|
1325
|
-
unreadNotificationsHasNextPage: boolean;
|
|
1326
|
-
unreadNotificationsLoadNextPage: () => void;
|
|
1327
|
-
unreadNotificationsReset: () => void;
|
|
1328
|
-
unreadNotificationsCount: number;
|
|
1329
|
-
markNotificationAsRead: (notificationId: string) => Promise<void>;
|
|
1330
|
-
markAllNotificationsAsRead: () => Promise<void>;
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
1285
|
/**
|
|
1334
1286
|
* @internal
|
|
1335
1287
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-ext",
|
|
3
|
-
"version": "10.19.0-alpha.
|
|
3
|
+
"version": "10.19.0-alpha.21",
|
|
4
4
|
"description": "GoodData.UI SDK - Extensions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
"ts-invariant": "^0.7.5",
|
|
56
56
|
"tslib": "^2.5.0",
|
|
57
57
|
"uuid": "^8.3.2",
|
|
58
|
-
"@gooddata/sdk-backend-base": "10.19.0-alpha.
|
|
59
|
-
"@gooddata/sdk-
|
|
60
|
-
"@gooddata/sdk-
|
|
61
|
-
"@gooddata/sdk-
|
|
62
|
-
"@gooddata/sdk-
|
|
63
|
-
"@gooddata/sdk-ui-charts": "10.19.0-alpha.
|
|
64
|
-
"@gooddata/sdk-ui-filters": "10.19.0-alpha.
|
|
65
|
-
"@gooddata/sdk-ui-
|
|
66
|
-
"@gooddata/sdk-ui-
|
|
67
|
-
"@gooddata/sdk-ui-
|
|
68
|
-
"@gooddata/sdk-ui-theme-provider": "10.19.0-alpha.
|
|
69
|
-
"@gooddata/
|
|
70
|
-
"@gooddata/
|
|
58
|
+
"@gooddata/sdk-backend-base": "10.19.0-alpha.21",
|
|
59
|
+
"@gooddata/sdk-backend-spi": "10.19.0-alpha.21",
|
|
60
|
+
"@gooddata/sdk-embedding": "10.19.0-alpha.21",
|
|
61
|
+
"@gooddata/sdk-ui": "10.19.0-alpha.21",
|
|
62
|
+
"@gooddata/sdk-model": "10.19.0-alpha.21",
|
|
63
|
+
"@gooddata/sdk-ui-charts": "10.19.0-alpha.21",
|
|
64
|
+
"@gooddata/sdk-ui-filters": "10.19.0-alpha.21",
|
|
65
|
+
"@gooddata/sdk-ui-geo": "10.19.0-alpha.21",
|
|
66
|
+
"@gooddata/sdk-ui-pivot": "10.19.0-alpha.21",
|
|
67
|
+
"@gooddata/sdk-ui-kit": "10.19.0-alpha.21",
|
|
68
|
+
"@gooddata/sdk-ui-theme-provider": "10.19.0-alpha.21",
|
|
69
|
+
"@gooddata/util": "10.19.0-alpha.21",
|
|
70
|
+
"@gooddata/sdk-ui-vis-commons": "10.19.0-alpha.21"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -124,9 +124,9 @@
|
|
|
124
124
|
"@types/json-stable-stringify": "^1.0.32",
|
|
125
125
|
"@types/codemirror": "^5.60.7",
|
|
126
126
|
"@types/js-yaml": "^4.0.9",
|
|
127
|
-
"@gooddata/i18n-toolkit": "10.19.0-alpha.
|
|
128
|
-
"@gooddata/reference-workspace": "10.19.0-alpha.
|
|
129
|
-
"@gooddata/sdk-backend-mockingbird": "10.19.0-alpha.
|
|
127
|
+
"@gooddata/i18n-toolkit": "10.19.0-alpha.21",
|
|
128
|
+
"@gooddata/reference-workspace": "10.19.0-alpha.21",
|
|
129
|
+
"@gooddata/sdk-backend-mockingbird": "10.19.0-alpha.21"
|
|
130
130
|
},
|
|
131
131
|
"scripts": {
|
|
132
132
|
"clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// (C) 2024 GoodData Corporation
|
|
1
|
+
// (C) 2024-2025 GoodData Corporation
|
|
2
2
|
|
|
3
3
|
.gd-ui-ext-notification {
|
|
4
4
|
$root: &;
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
display: none;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
#{$root}__unread-status {
|
|
41
|
+
border: 1.4px solid var(--gd-palette-complementary-2);
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
&__unsupported {
|
|
@@ -79,13 +83,12 @@
|
|
|
79
83
|
&__details {
|
|
80
84
|
display: flex;
|
|
81
85
|
flex-direction: column;
|
|
82
|
-
justify-content:
|
|
86
|
+
justify-content: center;
|
|
83
87
|
flex-shrink: 1;
|
|
84
88
|
|
|
85
89
|
width: 100%;
|
|
86
90
|
height: 100%;
|
|
87
|
-
|
|
88
|
-
overflow: hidden;
|
|
91
|
+
min-width: 0;
|
|
89
92
|
}
|
|
90
93
|
|
|
91
94
|
&__title {
|
|
@@ -130,5 +133,29 @@
|
|
|
130
133
|
display: flex;
|
|
131
134
|
flex-direction: row;
|
|
132
135
|
align-items: center;
|
|
136
|
+
height: 16px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__error {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: row;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: 5px;
|
|
144
|
+
height: 16px;
|
|
145
|
+
font-size: 12px;
|
|
146
|
+
font-weight: 400;
|
|
147
|
+
color: var(--gd-palette-error-base);
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
position: relative;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&__error-icon {
|
|
153
|
+
width: 12px;
|
|
154
|
+
height: 12px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__error-popup {
|
|
158
|
+
font-size: 12px;
|
|
159
|
+
line-height: 18px;
|
|
133
160
|
}
|
|
134
161
|
}
|