@trackunit/react-core-contexts-api 0.2.8 → 0.2.10
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/package.json
CHANGED
@@ -6,7 +6,7 @@ export interface IDeveloperSettingsContext {
|
|
6
6
|
launchdarklyFlags?: FeatureFlags;
|
7
7
|
setFlags?: React.Dispatch<React.SetStateAction<FeatureFlags | undefined>>;
|
8
8
|
}
|
9
|
-
export
|
9
|
+
export type FeatureFlags = {
|
10
10
|
[key: string]: boolean | Json;
|
11
11
|
};
|
12
|
-
export
|
12
|
+
export type Json = string;
|
@@ -3,10 +3,10 @@ export interface IGlobalSelectionContext {
|
|
3
3
|
* Details about the globally selected entity and its type
|
4
4
|
* returns `null` if no selection currently.
|
5
5
|
*/
|
6
|
-
selection: Readonly<
|
6
|
+
selection: Readonly<SiteSelection | GroupSelection> | null;
|
7
7
|
}
|
8
|
-
export interface
|
9
|
-
|
8
|
+
export interface SiteSelection extends TypedSelection<"site"> {
|
9
|
+
siteId: string;
|
10
10
|
}
|
11
11
|
export interface GroupSelection extends TypedSelection<"group"> {
|
12
12
|
groupId: string;
|
package/src/toastContext.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export
|
3
|
-
export
|
2
|
+
export type AlertColors = "info" | "warning" | "danger" | "success";
|
3
|
+
export type AlertAction = {
|
4
4
|
label: string;
|
5
5
|
onClick: () => void;
|
6
6
|
loading?: boolean;
|
@@ -14,7 +14,7 @@ export interface Toast {
|
|
14
14
|
secondaryAction?: AlertAction;
|
15
15
|
duration?: number;
|
16
16
|
}
|
17
|
-
export
|
17
|
+
export type AddToast = (toast: Toast) => void;
|
18
18
|
export interface IToastContext {
|
19
19
|
addToast: AddToast;
|
20
20
|
setIsManifestError?: React.Dispatch<React.SetStateAction<boolean>>;
|
@@ -32,7 +32,7 @@ export declare const UserSubscriptionPackage: {
|
|
32
32
|
readonly VIEW: "VIEW";
|
33
33
|
readonly NONE: "NONE";
|
34
34
|
};
|
35
|
-
export
|
35
|
+
export type UserSubscriptionPackageType = keyof typeof UserSubscriptionPackage;
|
36
36
|
export interface IFeature {
|
37
37
|
id: string;
|
38
38
|
name: string;
|