react-luminus-components 1.1.20 → 1.1.22
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/README.md +2 -0
- package/dist/.vite/manifest.json +43 -43
- package/dist/{DataKey-Chc9JWBN.js → DataKey-B7CWQXvv.js} +1 -1
- package/dist/{DataKey-dhQX8cMa.cjs → DataKey-DVMbPWFY.cjs} +1 -1
- package/dist/{SimpleTooltip-CfoOF2bC.cjs → SimpleTooltip-D91sCKFo.cjs} +1 -1
- package/dist/{SimpleTooltip-Cs6KsWMk.js → SimpleTooltip-Dk1A5Tpg.js} +2 -2
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +12 -0
- package/dist/components/Buttons/index.d.ts +1 -0
- package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +6 -0
- package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +12 -0
- package/dist/components/Dropdown/comps/index.d.ts +2 -0
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/Form/TextInput/TextInput.d.ts +2 -1
- package/dist/components/common/Collapse/Collapse.d.ts +14 -2
- package/dist/components/common/PromptDialog/PromptDialog.d.ts +3 -0
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +2 -1
- package/dist/components/common/Typography/Typography.d.ts +1 -1
- package/dist/contexts/prompt/PromptContext.d.ts +10 -0
- package/dist/contexts/prompt/PromptProvider.d.ts +6 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +405 -368
- package/dist/{hasClass-D2q3Otcv.js → hasClass-DIHyDa4e.js} +237 -233
- package/dist/hasClass-DjB0wTmj.cjs +20 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/usePrompt/usePrompt.d.ts +7 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +6 -5
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.es.js +1161 -1119
- package/dist/models/texts/ConfirmTexts.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/{useAxios-Ce32mjz9.cjs → useAxios-B4X7zKtj.cjs} +36 -36
- package/dist/{useAxios-D-fCu46c.js → useAxios-CHbKHRpj.js} +195 -181
- package/dist/useConfirm-CrTJszXF.cjs +1 -0
- package/dist/useConfirm-CyietOP-.js +27 -0
- package/package.json +1 -1
- package/dist/hasClass-Dg19NteG.cjs +0 -20
- package/dist/useConfirm-BM62r8mq.cjs +0 -1
- package/dist/useConfirm-CTpbtdnu.js +0 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react"),C=require("./useAxios-B4X7zKtj.cjs"),f=()=>{const{isShown:r,text:c,showPrompt:e,hidePrompt:t,resolveRef:o}=s.useContext(C.PromptContext),m=s.useCallback(n=>{t(),o.current(n)},[t,o]),l=s.useCallback(async n=>(console.log(n),e(n),console.log("t"),new Promise(i=>{o.current=i})),[o,e]);return{isShown:r,text:c,prompt:l,onFinish:m}};let u;const h=()=>{const{show:r,text:c,showConfirm:e,hideConfirm:t}=s.useContext(C.ConfirmContext),o=()=>{t()};return{confirm:async i=>(e(i),new Promise(a=>{u=a})),onConfirm:()=>{o(),u(!0)},onCancel:()=>{o(),u(!1)},show:r,text:c}};exports.useConfirm=h;exports.usePrompt=f;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useContext as a, useCallback as C } from "react";
|
|
2
|
+
import { P as u, C as p } from "./useAxios-CHbKHRpj.js";
|
|
3
|
+
const w = () => {
|
|
4
|
+
const { isShown: e, text: s, showPrompt: r, hidePrompt: t, resolveRef: o } = a(u), i = C((n) => {
|
|
5
|
+
t(), o.current(n);
|
|
6
|
+
}, [t, o]), l = C(async (n) => (console.log(n), r(n), console.log("t"), new Promise((c) => {
|
|
7
|
+
o.current = c;
|
|
8
|
+
})), [o, r]);
|
|
9
|
+
return { isShown: e, text: s, prompt: l, onFinish: i };
|
|
10
|
+
};
|
|
11
|
+
let m;
|
|
12
|
+
const x = () => {
|
|
13
|
+
const { show: e, text: s, showConfirm: r, hideConfirm: t } = a(p), o = () => {
|
|
14
|
+
t();
|
|
15
|
+
};
|
|
16
|
+
return { confirm: async (c) => (r(c), new Promise((f) => {
|
|
17
|
+
m = f;
|
|
18
|
+
})), onConfirm: () => {
|
|
19
|
+
o(), m(!0);
|
|
20
|
+
}, onCancel: () => {
|
|
21
|
+
o(), m(!1);
|
|
22
|
+
}, show: e, text: s };
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
w as a,
|
|
26
|
+
x as u
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";const M=require("./useAxios-Ce32mjz9.cjs"),p=require("react"),Z=require("react-dom");function ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const se=ct(p),ft="_h1_1unxw_1",lt="_h3_1unxw_8",dt="_h6_1unxw_15",pt="_subtitle_1unxw_22",vt="_body_1unxw_29",yt="_body2_1unxw_36",Et="_caption_1unxw_43",K={h1:ft,h3:lt,h6:dt,subtitle:pt,body:vt,body2:yt,caption:Et},mt=({variant:e,className:t,children:o})=>{switch(e){case"h1":return M.jsxRuntimeExports.jsx("h1",{className:M.classNames("luminus-text-primary luminus-h1",K.h1,t),children:o});case"h3":return M.jsxRuntimeExports.jsx("h3",{className:M.classNames("luminus-text luminus-h3",K.h3,t),children:o});case"h6":return M.jsxRuntimeExports.jsx("h6",{className:M.classNames("luminus-text luminus-h6",K.h6,t),children:o});case"subtitle":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text luminus-subtitle",K.subtitle,t),children:o});case"body":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text luminus-body",K.body,t),children:o});case"body2":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text luminus-body2",K.body2,t),children:o});case"caption":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text-muted luminus-caption",K.caption,t),children:o});default:return M.jsxRuntimeExports.jsx(M.jsxRuntimeExports.Fragment,{children:o})}},ht=({variant:e,className:t,children:o})=>M.jsxRuntimeExports.jsx(mt,{variant:e,className:t,children:o});function Xe(e,t){if(e==null)return{};var o={},r=Object.keys(e),i,n;for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&(o[i]=e[i]);return o}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Se(e,t)}function xt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Se(e,t)}const bt=["xxl","xl","lg","md","sm","xs"],Tt="xs",ue=se.createContext({prefixes:{},breakpoints:bt,minBreakpoint:Tt});function gt(e,t){const{prefixes:o}=p.useContext(ue);return e||o[t]||t}function Rt(){const{breakpoints:e}=p.useContext(ue);return e}function Ot(){const{minBreakpoint:e}=p.useContext(ue);return e}function St(){const{dir:e}=p.useContext(ue);return e==="rtl"}function je(e){return e&&e.ownerDocument||document}function _t(e){var t=je(e);return t&&t.defaultView||window}function Ct(e,t){return _t(e).getComputedStyle(e,t)}var wt=/([A-Z])/g;function Pt(e){return e.replace(wt,"-$1").toLowerCase()}var jt=/^ms-/;function oe(e){return Pt(e).replace(jt,"-ms-")}var Dt=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Mt(e){return!!(e&&Dt.test(e))}function De(e,t){var o="",r="";if(typeof t=="string")return e.style.getPropertyValue(oe(t))||Ct(e).getPropertyValue(oe(t));Object.keys(t).forEach(function(i){var n=t[i];!n&&n!==0?e.style.removeProperty(oe(i)):Mt(i)?r+=i+"("+n+") ":o+=oe(i)+": "+n+";"}),r&&(o+="transform: "+r+";"),e.style.cssText+=";"+o}var _e={exports:{}},ie={exports:{}},C={};/** @license React v16.13.1
|
|
2
|
-
* react-is.production.min.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var Ne;function kt(){if(Ne)return C;Ne=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,N=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,U=e?Symbol.for("react.scope"):60119;function I(c){if(typeof c=="object"&&c!==null){var $=c.$$typeof;switch($){case t:switch(c=c.type,c){case d:case v:case r:case n:case i:case E:return c;default:switch(c=c&&c.$$typeof,c){case u:case y:case A:case k:case a:return c;default:return $}}case o:return $}}}function D(c){return I(c)===v}return C.AsyncMode=d,C.ConcurrentMode=v,C.ContextConsumer=u,C.ContextProvider=a,C.Element=t,C.ForwardRef=y,C.Fragment=r,C.Lazy=A,C.Memo=k,C.Portal=o,C.Profiler=n,C.StrictMode=i,C.Suspense=E,C.isAsyncMode=function(c){return D(c)||I(c)===d},C.isConcurrentMode=D,C.isContextConsumer=function(c){return I(c)===u},C.isContextProvider=function(c){return I(c)===a},C.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},C.isForwardRef=function(c){return I(c)===y},C.isFragment=function(c){return I(c)===r},C.isLazy=function(c){return I(c)===A},C.isMemo=function(c){return I(c)===k},C.isPortal=function(c){return I(c)===o},C.isProfiler=function(c){return I(c)===n},C.isStrictMode=function(c){return I(c)===i},C.isSuspense=function(c){return I(c)===E},C.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===v||c===n||c===i||c===E||c===_||typeof c=="object"&&c!==null&&(c.$$typeof===A||c.$$typeof===k||c.$$typeof===a||c.$$typeof===u||c.$$typeof===y||c.$$typeof===N||c.$$typeof===L||c.$$typeof===U||c.$$typeof===j)},C.typeOf=I,C}var w={};/** @license React v16.13.1
|
|
9
|
-
* react-is.development.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var Le;function At(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,N=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,U=e?Symbol.for("react.scope"):60119;function I(f){return typeof f=="string"||typeof f=="function"||f===r||f===v||f===n||f===i||f===E||f===_||typeof f=="object"&&f!==null&&(f.$$typeof===A||f.$$typeof===k||f.$$typeof===a||f.$$typeof===u||f.$$typeof===y||f.$$typeof===N||f.$$typeof===L||f.$$typeof===U||f.$$typeof===j)}function D(f){if(typeof f=="object"&&f!==null){var F=f.$$typeof;switch(F){case t:var re=f.type;switch(re){case d:case v:case r:case n:case i:case E:return re;default:var Ie=re&&re.$$typeof;switch(Ie){case u:case y:case A:case k:case a:return Ie;default:return F}}case o:return F}}}var c=d,$=v,V=u,fe=a,le=t,de=y,te=r,pe=A,ve=k,H=o,ye=n,q=i,X=E,ne=!1;function Ee(f){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),s(f)||D(f)===d}function s(f){return D(f)===v}function l(f){return D(f)===u}function g(f){return D(f)===a}function b(f){return typeof f=="object"&&f!==null&&f.$$typeof===t}function m(f){return D(f)===y}function R(f){return D(f)===r}function x(f){return D(f)===A}function T(f){return D(f)===k}function O(f){return D(f)===o}function P(f){return D(f)===n}function S(f){return D(f)===i}function W(f){return D(f)===E}w.AsyncMode=c,w.ConcurrentMode=$,w.ContextConsumer=V,w.ContextProvider=fe,w.Element=le,w.ForwardRef=de,w.Fragment=te,w.Lazy=pe,w.Memo=ve,w.Portal=H,w.Profiler=ye,w.StrictMode=q,w.Suspense=X,w.isAsyncMode=Ee,w.isConcurrentMode=s,w.isContextConsumer=l,w.isContextProvider=g,w.isElement=b,w.isForwardRef=m,w.isFragment=R,w.isLazy=x,w.isMemo=T,w.isPortal=O,w.isProfiler=P,w.isStrictMode=S,w.isSuspense=W,w.isValidElementType=I,w.typeOf=D}()),w}var $e;function Ke(){return $e||($e=1,process.env.NODE_ENV==="production"?ie.exports=kt():ie.exports=At()),ie.exports}/*
|
|
16
|
-
object-assign
|
|
17
|
-
(c) Sindre Sorhus
|
|
18
|
-
@license MIT
|
|
19
|
-
*/var me,We;function It(){if(We)return me;We=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(n){if(n==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}function i(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de",Object.getOwnPropertyNames(n)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var d=Object.getOwnPropertyNames(a).map(function(y){return a[y]});if(d.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(y){v[y]=y}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return me=i()?Object.assign:function(n,a){for(var u,d=r(n),v,y=1;y<arguments.length;y++){u=Object(arguments[y]);for(var E in u)t.call(u,E)&&(d[E]=u[E]);if(e){v=e(u);for(var _=0;_<v.length;_++)o.call(u,v[_])&&(d[v[_]]=u[v[_]])}}return d},me}var he,qe;function Me(){if(qe)return he;qe=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return he=e,he}var xe,Fe;function He(){return Fe||(Fe=1,xe=Function.call.bind(Object.prototype.hasOwnProperty)),xe}var be,Ue;function Nt(){if(Ue)return be;Ue=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Me(),o={},r=He();e=function(n){var a="Warning: "+n;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(n,a,u,d,v){if(process.env.NODE_ENV!=="production"){for(var y in n)if(r(n,y)){var E;try{if(typeof n[y]!="function"){var _=Error((d||"React class")+": "+u+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}E=n[y](a,y,d,u,null,t)}catch(A){E=A}if(E&&!(E instanceof Error)&&e((d||"React class")+": type specification of "+u+" `"+y+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof E+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),E instanceof Error&&!(E.message in o)){o[E.message]=!0;var k=v?v():"";e("Failed "+u+" type: "+E.message+(k??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(o={})},be=i,be}var Te,Ye;function Lt(){if(Ye)return Te;Ye=1;var e=Ke(),t=It(),o=Me(),r=He(),i=Nt(),n=function(){};process.env.NODE_ENV!=="production"&&(n=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function a(){return null}return Te=function(u,d){var v=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function E(s){var l=s&&(v&&s[v]||s[y]);if(typeof l=="function")return l}var _="<<anonymous>>",k={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:U(),arrayOf:I,element:D(),elementType:c(),instanceOf:$,node:de(),objectOf:fe,oneOf:V,oneOfType:le,shape:pe,exact:ve};function A(s,l){return s===l?s!==0||1/s===1/l:s!==s&&l!==l}function j(s,l){this.message=s,this.data=l&&typeof l=="object"?l:{},this.stack=""}j.prototype=Error.prototype;function N(s){if(process.env.NODE_ENV!=="production")var l={},g=0;function b(R,x,T,O,P,S,W){if(O=O||_,S=S||T,W!==o){if(d){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var F=O+":"+T;!l[F]&&g<3&&(n("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+O+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),l[F]=!0,g++)}}return x[T]==null?R?x[T]===null?new j("The "+P+" `"+S+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new j("The "+P+" `"+S+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:s(x,T,O,P,S)}var m=b.bind(null,!1);return m.isRequired=b.bind(null,!0),m}function L(s){function l(g,b,m,R,x,T){var O=g[b],P=q(O);if(P!==s){var S=X(O);return new j("Invalid "+R+" `"+x+"` of type "+("`"+S+"` supplied to `"+m+"`, expected ")+("`"+s+"`."),{expectedType:s})}return null}return N(l)}function U(){return N(a)}function I(s){function l(g,b,m,R,x){if(typeof s!="function")return new j("Property `"+x+"` of component `"+m+"` has invalid PropType notation inside arrayOf.");var T=g[b];if(!Array.isArray(T)){var O=q(T);return new j("Invalid "+R+" `"+x+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an array."))}for(var P=0;P<T.length;P++){var S=s(T,P,m,R,x+"["+P+"]",o);if(S instanceof Error)return S}return null}return N(l)}function D(){function s(l,g,b,m,R){var x=l[g];if(!u(x)){var T=q(x);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+b+"`, expected a single ReactElement."))}return null}return N(s)}function c(){function s(l,g,b,m,R){var x=l[g];if(!e.isValidElementType(x)){var T=q(x);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+b+"`, expected a single ReactElement type."))}return null}return N(s)}function $(s){function l(g,b,m,R,x){if(!(g[b]instanceof s)){var T=s.name||_,O=Ee(g[b]);return new j("Invalid "+R+" `"+x+"` of type "+("`"+O+"` supplied to `"+m+"`, expected ")+("instance of `"+T+"`."))}return null}return N(l)}function V(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&(arguments.length>1?n("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):n("Invalid argument supplied to oneOf, expected an array.")),a;function l(g,b,m,R,x){for(var T=g[b],O=0;O<s.length;O++)if(A(T,s[O]))return null;var P=JSON.stringify(s,function(W,f){var F=X(f);return F==="symbol"?String(f):f});return new j("Invalid "+R+" `"+x+"` of value `"+String(T)+"` "+("supplied to `"+m+"`, expected one of "+P+"."))}return N(l)}function fe(s){function l(g,b,m,R,x){if(typeof s!="function")return new j("Property `"+x+"` of component `"+m+"` has invalid PropType notation inside objectOf.");var T=g[b],O=q(T);if(O!=="object")return new j("Invalid "+R+" `"+x+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an object."));for(var P in T)if(r(T,P)){var S=s(T,P,m,R,x+"."+P,o);if(S instanceof Error)return S}return null}return N(l)}function le(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var l=0;l<s.length;l++){var g=s[l];if(typeof g!="function")return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ne(g)+" at index "+l+"."),a}function b(m,R,x,T,O){for(var P=[],S=0;S<s.length;S++){var W=s[S],f=W(m,R,x,T,O,o);if(f==null)return null;f.data&&r(f.data,"expectedType")&&P.push(f.data.expectedType)}var F=P.length>0?", expected one of type ["+P.join(", ")+"]":"";return new j("Invalid "+T+" `"+O+"` supplied to "+("`"+x+"`"+F+"."))}return N(b)}function de(){function s(l,g,b,m,R){return H(l[g])?null:new j("Invalid "+m+" `"+R+"` supplied to "+("`"+b+"`, expected a ReactNode."))}return N(s)}function te(s,l,g,b,m){return new j((s||"React class")+": "+l+" type `"+g+"."+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+m+"`.")}function pe(s){function l(g,b,m,R,x){var T=g[b],O=q(T);if(O!=="object")return new j("Invalid "+R+" `"+x+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));for(var P in s){var S=s[P];if(typeof S!="function")return te(m,R,x,P,X(S));var W=S(T,P,m,R,x+"."+P,o);if(W)return W}return null}return N(l)}function ve(s){function l(g,b,m,R,x){var T=g[b],O=q(T);if(O!=="object")return new j("Invalid "+R+" `"+x+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));var P=t({},g[b],s);for(var S in P){var W=s[S];if(r(s,S)&&typeof W!="function")return te(m,R,x,S,X(W));if(!W)return new j("Invalid "+R+" `"+x+"` key `"+S+"` supplied to `"+m+"`.\nBad object: "+JSON.stringify(g[b],null," ")+`
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var f=W(T,S,m,R,x+"."+S,o);if(f)return f}return null}return N(l)}function H(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(H);if(s===null||u(s))return!0;var l=E(s);if(l){var g=l.call(s),b;if(l!==s.entries){for(;!(b=g.next()).done;)if(!H(b.value))return!1}else for(;!(b=g.next()).done;){var m=b.value;if(m&&!H(m[1]))return!1}}else return!1;return!0;default:return!1}}function ye(s,l){return s==="symbol"?!0:l?l["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&l instanceof Symbol:!1}function q(s){var l=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":ye(l,s)?"symbol":l}function X(s){if(typeof s>"u"||s===null)return""+s;var l=q(s);if(l==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return l}function ne(s){var l=X(s);switch(l){case"array":case"object":return"an "+l;case"boolean":case"date":case"regexp":return"a "+l;default:return l}}function Ee(s){return!s.constructor||!s.constructor.name?_:s.constructor.name}return k.checkPropTypes=i,k.resetWarningCache=i.resetWarningCache,k.PropTypes=k,k},Te}var ge,Be;function $t(){if(Be)return ge;Be=1;var e=Me();function t(){}function o(){}return o.resetWarningCache=t,ge=function(){function r(a,u,d,v,y,E){if(E!==e){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}r.isRequired=r;function i(){return r}var n={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:o,resetWarningCache:t};return n.PropTypes=n,n},ge}if(process.env.NODE_ENV!=="production"){var Wt=Ke(),qt=!0;_e.exports=Lt()(Wt.isElement,qt)}else _e.exports=$t()();var Ft=_e.exports;const h=M.getDefaultExportFromCjs(Ft),ze={disabled:!1};var Ut=process.env.NODE_ENV!=="production"?h.oneOfType([h.number,h.shape({enter:h.number,exit:h.number,appear:h.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&h.oneOfType([h.string,h.shape({enter:h.string,exit:h.string,active:h.string}),h.shape({enter:h.string,enterDone:h.string,enterActive:h.string,exit:h.string,exitDone:h.string,exitActive:h.string})]);const Je=p.createContext(null);var Yt=function(t){return t.scrollTop},Q="unmounted",z="exited",Y="entering",G="entered",ae="exiting",B=function(e){xt(t,e);function t(r,i){var n;n=e.call(this,r,i)||this;var a=i,u=a&&!a.isMounting?r.enter:r.appear,d;return n.appearStatus=null,r.in?u?(d=z,n.appearStatus=Y):d=G:r.unmountOnExit||r.mountOnEnter?d=Q:d=z,n.state={status:d},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var a=i.in;return a&&n.status===Q?{status:z}:null};var o=t.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(i){var n=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Y&&a!==G&&(n=Y):(a===Y||a===G)&&(n=ae)}this.updateStatus(!1,n)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var i=this.props.timeout,n,a,u;return n=a=u=i,i!=null&&typeof i!="number"&&(n=i.exit,a=i.enter,u=i.appear!==void 0?i.appear:a),{exit:n,enter:a,appear:u}},o.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===Y){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Z.findDOMNode(this);a&&Yt(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===z&&this.setState({status:Q})},o.performEnter=function(i){var n=this,a=this.props.enter,u=this.context?this.context.isMounting:i,d=this.props.nodeRef?[u]:[Z.findDOMNode(this),u],v=d[0],y=d[1],E=this.getTimeouts(),_=u?E.appear:E.enter;if(!i&&!a||ze.disabled){this.safeSetState({status:G},function(){n.props.onEntered(v)});return}this.props.onEnter(v,y),this.safeSetState({status:Y},function(){n.props.onEntering(v,y),n.onTransitionEnd(_,function(){n.safeSetState({status:G},function(){n.props.onEntered(v,y)})})})},o.performExit=function(){var i=this,n=this.props.exit,a=this.getTimeouts(),u=this.props.nodeRef?void 0:Z.findDOMNode(this);if(!n||ze.disabled){this.safeSetState({status:z},function(){i.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:ae},function(){i.props.onExiting(u),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:z},function(){i.props.onExited(u)})})})},o.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},o.setNextCallback=function(i){var n=this,a=!0;return this.nextCallback=function(u){a&&(a=!1,n.nextCallback=null,i(u))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},o.onTransitionEnd=function(i,n){this.setNextCallback(n);var a=this.props.nodeRef?this.props.nodeRef.current:Z.findDOMNode(this),u=i==null&&!this.props.addEndListener;if(!a||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],v=d[0],y=d[1];this.props.addEndListener(v,y)}i!=null&&setTimeout(this.nextCallback,i)},o.render=function(){var i=this.state.status;if(i===Q)return null;var n=this.props,a=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var u=Xe(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(Je.Provider,{value:null},typeof a=="function"?a(i,u):p.cloneElement(p.Children.only(a),u))},t}(p.Component);B.contextType=Je;B.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:h.shape({current:typeof Element>"u"?h.any:function(e,t,o,r,i,n){var a=e[t];return h.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,o,r,i,n)}}),children:h.oneOfType([h.func.isRequired,h.element.isRequired]).isRequired,in:h.bool,mountOnEnter:h.bool,unmountOnExit:h.bool,appear:h.bool,enter:h.bool,exit:h.bool,timeout:function(t){var o=Ut;t.addEndListener||(o=o.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return o.apply(void 0,[t].concat(i))},addEndListener:h.func,onEnter:h.func,onEntering:h.func,onEntered:h.func,onExit:h.func,onExiting:h.func,onExited:h.func}:{};function J(){}B.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:J,onEntering:J,onEntered:J,onExit:J,onExiting:J,onExited:J};B.UNMOUNTED=Q;B.EXITED=z;B.ENTERING=Y;B.ENTERED=G;B.EXITING=ae;const Bt=B,ce=!!(typeof window<"u"&&window.document&&window.document.createElement);var Ce=!1,we=!1;try{var Re={get passive(){return Ce=!0},get once(){return we=Ce=!0}};ce&&(window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,!0))}catch{}function Ze(e,t,o,r){if(r&&typeof r!="boolean"&&!we){var i=r.once,n=r.capture,a=o;!we&&i&&(a=o.__once||function u(d){this.removeEventListener(t,u,n),o.call(this,d)},o.__once=a),e.addEventListener(t,a,Ce?r:n)}e.addEventListener(t,o,r)}function Qe(e,t,o,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,o,i),o.__once&&e.removeEventListener(t,o.__once,i)}function ke(e,t,o,r){return Ze(e,t,o,r),function(){Qe(e,t,o,r)}}function zt(e,t,o,r){if(o===void 0&&(o=!1),r===void 0&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,o,r),e.dispatchEvent(i)}}function Gt(e){var t=De(e,"transitionDuration")||"",o=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*o}function Vt(e,t,o){o===void 0&&(o=5);var r=!1,i=setTimeout(function(){r||zt(e,"transitionend",!0)},t+o),n=ke(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),n()}}function et(e,t,o,r){o==null&&(o=Gt(e)||0);var i=Vt(e,o,r),n=ke(e,"transitionend",t);return function(){i(),n()}}function Ge(e,t){const o=De(e,t)||"",r=o.indexOf("ms")===-1?1e3:1;return parseFloat(o)*r}function tt(e,t){const o=Ge(e,"transitionDuration"),r=Ge(e,"transitionDelay"),i=et(e,n=>{n.target===e&&(i(),t(n))},o+r)}function nt(e){e.offsetHeight}const Ve=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Xt(e,t){const o=Ve(e),r=Ve(t);return i=>{o&&o(i),r&&r(i)}}function ee(e,t){return p.useMemo(()=>Xt(e,t),[e,t])}function rt(e){return e&&"setState"in e?Z.findDOMNode(e):e??null}const Kt=p.forwardRef(({onEnter:e,onEntering:t,onEntered:o,onExit:r,onExiting:i,onExited:n,addEndListener:a,children:u,childRef:d,...v},y)=>{const E=p.useRef(null),_=ee(E,d),k=$=>{_(rt($))},A=$=>V=>{$&&E.current&&$(E.current,V)},j=p.useCallback(A(e),[e]),N=p.useCallback(A(t),[t]),L=p.useCallback(A(o),[o]),U=p.useCallback(A(r),[r]),I=p.useCallback(A(i),[i]),D=p.useCallback(A(n),[n]),c=p.useCallback(A(a),[a]);return M.jsxRuntimeExports.jsx(Bt,{ref:y,...v,onEnter:j,onEntered:L,onEntering:N,onExit:U,onExited:D,onExiting:I,addEndListener:c,nodeRef:E,children:typeof u=="function"?($,V)=>u($,{...V,ref:k}):p.cloneElement(u,{ref:k})})}),ot=Kt;function Ht(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e},[e]),t}function Ae(e){const t=Ht(e);return p.useCallback(function(...o){return t.current&&t.current(...o)},[t])}function Jt(){return p.useState(null)}function Zt(){const e=p.useRef(!0),t=p.useRef(()=>e.current);return p.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}const Qt=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",en=typeof document<"u",Pe=en||Qt?p.useLayoutEffect:p.useEffect,tn={[Y]:"show",[G]:"show"},it=se.forwardRef(({className:e,children:t,transitionClasses:o={},onEnter:r,...i},n)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},u=p.useCallback((d,v)=>{nt(d),r==null||r(d,v)},[r]);return M.jsxRuntimeExports.jsx(ot,{ref:n,addEndListener:tt,...a,onEnter:u,childRef:t.ref,children:(d,v)=>se.cloneElement(t,{...v,className:M.classNames("fade",e,t.props.className,tn[d],o[d])})})});it.displayName="Fade";const nn=it;function rn(e){const t=p.useRef(e);return t.current=e,t}function on(e){const t=rn(e);p.useEffect(()=>()=>t.current(),[])}function sn(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const st=p.createContext(ce?window:void 0);st.Provider;function at(){return p.useContext(st)}const Oe=(e,t)=>ce?e==null?(t||je()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function an(e,t){const o=at(),[r,i]=p.useState(()=>Oe(e,o==null?void 0:o.document));if(!r){const n=Oe(e);n&&i(n)}return p.useEffect(()=>{t&&r&&t(r)},[t,r]),p.useEffect(()=>{const n=Oe(e);n!==r&&i(n)},[e,r]),r}function ut({children:e,in:t,onExited:o,mountOnEnter:r,unmountOnExit:i}){const n=p.useRef(null),a=p.useRef(t),u=Ae(o);p.useEffect(()=>{t?a.current=!0:u(n.current)},[t,u]);const d=ee(n,e.ref),v=p.cloneElement(e,{ref:d});return t?v:i||!a.current&&r?null:v}const un=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function cn(e,t){if(e==null)return{};var o={},r=Object.keys(e),i,n;for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&(o[i]=e[i]);return o}function fn(e){let{onEnter:t,onEntering:o,onEntered:r,onExit:i,onExiting:n,onExited:a,addEndListener:u,children:d}=e,v=cn(e,un);const y=p.useRef(null),E=ee(y,typeof d=="function"?null:d.ref),_=D=>c=>{D&&y.current&&D(y.current,c)},k=p.useCallback(_(t),[t]),A=p.useCallback(_(o),[o]),j=p.useCallback(_(r),[r]),N=p.useCallback(_(i),[i]),L=p.useCallback(_(n),[n]),U=p.useCallback(_(a),[a]),I=p.useCallback(_(u),[u]);return Object.assign({},v,{nodeRef:y},t&&{onEnter:k},o&&{onEntering:A},r&&{onEntered:j},i&&{onExit:N},n&&{onExiting:L},a&&{onExited:U},u&&{addEndListener:I},{children:typeof d=="function"?(D,c)=>d(D,Object.assign({},c,{ref:E})):p.cloneElement(d,{ref:E})})}const ln=["component"];function dn(e,t){if(e==null)return{};var o={},r=Object.keys(e),i,n;for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&(o[i]=e[i]);return o}const pn=se.forwardRef((e,t)=>{let{component:o}=e,r=dn(e,ln);const i=fn(r);return M.jsxRuntimeExports.jsx(o,Object.assign({ref:t},i))}),vn=pn;function yn({in:e,onTransition:t}){const o=p.useRef(null),r=p.useRef(!0),i=Ae(t);return Pe(()=>{if(!o.current)return;let n=!1;return i({in:e,element:o.current,initial:r.current,isStale:()=>n}),()=>{n=!0}},[e,i]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),o}function En({children:e,in:t,onExited:o,onEntered:r,transition:i}){const[n,a]=p.useState(!t);t&&n&&a(!1);const u=yn({in:!!t,onTransition:v=>{const y=()=>{v.isStale()||(v.in?r==null||r(v.element,v.initial):(a(!0),o==null||o(v.element)))};Promise.resolve(i(v)).then(y,E=>{throw v.in||a(!0),E})}}),d=ee(u,e.ref);return n&&!t?null:p.cloneElement(e,{ref:d})}function mn(e,t,o){return e?M.jsxRuntimeExports.jsx(vn,Object.assign({},o,{component:e})):t?M.jsxRuntimeExports.jsx(En,Object.assign({},o,{transition:t})):M.jsxRuntimeExports.jsx(ut,Object.assign({},o))}function hn(e){return e.code==="Escape"||e.keyCode===27}function xn(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}exports.ENTERED=G;exports.ENTERING=Y;exports.EXITED=z;exports.EXITING=ae;exports.Fade=nn;exports.NoopTransition=ut;exports.PropTypes=h;exports.TransitionWrapper=ot;exports.Typography=ht;exports._objectWithoutPropertiesLoose=Xe;exports.addEventListener=Ze;exports.canUseDOM=ce;exports.contains=sn;exports.hasClass=xn;exports.isEscKey=hn;exports.listen=ke;exports.ownerDocument=je;exports.removeEventListener=Qe;exports.renderTransition=mn;exports.safeFindDOMNode=rt;exports.style=De;exports.transitionEnd=et;exports.transitionEndListener=tt;exports.triggerBrowserReflow=nt;exports.useBootstrapBreakpoints=Rt;exports.useBootstrapMinBreakpoint=Ot;exports.useBootstrapPrefix=gt;exports.useCallbackRef=Jt;exports.useEventCallback=Ae;exports.useIsRTL=St;exports.useIsomorphicEffect=Pe;exports.useMergedRefs=ee;exports.useMounted=Zt;exports.useWaitForDOMRef=an;exports.useWillUnmount=on;exports.useWindow=at;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const C=require("./useAxios-Ce32mjz9.cjs"),f=require("react");let n;const m=()=>{const{show:e,text:r,showConfirm:s,hideConfirm:t}=f.useContext(C.ConfirmContext),o=()=>{t()};return{confirm:async c=>(s(c),new Promise(i=>{n=i})),onConfirm:()=>{o(),n(!0)},onCancel:()=>{o(),n(!1)},show:e,text:r}};exports.useConfirm=m;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { C as i } from "./useAxios-D-fCu46c.js";
|
|
2
|
-
import { useContext as C } from "react";
|
|
3
|
-
let o;
|
|
4
|
-
const h = () => {
|
|
5
|
-
const { show: r, text: e, showConfirm: t, hideConfirm: s } = C(i), n = () => {
|
|
6
|
-
s();
|
|
7
|
-
};
|
|
8
|
-
return { confirm: async (m) => (t(m), new Promise((c) => {
|
|
9
|
-
o = c;
|
|
10
|
-
})), onConfirm: () => {
|
|
11
|
-
n(), o(!0);
|
|
12
|
-
}, onCancel: () => {
|
|
13
|
-
n(), o(!1);
|
|
14
|
-
}, show: r, text: e };
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
h as u
|
|
18
|
-
};
|