propro-common-components 0.1.6 → 0.1.8

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,6 +1,7 @@
1
1
  import React from "react";
2
2
  type StateType = {
3
3
  loading: boolean;
4
+ requestsEnabled: boolean;
4
5
  };
5
6
  interface Props {
6
7
  children: React.ReactNode;
@@ -37076,7 +37076,7 @@ var parseStyle = function m(g) {
37076
37076
  function uniqueHash(m, g) {
37077
37077
  return murmur2$1("".concat(m.join("%")).concat(g));
37078
37078
  }
37079
- function Empty() {
37079
+ function Empty$1() {
37080
37080
  return null;
37081
37081
  }
37082
37082
  var STYLE_PREFIX = "style";
@@ -37136,7 +37136,7 @@ function useStyleRegister(m, g) {
37136
37136
  return function(ye) {
37137
37137
  var ve;
37138
37138
  if (!Z || re || !U)
37139
- ve = /* @__PURE__ */ React.createElement(Empty, null);
37139
+ ve = /* @__PURE__ */ React.createElement(Empty$1, null);
37140
37140
  else {
37141
37141
  var Se;
37142
37142
  ve = /* @__PURE__ */ React.createElement("style", _extends$5({}, (Se = {}, _defineProperty$1(Se, ATTR_TOKEN, me), _defineProperty$1(Se, ATTR_MARK, be), Se), {
@@ -50560,20 +50560,32 @@ async function sendEmail(m, g) {
50560
50560
  g("failedSubmit");
50561
50561
  }
50562
50562
  }
50563
- const initialState = { loading: !1 }, AppContext = createContext({
50563
+ const initialState = {
50564
+ loading: !1,
50565
+ requestsEnabled: getCookie("account") !== void 0
50566
+ }, AppContext = createContext({
50564
50567
  state: initialState,
50565
50568
  dispatch: () => null
50566
50569
  }), AppProvider = ({ children: m, baseURL: g }) => {
50567
50570
  axios.defaults.baseURL = g, axios.defaults.withCredentials = !0;
50568
- const b = (C, $) => {
50569
- switch ($.type) {
50571
+ const b = ($, I) => {
50572
+ switch (I.type) {
50570
50573
  case "SET_LOADING":
50571
- return { ...C, loading: $.payload };
50574
+ return { ...$, loading: I.payload };
50575
+ case "SET_REQUEST_ENABLED":
50576
+ return { ...$, requestsEnabled: I.payload };
50572
50577
  default:
50573
- return C;
50578
+ return $;
50579
+ }
50580
+ }, [_, x] = useReducer(b, initialState), C = async () => {
50581
+ try {
50582
+ console.log("finfnfj"), await axios.post("/refreshToken"), x({ type: "SET_REQUEST_ENABLED", payload: !0 });
50583
+ } catch ($) {
50584
+ console.log($);
50574
50585
  }
50575
- }, [_, x] = useReducer(b, initialState);
50576
- return /* @__PURE__ */ jsx$2(AppContext.Provider, { value: { state: _, dispatch: x }, children: m });
50586
+ };
50587
+ return useEffect(() => (_.requestsEnabled || C(), () => {
50588
+ }), []), /* @__PURE__ */ jsx$2(AppContext.Provider, { value: { state: _, dispatch: x }, children: m });
50577
50589
  }, queryClient = new QueryClient(), AppHOC = ({ children: m }) => /* @__PURE__ */ jsxs(QueryClientProvider, { client: queryClient, children: [
50578
50590
  /* @__PURE__ */ jsx$2(ReactQueryDevtools, { initialIsOpen: !1 }),
50579
50591
  /* @__PURE__ */ jsx$2(AppProvider, { baseURL: "", children: m })
@@ -56848,11 +56860,15 @@ function require_domCreate() {
56848
56860
  return b ? g.createElement(_) : {};
56849
56861
  }, _domCreate;
56850
56862
  }
56851
- var _ie8DomDefine = !require_descriptors() && !require_fails()(function() {
56852
- return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
56853
- return 7;
56854
- } }).a != 7;
56855
- }), isObject$2 = _isObject, _toPrimitive = function(m, g) {
56863
+ var _ie8DomDefine, hasRequired_ie8DomDefine;
56864
+ function require_ie8DomDefine() {
56865
+ return hasRequired_ie8DomDefine || (hasRequired_ie8DomDefine = 1, _ie8DomDefine = !require_descriptors() && !require_fails()(function() {
56866
+ return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
56867
+ return 7;
56868
+ } }).a != 7;
56869
+ })), _ie8DomDefine;
56870
+ }
56871
+ var isObject$2 = _isObject, _toPrimitive = function(m, g) {
56856
56872
  if (!isObject$2(m))
56857
56873
  return m;
56858
56874
  var b, _;
@@ -56864,7 +56880,7 @@ function require_objectDp() {
56864
56880
  if (hasRequired_objectDp)
56865
56881
  return _objectDp;
56866
56882
  hasRequired_objectDp = 1;
56867
- var m = _anObject, g = _ie8DomDefine, b = _toPrimitive, _ = Object.defineProperty;
56883
+ var m = _anObject, g = require_ie8DomDefine(), b = _toPrimitive, _ = Object.defineProperty;
56868
56884
  return _objectDp.f = require_descriptors() ? Object.defineProperty : function(C, $, I) {
56869
56885
  if (m(C), $ = b($, !0), m(I), g)
56870
56886
  try {
@@ -56883,14 +56899,14 @@ var _propertyDesc = function(m, g) {
56883
56899
  writable: !(m & 4),
56884
56900
  value: g
56885
56901
  };
56886
- }, dP$1 = require_objectDp(), createDesc$2 = _propertyDesc, _hide = require_descriptors() ? function(m, g, b) {
56887
- return dP$1.f(m, g, createDesc$2(1, b));
56902
+ }, dP$2 = require_objectDp(), createDesc$2 = _propertyDesc, _hide = require_descriptors() ? function(m, g, b) {
56903
+ return dP$2.f(m, g, createDesc$2(1, b));
56888
56904
  } : function(m, g, b) {
56889
56905
  return m[g] = b, m;
56890
56906
  }, hasOwnProperty = {}.hasOwnProperty, _has = function(m, g) {
56891
56907
  return hasOwnProperty.call(m, g);
56892
- }, global$4 = _globalExports, core$2 = _coreExports, ctx = _ctx, hide$1 = _hide, has$6 = _has, PROTOTYPE$1 = "prototype", $export$5 = function(m, g, b) {
56893
- 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;
56908
+ }, global$4 = _globalExports, core$2 = _coreExports, ctx = _ctx, hide$1 = _hide, has$6 = _has, PROTOTYPE$2 = "prototype", $export$5 = function(m, g, b) {
56909
+ 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$2], z = x ? global$4 : C ? global$4[g] : (global$4[g] || {})[PROTOTYPE$2], D, U, W;
56894
56910
  x && (b = g);
56895
56911
  for (D in b)
56896
56912
  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) {
@@ -56908,7 +56924,7 @@ var _propertyDesc = function(m, g) {
56908
56924
  }
56909
56925
  return V.apply(this, arguments);
56910
56926
  };
56911
- return Z[PROTOTYPE$1] = V[PROTOTYPE$1], Z;
56927
+ return Z[PROTOTYPE$2] = V[PROTOTYPE$2], Z;
56912
56928
  }(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)));
56913
56929
  };
56914
56930
  $export$5.F = 1;
@@ -56968,15 +56984,15 @@ var _sharedExports = _shared.exports, id$1 = 0, px = Math.random(), _uid = funct
56968
56984
  return "Symbol(".concat(m === void 0 ? "" : m, ")_", (++id$1 + px).toString(36));
56969
56985
  }, shared$1 = _sharedExports("keys"), uid$2 = _uid, _sharedKey = function(m) {
56970
56986
  return shared$1[m] || (shared$1[m] = uid$2(m));
56971
- }, has$5 = _has, toIObject$4 = _toIobject, arrayIndexOf = _arrayIncludes(!1), IE_PROTO$1 = _sharedKey("IE_PROTO"), _objectKeysInternal = function(m, g) {
56987
+ }, has$5 = _has, toIObject$4 = _toIobject, arrayIndexOf = _arrayIncludes(!1), IE_PROTO$2 = _sharedKey("IE_PROTO"), _objectKeysInternal = function(m, g) {
56972
56988
  var b = toIObject$4(m), _ = 0, x = [], C;
56973
56989
  for (C in b)
56974
- C != IE_PROTO$1 && has$5(b, C) && x.push(C);
56990
+ C != IE_PROTO$2 && has$5(b, C) && x.push(C);
56975
56991
  for (; g.length > _; )
56976
56992
  has$5(b, C = g[_++]) && (~arrayIndexOf(x, C) || x.push(C));
56977
56993
  return x;
56978
- }, _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","), $keys$2 = _objectKeysInternal, enumBugKeys = _enumBugKeys, _objectKeys = Object.keys || function(g) {
56979
- return $keys$2(g, enumBugKeys);
56994
+ }, _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","), $keys$2 = _objectKeysInternal, enumBugKeys$1 = _enumBugKeys, _objectKeys = Object.keys || function(g) {
56995
+ return $keys$2(g, enumBugKeys$1);
56980
56996
  }, _objectGops = {};
56981
56997
  _objectGops.f = Object.getOwnPropertySymbols;
56982
56998
  var _objectPie = {}, hasRequired_objectPie;
@@ -57019,8 +57035,8 @@ _extends.default = _assign2.default || function(m) {
57019
57035
  }
57020
57036
  return m;
57021
57037
  };
57022
- var has$4 = _has, toObject$2 = _toObject, IE_PROTO = _sharedKey("IE_PROTO"), ObjectProto$1 = Object.prototype, _objectGpo = Object.getPrototypeOf || function(m) {
57023
- 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;
57038
+ var has$4 = _has, toObject$2 = _toObject, IE_PROTO$1 = _sharedKey("IE_PROTO"), ObjectProto$1 = Object.prototype, _objectGpo = Object.getPrototypeOf || function(m) {
57039
+ return m = toObject$2(m), has$4(m, IE_PROTO$1) ? m[IE_PROTO$1] : typeof m.constructor == "function" && m instanceof m.constructor ? m.constructor.prototype : m instanceof Object ? ObjectProto$1 : null;
57024
57040
  }, _objectSap, hasRequired_objectSap;
57025
57041
  function require_objectSap() {
57026
57042
  if (hasRequired_objectSap)
@@ -57072,20 +57088,12 @@ var possibleConstructorReturn = {}, _typeof$1 = {}, toInteger = _toInteger, defi
57072
57088
  var _ = String(defined(g)), x = toInteger(b), C = _.length, $, I;
57073
57089
  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);
57074
57090
  };
57075
- }, _redefine = _hide, _iterators = {}, _objectDps, hasRequired_objectDps;
57076
- function require_objectDps() {
57077
- if (hasRequired_objectDps)
57078
- return _objectDps;
57079
- hasRequired_objectDps = 1;
57080
- var m = require_objectDp(), g = _anObject, b = _objectKeys;
57081
- return _objectDps = require_descriptors() ? Object.defineProperties : function(x, C) {
57082
- g(x);
57083
- for (var $ = b(C), I = $.length, R = 0, P; I > R; )
57084
- m.f(x, P = $[R++], C[P]);
57085
- return x;
57086
- }, _objectDps;
57087
- }
57088
- var _html, hasRequired_html;
57091
+ }, _redefine = _hide, _iterators = {}, dP$1 = require_objectDp(), anObject$2 = _anObject, getKeys$1 = _objectKeys, _objectDps = require_descriptors() ? Object.defineProperties : function(g, b) {
57092
+ anObject$2(g);
57093
+ for (var _ = getKeys$1(b), x = _.length, C = 0, $; x > C; )
57094
+ dP$1.f(g, $ = _[C++], b[$]);
57095
+ return g;
57096
+ }, _html, hasRequired_html;
57089
57097
  function require_html() {
57090
57098
  if (hasRequired_html)
57091
57099
  return _html;
@@ -57093,24 +57101,16 @@ function require_html() {
57093
57101
  var m = _globalExports.document;
57094
57102
  return _html = m && m.documentElement, _html;
57095
57103
  }
57096
- var _objectCreate, hasRequired_objectCreate;
57097
- function require_objectCreate() {
57098
- if (hasRequired_objectCreate)
57099
- return _objectCreate;
57100
- hasRequired_objectCreate = 1;
57101
- var m = _anObject, g = require_objectDps(), b = _enumBugKeys, _ = _sharedKey("IE_PROTO"), x = function() {
57102
- }, C = "prototype", $ = function() {
57103
- var I = require_domCreate()("iframe"), R = b.length, P = "<", N = ">", z;
57104
- 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--; )
57105
- delete $[C][b[R]];
57106
- return $();
57107
- };
57108
- return _objectCreate = Object.create || function(R, P) {
57109
- var N;
57110
- return R !== null ? (x[C] = m(R), N = new x(), x[C] = null, N[_] = R) : N = $(), P === void 0 ? N : g(N, P);
57111
- }, _objectCreate;
57112
- }
57113
- var _wks = { exports: {} }, store = _sharedExports("wks"), uid$1 = _uid, Symbol$1 = _globalExports.Symbol, USE_SYMBOL = typeof Symbol$1 == "function", $exports = _wks.exports = function(m) {
57104
+ var anObject$1 = _anObject, dPs = _objectDps, enumBugKeys = _enumBugKeys, IE_PROTO = _sharedKey("IE_PROTO"), Empty = function() {
57105
+ }, PROTOTYPE$1 = "prototype", createDict = function() {
57106
+ var m = require_domCreate()("iframe"), g = enumBugKeys.length, b = "<", _ = ">", x;
57107
+ for (m.style.display = "none", require_html().appendChild(m), m.src = "javascript:", x = m.contentWindow.document, x.open(), x.write(b + "script" + _ + "document.F=Object" + b + "/script" + _), x.close(), createDict = x.F; g--; )
57108
+ delete createDict[PROTOTYPE$1][enumBugKeys[g]];
57109
+ return createDict();
57110
+ }, _objectCreate = Object.create || function(g, b) {
57111
+ var _;
57112
+ return g !== null ? (Empty[PROTOTYPE$1] = anObject$1(g), _ = new Empty(), Empty[PROTOTYPE$1] = null, _[IE_PROTO] = g) : _ = createDict(), b === void 0 ? _ : dPs(_, b);
57113
+ }, _wks = { exports: {} }, store = _sharedExports("wks"), uid$1 = _uid, Symbol$1 = _globalExports.Symbol, USE_SYMBOL = typeof Symbol$1 == "function", $exports = _wks.exports = function(m) {
57114
57114
  return store[m] || (store[m] = USE_SYMBOL && Symbol$1[m] || (USE_SYMBOL ? Symbol$1 : uid$1)("Symbol." + m));
57115
57115
  };
57116
57116
  $exports.store = store;
@@ -57121,7 +57121,7 @@ function require_iterCreate() {
57121
57121
  if (hasRequired_iterCreate)
57122
57122
  return _iterCreate;
57123
57123
  hasRequired_iterCreate = 1;
57124
- var m = require_objectCreate(), g = _propertyDesc, b = _setToStringTag, _ = {};
57124
+ var m = _objectCreate, g = _propertyDesc, b = _setToStringTag, _ = {};
57125
57125
  return _hide(_, _wksExports("iterator"), function() {
57126
57126
  return this;
57127
57127
  }), _iterCreate = function(x, C, $) {
@@ -57258,7 +57258,7 @@ var toIObject$2 = _toIobject, gOPN$1 = _objectGopn.f, toString = {}.toString, wi
57258
57258
  _objectGopnExt.f = function(g) {
57259
57259
  return windowNames && toString.call(g) == "[object Window]" ? getWindowNames(g) : gOPN$1(toIObject$2(g));
57260
57260
  };
57261
- var _objectGopd = {}, pIE = require_objectPie(), createDesc$1 = _propertyDesc, toIObject$1 = _toIobject, toPrimitive$1 = _toPrimitive, has$1 = _has, IE8_DOM_DEFINE = _ie8DomDefine, gOPD$1 = Object.getOwnPropertyDescriptor;
57261
+ var _objectGopd = {}, pIE = require_objectPie(), createDesc$1 = _propertyDesc, toIObject$1 = _toIobject, toPrimitive$1 = _toPrimitive, has$1 = _has, IE8_DOM_DEFINE = require_ie8DomDefine(), gOPD$1 = Object.getOwnPropertyDescriptor;
57262
57262
  _objectGopd.f = require_descriptors() ? gOPD$1 : function(g, b) {
57263
57263
  if (g = toIObject$1(g), b = toPrimitive$1(b, !0), IE8_DOM_DEFINE)
57264
57264
  try {
@@ -57268,7 +57268,7 @@ _objectGopd.f = require_descriptors() ? gOPD$1 : function(g, b) {
57268
57268
  if (has$1(g, b))
57269
57269
  return createDesc$1(!pIE.f.call(g, b), g[b]);
57270
57270
  };
57271
- 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() {
57271
+ 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 = _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() {
57272
57272
  return _create$1(dP({}, "a", {
57273
57273
  get: function() {
57274
57274
  return dP(this, "a", { value: 7 }).a;
@@ -57446,7 +57446,7 @@ function require_setProto() {
57446
57446
  var $export$1 = _export;
57447
57447
  $export$1($export$1.S, "Object", { setPrototypeOf: require_setProto().set });
57448
57448
  var setPrototypeOf$1 = _coreExports.Object.setPrototypeOf, setPrototypeOf = { default: setPrototypeOf$1, __esModule: !0 }, $export = _export;
57449
- $export($export.S, "Object", { create: require_objectCreate() });
57449
+ $export($export.S, "Object", { create: _objectCreate });
57450
57450
  var $Object = _coreExports.Object, create$1 = function(g, b) {
57451
57451
  return $Object.create(g, b);
57452
57452
  }, create = { default: create$1, __esModule: !0 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "propro-common-components",
3
- "version": "0.1.06",
3
+ "version": "0.1.08",
4
4
  "type": "module",
5
5
  "main": "dist/propro-common-components.js",
6
6
  "types": "dist/main.d.ts",