react-luminus-components 1.5.1 → 1.5.3
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/.vite/manifest.json +8 -8
- package/dist/components/UserSettings/LocalStorageBackupUS/CreateBackupModal/CreateBackupModal.d.ts +8 -0
- package/dist/components/UserSettings/LocalStorageBackupUS/LocalStorageBackupUS.d.ts +9 -0
- package/dist/components/UserSettings/index.d.ts +1 -0
- package/dist/localStorageUtils-CHdu9Xvf.js +46 -0
- package/dist/localStorageUtils-DUQHXXBp.cjs +1 -0
- package/dist/main.cjs.js +42 -42
- package/dist/main.es.js +3505 -3449
- package/dist/models/api/localStorageSettings/LocalStorageSettingsModel.d.ts +6 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/texts/UserSettingsTexts.d.ts +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/localStorage/localStorageUtils.d.ts +2 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +21 -19
- package/package.json +1 -1
- package/dist/apiPathUtils-CkTRKCPh.cjs +0 -1
- package/dist/apiPathUtils-DiqvB8mF.js +0 -15
package/dist/.vite/manifest.json
CHANGED
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"file": "ShortcutLinksContext-CH9KdcxB.js",
|
|
22
22
|
"name": "ShortcutLinksContext"
|
|
23
23
|
},
|
|
24
|
-
"
|
|
25
|
-
"file": "
|
|
26
|
-
"name": "
|
|
24
|
+
"_localStorageUtils-CHdu9Xvf.js": {
|
|
25
|
+
"file": "localStorageUtils-CHdu9Xvf.js",
|
|
26
|
+
"name": "localStorageUtils"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"file": "
|
|
30
|
-
"name": "
|
|
28
|
+
"_localStorageUtils-DUQHXXBp.cjs": {
|
|
29
|
+
"file": "localStorageUtils-DUQHXXBp.cjs",
|
|
30
|
+
"name": "localStorageUtils"
|
|
31
31
|
},
|
|
32
32
|
"_useLocalStorageState-C-xR82iw.js": {
|
|
33
33
|
"file": "useLocalStorageState-C-xR82iw.js",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"_FormDisabledProvider-BPet3cgR.cjs",
|
|
93
93
|
"_useRenderDraggableInPortal-QPCaw-E_.cjs",
|
|
94
94
|
"_useLocalStorageState-CAHDOgis.cjs",
|
|
95
|
-
"
|
|
95
|
+
"_localStorageUtils-DUQHXXBp.cjs"
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
98
|
"src/utils/index.ts": {
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"isEntry": true,
|
|
103
103
|
"imports": [
|
|
104
104
|
"_ShortcutLinksContext-CFDCR0fQ.cjs",
|
|
105
|
-
"
|
|
105
|
+
"_localStorageUtils-DUQHXXBp.cjs"
|
|
106
106
|
]
|
|
107
107
|
},
|
|
108
108
|
"style.css": {
|
package/dist/components/UserSettings/LocalStorageBackupUS/CreateBackupModal/CreateBackupModal.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
show: boolean;
|
|
3
|
+
handleClose: () => void;
|
|
4
|
+
onConfirm: () => void;
|
|
5
|
+
apiCreateBackup: string;
|
|
6
|
+
};
|
|
7
|
+
declare const CreateBackupModal: ({ show, handleClose, onConfirm, apiCreateBackup }: Props) => import("react").JSX.Element;
|
|
8
|
+
export default CreateBackupModal;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
apiUrls?: {
|
|
3
|
+
apiGetBackups?: string;
|
|
4
|
+
apiCreateBackup?: string;
|
|
5
|
+
apiDeleteBackup?: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
declare const LocalStorageBackupUS: ({ apiUrls: { apiGetBackups, apiCreateBackup, apiDeleteBackup, }, }: Props) => import("react").JSX.Element;
|
|
9
|
+
export default LocalStorageBackupUS;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { generatePath as u } from "react-router-dom";
|
|
2
|
+
const S = (o, t, r) => {
|
|
3
|
+
let e = o;
|
|
4
|
+
return t !== void 0 && (e = Math.max(e, t)), r !== void 0 && (e = Math.min(e, r)), e;
|
|
5
|
+
}, i = (o, t, r = !0) => Object.keys(o).reduce((e, n) => {
|
|
6
|
+
const c = o[n];
|
|
7
|
+
return r && (c == null || c === "") || (e[n] = t(c, n)), e;
|
|
8
|
+
}, {}), g = (o, t) => {
|
|
9
|
+
const r = t != null && t.query ? new URLSearchParams(i(t.query, (e) => (e == null ? void 0 : e.toString()) ?? "")) : null;
|
|
10
|
+
return `${u(o, t != null && t.path ? i(t.path, (e) => (e == null ? void 0 : e.toString()) ?? null) : void 0)}${r && r.size > 0 ? `?${r.toString()}` : ""}`;
|
|
11
|
+
}, l = [
|
|
12
|
+
{ key: "msal", mode: "includes" },
|
|
13
|
+
{ key: "token", mode: "exact" },
|
|
14
|
+
{ key: "user", mode: "exact" },
|
|
15
|
+
{ key: "user-delegation", mode: "exact" }
|
|
16
|
+
], a = (o = !0) => {
|
|
17
|
+
const t = {};
|
|
18
|
+
for (let r = 0; r < localStorage.length; r++) {
|
|
19
|
+
const e = localStorage.key(r);
|
|
20
|
+
if (e && !(o && l.some(({ key: n, mode: c }) => c === "includes" ? e.includes(n) : e === n)))
|
|
21
|
+
try {
|
|
22
|
+
t[e] = JSON.parse(localStorage.getItem(e));
|
|
23
|
+
} catch {
|
|
24
|
+
t[e] = localStorage.getItem(e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}, d = (o) => {
|
|
29
|
+
try {
|
|
30
|
+
const t = JSON.parse(o);
|
|
31
|
+
if (typeof t != "object" || t === null)
|
|
32
|
+
return !1;
|
|
33
|
+
Object.entries(t).forEach(([r, e]) => {
|
|
34
|
+
localStorage.setItem(r, JSON.stringify(e));
|
|
35
|
+
});
|
|
36
|
+
} catch {
|
|
37
|
+
return !1;
|
|
38
|
+
}
|
|
39
|
+
return !0;
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
a as d,
|
|
43
|
+
g,
|
|
44
|
+
S as l,
|
|
45
|
+
d as r
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("react-router-dom"),l=(o,t,r)=>{let e=o;return t!==void 0&&(e=Math.max(e,t)),r!==void 0&&(e=Math.min(e,r)),e},u=(o,t,r=!0)=>Object.keys(o).reduce((e,n)=>{const c=o[n];return r&&(c==null||c==="")||(e[n]=t(c,n)),e},{}),s=(o,t)=>{const r=t!=null&&t.query?new URLSearchParams(u(t.query,e=>(e==null?void 0:e.toString())??"")):null;return`${i.generatePath(o,t!=null&&t.path?u(t.path,e=>(e==null?void 0:e.toString())??null):void 0)}${r&&r.size>0?`?${r.toString()}`:""}`},S=[{key:"msal",mode:"includes"},{key:"token",mode:"exact"},{key:"user",mode:"exact"},{key:"user-delegation",mode:"exact"}],g=(o=!0)=>{const t={};for(let r=0;r<localStorage.length;r++){const e=localStorage.key(r);if(e&&!(o&&S.some(({key:n,mode:c})=>c==="includes"?e.includes(n):e===n)))try{t[e]=JSON.parse(localStorage.getItem(e))}catch{t[e]=localStorage.getItem(e)}}return t},a=o=>{try{const t=JSON.parse(o);if(typeof t!="object"||t===null)return!1;Object.entries(t).forEach(([r,e])=>{localStorage.setItem(r,JSON.stringify(e))})}catch{return!1}return!0};exports.dumpLocalStorage=g;exports.generateApiPath=s;exports.limitNumber=l;exports.restoreLocalStorage=a;
|