ekm-ui 0.4.39 → 0.4.41
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/.turbo/turbo-build.log +72 -67
- package/CHANGELOG.md +12 -0
- package/dist/accordion.d.ts +9 -8
- package/dist/accordion.js +1 -1
- package/dist/card-payment-block.js +10 -9
- package/dist/{chunk-QJOSZI6O.js → chunk-EY2UUYEC.js} +6 -6
- package/dist/{chunk-NQ5VRJLN.js → chunk-FPXEE5TC.js} +2 -2
- package/dist/chunk-JFL77JIP.js +14 -0
- package/dist/chunk-JFL77JIP.js.map +1 -0
- package/dist/chunk-QZFOPL3O.js +12 -0
- package/dist/chunk-QZFOPL3O.js.map +1 -0
- package/dist/{chunk-U4WMBFRC.js → chunk-R3QJRZTP.js} +2 -2
- package/dist/{chunk-U4WMBFRC.js.map → chunk-R3QJRZTP.js.map} +1 -1
- package/dist/country-picker/country-modal.js +10 -9
- package/dist/date-time-component.d.ts +23 -0
- package/dist/date-time-component.js +8 -0
- package/dist/date-time-component.js.map +1 -0
- package/dist/drag-and-drop.js +10 -9
- package/dist/file-picker/file-listing.js +2 -2
- package/dist/file-picker/file-picker.js +10 -9
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -9
- package/dist/layout/layout.js +10 -9
- package/dist/product-picker/product-modal.js +10 -9
- package/dist/radio.js +1 -1
- package/dist/stacked-list-item.js +10 -9
- package/dist/table-result-block.js +10 -9
- package/package.json +1 -1
- package/src/accordion.tsx +21 -20
- package/src/date-time-component.tsx +257 -0
- package/src/helpers/datetime.js +90 -0
- package/src/index.tsx +2 -1
- package/src/radio.tsx +2 -2
- package/dist/chunk-YDCYBJPC.js +0 -12
- package/dist/chunk-YDCYBJPC.js.map +0 -1
- /package/dist/{chunk-QJOSZI6O.js.map → chunk-EY2UUYEC.js.map} +0 -0
- /package/dist/{chunk-NQ5VRJLN.js.map → chunk-FPXEE5TC.js.map} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { a as a$e } from './chunk-LQKVFBLU.js';
|
|
1
2
|
import { a as a$8, b } from './chunk-HVNLAQA6.js';
|
|
2
3
|
import { a as a$h } from './chunk-22RUXGYW.js';
|
|
3
|
-
import { a as a$e } from './chunk-LQKVFBLU.js';
|
|
4
4
|
import { a as a$9 } from './chunk-XXP5K6Y4.js';
|
|
5
|
-
import { a as a$i } from './chunk-NQ5VRJLN.js';
|
|
6
5
|
import { a as a$j } from './chunk-F7MTEILK.js';
|
|
6
|
+
import { a as a$i } from './chunk-FPXEE5TC.js';
|
|
7
|
+
import { a as a$1 } from './chunk-T2SOP5NE.js';
|
|
7
8
|
import { a as a$c } from './chunk-AVTJXS4U.js';
|
|
8
|
-
import { a as a$4 } from './chunk-
|
|
9
|
+
import { a as a$4 } from './chunk-R3QJRZTP.js';
|
|
9
10
|
import { a as a$d } from './chunk-AO5TGD7T.js';
|
|
10
11
|
import { a as a$7 } from './chunk-GUK5N5Z2.js';
|
|
11
12
|
import { a as a$a } from './chunk-ESJIQMQJ.js';
|
|
12
|
-
import { a as a$1 } from './chunk-T2SOP5NE.js';
|
|
13
13
|
import { a as a$b } from './chunk-NDDDT4TO.js';
|
|
14
14
|
import { a as a$3 } from './chunk-ER5CL77P.js';
|
|
15
15
|
import { a as a$6 } from './chunk-E4USZ2Q3.js';
|
|
@@ -29,8 +29,8 @@ import { BsCloudUpload, BsFillCheckCircleFill, BsFillImageFill } from 'react-ico
|
|
|
29
29
|
import { FaTimesCircle } from 'react-icons/fa';
|
|
30
30
|
import jr from 'pluralize';
|
|
31
31
|
|
|
32
|
-
function We({cardPayment:r,enablePayPal:e}){return jsxs(a$3,{className:"border-0 shadow-sm ",children:[jsx("h3",{className:"text-xl font-semibold dark:text-white",children:"Billing Details"}),jsx("div",{className:"flex items-center justify-between pb-4",children:jsxs("fieldset",{className:"flex w-full flex-col gap-4",id:"radio",children:[jsxs("div",{className:"flex flex-col gap-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[e&&jsx(a$4,{id:"creditDebitCard",name:"paymentType",value:"creditDebitCard"}),jsx(a$5,{htmlFor:"creditDebitCard",children:"Pay by Credit or Debit card"})]}),jsxs("div",{className:e?"ml-6 flex gap-2":"flex gap-2",children:[jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/visa.png",alt:"VISA Card Logo"}),jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/mastercard.png",alt:"MasterCard Card Logo"}),jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/maestro.png",alt:"Maestro Card Logo"}),jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/amex.png",alt:"AMEX Card Logo"})]})]}),r&&jsxs(Fragment,{children:[jsxs("div",{className:"grid grid-cols-1 content-start gap-6 md:grid-cols-2",children:[jsx(a$6,{label:"Name on Card *",htmlFor:"nameOnCard",helperText:"This is your name as is appears on the front of your credit or debit card.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"Your name",type:"text",required:!0})}),jsx(a$6,{label:"Card Number *",htmlFor:"cardNumber",helperText:"This is the long number on the front of your credit or debit card.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"0000 0000 0000 0000",type:"number",rightIcon:HiCreditCard,required:!0})})]}),jsxs("div",{className:"grid grid-cols-1 content-start gap-6 sm:grid-cols-3 md:grid-cols-4",children:[jsx(a$6,{label:"Expiry Date *",htmlFor:"nameOnCard",helperText:"The expiry date as it appears on your card.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"MM / YY",type:"text",required:!0})}),jsx(a$6,{label:"Security Code (CVC) *",htmlFor:"cardNumber",helperText:"The last three digits on the back of your card\u2019s signature strip.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"123",type:"text",rightIcon:HiCreditCard,required:!0})}),jsx("img",{className:"mt-7 hidden h-auto w-16 sm:block",src:"https://shared.ekmcdn.com/images/rise/cvc-reminder-image.png",alt:""})]})]}),e&&jsxs("div",{className:"flex flex-col gap-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(a$4,{id:"PayPal",name:"paymentType",value:"PayPal"}),jsx(a$5,{htmlFor:"PayPal",children:"PayPal"})]}),jsx("div",{className:"ml-6",children:jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/paypal.png",alt:"PayPal Icon"})})]})]})})]})}We.displayName="CardPaymentBlock";function Xe(){return jsxs(Sidebar.Items,{children:[jsxs(Sidebar.ItemGroup,{children:[jsx(Sidebar.Item,{href:"/",icon:HiChartPie,className:"bg-gray-100 dark:bg-gray-700",children:"Dashboard"}),jsx(Sidebar.Item,{href:"/products",icon:HiTag,className:"",children:"Products"}),jsx(Sidebar.Item,{href:"/orders",icon:HiShoppingBag,label:"27",className:"",children:"Orders"}),jsxs(Sidebar.Collapse,{icon:HiPaintBrush,label:"Design",children:[jsx(Sidebar.Item,{href:"/design/design",className:"",children:"Theme"}),jsx(Sidebar.Item,{href:"/design/editor",className:"",children:"Editor"}),jsx(Sidebar.Item,{href:"/theme/webpages",className:"",children:"Webpages"})]}),jsx(Sidebar.Item,{href:"/features",icon:HiStar,className:"",children:"Features"})]}),jsxs(Sidebar.ItemGroup,{children:[jsx(Sidebar.Item,{href:"https://github.com/themesberg/flowbite-react/",icon:HiDocument,children:"Docs"}),jsx(Sidebar.Item,{href:"https://flowbite-react.com/",icon:HiRocketLaunch,children:"What's New"}),jsx(Sidebar.Item,{href:"https://github.com/themesberg/flowbite-react/issues",icon:HiGlobeAlt,children:"Support Centre"})]})]})}function Cr({children:r,hasHeader:e}){let[a,s]=useState(!1),[v,R]=useState(!1);return useMemo(()=>{a$8()&&!a&&R(!0);},[a]),jsxs(Fragment,{children:[jsx(a$9,{onMenuButtonClick:()=>{s(!a);},showCloseButton:v,avatarImg:"https://avatars.githubusercontent.com/u/49406022?v=4"}),jsxs("div",{className:"flex",children:[jsx(b,{collapsed:a,children:jsx(Xe,{})}),jsxs("div",{className:"flex w-3/4 flex-grow flex-col",children:[jsx("main",{className:`"relative dark:bg-gray-900" flex h-full flex-grow flex-col gap-4 overflow-y-auto bg-gray-50 ${e?"":"p-4"}`,children:r}),jsx(a$a,{companyName:"EKM"})]})]})]})}var $=e(a(),1);var S=Object.freeze({NONE:"none",OVER:"drag-over",UPLOADING:"uploading",ERROR:"error",SUCCESS:"success"}),Pr=Object.freeze({[S.NONE]:"border-gray-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",[S.OVER]:"border-blue-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600",[S.UPLOADING]:"border-blue-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600",[S.ERROR]:"border-red-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-red-600 dark:hover:border-red-500 dark:hover:bg-red-600",[S.SUCCESS]:"border-green-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-green-600 dark:hover:border-green-500 dark:hover:bg-green-600"}),Lr=["png","webp","jpg","gif","jpeg"];function Qe(r,e){let a=!e||e.length===0?Lr:e;if(!r||r.length===0)return !1;let s=r.split(".").pop().toLowerCase();return a.includes(s)}function le({subtitle:r="PNG, WEBP, JPG, JPEG or GIF",filetypes:e,uploaded:a,exitCallback:s,callback:v,errorCallback:R,pickerCallback:x}){let[l,b]=useState(S.NONE);useEffect(()=>{Object.values(S).includes(a)&&(b(a),setTimeout(()=>{a===S.ERROR&&R?R():b(S.NONE);},2e3));},[a]);let O=o=>{o.preventDefault(),b(S.OVER);},T=o=>{o.preventDefault(),s&&s(),b(S.NONE);},c=o=>{o.preventDefault(),Qe(o.dataTransfer.files[0].name,e)?(b(S.UPLOADING),v(o.dataTransfer.files[0])):(b(S.ERROR),setTimeout(()=>{R();},2e3));},B=o=>{Qe(o.target.files[0].name,e)?b(S.UPLOADING):b(S.ERROR),v(o.target.files[0]);},p=()=>{x&&x();},D=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsx(BsCloudUpload,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),jsxs("p",{className:"mb-2 mt-5 text-sm text-gray-500 dark:text-gray-400",children:[jsx("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:r}),x&&jsx("div",{className:"mt-3 mb-3",children:jsxs(a$2,{color:"default",onClick:p,children:[jsx(BiSearch,{className:"mr-2"}),"Browse File Manager"]})})]}),y=()=>jsx("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:jsx("p",{className:"mb-2 mt-5 text-sm text-blue-500 dark:text-blue-400",children:jsx("span",{className:"font-semibold",children:"Drop here to upload"})})}),k=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsxs("svg",{"aria-hidden":"true",className:"mr-2 inline h-10 w-10 animate-spin text-gray-200 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),jsx("p",{className:"mb-2 mt-5 text-sm text-blue-500 dark:text-blue-400",children:jsx("span",{className:"font-semibold",children:"Uploading..."})})]}),C=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsx(FaTimesCircle,{className:"h-12 w-12 text-red-400 dark:text-red-500"}),jsx("p",{className:"mb-2 mt-5 text-sm text-red-500 dark:text-red-400",children:jsx("span",{className:"font-semibold",children:"Unable to upload"})})]}),H=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsx(BsFillCheckCircleFill,{className:"h-12 w-12 text-green-400 dark:text-green-500"}),jsx("p",{className:"mb-2 mt-5 text-sm text-green-500 dark:text-green-400",children:jsx("span",{className:"font-semibold",children:"Uploaded"})})]}),P=()=>{switch(l){case S.OVER:return y();case S.UPLOADING:return k();case S.ERROR:return C();case S.SUCCESS:return H();default:return D()}};return jsx("div",{onDragEnter:o=>o.preventDefault(),onDragOver:O,onDrop:c,onDragLeave:T,className:"flex h-full w-full items-center justify-center",children:jsxs("label",{htmlFor:"dropzone-file",className:`flex h-full w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed ${Pr[l]}`,children:[P(),l===S.NONE&&jsx("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:B})]})})}le.propTypes={filetypes:$.default.arrayOf($.default.string),subtitle:$.default.string,uploaded:$.default.oneOf(["none","success","error"]).isRequired,exitCallback:$.default.func,errorCallback:$.default.func.isRequired,callback:$.default.func.isRequired,pickerCallback:$.default.func};le.displayName="DragAndDrop";var X=e(a(),1);var rr="/admin/api/common/directoryinformation/",t=Object.freeze({EMPTY:"EMPTY",SEARCH_LOADING:"SEARCH-LOADING",LOADING:"LOADING",LOADED:"LOADED",LOADED_NO_DRAG:"LOADED_NO_DRAG",SEARCH_RESULTS:"SEARCH-RESULTS",SEARCH_EMPTY:"SEARCH-EMPTY",UPLOAD_ERROR:"ERROR",DRAGGING:"DRAGGING"}),Ir=Object.freeze({mode:t.LOADING,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-5/6",listBorder:"",searchDisabled:!1});function Br(r,e){switch(e.type){case t.EMPTY:return {mode:t.EMPTY,actionBtnTxt:"Add Image",actionBtnColor:"default",listSize:"h-5/6",listBorder:"",searchDisabled:!0};case t.LOADING:return Ir;case t.LOADED:return {mode:t.LOADED,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-[68.666667%]",listBorder:"border",searchDisabled:!1};case t.LOADED_NO_DRAG:return {mode:t.LOADED_NO_DRAG,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-[85%]",listBorder:"border",searchDisabled:!1};case t.SEARCH_RESULTS:return {mode:t.SEARCH_RESULTS,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-5/6",listBorder:"border",searchDisabled:!1};case t.SEARCH_EMPTY:return {mode:t.SEARCH_EMPTY,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-5/6",listBorder:"",searchDisabled:!1};default:throw new Error("Unknown file picker state: "+e.page)}}function Me({appUrl:r,uri:e,show:a,hideDrag:s=!1,onClose:v,callback:R}){let x=useRef(),[l,b]=useReducer(Br,{mode:t.LOADING,footerBorder:"border-t"}),[O,T]=useState(0),c=useRef(1),[B,p]=useState(!1),[D,y]=useState(!1),k=useRef({pages:0,totalEntries:0}),[C,H]=useState(!1),[P,o]=useState(""),[n,A]=useState(null),[M,re]=useState([]),[fe,F]=useState("none");useEffect(()=>{a&&(b({type:t.LOADING}),A(null),k.current={pages:0,totalEntries:0},ve(),te(""));},[a]),useEffect(()=>{n&&A(null),D&&y(!1);},[l.mode]);let ve=()=>{re([]),F("none"),H(!1),A(null),y(!1),o(""),c.current=1;},te=u=>f$1(this,null,function*(){let G=c.current;try{let J=(u==null?void 0:u.length)>0?`&FileNameIncludesString=${u}`:"&FileNameIncludesString=",q=yield (yield fetch(`${r}${rr}?CurrentPage=${G}&PageSize=10&Uri=${e}${J}`,{method:"GET",credentials:"same-origin",headers:{"Content-Type":"application/json"}})).json();if(q.Items.Data.length>0&&G>1?re(De=>[...De,...q.Items.Data]):re(q.Items.Data),k.current={pages:q.Items.NumberOfPages,totalEntries:q.Items.Total},T(q.Items.NumberOfPages),(u==null?void 0:u.length)>0)b({type:q.Items.Data.length>0?t.SEARCH_RESULTS:t.SEARCH_EMPTY});else {let De=s?t.LOADED_NO_DRAG:t.LOADED;b({type:q.Items.Data.length>0?De:t.EMPTY});}F("none"),H(!1),p(!1);}catch(J){b({type:(u==null?void 0:u.length)===0?t.SEARCH_EMPTY:t.EMPTY});}}),d=u=>{s||(p(!0),x.current.removeFocus(),u.preventDefault());},L=u=>{s||p(!1);},ae=u=>{var ce;let G=(ce=u.text)!=null?ce:"",J=P!=null?P:"";o(G),(J.length>0&&G.length===0||J.length===0&&G.length>0&&l.mode!==t.LOADING)&&b({type:t.LOADING}),c.current=1,D&&y(!1),te(G);},U=()=>{y(!0),p(!1),F("none");},ge=()=>{R(`https://files.ekmcdn.com/${n.Uri}`),Re();},Re=()=>{v();},qe=u=>f$1(this,null,function*(){if(u==null){F("error"),U();return}try{let G=zr(u.name),J=yield Ur(u),ce={Path:`/${e}/`,Name:G,Bytes:Yr(J),ForceOverwriteFile:!0};(yield fetch(`${r}${rr}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(ce)})).status===200?(F("success"),o(""),x.current.clear(),c.current=1,re([]),y(!1),te("")):F("error");}catch(G){F("error");}}),nr=u=>{switch(u.type){case"FETCH_DATA":H(u.payload),c.current<k.current.pages&&!C&&(H(!0),c.current=c.current+1,te(P));break;case"SELECTION":A(u.payload),y(!1);break;}},cr=()=>{switch(l.mode){case t.EMPTY:return jsx(_r,{});case t.LOADING:return jsx(Hr,{});case t.SEARCH_RESULTS:case t.LOADED:case t.LOADED_NO_DRAG:return jsx(a$i,{border:l.listSize,files:M,isMore:c.current<k.current.pages,selected:n==null?void 0:n.Name,page:c.current,pages:O,callback:nr});case t.SEARCH_EMPTY:return jsx(Mr,{});}},dr=()=>jsxs(Fragment,{children:[jsx(a$e,{id:"file-search",ref:x,placeholder:"Search your images",disabled:l.searchDisabled,callback:ae,additionalClasses:"pt-4"}),jsxs("div",{className:"mb-4 mt-4",children:[D&&jsxs(a$g,{type:"danger",onDismiss:()=>{y(!1);},children:[jsx("p",{className:"font-semibold",children:"File could not be uploaded"}),jsx("p",{children:"There was an error uploading the file. Please try again."})]}),l.mode!==t.SEARCH_RESULTS&&l.mode!==t.SEARCH_EMPTY&&!s&&jsx("div",{className:"h-68",children:jsx(le,{uploaded:fe,callback:qe,errorCallback:U})}),(l.mode===t.SEARCH_RESULTS||l.mode===t.SEARCH_EMPTY)&&(P==null?void 0:P.length)>0&&jsx("span",{className:"ms-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ms-2",children:`Showing results for..."${P}"`})]}),cr()]});return jsxs(a$b,{show:a,onClose:Re,title:"File Picker",onHide:()=>{},children:[jsxs("div",{className:"h-full",onDragEnter:d,children:[a&&B&&!s&&(()=>jsx("div",{className:"absolute z-50 h-[90.666667%] w-[93.666667%]",children:jsx(le,{uploaded:fe,exitCallback:L,callback:qe,errorCallback:U})}))(),a&&dr()]}),jsxs("div",{className:"bottom-0 grid grid-flow-col grid-cols-2 gap-4 bg-white pt-2 dark:border-gray-600",style:{marginTop:"-50px"},children:[jsx(a$2,{color:"light",onClick:Re,children:"Close"}),jsx(a$2,{color:l.actionBtnColor,onClick:ge,disabled:n==null,children:l.actionBtnTxt})]})]})}Me.propTypes={appUrl:X.default.string.isRequired,uri:X.default.string.isRequired,show:X.default.bool.isRequired,hideDrag:X.default.bool,onClose:X.default.func.isRequired,callback:X.default.func.isRequired};Me.displayName="FilePicker";function _r(){return jsxs("div",{className:"mt-5 flex flex-col items-center justify-center",children:[jsx("h1",{children:jsx(BsFillImageFill,{className:"text-9xl text-gray-700"})}),jsx("p",{className:"mt-4 text-2xl font-semibold text-gray-900",children:"You Have No Images"}),jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Images will appear here when you upload them"})]})}function Hr(){return jsx("div",{className:"flex h-2/3 items-center justify-center overflow-y-auto",children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsx("h1",{children:jsx(Fr,{})}),jsx("p",{className:"mt-4 text-2xl font-semibold text-gray-900",children:"Loading Files"}),jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Don't worry, this won't take long..."})]})})}function Mr(){return jsx("div",{className:"flex h-5/6 items-center justify-center overflow-y-auto",children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsx("h1",{children:jsx(HiOutlineSearch,{className:"text-9xl text-gray-700"})}),jsx("p",{className:"mt-4 text-2xl font-semibold text-gray-900",children:"No Files Found"}),jsx("p",{className:"mt-4 text-sm text-gray-500",children:"No files were found matching your search"})]})})}function Fr(){return jsxs("div",{role:"status",children:[jsxs("svg",{"aria-hidden":"true",className:"inline h-14 w-14 animate-spin fill-blue-600 text-gray-200 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),jsx("span",{className:"sr-only",children:"Loading..."})]})}function Ur(r){return f$1(this,null,function*(){return new Uint8Array(yield Gr(r))})}function Gr(r){return new Promise((e,a)=>{let s=new FileReader;s.onloadend=v=>e(v.target.result),s.onerror=v=>a(v),s.readAsArrayBuffer(r);})}function Yr(r){return btoa(Array.from(r).map(e=>String.fromCharCode(e)).join(""))}function zr(r){return r.replace(/[^a-z0-9_\.-]/gi,"_").toLowerCase()}var ie=e(a(),1);function K({title:r,message:e,icon:a,children:s}){return jsx(a$c,{icon:a||jsx(a$d,{}),title:r,text:e,children:s})}K.propTypes={title:ie.PropTypes.string.isRequired,message:ie.PropTypes.string,useSpinner:ie.PropTypes.bool,icon:ie.PropTypes.node,children:ie.PropTypes.node};K.displayName="TableResultBlock";var Q=e(a(),1);var m=Object.freeze({EMPTY:"EMPTY",SEARCH_LOADING:"SEARCH-LOADING",LOADING:"LOADING",LOADED:"LOADED",SEARCH_RESULTS:"SEARCH-RESULTS",SEARCH_EMPTY:"SEARCH-EMPTY"}),ye=[{display:"Name",value:"Name"},{display:"Category",value:"Category"},{display:"Product Code",value:"ProductCode"}],ar=Object.freeze({mode:m.LOADING,searchDisabled:!1});function Xr(r,e){switch(e.type){case m.EMPTY:return {mode:m.EMPTY,searchDisabled:!0};case m.LOADING:return ar;case m.LOADED:return {mode:m.LOADED,searchDisabled:!1};case m.SEARCH_RESULTS:return {mode:m.SEARCH_RESULTS,searchDisabled:!1};case m.SEARCH_EMPTY:return {mode:m.SEARCH_EMPTY,searchDisabled:!1};default:throw new Error("Unknown file picker state: "+e.page)}}var Ge=forwardRef(function({preSelected:e=[],onClose:a,productCodeEnabled:s,requestCallback:v,callback:R,selectionLimit:x},l){let b=useRef(),[O,T]=useReducer(Xr,ar),[c,B]=useState(0),p=useRef(1),D=useRef({pages:0,totalEntries:0}),[y,k]=useState(!1),[C,H]=useState({text:"",category:ye[0]}),[P,o]=useState([]),[n,A]=useState(new Set([]));useEffect(()=>{M("",ye[0].value),A(new Set(e));},[]);let M=(d,L)=>{v({SearchText:d||"",PageSize:11,Page:p.current,SearchType:L});};useImperativeHandle(l,()=>({responseHandler:d=>{var L,ae;try{d.Result.Data.length>0&&p.current>1?o(U=>[...U,...d.Result.Data]):o(d.Result.Data),D.current={pages:d.Result.NumberOfPages,totalEntries:d.Result.Total},B(d.Result.NumberOfPages),((L=C.text)==null?void 0:L.length)>0?T({type:d.Result.Data.length>0?m.SEARCH_RESULTS:m.SEARCH_EMPTY}):T({type:d.Result.Data.length>0?m.LOADED:m.EMPTY}),k(!1);}catch(U){console.error("Error fetching products",U),T({type:((ae=C.text)==null?void 0:ae.length)===0?m.SEARCH_EMPTY:m.EMPTY});}}}));let re=d=>{var U,ge;let L=(U=d.text)!=null?U:"",ae=(ge=C.text)!=null?ge:"";(L!=ae||d.category.value!=C.category.value)&&(p.current=1,T({type:m.LOADING}),M(L,d.category.value)),H({text:L,category:d.category});},fe=()=>{R(Array.from(n));},F=d=>{switch(d.type){case"FETCH_DATA":k(d.payload),p.current<D.current.pages&&!y&&(k(!0),p.current=p.current+1,M(C.text,C.category.value));break;case"SELECTION":if(n.has(d.payload))n.delete(d.payload),A(L=>new Set(L));else {if(x&&(n==null?void 0:n.size)===Number(x))return;n.add(d.payload),A(L=>new Set(L));}break;case"DESELECT_ALL":A(new Set([]));break;}},ve=()=>{switch(O.mode){case m.EMPTY:return jsx(Ue,{title:"You Have No Products",msg:"Your products will appear here"});case m.LOADING:return jsx(Ue,{title:"Loading Products",msg:"Don't worry, this won't take long...",showSpinner:!0});case m.SEARCH_RESULTS:case m.LOADED:return jsx(a$h,{products:P,isMore:p.current<D.current.pages,selected:n,page:p.current,pages:c,callback:F});case m.SEARCH_EMPTY:return jsx(Ue,{title:"No Products Found",msg:"No products were found matching your search",blockHeight:"h-[460px]"});}},te=()=>jsxs("div",{className:"pt-4",children:[n.size>0&&jsx("div",{className:"mb-4 rounded-md border border-orange-200 bg-yellow-50 p-4",children:jsxs("p",{className:"text-center text-sm text-yellow-800",children:[`${x&&n.size===Number(x)?"Maximum ":""}${jr("product",n.size,!0)} selected.`,jsx("span",{id:"btnClear",onClick:()=>F({type:"DESELECT_ALL",payload:null}),className:"cursor-pointer text-primary-600 hover:underline",children:" Clear Selection."})]})}),jsx(a$e,{id:"file-search",ref:b,categories:s?ye:ye.filter(d=>d.value!=="ProductCode"),placeholder:"Search your products",disabled:O.searchDisabled,callback:re}),jsx("div",{className:"mb-4 mt-4",children:(O.mode===m.SEARCH_RESULTS||O.mode===m.SEARCH_EMPTY)&&C.text.length>0&&jsx("span",{className:"ms-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ms-2",children:`Showing results for..."${C.text}"`})}),ve()]});return jsxs(a$1,{show:!0,onClose:a,title:"Choose Products",size:"lg",id:"productSelectModal",children:[jsx(a$1.Body,{children:jsx("div",{className:"h-full",children:te()})}),jsx(a$1.Footer,{children:jsxs("div",{className:"flex-grow grid grid-col-2 grid-flow-col gap-4",children:[jsx(a$2,{id:"btnClose",color:"light",onClick:a,children:"Close"}),jsx(a$2,{id:"btnAdd",color:"success",onClick:fe,disabled:n.size===0,children:"Add Products"})]})})]})}),Ue=({title:r,msg:e,blockHeight:a="h-[500px]",showSpinner:s=!1})=>jsx("div",{className:`${a} flex items-center justify-center`,children:jsx(K,{icon:!s&&jsx(HiClipboardList,{className:"mb-4 h-16 w-16 text-gray-500 dark:text-gray-400"}),title:r,message:e,spinner:s})});Ge.propTypes={preSelected:Q.default.array,onClose:Q.default.func.isRequired,productCodeEnabled:Q.default.bool,requestCallback:Q.default.func.isRequired,callback:Q.default.func.isRequired,selectionLimit:Q.default.number};Ge.displayName="ProductPicker";var ne=e(a(),1);var f=Object.freeze({EMPTY:"EMPTY",LOADING:"LOADING",LOADED:"LOADED",SEARCH_RESULTS:"SEARCH-RESULTS",SEARCH_EMPTY:"SEARCH-EMPTY"}),sr=Object.freeze({mode:f.LOADING,searchDisabled:!1});function tt(r,e){switch(e.type){case f.EMPTY:return {mode:f.EMPTY,searchDisabled:!0};case f.LOADING:return sr;case f.LOADED:return {mode:f.LOADED,searchDisabled:!1};case f.SEARCH_RESULTS:return {mode:f.SEARCH_RESULTS,searchDisabled:!1};case f.SEARCH_EMPTY:return {mode:f.SEARCH_EMPTY,searchDisabled:!1};default:throw new Error("Unknown file picker state: "+e.page)}}function lr({initialLoadComplete:r,allCountryData:e,preSelected:a=[],onClose:s,callback:v}){let[R,x]=useReducer(tt,sr),[l,b]=useState(""),[O,T]=useState([]),[c,B]=useState([]),p=useRef([]);useEffect(()=>{((e==null?void 0:e.length)>0||r)&&(p.current=e,y(""));},[e]),useEffect(()=>{B(a);},[a]);let D=o=>{var M;let n=(M=o.text)!=null?M:"",A=l!=null?l:"";n!=A&&(x({type:f.LOADING}),y(n)),b(n);},y=o=>{let n=o?p.current.filter(A=>A.Country.toLowerCase().includes(o.toLowerCase())):p.current;(n==null?void 0:n.length)>0?(T(n),x({type:(o==null?void 0:o.length)>0?f.SEARCH_RESULTS:f.LOADED})):(T([]),x({type:(o==null?void 0:o.length)>0?f.SEARCH_EMPTY:f.EMPTY}));},k=()=>{v(c);},C=(o,n)=>{let A=n?c.filter(M=>M.CountryCode!=o.CountryCode):[...c,o];B(A);},H=()=>{switch(R.mode){case f.EMPTY:return jsx(ze,{title:"No Countries",msg:"Available countries will appear here"});case f.LOADING:return jsx(ze,{title:"Loading Countries",msg:"Don't worry, this won't take long...",showSpinner:!0});case f.SEARCH_RESULTS:case f.LOADED:return jsx(a$j,{countryData:O,selectedCountries:c,countrySelectCallback:C});case f.SEARCH_EMPTY:return jsx(ze,{title:"No Countries Found",msg:"No countries were found matching your search",blockHeight:"h-[460px]"});}},P=()=>jsxs("div",{className:"pt-4",children:[(c==null?void 0:c.length)>0&&jsx("div",{className:"mb-4 rounded-md border border-orange-200 bg-yellow-50 p-4",children:jsxs("p",{className:"text-center text-sm text-yellow-800",children:[`${jr("country",c==null?void 0:c.length,!0)} selected.`,jsx("span",{onClick:()=>B([]),className:"cursor-pointer text-primary-600 hover:underline",children:" Clear Selection."})]})}),jsx(a$e,{id:"locationSearch",placeholder:"Search for countries",disabled:R.searchDisabled,callback:D}),jsx("div",{className:"mb-4 mt-4",children:(R.mode===f.SEARCH_RESULTS||R.mode===f.SEARCH_EMPTY)&&l.length>0&&jsx("span",{className:"ms-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ms-2",children:`Showing results for..."${l}"`})}),H()]});return jsxs(a$1,{show:!0,onClose:s,title:"Choose Locations",size:"md",children:[jsx(a$1.Body,{children:jsx("div",{className:"h-full",children:P()})}),jsx(a$1.Footer,{children:jsxs("div",{className:"flex-grow grid grid-col-2 grid-flow-col gap-4",children:[jsx(a$2,{color:"light",onClick:s,children:"Close"}),jsx(a$2,{color:"success",onClick:k,disabled:(c==null?void 0:c.length)===0,children:"Add Locations"})]})})]})}var ze=({title:r,msg:e,blockHeight:a="h-[500px]",showSpinner:s=!1})=>jsx("div",{className:`${a} flex items-center justify-center`,children:jsx(K,{icon:!s&&jsx(HiClipboardList,{className:"mb-4 h-16 w-16 text-gray-500 dark:text-gray-400"}),title:r,message:e,spinner:s})});lr.propTypes={initialLoadComplete:ne.default.bool.isRequired,allCountryData:ne.default.array.isRequired,preSelected:ne.default.array.isRequired,onClose:ne.default.func.isRequired,callback:ne.default.func.isRequired};function ir({id:r,title:e,text:a,avatarShow:s,avatarColor:v,avatarBorder:R,children:x,badgeText:l,badgeColor:b,icon:O}){function T(B){var p=B.split(" "),D=p[0],y=p[p.length-1],k=D.charAt(0);if(D!==y)var C=y.charAt(0);else var C="";return k+C}let c=T(e);return jsxs("li",{className:"hover:bg-gray-90 relative flex justify-between gap-x-6 px-4 py-5 dark:hover:bg-gray-900",children:[jsxs("div",{className:"flex min-w-0 flex-auto items-center gap-x-4",children:[s&&jsx(a$f,{placeholderInitials:c,color:v,border:R}),O&&O,jsxs("div",{className:"min-w-0 flex-auto",children:[jsxs("div",{className:"flex gap-2",children:[jsx("p",{className:"truncate text-sm font-semibold text-gray-900 dark:text-white",children:e}),l&&jsx(Badge,{color:b||"info",children:l})]}),jsx("p",{className:"mt-1 flex text-xs text-gray-500 dark:text-gray-400",children:jsx("span",{className:"relative truncate",children:a})})]})]}),jsx("div",{className:"flex flex-shrink-0 items-center gap-x-4",children:jsx("div",{className:"sm:flex sm:flex-col sm:items-end",children:x})})]},r)}ir.displayName="StackedListItem";
|
|
32
|
+
function We({cardPayment:r,enablePayPal:e}){return jsxs(a$3,{className:"border-0 shadow-sm ",children:[jsx("h3",{className:"text-xl font-semibold dark:text-white",children:"Billing Details"}),jsx("div",{className:"flex items-center justify-between pb-4",children:jsxs("fieldset",{className:"flex w-full flex-col gap-4",id:"radio",children:[jsxs("div",{className:"flex flex-col gap-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[e&&jsx(a$4,{id:"creditDebitCard",name:"paymentType",value:"creditDebitCard"}),jsx(a$5,{htmlFor:"creditDebitCard",children:"Pay by Credit or Debit card"})]}),jsxs("div",{className:e?"ml-6 flex gap-2":"flex gap-2",children:[jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/visa.png",alt:"VISA Card Logo"}),jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/mastercard.png",alt:"MasterCard Card Logo"}),jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/maestro.png",alt:"Maestro Card Logo"}),jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/amex.png",alt:"AMEX Card Logo"})]})]}),r&&jsxs(Fragment,{children:[jsxs("div",{className:"grid grid-cols-1 content-start gap-6 md:grid-cols-2",children:[jsx(a$6,{label:"Name on Card *",htmlFor:"nameOnCard",helperText:"This is your name as is appears on the front of your credit or debit card.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"Your name",type:"text",required:!0})}),jsx(a$6,{label:"Card Number *",htmlFor:"cardNumber",helperText:"This is the long number on the front of your credit or debit card.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"0000 0000 0000 0000",type:"number",rightIcon:HiCreditCard,required:!0})})]}),jsxs("div",{className:"grid grid-cols-1 content-start gap-6 sm:grid-cols-3 md:grid-cols-4",children:[jsx(a$6,{label:"Expiry Date *",htmlFor:"nameOnCard",helperText:"The expiry date as it appears on your card.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"MM / YY",type:"text",required:!0})}),jsx(a$6,{label:"Security Code (CVC) *",htmlFor:"cardNumber",helperText:"The last three digits on the back of your card\u2019s signature strip.",children:jsx(a$7,{id:"nameOnCard",name:"nameOnCard",placeholder:"123",type:"text",rightIcon:HiCreditCard,required:!0})}),jsx("img",{className:"mt-7 hidden h-auto w-16 sm:block",src:"https://shared.ekmcdn.com/images/rise/cvc-reminder-image.png",alt:""})]})]}),e&&jsxs("div",{className:"flex flex-col gap-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(a$4,{id:"PayPal",name:"paymentType",value:"PayPal"}),jsx(a$5,{htmlFor:"PayPal",children:"PayPal"})]}),jsx("div",{className:"ml-6",children:jsx("img",{src:"https://shared.ekmcdn.com/images/uifw/cards/paypal.png",alt:"PayPal Icon"})})]})]})})]})}We.displayName="CardPaymentBlock";function Xe(){return jsxs(Sidebar.Items,{children:[jsxs(Sidebar.ItemGroup,{children:[jsx(Sidebar.Item,{href:"/",icon:HiChartPie,className:"bg-gray-100 dark:bg-gray-700",children:"Dashboard"}),jsx(Sidebar.Item,{href:"/products",icon:HiTag,className:"",children:"Products"}),jsx(Sidebar.Item,{href:"/orders",icon:HiShoppingBag,label:"27",className:"",children:"Orders"}),jsxs(Sidebar.Collapse,{icon:HiPaintBrush,label:"Design",children:[jsx(Sidebar.Item,{href:"/design/design",className:"",children:"Theme"}),jsx(Sidebar.Item,{href:"/design/editor",className:"",children:"Editor"}),jsx(Sidebar.Item,{href:"/theme/webpages",className:"",children:"Webpages"})]}),jsx(Sidebar.Item,{href:"/features",icon:HiStar,className:"",children:"Features"})]}),jsxs(Sidebar.ItemGroup,{children:[jsx(Sidebar.Item,{href:"https://github.com/themesberg/flowbite-react/",icon:HiDocument,children:"Docs"}),jsx(Sidebar.Item,{href:"https://flowbite-react.com/",icon:HiRocketLaunch,children:"What's New"}),jsx(Sidebar.Item,{href:"https://github.com/themesberg/flowbite-react/issues",icon:HiGlobeAlt,children:"Support Centre"})]})]})}function Cr({children:r,hasHeader:e}){let[a,s]=useState(!1),[v,D]=useState(!1);return useMemo(()=>{a$8()&&!a&&D(!0);},[a]),jsxs(Fragment,{children:[jsx(a$9,{onMenuButtonClick:()=>{s(!a);},showCloseButton:v,avatarImg:"https://avatars.githubusercontent.com/u/49406022?v=4"}),jsxs("div",{className:"flex",children:[jsx(b,{collapsed:a,children:jsx(Xe,{})}),jsxs("div",{className:"flex w-3/4 flex-grow flex-col",children:[jsx("main",{className:`"relative dark:bg-gray-900" flex h-full flex-grow flex-col gap-4 overflow-y-auto bg-gray-50 ${e?"":"p-4"}`,children:r}),jsx(a$a,{companyName:"EKM"})]})]})]})}var $=e(a(),1);var S=Object.freeze({NONE:"none",OVER:"drag-over",UPLOADING:"uploading",ERROR:"error",SUCCESS:"success"}),Pr=Object.freeze({[S.NONE]:"border-gray-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",[S.OVER]:"border-blue-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600",[S.UPLOADING]:"border-blue-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600",[S.ERROR]:"border-red-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-red-600 dark:hover:border-red-500 dark:hover:bg-red-600",[S.SUCCESS]:"border-green-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-green-600 dark:hover:border-green-500 dark:hover:bg-green-600"}),Lr=["png","webp","jpg","gif","jpeg"];function Qe(r,e){let a=!e||e.length===0?Lr:e;if(!r||r.length===0)return !1;let s=r.split(".").pop().toLowerCase();return a.includes(s)}function le({subtitle:r="PNG, WEBP, JPG, JPEG or GIF",filetypes:e,uploaded:a,exitCallback:s,callback:v,errorCallback:D,pickerCallback:x}){let[l,b]=useState(S.NONE);useEffect(()=>{Object.values(S).includes(a)&&(b(a),setTimeout(()=>{a===S.ERROR&&D?D():b(S.NONE);},2e3));},[a]);let O=o=>{o.preventDefault(),b(S.OVER);},T=o=>{o.preventDefault(),s&&s(),b(S.NONE);},c=o=>{o.preventDefault(),Qe(o.dataTransfer.files[0].name,e)?(b(S.UPLOADING),v(o.dataTransfer.files[0])):(b(S.ERROR),setTimeout(()=>{D();},2e3));},B=o=>{Qe(o.target.files[0].name,e)?b(S.UPLOADING):b(S.ERROR),v(o.target.files[0]);},p=()=>{x&&x();},R=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsx(BsCloudUpload,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),jsxs("p",{className:"mb-2 mt-5 text-sm text-gray-500 dark:text-gray-400",children:[jsx("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:r}),x&&jsx("div",{className:"mt-3 mb-3",children:jsxs(a$2,{color:"default",onClick:p,children:[jsx(BiSearch,{className:"mr-2"}),"Browse File Manager"]})})]}),y=()=>jsx("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:jsx("p",{className:"mb-2 mt-5 text-sm text-blue-500 dark:text-blue-400",children:jsx("span",{className:"font-semibold",children:"Drop here to upload"})})}),k=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsxs("svg",{"aria-hidden":"true",className:"mr-2 inline h-10 w-10 animate-spin text-gray-200 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),jsx("p",{className:"mb-2 mt-5 text-sm text-blue-500 dark:text-blue-400",children:jsx("span",{className:"font-semibold",children:"Uploading..."})})]}),C=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsx(FaTimesCircle,{className:"h-12 w-12 text-red-400 dark:text-red-500"}),jsx("p",{className:"mb-2 mt-5 text-sm text-red-500 dark:text-red-400",children:jsx("span",{className:"font-semibold",children:"Unable to upload"})})]}),H=()=>jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[jsx(BsFillCheckCircleFill,{className:"h-12 w-12 text-green-400 dark:text-green-500"}),jsx("p",{className:"mb-2 mt-5 text-sm text-green-500 dark:text-green-400",children:jsx("span",{className:"font-semibold",children:"Uploaded"})})]}),P=()=>{switch(l){case S.OVER:return y();case S.UPLOADING:return k();case S.ERROR:return C();case S.SUCCESS:return H();default:return R()}};return jsx("div",{onDragEnter:o=>o.preventDefault(),onDragOver:O,onDrop:c,onDragLeave:T,className:"flex h-full w-full items-center justify-center",children:jsxs("label",{htmlFor:"dropzone-file",className:`flex h-full w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed ${Pr[l]}`,children:[P(),l===S.NONE&&jsx("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:B})]})})}le.propTypes={filetypes:$.default.arrayOf($.default.string),subtitle:$.default.string,uploaded:$.default.oneOf(["none","success","error"]).isRequired,exitCallback:$.default.func,errorCallback:$.default.func.isRequired,callback:$.default.func.isRequired,pickerCallback:$.default.func};le.displayName="DragAndDrop";var X=e(a(),1);var rr="/admin/api/common/directoryinformation/",t=Object.freeze({EMPTY:"EMPTY",SEARCH_LOADING:"SEARCH-LOADING",LOADING:"LOADING",LOADED:"LOADED",LOADED_NO_DRAG:"LOADED_NO_DRAG",SEARCH_RESULTS:"SEARCH-RESULTS",SEARCH_EMPTY:"SEARCH-EMPTY",UPLOAD_ERROR:"ERROR",DRAGGING:"DRAGGING"}),Ir=Object.freeze({mode:t.LOADING,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-5/6",listBorder:"",searchDisabled:!1});function Br(r,e){switch(e.type){case t.EMPTY:return {mode:t.EMPTY,actionBtnTxt:"Add Image",actionBtnColor:"default",listSize:"h-5/6",listBorder:"",searchDisabled:!0};case t.LOADING:return Ir;case t.LOADED:return {mode:t.LOADED,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-[68.666667%]",listBorder:"border",searchDisabled:!1};case t.LOADED_NO_DRAG:return {mode:t.LOADED_NO_DRAG,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-[85%]",listBorder:"border",searchDisabled:!1};case t.SEARCH_RESULTS:return {mode:t.SEARCH_RESULTS,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-5/6",listBorder:"border",searchDisabled:!1};case t.SEARCH_EMPTY:return {mode:t.SEARCH_EMPTY,actionBtnTxt:"I Accept",actionBtnColor:"success",listSize:"h-5/6",listBorder:"",searchDisabled:!1};default:throw new Error("Unknown file picker state: "+e.page)}}function Me({appUrl:r,uri:e,show:a,hideDrag:s=!1,onClose:v,callback:D}){let x=useRef(),[l,b]=useReducer(Br,{mode:t.LOADING,footerBorder:"border-t"}),[O,T]=useState(0),c=useRef(1),[B,p]=useState(!1),[R,y]=useState(!1),k=useRef({pages:0,totalEntries:0}),[C,H]=useState(!1),[P,o]=useState(""),[n,A]=useState(null),[M,re]=useState([]),[fe,F]=useState("none");useEffect(()=>{a&&(b({type:t.LOADING}),A(null),k.current={pages:0,totalEntries:0},ve(),te(""));},[a]),useEffect(()=>{n&&A(null),R&&y(!1);},[l.mode]);let ve=()=>{re([]),F("none"),H(!1),A(null),y(!1),o(""),c.current=1;},te=u=>f$1(this,null,function*(){let G=c.current;try{let J=(u==null?void 0:u.length)>0?`&FileNameIncludesString=${u}`:"&FileNameIncludesString=",q=yield (yield fetch(`${r}${rr}?CurrentPage=${G}&PageSize=10&Uri=${e}${J}`,{method:"GET",credentials:"same-origin",headers:{"Content-Type":"application/json"}})).json();if(q.Items.Data.length>0&&G>1?re(Re=>[...Re,...q.Items.Data]):re(q.Items.Data),k.current={pages:q.Items.NumberOfPages,totalEntries:q.Items.Total},T(q.Items.NumberOfPages),(u==null?void 0:u.length)>0)b({type:q.Items.Data.length>0?t.SEARCH_RESULTS:t.SEARCH_EMPTY});else {let Re=s?t.LOADED_NO_DRAG:t.LOADED;b({type:q.Items.Data.length>0?Re:t.EMPTY});}F("none"),H(!1),p(!1);}catch(J){b({type:(u==null?void 0:u.length)===0?t.SEARCH_EMPTY:t.EMPTY});}}),d=u=>{s||(p(!0),x.current.removeFocus(),u.preventDefault());},L=u=>{s||p(!1);},ae=u=>{var ce;let G=(ce=u.text)!=null?ce:"",J=P!=null?P:"";o(G),(J.length>0&&G.length===0||J.length===0&&G.length>0&&l.mode!==t.LOADING)&&b({type:t.LOADING}),c.current=1,R&&y(!1),te(G);},U=()=>{y(!0),p(!1),F("none");},ge=()=>{D(`https://files.ekmcdn.com/${n.Uri}`),De();},De=()=>{v();},qe=u=>f$1(this,null,function*(){if(u==null){F("error"),U();return}try{let G=zr(u.name),J=yield Ur(u),ce={Path:`/${e}/`,Name:G,Bytes:Yr(J),ForceOverwriteFile:!0};(yield fetch(`${r}${rr}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(ce)})).status===200?(F("success"),o(""),x.current.clear(),c.current=1,re([]),y(!1),te("")):F("error");}catch(G){F("error");}}),nr=u=>{switch(u.type){case"FETCH_DATA":H(u.payload),c.current<k.current.pages&&!C&&(H(!0),c.current=c.current+1,te(P));break;case"SELECTION":A(u.payload),y(!1);break;}},cr=()=>{switch(l.mode){case t.EMPTY:return jsx(_r,{});case t.LOADING:return jsx(Hr,{});case t.SEARCH_RESULTS:case t.LOADED:case t.LOADED_NO_DRAG:return jsx(a$i,{border:l.listSize,files:M,isMore:c.current<k.current.pages,selected:n==null?void 0:n.Name,page:c.current,pages:O,callback:nr});case t.SEARCH_EMPTY:return jsx(Mr,{});}},dr=()=>jsxs(Fragment,{children:[jsx(a$e,{id:"file-search",ref:x,placeholder:"Search your images",disabled:l.searchDisabled,callback:ae,additionalClasses:"pt-4"}),jsxs("div",{className:"mb-4 mt-4",children:[R&&jsxs(a$g,{type:"danger",onDismiss:()=>{y(!1);},children:[jsx("p",{className:"font-semibold",children:"File could not be uploaded"}),jsx("p",{children:"There was an error uploading the file. Please try again."})]}),l.mode!==t.SEARCH_RESULTS&&l.mode!==t.SEARCH_EMPTY&&!s&&jsx("div",{className:"h-68",children:jsx(le,{uploaded:fe,callback:qe,errorCallback:U})}),(l.mode===t.SEARCH_RESULTS||l.mode===t.SEARCH_EMPTY)&&(P==null?void 0:P.length)>0&&jsx("span",{className:"ms-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ms-2",children:`Showing results for..."${P}"`})]}),cr()]});return jsxs(a$b,{show:a,onClose:De,title:"File Picker",onHide:()=>{},children:[jsxs("div",{className:"h-full",onDragEnter:d,children:[a&&B&&!s&&(()=>jsx("div",{className:"absolute z-50 h-[90.666667%] w-[93.666667%]",children:jsx(le,{uploaded:fe,exitCallback:L,callback:qe,errorCallback:U})}))(),a&&dr()]}),jsxs("div",{className:"bottom-0 grid grid-flow-col grid-cols-2 gap-4 bg-white pt-2 dark:border-gray-600",style:{marginTop:"-50px"},children:[jsx(a$2,{color:"light",onClick:De,children:"Close"}),jsx(a$2,{color:l.actionBtnColor,onClick:ge,disabled:n==null,children:l.actionBtnTxt})]})]})}Me.propTypes={appUrl:X.default.string.isRequired,uri:X.default.string.isRequired,show:X.default.bool.isRequired,hideDrag:X.default.bool,onClose:X.default.func.isRequired,callback:X.default.func.isRequired};Me.displayName="FilePicker";function _r(){return jsxs("div",{className:"mt-5 flex flex-col items-center justify-center",children:[jsx("h1",{children:jsx(BsFillImageFill,{className:"text-9xl text-gray-700"})}),jsx("p",{className:"mt-4 text-2xl font-semibold text-gray-900",children:"You Have No Images"}),jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Images will appear here when you upload them"})]})}function Hr(){return jsx("div",{className:"flex h-2/3 items-center justify-center overflow-y-auto",children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsx("h1",{children:jsx(Fr,{})}),jsx("p",{className:"mt-4 text-2xl font-semibold text-gray-900",children:"Loading Files"}),jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Don't worry, this won't take long..."})]})})}function Mr(){return jsx("div",{className:"flex h-5/6 items-center justify-center overflow-y-auto",children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsx("h1",{children:jsx(HiOutlineSearch,{className:"text-9xl text-gray-700"})}),jsx("p",{className:"mt-4 text-2xl font-semibold text-gray-900",children:"No Files Found"}),jsx("p",{className:"mt-4 text-sm text-gray-500",children:"No files were found matching your search"})]})})}function Fr(){return jsxs("div",{role:"status",children:[jsxs("svg",{"aria-hidden":"true",className:"inline h-14 w-14 animate-spin fill-blue-600 text-gray-200 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),jsx("span",{className:"sr-only",children:"Loading..."})]})}function Ur(r){return f$1(this,null,function*(){return new Uint8Array(yield Gr(r))})}function Gr(r){return new Promise((e,a)=>{let s=new FileReader;s.onloadend=v=>e(v.target.result),s.onerror=v=>a(v),s.readAsArrayBuffer(r);})}function Yr(r){return btoa(Array.from(r).map(e=>String.fromCharCode(e)).join(""))}function zr(r){return r.replace(/[^a-z0-9_\.-]/gi,"_").toLowerCase()}var ie=e(a(),1);function K({title:r,message:e,icon:a,children:s}){return jsx(a$c,{icon:a||jsx(a$d,{}),title:r,text:e,children:s})}K.propTypes={title:ie.PropTypes.string.isRequired,message:ie.PropTypes.string,useSpinner:ie.PropTypes.bool,icon:ie.PropTypes.node,children:ie.PropTypes.node};K.displayName="TableResultBlock";var Q=e(a(),1);var m=Object.freeze({EMPTY:"EMPTY",SEARCH_LOADING:"SEARCH-LOADING",LOADING:"LOADING",LOADED:"LOADED",SEARCH_RESULTS:"SEARCH-RESULTS",SEARCH_EMPTY:"SEARCH-EMPTY"}),ye=[{display:"Name",value:"Name"},{display:"Category",value:"Category"},{display:"Product Code",value:"ProductCode"}],ar=Object.freeze({mode:m.LOADING,searchDisabled:!1});function Xr(r,e){switch(e.type){case m.EMPTY:return {mode:m.EMPTY,searchDisabled:!0};case m.LOADING:return ar;case m.LOADED:return {mode:m.LOADED,searchDisabled:!1};case m.SEARCH_RESULTS:return {mode:m.SEARCH_RESULTS,searchDisabled:!1};case m.SEARCH_EMPTY:return {mode:m.SEARCH_EMPTY,searchDisabled:!1};default:throw new Error("Unknown file picker state: "+e.page)}}var Ge=forwardRef(function({preSelected:e=[],onClose:a,productCodeEnabled:s,requestCallback:v,callback:D,selectionLimit:x},l){let b=useRef(),[O,T]=useReducer(Xr,ar),[c,B]=useState(0),p=useRef(1),R=useRef({pages:0,totalEntries:0}),[y,k]=useState(!1),[C,H]=useState({text:"",category:ye[0]}),[P,o]=useState([]),[n,A]=useState(new Set([]));useEffect(()=>{M("",ye[0].value),A(new Set(e));},[]);let M=(d,L)=>{v({SearchText:d||"",PageSize:11,Page:p.current,SearchType:L});};useImperativeHandle(l,()=>({responseHandler:d=>{var L,ae;try{d.Result.Data.length>0&&p.current>1?o(U=>[...U,...d.Result.Data]):o(d.Result.Data),R.current={pages:d.Result.NumberOfPages,totalEntries:d.Result.Total},B(d.Result.NumberOfPages),((L=C.text)==null?void 0:L.length)>0?T({type:d.Result.Data.length>0?m.SEARCH_RESULTS:m.SEARCH_EMPTY}):T({type:d.Result.Data.length>0?m.LOADED:m.EMPTY}),k(!1);}catch(U){console.error("Error fetching products",U),T({type:((ae=C.text)==null?void 0:ae.length)===0?m.SEARCH_EMPTY:m.EMPTY});}}}));let re=d=>{var U,ge;let L=(U=d.text)!=null?U:"",ae=(ge=C.text)!=null?ge:"";(L!=ae||d.category.value!=C.category.value)&&(p.current=1,T({type:m.LOADING}),M(L,d.category.value)),H({text:L,category:d.category});},fe=()=>{D(Array.from(n));},F=d=>{switch(d.type){case"FETCH_DATA":k(d.payload),p.current<R.current.pages&&!y&&(k(!0),p.current=p.current+1,M(C.text,C.category.value));break;case"SELECTION":if(n.has(d.payload))n.delete(d.payload),A(L=>new Set(L));else {if(x&&(n==null?void 0:n.size)===Number(x))return;n.add(d.payload),A(L=>new Set(L));}break;case"DESELECT_ALL":A(new Set([]));break;}},ve=()=>{switch(O.mode){case m.EMPTY:return jsx(Ue,{title:"You Have No Products",msg:"Your products will appear here"});case m.LOADING:return jsx(Ue,{title:"Loading Products",msg:"Don't worry, this won't take long...",showSpinner:!0});case m.SEARCH_RESULTS:case m.LOADED:return jsx(a$h,{products:P,isMore:p.current<R.current.pages,selected:n,page:p.current,pages:c,callback:F});case m.SEARCH_EMPTY:return jsx(Ue,{title:"No Products Found",msg:"No products were found matching your search",blockHeight:"h-[460px]"});}},te=()=>jsxs("div",{className:"pt-4",children:[n.size>0&&jsx("div",{className:"mb-4 rounded-md border border-orange-200 bg-yellow-50 p-4",children:jsxs("p",{className:"text-center text-sm text-yellow-800",children:[`${x&&n.size===Number(x)?"Maximum ":""}${jr("product",n.size,!0)} selected.`,jsx("span",{id:"btnClear",onClick:()=>F({type:"DESELECT_ALL",payload:null}),className:"cursor-pointer text-primary-600 hover:underline",children:" Clear Selection."})]})}),jsx(a$e,{id:"file-search",ref:b,categories:s?ye:ye.filter(d=>d.value!=="ProductCode"),placeholder:"Search your products",disabled:O.searchDisabled,callback:re}),jsx("div",{className:"mb-4 mt-4",children:(O.mode===m.SEARCH_RESULTS||O.mode===m.SEARCH_EMPTY)&&C.text.length>0&&jsx("span",{className:"ms-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ms-2",children:`Showing results for..."${C.text}"`})}),ve()]});return jsxs(a$1,{show:!0,onClose:a,title:"Choose Products",size:"lg",id:"productSelectModal",children:[jsx(a$1.Body,{children:jsx("div",{className:"h-full",children:te()})}),jsx(a$1.Footer,{children:jsxs("div",{className:"flex-grow grid grid-col-2 grid-flow-col gap-4",children:[jsx(a$2,{id:"btnClose",color:"light",onClick:a,children:"Close"}),jsx(a$2,{id:"btnAdd",color:"success",onClick:fe,disabled:n.size===0,children:"Add Products"})]})})]})}),Ue=({title:r,msg:e,blockHeight:a="h-[500px]",showSpinner:s=!1})=>jsx("div",{className:`${a} flex items-center justify-center`,children:jsx(K,{icon:!s&&jsx(HiClipboardList,{className:"mb-4 h-16 w-16 text-gray-500 dark:text-gray-400"}),title:r,message:e,spinner:s})});Ge.propTypes={preSelected:Q.default.array,onClose:Q.default.func.isRequired,productCodeEnabled:Q.default.bool,requestCallback:Q.default.func.isRequired,callback:Q.default.func.isRequired,selectionLimit:Q.default.number};Ge.displayName="ProductPicker";var ne=e(a(),1);var f=Object.freeze({EMPTY:"EMPTY",LOADING:"LOADING",LOADED:"LOADED",SEARCH_RESULTS:"SEARCH-RESULTS",SEARCH_EMPTY:"SEARCH-EMPTY"}),sr=Object.freeze({mode:f.LOADING,searchDisabled:!1});function tt(r,e){switch(e.type){case f.EMPTY:return {mode:f.EMPTY,searchDisabled:!0};case f.LOADING:return sr;case f.LOADED:return {mode:f.LOADED,searchDisabled:!1};case f.SEARCH_RESULTS:return {mode:f.SEARCH_RESULTS,searchDisabled:!1};case f.SEARCH_EMPTY:return {mode:f.SEARCH_EMPTY,searchDisabled:!1};default:throw new Error("Unknown file picker state: "+e.page)}}function lr({initialLoadComplete:r,allCountryData:e,preSelected:a=[],onClose:s,callback:v}){let[D,x]=useReducer(tt,sr),[l,b]=useState(""),[O,T]=useState([]),[c,B]=useState([]),p=useRef([]);useEffect(()=>{((e==null?void 0:e.length)>0||r)&&(p.current=e,y(""));},[e]),useEffect(()=>{B(a);},[a]);let R=o=>{var M;let n=(M=o.text)!=null?M:"",A=l!=null?l:"";n!=A&&(x({type:f.LOADING}),y(n)),b(n);},y=o=>{let n=o?p.current.filter(A=>A.Country.toLowerCase().includes(o.toLowerCase())):p.current;(n==null?void 0:n.length)>0?(T(n),x({type:(o==null?void 0:o.length)>0?f.SEARCH_RESULTS:f.LOADED})):(T([]),x({type:(o==null?void 0:o.length)>0?f.SEARCH_EMPTY:f.EMPTY}));},k=()=>{v(c);},C=(o,n)=>{let A=n?c.filter(M=>M.CountryCode!=o.CountryCode):[...c,o];B(A);},H=()=>{switch(D.mode){case f.EMPTY:return jsx(ze,{title:"No Countries",msg:"Available countries will appear here"});case f.LOADING:return jsx(ze,{title:"Loading Countries",msg:"Don't worry, this won't take long...",showSpinner:!0});case f.SEARCH_RESULTS:case f.LOADED:return jsx(a$j,{countryData:O,selectedCountries:c,countrySelectCallback:C});case f.SEARCH_EMPTY:return jsx(ze,{title:"No Countries Found",msg:"No countries were found matching your search",blockHeight:"h-[460px]"});}},P=()=>jsxs("div",{className:"pt-4",children:[(c==null?void 0:c.length)>0&&jsx("div",{className:"mb-4 rounded-md border border-orange-200 bg-yellow-50 p-4",children:jsxs("p",{className:"text-center text-sm text-yellow-800",children:[`${jr("country",c==null?void 0:c.length,!0)} selected.`,jsx("span",{onClick:()=>B([]),className:"cursor-pointer text-primary-600 hover:underline",children:" Clear Selection."})]})}),jsx(a$e,{id:"locationSearch",placeholder:"Search for countries",disabled:D.searchDisabled,callback:R}),jsx("div",{className:"mb-4 mt-4",children:(D.mode===f.SEARCH_RESULTS||D.mode===f.SEARCH_EMPTY)&&l.length>0&&jsx("span",{className:"ms-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ms-2",children:`Showing results for..."${l}"`})}),H()]});return jsxs(a$1,{show:!0,onClose:s,title:"Choose Locations",size:"md",children:[jsx(a$1.Body,{children:jsx("div",{className:"h-full",children:P()})}),jsx(a$1.Footer,{children:jsxs("div",{className:"flex-grow grid grid-col-2 grid-flow-col gap-4",children:[jsx(a$2,{color:"light",onClick:s,children:"Close"}),jsx(a$2,{color:"success",onClick:k,disabled:(c==null?void 0:c.length)===0,children:"Add Locations"})]})})]})}var ze=({title:r,msg:e,blockHeight:a="h-[500px]",showSpinner:s=!1})=>jsx("div",{className:`${a} flex items-center justify-center`,children:jsx(K,{icon:!s&&jsx(HiClipboardList,{className:"mb-4 h-16 w-16 text-gray-500 dark:text-gray-400"}),title:r,message:e,spinner:s})});lr.propTypes={initialLoadComplete:ne.default.bool.isRequired,allCountryData:ne.default.array.isRequired,preSelected:ne.default.array.isRequired,onClose:ne.default.func.isRequired,callback:ne.default.func.isRequired};function ir({id:r,title:e,text:a,avatarShow:s,avatarColor:v,avatarBorder:D,children:x,badgeText:l,badgeColor:b,icon:O}){function T(B){var p=B.split(" "),R=p[0],y=p[p.length-1],k=R.charAt(0);if(R!==y)var C=y.charAt(0);else var C="";return k+C}let c=T(e);return jsxs("li",{className:"hover:bg-gray-90 relative flex justify-between gap-x-6 px-4 py-5 dark:hover:bg-gray-900",children:[jsxs("div",{className:"flex min-w-0 flex-auto items-center gap-x-4",children:[s&&jsx(a$f,{placeholderInitials:c,color:v,border:D}),O&&O,jsxs("div",{className:"min-w-0 flex-auto",children:[jsxs("div",{className:"flex gap-2",children:[jsx("p",{className:"truncate text-sm font-semibold text-gray-900 dark:text-white",children:e}),l&&jsx(Badge,{color:b||"info",children:l})]}),jsx("p",{className:"mt-1 flex text-xs text-gray-500 dark:text-gray-400",children:jsx("span",{className:"relative truncate",children:a})})]})]}),jsx("div",{className:"flex flex-shrink-0 items-center gap-x-4",children:jsx("div",{className:"sm:flex sm:flex-col sm:items-end",children:x})})]},r)}ir.displayName="StackedListItem";
|
|
33
33
|
|
|
34
34
|
export { ir as a, Cr as b, le as c, Me as d, K as e, Ge as f, lr as g, We as h };
|
|
35
35
|
//# sourceMappingURL=out.js.map
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-EY2UUYEC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-
|
|
1
|
+
import { a as a$1 } from './chunk-R3QJRZTP.js';
|
|
2
2
|
import { a } from './chunk-6LHL364H.js';
|
|
3
3
|
import { e } from './chunk-Z4LPO673.js';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
@@ -8,4 +8,4 @@ var l=e(a(),1);function f({border:r,files:s,isMore:o,selected:c,page:v,pages:g,c
|
|
|
8
8
|
|
|
9
9
|
export { f as a };
|
|
10
10
|
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-FPXEE5TC.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { a, c, b } from './chunk-4FSPYK2A.js';
|
|
2
|
+
import { a as a$2 } from './chunk-VOFMZ77E.js';
|
|
3
|
+
import { a as a$1 } from './chunk-6LHL364H.js';
|
|
4
|
+
import { e } from './chunk-Z4LPO673.js';
|
|
5
|
+
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
6
|
+
import { HiOutlineCalendar } from 'react-icons/hi';
|
|
7
|
+
import { useForm, Controller } from 'react-hook-form';
|
|
8
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var F=e(a(),1),g=e(a$1(),1);var Q=o=>{let t=new Date(Date.parse(o));return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()))},T=(o,t=!1)=>{let a=t?new Date(Date.parse(o)):Q(o),l=W(a.getHours(),a.getMinutes());return `${X(a.getFullYear(),a.getMonth(),a.getDate())} ${l}`};var W=(o,t)=>{let a=o>12?o-12:o,l=o>11?"PM":"AM";return `${a}:${t.toString().padStart(2,"0")} ${l} `},X=(o,t,a)=>`${a.toString().padStart(2,"0")}-${Z[t]}-${o}`;var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var re=()=>{let o=[];for(let t=0;t<24;t++)for(let a=0;a<60;a+=15){let l=(t%12||12).toString().padStart(2,"0"),u=a.toString().padStart(2,"0"),c=t<12?"AM":"PM",p=`${l}:${u} ${c}`;o.push(p);}return o};function H({id:o,dateValue:t,showError:a=!1,callback:l}){let[u,c$1]=useState(!1),p=re(),h=()=>{c$1(!0);},f=useRef(null);useEffect(()=>{let e=i=>{f.current&&!f.current.contains(i.target)&&c$1(!1);};return document.addEventListener("click",e,!0),()=>{document.removeEventListener("click",e,!0);}},[]),useEffect(()=>{if(t&&t instanceof Date){y("date",t.toISOString().split("T")[0]);let e=t.getHours(),i=t.getMinutes(),r=e===0?12:e>12?e-12:e,s=e<12?"AM":"PM",D=`${r.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")} ${s}`;y("time",D);}},[t]);let w=useMemo(()=>{var e=new Date;return e.setDate(e.getDate()-1),e},[new Date().getDay()]),{control:v,reset:ne,handleSubmit:E,watch:ae,setValue:y,formState:{errors:m}}=useForm({defaultValues:{date:w.toISOString().split("T")[0],time:"12:00 AM"}}),[se,P]=useState(!1),[x,M]=useState(!1),R=useRef((0, F.default)(e=>{I(e);},500)).current,J=e=>{e.preventDefault(),c$1(!1),M(!1);},L=e=>{R(e);};function G(e,i){i=i.trim();let r=i.match(/(\d+):(\d+)\s?(AM|PM)/i),s=parseInt(r[1],10),D=parseInt(r[2],10),C=r[3].toUpperCase();C==="PM"&&s!==12?s+=12:C==="AM"&&s===12&&(s=0);let[Y,j,z]=e.split("-");return new Date(Y,j-1,z,s,D,0,0)}let I=e=>{if(e.emptyChk){P(!0);return}let i=G(e.date,e.time);l(i),c$1(!1);},$=()=>{x&&M(!1);},U=()=>{var e,i;return jsxs("div",{children:[jsx(Fragment,{children:jsxs("div",{className:"grid grid-cols-2 pb-4",children:[jsx(Controller,{name:"date",control:v,rules:{required:"A date is required.",validate:{whitespace:r=>((r==null?void 0:r.toString().trim())||"").length>0||"A date is required."}},render:({field:r})=>jsxs("div",{className:"w-full pr-1",children:[jsx("label",{htmlFor:"date",children:"Date"}),jsx("input",{type:"date",id:"datePicker",value:r.value,name:"date",max:w,onChange:s=>{r.onChange(s),$();},className:`mt-1 block w-full rounded-md border-gray-300 text-xs ${m.date?c:b}`})]})}),jsx(Controller,{name:"time",control:v,rules:{required:"A time is required.",validate:{whitespace:r=>((r==null?void 0:r.toString().trim())||"").length>0||"A time is required."}},render:({field:r})=>jsxs("div",{className:"w-full pr-1",children:[jsx("label",{htmlFor:"time",children:"Time"}),jsx("select",{id:"time-select",onChange:s=>{r.onChange(s),$();},className:"mt-1 block w-full rounded-md border-gray-300 text-xs",value:r.value,children:p.map(s=>jsx("option",{value:s,children:s},`time-option-${s}`))})]})})]})}),(m.date||m.time||x)&&jsx("div",{className:"pb-4 text-sm text-red-600 dark:text-red-500",children:((e=m.date)==null?void 0:e.message)||((i=m.time)==null?void 0:i.message)||"A valid date time is required."}),jsxs("div",{className:"flex justify-end gap-4",children:[jsx(a$2,{color:"gray",size:"sm",outline:!0,onClick:J,children:"Cancel"}),jsx(a$2,{color:"default",size:"sm",type:"submit",children:"Apply"})]})]})};return jsxs("div",{id:`${o}-panel`,className:"relative",children:[jsxs("div",{className:"relative",children:[jsx("input",{id:`${o}-input`,placeholder:"11-Aug-2024 12:00 AM",value:T(t,!0),className:`block p-2.5 w-full text-sm border rounded-lg cursor-pointer ${a?"bg-red-50 border border-red-500 text-red-900 placeholder-red-700 text-sm focus:ring-red-500 dark:bg-gray-700 focus:border-red-500 dark:text-red-500 dark:placeholder-red-500 dark:border-red-500":"text-gray-900 bg-gray-50 border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"}`,onClick:h,readOnly:!0}),jsx(HiOutlineCalendar,{className:"absolute right-2 top-3 cursor-pointer",onClick:h})]}),jsx("div",{id:`${o}-dropdown`,ref:f,className:`z-50 w-full mt-2 absolute ${u?"":"hidden"} left-0 bg-white divide-y divide-gray-100 rounded-lg shadow dark:bg-gray-700`,children:jsx("div",{className:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDefaultButton",children:jsx("form",{className:"space-y-6 p-3",onSubmit:E(L),children:u&&U()})})})]})}H.propTypes={id:g.default.string.isRequired,dateValue:g.default.instanceOf(Date).isRequired,showError:g.default.bool,callback:g.default.func.isRequired};H.displayName="DateTimeComponent";
|
|
11
|
+
|
|
12
|
+
export { H as a };
|
|
13
|
+
//# sourceMappingURL=out.js.map
|
|
14
|
+
//# sourceMappingURL=chunk-JFL77JIP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/date-time-component.tsx","../src/helpers/datetime.js"],"names":["useState","useRef","useMemo","useEffect","HiOutlineCalendar","import_debounce","import_prop_types","useForm","Controller","ConvertUTCToLocal","utcTime","utcDate","GetDiscountDateTimeString","timeIsLocal","localDate","timeString","getTimeString","getDateString","hours","minutes","newHours","suffix","year","month","date","shortMonths","Fragment","jsx","jsxs","generateTimeOptions","times","i","j","hour","minute","period","time","DateTimeComponent","id","dateValue","showError","callback","showDropdown","setShowDropdown","timeOptions","handleShowDropdown","ref","handleClickOutside","e","setValue","mins","newTime","MinDate","d","control","reset","handleSubmit","watch","errors","err","setErr","dateErr","setDateErr","debouncedExport","debounce","data","exportRequest","handleCancel","onSubmit","convertToDate","timeParts","day","newDate","onChanged","renderContent","_a","_b","v","field","FAILURE_CONTROL","STANDARD_CONTROL","Button","PropTypes"],"mappings":"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","sourcesContent":["//@ts-nocheck\nimport { useState, useRef, useMemo, useEffect } from 'react'\nimport { HiOutlineCalendar } from 'react-icons/hi'\nimport { Button } from './button'\nimport { useForm, Controller } from 'react-hook-form'\nimport debounce from 'lodash/debounce'\nimport { variantProps } from 'classname-variants/react'\nimport { BiChevronDown } from 'react-icons/bi'\nimport PropTypes from 'prop-types'\nimport { GetDiscountDateTimeString } from './helpers/datetime'\nimport { STANDARD_CONTROL, FAILURE_CONTROL } from './helpers/colour'\n\n\nconst generateTimeOptions = () => {\n const times = [];\n for (let i = 0; i < 24; i++) {\n for (let j = 0; j < 60; j += 15) {\n const hour = (i % 12 || 12).toString().padStart(2, '0'); // Convert 0 to 12 for 12 AM/PM and pad with zero\n const minute = j.toString().padStart(2, '0');\n const period = i < 12 ? 'AM' : 'PM';\n const time = `${hour}:${minute} ${period}`;\n times.push(time);\n }\n }\n return times;\n};\n\nexport function DateTimeComponent({ id, dateValue, showError=false, callback }) {\n const [showDropdown, setShowDropdown] = useState(false)\n const timeOptions = generateTimeOptions();\n\n const handleShowDropdown = () => {\n setShowDropdown(true)\n }\n\n const ref = useRef(null)\n\n useEffect(() => {\n const handleClickOutside = (e) => {\n if (ref.current && !ref.current.contains(e.target)) {\n setShowDropdown(false)\n }\n }\n\n document.addEventListener('click', handleClickOutside, true)\n return () => {\n document.removeEventListener('click', handleClickOutside, true)\n }\n }, [])\n\n useEffect(() => {\n if (dateValue && (dateValue instanceof Date)) {\n setValue('date', dateValue.toISOString().split(\"T\")[0])\n const hours = dateValue.getHours()\n const mins = dateValue.getMinutes()\n const newHours = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours\n const suffix = hours < 12 ? 'AM' : 'PM'\n const newTime = `${newHours.toString().padStart(2, '0')}:${mins.toString().padStart(2, '0')} ${suffix}`\n setValue('time', newTime)\n }\n }, [dateValue])\n\n const MinDate = useMemo(() => {\n var d = new Date();\n d.setDate(d.getDate() - 1);\n return d;\n }, [new Date().getDay()]);\n\n const {\n control,\n reset,\n handleSubmit,\n watch,\n setValue,\n formState: { errors },\n } = useForm({\n defaultValues: {\n date: MinDate.toISOString().split(\"T\")[0],\n time: \"12:00 AM\"\n },\n });\n\n const [err, setErr] = useState(false);\n const [dateErr, setDateErr] = useState(false);\n\n\n\n const debouncedExport = useRef(\n debounce((data) => {\n exportRequest(data);\n }, 500)\n ).current;\n\n const handleCancel = (e) => {\n e.preventDefault();\n setShowDropdown(false);\n setDateErr(false);\n };\n\n const onSubmit = (data) => {\n debouncedExport(data);\n };\n\n function convertToDate(date, time) {\n time = time.trim(); \n const timeParts = time.match(/(\\d+):(\\d+)\\s?(AM|PM)/i);\n let hours = parseInt(timeParts[1], 10);\n const minutes = parseInt(timeParts[2], 10);\n const period = timeParts[3].toUpperCase();\n if (period === \"PM\" && hours !== 12) {\n hours += 12;\n } else if (period === \"AM\" && hours === 12) {\n hours = 0;\n }\n const [year, month, day] = date.split('-');\n const dateObj = new Date(year, month - 1, day, hours, minutes, 0, 0);\n return dateObj;\n }\n\n const exportRequest = (data) => {\n if (data.emptyChk) {\n setErr(true);\n return;\n }\n const newDate = convertToDate(data.date, data.time);\n callback(newDate);\n setShowDropdown(false)\n }\n\n const onChanged = () => {\n if (dateErr) setDateErr(false);\n };\n\n const renderContent = () => (\n <div>\n <>\n <div className=\"grid grid-cols-2 pb-4\">\n <Controller\n name=\"date\"\n control={control}\n rules={{\n required: \"A date is required.\",\n validate: {\n whitespace: (v) =>\n (v?.toString().trim() || \"\").length > 0 ||\n \"A date is required.\",\n },\n }}\n render={({ field }) => (\n <div className=\"w-full pr-1\">\n <label htmlFor=\"date\">Date</label>\n <input\n type=\"date\"\n id=\"datePicker\"\n value={field.value}\n name=\"date\"\n max={MinDate}\n onChange={(e) => {\n field.onChange(e);\n onChanged();\n }}\n className={`mt-1 block w-full rounded-md border-gray-300 text-xs ${errors.date ? FAILURE_CONTROL : STANDARD_CONTROL}`}\n />\n </div>\n )}\n />\n <Controller\n name=\"time\"\n control={control}\n rules={{\n required: \"A time is required.\",\n validate: {\n whitespace: (v) =>\n (v?.toString().trim() || \"\").length > 0 ||\n \"A time is required.\",\n },\n }}\n render={({ field }) => (\n <div className=\"w-full pr-1\">\n <label htmlFor=\"time\">Time</label>\n <select id=\"time-select\" onChange={(e) => {\n field.onChange(e);\n onChanged();\n }} \n className=\"mt-1 block w-full rounded-md border-gray-300 text-xs\"\n value={field.value}\n >\n {timeOptions.map((time) => (\n <option key={`time-option-${time}`} value={time}>{time}</option>\n ))}\n </select>\n </div>\n )}\n />\n </div>\n </>\n {(errors.date || errors.time || dateErr) &&\n <div className='pb-4 text-sm text-red-600 dark:text-red-500'>\n {errors.date?.message || errors.time?.message || 'A valid date time is required.'}\n </div>\n }\n <div className=\"flex justify-end gap-4\">\n <Button color=\"gray\" size=\"sm\" outline onClick={handleCancel}>\n Cancel\n </Button>\n <Button color=\"default\" size=\"sm\" type=\"submit\">\n Apply\n </Button>\n </div>\n </div>\n );\n\n return (\n <div id={`${id}-panel`} className=\"relative\">\n <div className='relative'>\n <input\n id={`${id}-input`}\n placeholder=\"11-Aug-2024 12:00 AM\"\n value={GetDiscountDateTimeString(dateValue, true)}\n className={`block p-2.5 w-full text-sm border rounded-lg cursor-pointer ${showError ? \n 'bg-red-50 border border-red-500 text-red-900 placeholder-red-700 text-sm focus:ring-red-500 dark:bg-gray-700 focus:border-red-500 dark:text-red-500 dark:placeholder-red-500 dark:border-red-500' : \n 'text-gray-900 bg-gray-50 border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500'}`\n }\n onClick={handleShowDropdown}\n readOnly\n />\n <HiOutlineCalendar className='absolute right-2 top-3 cursor-pointer' onClick={handleShowDropdown}/>\n </div>\n <div\n id={`${id}-dropdown`}\n ref={ref}\n className={`z-50 w-full mt-2 absolute ${\n showDropdown ? '' : 'hidden'\n } left-0 bg-white divide-y divide-gray-100 rounded-lg shadow dark:bg-gray-700`}\n >\n <div className=\"py-2 text-sm text-gray-700 dark:text-gray-200\" aria-labelledby=\"dropdownDefaultButton\">\n <form className=\"space-y-6 p-3\" onSubmit={handleSubmit(onSubmit)}>\n {showDropdown && renderContent()}\n </form>\n </div>\n </div>\n </div>\n );\n}\n\nDateTimeComponent.propTypes = {\n /** This is the unique Id for the DateTimePicker component */\n id: PropTypes.string.isRequired,\n /** Date object containing date to display in input control. Date should already be converted to local time */\n dateValue: PropTypes.instanceOf(Date).isRequired,\n /** This is an optional boolean option which changes the background colour of the input control to red */\n showError: PropTypes.bool,\n /** Callback function for the DateTimecomponent outputs the chosen date time in form of Date object*/\n callback: PropTypes.func.isRequired,\n};\n\nDateTimeComponent.displayName = \"DateTimeComponent\";\n","// Takes a date time string in UTC time and returns a Date object in local time\nexport const ConvertUTCToLocal = (utcTime) => {\n const utcDate = new Date(Date.parse(utcTime))\n return new Date(Date.UTC(utcDate.getFullYear(), utcDate.getMonth(), utcDate.getDate(), utcDate.getHours(), utcDate.getMinutes()))\n}\n// Returns date in format of e.g 30-Jun-2022 10:00 AM\nexport const GetDiscountDateTimeString = (utcTime, timeIsLocal = false) => {\n const localDate = timeIsLocal ? new Date(Date.parse(utcTime)) : ConvertUTCToLocal(utcTime)\n const timeString = getTimeString(localDate.getHours(), localDate.getMinutes())\n const dateString = getDateString(localDate.getFullYear(), localDate.getMonth(), localDate.getDate())\n return `${dateString} ${timeString}`\n}\n// Returns date in format of e.g 30-Jun-2022\nexport const GetDiscountDateString = (utcTime, timeIsLocal = false) => {\n const localDate = timeIsLocal ? new Date(Date.parse(utcTime)) : ConvertUTCToLocal(utcTime)\n return getDateString(localDate.getFullYear(), localDate.getMonth(), localDate.getDate())\n}\n\nexport const GetBrowserControlDateTimeString = (utcTime, timeIsLocal = false) => {\n const localDate = timeIsLocal ? new Date(Date.parse(utcTime)) : ConvertUTCToLocal(utcTime)\n return `${getBrowserDateString(localDate.getFullYear(),localDate.getMonth() + 1, localDate.getDate())}T${getBrowserTimeString(localDate.getHours(), localDate.getMinutes())}`\n}\n\nexport const GetBrowserControTimeString = (utcTime, timeIsLocal = false) => {\n const localDate = timeIsLocal ? new Date(Date.parse(utcTime)) : ConvertUTCToLocal(utcTime)\n return getBrowserTimeString(localDate.getHours(), localDate.getMinutes())\n}\n// Converts the time string, e.g. '06:00', into a full Date object \nexport const ConvertBrowserTimeStringToDate = (timeString) => {\n const parts = timeString.split(':')\n if (parts.length === 2) {\n const hours = Number(parts[0])\n const minutes = Number(parts[1])\n if (!isNaN(hours) && !isNaN(minutes)) {\n return new Date().setHours(hours, minutes, 0, 0)\n }\n }\n return new Date().setHours(0,0,0,0)\n}\n\nconst getBrowserDateString = (year, month, date) => {\n return `${year}-${month.toString().padStart(2, 0)}-${date.toString().padStart(2,0)}`\n}\n\nconst getBrowserTimeString = (hours, minutes) => {\n return `${hours.toString().padStart(2,0)}:${minutes.toString().padStart(2, 0)}`\n}\n\nconst getTimeString = (hours, minutes) =>\n{\n const newHours = hours > 12 ? hours - 12 : hours\n const suffix = hours > 11 ? 'PM' : 'AM'\n return `${newHours}:${minutes.toString().padStart(2, '0')} ${suffix} `\n}\n\nconst getDateString = (year, month, date) =>\n{\n return `${date.toString().padStart(2, '0')}-${shortMonths[month]}-${year}`\n}\n\n// left this in for future use\nconst months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n]\n\nconst shortMonths = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n]\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-6LHL364H.js';
|
|
2
|
+
import { e } from './chunk-Z4LPO673.js';
|
|
3
|
+
import { createContext, useRef, useState, useContext, useEffect, Children, cloneElement } from 'react';
|
|
4
|
+
import { HiChevronUp, HiChevronDown } from 'react-icons/hi';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var n=e(a$1(),1);var a=createContext({currentlyShowing:null,colour:"gray",handleSelection:t=>{},addPanelOrder:t=>{},getPanelList:()=>[]});function d({children:t,colour:e="gray"}){let r=useRef([]),[o,c]=useState(null),s=l=>{c(o===l?null:l);},h=l=>{r.current.push(l);},y=()=>r.current;return jsx(a.Provider,{value:{currentlyShowing:o,colour:e,handleSelection:s,addPanelOrder:h,getPanelList:y},children:t})}function p({children:t,id:e}){let r=useContext(a);return useEffect(()=>{r.addPanelOrder(e);},[]),jsx("div",{id:`${e}-panel`,"data-accordion":"collapse",children:Children.map(t,o=>cloneElement(o,{id:e}))})}function R({children:t,id:e}){let r=useContext(a),o=()=>{r.handleSelection(e);},c=r.getPanelList(),s=c[c.length-1]===e;return jsx("h2",{id:`${e}-title`,children:jsxs("div",{className:`flex w-full items-center justify-between border p-5 text-left font-medium cursor-pointer ${s&&r.currentlyShowing!==e?"border-b-1 rounded-b-xl":"border-b-0 rounded-none"} border-gray-200 ${c[0]===e?"rounded-t-xl":""} ${r.colour==="white"?"bg-white":"bg-gray-100"}
|
|
8
|
+
text-gray-500 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:focus:ring-gray-800 ${r.colour==="white"?"":"hover:bg-gray-100"}`,"data-accordion-target":`#${e}-title`,"aria-expanded":"true","aria-controls":`${e}-title`,onClick:o,children:[jsx("span",{children:t}),r.currentlyShowing===`${e}`?jsx(HiChevronUp,{className:"h-6 w-6"}):jsx(HiChevronDown,{className:"h-6 w-6"})]})})}function u({children:t,id:e}){let r=useContext(a),o=r.getPanelList();return jsx("div",{className:e!==r.currentlyShowing?"hidden":"","aria-labelledby":"accordion-collapse-heading-1",children:jsx("div",{className:`border p-5 ${o[o.length-1]===e&&r.currentlyShowing===e?"border-b-1 rounded-b-xl":"border-b-0"} border-gray-200 dark:border-gray-700 dark:bg-gray-900 ${r.colour==="white"?"bg-white":"bg-gray-100"}`,children:t})})}d.Panel=p;d.Title=R;d.Content=u;d.propTypes={children:n.default.oneOfType([n.default.arrayOf(n.default.element),n.default.shape({type:n.default.oneOf([p])})]),colour:n.default.oneOf(["gray","white"])};p.propTypes={id:n.default.string.isRequired,children:n.default.array.isRequired};u.propTypes={children:n.default.oneOfType([n.default.element])};
|
|
9
|
+
|
|
10
|
+
export { a, d as b, p as c, R as d, u as e };
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=chunk-QZFOPL3O.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/accordion.tsx"],"names":["import_prop_types","useState","createContext","useContext","useEffect","useRef","cloneElement","Children","HiChevronDown","HiChevronUp","jsx","jsxs","AccordionContext","_","Accordion","children","colour","panelListRef","currentlyShowing","setCurrentlyShowing","handleSelection","id","addPanelOrder","getPanelList","AccordionPanel","context","child","AccordionTitle","panelList","isLastPanel","AccordionContent","PropTypes"],"mappings":"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","sourcesContent":["import React, {\n useState,\n createContext,\n useContext,\n useEffect,\n useRef,\n cloneElement,\n Children,\n} from \"react\";\nimport { HiChevronDown, HiChevronUp } from \"react-icons/hi\";\nimport PropTypes from \"prop-types\";\n\ntype AccordionContext = {\n currentlyShowing: string | null;\n colour: string;\n handleSelection: (id: string) => void;\n addPanelOrder: (id: string) => void;\n getPanelList: () => string[];\n};\n\nexport const AccordionContext = createContext<AccordionContext>({\n currentlyShowing: null,\n colour: 'gray',\n handleSelection: (_: string) => {},\n addPanelOrder: (_: string) => {},\n getPanelList: () => [],\n});\n\ntype AccordionProps = {\n children: React.ReactElement<AccordionPanelProps>[];\n colour: string;\n};\n\nexport function Accordion({ children, colour = 'gray' }: AccordionProps) {\n const panelListRef = useRef<string[]>([]);\n const [currentlyShowing, setCurrentlyShowing] = useState<string | null>(null);\n\n const handleSelection = (id: string) => {\n if (currentlyShowing === id) {\n setCurrentlyShowing(null);\n } else {\n setCurrentlyShowing(id);\n }\n };\n\n const addPanelOrder = (id: string) => {\n panelListRef.current.push(id);\n };\n\n const getPanelList = () => {\n return panelListRef.current;\n };\n\n return (\n <AccordionContext.Provider\n value={{ currentlyShowing, colour, handleSelection, addPanelOrder, getPanelList }}\n >\n {children}\n </AccordionContext.Provider>\n );\n}\n\ntype AccordionPanelProps = {\n children: React.DetailedReactHTMLElement<any, HTMLElement>;\n id: string;\n};\n\nexport function AccordionPanel({ children, id }: AccordionPanelProps) {\n const context = useContext(AccordionContext);\n\n useEffect(() => {\n context.addPanelOrder(id);\n }, []);\n\n return (\n <div id={`${id}-panel`} data-accordion=\"collapse\">\n {Children.map(children, (child) => {\n return cloneElement(child, { id: id });\n })}\n </div>\n );\n}\n\ntype AccordionTitleProps = {\n children: React.ReactNode;\n id: string;\n};\n\nexport function AccordionTitle({ children, id }: AccordionTitleProps) {\n const context = useContext(AccordionContext);\n\n const handleSelection = () => {\n context.handleSelection(id);\n };\n\n const panelList = context.getPanelList();\n const isLastPanel = panelList[panelList.length - 1] === id;\n\n return (\n <h2 id={`${id}-title`}>\n <div\n className={`flex w-full items-center justify-between border p-5 text-left font-medium cursor-pointer ${\n isLastPanel && context.currentlyShowing !== id\n ? \"border-b-1 rounded-b-xl\"\n : \"border-b-0 rounded-none\"\n } border-gray-200 ${\n panelList[0] === id\n ? \"rounded-t-xl\"\n : \"\"\n } ${context.colour === 'white' ? 'bg-white' : 'bg-gray-100'}\n text-gray-500 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:focus:ring-gray-800 ${context.colour === 'white' ? '' : 'hover:bg-gray-100'}`}\n data-accordion-target={`#${id}-title`}\n aria-expanded=\"true\"\n aria-controls={`${id}-title`}\n onClick={handleSelection}\n >\n <span>{children}</span>\n {context.currentlyShowing === `${id}` ? (\n <HiChevronUp className=\"h-6 w-6\" />\n ) : (\n <HiChevronDown className=\"h-6 w-6\" />\n )}\n </div>\n </h2>\n );\n}\n\ntype AccordionContentProps = {\n children: React.ReactNode;\n id: string;\n};\n\nexport function AccordionContent({ children, id }: AccordionContentProps) {\n const context = useContext(AccordionContext);\n const panelList = context.getPanelList();\n return (\n <div\n className={id !== context.currentlyShowing ? \"hidden\" : \"\"}\n aria-labelledby=\"accordion-collapse-heading-1\"\n >\n <div\n className={`border p-5 ${\n panelList[panelList.length - 1] === id &&\n context.currentlyShowing === id\n ? \"border-b-1 rounded-b-xl\"\n : \"border-b-0\"\n } border-gray-200 dark:border-gray-700 dark:bg-gray-900 ${context.colour === 'white' ? 'bg-white' : 'bg-gray-100'}`}\n >\n {children}\n </div>\n </div>\n );\n}\n\nAccordion.Panel = AccordionPanel;\nAccordion.Title = AccordionTitle;\nAccordion.Content = AccordionContent;\n\nAccordion.propTypes = {\n /** Components to be rendered as Part of the Compound Component, each panel is a seperate accordion section*/\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.element),\n PropTypes.shape({ type: PropTypes.oneOf([AccordionPanel]) }),\n ]),\n colour: PropTypes.oneOf([\"gray\", \"white\"]),\n};\n\nAccordionPanel.propTypes = {\n /** Unique id for the dropdown */\n id: PropTypes.string.isRequired,\n /** Components to be rendered as Part of the Compound Component*/\n children: PropTypes.array.isRequired,\n};\n\nAccordionContent.propTypes = {\n /** Components held within the Content section of the AccordionPanel*/\n children: PropTypes.oneOfType([PropTypes.element]),\n};\n"]}
|
|
@@ -3,8 +3,8 @@ import { e, a as a$2 } from './chunk-Z4LPO673.js';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var a=e(a$1(),1);var i=forwardRef(function(e,l){return jsxs("div",{className:"flex items-center",children:[jsx("input",a$2({id:e.id,ref:l,type:"radio",className:`h-4 w-4 rounded-full border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600 ${e.disabled&&"opacity-50"}`,onChange:e.onChange},e)),e.label&&jsx("label",{id:`${e.id}-lbl`,htmlFor:e.id,className:"ms-2 mt-2 text-sm font-medium text-gray-900 dark:text-gray-300",children:e.label})]})});i.propTypes={id:a.default.string.isRequired,checked:a.default.bool,disabled:a.default.bool,onChange:a.default.func,label:a.default.
|
|
6
|
+
var a=e(a$1(),1);var i=forwardRef(function(e,l){return jsxs("div",{className:"flex items-center",children:[jsx("input",a$2({id:e.id,ref:l,type:"radio",className:`h-4 w-4 rounded-full border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600 ${e.disabled&&"opacity-50"}`,onChange:e.onChange},e)),e.label&&jsx("label",{id:`${e.id}-lbl`,htmlFor:e.id,className:"ms-2 mt-2 text-sm font-medium text-gray-900 dark:text-gray-300",children:e.label})]})});i.propTypes={id:a.default.string.isRequired,checked:a.default.bool,disabled:a.default.bool,onChange:a.default.func,label:a.default.node};i.displayName="Radio";
|
|
7
7
|
|
|
8
8
|
export { i as a };
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
//# sourceMappingURL=chunk-R3QJRZTP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/radio.tsx"],"names":["import_prop_types","forwardRef","jsx","jsxs","Radio","props","ref","__spreadValues","PropTypes"],"mappings":"uFACA,IAAAA,EAAsB,SACtB,OAAS,cAAAC,MAAkB,QAIvB,OACE,OAAAC,EADF,QAAAC,MAAA,oBAFG,IAAMC,EAAQH,EAAW,SAAeI,EAAOC,EAAK,CACzD,OACEH,EAAC,OAAI,UAAU,oBACb,UAAAD,EAAC,QAAAK,EAAA,CACC,GAAIF,EAAM,GACV,IAAKC,EACL,KAAK,QACL,UAAW,4LACTD,EAAM,UAAY,eAEpB,SAAUA,EAAM,UACZA,EACN,EACCA,EAAM,OACLH,EAAC,SACC,GAAI,GAAGG,EAAM,SACb,QAASA,EAAM,GACf,UAAU,iEAET,SAAAA,EAAM,MACT,GAEJ,CAEJ,CAAC,EAEDD,EAAM,UAAY,CAEhB,GAAI,EAAAI,QAAU,OAAO,WAErB,QAAS,EAAAA,QAAU,KAEnB,SAAU,EAAAA,QAAU,KAEpB,SAAU,EAAAA,QAAU,KAEpB,MAAO,EAAAA,QAAU,
|
|
1
|
+
{"version":3,"sources":["../src/radio.tsx"],"names":["import_prop_types","forwardRef","jsx","jsxs","Radio","props","ref","__spreadValues","PropTypes"],"mappings":"uFACA,IAAAA,EAAsB,SACtB,OAAS,cAAAC,MAAkB,QAIvB,OACE,OAAAC,EADF,QAAAC,MAAA,oBAFG,IAAMC,EAAQH,EAAW,SAAeI,EAAOC,EAAK,CACzD,OACEH,EAAC,OAAI,UAAU,oBACb,UAAAD,EAAC,QAAAK,EAAA,CACC,GAAIF,EAAM,GACV,IAAKC,EACL,KAAK,QACL,UAAW,4LACTD,EAAM,UAAY,eAEpB,SAAUA,EAAM,UACZA,EACN,EACCA,EAAM,OACLH,EAAC,SACC,GAAI,GAAGG,EAAM,SACb,QAASA,EAAM,GACf,UAAU,iEAET,SAAAA,EAAM,MACT,GAEJ,CAEJ,CAAC,EAEDD,EAAM,UAAY,CAEhB,GAAI,EAAAI,QAAU,OAAO,WAErB,QAAS,EAAAA,QAAU,KAEnB,SAAU,EAAAA,QAAU,KAEpB,SAAU,EAAAA,QAAU,KAEpB,MAAO,EAAAA,QAAU,IACnB,EAEAJ,EAAM,YAAc","sourcesContent":["//@ts-nocheck\nimport PropTypes from \"prop-types\";\nimport { forwardRef } from \"react\";\n\nexport const Radio = forwardRef(function Radio(props, ref) {\n return (\n <div className=\"flex items-center\">\n <input\n id={props.id}\n ref={ref}\n type=\"radio\"\n className={`h-4 w-4 rounded-full border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600 ${\n props.disabled && \"opacity-50\"\n }`}\n onChange={props.onChange}\n {...props}\n />\n {props.label && (\n <label\n id={`${props.id}-lbl`}\n htmlFor={props.id}\n className=\"ms-2 mt-2 text-sm font-medium text-gray-900 dark:text-gray-300\"\n >\n {props.label}\n </label>\n )}\n </div>\n );\n});\n\nRadio.propTypes = {\n /** Id for Radio */\n id: PropTypes.string.isRequired,\n /** Bool to determine if radio has been checked */\n checked: PropTypes.bool,\n /** Bool to disable radio */\n disabled: PropTypes.bool,\n /** function to handle checked value */\n onChange: PropTypes.func,\n /** label placed after radio button */\n label: PropTypes.node,\n};\n\nRadio.displayName = \"Radio\";\n"]}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { g as CountryPicker } from '../chunk-
|
|
1
|
+
export { g as CountryPicker } from '../chunk-EY2UUYEC.js';
|
|
2
|
+
import '../chunk-LQKVFBLU.js';
|
|
2
3
|
import '../chunk-HVNLAQA6.js';
|
|
3
4
|
import '../chunk-HW7AZG2V.js';
|
|
4
5
|
import '../chunk-HE5X7TRV.js';
|
|
5
6
|
import '../chunk-YZ2YZSNQ.js';
|
|
6
7
|
import '../chunk-THOZT55U.js';
|
|
8
|
+
import '../chunk-EZPRW5WN.js';
|
|
7
9
|
import '../chunk-XKE3VK6Z.js';
|
|
8
10
|
import '../chunk-7Q6OMA2A.js';
|
|
9
11
|
import '../chunk-GVNUAH45.js';
|
|
10
12
|
import '../chunk-Y2TFSCAU.js';
|
|
11
13
|
import '../chunk-KRMPO53Y.js';
|
|
12
14
|
import '../chunk-22RUXGYW.js';
|
|
13
|
-
import '../chunk-LQKVFBLU.js';
|
|
14
15
|
import '../chunk-XXP5K6Y4.js';
|
|
15
16
|
import '../chunk-LWTESXND.js';
|
|
16
17
|
import '../chunk-AN66H4D6.js';
|
|
@@ -18,36 +19,35 @@ import '../chunk-GWERJBUR.js';
|
|
|
18
19
|
import '../chunk-I2DMRDYJ.js';
|
|
19
20
|
import '../chunk-FTVJMY65.js';
|
|
20
21
|
import '../chunk-YXTGVTGL.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-F7MTEILK.js';
|
|
22
23
|
import '../chunk-7WJGATIR.js';
|
|
23
24
|
import '../chunk-RTRHNOTP.js';
|
|
24
25
|
import '../chunk-XABECXZS.js';
|
|
25
|
-
import '../chunk-
|
|
26
|
+
import '../chunk-FPXEE5TC.js';
|
|
26
27
|
import '../chunk-WVAVR5V6.js';
|
|
27
28
|
import '../chunk-2VS7BVWY.js';
|
|
28
29
|
import '../chunk-QCHLLBHM.js';
|
|
29
30
|
import '../chunk-LIXVY47P.js';
|
|
30
31
|
import '../chunk-Y5DEGGVQ.js';
|
|
31
|
-
import '../chunk-
|
|
32
|
+
import '../chunk-T2SOP5NE.js';
|
|
32
33
|
import '../chunk-AVTJXS4U.js';
|
|
33
34
|
import '../chunk-SFEJDNIA.js';
|
|
34
35
|
import '../chunk-E5KIDP3Z.js';
|
|
35
|
-
import '../chunk-
|
|
36
|
+
import '../chunk-R3QJRZTP.js';
|
|
36
37
|
import '../chunk-AO5TGD7T.js';
|
|
38
|
+
import '../chunk-Z44LYPKH.js';
|
|
37
39
|
import '../chunk-CNJDESTL.js';
|
|
38
40
|
import '../chunk-7V5M4LMA.js';
|
|
39
41
|
import '../chunk-GUK5N5Z2.js';
|
|
40
42
|
import '../chunk-Y2GINGVR.js';
|
|
41
43
|
import '../chunk-ESJIQMQJ.js';
|
|
42
44
|
import '../chunk-IY6WVOAI.js';
|
|
43
|
-
import '../chunk-T2SOP5NE.js';
|
|
44
45
|
import '../chunk-M4UBHZDH.js';
|
|
45
46
|
import '../chunk-TMO76FWT.js';
|
|
46
47
|
import '../chunk-NDDDT4TO.js';
|
|
47
48
|
import '../chunk-QYKN3JZ5.js';
|
|
48
49
|
import '../chunk-SLIZ4TDR.js';
|
|
49
50
|
import '../chunk-F3BF3KTV.js';
|
|
50
|
-
import '../chunk-Z44LYPKH.js';
|
|
51
51
|
import '../chunk-ANU7OAPA.js';
|
|
52
52
|
import '../chunk-ISA6E23B.js';
|
|
53
53
|
import '../chunk-3PTVTRDP.js';
|
|
@@ -56,9 +56,10 @@ import '../chunk-D5TS3JJH.js';
|
|
|
56
56
|
import '../chunk-DSJ5TRZW.js';
|
|
57
57
|
import '../chunk-E4USZ2Q3.js';
|
|
58
58
|
import '../chunk-F47A36U7.js';
|
|
59
|
+
import '../chunk-JFL77JIP.js';
|
|
59
60
|
import '../chunk-RRNNHYSF.js';
|
|
60
61
|
import '../chunk-4FSPYK2A.js';
|
|
61
|
-
import '../chunk-
|
|
62
|
+
import '../chunk-QZFOPL3O.js';
|
|
62
63
|
import '../chunk-5SEJVYKM.js';
|
|
63
64
|
import '../chunk-MBACKGWE.js';
|
|
64
65
|
import '../chunk-2OPJLYW6.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
|
|
3
|
+
declare function DateTimeComponent({ id, dateValue, showError, callback }: {
|
|
4
|
+
id: any;
|
|
5
|
+
dateValue: any;
|
|
6
|
+
showError?: boolean | undefined;
|
|
7
|
+
callback: any;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
declare namespace DateTimeComponent {
|
|
10
|
+
var propTypes: {
|
|
11
|
+
/** This is the unique Id for the DateTimePicker component */
|
|
12
|
+
id: PropTypes.Validator<string>;
|
|
13
|
+
/** Date object containing date to display in input control. Date should already be converted to local time */
|
|
14
|
+
dateValue: PropTypes.Validator<Date>;
|
|
15
|
+
/** This is an optional boolean option which changes the background colour of the input control to red */
|
|
16
|
+
showError: PropTypes.Requireable<boolean>;
|
|
17
|
+
/** Callback function for the DateTimecomponent outputs the chosen date time in form of Date object*/
|
|
18
|
+
callback: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
};
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { DateTimeComponent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { a as DateTimeComponent } from './chunk-JFL77JIP.js';
|
|
2
|
+
import './chunk-4FSPYK2A.js';
|
|
3
|
+
import './chunk-VOFMZ77E.js';
|
|
4
|
+
import './chunk-TJMI4DH2.js';
|
|
5
|
+
import './chunk-6LHL364H.js';
|
|
6
|
+
import './chunk-Z4LPO673.js';
|
|
7
|
+
//# sourceMappingURL=out.js.map
|
|
8
|
+
//# sourceMappingURL=date-time-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/drag-and-drop.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { c as DragAndDrop } from './chunk-
|
|
1
|
+
export { c as DragAndDrop } from './chunk-EY2UUYEC.js';
|
|
2
|
+
import './chunk-LQKVFBLU.js';
|
|
2
3
|
import './chunk-HVNLAQA6.js';
|
|
3
4
|
import './chunk-HW7AZG2V.js';
|
|
4
5
|
import './chunk-HE5X7TRV.js';
|
|
5
6
|
import './chunk-YZ2YZSNQ.js';
|
|
6
7
|
import './chunk-THOZT55U.js';
|
|
8
|
+
import './chunk-EZPRW5WN.js';
|
|
7
9
|
import './chunk-XKE3VK6Z.js';
|
|
8
10
|
import './chunk-7Q6OMA2A.js';
|
|
9
11
|
import './chunk-GVNUAH45.js';
|
|
10
12
|
import './chunk-Y2TFSCAU.js';
|
|
11
13
|
import './chunk-KRMPO53Y.js';
|
|
12
14
|
import './chunk-22RUXGYW.js';
|
|
13
|
-
import './chunk-LQKVFBLU.js';
|
|
14
15
|
import './chunk-XXP5K6Y4.js';
|
|
15
16
|
import './chunk-LWTESXND.js';
|
|
16
17
|
import './chunk-AN66H4D6.js';
|
|
@@ -18,36 +19,35 @@ import './chunk-GWERJBUR.js';
|
|
|
18
19
|
import './chunk-I2DMRDYJ.js';
|
|
19
20
|
import './chunk-FTVJMY65.js';
|
|
20
21
|
import './chunk-YXTGVTGL.js';
|
|
21
|
-
import './chunk-
|
|
22
|
+
import './chunk-F7MTEILK.js';
|
|
22
23
|
import './chunk-7WJGATIR.js';
|
|
23
24
|
import './chunk-RTRHNOTP.js';
|
|
24
25
|
import './chunk-XABECXZS.js';
|
|
25
|
-
import './chunk-
|
|
26
|
+
import './chunk-FPXEE5TC.js';
|
|
26
27
|
import './chunk-WVAVR5V6.js';
|
|
27
28
|
import './chunk-2VS7BVWY.js';
|
|
28
29
|
import './chunk-QCHLLBHM.js';
|
|
29
30
|
import './chunk-LIXVY47P.js';
|
|
30
31
|
import './chunk-Y5DEGGVQ.js';
|
|
31
|
-
import './chunk-
|
|
32
|
+
import './chunk-T2SOP5NE.js';
|
|
32
33
|
import './chunk-AVTJXS4U.js';
|
|
33
34
|
import './chunk-SFEJDNIA.js';
|
|
34
35
|
import './chunk-E5KIDP3Z.js';
|
|
35
|
-
import './chunk-
|
|
36
|
+
import './chunk-R3QJRZTP.js';
|
|
36
37
|
import './chunk-AO5TGD7T.js';
|
|
38
|
+
import './chunk-Z44LYPKH.js';
|
|
37
39
|
import './chunk-CNJDESTL.js';
|
|
38
40
|
import './chunk-7V5M4LMA.js';
|
|
39
41
|
import './chunk-GUK5N5Z2.js';
|
|
40
42
|
import './chunk-Y2GINGVR.js';
|
|
41
43
|
import './chunk-ESJIQMQJ.js';
|
|
42
44
|
import './chunk-IY6WVOAI.js';
|
|
43
|
-
import './chunk-T2SOP5NE.js';
|
|
44
45
|
import './chunk-M4UBHZDH.js';
|
|
45
46
|
import './chunk-TMO76FWT.js';
|
|
46
47
|
import './chunk-NDDDT4TO.js';
|
|
47
48
|
import './chunk-QYKN3JZ5.js';
|
|
48
49
|
import './chunk-SLIZ4TDR.js';
|
|
49
50
|
import './chunk-F3BF3KTV.js';
|
|
50
|
-
import './chunk-Z44LYPKH.js';
|
|
51
51
|
import './chunk-ANU7OAPA.js';
|
|
52
52
|
import './chunk-ISA6E23B.js';
|
|
53
53
|
import './chunk-3PTVTRDP.js';
|
|
@@ -56,9 +56,10 @@ import './chunk-D5TS3JJH.js';
|
|
|
56
56
|
import './chunk-DSJ5TRZW.js';
|
|
57
57
|
import './chunk-E4USZ2Q3.js';
|
|
58
58
|
import './chunk-F47A36U7.js';
|
|
59
|
+
import './chunk-JFL77JIP.js';
|
|
59
60
|
import './chunk-RRNNHYSF.js';
|
|
60
61
|
import './chunk-4FSPYK2A.js';
|
|
61
|
-
import './chunk-
|
|
62
|
+
import './chunk-QZFOPL3O.js';
|
|
62
63
|
import './chunk-5SEJVYKM.js';
|
|
63
64
|
import './chunk-MBACKGWE.js';
|
|
64
65
|
import './chunk-2OPJLYW6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { a as default } from '../chunk-FPXEE5TC.js';
|
|
2
|
+
import '../chunk-R3QJRZTP.js';
|
|
3
3
|
import '../chunk-6LHL364H.js';
|
|
4
4
|
import '../chunk-Z4LPO673.js';
|
|
5
5
|
//# sourceMappingURL=out.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { d as FilePicker } from '../chunk-
|
|
1
|
+
export { d as FilePicker } from '../chunk-EY2UUYEC.js';
|
|
2
|
+
import '../chunk-LQKVFBLU.js';
|
|
2
3
|
import '../chunk-HVNLAQA6.js';
|
|
3
4
|
import '../chunk-HW7AZG2V.js';
|
|
4
5
|
import '../chunk-HE5X7TRV.js';
|
|
5
6
|
import '../chunk-YZ2YZSNQ.js';
|
|
6
7
|
import '../chunk-THOZT55U.js';
|
|
8
|
+
import '../chunk-EZPRW5WN.js';
|
|
7
9
|
import '../chunk-XKE3VK6Z.js';
|
|
8
10
|
import '../chunk-7Q6OMA2A.js';
|
|
9
11
|
import '../chunk-GVNUAH45.js';
|
|
10
12
|
import '../chunk-Y2TFSCAU.js';
|
|
11
13
|
import '../chunk-KRMPO53Y.js';
|
|
12
14
|
import '../chunk-22RUXGYW.js';
|
|
13
|
-
import '../chunk-LQKVFBLU.js';
|
|
14
15
|
import '../chunk-XXP5K6Y4.js';
|
|
15
16
|
import '../chunk-LWTESXND.js';
|
|
16
17
|
import '../chunk-AN66H4D6.js';
|
|
@@ -18,36 +19,35 @@ import '../chunk-GWERJBUR.js';
|
|
|
18
19
|
import '../chunk-I2DMRDYJ.js';
|
|
19
20
|
import '../chunk-FTVJMY65.js';
|
|
20
21
|
import '../chunk-YXTGVTGL.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-F7MTEILK.js';
|
|
22
23
|
import '../chunk-7WJGATIR.js';
|
|
23
24
|
import '../chunk-RTRHNOTP.js';
|
|
24
25
|
import '../chunk-XABECXZS.js';
|
|
25
|
-
import '../chunk-
|
|
26
|
+
import '../chunk-FPXEE5TC.js';
|
|
26
27
|
import '../chunk-WVAVR5V6.js';
|
|
27
28
|
import '../chunk-2VS7BVWY.js';
|
|
28
29
|
import '../chunk-QCHLLBHM.js';
|
|
29
30
|
import '../chunk-LIXVY47P.js';
|
|
30
31
|
import '../chunk-Y5DEGGVQ.js';
|
|
31
|
-
import '../chunk-
|
|
32
|
+
import '../chunk-T2SOP5NE.js';
|
|
32
33
|
import '../chunk-AVTJXS4U.js';
|
|
33
34
|
import '../chunk-SFEJDNIA.js';
|
|
34
35
|
import '../chunk-E5KIDP3Z.js';
|
|
35
|
-
import '../chunk-
|
|
36
|
+
import '../chunk-R3QJRZTP.js';
|
|
36
37
|
import '../chunk-AO5TGD7T.js';
|
|
38
|
+
import '../chunk-Z44LYPKH.js';
|
|
37
39
|
import '../chunk-CNJDESTL.js';
|
|
38
40
|
import '../chunk-7V5M4LMA.js';
|
|
39
41
|
import '../chunk-GUK5N5Z2.js';
|
|
40
42
|
import '../chunk-Y2GINGVR.js';
|
|
41
43
|
import '../chunk-ESJIQMQJ.js';
|
|
42
44
|
import '../chunk-IY6WVOAI.js';
|
|
43
|
-
import '../chunk-T2SOP5NE.js';
|
|
44
45
|
import '../chunk-M4UBHZDH.js';
|
|
45
46
|
import '../chunk-TMO76FWT.js';
|
|
46
47
|
import '../chunk-NDDDT4TO.js';
|
|
47
48
|
import '../chunk-QYKN3JZ5.js';
|
|
48
49
|
import '../chunk-SLIZ4TDR.js';
|
|
49
50
|
import '../chunk-F3BF3KTV.js';
|
|
50
|
-
import '../chunk-Z44LYPKH.js';
|
|
51
51
|
import '../chunk-ANU7OAPA.js';
|
|
52
52
|
import '../chunk-ISA6E23B.js';
|
|
53
53
|
import '../chunk-3PTVTRDP.js';
|
|
@@ -56,9 +56,10 @@ import '../chunk-D5TS3JJH.js';
|
|
|
56
56
|
import '../chunk-DSJ5TRZW.js';
|
|
57
57
|
import '../chunk-E4USZ2Q3.js';
|
|
58
58
|
import '../chunk-F47A36U7.js';
|
|
59
|
+
import '../chunk-JFL77JIP.js';
|
|
59
60
|
import '../chunk-RRNNHYSF.js';
|
|
60
61
|
import '../chunk-4FSPYK2A.js';
|
|
61
|
-
import '../chunk-
|
|
62
|
+
import '../chunk-QZFOPL3O.js';
|
|
62
63
|
import '../chunk-5SEJVYKM.js';
|
|
63
64
|
import '../chunk-MBACKGWE.js';
|
|
64
65
|
import '../chunk-2OPJLYW6.js';
|