@hitachivantara/app-shell-services 1.1.0 → 1.1.1
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/bundles/app-shell-services.esm.js +2080 -5
- package/dist/esm/_virtual/_cloneBuffer.js +4 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +8 -0
- package/dist/esm/_virtual/_nodeUtil.js +4 -0
- package/dist/esm/_virtual/cloneDeep.js +7 -0
- package/dist/esm/_virtual/isBuffer.js +4 -0
- package/dist/esm/_virtual/isEqual.js +7 -0
- package/dist/esm/hooks/Hooks.js +2 -1
- package/dist/esm/providers/ServiceManagerProvider.js +6 -3
- package/dist/esm/utils/serviceReference.js +2 -2
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2
|
+
function getDefaultExportFromCjs(x) {
|
|
3
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
commonjsGlobal,
|
|
7
|
+
getDefaultExportFromCjs
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as requireCloneDeep } from "../node_modules/lodash/cloneDeep.js";
|
|
3
|
+
var cloneDeepExports = requireCloneDeep();
|
|
4
|
+
const cloneDeep = /* @__PURE__ */ getDefaultExportFromCjs(cloneDeepExports);
|
|
5
|
+
export {
|
|
6
|
+
cloneDeep as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as requireIsEqual } from "../node_modules/lodash/isEqual.js";
|
|
3
|
+
var isEqualExports = requireIsEqual();
|
|
4
|
+
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(isEqualExports);
|
|
5
|
+
export {
|
|
6
|
+
isEqual as default
|
|
7
|
+
};
|
package/dist/esm/hooks/Hooks.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useCallback, useRef } from "react";
|
|
2
|
-
import
|
|
2
|
+
import cloneDeep from "../_virtual/cloneDeep.js";
|
|
3
|
+
import isEqual from "../_virtual/isEqual.js";
|
|
3
4
|
import { useAsync } from "./useAsync.js";
|
|
4
5
|
import { useServicesContext } from "./useServicesContext.js";
|
|
5
6
|
function useDeepMemo(value) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createContext, useMemo } from "react";
|
|
1
|
+
import { useMemo, createElement, createContext } from "react";
|
|
3
2
|
import { createServiceReference } from "../utils/serviceReference.js";
|
|
4
3
|
function createServiceReferenceMap(services = {}) {
|
|
5
4
|
return Object.entries(services).reduce(
|
|
@@ -81,7 +80,11 @@ const ServicesContext = createContext(
|
|
|
81
80
|
);
|
|
82
81
|
const ServiceManagerProvider = ({ config, children }) => {
|
|
83
82
|
const serviceManager = useMemo(() => createServiceManager(config), [config]);
|
|
84
|
-
return
|
|
83
|
+
return createElement(
|
|
84
|
+
ServicesContext.Provider,
|
|
85
|
+
{ value: serviceManager },
|
|
86
|
+
children
|
|
87
|
+
);
|
|
85
88
|
};
|
|
86
89
|
export {
|
|
87
90
|
ServicesContext,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElement } from "react";
|
|
2
2
|
function createServiceReferenceBase(serviceId, serviceConfig, getService) {
|
|
3
3
|
return {
|
|
4
4
|
serviceId,
|
|
@@ -157,7 +157,7 @@ function createServiceReference(serviceId, serviceConfig) {
|
|
|
157
157
|
function bindComponent(Component, configProps) {
|
|
158
158
|
const BoundComponent = (props) => {
|
|
159
159
|
const mergedProps = { ...configProps, ...props };
|
|
160
|
-
return
|
|
160
|
+
return createElement(Component, mergedProps);
|
|
161
161
|
};
|
|
162
162
|
return BoundComponent;
|
|
163
163
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/app-shell-services",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Hitachi Vantara UI Kit Team",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"bugs": "https://github.com/lumada-design/hv-uikit-react/issues",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"lodash": "^4.17.21"
|
|
18
|
+
"lodash-es": "^4.17.21"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "^18.2.0"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"access": "public",
|
|
37
37
|
"directory": "package"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "2a1e2bd77b1fdba98d31347adc7eb2ed7ab4fa5f",
|
|
40
40
|
"types": "./dist/types/index.d.ts",
|
|
41
41
|
"module": "dist/esm/index.js"
|
|
42
42
|
}
|