oiu-core1 0.1.18 → 0.1.19
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,5 +1,5 @@
|
|
|
1
1
|
import { WebStorageStateStore as g, UserManager as h } from "oidc-client-ts";
|
|
2
|
-
import { A as p, P as s, a as o, d as l } from "./main-
|
|
2
|
+
import { A as p, P as s, a as o, d as l } from "./main-DtfJhAz_.js";
|
|
3
3
|
function w(c, e, t) {
|
|
4
4
|
return new _(c, e, t);
|
|
5
5
|
}
|
|
@@ -141,11 +141,28 @@ const fi = {
|
|
|
141
141
|
changeTheme(e, t) {
|
|
142
142
|
e.theme !== t.payload && (e.theme = t.payload, localStorage.setItem("theme", t.payload));
|
|
143
143
|
},
|
|
144
|
+
/**
|
|
145
|
+
* Remove the seed from redux state this will force the AuthenticationProvider to wait for reload a new identity.
|
|
146
|
+
* @param state
|
|
147
|
+
*/
|
|
148
|
+
clearSeed(e) {
|
|
149
|
+
e.auth.seed = void 0, e.auth.reason = "clearSeed", e.auth.identity = void 0;
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* Set the identity information and the reason of the operation this will trigger the AuthenticationProvider to update the identity information in the context.
|
|
153
|
+
* @param state
|
|
154
|
+
* @param action
|
|
155
|
+
* @returns
|
|
156
|
+
*/
|
|
144
157
|
setIdentity(e, t) {
|
|
145
|
-
e.auth.seed && e.auth.identity?.access_token === t.payload.identity?.access_token || (e.auth.seed = qt(), e.auth.reason = t.payload.reason, e.auth.identity = t.payload.identity
|
|
158
|
+
e.auth.seed && e.auth.identity?.access_token === t.payload.identity?.access_token || (e.auth.seed = qt(), e.auth.reason = t.payload.reason, e.auth.identity = t.payload.identity);
|
|
146
159
|
},
|
|
160
|
+
/**
|
|
161
|
+
* Clear the identity information from redux this will indicate there is no user logged in.
|
|
162
|
+
* @param state
|
|
163
|
+
*/
|
|
147
164
|
clearIdentity(e) {
|
|
148
|
-
e.auth.seed = qt(), e.auth.reason = "
|
|
165
|
+
e.auth.seed = qt(), e.auth.reason = "clearIdentity", e.auth.identity = void 0;
|
|
149
166
|
}
|
|
150
167
|
}
|
|
151
168
|
}), ie = (e) => e[ur];
|
|
@@ -676,7 +693,7 @@ function Ui({ className: e, children: t, getPermissionFor: n, defaultAbility: r
|
|
|
676
693
|
var Pr = /* @__PURE__ */ ((e) => (e[e.Always = 1] = "Always", e[e.Never = 2] = "Never", e[e.RedirectIfFails = 3] = "RedirectIfFails", e))(Pr || {});
|
|
677
694
|
const ji = () => import(
|
|
678
695
|
/* @vite-ignore */
|
|
679
|
-
"./index-
|
|
696
|
+
"./index-Dx2AK5iF.js"
|
|
680
697
|
);
|
|
681
698
|
async function Li(e, t, n) {
|
|
682
699
|
return (await ji()).default(e, t, n);
|
package/dist/main.js
CHANGED
|
@@ -5,12 +5,8 @@ export type AuthPayload = {
|
|
|
5
5
|
seed?: string;
|
|
6
6
|
/** Last reason of the operation */
|
|
7
7
|
reason: string;
|
|
8
|
+
/** Information of the customer profile */
|
|
8
9
|
identity?: Identity;
|
|
9
|
-
twoFactor?: {
|
|
10
|
-
username: string;
|
|
11
|
-
emailVerified: boolean;
|
|
12
|
-
phoneVerified: boolean;
|
|
13
|
-
};
|
|
14
10
|
};
|
|
15
11
|
export type ScreenPayload = {
|
|
16
12
|
width: number;
|
|
@@ -45,8 +41,6 @@ type AuthAction = Action<string> & {
|
|
|
45
41
|
reason: string;
|
|
46
42
|
/** Information of the customer profile */
|
|
47
43
|
identity?: Identity;
|
|
48
|
-
/** Customer is supplied username and passwd correct and now require check the 2fa */
|
|
49
|
-
twoFactor?: AuthPayload['twoFactor'];
|
|
50
44
|
};
|
|
51
45
|
};
|
|
52
46
|
/** App slice */
|
|
@@ -54,7 +48,22 @@ export declare const appSlice: import("@reduxjs/toolkit").Slice<AppStore, {
|
|
|
54
48
|
screenResize(state: import("immer").WritableDraft<AppStore>, action: ScreenAction): void;
|
|
55
49
|
spinUpdate(state: import("immer").WritableDraft<AppStore>, action: SpinAction): void;
|
|
56
50
|
changeTheme(state: import("immer").WritableDraft<AppStore>, action: ThemeAction): void;
|
|
51
|
+
/**
|
|
52
|
+
* Remove the seed from redux state this will force the AuthenticationProvider to wait for reload a new identity.
|
|
53
|
+
* @param state
|
|
54
|
+
*/
|
|
55
|
+
clearSeed(state: import("immer").WritableDraft<AppStore>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Set the identity information and the reason of the operation this will trigger the AuthenticationProvider to update the identity information in the context.
|
|
58
|
+
* @param state
|
|
59
|
+
* @param action
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
57
62
|
setIdentity(state: import("immer").WritableDraft<AppStore>, action: AuthAction): void;
|
|
63
|
+
/**
|
|
64
|
+
* Clear the identity information from redux this will indicate there is no user logged in.
|
|
65
|
+
* @param state
|
|
66
|
+
*/
|
|
58
67
|
clearIdentity(state: import("immer").WritableDraft<AppStore>): void;
|
|
59
68
|
}, "app", "app", import("@reduxjs/toolkit").SliceSelectors<AppStore>>;
|
|
60
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appSlice.d.ts","sourceRoot":"","sources":["../../../lib/redux/slices/appSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAe,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,MAAM,MAAM,WAAW,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"appSlice.d.ts","sourceRoot":"","sources":["../../../lib/redux/slices/appSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAe,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,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