propro-common-components 0.0.95 → 0.0.97
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/propro-common-components.js +56 -44
- package/package.json +6 -4
@@ -6,6 +6,7 @@ import React__default, { useCallback, createContext, useMemo as useMemo$1, creat
|
|
6
6
|
import { useMutation, QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
7
7
|
import axios from "axios";
|
8
8
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
9
|
+
import { useNavigate } from "react-router-dom";
|
9
10
|
function _mergeNamespaces(m, g) {
|
10
11
|
for (var b = 0; b < g.length; b++) {
|
11
12
|
const _ = g[b];
|
@@ -37105,7 +37106,7 @@ var parseStyle = function m(g) {
|
|
37105
37106
|
function uniqueHash(m, g) {
|
37106
37107
|
return murmur2$1("".concat(m.join("%")).concat(g));
|
37107
37108
|
}
|
37108
|
-
function Empty
|
37109
|
+
function Empty() {
|
37109
37110
|
return null;
|
37110
37111
|
}
|
37111
37112
|
var STYLE_PREFIX = "style";
|
@@ -37165,7 +37166,7 @@ function useStyleRegister(m, g) {
|
|
37165
37166
|
return function(ye) {
|
37166
37167
|
var ve;
|
37167
37168
|
if (!Z || re || !U)
|
37168
|
-
ve = /* @__PURE__ */ React.createElement(Empty
|
37169
|
+
ve = /* @__PURE__ */ React.createElement(Empty, null);
|
37169
37170
|
else {
|
37170
37171
|
var Se;
|
37171
37172
|
ve = /* @__PURE__ */ React.createElement("style", _extends$5({}, (Se = {}, _defineProperty$1(Se, ATTR_TOKEN, me), _defineProperty$1(Se, ATTR_MARK, be), Se), {
|
@@ -56916,14 +56917,14 @@ var _propertyDesc = function(m, g) {
|
|
56916
56917
|
writable: !(m & 4),
|
56917
56918
|
value: g
|
56918
56919
|
};
|
56919
|
-
}, dP$
|
56920
|
-
return dP$
|
56920
|
+
}, dP$1 = require_objectDp(), createDesc$2 = _propertyDesc, _hide = require_descriptors() ? function(m, g, b) {
|
56921
|
+
return dP$1.f(m, g, createDesc$2(1, b));
|
56921
56922
|
} : function(m, g, b) {
|
56922
56923
|
return m[g] = b, m;
|
56923
56924
|
}, hasOwnProperty = {}.hasOwnProperty, _has = function(m, g) {
|
56924
56925
|
return hasOwnProperty.call(m, g);
|
56925
|
-
}, global$4 = _globalExports, core$2 = _coreExports, ctx = _ctx, hide$1 = _hide, has$6 = _has, PROTOTYPE$
|
56926
|
-
var _ = m & $export$5.F, x = m & $export$5.G, C = m & $export$5.S, $ = m & $export$5.P, I = m & $export$5.B, R = m & $export$5.W, P = x ? core$2 : core$2[g] || (core$2[g] = {}), N = P[PROTOTYPE$
|
56926
|
+
}, global$4 = _globalExports, core$2 = _coreExports, ctx = _ctx, hide$1 = _hide, has$6 = _has, PROTOTYPE$1 = "prototype", $export$5 = function(m, g, b) {
|
56927
|
+
var _ = m & $export$5.F, x = m & $export$5.G, C = m & $export$5.S, $ = m & $export$5.P, I = m & $export$5.B, R = m & $export$5.W, P = x ? core$2 : core$2[g] || (core$2[g] = {}), N = P[PROTOTYPE$1], z = x ? global$4 : C ? global$4[g] : (global$4[g] || {})[PROTOTYPE$1], D, U, W;
|
56927
56928
|
x && (b = g);
|
56928
56929
|
for (D in b)
|
56929
56930
|
U = !_ && z && z[D] !== void 0, !(U && has$6(P, D)) && (W = U ? z[D] : b[D], P[D] = x && typeof z[D] != "function" ? b[D] : I && U ? ctx(W, global$4) : R && z[D] == W ? function(V) {
|
@@ -56941,7 +56942,7 @@ var _propertyDesc = function(m, g) {
|
|
56941
56942
|
}
|
56942
56943
|
return V.apply(this, arguments);
|
56943
56944
|
};
|
56944
|
-
return Z[PROTOTYPE$
|
56945
|
+
return Z[PROTOTYPE$1] = V[PROTOTYPE$1], Z;
|
56945
56946
|
}(W) : $ && typeof W == "function" ? ctx(Function.call, W) : W, $ && ((P.virtual || (P.virtual = {}))[D] = W, m & $export$5.R && N && !N[D] && hide$1(N, D, W)));
|
56946
56947
|
};
|
56947
56948
|
$export$5.F = 1;
|
@@ -57001,15 +57002,19 @@ var _sharedExports = _shared.exports, id$1 = 0, px = Math.random(), _uid = funct
|
|
57001
57002
|
return "Symbol(".concat(m === void 0 ? "" : m, ")_", (++id$1 + px).toString(36));
|
57002
57003
|
}, shared$1 = _sharedExports("keys"), uid$2 = _uid, _sharedKey = function(m) {
|
57003
57004
|
return shared$1[m] || (shared$1[m] = uid$2(m));
|
57004
|
-
}, has$5 = _has, toIObject$4 = _toIobject, arrayIndexOf = _arrayIncludes(!1), IE_PROTO$
|
57005
|
+
}, has$5 = _has, toIObject$4 = _toIobject, arrayIndexOf = _arrayIncludes(!1), IE_PROTO$1 = _sharedKey("IE_PROTO"), _objectKeysInternal = function(m, g) {
|
57005
57006
|
var b = toIObject$4(m), _ = 0, x = [], C;
|
57006
57007
|
for (C in b)
|
57007
|
-
C != IE_PROTO$
|
57008
|
+
C != IE_PROTO$1 && has$5(b, C) && x.push(C);
|
57008
57009
|
for (; g.length > _; )
|
57009
57010
|
has$5(b, C = g[_++]) && (~arrayIndexOf(x, C) || x.push(C));
|
57010
57011
|
return x;
|
57011
|
-
}, _enumBugKeys
|
57012
|
-
|
57012
|
+
}, _enumBugKeys, hasRequired_enumBugKeys;
|
57013
|
+
function require_enumBugKeys() {
|
57014
|
+
return hasRequired_enumBugKeys || (hasRequired_enumBugKeys = 1, _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")), _enumBugKeys;
|
57015
|
+
}
|
57016
|
+
var $keys$2 = _objectKeysInternal, enumBugKeys = require_enumBugKeys(), _objectKeys = Object.keys || function(g) {
|
57017
|
+
return $keys$2(g, enumBugKeys);
|
57013
57018
|
}, _objectGops = {};
|
57014
57019
|
_objectGops.f = Object.getOwnPropertySymbols;
|
57015
57020
|
var _objectPie = {}, hasRequired_objectPie;
|
@@ -57052,8 +57057,8 @@ _extends.default = _assign2.default || function(m) {
|
|
57052
57057
|
}
|
57053
57058
|
return m;
|
57054
57059
|
};
|
57055
|
-
var has$4 = _has, toObject$2 = _toObject, IE_PROTO
|
57056
|
-
return m = toObject$2(m), has$4(m, IE_PROTO
|
57060
|
+
var has$4 = _has, toObject$2 = _toObject, IE_PROTO = _sharedKey("IE_PROTO"), ObjectProto$1 = Object.prototype, _objectGpo = Object.getPrototypeOf || function(m) {
|
57061
|
+
return m = toObject$2(m), has$4(m, IE_PROTO) ? m[IE_PROTO] : typeof m.constructor == "function" && m instanceof m.constructor ? m.constructor.prototype : m instanceof Object ? ObjectProto$1 : null;
|
57057
57062
|
}, _objectSap, hasRequired_objectSap;
|
57058
57063
|
function require_objectSap() {
|
57059
57064
|
if (hasRequired_objectSap)
|
@@ -57105,12 +57110,20 @@ var possibleConstructorReturn = {}, _typeof$1 = {}, toInteger = _toInteger, defi
|
|
57105
57110
|
var _ = String(defined(g)), x = toInteger(b), C = _.length, $, I;
|
57106
57111
|
return x < 0 || x >= C ? m ? "" : void 0 : ($ = _.charCodeAt(x), $ < 55296 || $ > 56319 || x + 1 === C || (I = _.charCodeAt(x + 1)) < 56320 || I > 57343 ? m ? _.charAt(x) : $ : m ? _.slice(x, x + 2) : ($ - 55296 << 10) + (I - 56320) + 65536);
|
57107
57112
|
};
|
57108
|
-
}, _redefine = _hide, _iterators = {},
|
57109
|
-
|
57110
|
-
|
57111
|
-
|
57112
|
-
|
57113
|
-
|
57113
|
+
}, _redefine = _hide, _iterators = {}, _objectDps, hasRequired_objectDps;
|
57114
|
+
function require_objectDps() {
|
57115
|
+
if (hasRequired_objectDps)
|
57116
|
+
return _objectDps;
|
57117
|
+
hasRequired_objectDps = 1;
|
57118
|
+
var m = require_objectDp(), g = _anObject, b = _objectKeys;
|
57119
|
+
return _objectDps = require_descriptors() ? Object.defineProperties : function(x, C) {
|
57120
|
+
g(x);
|
57121
|
+
for (var $ = b(C), I = $.length, R = 0, P; I > R; )
|
57122
|
+
m.f(x, P = $[R++], C[P]);
|
57123
|
+
return x;
|
57124
|
+
}, _objectDps;
|
57125
|
+
}
|
57126
|
+
var _html, hasRequired_html;
|
57114
57127
|
function require_html() {
|
57115
57128
|
if (hasRequired_html)
|
57116
57129
|
return _html;
|
@@ -57118,16 +57131,24 @@ function require_html() {
|
|
57118
57131
|
var m = _globalExports.document;
|
57119
57132
|
return _html = m && m.documentElement, _html;
|
57120
57133
|
}
|
57121
|
-
var
|
57122
|
-
|
57123
|
-
|
57124
|
-
|
57125
|
-
|
57126
|
-
|
57127
|
-
},
|
57128
|
-
|
57129
|
-
|
57130
|
-
|
57134
|
+
var _objectCreate, hasRequired_objectCreate;
|
57135
|
+
function require_objectCreate() {
|
57136
|
+
if (hasRequired_objectCreate)
|
57137
|
+
return _objectCreate;
|
57138
|
+
hasRequired_objectCreate = 1;
|
57139
|
+
var m = _anObject, g = require_objectDps(), b = require_enumBugKeys(), _ = _sharedKey("IE_PROTO"), x = function() {
|
57140
|
+
}, C = "prototype", $ = function() {
|
57141
|
+
var I = require_domCreate()("iframe"), R = b.length, P = "<", N = ">", z;
|
57142
|
+
for (I.style.display = "none", require_html().appendChild(I), I.src = "javascript:", z = I.contentWindow.document, z.open(), z.write(P + "script" + N + "document.F=Object" + P + "/script" + N), z.close(), $ = z.F; R--; )
|
57143
|
+
delete $[C][b[R]];
|
57144
|
+
return $();
|
57145
|
+
};
|
57146
|
+
return _objectCreate = Object.create || function(R, P) {
|
57147
|
+
var N;
|
57148
|
+
return R !== null ? (x[C] = m(R), N = new x(), x[C] = null, N[_] = R) : N = $(), P === void 0 ? N : g(N, P);
|
57149
|
+
}, _objectCreate;
|
57150
|
+
}
|
57151
|
+
var _wks = { exports: {} }, store = _sharedExports("wks"), uid$1 = _uid, Symbol$1 = _globalExports.Symbol, USE_SYMBOL = typeof Symbol$1 == "function", $exports = _wks.exports = function(m) {
|
57131
57152
|
return store[m] || (store[m] = USE_SYMBOL && Symbol$1[m] || (USE_SYMBOL ? Symbol$1 : uid$1)("Symbol." + m));
|
57132
57153
|
};
|
57133
57154
|
$exports.store = store;
|
@@ -57138,7 +57159,7 @@ function require_iterCreate() {
|
|
57138
57159
|
if (hasRequired_iterCreate)
|
57139
57160
|
return _iterCreate;
|
57140
57161
|
hasRequired_iterCreate = 1;
|
57141
|
-
var m =
|
57162
|
+
var m = require_objectCreate(), g = _propertyDesc, b = _setToStringTag, _ = {};
|
57142
57163
|
return _hide(_, _wksExports("iterator"), function() {
|
57143
57164
|
return this;
|
57144
57165
|
}), _iterCreate = function(x, C, $) {
|
@@ -57261,7 +57282,7 @@ var iterator$1 = _wksExt.f("iterator"), iterator = { default: iterator$1, __esMo
|
|
57261
57282
|
return g;
|
57262
57283
|
}, cof = _cof, _isArray = Array.isArray || function(g) {
|
57263
57284
|
return cof(g) == "Array";
|
57264
|
-
}, _objectGopnExt = {}, _objectGopn = {}, $keys$1 = _objectKeysInternal, hiddenKeys =
|
57285
|
+
}, _objectGopnExt = {}, _objectGopn = {}, $keys$1 = _objectKeysInternal, hiddenKeys = require_enumBugKeys().concat("length", "prototype");
|
57265
57286
|
_objectGopn.f = Object.getOwnPropertyNames || function(g) {
|
57266
57287
|
return $keys$1(g, hiddenKeys);
|
57267
57288
|
};
|
@@ -57285,7 +57306,7 @@ _objectGopd.f = require_descriptors() ? gOPD$1 : function(g, b) {
|
|
57285
57306
|
if (has$1(g, b))
|
57286
57307
|
return createDesc$1(!pIE.f.call(g, b), g[b]);
|
57287
57308
|
};
|
57288
|
-
var global$1 = _globalExports, has = _has, DESCRIPTORS = require_descriptors(), $export$2 = _export, redefine = _redefine, META = _metaExports.KEY, $fails = require_fails(), shared = _sharedExports, setToStringTag = _setToStringTag, uid = _uid, wks = _wksExports, wksExt = _wksExt, wksDefine = _wksDefine, enumKeys = _enumKeys, isArray = _isArray, anObject = _anObject, isObject = _isObject, toObject = _toObject, toIObject = _toIobject, toPrimitive = _toPrimitive, createDesc = _propertyDesc, _create$1 =
|
57309
|
+
var global$1 = _globalExports, has = _has, DESCRIPTORS = require_descriptors(), $export$2 = _export, redefine = _redefine, META = _metaExports.KEY, $fails = require_fails(), shared = _sharedExports, setToStringTag = _setToStringTag, uid = _uid, wks = _wksExports, wksExt = _wksExt, wksDefine = _wksDefine, enumKeys = _enumKeys, isArray = _isArray, anObject = _anObject, isObject = _isObject, toObject = _toObject, toIObject = _toIobject, toPrimitive = _toPrimitive, createDesc = _propertyDesc, _create$1 = require_objectCreate(), gOPNExt = _objectGopnExt, $GOPD = _objectGopd, $GOPS = _objectGops, $DP = require_objectDp(), $keys = _objectKeys, gOPD = $GOPD.f, dP = $DP.f, gOPN = gOPNExt.f, $Symbol = global$1.Symbol, $JSON = global$1.JSON, _stringify = $JSON && $JSON.stringify, PROTOTYPE = "prototype", HIDDEN = wks("_hidden"), TO_PRIMITIVE = wks("toPrimitive"), isEnum = {}.propertyIsEnumerable, SymbolRegistry = shared("symbol-registry"), AllSymbols = shared("symbols"), OPSymbols = shared("op-symbols"), ObjectProto = Object[PROTOTYPE], USE_NATIVE = typeof $Symbol == "function" && !!$GOPS.f, QObject = global$1.QObject, setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild, setSymbolDesc = DESCRIPTORS && $fails(function() {
|
57289
57310
|
return _create$1(dP({}, "a", {
|
57290
57311
|
get: function() {
|
57291
57312
|
return dP(this, "a", { value: 7 }).a;
|
@@ -57463,7 +57484,7 @@ function require_setProto() {
|
|
57463
57484
|
var $export$1 = _export;
|
57464
57485
|
$export$1($export$1.S, "Object", { setPrototypeOf: require_setProto().set });
|
57465
57486
|
var setPrototypeOf$1 = _coreExports.Object.setPrototypeOf, setPrototypeOf = { default: setPrototypeOf$1, __esModule: !0 }, $export = _export;
|
57466
|
-
$export($export.S, "Object", { create:
|
57487
|
+
$export($export.S, "Object", { create: require_objectCreate() });
|
57467
57488
|
var $Object = _coreExports.Object, create$1 = function(g, b) {
|
57468
57489
|
return $Object.create(g, b);
|
57469
57490
|
}, create = { default: create$1, __esModule: !0 };
|
@@ -65348,17 +65369,8 @@ function PrivateRoute({
|
|
65348
65369
|
// permission,
|
65349
65370
|
children: m
|
65350
65371
|
}) {
|
65351
|
-
const
|
65352
|
-
|
65353
|
-
g({ type: "SET_LOADING", payload: !0 }), await axios.post("/api/refreshToken"), g({ type: "SET_LOADING", payload: !1 });
|
65354
|
-
} catch (_) {
|
65355
|
-
_.response.status === 401 && _.response.data.redirectUrl && (window.location.href = _.response.data.redirectUrl), g({ type: "SET_LOADING", payload: !1 }), console.log("refreshed");
|
65356
|
-
}
|
65357
|
-
};
|
65358
|
-
return useEffect(() => (b(), setInterval(() => {
|
65359
|
-
b();
|
65360
|
-
}, 30 * 60 * 1e3), () => {
|
65361
|
-
}), []), /* @__PURE__ */ jsx$2(Fragment$2, { children: m });
|
65372
|
+
const g = getCookie("account"), b = useNavigate();
|
65373
|
+
return g === void 0 && (console.log("ndndjnjdnjndj"), b("/session-timed-out")), /* @__PURE__ */ jsx$2(Fragment$2, { children: m });
|
65362
65374
|
}
|
65363
65375
|
export {
|
65364
65376
|
AppContext,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "propro-common-components",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.97",
|
4
4
|
"type": "module",
|
5
5
|
"main": "dist/propro-common-components.js",
|
6
6
|
"types": "dist/main.d.ts",
|
@@ -49,6 +49,7 @@
|
|
49
49
|
"lucide-react": "^0.309.0",
|
50
50
|
"react-error-boundary": "^4.0.12",
|
51
51
|
"react-lottie": "^1.2.4",
|
52
|
+
"react-router-dom": "^6.22.3",
|
52
53
|
"tailwind-merge": "^2.2.0",
|
53
54
|
"tailwindcss-animate": "^1.0.7"
|
54
55
|
},
|
@@ -77,10 +78,11 @@
|
|
77
78
|
"vite-plugin-lib-inject-css": "^1.3.0"
|
78
79
|
},
|
79
80
|
"peerDependencies": {
|
81
|
+
"@tanstack/react-query": "^5.22.2",
|
82
|
+
"@tanstack/react-query-devtools": "^5.24.0",
|
83
|
+
"axios": "^1.6.7",
|
80
84
|
"react": "^18.2.0",
|
81
85
|
"react-dom": "^18.2.0",
|
82
|
-
"
|
83
|
-
"@tanstack/react-query": "^5.22.2",
|
84
|
-
"@tanstack/react-query-devtools": "^5.24.0"
|
86
|
+
"react-router-dom": "^6.22.3"
|
85
87
|
}
|
86
88
|
}
|