@crystaldesign/diva-seller 25.14.0-beta.2 → 25.14.0-beta.4
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/build/esm/index.js
CHANGED
|
@@ -111,6 +111,8 @@ import Settings from '@mui/icons-material/Settings';
|
|
|
111
111
|
globalThis.process = { env:env };
|
|
112
112
|
})();
|
|
113
113
|
|
|
114
|
+
function ownKeys$I(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
115
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$I(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
114
116
|
function useApiLogin(_ref) {
|
|
115
117
|
var jwt = _ref.jwt,
|
|
116
118
|
userRole = _ref.userRole,
|
|
@@ -118,6 +120,7 @@ function useApiLogin(_ref) {
|
|
|
118
120
|
organizationId = _ref.organizationId,
|
|
119
121
|
url = _ref.url;
|
|
120
122
|
var _useState = useState({
|
|
123
|
+
sessionGuids: {},
|
|
121
124
|
isLoading: true
|
|
122
125
|
}),
|
|
123
126
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -128,7 +131,7 @@ function useApiLogin(_ref) {
|
|
|
128
131
|
useEffect(function () {
|
|
129
132
|
getSessionGuid(userRole, loginMode).then(function (sessionGuid) {
|
|
130
133
|
return setState({
|
|
131
|
-
|
|
134
|
+
sessionGuids: _objectSpread$I(_objectSpread$I({}, state.sessionGuids), {}, _defineProperty({}, organizationId, sessionGuid)),
|
|
132
135
|
isLoading: false
|
|
133
136
|
});
|
|
134
137
|
});
|
|
@@ -2893,7 +2896,6 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2893
2896
|
var dontCheckIfSaved = false;
|
|
2894
2897
|
var _useTranslation = useTranslation(),
|
|
2895
2898
|
t = _useTranslation.t;
|
|
2896
|
-
_useTranslation.i18n;
|
|
2897
2899
|
var _useDivaCore = useDivaCore(),
|
|
2898
2900
|
_useDivaCore$state = _useDivaCore.state,
|
|
2899
2901
|
organization = _useDivaCore$state.organization,
|
|
@@ -2939,7 +2941,8 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2939
2941
|
url: orgState.apiConfig.api2["default"]
|
|
2940
2942
|
}),
|
|
2941
2943
|
loginDataIsLoading = _useApiLogin.isLoading,
|
|
2942
|
-
|
|
2944
|
+
sessionGuids = _useApiLogin.sessionGuids;
|
|
2945
|
+
var sessionGuid = sessionGuids[orgState.organization._id];
|
|
2943
2946
|
var _useState5 = useState(sessionGuid),
|
|
2944
2947
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2945
2948
|
oldSession = _useState6[0],
|
|
@@ -2967,7 +2970,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2967
2970
|
if (oldSession !== sessionGuid) setOldSession(sessionGuid);
|
|
2968
2971
|
useEffect(function () {
|
|
2969
2972
|
resetState();
|
|
2970
|
-
}, [loginMode]);
|
|
2973
|
+
}, [loginMode, organization]);
|
|
2971
2974
|
useEffect(function () {
|
|
2972
2975
|
if (isVisible && wasHidden) {
|
|
2973
2976
|
resetForCache();
|
|
@@ -7,7 +7,9 @@ interface Props {
|
|
|
7
7
|
loginMode: LoginMode;
|
|
8
8
|
}
|
|
9
9
|
interface LoginState {
|
|
10
|
-
|
|
10
|
+
sessionGuids: {
|
|
11
|
+
[orgId: string]: string;
|
|
12
|
+
};
|
|
11
13
|
isLoading: boolean;
|
|
12
14
|
}
|
|
13
15
|
export declare function useApiLogin({ jwt, userRole, loginMode, organizationId, url }: Props): LoginState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApiLogin.d.ts","sourceRoot":"","sources":["../../../../../../src/provider/hooks/useApiLogin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAG5E,UAAU,KAAK;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,UAAU;IAClB,
|
|
1
|
+
{"version":3,"file":"useApiLogin.d.ts","sourceRoot":"","sources":["../../../../../../src/provider/hooks/useApiLogin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAG5E,UAAU,KAAK;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,UAAU;IAClB,YAAY,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,KAAK,cAanF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-seller",
|
|
3
|
-
"version": "25.14.0-beta.
|
|
3
|
+
"version": "25.14.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"react-dom": "^18.3.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crystaldesign/analytics": "25.14.0-beta.
|
|
33
|
-
"@crystaldesign/products-component": "25.14.0-beta.
|
|
34
|
-
"@crystaldesign/real-time-viewer": "25.14.0-beta.
|
|
32
|
+
"@crystaldesign/analytics": "25.14.0-beta.4",
|
|
33
|
+
"@crystaldesign/products-component": "25.14.0-beta.4",
|
|
34
|
+
"@crystaldesign/real-time-viewer": "25.14.0-beta.4",
|
|
35
35
|
"@emotion/react": "^11.4.1",
|
|
36
36
|
"@emotion/styled": "^11.3.0",
|
|
37
37
|
"@mui/icons-material": "^6.1.5",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
},
|
|
44
44
|
"types": "./build/types/seller/src/index.d.ts",
|
|
45
45
|
"module": "build/esm/index.js",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "a7692c781337f6889fab2d95861a68e642448c98"
|
|
47
47
|
}
|