aquasis-fe-components 1.7.9 → 1.7.10
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.
|
@@ -76628,8 +76628,15 @@ const IXe = {
|
|
|
76628
76628
|
] });
|
|
76629
76629
|
};
|
|
76630
76630
|
tye.add(PGe);
|
|
76631
|
-
const zm = ({
|
|
76632
|
-
|
|
76631
|
+
const zm = ({
|
|
76632
|
+
size: e,
|
|
76633
|
+
placement: n,
|
|
76634
|
+
appName: t,
|
|
76635
|
+
groupId: r,
|
|
76636
|
+
children: a,
|
|
76637
|
+
primaryColor: o
|
|
76638
|
+
}) => {
|
|
76639
|
+
const [i, c] = rt(!1), { t: l } = Aa(), u = () => c((p) => !p), d = () => c(!1), f = () => {
|
|
76633
76640
|
switch (e) {
|
|
76634
76641
|
case "small":
|
|
76635
76642
|
return "1x";
|
|
@@ -76644,19 +76651,27 @@ const zm = ({ size: e, placement: n, appName: t, groupId: r, children: a }) => {
|
|
|
76644
76651
|
{
|
|
76645
76652
|
placement: n,
|
|
76646
76653
|
trigger: "click",
|
|
76647
|
-
content: /* @__PURE__ */ Me.jsx(
|
|
76654
|
+
content: /* @__PURE__ */ Me.jsx(
|
|
76655
|
+
_Xe,
|
|
76656
|
+
{
|
|
76657
|
+
onCancel: d,
|
|
76658
|
+
appName: t,
|
|
76659
|
+
groupId: r,
|
|
76660
|
+
...o ? { primaryColor: o } : {}
|
|
76661
|
+
}
|
|
76662
|
+
),
|
|
76648
76663
|
rootClassName: "helpdesk__container",
|
|
76649
76664
|
styles: { body: { padding: 0 } },
|
|
76650
76665
|
arrow: !1,
|
|
76651
|
-
open:
|
|
76666
|
+
open: i,
|
|
76652
76667
|
destroyOnHidden: !0,
|
|
76653
|
-
children: a || /* @__PURE__ */ Me.jsx(b1, { title:
|
|
76668
|
+
children: a || /* @__PURE__ */ Me.jsx(b1, { title: l("HELPDESK.SUPPORT"), placement: "left", children: /* @__PURE__ */ Me.jsx(
|
|
76654
76669
|
vr,
|
|
76655
76670
|
{
|
|
76656
76671
|
type: "primary",
|
|
76657
76672
|
shape: "circle",
|
|
76658
|
-
icon: /* @__PURE__ */ Me.jsx(s2, { icon: mk, size:
|
|
76659
|
-
onClick:
|
|
76673
|
+
icon: /* @__PURE__ */ Me.jsx(s2, { icon: mk, size: f() }),
|
|
76674
|
+
onClick: u,
|
|
76660
76675
|
size: e
|
|
76661
76676
|
}
|
|
76662
76677
|
) })
|
|
@@ -1165,7 +1165,7 @@ ${a}
|
|
|
1165
1165
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
1166
1166
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
1167
1167
|
* Copyright 2024 Fonticons, Inc.
|
|
1168
|
-
*/const kHe={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:qj}=jc,Ea="HELPDESK.FORM",FHe="GENERAL.MESSAGES",BHe=({onCancel:e,appName:n,groupId:t,primaryColor:r})=>{const[a,o]=T.useState(!1),[i]=rr.useForm(),{t:c}=xa(),{requiredField:l}=zu(),u=[{dataIndex:"field",title:c("HELPDESK.TABLE.FIELD"),render:p=>c(`HELPDESK.FORM.FIELDS.${p==null?void 0:p.toUpperCase()}`)},{dataIndex:"code",title:c("HELPDESK.TABLE.CODE"),render:p=>c(`HELPDESK.ERRORS_CODE.${p==null?void 0:p.toUpperCase()}`)}],f=p=>{i.setFieldValue(wi.Attachments,p.fileList)},d=p=>{o(!0);const g={...p,appName:n,group_id:t};DHe(g).then(()=>{Us.success({message:c(`${FHe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:v})=>{const{errors:b}=v.data;Us.error({className:"table-notification",message:c("ERROR"),placement:"topLeft",description:Me.jsx(m2,{dataSource:b,columns:u,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>o(!1))};return Me.jsxs(z1,{className:"helpdesk__content",children:[Me.jsx(Sr,{span:24,children:Me.jsx(qj,{level:3,className:"helpdesk__title",style:{...r?{color:r}:{}},children:c(`${Ea}.TITLE`)})}),Me.jsx(Sr,{span:24,children:Me.jsxs(di,{children:[Me.jsx(qj,{level:4,children:c(`${Ea}.FIELDS.TITLE`)}),Me.jsxs(rr,{form:i,layout:"vertical",onFinish:d,children:[Me.jsx(Va,{fieldName:wi.Name,label:c(`${Ea}.FIELDS.NAME`),placeholder:c(`${Ea}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:l}),Me.jsx(Va,{fieldName:wi.Email,label:c(`${Ea}.FIELDS.EMAIL`),placeholder:c(`${Ea}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:l}),Me.jsx(Va,{fieldName:wi.Subject,label:c(`${Ea}.FIELDS.SUBJECT`),placeholder:c(`${Ea}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:l}),Me.jsx(mje,{fieldName:wi.Description,label:c(`${Ea}.FIELDS.DESCRIPTION`),placeholder:c(`${Ea}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:l}),Me.jsx(rr.Item,{name:wi.Attachments,children:Me.jsxs(Y6,{beforeUpload:()=>!1,maxCount:5,onChange:f,className:"helpdesk__fields-files",multiple:!0,children:[Me.jsx("p",{className:"ant-upload-drag-icon",children:Me.jsx(Mg,{})}),Me.jsx(IP,{i18nKey:c(`${Ea}.FIELDS.UPLOAD_FILES`),components:{strong:Me.jsx("strong",{}),br:Me.jsx("br",{}),small:Me.jsx("small",{})}})]})}),Me.jsx(fr,{htmlType:"submit",type:"primary",icon:Me.jsx(h2,{icon:kHe}),loading:a,disabled:a,block:!0,children:c(`${Ea}.BUTTONS.SEND`)})]})]})})]})};g9e.add(WFe);const Wg=({size:e,placement:n,appName:t,groupId:r,children:a})=>{const[
|
|
1168
|
+
*/const kHe={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:qj}=jc,Ea="HELPDESK.FORM",FHe="GENERAL.MESSAGES",BHe=({onCancel:e,appName:n,groupId:t,primaryColor:r})=>{const[a,o]=T.useState(!1),[i]=rr.useForm(),{t:c}=xa(),{requiredField:l}=zu(),u=[{dataIndex:"field",title:c("HELPDESK.TABLE.FIELD"),render:p=>c(`HELPDESK.FORM.FIELDS.${p==null?void 0:p.toUpperCase()}`)},{dataIndex:"code",title:c("HELPDESK.TABLE.CODE"),render:p=>c(`HELPDESK.ERRORS_CODE.${p==null?void 0:p.toUpperCase()}`)}],f=p=>{i.setFieldValue(wi.Attachments,p.fileList)},d=p=>{o(!0);const g={...p,appName:n,group_id:t};DHe(g).then(()=>{Us.success({message:c(`${FHe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:v})=>{const{errors:b}=v.data;Us.error({className:"table-notification",message:c("ERROR"),placement:"topLeft",description:Me.jsx(m2,{dataSource:b,columns:u,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>o(!1))};return Me.jsxs(z1,{className:"helpdesk__content",children:[Me.jsx(Sr,{span:24,children:Me.jsx(qj,{level:3,className:"helpdesk__title",style:{...r?{color:r}:{}},children:c(`${Ea}.TITLE`)})}),Me.jsx(Sr,{span:24,children:Me.jsxs(di,{children:[Me.jsx(qj,{level:4,children:c(`${Ea}.FIELDS.TITLE`)}),Me.jsxs(rr,{form:i,layout:"vertical",onFinish:d,children:[Me.jsx(Va,{fieldName:wi.Name,label:c(`${Ea}.FIELDS.NAME`),placeholder:c(`${Ea}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:l}),Me.jsx(Va,{fieldName:wi.Email,label:c(`${Ea}.FIELDS.EMAIL`),placeholder:c(`${Ea}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:l}),Me.jsx(Va,{fieldName:wi.Subject,label:c(`${Ea}.FIELDS.SUBJECT`),placeholder:c(`${Ea}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:l}),Me.jsx(mje,{fieldName:wi.Description,label:c(`${Ea}.FIELDS.DESCRIPTION`),placeholder:c(`${Ea}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:l}),Me.jsx(rr.Item,{name:wi.Attachments,children:Me.jsxs(Y6,{beforeUpload:()=>!1,maxCount:5,onChange:f,className:"helpdesk__fields-files",multiple:!0,children:[Me.jsx("p",{className:"ant-upload-drag-icon",children:Me.jsx(Mg,{})}),Me.jsx(IP,{i18nKey:c(`${Ea}.FIELDS.UPLOAD_FILES`),components:{strong:Me.jsx("strong",{}),br:Me.jsx("br",{}),small:Me.jsx("small",{})}})]})}),Me.jsx(fr,{htmlType:"submit",type:"primary",icon:Me.jsx(h2,{icon:kHe}),loading:a,disabled:a,block:!0,children:c(`${Ea}.BUTTONS.SEND`)})]})]})})]})};g9e.add(WFe);const Wg=({size:e,placement:n,appName:t,groupId:r,children:a,primaryColor:o})=>{const[i,c]=T.useState(!1),{t:l}=xa(),u=()=>c(p=>!p),f=()=>c(!1),d=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return Me.jsx(z1,{align:"middle",children:Me.jsx($4,{placement:n,trigger:"click",content:Me.jsx(BHe,{onCancel:f,appName:t,groupId:r,...o?{primaryColor:o}:{}}),rootClassName:"helpdesk__container",styles:{body:{padding:0}},arrow:!1,open:i,destroyOnHidden:!0,children:a||Me.jsx(c1,{title:l("HELPDESK.SUPPORT"),placement:"left",children:Me.jsx(fr,{type:"primary",shape:"circle",icon:Me.jsx(h2,{icon:JR,size:d()}),onClick:u,size:e})})})})},jHe=e=>Me.jsx(Zs,{children:Me.jsx(Wg,{...e})}),HHe=e=>{try{const{connect:n}=require("react-redux"),r=n()(jHe);return Me.jsx(Q6,{fallback:Me.jsx(Wg,{...e}),children:Me.jsx(r,{...e})})}catch(n){return console.warn("🚀 ~ error:",n),Me.jsx(Wg,{...e})}},VHe=e=>Me.jsx(HHe,{...e});var S0=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e.GetUser="GetUser",e.GetLanguages="GetLanguages",e.GetRoles="GetRoles",e))(S0||{});const WHe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/getApps`);return n},UHe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/GetLanguages`);return n},KHe=async()=>{const e=window.globalAuthUrl,{data:n}=await b2.get(`${e}/getRoles`);return n},GHe=async e=>{const n=window.globalAuthUrl,{data:t}=await b2.post(`${n}/ListReleases`,e);return t},qHe=async e=>{const n=window.globalAuthUrl,{data:t}=await b2.post(`${n}/MaintainReleases`,e);return t},YHe=async(e,n)=>{const t=window.globalAuthUrl,{data:r}=await b2.post(`${t}/ReadNotification`,{idRelease:e,userId:n});return r},Yj=()=>J0([S0.GetApps],async()=>await WHe()),XHe=()=>J0([S0.GetRoles],async()=>await KHe()),ju=()=>J0([S0.GetLanguages],async()=>await UHe()),QHe=e=>{var c;const{i18n:n}=xa(),{data:t}=ju(),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 J0([S0.GetReleases,a,o,i,r],async()=>await GHe({...e,idLanguage:r}),{enabled:!!a&&r!==void 0})},Ug=20,Kg=({onlyFlag:e})=>{var l;const{i18n:n}=xa(),{data:t,isLoading:r}=ju(),a=(l=t==null?void 0:t.find(({description:u})=>u===n.language))==null?void 0:l.image;T.useEffect(()=>{t&&(t.some(({description:u})=>u===n.language)?o(n.language):o("EN"))},[n.language,t]);const o=u=>{n.changeLanguage(u),qc.set(_1.Language,u),_r.locale(u.toLowerCase())},i=({key:u})=>{n.changeLanguage(u),qc.set(_1.Language,u.toUpperCase())},c=t==null?void 0:t.map(({description:u,image:f})=>({value:u,label:Me.jsxs("div",{className:"switcher__option",children:[Me.jsx("img",{src:Ei(f),alt:`${u} flag`,width:Ug}),Me.jsx("span",{style:{textTransform:"uppercase"},children:u})]})}));if(e){const u=t==null?void 0:t.map(({description:f,image:d})=>({key:f,label:f,icon:Me.jsx("img",{src:Ei(d),alt:`${f} flag`,width:Ug})})).sort((f,d)=>f.label.localeCompare(d.label));return Me.jsx(C6,{placement:"bottomRight",menu:{items:u,onClick:i},children:Me.jsx(fr,{type:"link",shape:"circle",styles:{icon:{display:"flex"}},icon:a?Me.jsx("img",{src:Ei(a),alt:"language flag",width:Ug}):Me.jsx(A2.Image,{active:!0,className:"language-switcher-skeleton"}),onClick:f=>f.preventDefault(),loading:r})})}return Me.jsx(k2,{optionLabelProp:"label",style:{width:90,display:"inline-block"},options:TB(c),value:n.language,onSelect:o,loading:r,variant:"borderless"})},JHe=e=>Me.jsx(Zs,{children:Me.jsx(Kg,{...e})}),ZHe=e=>{try{const{connect:n}=require("react-redux"),r=n()(JHe);return Me.jsx(Q6,{fallback:Me.jsx(Kg,{...e}),children:Me.jsx(r,{...e})})}catch{return Me.jsx(Kg,{...e})}},eVe=e=>Me.jsx(ZHe,{...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||{}),Hu={exports:{}};/**
|
|
1169
1169
|
* @license
|
|
1170
1170
|
* Lodash <https://lodash.com/>
|
|
1171
1171
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|