PageSourceSearch

https://tampouloukia.gr/cp/javascript/components/pages/SummaryRepo…/EditPage.js?40f7a126ed29119c8e88

js tampouloukia.gr collected 2026-10-02 10:52:06 UTC 7,514 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/SummaryReportLayoutsPage/EditPage"],{1526(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>o});var a=t(396),i=t(715),s=t(397);const o=({onClose:e,isOpen:n=!0,closeOnFormSuccess:t=!0,closeUrl:o="..",form:r,...l})=>{const u=(0,i.useNavigate)(),[d,c]=(0,a.useState)(n),p=(0,a.useRef)(null),m=(0,a.useCallback)((...n)=>{const t=e??(()=>u(o,{preventScrollReset:!0}));c(!1),p.current=setTimeout(()=>{t(...n),p.current=null},300)},[o,u,e]);(0,a.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,a.useEffect)(()=>{n?p.current&&clearTimeout(p.current):c(n)},[n]);const f=(0,a.useMemo)(()=>{if(r&&t){if((0,a.isValidElement)(r))return(0,a.cloneElement)(r,{onSuccess:(...e)=>{r.props.onSuccess?.(...e),m()}});if("object"==typeof r)return{...r,onSuccess:(...e)=>{r.onSuccess?.(...e),m()}}}return r},[t,m,r]);return(0,a.jsx)(s.Drawer,{...l,form:f,onClose:m,isOpen:d})}},2888(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var a=t(787),i=t(397),s=t(95),o=t(396),r=t(1371),l=t(2889);const u=s.Locale.getTranslate("components.forms.SummaryReport.Layout"),d=({summaryReportLayout:{__typename:e,...n},...t})=>{const[a,s]=(0,o.useState)(n),d=(0,o.useCallback)((e,n)=>{s(t=>(0,i.setIn)(t,e,n))},[]);return(0,o.jsxs)(r.default,{onFieldChange:d,values:a,applyButton:!1,...t,children:[(0,o.jsx)(i.FormFieldText,{name:"name",label:(0,o.jsx)(u,{content:"name"}),size:"lg",required:!0,inputProps:{maxLength:"255"}}),(0,o.jsx)(i.FormFieldCheckbox,{name:"isDefault",label:(0,o.jsx)(u,{content:"isDefault"}),disabled:(0,i.getIn)(n,"isDefault")}),(0,o.jsxs)(i.Section,{title:(0,o.jsx)(u,{content:"sections"}),children:[(0,o.jsx)(l.default,{section:"general",values:a,handleFieldChange:d,isFullTypeSupported:!1}),(0,o.jsx)(l.default,{section:"resellers",values:a,handleFieldChange:d}),(0,o.jsx)(l.default,{section:"clients",values:a,handleFieldChange:d}),(0,o.jsx)(l.default,{section:"personalClients",values:a,handleFieldChange:d}),(0,o.jsx)(l.default,{section:"domains",values:a,handleFieldChange:d}),(0,o.jsx)(l.default,{section:"personalDomains",values:a,handleFieldChange:d})]})]})};d.propTypes={summaryReportLayout:a.PropTypes.object.isRequired};const c=d},2889(e,n,t){"use strict";t.r(n),t.d(n,{TYPE_NONE:()=>u,default:()=>m});var a=t(787),i=t(397),s=t(95),o=t(396);const r=s.Locale.getTranslate("components.forms.SummaryReport.Layout"),l=s.Locale.getSection("components.forms.SummaryReport.Layout"),u="NONE",d="SUMMARY",c=({section:e,value:n,options:t,handleFieldChange:a})=>{const[s,d]=(0,o.useState)(n!==u),[c,p]=(0,o.useState)(t.includes(n)?n:t[0]);return(0,o.useEffect)(()=>{a(e,s?c:u)},[s,c,a,e]),(0,o.jsx)(i.FormField,{label:null,name:e,children:({isDisabled:n})=>(0,o.jsxs)("span",{style:{display:"flex",flexGrow:"1",gap:"4px",alignItems:"center"},children:[(0,o.jsx)(i.Checkbox,{id:`section-${e}-enabled`,disabled:n(),checked:s,onChange:d,children:(0,o.jsx)(r,{content:e})}),(0,o.jsx)(i.Select,{id:`section-${e}-type`,disabled:n()||!s,value:c,onChange:e=>{p(e),d(!0)},children:t.map(e=>(0,o.jsx)(i.SelectOption,{value:e,children:l.lmsg(`type.${e.toLowerCase()}`)},e))})]})})};c.propTypes={section:a.PropTypes.string.isRequired,value:a.PropTypes.string.isRequired,options:a.PropTypes.array.isRequired,handleFieldChange:a.PropTypes.func.isRequired};const p=({section:e,values:n,isFullTypeSupported:t=!0,handleFieldChange:a})=>{const s=(0,i.getIn)(n,e);return s&&(0,o.jsx)(c,{section:e,value:s,options:t?[d,"FULL"]:[d],handleFieldChange:a})};p.propTypes={section:a.PropTypes.string.isRequired,isFullTypeSupported:a.PropTypes.bool,values:a.PropTypes.object.isRequired,handleFieldChange:a.PropTypes.func.isRequired};const m=p},2887(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>a.default});var a=t(2888)},2892(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>y});var a=t(95),i=t(1526),s=t(2887),o=t(810),r=t(663),l=t(2893),u=t.n(l),d=t(1265),c=t.n(d),p=t(2894),m=t(396);const f=a.Locale.getTranslate("components.pages.SummaryReport.Layout"),y=e=>{const[n]=(0,o.useMutation)(u(),{refetchQueries:[c()],onCompleted(e,{variables:{input:{name:n}}}){(0,r.addToast)({intent:"success",message:(0,m.jsx)(f,{content:"success",params:{name:(0,m.jsx)("b",{children:n})}})})},awaitRefetchQueries:!0,update:p.evictSummaryReportCache});return(0,m.jsx)(i.default,{isOpen:!0,"data-type":"summary-report-layout-properties-drawer",title:(0,m.jsx)(f,{content:"title"}),size:"sm",form:(0,m.jsx)(s.default,{mutation:({variables:{input:{id:e,...t}}})=>n({variables:{id:e,input:t}}),...e})})}}
1,2891(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>a.default});var a=t(2892)},2894(e,n,t){"use strict";t.r(n),t.d(n,{evictSummaryReportCache:()=>a});const a=e=>{Object.values(e.extract()).filter(e=>"SummaryReportLayout"===e.__typename).forEach(n=>e.evict({id:e.identify(n),fieldName:"data"}))}},2893(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSummaryReportLayout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SummaryReportLayoutInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSummaryReportLayout"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"summaryReportLayout"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:229}};n.loc.source={body:"mutation UpdateSummaryReportLayout(\n    $id: ID!,\n    $input: SummaryReportLayoutInput!,\n) {\n    updateSummaryReportLayout(id: $id, input: $input) {\n        summaryReportLayout {\n            id\n            name\n        }\n    }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var a={};function i(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.UpdateSummaryReportLayout=function(e,n){var t={kind:e.kind,definitions:[i(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=a[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var a=i(e,n);a&&t.definitions.push(a)}),t}(n,"UpdateSummaryReportLayout")}}]);
2//# sourceMappingURL=EditPage.js.map?40f7a126ed29119c8e88

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.