bonuspluscomponents 0.0.54 → 0.0.55
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/AppContext/Context/AppContext.d.ts.map +1 -1
- package/dist/bonuspluscomponents.cjs.js +11 -11
- package/dist/bonuspluscomponents.es.js +280 -281
- package/dist/bonuspluscomponents.umd.js +11 -11
- package/dist/components/UseAxios/useAxios.d.ts +2 -1
- package/dist/components/UseAxios/useAxios.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(x,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("axios")):typeof define=="function"&&define.amd?define(["exports","react","axios"],O):(x=typeof globalThis<"u"?globalThis:x||self,O(x.bonuspluscomponents={},x.require$$1,x.Axios))})(this,function(x,O,Ie){"use strict";var B={exports:{}},k={};/*
|
|
2
2
|
object-assign
|
|
3
3
|
(c) Sindre Sorhus
|
|
4
4
|
@license MIT
|
|
5
|
-
*/var
|
|
5
|
+
*/var G,re;function te(){if(re)return G;re=1;var f=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function T(E){if(E==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(E)}function S(){try{if(!Object.assign)return!1;var E=new String("abc");if(E[5]="de",Object.getOwnPropertyNames(E)[0]==="5")return!1;for(var P={},l=0;l<10;l++)P["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(P).map(function(s){return P[s]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(s){d[s]=s}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return G=S()?Object.assign:function(E,P){for(var l,c=T(E),d,s=1;s<arguments.length;s++){l=Object(arguments[s]);for(var y in l)h.call(l,y)&&(c[y]=l[y]);if(f){d=f(l);for(var b=0;b<d.length;b++)_.call(l,d[b])&&(c[d[b]]=l[d[b]])}}return c},G}/** @license React v17.0.2
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var
|
|
12
|
+
*/var ne;function Ye(){if(ne)return k;ne=1,te();var f=O,h=60103;if(k.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var _=Symbol.for;h=_("react.element"),k.Fragment=_("react.fragment")}var T=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function P(l,c,d){var s,y={},b=null,A=null;d!==void 0&&(b=""+d),c.key!==void 0&&(b=""+c.key),c.ref!==void 0&&(A=c.ref);for(s in c)S.call(c,s)&&!E.hasOwnProperty(s)&&(y[s]=c[s]);if(l&&l.defaultProps)for(s in c=l.defaultProps,c)y[s]===void 0&&(y[s]=c[s]);return{$$typeof:h,type:l,key:b,ref:A,props:y,_owner:T.current}}return k.jsx=P,k.jsxs=P,k}var q={};/** @license React v17.0.2
|
|
13
13
|
* react-jsx-runtime.development.js
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var
|
|
20
|
-
`+
|
|
21
|
-
`),
|
|
22
|
-
`),
|
|
23
|
-
`+a[
|
|
19
|
+
*/var ae;function We(){return ae||(ae=1,function(f){process.env.NODE_ENV!=="production"&&function(){var h=O,_=te(),T=60103,S=60106;f.Fragment=60107;var E=60108,P=60114,l=60109,c=60110,d=60112,s=60113,y=60120,b=60115,A=60116,U=60121,ue=60122,se=60117,ce=60129,fe=60131;if(typeof Symbol=="function"&&Symbol.for){var p=Symbol.for;T=p("react.element"),S=p("react.portal"),f.Fragment=p("react.fragment"),E=p("react.strict_mode"),P=p("react.profiler"),l=p("react.provider"),c=p("react.context"),d=p("react.forward_ref"),s=p("react.suspense"),y=p("react.suspense_list"),b=p("react.memo"),A=p("react.lazy"),U=p("react.block"),ue=p("react.server.block"),se=p("react.fundamental"),p("react.scope"),p("react.opaque.id"),ce=p("react.debug_trace_mode"),p("react.offscreen"),fe=p("react.legacy_hidden")}var le=typeof Symbol=="function"&&Symbol.iterator,Be="@@iterator";function Ge(e){if(e===null||typeof e!="object")return null;var r=le&&e[le]||e[Be];return typeof r=="function"?r:null}var I=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];qe("error",e,t)}}function qe(e,r,t){{var n=I.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return""+i});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Je=!1;function ze(e){return!!(typeof e=="string"||typeof e=="function"||e===f.Fragment||e===P||e===ce||e===E||e===s||e===y||e===fe||Je||typeof e=="object"&&e!==null&&(e.$$typeof===A||e.$$typeof===b||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===se||e.$$typeof===U||e[0]===ue))}function Ke(e,r,t){var n=r.displayName||r.name||"";return e.displayName||(n!==""?t+"("+n+")":t)}function de(e){return e.displayName||"Context"}function j(e){if(e==null)return null;if(typeof e.tag=="number"&&m("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case f.Fragment:return"Fragment";case S:return"Portal";case P:return"Profiler";case E:return"StrictMode";case s:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return de(r)+".Consumer";case l:var t=e;return de(t._context)+".Provider";case d:return Ke(e,e.render,"ForwardRef");case b:return j(e.type);case U:return j(e._render);case A:{var n=e,o=n._payload,u=n._init;try{return j(u(o))}catch{return null}}}return null}var L=0,ve,pe,ge,he,_e,Ee,be;function Re(){}Re.__reactDisabledLog=!0;function He(){{if(L===0){ve=console.log,pe=console.info,ge=console.warn,he=console.error,_e=console.group,Ee=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function Xe(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:ve}),info:_({},e,{value:pe}),warn:_({},e,{value:ge}),error:_({},e,{value:he}),group:_({},e,{value:_e}),groupCollapsed:_({},e,{value:Ee}),groupEnd:_({},e,{value:be})})}L<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=I.ReactCurrentDispatcher,z;function V(e,r,t){{if(z===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);z=n&&n[1]||""}return`
|
|
20
|
+
`+z+e}}var K=!1,F;{var Ze=typeof WeakMap=="function"?WeakMap:Map;F=new Ze}function me(e,r){if(!e||K)return"";{var t=F.get(e);if(t!==void 0)return t}var n;K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=J.current,J.current=null,He();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(w){n=w}Reflect.construct(e,[],i)}else{try{i.call()}catch(w){n=w}e.call(i.prototype)}}else{try{throw Error()}catch(w){n=w}e()}}catch(w){if(w&&n&&typeof w.stack=="string"){for(var a=w.stack.split(`
|
|
21
|
+
`),R=n.stack.split(`
|
|
22
|
+
`),v=a.length-1,g=R.length-1;v>=1&&g>=0&&a[v]!==R[g];)g--;for(;v>=1&&g>=0;v--,g--)if(a[v]!==R[g]){if(v!==1||g!==1)do if(v--,g--,g<0||a[v]!==R[g]){var C=`
|
|
23
|
+
`+a[v].replace(" at new "," at ");return typeof e=="function"&&F.set(e,C),C}while(v>=1&&g>=0);break}}}finally{K=!1,J.current=u,Xe(),Error.prepareStackTrace=o}var W=e?e.displayName||e.name:"",De=W?V(W):"";return typeof e=="function"&&F.set(e,De),De}function Oe(e,r,t){return me(e,!1)}function Qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function M(e,r,t){if(e==null)return"";if(typeof e=="function")return me(e,Qe(e));if(typeof e=="string")return V(e);switch(e){case s:return V("Suspense");case y:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Oe(e.render);case b:return M(e.type,r,t);case U:return Oe(e._render);case A:{var n=e,o=n._payload,u=n._init;try{return M(u(o),r,t)}catch{}}}return""}var Pe={},ye=I.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function er(e,r,t,n,o){{var u=Function.call.bind(Object.prototype.hasOwnProperty);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var R=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){a=v}a&&!(a instanceof Error)&&($(o),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),$(null)),a instanceof Error&&!(a.message in Pe)&&(Pe[a.message]=!0,$(o),m("Failed %s type: %s",t,a.message),$(null))}}}var N=I.ReactCurrentOwner,H=Object.prototype.hasOwnProperty,rr={key:!0,ref:!0,__self:!0,__source:!0},xe,Te,X;X={};function tr(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nr(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=j(N.current.type);X[t]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',j(N.current.type),e.ref),X[t]=!0)}}function ir(e,r){{var t=function(){xe||(xe=!0,m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function or(e,r){{var t=function(){Te||(Te=!0,m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,n,o,u,i){var a={$$typeof:T,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function sr(e,r,t,n,o){{var u,i={},a=null,R=null;t!==void 0&&(a=""+t),nr(r)&&(a=""+r.key),tr(r)&&(R=r.ref,ar(r,o));for(u in r)H.call(r,u)&&!rr.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var v=e.defaultProps;for(u in v)i[u]===void 0&&(i[u]=v[u])}if(a||R){var g=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ir(i,g),R&&or(i,g)}return ur(e,a,R,o,n,N.current,i)}}var Z=I.ReactCurrentOwner,je=I.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===T}function Ce(){{if(Z.current){var e=j(Z.current.type);if(e)return`
|
|
24
24
|
|
|
25
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
25
|
+
Check the render method of \``+e+"`."}return""}}function cr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
26
26
|
|
|
27
|
-
Check your code at `+r+":"+t+"."}return""}}var
|
|
27
|
+
Check your code at `+r+":"+t+"."}return""}}var we={};function fr(e){{var r=Ce();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
28
28
|
|
|
29
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
29
|
+
Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=fr(r);if(we[t])return;we[t]=!0;var n="";e&&e._owner&&e._owner!==Z.current&&(n=" It was passed a child from "+j(e._owner.type)+"."),Y(e),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),Y(null)}}function Ae(e,r){{if(typeof e!="object")return;if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];ee(n)&&Se(n,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var o=Ge(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)ee(i.value)&&Se(i.value,r)}}}function lr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=j(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var o=j(r);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){Y(e),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),Y(null);break}}e.ref!==null&&(Y(e),m("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}function ke(e,r,t,n,o,u){{var i=ze(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=cr(o);R?a+=R:a+=Ce();var v;e===null?v="null":Array.isArray(e)?v="array":e!==void 0&&e.$$typeof===T?(v="<"+(j(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,a)}var g=sr(e,r,t,o,u);if(g==null)return g;if(i){var C=r.children;if(C!==void 0)if(n)if(Array.isArray(C)){for(var W=0;W<C.length;W++)Ae(C[W],e);Object.freeze&&Object.freeze(C)}else m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(C,e)}return e===f.Fragment?dr(g):lr(g),g}}function vr(e,r,t){return ke(e,r,t,!0)}function pr(e,r,t){return ke(e,r,t,!1)}var gr=pr,hr=vr;f.jsx=gr,f.jsxs=hr}()}(q)),q}process.env.NODE_ENV==="production"?B.exports=Ye():B.exports=We();var ie=B.exports;const Le={popups:[]},Ne=O.createContext(Le),Ue=()=>{const[f,h]=O.useState([]);return{popups:f}},Ve=({children:f})=>{const h=Ue();return ie.jsx(Ne.Provider,{value:h,children:f})},D=Ie.create(),Fe={cabinetType:null,cabinetIsLoading:!0,apiAxios:null,phoneNumber:null,setPhoneNumber:null,cabinetSettings:null,authToken:null,setAuthToken:null,createAxios:null},oe=O.createContext(Fe),Me=({cabinetType:f})=>{const[h,_]=O.useState(null),[T,S]=O.useState(null),[E,P]=O.useState(null);return O.useEffect(()=>{(async()=>{if(!D||!h||f===null)return;const d=await D.post("/externalCustomerCabinet/cabinetInfo",{phoneNumber:h,cabinetType:f});P(d.data)})()},[h,D]),{cabinetType:f,apiAxios:D,cabinetIsLoading:!1,cabinetSettings:E,phoneNumber:h,setPhoneNumber:_,authToken:T,setAuthToken:S,createAxios:(c,d)=>{D.defaults.baseURL=d,D.defaults.headers.common.Authorization=c}}},$e=({children:f,cabinetType:h})=>{const _=Me({cabinetType:h});return ie.jsx(oe.Provider,{value:{..._,cabinetType:h},children:f})};x.AppContext=oe,x.AppProvider=$e,x.PopupProvider=Ve,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAxios.d.ts","sourceRoot":"","sources":["../../../src/components/UseAxios/useAxios.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"useAxios.d.ts","sourceRoot":"","sources":["../../../src/components/UseAxios/useAxios.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAC,aAAa,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAInD,eAAO,MAAM,QAAQ,eAAiB,CAAC;AAEvC,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC3B,GAAG,EAAC,MAAM,CAAC;IACX,MAAM,EAAC,MAAM,CAAC;IACd,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,IAAI,CAAC,EAAC,GAAG,CAAC;IACV,eAAe,CAAC,EAAC,CAAC,KAAK,EAAC,OAAO,KAAG,IAAI,CAAC;IACvC,aAAa,CAAC,EAAC,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAC,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAC,MAAI,IAAI,CAAC;CACrC,CAAA;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG,EAEzC,CAAA;AAGD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,aAAa,EAAE,WAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAC,EAAC,KAAK,CAAC,CAAC,CAAC;;;qBAQrH,GAAG,cAAa,MAAI,IAAI;EA6CxD"}
|