Submit
Path:
~
/
/
opt
/
psa
/
admin
/
cp
/
public
/
javascript
/
components
/
pages
/
SummaryReportLayoutsPage
/
File Content:
EditPage.js.map
{"version":3,"file":"javascript/components/pages/SummaryReportLayoutsPage/EditPage.js?21641173740d2d0a3e2b","mappings":"2MAgBA,MA+DA,EA/DqBA,EACjBC,UACAC,UAAS,EACTC,sBAAqB,EACrBC,WAAW,KACXC,UACGC,MAEH,MAAMC,GAAWC,EAAAA,EAAAA,gBACVC,EAAMC,IAAaC,EAAAA,EAAAA,UAAST,GAC7BU,GAAeC,EAAAA,EAAAA,QAA6C,MAE5DC,GAAcC,EAAAA,EAAAA,cAAY,IAAIC,KAChC,MAAMC,EAAUhB,GAAW,KAAOM,EAASH,EAAU,CAAEc,oBAAoB,KAC3ER,GAAU,GACVE,EAAaO,QAAUC,YAAW,KAC9BH,KAAWD,GACXJ,EAAaO,QAAU,IAAI,GAC5B,IAAI,GACR,CAACf,EAAUG,EAAUN,KAExBoB,EAAAA,EAAAA,YAAU,IAAM,KACZT,EAAaO,SAAWG,aAAaV,EAAaO,QAAQ,GAC3D,KAGHE,EAAAA,EAAAA,YAAU,KACDnB,EAEMU,EAAaO,SACpBG,aAAaV,EAAaO,SAF1BT,EAAUR,EAGd,GACD,CAACA,IAEJ,MAAMqB,GAAeC,EAAAA,EAAAA,UAAQ,KACzB,GAAInB,GAAQF,EAAoB,CAC5B,IAAIsB,EAAAA,EAAAA,gBAAepB,GACf,OAAOqB,EAAAA,EAAAA,cAAarB,EAAM,CAEtBsB,UAAWA,IAAIrB,KAEXD,EAAKC,MAAMqB,eAAerB,GAC1BQ,GAAa,IAGlB,GAAoB,iBAATT,EACd,MAAO,IACAA,EACHsB,UAAWA,IAAIrB,KACXD,EAAKsB,eAAerB,GACpBQ,GAAa,EAI7B,CACA,OAAOT,CAAI,GACZ,CAACF,EAAoBW,EAAaT,IAIrC,OAAOuB,EAAAA,EAAAA,KAACC,EAAAA,OAAM,IAAKvB,EAAOD,KAAMkB,E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lB,SAAQ,SAASiB,GAC/B,GAAIA,EAAIjG,KAAM,CACZ,IAAI0F,EAAO,IAAIc,IACfhB,EAA0BS,EAAKP,GAC/BS,EAAeF,EAAIjG,KAAKC,OAASyF,CACnC,CACF,IA0DFe,EAAOC,QAAUrB,EAEboB,EAAOC,QAAP,0BAhDJ,SAAkBrB,EAAKsB,GAErB,IAAIC,EAAS,CACXjB,KAAMN,EAAIM,KACVO,YAAa,CAACE,EAAcf,EAAKsB,KAE/BtB,EAAIwB,eAAe,SACrBD,EAAOtB,IAAMD,EAAIC,KAKnB,IAAIwB,EAASX,EAAeQ,IAAkB,IAAIH,IAC9CO,EAAU,IAAIP,IACdQ,EAAU,IAAIR,IAOlB,IAJAM,EAAO9B,SAAQ,SAASiC,GACtBD,EAAQpB,IAAIqB,EACd,IAEOD,EAAQrG,KAAO,GAAG,CACvB,IAAIuG,EAAWF,EACfA,EAAU,IAAIR,IAEdU,EAASlC,SAAQ,SAASiC,GACnBF,EAAQI,IAAIF,KACfF,EAAQnB,IAAIqB,IACId,EAAec,IAAY,IAAIT,KACrCxB,SAAQ,SAASoC,GACzBJ,EAAQpB,IAAIwB,EACd,IAEJ,GACF,CASA,OAPAL,EAAQ/B,SAAQ,SAASiC,GACvB,IAAII,EAAKjB,EAAcf,EAAK4B,GACxBI,GACFT,EAAOV,YAAYoB,KAAKD,EAE5B,IAEOT,CACT,CAIkDW,CAASlC,EAAK,4B","sources":["webpack:///./components/common/DrawerAsPage.tsx","webpack:///./components/forms/SummaryReportLayoutForm/SummaryReportLayoutForm.js","webpack:///./components/forms/SummaryReportLayoutForm/SummaryReportLayoutSection.js","webpack:///./components/pages/SummaryReportLayoutsPage/EditPage/EditPage.js","webpack:///./helpers/graphql/cache/evictSummaryReportCache.ts","webpack:///./components/pages/SummaryReportLayoutsPage/EditPage/UpdateSummaryReportLayout.graphql"],"sourcesContent":["// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { useCallback, useState, useEffect, useRef, useMemo, isValidElement, cloneElement } from 'react';\nimport { useNavigate, To } from 'react-router-dom';\nimport { Drawer, type DrawerProps } from '@plesk/ui-library';\n\ntype DrawerAsPageProps = DrawerProps & {\n onClose?: (...args: unknown[]) => void;\n isOpen?: boolean;\n closeOnFormSuccess?: boolean;\n closeUrl?: To;\n form?: DrawerProps['form'] & {\n onSuccess?: (...args: unknown[]) => void;\n }\n};\n\nconst DrawerAsPage = ({\n onClose = undefined,\n isOpen = true,\n closeOnFormSuccess = true,\n closeUrl = '..',\n form = undefined,\n ...props\n}: DrawerAsPageProps) => {\n const navigate = useNavigate();\n const [open, setIsOpen] = useState(isOpen);\n const closeTimeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleClose = useCallback((...args: unknown[]) => {\n const closeFn = onClose ?? (() => navigate(closeUrl, { preventScrollReset: true }));\n setIsOpen(false);\n closeTimeout.current = setTimeout(() => {\n closeFn(...args);\n closeTimeout.current = null;\n }, 300);\n }, [closeUrl, navigate, onClose]);\n\n useEffect(() => () => {\n closeTimeout.current && clearTimeout(closeTimeout.current);\n }, []);\n\n // remove timeout if change isOpen directly from props\n useEffect(() => {\n if (!isOpen) {\n setIsOpen(isOpen);\n } else if (closeTimeout.current) {\n clearTimeout(closeTimeout.current);\n }\n }, [isOpen]);\n\n const preparedForm = useMemo(() => {\n if (form && closeOnFormSuccess) {\n if (isValidElement(form)) {\n return cloneElement(form, {\n // @ts-expect-error No overload matches this call\n onSuccess: (...props: unknown[]) => {\n // @ts-expect-error form.props is of type unknown\n form.props.onSuccess?.(...props);\n handleClose();\n },\n });\n } else if (typeof form === 'object') {\n return {\n ...form,\n onSuccess: (...props: unknown[]) => {\n form.onSuccess?.(...props);\n handleClose();\n },\n };\n }\n }\n return form;\n }, [closeOnFormSuccess, handleClose, form]);\n\n\n // eslint-disable-next-line @plesk/plesk/data-type-required\n return <Drawer {...props} form={preparedForm} onClose={handleClose} isOpen={open} />;\n};\n\nexport default DrawerAsPage;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { PropTypes } from 'prop-types';\nimport { FormFieldText, FormFieldCheckbox, Section, setIn, getIn } from '@plesk/ui-library';\nimport { Locale } from 'jsw';\nimport { useState, useCallback } from 'react';\nimport Form from 'components/Form';\nimport SummaryReportLayoutSection from './SummaryReportLayoutSection';\n\nconst Translate = Locale.getTranslate('components.forms.SummaryReport.Layout');\n\nconst SummaryReportLayoutForm = ({\n summaryReportLayout: { __typename, ...summaryReportLayout },\n ...props\n}) => {\n const [values, setValues] = useState(summaryReportLayout);\n\n const handleFieldChange = useCallback((name, value) => {\n setValues(values => setIn(values, name, value));\n }, []);\n\n return (\n <Form\n onFieldChange={handleFieldChange}\n values={values}\n applyButton={false}\n {...props}\n >\n <FormFieldText\n name=\"name\"\n label={<Translate content=\"name\" />}\n size=\"lg\"\n required\n inputProps={{ maxLength: '255' }}\n />\n <FormFieldCheckbox\n name=\"isDefault\"\n label={<Translate content=\"isDefault\" />}\n disabled={getIn(summaryReportLayout, 'isDefault')}\n />\n <Section title={<Translate content=\"sections\" />}>\n <SummaryReportLayoutSection\n section=\"general\"\n values={values}\n handleFieldChange={handleFieldChange}\n isFullTypeSupported={false}\n />\n <SummaryReportLayoutSection\n section=\"resellers\"\n values={values}\n handleFieldChange={handleFieldChange}\n />\n <SummaryReportLayoutSection\n section=\"clients\"\n values={values}\n handleFieldChange={handleFieldChange}\n />\n <SummaryReportLayoutSection\n section=\"personalClients\"\n values={values}\n handleFieldChange={handleFieldChange}\n />\n <SummaryReportLayoutSection\n section=\"domains\"\n values={values}\n handleFieldChange={handleFieldChange}\n />\n <SummaryReportLayoutSection\n section=\"personalDomains\"\n values={values}\n handleFieldChange={handleFieldChange}\n />\n </Section>\n </Form>\n );\n};\n\nSummaryReportLayoutForm.propTypes = {\n summaryReportLayout: PropTypes.object.isRequired,\n};\n\nexport default SummaryReportLayoutForm;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { PropTypes } from 'prop-types';\nimport { Checkbox, FormField, SelectOption, Select, getIn } from '@plesk/ui-library';\nimport { Locale } from 'jsw';\nimport { useState, useEffect } from 'react';\n\nconst Translate = Locale.getTranslate('components.forms.SummaryReport.Layout');\nconst locale = Locale.getSection('components.forms.SummaryReport.Layout');\n\nexport const TYPE_NONE = 'NONE';\nconst TYPE_FULL = 'FULL';\nconst TYPE_SUMMARY = 'SUMMARY';\n\nconst SectionField = ({ section, value, options, handleFieldChange }) => {\n const [isIncluded, setIsIncluded] = useState(value !== TYPE_NONE);\n const [type, setType] = useState(options.includes(value) ? value : options[0]);\n\n useEffect(() => {\n handleFieldChange(section, isIncluded ? type : TYPE_NONE);\n }, [isIncluded, type, handleFieldChange, section]);\n\n return (\n <FormField label={null} name={section}>\n {({ isDisabled }) => (\n <span\n style={{\n display: 'flex',\n flexGrow: '1',\n gap: '4px',\n alignItems: 'center',\n }}\n >\n <Checkbox\n id={`section-${section}-enabled`}\n disabled={isDisabled()}\n checked={isIncluded}\n onChange={setIsIncluded}\n >\n <Translate content={section} />\n </Checkbox>\n <Select\n id={`section-${section}-type`}\n disabled={isDisabled() || !isIncluded}\n value={type}\n onChange={type => {\n setType(type);\n setIsIncluded(true);\n }}\n >\n {options.map(option => (\n <SelectOption key={option} value={option}>{locale.lmsg(`type.${option.toLowerCase()}`)}</SelectOption>\n ))}\n </Select>\n </span>\n )}\n </FormField>\n );\n};\n\nSectionField.propTypes = {\n section: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n options: PropTypes.array.isRequired,\n handleFieldChange: PropTypes.func.isRequired,\n};\n\nconst SummaryReportLayoutSection = ({ section, values, isFullTypeSupported = true, handleFieldChange }) => {\n const value = getIn(values, section);\n return value && (\n <SectionField\n section={section}\n value={value}\n options={isFullTypeSupported ? [TYPE_SUMMARY, TYPE_FULL] : [TYPE_SUMMARY]}\n handleFieldChange={handleFieldChange}\n />\n );\n};\n\nSummaryReportLayoutSection.propTypes = {\n section: PropTypes.string.isRequired,\n isFullTypeSupported: PropTypes.bool,\n values: PropTypes.object.isRequired,\n handleFieldChange: PropTypes.func.isRequired,\n};\n\nexport default SummaryReportLayoutSection;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { Locale } from 'jsw';\nimport DrawerAsPage from 'components/common/DrawerAsPage';\nimport SummaryReportLayoutForm from 'components/forms/SummaryReportLayoutForm';\nimport { useMutation } from '@apollo/client';\nimport { addToast } from 'helpers/toasts';\n\nimport UPDATE_SUMMARY_REPORT_LAYOUT from './UpdateSummaryReportLayout.graphql';\nimport SUMMARY_REPORT_LAYOUTS_PAGE_QUERY from 'queries/SummaryReportLayoutsPage.graphql';\nimport { evictSummaryReportCache } from 'helpers/graphql/cache/evictSummaryReportCache';\n\nconst Translate = Locale.getTranslate('components.pages.SummaryReport.Layout');\n\nconst EditPage = props => {\n const [update] = useMutation(UPDATE_SUMMARY_REPORT_LAYOUT, {\n refetchQueries: [SUMMARY_REPORT_LAYOUTS_PAGE_QUERY],\n onCompleted(_, { variables: { input: { name } } }) {\n addToast({\n intent: 'success',\n message: <Translate content=\"success\" params={{ name: <b>{name}</b> }} />,\n });\n },\n awaitRefetchQueries: true,\n update: evictSummaryReportCache,\n });\n\n const mutation = ({ variables: { input: { id, ...input } } }) => update({ variables: { id, input } });\n\n return (\n <DrawerAsPage\n isOpen\n data-type=\"summary-report-layout-properties-drawer\"\n title={<Translate content=\"title\" />}\n size=\"sm\"\n form={\n <SummaryReportLayoutForm\n mutation={mutation}\n {...props}\n />\n }\n />\n );\n};\nexport default EditPage;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { ApolloCache, DefaultContext } from '@apollo/client';\n\nexport const evictSummaryReportCache = (cache: ApolloCache<DefaultContext>) => {\n Object.values(cache.extract())\n .filter((entity: { __typename: string }) => entity.__typename === 'SummaryReportLayout')\n .forEach(summaryReport => cache.evict({\n id: cache.identify(summaryReport),\n fieldName: 'data',\n }));\n};\n","\n var doc = {\"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 doc.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}};\n \n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n \n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"UpdateSummaryReportLayout\"] = oneQuery(doc, \"UpdateSummaryReportLayout\");\n \n"],"names":["DrawerAsPage","onClose","isOpen","closeOnFormSuccess","closeUrl","form","props","navigate","useNavigate","open","setIsOpen","useState","closeTimeout","useRef","handleClose","useCallback","args","closeFn","preventScrollReset","current","setTimeout","useEffect","clearTimeout","preparedForm","useMemo","isValidElement","cloneElement","onSuccess","_jsx","Drawer","Translate","Locale","getTranslate","SummaryReportLayoutForm","summaryReportLayout","__typename","values","setValues","handleFieldChange","name","value","setIn","_jsxs","Form","onFieldChange","applyButton","children","FormFieldText","label","content","size","required","inputProps","maxLength","FormFieldCheckbox","disabled","getIn","Section","title","SummaryReportLayoutSection","section","isFullTypeSupported","propTypes","PropTypes","object","isRequired","locale","getSection","TYPE_NONE","TYPE_SUMMARY","SectionField","options","isIncluded","setIsIncluded","type","setType","includes","FormField","isDisabled","style","display","flexGrow","gap","alignItems","Checkbox","id","checked","onChange","Select","map","option","SelectOption","lmsg","toLowerCase","string","array","func","bool","update","useMutation","UPDATE_SUMMARY_REPORT_LAYOUT","refetchQueries","SUMMARY_REPORT_LAYOUTS_PAGE_QUERY","onCompleted","_","variables","input","addToast","intent","message","params","awaitRefetchQueries","evictSummaryReportCache","mutation","cache","Object","extract","filter","entity","forEach","summaryReport","evict","identify","fieldName","doc","loc","source","collectFragmentReferences","node","refs","kind","add","selectionSet","selections","selection","variableDefinitions","def","definitions","definitionRefs","findOperation","i","length","element","Set","module","exports","operationName","newDoc","hasOwnProperty","opRefs","allRefs","newRefs","refName","prevRefs","has","childRef","op","push","oneQuery"],"sourceRoot":""}
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
AddPage.js
7320 bytes
0644
AddPage.js.map
25709 bytes
0644
EditPage.js
7562 bytes
0644
EditPage.js.map
26157 bytes
0644
N4ST4R_ID | Naxtarrr