mod-arch-core 1.0.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/README.md +44 -0
- package/dist/__tests__/__mocks__/mockGenericResponse.d.ts +8 -0
- package/dist/__tests__/__mocks__/mockGenericResponse.d.ts.map +1 -0
- package/dist/__tests__/__mocks__/mockGenericResponse.js +6 -0
- package/dist/__tests__/__mocks__/mockGenericResponse.js.map +1 -0
- package/dist/__tests__/__mocks__/styleMock.d.ts +2 -0
- package/dist/__tests__/__mocks__/styleMock.d.ts.map +1 -0
- package/dist/__tests__/__mocks__/styleMock.js +3 -0
- package/dist/__tests__/__mocks__/styleMock.js.map +1 -0
- package/dist/__tests__/unit/jest.setup.d.ts +2 -0
- package/dist/__tests__/unit/jest.setup.d.ts.map +1 -0
- package/dist/__tests__/unit/jest.setup.js +48 -0
- package/dist/__tests__/unit/jest.setup.js.map +1 -0
- package/dist/__tests__/unit/testUtils/hooks.d.ts +80 -0
- package/dist/__tests__/unit/testUtils/hooks.d.ts.map +1 -0
- package/dist/__tests__/unit/testUtils/hooks.js +126 -0
- package/dist/__tests__/unit/testUtils/hooks.js.map +1 -0
- package/dist/__tests__/unit/testUtils/hooks.spec.d.ts +2 -0
- package/dist/__tests__/unit/testUtils/hooks.spec.d.ts.map +1 -0
- package/dist/__tests__/unit/testUtils/hooks.spec.js +192 -0
- package/dist/__tests__/unit/testUtils/hooks.spec.js.map +1 -0
- package/dist/api/__tests__/errorUtils.spec.d.ts +2 -0
- package/dist/api/__tests__/errorUtils.spec.d.ts.map +1 -0
- package/dist/api/__tests__/errorUtils.spec.js +27 -0
- package/dist/api/__tests__/errorUtils.spec.js.map +1 -0
- package/dist/api/apiUtils.d.ts +16 -0
- package/dist/api/apiUtils.d.ts.map +1 -0
- package/dist/api/apiUtils.js +96 -0
- package/dist/api/apiUtils.js.map +1 -0
- package/dist/api/const.d.ts +3 -0
- package/dist/api/const.d.ts.map +1 -0
- package/dist/api/const.js +4 -0
- package/dist/api/const.js.map +1 -0
- package/dist/api/errorUtils.d.ts +2 -0
- package/dist/api/errorUtils.d.ts.map +1 -0
- package/dist/api/errorUtils.js +22 -0
- package/dist/api/errorUtils.js.map +1 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/k8s.d.ts +10 -0
- package/dist/api/k8s.d.ts.map +1 -0
- package/dist/api/k8s.js +16 -0
- package/dist/api/k8s.js.map +1 -0
- package/dist/api/types.d.ts +19 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +2 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/useAPIState.d.ts +3 -0
- package/dist/api/useAPIState.d.ts.map +1 -0
- package/dist/api/useAPIState.js +22 -0
- package/dist/api/useAPIState.js.map +1 -0
- package/dist/config/transform.file.d.ts +3 -0
- package/dist/config/transform.file.d.ts.map +1 -0
- package/dist/config/transform.file.js +4 -0
- package/dist/config/transform.file.js.map +1 -0
- package/dist/config/transform.style.d.ts +2 -0
- package/dist/config/transform.style.d.ts.map +1 -0
- package/dist/config/transform.style.js +4 -0
- package/dist/config/transform.style.js.map +1 -0
- package/dist/context/BrowserStorageContext.d.ts +25 -0
- package/dist/context/BrowserStorageContext.d.ts.map +1 -0
- package/dist/context/BrowserStorageContext.js +97 -0
- package/dist/context/BrowserStorageContext.js.map +1 -0
- package/dist/context/ModularArchContext.d.ts +20 -0
- package/dist/context/ModularArchContext.d.ts.map +1 -0
- package/dist/context/ModularArchContext.js +67 -0
- package/dist/context/ModularArchContext.js.map +1 -0
- package/dist/context/NotificationContext.d.ts +15 -0
- package/dist/context/NotificationContext.d.ts.map +1 -0
- package/dist/context/NotificationContext.js +43 -0
- package/dist/context/NotificationContext.js.map +1 -0
- package/dist/context/__tests__/ModularArchContext.test.d.ts +2 -0
- package/dist/context/__tests__/ModularArchContext.test.d.ts.map +1 -0
- package/dist/context/__tests__/ModularArchContext.test.js +331 -0
- package/dist/context/__tests__/ModularArchContext.test.js.map +1 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +4 -0
- package/dist/context/index.js.map +1 -0
- package/dist/hooks/__tests__/useModularArchContext.test.d.ts +2 -0
- package/dist/hooks/__tests__/useModularArchContext.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/useModularArchContext.test.js +39 -0
- package/dist/hooks/__tests__/useModularArchContext.test.js.map +1 -0
- package/dist/hooks/__tests__/useNamespaces.test.d.ts +2 -0
- package/dist/hooks/__tests__/useNamespaces.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/useNamespaces.test.js +62 -0
- package/dist/hooks/__tests__/useNamespaces.test.js.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useModularArchContext.d.ts +5 -0
- package/dist/hooks/useModularArchContext.d.ts.map +1 -0
- package/dist/hooks/useModularArchContext.js +11 -0
- package/dist/hooks/useModularArchContext.js.map +1 -0
- package/dist/hooks/useNamespaceSelector.d.ts +10 -0
- package/dist/hooks/useNamespaceSelector.d.ts.map +1 -0
- package/dist/hooks/useNamespaceSelector.js +13 -0
- package/dist/hooks/useNamespaceSelector.js.map +1 -0
- package/dist/hooks/useNamespaces.d.ts +6 -0
- package/dist/hooks/useNamespaces.d.ts.map +1 -0
- package/dist/hooks/useNamespaces.js +34 -0
- package/dist/hooks/useNamespaces.js.map +1 -0
- package/dist/hooks/useNotification.d.ts +18 -0
- package/dist/hooks/useNotification.d.ts.map +1 -0
- package/dist/hooks/useNotification.js +74 -0
- package/dist/hooks/useNotification.js.map +1 -0
- package/dist/hooks/useQueryParamNamespaces.d.ts +2 -0
- package/dist/hooks/useQueryParamNamespaces.d.ts.map +1 -0
- package/dist/hooks/useQueryParamNamespaces.js +9 -0
- package/dist/hooks/useQueryParamNamespaces.js.map +1 -0
- package/dist/hooks/useSettings.d.ts +9 -0
- package/dist/hooks/useSettings.d.ts.map +1 -0
- package/dist/hooks/useSettings.js +72 -0
- package/dist/hooks/useSettings.js.map +1 -0
- package/dist/hooks/useTimeBasedRefresh.d.ts +4 -0
- package/dist/hooks/useTimeBasedRefresh.d.ts.map +1 -0
- package/dist/hooks/useTimeBasedRefresh.js +32 -0
- package/dist/hooks/useTimeBasedRefresh.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/jest.config.d.ts +21 -0
- package/dist/jest.config.d.ts.map +1 -0
- package/dist/jest.config.js +41 -0
- package/dist/jest.config.js.map +1 -0
- package/dist/types/common.d.ts +68 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +14 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/typeHelpers.d.ts +147 -0
- package/dist/types/typeHelpers.d.ts.map +1 -0
- package/dist/types/typeHelpers.js +2 -0
- package/dist/types/typeHelpers.js.map +1 -0
- package/dist/utilities/appUtils.d.ts +2 -0
- package/dist/utilities/appUtils.d.ts.map +1 -0
- package/dist/utilities/appUtils.js +4 -0
- package/dist/utilities/appUtils.js.map +1 -0
- package/dist/utilities/const.d.ts +8 -0
- package/dist/utilities/const.d.ts.map +1 -0
- package/dist/utilities/const.js +9 -0
- package/dist/utilities/const.js.map +1 -0
- package/dist/utilities/index.d.ts +9 -0
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utilities/index.js +10 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/useDeepCompareMemoize.d.ts +2 -0
- package/dist/utilities/useDeepCompareMemoize.d.ts.map +1 -0
- package/dist/utilities/useDeepCompareMemoize.js +10 -0
- package/dist/utilities/useDeepCompareMemoize.js.map +1 -0
- package/dist/utilities/useEventListener.d.ts +2 -0
- package/dist/utilities/useEventListener.d.ts.map +1 -0
- package/dist/utilities/useEventListener.js +10 -0
- package/dist/utilities/useEventListener.js.map +1 -0
- package/dist/utilities/useFetchState.d.ts +92 -0
- package/dist/utilities/useFetchState.d.ts.map +1 -0
- package/dist/utilities/useFetchState.js +153 -0
- package/dist/utilities/useFetchState.js.map +1 -0
- package/dist/utilities/useGenericObjectState.d.ts +9 -0
- package/dist/utilities/useGenericObjectState.d.ts.map +1 -0
- package/dist/utilities/useGenericObjectState.js +14 -0
- package/dist/utilities/useGenericObjectState.js.map +1 -0
- package/dist/utilities/useMakeFetchObject.d.ts +4 -0
- package/dist/utilities/useMakeFetchObject.d.ts.map +1 -0
- package/dist/utilities/useMakeFetchObject.js +6 -0
- package/dist/utilities/useMakeFetchObject.js.map +1 -0
- package/dist/utilities/utils.d.ts +26 -0
- package/dist/utilities/utils.d.ts.map +1 -0
- package/dist/utilities/utils.js +104 -0
- package/dist/utilities/utils.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { DeploymentMode } from '../utilities';
|
|
2
|
+
export const asEnumMember = (member, e) => (isEnumMember(member, e) ? member : null);
|
|
3
|
+
export const isEnumMember = (member, e) => {
|
|
4
|
+
if (member != null) {
|
|
5
|
+
return Object.entries(e)
|
|
6
|
+
.filter(([key]) => Number.isNaN(Number(key)))
|
|
7
|
+
.map(([, value]) => value)
|
|
8
|
+
.includes(member);
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Utility function to load the Kubeflow dashboard script for kubeflow deployments
|
|
14
|
+
* @param deploymentMode - The current deployment mode
|
|
15
|
+
* @param onSuccess - Callback function to execute when script loads successfully
|
|
16
|
+
* @param onError - Callback function to execute when script fails to load
|
|
17
|
+
*/
|
|
18
|
+
export const kubeflowScriptLoader = (deploymentMode, onSuccess, onError) => {
|
|
19
|
+
const scriptUrl = '/dashboard_lib.bundle.js';
|
|
20
|
+
// Only load script for Kubeflow deployments
|
|
21
|
+
if (deploymentMode !== DeploymentMode.Kubeflow) {
|
|
22
|
+
// eslint-disable-next-line no-console
|
|
23
|
+
console.warn('kubeflowScriptLoader: Script not loaded, only needed for kubeflow deployments');
|
|
24
|
+
onSuccess();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
// Helper function to dynamically load a script
|
|
28
|
+
const loadScript = (src, onLoad, onLoadError) => {
|
|
29
|
+
const script = document.createElement('script');
|
|
30
|
+
script.src = src;
|
|
31
|
+
script.async = true;
|
|
32
|
+
script.onload = onLoad;
|
|
33
|
+
script.onerror = onLoadError;
|
|
34
|
+
document.head.appendChild(script);
|
|
35
|
+
};
|
|
36
|
+
// Check if script exists before attempting to load it
|
|
37
|
+
fetch(scriptUrl, { method: 'HEAD' })
|
|
38
|
+
.then((response) => {
|
|
39
|
+
if (response.ok) {
|
|
40
|
+
loadScript(scriptUrl, onSuccess, () => {
|
|
41
|
+
// eslint-disable-next-line no-console
|
|
42
|
+
console.error('Failed to load the script');
|
|
43
|
+
const error = new Error('Failed to load the script');
|
|
44
|
+
onError?.(error);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// eslint-disable-next-line no-console
|
|
49
|
+
console.warn('Script not found');
|
|
50
|
+
onSuccess();
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
.catch((err) => {
|
|
54
|
+
// eslint-disable-next-line no-console
|
|
55
|
+
console.error('Error checking script existence', err);
|
|
56
|
+
onError?.(err);
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Utility function to initialize Kubeflow namespace selection integration
|
|
61
|
+
* @param deploymentMode - The current deployment mode
|
|
62
|
+
* @param scriptLoaded - Whether the Kubeflow dashboard script is loaded
|
|
63
|
+
* @param onNamespaceSelected - Callback function when a namespace is selected
|
|
64
|
+
* @param onError - Callback function to execute when initialization fails
|
|
65
|
+
* @param mandatoryNamespace - Optional mandatory namespace that disables selection
|
|
66
|
+
* @returns boolean - Whether initialization was attempted
|
|
67
|
+
*/
|
|
68
|
+
export const kubeflowNamespaceLoader = (deploymentMode, scriptLoaded, onNamespaceSelected, onError, mandatoryNamespace) => {
|
|
69
|
+
// Only initialize for integrated Kubeflow deployments with loaded script
|
|
70
|
+
if (deploymentMode !== DeploymentMode.Kubeflow || !scriptLoaded) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
// Initialize the central dashboard client
|
|
74
|
+
try {
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76
|
+
window.centraldashboard.CentralDashboardEventHandler.init((cdeh) => {
|
|
77
|
+
if (mandatoryNamespace) {
|
|
78
|
+
// When mandatory namespace is set, ensure it's selected and disable selection
|
|
79
|
+
onNamespaceSelected(mandatoryNamespace);
|
|
80
|
+
// Disable namespace selection by overriding the handler
|
|
81
|
+
// eslint-disable-next-line no-param-reassign
|
|
82
|
+
cdeh.onNamespaceSelected = () => {
|
|
83
|
+
// Ignore attempts to change namespace when mandatory namespace is set
|
|
84
|
+
onNamespaceSelected(mandatoryNamespace);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// Normal behavior - allow namespace selection
|
|
89
|
+
// eslint-disable-next-line no-param-reassign
|
|
90
|
+
cdeh.onNamespaceSelected = onNamespaceSelected;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
/* eslint-disable no-console */
|
|
97
|
+
console.error('Failed to initialize central dashboard client', err);
|
|
98
|
+
if (err instanceof Error && onError) {
|
|
99
|
+
onError(err);
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|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,YAAY,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0CAA0C;IAC1C,IAAI,CAAC;QACH,8DAA8D;QAC9D,MAAM,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE;YACtE,IAAI,kBAAkB,EAAE,CAAC;gBACvB,8EAA8E;gBAC9E,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;gBACxC,wDAAwD;gBACxD,6CAA6C;gBAC7C,IAAI,CAAC,mBAAmB,GAAG,GAAG,EAAE;oBAC9B,sEAAsE;oBACtE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;gBAC1C,CAAC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,8CAA8C;gBAC9C,6CAA6C;gBAC7C,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;YACjD,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,+BAA+B;QAC/B,OAAO,CAAC,KAAK,CAAC,+CAA+C,EAAE,GAAG,CAAC,CAAC;QACpE,IAAI,GAAG,YAAY,KAAK,IAAI,OAAO,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mod-arch-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Core functionality and API utilities for modular architecture micro-frontend projects",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"*.css",
|
|
10
|
+
"*.scss"
|
|
11
|
+
],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20.0.0"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc && tsc-alias",
|
|
22
|
+
"test": "run-s test:lint test:unit test:type-check",
|
|
23
|
+
"test:jest": "jest",
|
|
24
|
+
"test:unit": "npm run test:jest -- --silent",
|
|
25
|
+
"test:type-check": "tsc --noEmit",
|
|
26
|
+
"test:fix": "eslint --ext .js,.ts,.jsx,.tsx . --fix",
|
|
27
|
+
"test:lint": "eslint --max-warnings 0 --ext .js,.ts,.jsx,.tsx .",
|
|
28
|
+
"prepare": "npm run build",
|
|
29
|
+
"prepublishOnly": "npm run test"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/opendatahub-io/mod-arch-library.git",
|
|
34
|
+
"directory": "mod-arch-core"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/opendatahub-io/mod-arch-library/tree/main/mod-arch-core#readme",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/opendatahub-io/mod-arch-library/issues"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"modular-architecture",
|
|
42
|
+
"micro-frontend",
|
|
43
|
+
"core",
|
|
44
|
+
"api",
|
|
45
|
+
"hooks",
|
|
46
|
+
"context",
|
|
47
|
+
"ui-library"
|
|
48
|
+
],
|
|
49
|
+
"author": "OpenDataHub.io",
|
|
50
|
+
"license": "Apache-2.0",
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"react": ">=16.8.0",
|
|
53
|
+
"react-dom": ">=16.8.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@babel/preset-env": "^7.21.5",
|
|
57
|
+
"@babel/preset-react": "^7.18.6",
|
|
58
|
+
"@babel/preset-typescript": "^7.21.5",
|
|
59
|
+
"@testing-library/dom": "^10.4.0",
|
|
60
|
+
"@testing-library/jest-dom": "^6.6.2",
|
|
61
|
+
"@testing-library/react": "^16.1.0",
|
|
62
|
+
"@types/jest": "^29.5.13",
|
|
63
|
+
"@types/lodash-es": "^4.17.8",
|
|
64
|
+
"core-js": "^3.40.0",
|
|
65
|
+
"expect": "^29.7.0",
|
|
66
|
+
"jest": "^29.7.0",
|
|
67
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
68
|
+
"ts-jest": "^29.2.6",
|
|
69
|
+
"tsc-alias": "^1.8.15",
|
|
70
|
+
"typescript": "^5.0.4"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"lodash-es": "^4.17.15",
|
|
74
|
+
"tslib": "^2.6.2"
|
|
75
|
+
},
|
|
76
|
+
"optionalDependencies": {
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
|
78
|
+
"@typescript-eslint/parser": "^8.26.1",
|
|
79
|
+
"eslint": "^8.57.0",
|
|
80
|
+
"eslint-config-prettier": "^9.1.0",
|
|
81
|
+
"eslint-import-resolver-node": "^0.3.7",
|
|
82
|
+
"eslint-import-resolver-typescript": "^3.8.3",
|
|
83
|
+
"eslint-plugin-cypress": "^3.3.0",
|
|
84
|
+
"eslint-plugin-import": "^2.31.0",
|
|
85
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
86
|
+
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
87
|
+
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
|
88
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
89
|
+
"eslint-plugin-react": "^7.37.2",
|
|
90
|
+
"eslint-plugin-react-hooks": "^5.2.0"
|
|
91
|
+
}
|
|
92
|
+
}
|