aquasis-fe-components 1.7.7-beta.2 → 1.7.7-beta.3

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.
@@ -77199,7 +77199,10 @@ const cU = ({ size: e, placement: n, children: t }) => {
77199
77199
  ) })
77200
77200
  }
77201
77201
  ) });
77202
- }, rJe = (e) => /* @__PURE__ */ ze.jsx(V0, { children: /* @__PURE__ */ ze.jsx(cU, { ...e }) }), aJe = Cf(), oJe = aJe(rJe), NZe = (e) => yf() ? /* @__PURE__ */ ze.jsx(oJe, { ...e }) : /* @__PURE__ */ ze.jsx(cU, { ...e });
77202
+ }, rJe = (e) => /* @__PURE__ */ ze.jsx(V0, { children: /* @__PURE__ */ ze.jsx(cU, { ...e }) }), aJe = Cf(), oJe = aJe(rJe), NZe = (e) => {
77203
+ const n = yf();
77204
+ return console.log("🚀 ~ HelpdeskComponent ~ isReduxAvailable:", n), n ? /* @__PURE__ */ ze.jsx(oJe, { ...e }) : (console.log("Helpdesk WITHOUT REDUX PROVIDER"), /* @__PURE__ */ ze.jsx(cU, { ...e }));
77205
+ };
77203
77206
  var Z0 = /* @__PURE__ */ ((e) => (e.GetApps = "GetApps", e.GetReleases = "GetReleases", e.GetUser = "GetUser", e.GetLanguages = "GetLanguages", e.GetRoles = "GetRoles", e))(Z0 || {});
