@hortiview/modulebase 0.0.11938 → 0.0.12109
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 +1 @@
|
|
|
1
|
-
export declare const useBreadcrumbTranslation: () => (key: string, value: string) => void;
|
|
1
|
+
export declare const useBreadcrumbTranslation: () => (key: string, value: string | false) => void;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { useBasePropsStore as
|
|
3
|
-
const
|
|
4
|
-
const a =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { useCallback as d } from "react";
|
|
2
|
+
import { useBasePropsStore as s } from "../stores/BasePropsStore.js";
|
|
3
|
+
const u = () => {
|
|
4
|
+
const o = s((a) => a.addBreadcrumbTranslation), t = s((a) => a.addTranslation);
|
|
5
|
+
return d(
|
|
6
|
+
(a, r) => {
|
|
7
|
+
const e = a, n = typeof r == "boolean" ? a : r;
|
|
8
|
+
if (o) {
|
|
9
|
+
o(
|
|
10
|
+
{ key: e, value: n },
|
|
11
|
+
//if boolean hide the translation in the breadcrumb
|
|
12
|
+
typeof r == "boolean"
|
|
13
|
+
);
|
|
11
14
|
return;
|
|
12
15
|
}
|
|
13
|
-
t && t({ key:
|
|
16
|
+
t && t({ key: e, value: n }, typeof r == "boolean");
|
|
14
17
|
},
|
|
15
|
-
[
|
|
18
|
+
[o, t]
|
|
16
19
|
);
|
|
17
20
|
};
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
u as useBreadcrumbTranslation
|
|
20
23
|
};
|
|
@@ -13,7 +13,7 @@ export declare const useBaseProps: () => Pick<import('../types/Deprecated').Depr
|
|
|
13
13
|
addBreadcrumbTranslation?: (translation: {
|
|
14
14
|
key: string;
|
|
15
15
|
value: string;
|
|
16
|
-
}) => void;
|
|
16
|
+
}, hide?: boolean) => void;
|
|
17
17
|
showSnackbar?: (message: string, icon?: string) => void;
|
|
18
18
|
showMessage?: (message: import('../types/SystemMessage').SystemMessage) => void;
|
|
19
19
|
logEvent?: (event: import('../types/AppInsights').AppInsightsEvent, customProperties?: import('../types/AppInsights').AppInsightsProperties) => void;
|
|
@@ -24,12 +24,12 @@ export type BaseProps = DeprecatedBaseProps & {
|
|
|
24
24
|
currentLanguage?: string;
|
|
25
25
|
currentLanguageId?: string;
|
|
26
26
|
alertRules?: string;
|
|
27
|
-
commonOptions?: AllDropdownsData<CommonOption>[
|
|
27
|
+
commonOptions?: AllDropdownsData<CommonOption>['items'];
|
|
28
28
|
navigateInHortiview?: (path: string) => void;
|
|
29
29
|
addBreadcrumbTranslation?: (translation: {
|
|
30
30
|
key: string;
|
|
31
31
|
value: string;
|
|
32
|
-
}) => void;
|
|
32
|
+
}, hide?: boolean) => void;
|
|
33
33
|
showSnackbar?: (message: string, icon?: string) => void;
|
|
34
34
|
showMessage?: (message: SystemMessage) => void;
|
|
35
35
|
logEvent?: (event: AppInsightsEvent, customProperties?: AppInsightsProperties) => void;
|
package/package.json
CHANGED