PageSourceSearch

https://www.zmyle.de/backoffice/assets/index-CrvsizCW.js

js zmyle.de collected 2026-10-07 00:45:19 UTC 7,060 bytes, 2 lines download raw bytes

1var E=Object.freeze,Z=Object.defineProperty;var f=(r,p)=>E(Z(r,"raw",{value:E(p||r.slice())}));import{H as j,M as G,aE as A,r as l,u as P,d as M,a as S,j as e,aH as z,aI as n,g_ as J,o as T,a5 as W,p as b,aA as Q,am as R,B as X,f as ee,h as te,f7 as ae,T as re,q as se,s as ie,g$ as ne,h0 as le,h1 as oe,aY as de,aw as ce,aD as D,ak as k,a7 as v,a8 as C,h2 as pe,h3 as he}from"./index-DAiYHS3l.js";import{A as I}from"./AddButton-B2pkYq-p.js";import{L as w}from"./Link-xE5V3QhG.js";import{T as Y}from"./TableBody-DEAK2IV7.js";import{T as ue,a as $}from"./TableContainer-kFxV8Xks.js";globalThis&&(globalThis.regeneratorRuntime=void 0);var L;j.div(L||(L=f(["\n  display: flex;\n  align-items: center;\n  width: 100%;\n\n  > button {\n    margin-left: auto;\n  }\n"])));var _;const V=j(ue)(_||(_=f(["\n  margin-top: 2rem;\n"])));var B;const q=j(A)(B||(B=f(["\n  > th:first-child,\n  td:first-child {\n    height: 3.531rem;\n    padding: 0.25rem 1rem 0.25rem 1rem;\n  }\n\n  "," {\n    > th:first-child,\n    td:first-child {\n      padding-left: 0;\n    }\n  }\n"])),G),me=l.forwardRef((r,p)=>{const{retailerId:s}=r,[h,o]=l.useState(!1),[c,i]=l.useState([]),{t:a}=P("retailer"),u=M(),x=!!c.length,m=S(),d=async()=>{try{o(!0);const t=await J(s);i(t),o(!1)}catch(t){o(!1),T(t,m)}};l.useImperativeHandle(p,()=>({async refresh(){d()}})),l.useEffect(()=>{d()},[]);const g=t=>()=>{const K=b.RETAILER+b.DEVELOPERS+b.API_KEYS_DETAILS,y=W(K,{retailerId:s,apiTenantId:t});u.push(y)};return e.jsx(V,{topSeparator:!0,bottomSeparator:!0,children:e.jsxs($,{children:[e.jsx(z,{children:e.jsxs(A,{children:[e.jsx(n,{width:"20%",children:a("retailers.developerPage.standardKeys.table.createdAt")}),e.jsx(n,{width:"20%",children:a("retailers.developerPage.standardKeys.table.name")}),e.jsx(n,{children:a("retailers.developerPage.standardKeys.table.key")}),e.jsx(n,{children:a("retailers.developerPage.standardKeys.table.secret")})]})}),e.jsx(Y,{isLoading:h,hasNoData:!x,children:c.map(t=>e.jsxs(q,{"data-testid":"api-key-row",onClick:g(t.id),children:[e.jsx(n,{width:"20%",children:t.formatted.createdAt}),e.jsx(n,{width:"20%",translate:"no",children:t.name}),e.jsx(n,{children:t.apiKey}),e.jsx(n,{children:a("retailers.developerPage.standardKeys.table.secretPlaceholder")})]},t.id))})]})})});var O;const ge=j(Q)(O||(O=f(["\n  div.MuiDialog-paper {\n    padding: 0rem;\n    padding-top: 0.5rem;\n\n    > h2 {\n      padding-inline: 1.5rem;\n    }\n  }\n"])));var N;const ye=j.div(N||(N=f(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  padding-inline: 2rem;\n  height: 100%;\n"])));var F;const fe=j(R)(F||(F=f(["\n  padding: 2rem 3rem;\n  border-radius: 1rem 1rem 0 0;\n  box-shadow: 0px -5px 20px ",";\n  background-color: ",";\n"])),({theme:r})=>r.palette.zml.boxShadow,({theme:r})=>r.palette.zml.grey50);var H;const xe=j(X)(H||(H=f(["\n  padding-block: 0.75rem;\n\n  transition: filter 0.2s ease-in-out;\n\n  &:hover {\n    filter: brightness(0.9);\n  }\n"]))),je={name:""},be=ie("retailer"),Ke=te().shape({name:se().label(be("retailers.developerPage.createApiKeyDialog.nameLabel")).required()}),Pe=r=>{const{isOpen:p,type:s,onClose:h,retailerId:o,onFinish:c}=r,{t:i}=P("retailer"),a=S(),u=l.useMemo(()=>s?i(s==="standard"?"retailers.developerPage.createApiKeyDialog.standardTitle":"retailers.developerPage.createApiKeyDialog.partnerTitle"):"",[s]),x=async K=>{try{const{name:y}=K;await(s==="standard"?()=>ne({retailerId:o,name:y}):()=>le({retailerId:o,name:y}))();const U=i("retailers.developerPage.createApiKeyDialog.successMessage",{disableParentElement:!0});a.alert.OPEN_SNACKBAR_SUCCESS(U),await(c==null?void 0:c()),h()}catch(y){T(y,a)}},{getFieldProps:m,handleSubmit:d,isSubmitting:g,resetForm:t}=ee({initialValues:je,onSubmit:x,validationSchema:Ke});return e.jsx(ge,{title:u,isOpen:p,onClickClose:h,onExited:t,size:"md","data-testid":"create-api-key-dialog",children:e.jsx(ae,{in:!0,mountOnEnter:!0,unmountOnExit:!0,children:e.jsxs(R,{component:"form",onSubmit:d,noValidate:!0,height:"100%",justifyContent:"space-between",children:[e.jsx(ye,{children:e.jsx(re,{...m("name"),label:i("retailers.developerPage.createApiKeyDialog.nameLabel"),required:!0,inputProps:{"data-testid":"name-input"}})}),e.jsx(fe,{marginTop:"3rem",spacing:"1rem",children:e.jsx(xe,{type:"submit",isLoading:g,"data-testid":"create-api-key-submit-button",children:i("retailers.developerPage.createApiKeyDialog.createButton")})})]})})})},Ae=l.forwardRef((r,p)=>{const{retailerId:s}=r,[h,o]=l.useState(!1),[c,i]=l.useState([]),{t:a}=P("retailer"),u=M(),x=!!c.length,m=S(),d=async()=>{try{o(!0);const t=await oe(s);i(t),o(!1)}catch(t){o(!1),T(t,m)}};l.useImperativeHandle(p,()=>({async refresh(){d()}})),l.useEffect(()=>{d()},[]);const g=t=>()=>{const K=b.RETAILER+b.DEVELOPERS+b.PARTNER_API_KEYS_DETAILS,y=W(K,{retailerId:s,partnerKeyId:t});u.push(y)};return e.jsx(V,{topSeparator:!0,bottomSeparator:!0,children:e.jsxs($,{children:[e.jsx(z,{children:e.jsxs(A,{children:[e.jsx(n,{width:"20%",children:a("retailers.developerPage.partnerKeys.table.createdAt")}),e.jsx(n,{width:"20%",children:a("retailers.developerPage.partnerKeys.table.name")}),e.jsx(n,{children:a("retailers.developerPage.partnerKeys.table.key")})]})}),e.jsx(Y,{isLoading:h,hasNoData:!x,children:c.map(t=>e.jsxs(q,{"data-testid":"partner-api-key-row",onClick:g(t.id),children:[e.jsx(n,{width:"20%",children:t.formatted.createdAt}),e.jsx(n,{width:"20%",translate:"no",children:t.name}),e.jsx(n,{children:a("retailers.developerPage.partnerKeys.table.keyPlaceholder")})]},t.id))})]})})}),Ce=()=>{const[r,p]=l.useState(null),{retailerId:s}=de(),{isOpen:h,onOpen:o,onClose:c}=ce(),{t:i}=P("retailer"),a=l.useRef(null),u=l.useRef(null),x=async()=>{var d,g;if(r==="standard"){(d=a.current)==null||d.refresh();return}(g=u.current)==null||g.refresh()},m=d=>()=>{p(d),o()};return e.jsxs(R,{spacing:"2rem",children:[e.jsxs(D,{icon:e.jsx(pe,{}),title:i("retailers.developerPage.standardKeys.title"),headerRight:e.jsx(I,{title:i("retailers.developerPage.standardKeys.createApiKeyButton"),color:"primary",onClick:m("standard"),"data-testid":"create-api-key-button"}),children:[e.jsx(k,{fontWeight:300,fontSize:"0.875rem",paddingLeft:"1rem",children:e.jsx(v,{ns:"retailer",i18nKey:"retailers.developerPage.standardKeys.description",components:{"info-link":e.jsx(w,{href:C.STANDARD_API_KEY_INFO,target:"_blank"})}})}),e.jsx(me,{ref:a,retailerId:s})]}),e.jsxs(D,{icon:e.jsx(he,{}),title:i("retailers.developerPage.partnerKeys.title"),headerRight:e.jsx(I,{title:i("retailers.developerPage.partnerKeys.createApiKeyButton"),color:"primary",onClick:m("partner"),"data-testid":"create-partner-api-key-button"}),children:[e.jsx(k,{fontWeight:300,fontSize:"0.875rem",paddingLeft:"1rem",children:e.jsx(v,{ns:"retailer",i18nKey:"retailers.developerPage.partnerKeys.description",components:{"info-link":e.jsx(w,{href:C.PARTNERS_API_KEY_INFO,target:"_blank"})}})}),e.jsx(Ae,{ref:u,retailerId:s})]}),e.jsx(Pe,{isOpen:h,type:r,onClose:c,retailerId:s,onFinish:x})]})};export{Ce as ApiKeys,Ce as default};
2//# sourceMappingURL=index-CrvsizCW.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.