77204
77207
  const iJe = async () => {
77205
77208
  const e = window.globalAuthUrl, { data: n } = await L2.get(`${e}/getApps`);
@@ -1169,7 +1169,7 @@ ${a}
1169
1169
  * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
1170
1170
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
1171
1171
  * Copyright 2024 Fonticons, Inc.
1172
- */const oWe={prefix:"far",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]},{Title:SH}=jc,Ea="HELPDESK.FORM",iWe="GENERAL.MESSAGES",cWe=({onCancel:e})=>{const[n,t]=R.useState(!1),[r]=rr.useForm(),{t:a}=xa(),{requiredField:o}=Ou(),i=Q2(L1.AppName),c=[{dataIndex:"field",title:a("HELPDESK.TABLE.FIELD"),render:f=>a(`HELPDESK.FORM.FIELDS.${f==null?void 0:f.toUpperCase()}`)},{dataIndex:"code",title:a("HELPDESK.TABLE.CODE"),render:f=>a(`HELPDESK.ERRORS_CODE.${f==null?void 0:f.toUpperCase()}`)}],l=f=>{r.setFieldValue(wi.Attachments,f.fileList)},u=f=>{t(!0);const d={...f,appName:i};aWe(d).then(()=>{Us.success({message:a(`${iWe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:p})=>{const{errors:g}=p.data;Us.error({className:"table-notification",message:a("ERROR"),placement:"topLeft",description:ze.jsx(m2,{dataSource:g,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>t(!1))};return ze.jsxs(N1,{className:"helpdesk__content",children:[ze.jsx(Sr,{span:24,children:ze.jsx(SH,{level:3,className:"helpdesk__title",children:a(`${Ea}.TITLE`)})}),ze.jsx(Sr,{span:24,children:ze.jsxs(di,{children:[ze.jsx(SH,{level:4,children:a(`${Ea}.FIELDS.TITLE`)}),ze.jsxs(rr,{form:r,layout:"vertical",onFinish:u,children:[ze.jsx(Va,{fieldName:wi.Name,label:a(`${Ea}.FIELDS.NAME`),placeholder:a(`${Ea}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Va,{fieldName:wi.Email,label:a(`${Ea}.FIELDS.EMAIL`),placeholder:a(`${Ea}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Va,{fieldName:wi.Subject,label:a(`${Ea}.FIELDS.SUBJECT`),placeholder:a(`${Ea}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(RHe,{fieldName:wi.Description,label:a(`${Ea}.FIELDS.DESCRIPTION`),placeholder:a(`${Ea}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:o}),ze.jsx(rr.Item,{name:wi.Attachments,children:ze.jsxs(X6,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(Bg,{})}),ze.jsx(HP,{i18nKey:a(`${Ea}.FIELDS.UPLOAD_FILES`),components:{strong:ze.jsx("strong",{}),br:ze.jsx("br",{}),small:ze.jsx("small",{})}})]})}),ze.jsx(fr,{htmlType:"submit",type:"primary",icon:ze.jsx(h2,{icon:oWe}),loading:n,disabled:n,block:!0,children:a(`${Ea}.BUTTONS.SEND`)})]})]})})]})};Rme.add(sje);const xH=({size:e,placement:n,children:t})=>{const[r,a]=R.useState(!1),{t:o}=xa(),i=()=>a(u=>!u),c=()=>a(!1),l=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return ze.jsx(N1,{align:"middle",children:ze.jsx(O4,{placement:n,trigger:"click",content:ze.jsx(cWe,{onCancel:c}),rootClassName:"helpdesk__container",styles:{body:{padding:0}},arrow:!1,open:r,destroyOnHidden:!0,children:t||ze.jsx(c1,{title:o("HELPDESK.SUPPORT"),placement:"left",children:ze.jsx(fr,{type:"primary",shape:"circle",icon:ze.jsx(h2,{icon:w_,size:l()}),onClick:i,size:e})})})})},lWe=e=>ze.jsx(e0,{children:ze.jsx(xH,{...e})}),sWe=Z6()(lWe),uWe=e=>eu()?ze.jsx(sWe,{...e}):ze.jsx(xH,{...e});var x0=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e.GetUser="GetUser",e.GetLanguages="GetLanguages",e.GetRoles="GetRoles",e))(x0||{});const fWe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/getApps`);return n},dWe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/GetLanguages`);return n},mWe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/getRoles`);return n},pWe=async e=>{const n=window.globalAuthUrl,{data:t}=await b2.post(`${n}/ListReleases`,e);return t},gWe=async e=>{const n=window.globalAuthUrl,{data:t}=await b2.post(`${n}/MaintainReleases`,e);return t},hWe=async(e,n)=>{const t=window.globalAuthUrl,{data:r}=await b2.post(`${t}/ReadNotification`,{idRelease:e,userId:n});return r},EH=()=>Z0([x0.GetApps],async()=>await fWe()),vWe=()=>Z0([x0.GetRoles],async()=>await mWe()),Wu=()=>Z0([x0.GetLanguages],async()=>await dWe()),bWe=e=>{var c;const{i18n:n}=xa(),{data:t}=Wu(),r=(c=t==null?void 0:t.find(l=>l.description===n.language))==null?void 0:c.idLanguage,{idApp:a,userId:o,lastDeployed:i}=e;return Z0([x0.GetReleases,a,o,i,r],async()=>await pWe({...e,idLanguage:r}),{enabled:!!a&&r!==void 0})},ah=20,wH=({onlyFlag:e})=>{var u;const{i18n:n}=xa(),{data:t,isLoading:r}=Wu(),a=lj(),o=(u=t==null?void 0:t.find(({description:f})=>f===n.language))==null?void 0:u.image;R.useEffect(()=>{t&&(t.some(({description:f})=>f===a)?i(a):i("EN"))},[a,t]);const i=f=>{n.changeLanguage(f),qc.set(L1.Language,f),_r.locale(f.toLowerCase())},c=({key:f})=>{n.changeLanguage(f),qc.set(L1.Language,f.toUpperCase())},l=t==null?void 0:t.map(({description:f,image:d})=>({value:f,label:ze.jsxs("div",{className:"switcher__option",children:[ze.jsx("img",{src:Ei(d),alt:`${f} flag`,width:ah}),ze.jsx("span",{style:{textTransform:"uppercase"},children:f})]})}));if(e){const f=t==null?void 0:t.map(({description:d,image:p})=>({key:d,label:d,icon:ze.jsx("img",{src:Ei(p),alt:`${d} flag`,width:ah})})).sort((d,p)=>d.label.localeCompare(p.label));return ze.jsx(y6,{placement:"bottomRight",menu:{items:f,onClick:c},children:ze.jsx(fr,{type:"link",shape:"circle",styles:{icon:{display:"flex"}},icon:o?ze.jsx("img",{src:Ei(o),alt:"language flag",width:ah}):ze.jsx(A2.Image,{active:!0,className:"language-switcher-skeleton"}),onClick:d=>d.preventDefault(),loading:r})})}return ze.jsx(k2,{optionLabelProp:"label",style:{width:90,display:"inline-block"},options:oj(l),value:n.language,onSelect:i,loading:r,variant:"borderless"})},CWe=e=>ze.jsx(e0,{children:ze.jsx(wH,{...e})}),yWe=Z6()(CWe),SWe=e=>eu()?ze.jsx(yWe,{...e}):ze.jsx(wH,{...e});var Lt=(e=>(e.App="idApp",e.Version="version",e.DeployDate="releaseDate",e.ReleasePages="gaReleasePages",e.Fields="gaReleasePagesContent",e.Title="title",e.Description="description",e.Image="idFile",e.Order="order",e.NoImage="noImage",e))(Lt||{}),Uu={exports:{}};/**
1172
+ */const oWe={prefix:"far",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]},{Title:SH}=jc,Ea="HELPDESK.FORM",iWe="GENERAL.MESSAGES",cWe=({onCancel:e})=>{const[n,t]=R.useState(!1),[r]=rr.useForm(),{t:a}=xa(),{requiredField:o}=Ou(),i=Q2(L1.AppName),c=[{dataIndex:"field",title:a("HELPDESK.TABLE.FIELD"),render:f=>a(`HELPDESK.FORM.FIELDS.${f==null?void 0:f.toUpperCase()}`)},{dataIndex:"code",title:a("HELPDESK.TABLE.CODE"),render:f=>a(`HELPDESK.ERRORS_CODE.${f==null?void 0:f.toUpperCase()}`)}],l=f=>{r.setFieldValue(wi.Attachments,f.fileList)},u=f=>{t(!0);const d={...f,appName:i};aWe(d).then(()=>{Us.success({message:a(`${iWe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:p})=>{const{errors:g}=p.data;Us.error({className:"table-notification",message:a("ERROR"),placement:"topLeft",description:ze.jsx(m2,{dataSource:g,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>t(!1))};return ze.jsxs(N1,{className:"helpdesk__content",children:[ze.jsx(Sr,{span:24,children:ze.jsx(SH,{level:3,className:"helpdesk__title",children:a(`${Ea}.TITLE`)})}),ze.jsx(Sr,{span:24,children:ze.jsxs(di,{children:[ze.jsx(SH,{level:4,children:a(`${Ea}.FIELDS.TITLE`)}),ze.jsxs(rr,{form:r,layout:"vertical",onFinish:u,children:[ze.jsx(Va,{fieldName:wi.Name,label:a(`${Ea}.FIELDS.NAME`),placeholder:a(`${Ea}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Va,{fieldName:wi.Email,label:a(`${Ea}.FIELDS.EMAIL`),placeholder:a(`${Ea}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Va,{fieldName:wi.Subject,label:a(`${Ea}.FIELDS.SUBJECT`),placeholder:a(`${Ea}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(RHe,{fieldName:wi.Description,label:a(`${Ea}.FIELDS.DESCRIPTION`),placeholder:a(`${Ea}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:o}),ze.jsx(rr.Item,{name:wi.Attachments,children:ze.jsxs(X6,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(Bg,{})}),ze.jsx(HP,{i18nKey:a(`${Ea}.FIELDS.UPLOAD_FILES`),components:{strong:ze.jsx("strong",{}),br:ze.jsx("br",{}),small:ze.jsx("small",{})}})]})}),ze.jsx(fr,{htmlType:"submit",type:"primary",icon:ze.jsx(h2,{icon:oWe}),loading:n,disabled:n,block:!0,children:a(`${Ea}.BUTTONS.SEND`)})]})]})})]})};Rme.add(sje);const xH=({size:e,placement:n,children:t})=>{const[r,a]=R.useState(!1),{t:o}=xa(),i=()=>a(u=>!u),c=()=>a(!1),l=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return ze.jsx(N1,{align:"middle",children:ze.jsx(O4,{placement:n,trigger:"click",content:ze.jsx(cWe,{onCancel:c}),rootClassName:"helpdesk__container",styles:{body:{padding:0}},arrow:!1,open:r,destroyOnHidden:!0,children:t||ze.jsx(c1,{title:o("HELPDESK.SUPPORT"),placement:"left",children:ze.jsx(fr,{type:"primary",shape:"circle",icon:ze.jsx(h2,{icon:w_,size:l()}),onClick:i,size:e})})})})},lWe=e=>ze.jsx(e0,{children:ze.jsx(xH,{...e})}),sWe=Z6()(lWe),uWe=e=>{const n=eu();return console.log("🚀 ~ HelpdeskComponent ~ isReduxAvailable:",n),n?ze.jsx(sWe,{...e}):(console.log("Helpdesk WITHOUT REDUX PROVIDER"),ze.jsx(xH,{...e}))};var x0=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e.GetUser="GetUser",e.GetLanguages="GetLanguages",e.GetRoles="GetRoles",e))(x0||{});const fWe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/getApps`);return n},dWe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/GetLanguages`);return n},mWe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/getRoles`);return n},pWe=async e=>{const n=window.globalAuthUrl,{data:t}=await b2.post(`${n}/ListReleases`,e);return t},gWe=async e=>{const n=window.globalAuthUrl,{data:t}=await b2.post(`${n}/MaintainReleases`,e);return t},hWe=async(e,n)=>{const t=window.globalAuthUrl,{data:r}=await b2.post(`${t}/ReadNotification`,{idRelease:e,userId:n});return r},EH=()=>Z0([x0.GetApps],async()=>await fWe()),vWe=()=>Z0([x0.GetRoles],async()=>await mWe()),Wu=()=>Z0([x0.GetLanguages],async()=>await dWe()),bWe=e=>{var c;const{i18n:n}=xa(),{data:t}=Wu(),r=(c=t==null?void 0:t.find(l=>l.description===n.language))==null?void 0:c.idLanguage,{idApp:a,userId:o,lastDeployed:i}=e;return Z0([x0.GetReleases,a,o,i,r],async()=>await pWe({...e,idLanguage:r}),{enabled:!!a&&r!==void 0})},ah=20,wH=({onlyFlag:e})=>{var u;const{i18n:n}=xa(),{data:t,isLoading:r}=Wu(),a=lj(),o=(u=t==null?void 0:t.find(({description:f})=>f===n.language))==null?void 0:u.image;R.useEffect(()=>{t&&(t.some(({description:f})=>f===a)?i(a):i("EN"))},[a,t]);const i=f=>{n.changeLanguage(f),qc.set(L1.Language,f),_r.locale(f.toLowerCase())},c=({key:f})=>{n.changeLanguage(f),qc.set(L1.Language,f.toUpperCase())},l=t==null?void 0:t.map(({description:f,image:d})=>({value:f,label:ze.jsxs("div",{className:"switcher__option",children:[ze.jsx("img",{src:Ei(d),alt:`${f} flag`,width:ah}),ze.jsx("span",{style:{textTransform:"uppercase"},children:f})]})}));if(e){const f=t==null?void 0:t.map(({description:d,image:p})=>({key:d,label:d,icon:ze.jsx("img",{src:Ei(p),alt:`${d} flag`,width:ah})})).sort((d,p)=>d.label.localeCompare(p.label));return ze.jsx(y6,{placement:"bottomRight",menu:{items:f,onClick:c},children:ze.jsx(fr,{type:"link",shape:"circle",styles:{icon:{display:"flex"}},icon:o?ze.jsx("img",{src:Ei(o),alt:"language flag",width:ah}):ze.jsx(A2.Image,{active:!0,className:"language-switcher-skeleton"}),onClick:d=>d.preventDefault(),loading:r})})}return ze.jsx(k2,{optionLabelProp:"label",style:{width:90,display:"inline-block"},options:oj(l),value:n.language,onSelect:i,loading:r,variant:"borderless"})},CWe=e=>ze.jsx(e0,{children:ze.jsx(wH,{...e})}),yWe=Z6()(CWe),SWe=e=>eu()?ze.jsx(yWe,{...e}):ze.jsx(wH,{...e});var Lt=(e=>(e.App="idApp",e.Version="version",e.DeployDate="releaseDate",e.ReleasePages="gaReleasePages",e.Fields="gaReleasePagesContent",e.Title="title",e.Description="description",e.Image="idFile",e.Order="order",e.NoImage="noImage",e))(Lt||{}),Uu={exports:{}};/**
1173
1173
  * @license
1174
1174
  * Lodash <https://lodash.com/>
1175
1175
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aquasis-fe-components",
3
3
  "private": false,
4
- "version": "1.7.7-beta.2",
4
+ "version": "1.7.7-beta.3",
5
5
  "type": "module",
6
6
  "license": "ISC",
7
7
  "author": "Ewerton Souza",