aquasis-fe-components 1.7.8 → 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.
@@ -76506,39 +76506,39 @@ const IXe = {
76506
76506
  prefix: "far",
76507
76507
  iconName: "paper-plane",
76508
76508
  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"]
76509
- }, { Title: Hw } = Cl, Ma = "HELPDESK.FORM", TXe = "GENERAL.MESSAGES", _Xe = ({ onCancel: e, appName: n, groupId: t }) => {
76510
- const [r, a] = rt(!1), [o] = sr.useForm(), { t: i } = Aa(), { requiredField: c } = kd(), l = [
76509
+ }, { Title: Hw } = Cl, Ma = "HELPDESK.FORM", TXe = "GENERAL.MESSAGES", _Xe = ({ onCancel: e, appName: n, groupId: t, primaryColor: r }) => {
76510
+ const [a, o] = rt(!1), [i] = sr.useForm(), { t: c } = Aa(), { requiredField: l } = kd(), u = [
76511
76511
  {
76512
76512
  dataIndex: "field",
76513
- title: i("HELPDESK.TABLE.FIELD"),
76514
- render: (f) => i(`HELPDESK.FORM.FIELDS.${f == null ? void 0 : f.toUpperCase()}`)
76513
+ title: c("HELPDESK.TABLE.FIELD"),
76514
+ render: (p) => c(`HELPDESK.FORM.FIELDS.${p == null ? void 0 : p.toUpperCase()}`)
76515
76515
  },
76516
76516
  {
76517
76517
  dataIndex: "code",
76518
- title: i("HELPDESK.TABLE.CODE"),
76519
- render: (f) => i(`HELPDESK.ERRORS_CODE.${f == null ? void 0 : f.toUpperCase()}`)
76520
- }
76521
- ], u = (f) => {
76522
- o.setFieldValue(ui.Attachments, f.fileList);
76523
- }, d = (f) => {
76524
- a(!0);
76525
- const p = { ...f, appName: n, group_id: t };
76526
- PXe(p).then(() => {
76518
+ title: c("HELPDESK.TABLE.CODE"),
76519
+ render: (p) => c(`HELPDESK.ERRORS_CODE.${p == null ? void 0 : p.toUpperCase()}`)
76520
+ }
76521
+ ], d = (p) => {
76522
+ i.setFieldValue(ui.Attachments, p.fileList);
76523
+ }, f = (p) => {
76524
+ o(!0);
76525
+ const g = { ...p, appName: n, group_id: t };
76526
+ PXe(g).then(() => {
76527
76527
  r0.success({
76528
- message: i(`${TXe}.SUCCESS.TICKET`),
76528
+ message: c(`${TXe}.SUCCESS.TICKET`),
76529
76529
  placement: "topLeft"
76530
76530
  }), e && e();
76531
- }).catch(({ response: g }) => {
76532
- const { errors: v } = g.data;
76531
+ }).catch(({ response: v }) => {
76532
+ const { errors: b } = v.data;
76533
76533
  r0.error({
76534
76534
  className: "table-notification",
76535
- message: i("ERROR"),
76535
+ message: c("ERROR"),
76536
76536
  placement: "topLeft",
76537
76537
  description: /* @__PURE__ */ Me.jsx(
76538
76538
  $2,
76539
76539
  {
76540
- dataSource: v,
76541
- columns: l,
76540
+ dataSource: b,
76541
+ columns: u,
76542
76542
  pagination: { defaultPageSize: 5 },
76543
76543
  rowKey: "field",
76544
76544
  size: "small",
@@ -76547,48 +76547,48 @@ const IXe = {
76547
76547
  ),
76548
76548
  duration: 0
76549
76549
  });
76550
- }).finally(() => a(!1));
76550
+ }).finally(() => o(!1));
76551
76551
  };
76552
76552
  return /* @__PURE__ */ Me.jsxs(T1, { className: "helpdesk__content", children: [
76553
- /* @__PURE__ */ Me.jsx(zr, { span: 24, children: /* @__PURE__ */ Me.jsx(Hw, { level: 3, className: "helpdesk__title", children: i(`${Ma}.TITLE`) }) }),
76553
+ /* @__PURE__ */ Me.jsx(zr, { span: 24, children: /* @__PURE__ */ Me.jsx(Hw, { level: 3, className: "helpdesk__title", style: { ...r ? { color: r } : {} }, children: c(`${Ma}.TITLE`) }) }),
76554
76554
  /* @__PURE__ */ Me.jsx(zr, { span: 24, children: /* @__PURE__ */ Me.jsxs(Ui, { children: [
76555
- /* @__PURE__ */ Me.jsx(Hw, { level: 4, children: i(`${Ma}.FIELDS.TITLE`) }),
76556
- /* @__PURE__ */ Me.jsxs(sr, { form: o, layout: "vertical", onFinish: d, children: [
76555
+ /* @__PURE__ */ Me.jsx(Hw, { level: 4, children: c(`${Ma}.FIELDS.TITLE`) }),
76556
+ /* @__PURE__ */ Me.jsxs(sr, { form: i, layout: "vertical", onFinish: f, children: [
76557
76557
  /* @__PURE__ */ Me.jsx(
76558
76558
  Ka,
76559
76559
  {
76560
76560
  fieldName: ui.Name,
76561
- label: i(`${Ma}.FIELDS.NAME`),
76562
- placeholder: i(`${Ma}.FIELDS.NAME`, { context: "PLACEHOLDER" }),
76563
- rules: c
76561
+ label: c(`${Ma}.FIELDS.NAME`),
76562
+ placeholder: c(`${Ma}.FIELDS.NAME`, { context: "PLACEHOLDER" }),
76563
+ rules: l
76564
76564
  }
76565
76565
  ),
76566
76566
  /* @__PURE__ */ Me.jsx(
76567
76567
  Ka,
76568
76568
  {
76569
76569
  fieldName: ui.Email,
76570
- label: i(`${Ma}.FIELDS.EMAIL`),
76571
- placeholder: i(`${Ma}.FIELDS.EMAIL`, { context: "PLACEHOLDER" }),
76572
- rules: c
76570
+ label: c(`${Ma}.FIELDS.EMAIL`),
76571
+ placeholder: c(`${Ma}.FIELDS.EMAIL`, { context: "PLACEHOLDER" }),
76572
+ rules: l
76573
76573
  }
76574
76574
  ),
76575
76575
  /* @__PURE__ */ Me.jsx(
76576
76576
  Ka,
76577
76577
  {
76578
76578
  fieldName: ui.Subject,
76579
- label: i(`${Ma}.FIELDS.SUBJECT`),
76580
- placeholder: i(`${Ma}.FIELDS.SUBJECT`, { context: "PLACEHOLDER" }),
76581
- rules: c
76579
+ label: c(`${Ma}.FIELDS.SUBJECT`),
76580
+ placeholder: c(`${Ma}.FIELDS.SUBJECT`, { context: "PLACEHOLDER" }),
76581
+ rules: l
76582
76582
  }
76583
76583
  ),
76584
76584
  /* @__PURE__ */ Me.jsx(
76585
76585
  nYe,
76586
76586
  {
76587
76587
  fieldName: ui.Description,
76588
- label: i(`${Ma}.FIELDS.DESCRIPTION`),
76589
- placeholder: i(`${Ma}.FIELDS.DESCRIPTION`, { context: "PLACEHOLDER" }),
76588
+ label: c(`${Ma}.FIELDS.DESCRIPTION`),
76589
+ placeholder: c(`${Ma}.FIELDS.DESCRIPTION`, { context: "PLACEHOLDER" }),
76590
76590
  rows: 4,
76591
- rules: c
76591
+ rules: l
76592
76592
  }
76593
76593
  ),
76594
76594
  /* @__PURE__ */ Me.jsx(sr.Item, { name: ui.Attachments, children: /* @__PURE__ */ Me.jsxs(
@@ -76596,7 +76596,7 @@ const IXe = {
76596
76596
  {
76597
76597
  beforeUpload: () => !1,
76598
76598
  maxCount: 5,
76599
- onChange: u,
76599
+ onChange: d,
76600
76600
  className: "helpdesk__fields-files",
76601
76601
  multiple: !0,
76602
76602
  children: [
@@ -76604,7 +76604,7 @@ const IXe = {
76604
76604
  /* @__PURE__ */ Me.jsx(
76605
76605
  x_,
76606
76606
  {
76607
- i18nKey: i(`${Ma}.FIELDS.UPLOAD_FILES`),
76607
+ i18nKey: c(`${Ma}.FIELDS.UPLOAD_FILES`),
76608
76608
  components: { strong: /* @__PURE__ */ Me.jsx("strong", {}), br: /* @__PURE__ */ Me.jsx("br", {}), small: /* @__PURE__ */ Me.jsx("small", {}) }
76609
76609
  }
76610
76610
  )
@@ -76617,10 +76617,10 @@ const IXe = {
76617
76617
  htmlType: "submit",
76618
76618
  type: "primary",
76619
76619
  icon: /* @__PURE__ */ Me.jsx(s2, { icon: IXe }),
76620
- loading: r,
76621
- disabled: r,
76620
+ loading: a,
76621
+ disabled: a,
76622
76622
  block: !0,
76623
- children: i(`${Ma}.BUTTONS.SEND`)
76623
+ children: c(`${Ma}.BUTTONS.SEND`)
76624
76624
  }
76625
76625
  )
76626
76626
  ] })
@@ -76628,8 +76628,15 @@ const IXe = {
76628
76628
  ] });
76629
76629
  };
76630
76630
  tye.add(PGe);
76631
- const zm = ({ size: e, placement: n, appName: t, groupId: r, children: a }) => {
76632
- const [o, i] = rt(!1), { t: c } = Aa(), l = () => i((f) => !f), u = () => i(!1), d = () => {
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(_Xe, { onCancel: u, appName: t, groupId: r }),
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: o,
76666
+ open: i,
76652
76667
  destroyOnHidden: !0,
76653
- children: a || /* @__PURE__ */ Me.jsx(b1, { title: c("HELPDESK.SUPPORT"), placement: "left", children: /* @__PURE__ */ Me.jsx(
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: d() }),
76659
- onClick: l,
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})=>{const[r,a]=T.useState(!1),[o]=rr.useForm(),{t:i}=xa(),{requiredField:c}=zu(),l=[{dataIndex:"field",title:i("HELPDESK.TABLE.FIELD"),render:d=>i(`HELPDESK.FORM.FIELDS.${d==null?void 0:d.toUpperCase()}`)},{dataIndex:"code",title:i("HELPDESK.TABLE.CODE"),render:d=>i(`HELPDESK.ERRORS_CODE.${d==null?void 0:d.toUpperCase()}`)}],u=d=>{o.setFieldValue(wi.Attachments,d.fileList)},f=d=>{a(!0);const p={...d,appName:n,group_id:t};DHe(p).then(()=>{Us.success({message:i(`${FHe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:g})=>{const{errors:v}=g.data;Us.error({className:"table-notification",message:i("ERROR"),placement:"topLeft",description:Me.jsx(m2,{dataSource:v,columns:l,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>a(!1))};return Me.jsxs(z1,{className:"helpdesk__content",children:[Me.jsx(Sr,{span:24,children:Me.jsx(qj,{level:3,className:"helpdesk__title",children:i(`${Ea}.TITLE`)})}),Me.jsx(Sr,{span:24,children:Me.jsxs(di,{children:[Me.jsx(qj,{level:4,children:i(`${Ea}.FIELDS.TITLE`)}),Me.jsxs(rr,{form:o,layout:"vertical",onFinish:f,children:[Me.jsx(Va,{fieldName:wi.Name,label:i(`${Ea}.FIELDS.NAME`),placeholder:i(`${Ea}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:c}),Me.jsx(Va,{fieldName:wi.Email,label:i(`${Ea}.FIELDS.EMAIL`),placeholder:i(`${Ea}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:c}),Me.jsx(Va,{fieldName:wi.Subject,label:i(`${Ea}.FIELDS.SUBJECT`),placeholder:i(`${Ea}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:c}),Me.jsx(mje,{fieldName:wi.Description,label:i(`${Ea}.FIELDS.DESCRIPTION`),placeholder:i(`${Ea}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:c}),Me.jsx(rr.Item,{name:wi.Attachments,children:Me.jsxs(Y6,{beforeUpload:()=>!1,maxCount:5,onChange:u,className:"helpdesk__fields-files",multiple:!0,children:[Me.jsx("p",{className:"ant-upload-drag-icon",children:Me.jsx(Mg,{})}),Me.jsx(IP,{i18nKey:i(`${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:r,disabled:r,block:!0,children:i(`${Ea}.BUTTONS.SEND`)})]})]})})]})};g9e.add(WFe);const Wg=({size:e,placement:n,appName:t,groupId:r,children:a})=>{const[o,i]=T.useState(!1),{t:c}=xa(),l=()=>i(d=>!d),u=()=>i(!1),f=()=>{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:u,appName:t,groupId:r}),rootClassName:"helpdesk__container",styles:{body:{padding:0}},arrow:!1,open:o,destroyOnHidden:!0,children:a||Me.jsx(c1,{title:c("HELPDESK.SUPPORT"),placement:"left",children:Me.jsx(fr,{type:"primary",shape:"circle",icon:Me.jsx(h2,{icon:JR,size:f()}),onClick:l,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:{}};/**
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/>
@@ -1,7 +1,8 @@
1
1
  type Props = {
2
2
  appName: string;
3
3
  groupId?: number;
4
+ primaryColor?: string;
4
5
  onCancel?: () => void;
5
6
  };
6
- export declare const HelpdeskContent: ({ onCancel, appName, groupId }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const HelpdeskContent: ({ onCancel, appName, groupId, primaryColor }: Props) => import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -6,5 +6,6 @@ export interface HelpdeskProps {
6
6
  placement?: PopoverProps["placement"];
7
7
  appName: string;
8
8
  groupId?: number;
9
+ primaryColor?: string;
9
10
  }
10
11
  export declare const Helpdesk: FC<PropsWithChildren<HelpdeskProps>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aquasis-fe-components",
3
3
  "private": false,
4
- "version": "1.7.8",
4
+ "version": "1.7.10",
5
5
  "type": "module",
6
6
  "license": "ISC",
7
7
  "author": "Ewerton Souza",