@payloadcms/ui 3.0.0-beta.107 → 3.0.0-beta.108
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.
- package/dist/elements/BulkUpload/ActionsBar/index.js +2 -2
- package/dist/elements/BulkUpload/ActionsBar/index.js.map +1 -1
- package/dist/elements/BulkUpload/EditForm/index.js +3 -1
- package/dist/elements/BulkUpload/EditForm/index.js.map +1 -1
- package/dist/elements/BulkUpload/FormsManager/index.js +3 -1
- package/dist/elements/BulkUpload/FormsManager/index.js.map +1 -1
- package/dist/elements/Button/types.d.ts +6 -0
- package/dist/elements/Button/types.d.ts.map +1 -1
- package/dist/elements/Button/types.js.map +1 -1
- package/dist/elements/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/elements/CodeEditor/CodeEditor.js +51 -25
- package/dist/elements/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/elements/CodeEditor/index.d.ts.map +1 -1
- package/dist/elements/CodeEditor/index.js +2 -8
- package/dist/elements/CodeEditor/index.js.map +1 -1
- package/dist/elements/ColumnSelector/index.d.ts.map +1 -1
- package/dist/elements/ColumnSelector/index.js +14 -2
- package/dist/elements/ColumnSelector/index.js.map +1 -1
- package/dist/elements/DocumentControls/index.d.ts +4 -1
- package/dist/elements/DocumentControls/index.d.ts.map +1 -1
- package/dist/elements/DocumentControls/index.js +42 -6
- package/dist/elements/DocumentControls/index.js.map +1 -1
- package/dist/elements/DocumentControls/index.scss +8 -0
- package/dist/elements/DocumentDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerContent.js +23 -17
- package/dist/elements/DocumentDrawer/DrawerContent.js.map +1 -1
- package/dist/elements/DocumentDrawer/types.d.ts +4 -1
- package/dist/elements/DocumentDrawer/types.d.ts.map +1 -1
- package/dist/elements/DocumentDrawer/types.js.map +1 -1
- package/dist/elements/EditMany/index.d.ts.map +1 -1
- package/dist/elements/EditMany/index.js +235 -124
- package/dist/elements/EditMany/index.js.map +1 -1
- package/dist/elements/Hamburger/index.scss +4 -0
- package/dist/elements/ListControls/index.d.ts.map +1 -1
- package/dist/elements/ListControls/index.js +9 -5
- package/dist/elements/ListControls/index.js.map +1 -1
- package/dist/elements/ListControls/index.scss +0 -6
- package/dist/elements/ListDrawer/DrawerContent.d.ts +2 -0
- package/dist/elements/ListDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/elements/ListDrawer/DrawerContent.js +3 -3
- package/dist/elements/ListDrawer/DrawerContent.js.map +1 -1
- package/dist/elements/ListDrawer/index.d.ts.map +1 -1
- package/dist/elements/ListDrawer/index.js +18 -15
- package/dist/elements/ListDrawer/index.js.map +1 -1
- package/dist/elements/ListDrawer/types.d.ts +2 -0
- package/dist/elements/ListDrawer/types.d.ts.map +1 -1
- package/dist/elements/ListDrawer/types.js.map +1 -1
- package/dist/elements/Localizer/LocalizerLabel/index.d.ts.map +1 -1
- package/dist/elements/Localizer/LocalizerLabel/index.js +9 -5
- package/dist/elements/Localizer/LocalizerLabel/index.js.map +1 -1
- package/dist/elements/Localizer/LocalizerLabel/index.scss +7 -3
- package/dist/elements/Locked/index.d.ts +8 -0
- package/dist/elements/Locked/index.d.ts.map +1 -0
- package/dist/elements/Locked/index.js +72 -0
- package/dist/elements/Locked/index.js.map +1 -0
- package/dist/elements/Locked/index.scss +14 -0
- package/dist/elements/Pagination/index.d.ts.map +1 -1
- package/dist/elements/Pagination/index.js +1 -1
- package/dist/elements/Pagination/index.js.map +1 -1
- package/dist/elements/PerPage/index.d.ts +5 -5
- package/dist/elements/PerPage/index.d.ts.map +1 -1
- package/dist/elements/PerPage/index.js +2 -1
- package/dist/elements/PerPage/index.js.map +1 -1
- package/dist/elements/Pill/index.scss +3 -1
- package/dist/elements/PreviewButton/usePreviewURL.d.ts.map +1 -1
- package/dist/elements/PreviewButton/usePreviewURL.js +11 -3
- package/dist/elements/PreviewButton/usePreviewURL.js.map +1 -1
- package/dist/elements/PublishButton/index.d.ts.map +1 -1
- package/dist/elements/PublishButton/index.js +97 -46
- package/dist/elements/PublishButton/index.js.map +1 -1
- package/dist/elements/PublishMany/index.js +2 -1
- package/dist/elements/PublishMany/index.js.map +1 -1
- package/dist/elements/ReactSelect/index.scss +4 -0
- package/dist/elements/RelationshipTable/TableWrapper.d.ts +8 -0
- package/dist/elements/RelationshipTable/TableWrapper.d.ts.map +1 -0
- package/dist/elements/RelationshipTable/TableWrapper.js +69 -0
- package/dist/elements/RelationshipTable/TableWrapper.js.map +1 -0
- package/dist/elements/RelationshipTable/cells/DrawerLink/index.d.ts +8 -0
- package/dist/elements/RelationshipTable/cells/DrawerLink/index.d.ts.map +1 -0
- package/dist/elements/RelationshipTable/cells/DrawerLink/index.js +82 -0
- package/dist/elements/RelationshipTable/cells/DrawerLink/index.js.map +1 -0
- package/dist/elements/RelationshipTable/cells/DrawerLink/index.scss +4 -0
- package/dist/elements/RelationshipTable/index.d.ts +15 -0
- package/dist/elements/RelationshipTable/index.d.ts.map +1 -0
- package/dist/elements/RelationshipTable/index.js +445 -0
- package/dist/elements/RelationshipTable/index.js.map +1 -0
- package/dist/elements/RelationshipTable/index.scss +26 -0
- package/dist/elements/SelectRow/index.d.ts.map +1 -1
- package/dist/elements/SelectRow/index.js +60 -29
- package/dist/elements/SelectRow/index.js.map +1 -1
- package/dist/elements/SortColumn/index.d.ts +1 -0
- package/dist/elements/SortColumn/index.d.ts.map +1 -1
- package/dist/elements/SortColumn/index.js +29 -17
- package/dist/elements/SortColumn/index.js.map +1 -1
- package/dist/elements/SortColumn/index.scss +10 -1
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.d.ts +2 -3
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.d.ts.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.js +43 -40
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.scss +0 -3
- package/dist/elements/Table/DefaultCell/fields/index.d.ts +1 -0
- package/dist/elements/Table/DefaultCell/fields/index.d.ts.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/index.js +1 -0
- package/dist/elements/Table/DefaultCell/fields/index.js.map +1 -1
- package/dist/elements/Table/RenderCell.d.ts +11 -0
- package/dist/elements/Table/RenderCell.d.ts.map +1 -0
- package/dist/elements/Table/RenderCell.js +30 -0
- package/dist/elements/Table/RenderCell.js.map +1 -0
- package/dist/elements/Table/index.d.ts +3 -6
- package/dist/elements/Table/index.d.ts.map +1 -1
- package/dist/elements/Table/index.js +36 -31
- package/dist/elements/Table/index.js.map +1 -1
- package/dist/elements/Table/index.scss +50 -0
- package/dist/elements/TableColumns/buildColumnState.d.ts +5 -2
- package/dist/elements/TableColumns/buildColumnState.d.ts.map +1 -1
- package/dist/elements/TableColumns/buildColumnState.js +35 -22
- package/dist/elements/TableColumns/buildColumnState.js.map +1 -1
- package/dist/elements/TableColumns/index.d.ts +5 -0
- package/dist/elements/TableColumns/index.d.ts.map +1 -1
- package/dist/elements/TableColumns/index.js +107 -74
- package/dist/elements/TableColumns/index.js.map +1 -1
- package/dist/elements/Tooltip/index.d.ts +1 -0
- package/dist/elements/Tooltip/index.d.ts.map +1 -1
- package/dist/elements/Tooltip/index.js +15 -13
- package/dist/elements/Tooltip/index.js.map +1 -1
- package/dist/elements/Tooltip/index.scss +2 -2
- package/dist/elements/UnpublishMany/index.js +2 -1
- package/dist/elements/UnpublishMany/index.js.map +1 -1
- package/dist/elements/WhereBuilder/Condition/index.js +32 -30
- package/dist/elements/WhereBuilder/Condition/index.js.map +1 -1
- package/dist/exports/client/{CodeEditor-CHKRX3U2.js → CodeEditor-CXCLJBIQ.js} +6 -4
- package/dist/exports/client/CodeEditor-CXCLJBIQ.js.map +8 -0
- package/dist/exports/client/{DatePicker-OLRZVTAD.js → DatePicker-NBYDOP2X.js} +2 -2
- package/dist/exports/client/{chunk-JINNHJP7.js → chunk-6MRITTMD.js} +3 -3
- package/dist/exports/client/{chunk-JINNHJP7.js.map → chunk-6MRITTMD.js.map} +4 -4
- package/dist/exports/client/chunk-W2YIQDPJ.js +14 -0
- package/dist/exports/client/{chunk-BGA6EPOL.js.map → chunk-W2YIQDPJ.js.map} +2 -2
- package/dist/exports/client/index.d.ts +1 -0
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +19 -19
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/shared/index.js +2 -2
- package/dist/exports/shared/index.js.map +2 -2
- package/dist/fields/Array/ArrayRow.js +2 -2
- package/dist/fields/Array/ArrayRow.js.map +1 -1
- package/dist/fields/Blocks/BlockRow.js +2 -2
- package/dist/fields/Blocks/BlockRow.js.map +1 -1
- package/dist/fields/Collapsible/index.d.ts +16 -16
- package/dist/fields/Collapsible/index.d.ts.map +1 -1
- package/dist/fields/Group/index.js +2 -2
- package/dist/fields/Group/index.js.map +1 -1
- package/dist/fields/Join/index.d.ts +9 -0
- package/dist/fields/Join/index.d.ts.map +1 -0
- package/dist/fields/Join/index.js +75 -0
- package/dist/fields/Join/index.js.map +1 -0
- package/dist/fields/Password/index.js +29 -25
- package/dist/fields/Password/index.js.map +1 -1
- package/dist/fields/Relationship/select-components/SingleValue/index.d.ts.map +1 -1
- package/dist/fields/Relationship/select-components/SingleValue/index.js +11 -13
- package/dist/fields/Relationship/select-components/SingleValue/index.js.map +1 -1
- package/dist/fields/Row/index.scss +3 -0
- package/dist/fields/Textarea/index.d.ts.map +1 -1
- package/dist/fields/Textarea/index.js +2 -0
- package/dist/fields/Textarea/index.js.map +1 -1
- package/dist/fields/Upload/RelationshipContent/index.js +28 -29
- package/dist/fields/Upload/RelationshipContent/index.js.map +1 -1
- package/dist/fields/Upload/UploadCard/index.scss +0 -1
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.js +2 -0
- package/dist/fields/index.js.map +1 -1
- package/dist/forms/Form/index.js +6 -2
- package/dist/forms/Form/index.js.map +1 -1
- package/dist/forms/NullifyField/index.d.ts.map +1 -1
- package/dist/forms/NullifyField/index.js +1 -0
- package/dist/forms/NullifyField/index.js.map +1 -1
- package/dist/forms/RenderFields/RenderField.d.ts.map +1 -1
- package/dist/forms/RenderFields/RenderField.js +3 -1
- package/dist/forms/RenderFields/RenderField.js.map +1 -1
- package/dist/forms/RenderFields/index.d.ts.map +1 -1
- package/dist/forms/RenderFields/index.js +18 -15
- package/dist/forms/RenderFields/index.js.map +1 -1
- package/dist/forms/buildStateFromSchema/addFieldStatePromise.d.ts.map +1 -1
- package/dist/forms/buildStateFromSchema/addFieldStatePromise.js +3 -4
- package/dist/forms/buildStateFromSchema/addFieldStatePromise.js.map +1 -1
- package/dist/forms/buildStateFromSchema/index.d.ts +2 -0
- package/dist/forms/buildStateFromSchema/index.d.ts.map +1 -1
- package/dist/forms/buildStateFromSchema/index.js.map +1 -1
- package/dist/forms/useField/index.js +203 -111
- package/dist/forms/useField/index.js.map +1 -1
- package/dist/hooks/useDelay.js +48 -15
- package/dist/hooks/useDelay.js.map +1 -1
- package/dist/hooks/useDelayedRender.js +71 -32
- package/dist/hooks/useDelayedRender.js.map +1 -1
- package/dist/hooks/usePayloadAPI.d.ts.map +1 -1
- package/dist/hooks/usePayloadAPI.js.map +1 -1
- package/dist/icons/Chevron/index.d.ts +3 -3
- package/dist/icons/Chevron/index.d.ts.map +1 -1
- package/dist/icons/Chevron/index.js +4 -4
- package/dist/icons/Chevron/index.js.map +1 -1
- package/dist/icons/Chevron/index.scss +9 -1
- package/dist/icons/Lock/index.d.ts +6 -0
- package/dist/icons/Lock/index.d.ts.map +1 -0
- package/dist/icons/Lock/index.js +27 -0
- package/dist/icons/Lock/index.js.map +1 -0
- package/dist/icons/Lock/index.scss +8 -0
- package/dist/providers/Config/createClientConfig/collections.d.ts.map +1 -1
- package/dist/providers/Config/createClientConfig/collections.js +11 -1
- package/dist/providers/Config/createClientConfig/collections.js.map +1 -1
- package/dist/providers/Config/createClientConfig/fields.d.ts.map +1 -1
- package/dist/providers/Config/createClientConfig/fields.js +3 -0
- package/dist/providers/Config/createClientConfig/fields.js.map +1 -1
- package/dist/providers/DocumentInfo/index.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/index.js +109 -8
- package/dist/providers/DocumentInfo/index.js.map +1 -1
- package/dist/providers/DocumentInfo/types.d.ts +32 -27
- package/dist/providers/DocumentInfo/types.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/types.js.map +1 -1
- package/dist/providers/ListQuery/index.d.ts +5 -5
- package/dist/providers/ListQuery/index.d.ts.map +1 -1
- package/dist/providers/ListQuery/index.js.map +1 -1
- package/dist/providers/Preferences/index.js +3 -1
- package/dist/providers/Preferences/index.js.map +1 -1
- package/dist/providers/Root/index.d.ts.map +1 -1
- package/dist/providers/Root/index.js +2 -1
- package/dist/providers/Root/index.js.map +1 -1
- package/dist/providers/Selection/index.d.ts +2 -1
- package/dist/providers/Selection/index.d.ts.map +1 -1
- package/dist/providers/Selection/index.js +23 -8
- package/dist/providers/Selection/index.js.map +1 -1
- package/dist/providers/Translation/index.d.ts.map +1 -1
- package/dist/providers/Translation/index.js +5 -7
- package/dist/providers/Translation/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/buildFormState.d.ts +9 -3
- package/dist/utilities/buildFormState.d.ts.map +1 -1
- package/dist/utilities/buildFormState.js +82 -4
- package/dist/utilities/buildFormState.js.map +1 -1
- package/dist/utilities/deepMerge.d.ts +12 -0
- package/dist/utilities/deepMerge.d.ts.map +1 -0
- package/dist/utilities/deepMerge.js +25 -0
- package/dist/utilities/deepMerge.js.map +1 -0
- package/dist/utilities/getFormState.d.ts +8 -2
- package/dist/utilities/getFormState.d.ts.map +1 -1
- package/dist/utilities/getFormState.js +3 -1
- package/dist/utilities/getFormState.js.map +1 -1
- package/package.json +15 -15
- package/dist/exports/client/CodeEditor-CHKRX3U2.js.map +0 -8
- package/dist/exports/client/chunk-BGA6EPOL.js +0 -14
- /package/dist/exports/client/{DatePicker-OLRZVTAD.js.map → DatePicker-NBYDOP2X.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCollapsible","ErrorPill","useFieldProps","useFormInitializing","useFormProcessing","useFormSubmitted","RenderFields","useField","withCondition","RenderComponent","useTranslation","FieldDescription","useRow","fieldBaseClass","useTabs","GroupProvider","useGroup","baseClass","GroupFieldComponent","props","$","descriptionProps","field","t0","readOnly","readOnlyFromTopLevelProps","admin","t1","fields","label","t2","undefined","className","description","hideGutter","readOnlyFromAdmin","style","width","readOnlyFromProps","path","permissions","readOnlyFromContext","schemaPath","i18n","isWithinCollapsible","isWithinGroup","isWithinRow","isWithinTab","t3","errorPaths","formInitializing","formProcessing","submitted","errorCount","length","fieldHasErrors","disabled","isTopLevel","t4","t5","t6","t7","t8","t9","t10","t11","filter","Boolean","t12","join","t13","replace","t14","t15","components","Label","Description","_jsxs","children","_jsx","clientProps","mappedComponent","t16","count","withMessage","id","margins","GroupField"],"sources":["../../../src/fields/Group/index.tsx"],"sourcesContent":["'use client'\n\nimport type { GroupFieldClientComponent } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport { useCollapsible } from '../../elements/Collapsible/provider.js'\nimport { ErrorPill } from '../../elements/ErrorPill/index.js'\nimport { useFieldProps } from '../../forms/FieldPropsProvider/index.js'\nimport {\n useFormInitializing,\n useFormProcessing,\n useFormSubmitted,\n} from '../../forms/Form/context.js'\nimport { RenderFields } from '../../forms/RenderFields/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { RenderComponent } from '../../providers/Config/RenderComponent.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { FieldDescription } from '../FieldDescription/index.js'\nimport { useRow } from '../Row/provider.js'\nimport { fieldBaseClass } from '../shared/index.js'\nimport { useTabs } from '../Tabs/provider.js'\nimport './index.scss'\nimport { GroupProvider, useGroup } from './provider.js'\n\nconst baseClass = 'group-field'\n\nexport const GroupFieldComponent: GroupFieldClientComponent = (props) => {\n const {\n descriptionProps,\n field,\n field: {\n admin: { className, description, hideGutter, readOnly: readOnlyFromAdmin, style, width } = {},\n fields,\n label,\n },\n readOnly: readOnlyFromTopLevelProps,\n } = props\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const { path, permissions, readOnly: readOnlyFromContext, schemaPath } = useFieldProps()\n const { i18n } = useTranslation()\n const { isWithinCollapsible } = useCollapsible()\n const isWithinGroup = useGroup()\n const isWithinRow = useRow()\n const isWithinTab = useTabs()\n const { errorPaths } = useField({ path })\n const formInitializing = useFormInitializing()\n const formProcessing = useFormProcessing()\n const submitted = useFormSubmitted()\n const errorCount = errorPaths.length\n const fieldHasErrors = submitted && errorCount > 0\n const disabled = readOnlyFromProps || readOnlyFromContext || formProcessing || formInitializing\n\n const isTopLevel = !(isWithinCollapsible || isWithinGroup || isWithinRow)\n\n return (\n <div\n className={[\n fieldBaseClass,\n baseClass,\n isTopLevel && `${baseClass}--top-level`,\n isWithinCollapsible && `${baseClass}--within-collapsible`,\n isWithinGroup && `${baseClass}--within-group`,\n isWithinRow && `${baseClass}--within-row`,\n isWithinTab && `${baseClass}--within-tab`,\n !hideGutter && isWithinGroup && `${baseClass}--gutter`,\n fieldHasErrors && `${baseClass}--has-error`,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n id={`field-${path?.replace(/\\./g, '__')}`}\n style={{\n ...style,\n width,\n }}\n >\n <GroupProvider>\n <div className={`${baseClass}__wrap`}>\n <div className={`${baseClass}__header`}>\n {(field?.admin?.components?.Label ||\n field?.admin?.components?.Description ||\n label) && (\n <header>\n {field?.admin?.components?.Label !== undefined ? (\n <RenderComponent\n clientProps={{ label }}\n mappedComponent={field?.admin?.components?.Label}\n />\n ) : label ? (\n <h3 className={`${baseClass}__title`}>{getTranslation(label, i18n)}</h3>\n ) : null}\n <FieldDescription\n Description={field?.admin?.components?.Description}\n description={description}\n field={field}\n {...(descriptionProps || {})}\n />\n </header>\n )}\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n <RenderFields\n fields={fields}\n margins=\"small\"\n path={path}\n permissions={permissions?.fields}\n readOnly={disabled}\n schemaPath={schemaPath}\n />\n </div>\n </GroupProvider>\n </div>\n )\n}\n\nexport { GroupProvider, useGroup }\n\nexport const GroupField = withCondition(GroupFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,cAAc,QAAQ;AAC/B,SAASC,SAAS,QAAQ;AAC1B,SAASC,aAAa,QAAQ;AAC9B,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,QACX;AACP,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,eAAe,QAAQ;AAChC,SAASC,cAAc,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,MAAM,QAAQ;AACvB,SAASC,cAAc,QAAQ;AAC/B,SAASC,OAAO,QAAQ;AACxB,OAAO;AACP,SAASC,aAAa,EAAEC,QAAQ,QAAQ;AAExC,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,mBAAA,GAAiDC,KAAA;EAAA,MAAAC,CAAA,GAAAvB,EAAA;EAC5D;IAAAwB,gBAAA;IAAAC,KAAA;IAAAA,KAAA,EAAAC,EAAA;IAAAC,QAAA,EAAAC;EAAA,IASIN,KAAA;EANK;IAAAO,KAAA,EAAAC,EAAA;IAAAC,MAAA;IAAAC;EAAA,IAAAN,EAIN;EAAA,IAAAO,EAAA;EAAA,IAAAV,CAAA,QAAAO,EAAA;IAHQG,EAAA,GAAAH,EAAsF,KAAAI,SAAA,QAAtFJ,EAAsF;IAAAP,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAU,EAAA;EAAA;IAAAA,EAAA,GAAAV,CAAA;E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3B,cAAA,IAAkBwB,IAAA,CAAA9E,SAAA;QAAAkF,KAAA,EAAkB9B,UAAA;QAAAV,IAAA;QAAAyC,WAAA;MAAA,C;;;;;;;;IA5C7CZ,GAAA,GAAAO,IAAA,CAAC;MAAA/C,SAAA,EACYoC,GAaH;MAAAiB,EAAA,EACJf,GAAqC;MAAAlC,KAAA;QAAA,GAEpCA,KAAK;QAAAC;MAAA;MAAAyC,QAAA,EAIVC,IAAA,CAAAhE,aAAA;QAAA+D,QAAA,EACED,KAAA,CAAC;UAAA7C,SAAA,EAAe,GAAAf,SAAA,QAAoB;UAAA6D,QAAA,GAClCD,KAAA,CAAC;YAAA7C,SAAA,EAAe,GAAAf,SAAA,UAAsB;YAAA6D,QAAA,GAClCL,G,EAoBDS,G;cAEHH,IAAA,CAAAzE,YAAA;YAAAsB,MAAA;YAAA0D,OAAA,EAEU;YAAA/C,IAAA;YAAAC,WAAA,EAEKA,WAAA,EAAAZ,MAAA;YAAAJ,QAAA,EACHgC,QAAA;YAAAd;UAAA,C;;;;;;;;;;;;;;;;;;;;;;;;SAnDlB8B,G;CA0DJ;AAEA,SAASzD,aAAa,EAAEC,QAAQ;AAEhC,OAAO,MAAMuE,UAAA,GAAa/E,aAAA,CAAcU,mBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCollapsible","ErrorPill","useFieldProps","useFormInitializing","useFormProcessing","useFormSubmitted","RenderFields","useField","withCondition","RenderComponent","useTranslation","FieldDescription","useRow","fieldBaseClass","useTabs","GroupProvider","useGroup","baseClass","GroupFieldComponent","props","$","descriptionProps","field","t0","readOnly","readOnlyFromTopLevelProps","admin","t1","fields","label","t2","undefined","className","description","hideGutter","readOnlyFromAdmin","style","width","readOnlyFromProps","path","permissions","readOnlyFromContext","schemaPath","i18n","isWithinCollapsible","isWithinGroup","isWithinRow","isWithinTab","t3","errorPaths","formInitializing","formProcessing","submitted","errorCount","length","fieldHasErrors","disabled","isTopLevel","t4","t5","t6","t7","t8","t9","t10","t11","filter","Boolean","t12","join","t13","replace","t14","t15","components","Label","Description","_jsxs","children","_jsx","clientProps","mappedComponent","t16","count","withMessage","id","margins","GroupField"],"sources":["../../../src/fields/Group/index.tsx"],"sourcesContent":["'use client'\n\nimport type { GroupFieldClientComponent } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport { useCollapsible } from '../../elements/Collapsible/provider.js'\nimport { ErrorPill } from '../../elements/ErrorPill/index.js'\nimport { useFieldProps } from '../../forms/FieldPropsProvider/index.js'\nimport {\n useFormInitializing,\n useFormProcessing,\n useFormSubmitted,\n} from '../../forms/Form/context.js'\nimport { RenderFields } from '../../forms/RenderFields/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { RenderComponent } from '../../providers/Config/RenderComponent.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { FieldDescription } from '../FieldDescription/index.js'\nimport { useRow } from '../Row/provider.js'\nimport { fieldBaseClass } from '../shared/index.js'\nimport { useTabs } from '../Tabs/provider.js'\nimport './index.scss'\nimport { GroupProvider, useGroup } from './provider.js'\n\nconst baseClass = 'group-field'\n\nexport const GroupFieldComponent: GroupFieldClientComponent = (props) => {\n const {\n descriptionProps,\n field,\n field: {\n admin: { className, description, hideGutter, readOnly: readOnlyFromAdmin, style, width } = {},\n fields,\n label,\n },\n readOnly: readOnlyFromTopLevelProps,\n } = props\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const { path, permissions, readOnly: readOnlyFromContext, schemaPath } = useFieldProps()\n const { i18n } = useTranslation()\n const { isWithinCollapsible } = useCollapsible()\n const isWithinGroup = useGroup()\n const isWithinRow = useRow()\n const isWithinTab = useTabs()\n const { errorPaths } = useField({ path })\n const formInitializing = useFormInitializing()\n const formProcessing = useFormProcessing()\n const submitted = useFormSubmitted()\n const errorCount = errorPaths.length\n const fieldHasErrors = submitted && errorCount > 0\n const disabled = readOnlyFromProps || readOnlyFromContext || formProcessing || formInitializing\n\n const isTopLevel = !(isWithinCollapsible || isWithinGroup || isWithinRow)\n\n return (\n <div\n className={[\n fieldBaseClass,\n baseClass,\n isTopLevel && `${baseClass}--top-level`,\n isWithinCollapsible && `${baseClass}--within-collapsible`,\n isWithinGroup && `${baseClass}--within-group`,\n isWithinRow && `${baseClass}--within-row`,\n isWithinTab && `${baseClass}--within-tab`,\n !hideGutter && isWithinGroup && `${baseClass}--gutter`,\n fieldHasErrors && `${baseClass}--has-error`,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n id={`field-${path?.replace(/\\./g, '__')}`}\n style={{\n ...style,\n width,\n }}\n >\n <GroupProvider>\n <div className={`${baseClass}__wrap`}>\n <div className={`${baseClass}__header`}>\n {(field?.admin?.components?.Label ||\n field?.admin?.components?.Description ||\n label) && (\n <header>\n {field?.admin?.components?.Label !== undefined ? (\n <RenderComponent\n clientProps={{ label }}\n mappedComponent={field?.admin?.components?.Label}\n />\n ) : label ? (\n <h3 className={`${baseClass}__title`}>{getTranslation(label, i18n)}</h3>\n ) : null}\n <FieldDescription\n Description={field?.admin?.components?.Description}\n description={description}\n field={field}\n {...(descriptionProps || {})}\n />\n </header>\n )}\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n <RenderFields\n fields={fields}\n margins=\"small\"\n path={path}\n permissions={permissions?.fields}\n readOnly={disabled}\n schemaPath={schemaPath}\n />\n </div>\n </GroupProvider>\n </div>\n )\n}\n\nexport { GroupProvider, useGroup }\n\nexport const GroupField = withCondition(GroupFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,cAAc,QAAQ;AAC/B,SAASC,SAAS,QAAQ;AAC1B,SAASC,aAAa,QAAQ;AAC9B,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBA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A,GAClCL,G,EAoBDS,G;cAEHH,IAAA,CAAAzE,YAAA;YAAAsB,MAAA;YAAA0D,OAAA,EAEU;YAAA/C,IAAA;YAAAC,WAAA,EAEKA,WAAA,EAAAZ,MAAA;YAAAJ,QAAA,EACHgC,QAAA;YAAAd;UAAA,C;;;;;;;;;;;;;;;;;;;;;;;;SAnDlB8B,G;CA0DJ;AAEA,SAASzD,aAAa,EAAEC,QAAQ;AAEhC,OAAO,MAAMuE,UAAA,GAAa/E,aAAA,CAAcU,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JoinFieldClient } from 'payload';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const JoinField: React.FC<Record<string, unknown> & {
|
|
4
|
+
readonly descriptionProps?: import("payload").FieldDescriptionClientProps<Omit<JoinFieldClient, "type"> & Partial<Pick<JoinFieldClient, "type">>>;
|
|
5
|
+
readonly errorProps?: import("payload").FieldErrorClientProps<Omit<JoinFieldClient, "type"> & Partial<Pick<JoinFieldClient, "type">>>;
|
|
6
|
+
readonly field: Omit<JoinFieldClient, "type"> & Partial<Pick<JoinFieldClient, "type">>;
|
|
7
|
+
readonly labelProps?: import("payload").FieldLabelClientProps<Omit<JoinFieldClient, "type"> & Partial<Pick<JoinFieldClient, "type">>>;
|
|
8
|
+
} & import("payload").FormFieldBase>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Join/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAkD,MAAM,SAAS,CAAA;AAE9F,OAAO,KAAkB,MAAM,OAAO,CAAA;AAkEtC,eAAO,MAAM,SAAS;;;;;oCAAoC,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
|
+
import { RelationshipTable } from '../../elements/RelationshipTable/index.js';
|
|
6
|
+
import { FieldLabel } from '../../fields/FieldLabel/index.js';
|
|
7
|
+
import { useFieldProps } from '../../forms/FieldPropsProvider/index.js';
|
|
8
|
+
import { useField } from '../../forms/useField/index.js';
|
|
9
|
+
import { withCondition } from '../../forms/withCondition/index.js';
|
|
10
|
+
import { useDocumentInfo } from '../../providers/DocumentInfo/index.js';
|
|
11
|
+
import { fieldBaseClass } from '../index.js';
|
|
12
|
+
const JoinFieldComponent = props => {
|
|
13
|
+
const {
|
|
14
|
+
field,
|
|
15
|
+
field: {
|
|
16
|
+
name,
|
|
17
|
+
_path: pathFromProps,
|
|
18
|
+
admin: {
|
|
19
|
+
components: {
|
|
20
|
+
Label
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
collection,
|
|
24
|
+
label,
|
|
25
|
+
on
|
|
26
|
+
}
|
|
27
|
+
} = props;
|
|
28
|
+
const {
|
|
29
|
+
id: docID
|
|
30
|
+
} = useDocumentInfo();
|
|
31
|
+
const {
|
|
32
|
+
path: pathFromContext
|
|
33
|
+
} = useFieldProps();
|
|
34
|
+
const {
|
|
35
|
+
value
|
|
36
|
+
} = useField({
|
|
37
|
+
path: pathFromContext ?? pathFromProps ?? name
|
|
38
|
+
});
|
|
39
|
+
const filterOptions = useMemo(() => ({
|
|
40
|
+
[on]: {
|
|
41
|
+
in: [docID || null]
|
|
42
|
+
}
|
|
43
|
+
}), [docID, on]);
|
|
44
|
+
return /*#__PURE__*/_jsx("div", {
|
|
45
|
+
className: [fieldBaseClass, 'join'].filter(Boolean).join(' '),
|
|
46
|
+
children: /*#__PURE__*/_jsx(RelationshipTable, {
|
|
47
|
+
field: field,
|
|
48
|
+
filterOptions: filterOptions,
|
|
49
|
+
initialData: docID && value ? value : {
|
|
50
|
+
docs: []
|
|
51
|
+
},
|
|
52
|
+
initialDrawerState: {
|
|
53
|
+
[on]: {
|
|
54
|
+
initialValue: docID,
|
|
55
|
+
valid: true,
|
|
56
|
+
value: docID
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
Label: /*#__PURE__*/_jsx("h4", {
|
|
60
|
+
style: {
|
|
61
|
+
margin: 0
|
|
62
|
+
},
|
|
63
|
+
children: /*#__PURE__*/_jsx(FieldLabel, {
|
|
64
|
+
as: "span",
|
|
65
|
+
field: field,
|
|
66
|
+
Label: Label,
|
|
67
|
+
label: label
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
relationTo: collection
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
export const JoinField = withCondition(JoinFieldComponent);
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","RelationshipTable","FieldLabel","useFieldProps","useField","withCondition","useDocumentInfo","fieldBaseClass","JoinFieldComponent","props","field","name","_path","pathFromProps","admin","components","Label","collection","label","on","id","docID","path","pathFromContext","value","filterOptions","in","_jsx","className","filter","Boolean","join","initialData","docs","initialDrawerState","initialValue","valid","style","margin","as","relationTo","JoinField"],"sources":["../../../src/fields/Join/index.tsx"],"sourcesContent":["'use client'\n\nimport type { JoinFieldClient, JoinFieldClientComponent, PaginatedDocs, Where } from 'payload'\n\nimport React, { useMemo } from 'react'\n\nimport { RelationshipTable } from '../../elements/RelationshipTable/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useFieldProps } from '../../forms/FieldPropsProvider/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { useDocumentInfo } from '../../providers/DocumentInfo/index.js'\nimport { fieldBaseClass } from '../index.js'\n\nconst JoinFieldComponent: JoinFieldClientComponent = (props) => {\n const {\n field,\n field: {\n name,\n _path: pathFromProps,\n admin: {\n components: { Label },\n },\n collection,\n label,\n on,\n },\n } = props\n\n const { id: docID } = useDocumentInfo()\n\n const { path: pathFromContext } = useFieldProps()\n\n const { value } = useField<PaginatedDocs>({\n path: pathFromContext ?? pathFromProps ?? name,\n })\n\n const filterOptions: Where = useMemo(\n () => ({\n [on]: {\n in: [docID || null],\n },\n }),\n [docID, on],\n )\n\n return (\n <div className={[fieldBaseClass, 'join'].filter(Boolean).join(' ')}>\n <RelationshipTable\n field={field as JoinFieldClient}\n filterOptions={filterOptions}\n initialData={docID && value ? value : ({ docs: [] } as PaginatedDocs)}\n initialDrawerState={{\n [on]: {\n initialValue: docID,\n valid: true,\n value: docID,\n },\n }}\n Label={\n <h4 style={{ margin: 0 }}>\n <FieldLabel as=\"span\" field={field} Label={Label} label={label} />\n </h4>\n }\n relationTo={collection}\n />\n </div>\n )\n}\n\nexport const JoinField = withCondition(JoinFieldComponent)\n"],"mappings":"AAAA;;;AAIA,OAAOA,KAAA,IAASC,OAAO,QAAQ;AAE/B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,UAAU,QAAQ;AAC3B,SAASC,aAAa,QAAQ;AAC9B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,eAAe,QAAQ;AAChC,SAASC,cAAc,QAAQ;AAE/B,MAAMC,kBAAA,GAAgDC,KAAA;EACpD,MAAM;IACJC,KAAK;IACLA,KAAA,EAAO;MACLC,IAAI;MACJC,KAAA,EAAOC,aAAa;MACpBC,KAAA,EAAO;QACLC,UAAA,EAAY;UAAEC;QAAK;MAAE,CACtB;MACDC,UAAU;MACVC,KAAK;MACLC;IAAE;EACH,CACF,GAAGV,KAAA;EAEJ,MAAM;IAAEW,EAAA,EAAIC;EAAK,CAAE,GAAGf,eAAA;EAEtB,MAAM;IAAEgB,IAAA,EAAMC;EAAe,CAAE,GAAGpB,aAAA;EAElC,MAAM;IAAEqB;EAAK,CAAE,GAAGpB,QAAA,CAAwB;IACxCkB,IAAA,EAAMC,eAAA,IAAmBV,aAAA,IAAiBF;EAC5C;EAEA,MAAMc,aAAA,GAAuBzB,OAAA,CAC3B,OAAO;IACL,CAACmB,EAAA,GAAK;MACJO,EAAA,EAAI,CAACL,KAAA,IAAS;IAChB;EACF,IACA,CAACA,KAAA,EAAOF,EAAA,CAAG;EAGb,oBACEQ,IAAA,CAAC;IAAIC,SAAA,EAAW,CAACrB,cAAA,EAAgB,OAAO,CAACsB,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;cAC5D,aAAAJ,IAAA,CAAC1B,iBAAA;MACCS,KAAA,EAAOA,KAAA;MACPe,aAAA,EAAeA,aAAA;MACfO,WAAA,EAAaX,KAAA,IAASG,KAAA,GAAQA,KAAA,GAAS;QAAES,IAAA,EAAM;MAAG;MAClDC,kBAAA,EAAoB;QAClB,CAACf,EAAA,GAAK;UACJgB,YAAA,EAAcd,KAAA;UACde,KAAA,EAAO;UACPZ,KAAA,EAAOH;QACT;MACF;MACAL,KAAA,eACEW,IAAA,CAAC;QAAGU,KAAA,EAAO;UAAEC,MAAA,EAAQ;QAAE;kBACrB,aAAAX,IAAA,CAACzB,UAAA;UAAWqC,EAAA,EAAG;UAAO7B,KAAA,EAAOA,KAAA;UAAOM,KAAA,EAAOA,KAAA;UAAOE,KAAA,EAAOA;;;MAG7DsB,UAAA,EAAYvB;;;AAIpB;AAEA,OAAO,MAAMwB,SAAA,GAAYpC,aAAA,CAAcG,kBAAA","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ import { isFieldRTL } from '../shared/index.js';
|
|
|
13
13
|
import './index.scss';
|
|
14
14
|
import { PasswordInput } from './input.js';
|
|
15
15
|
const PasswordFieldComponent = props => {
|
|
16
|
-
const $ = _c(
|
|
16
|
+
const $ = _c(39);
|
|
17
17
|
const {
|
|
18
18
|
autoComplete,
|
|
19
19
|
errorProps,
|
|
@@ -121,7 +121,7 @@ const PasswordFieldComponent = props => {
|
|
|
121
121
|
const disabled = disabledFromProps || formInitializing || formProcessing;
|
|
122
122
|
const t7 = config.localization || undefined;
|
|
123
123
|
let t8;
|
|
124
|
-
if ($[12] !== rtl || $[13] !== locale || $[14] !== t7 || $[15] !== field || $[16] !==
|
|
124
|
+
if ($[12] !== rtl || $[13] !== locale || $[14] !== t7 || $[15] !== field?.admin?.components?.afterInput || $[16] !== field?.admin?.components?.beforeInput || $[17] !== field?.admin?.components?.Description || $[18] !== field?.admin?.components?.Error || $[19] !== field?.admin?.components?.Label || $[20] !== setValue || $[21] !== value_0 || $[22] !== autoComplete || $[23] !== className || $[24] !== description || $[25] !== errorProps || $[26] !== inputRef || $[27] !== label || $[28] !== labelProps || $[29] !== path || $[30] !== placeholder || $[31] !== disabled || $[32] !== required || $[33] !== showError || $[34] !== style || $[35] !== width) {
|
|
125
125
|
const renderRTL = isFieldRTL({
|
|
126
126
|
fieldLocalized: false,
|
|
127
127
|
fieldRTL: rtl,
|
|
@@ -129,14 +129,14 @@ const PasswordFieldComponent = props => {
|
|
|
129
129
|
localizationConfig: t7
|
|
130
130
|
});
|
|
131
131
|
let t9;
|
|
132
|
-
if ($[
|
|
132
|
+
if ($[37] !== setValue) {
|
|
133
133
|
t9 = e => {
|
|
134
134
|
setValue(e.target.value);
|
|
135
135
|
};
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
136
|
+
$[37] = setValue;
|
|
137
|
+
$[38] = t9;
|
|
138
138
|
} else {
|
|
139
|
-
t9 = $[
|
|
139
|
+
t9 = $[38];
|
|
140
140
|
}
|
|
141
141
|
t8 = _jsx(PasswordInput, {
|
|
142
142
|
afterInput: field?.admin?.components?.afterInput,
|
|
@@ -165,26 +165,30 @@ const PasswordFieldComponent = props => {
|
|
|
165
165
|
$[12] = rtl;
|
|
166
166
|
$[13] = locale;
|
|
167
167
|
$[14] = t7;
|
|
168
|
-
$[15] = field;
|
|
169
|
-
$[16] =
|
|
170
|
-
$[17] =
|
|
171
|
-
$[18] =
|
|
172
|
-
$[19] =
|
|
173
|
-
$[20] =
|
|
174
|
-
$[21] =
|
|
175
|
-
$[22] =
|
|
176
|
-
$[23] =
|
|
177
|
-
$[24] =
|
|
178
|
-
$[25] =
|
|
179
|
-
$[26] =
|
|
180
|
-
$[27] =
|
|
181
|
-
$[28] =
|
|
182
|
-
$[29] =
|
|
183
|
-
$[30] =
|
|
184
|
-
$[31] =
|
|
185
|
-
$[32] =
|
|
168
|
+
$[15] = field?.admin?.components?.afterInput;
|
|
169
|
+
$[16] = field?.admin?.components?.beforeInput;
|
|
170
|
+
$[17] = field?.admin?.components?.Description;
|
|
171
|
+
$[18] = field?.admin?.components?.Error;
|
|
172
|
+
$[19] = field?.admin?.components?.Label;
|
|
173
|
+
$[20] = setValue;
|
|
174
|
+
$[21] = value_0;
|
|
175
|
+
$[22] = autoComplete;
|
|
176
|
+
$[23] = className;
|
|
177
|
+
$[24] = description;
|
|
178
|
+
$[25] = errorProps;
|
|
179
|
+
$[26] = inputRef;
|
|
180
|
+
$[27] = label;
|
|
181
|
+
$[28] = labelProps;
|
|
182
|
+
$[29] = path;
|
|
183
|
+
$[30] = placeholder;
|
|
184
|
+
$[31] = disabled;
|
|
185
|
+
$[32] = required;
|
|
186
|
+
$[33] = showError;
|
|
187
|
+
$[34] = style;
|
|
188
|
+
$[35] = width;
|
|
189
|
+
$[36] = t8;
|
|
186
190
|
} else {
|
|
187
|
-
t8 = $[
|
|
191
|
+
t8 = $[36];
|
|
188
192
|
}
|
|
189
193
|
return t8;
|
|
190
194
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","password","React","useCallback","useField","withCondition","useConfig","useLocale","useTranslation","isFieldRTL","PasswordInput","PasswordFieldComponent","props","$","autoComplete","errorProps","field","t0","inputRef","labelProps","validate","t1","undefined","name","_path","pathFromProps","admin","t2","label","required","t3","className","description","disabled","disabledFromProps","placeholder","rtl","style","width","t","locale","config","t4","value","options","type","data","preferences","fields","req","payload","siblingData","memoizedValidate","t5","t6","path","formInitializing","formProcessing","setValue","showError","value_0","t7","localization","t8","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","password","React","useCallback","useField","withCondition","useConfig","useLocale","useTranslation","isFieldRTL","PasswordInput","PasswordFieldComponent","props","$","autoComplete","errorProps","field","t0","inputRef","labelProps","validate","t1","undefined","name","_path","pathFromProps","admin","t2","label","required","t3","className","description","disabled","disabledFromProps","placeholder","rtl","style","width","t","locale","config","t4","value","options","type","data","preferences","fields","req","payload","siblingData","memoizedValidate","t5","t6","path","formInitializing","formProcessing","setValue","showError","value_0","t7","localization","t8","components","afterInput","beforeInput","Description","Error","Label","renderRTL","fieldLocalized","fieldRTL","localizationConfig","t9","e","target","_jsx","onChange","readOnly","PasswordField"],"sources":["../../../src/fields/Password/index.tsx"],"sourcesContent":["'use client'\nimport type { PasswordFieldValidation, PayloadRequest } from 'payload'\n\nimport { password } from 'payload/shared'\nimport React, { useCallback } from 'react'\n\nimport type { PasswordFieldProps } from './types.js'\n\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { useConfig } from '../../providers/Config/index.js'\nimport { useLocale } from '../../providers/Locale/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { isFieldRTL } from '../shared/index.js'\nimport './index.scss'\nimport { PasswordInput } from './input.js'\n\nconst PasswordFieldComponent: React.FC<PasswordFieldProps> = (props) => {\n const {\n autoComplete,\n errorProps,\n field,\n field: {\n name,\n _path: pathFromProps,\n admin: {\n className,\n description,\n disabled: disabledFromProps,\n placeholder,\n rtl,\n style,\n width,\n } = {} as PasswordFieldProps['field']['admin'],\n label,\n required,\n } = {} as PasswordFieldProps['field'],\n inputRef,\n labelProps,\n validate,\n } = props\n\n const { t } = useTranslation()\n const locale = useLocale()\n const { config } = useConfig()\n\n const memoizedValidate: PasswordFieldValidation = useCallback(\n (value, options) => {\n if (typeof validate === 'function') {\n return validate(value, { ...options, required })\n }\n\n return password(value, {\n name: 'password',\n type: 'text',\n data: {},\n preferences: { fields: {} },\n req: {\n payload: {\n config,\n },\n t,\n } as unknown as PayloadRequest,\n required: true,\n siblingData: {},\n })\n },\n [validate, config, t, required],\n )\n\n const { formInitializing, formProcessing, path, setValue, showError, value } = useField({\n path: pathFromProps || name,\n validate: memoizedValidate,\n })\n\n const disabled = disabledFromProps || formInitializing || formProcessing\n\n const renderRTL = isFieldRTL({\n fieldLocalized: false,\n fieldRTL: rtl,\n locale,\n localizationConfig: config.localization || undefined,\n })\n\n return (\n <PasswordInput\n afterInput={field?.admin?.components?.afterInput}\n autoComplete={autoComplete}\n beforeInput={field?.admin?.components?.beforeInput}\n className={className}\n Description={field?.admin?.components?.Description}\n description={description}\n Error={field?.admin?.components?.Error}\n errorProps={errorProps}\n inputRef={inputRef}\n Label={field?.admin?.components?.Label}\n label={label}\n labelProps={labelProps}\n onChange={(e) => {\n setValue(e.target.value)\n }}\n path={path}\n placeholder={placeholder}\n readOnly={disabled}\n required={required}\n rtl={renderRTL}\n showError={showError}\n style={style}\n value={(value as string) || ''}\n width={width}\n />\n )\n}\n\nexport const PasswordField = withCondition(PasswordFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,QAAQ,QAAQ;AACzB,OAAOC,KAAA,IAASC,WAAW,QAAQ;AAInC,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,UAAU,QAAQ;AAC3B,OAAO;AACP,SAASC,aAAa,QAAQ;AAE9B,MAAMC,sBAAA,GAAuDC,KAAA;EAAA,MAAAC,CAAA,GAAAb,EAAA;EAC3D;IAAAc,YAAA;IAAAC,UAAA;IAAAC,KAAA;IAAAA,KAAA,EAAAC,EAAA;IAAAC,QAAA;IAAAC,UAAA;IAAAC;EAAA,IAsBIR,KAAA;EAAA,IAAAS,EAAA;EAAA,IAAAR,CAAA,QAAAI,EAAA;IAlBKI,EAAA,GAAAJ,EAc8B,KAAAK,SAAA,QAd9BL,EA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,KAAA;MAAAzC,KAAA;MAAAT,UAAA;MAAA2D,QAAA,EAGGJ,EAEV;MAAAnB,IAAA;MAAApB,WAAA;MAAA4C,QAAA,EAGU9C,QAAA;MAAAJ,QAAA;MAAAO,GAAA,EAELkC,SAAA;MAAAX,SAAA;MAAAtB,KAAA;MAAAM,KAAA,EAGEA,OAAC,IAAoB;MAAAL;IAAA,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAvB9ByB,E;CA2BJ;AAEA,OAAO,MAAMiB,aAAA,GAAgB3E,aAAA,CAAcM,sBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/fields/Relationship/select-components/SingleValue/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,KAA6B,MAAM,OAAO,CAAA;AAGjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;AACxF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAM5C,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAChC;IACE,WAAW,EAAE;QAEX,WAAW,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAA;KACpD,CAAA;CACF,GAAG,gBAAgB,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/fields/Relationship/select-components/SingleValue/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,KAA6B,MAAM,OAAO,CAAA;AAGjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;AACxF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAM5C,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAChC;IACE,WAAW,EAAE;QAEX,WAAW,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAA;KACpD,CAAA;CACF,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAqD7B,CAAA"}
|
|
@@ -94,19 +94,17 @@ export const SingleValue = props => {
|
|
|
94
94
|
} else {
|
|
95
95
|
t6 = $[21];
|
|
96
96
|
}
|
|
97
|
-
t5 = _jsx(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}), t6]
|
|
109
|
-
})
|
|
97
|
+
t5 = _jsx(SelectComponents.SingleValue, {
|
|
98
|
+
...props,
|
|
99
|
+
className: baseClass,
|
|
100
|
+
children: _jsx("div", {
|
|
101
|
+
className: `${baseClass}__label`,
|
|
102
|
+
children: _jsxs("div", {
|
|
103
|
+
className: `${baseClass}__label-text`,
|
|
104
|
+
children: [_jsx("div", {
|
|
105
|
+
className: `${baseClass}__text`,
|
|
106
|
+
children
|
|
107
|
+
}), t6]
|
|
110
108
|
})
|
|
111
109
|
})
|
|
112
110
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","Fragment","useState","components","SelectComponents","Tooltip","EditIcon","useAuth","useTranslation","baseClass","SingleValue","props","$","children","data","t0","selectProps","t1","label","relationTo","value","t2","undefined","customProps","t3","t4","onDocumentDrawerOpen","showTooltip","setShowTooltip","t","permissions","hasReadPermission","Boolean","collections","read","permission","t5","t6","_jsx","_jsxs","className","onClick","id","collectionSlug","onKeyDown","_temp","onMouseDown","_temp2","onMouseEnter","onMouseLeave","onTouchEnd","_temp3","type","show","e","key","stopPropagation","e_0","e_1"],"sources":["../../../../../src/fields/Relationship/select-components/SingleValue/index.tsx"],"sourcesContent":["'use client'\nimport type { SingleValueProps } from 'react-select'\n\nimport React, { Fragment, useState } from 'react'\nimport { components as SelectComponents } from 'react-select'\n\nimport type { ReactSelectAdapterProps } from '../../../../elements/ReactSelect/types.js'\nimport type { Option } from '../../types.js'\n\nimport { Tooltip } from '../../../../elements/Tooltip/index.js'\nimport { EditIcon } from '../../../../icons/Edit/index.js'\nimport { useAuth } from '../../../../providers/Auth/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport './index.scss'\n\nconst baseClass = 'relationship--single-value'\n\nexport const SingleValue: React.FC<\n {\n selectProps: {\n // TODO Fix this - moduleResolution 16 breaks our declare module\n customProps: ReactSelectAdapterProps['customProps']\n }\n } & SingleValueProps<Option>\n> = (props) => {\n const {\n children,\n data: { label, relationTo, value },\n selectProps: { customProps: { onDocumentDrawerOpen } = {} } = {},\n } = props\n\n const [showTooltip, setShowTooltip] = useState(false)\n const { t } = useTranslation()\n const { permissions } = useAuth()\n const hasReadPermission = Boolean(permissions?.collections?.[relationTo]?.read?.permission)\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","Fragment","useState","components","SelectComponents","Tooltip","EditIcon","useAuth","useTranslation","baseClass","SingleValue","props","$","children","data","t0","selectProps","t1","label","relationTo","value","t2","undefined","customProps","t3","t4","onDocumentDrawerOpen","showTooltip","setShowTooltip","t","permissions","hasReadPermission","Boolean","collections","read","permission","t5","t6","_jsx","_jsxs","className","onClick","id","collectionSlug","onKeyDown","_temp","onMouseDown","_temp2","onMouseEnter","onMouseLeave","onTouchEnd","_temp3","type","show","e","key","stopPropagation","e_0","e_1"],"sources":["../../../../../src/fields/Relationship/select-components/SingleValue/index.tsx"],"sourcesContent":["'use client'\nimport type { SingleValueProps } from 'react-select'\n\nimport React, { Fragment, useState } from 'react'\nimport { components as SelectComponents } from 'react-select'\n\nimport type { ReactSelectAdapterProps } from '../../../../elements/ReactSelect/types.js'\nimport type { Option } from '../../types.js'\n\nimport { Tooltip } from '../../../../elements/Tooltip/index.js'\nimport { EditIcon } from '../../../../icons/Edit/index.js'\nimport { useAuth } from '../../../../providers/Auth/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport './index.scss'\n\nconst baseClass = 'relationship--single-value'\n\nexport const SingleValue: React.FC<\n {\n selectProps: {\n // TODO Fix this - moduleResolution 16 breaks our declare module\n customProps: ReactSelectAdapterProps['customProps']\n }\n } & SingleValueProps<Option>\n> = (props) => {\n const {\n children,\n data: { label, relationTo, value },\n selectProps: { customProps: { onDocumentDrawerOpen } = {} } = {},\n } = props\n\n const [showTooltip, setShowTooltip] = useState(false)\n const { t } = useTranslation()\n const { permissions } = useAuth()\n const hasReadPermission = Boolean(permissions?.collections?.[relationTo]?.read?.permission)\n\n return (\n <SelectComponents.SingleValue {...props} className={baseClass}>\n <div className={`${baseClass}__label`}>\n <div className={`${baseClass}__label-text`}>\n <div className={`${baseClass}__text`}>{children}</div>\n {relationTo && hasReadPermission && (\n <Fragment>\n <button\n aria-label={t('general:editLabel', { label })}\n className={`${baseClass}__drawer-toggler`}\n onClick={() => {\n setShowTooltip(false)\n onDocumentDrawerOpen({\n id: value,\n collectionSlug: relationTo,\n hasReadPermission,\n })\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.stopPropagation()\n }\n }}\n onMouseDown={(e) => e.stopPropagation()} // prevents react-select dropdown from opening\n onMouseEnter={() => setShowTooltip(true)}\n onMouseLeave={() => setShowTooltip(false)}\n onTouchEnd={(e) => e.stopPropagation()} // prevents react-select dropdown from openingtype=\"button\"\n type=\"button\"\n >\n <Tooltip className={`${baseClass}__tooltip`} show={showTooltip}>\n {t('general:edit')}\n </Tooltip>\n <EditIcon />\n </button>\n </Fragment>\n )}\n </div>\n </div>\n </SelectComponents.SingleValue>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,IAASC,QAAQ,EAAEC,QAAQ,QAAQ;AAC1C,SAASC,UAAA,IAAcC,gBAAgB,QAA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AAA,EAAe,GAAA/B,SAAA,SAAqB;QAAAI,QAAA,EACnC0B,KAAA,CAAC;UAAAC,SAAA,EAAe,GAAA/B,SAAA,cAA0B;UAAAI,QAAA,GACxCyB,IAAA,CAAC;YAAAE,SAAA,EAAe,GAAA/B,SAAA,QAAoB;YAAAI;UAAA,C,GACnCwB,E;;;;;;;;;;;;;;;;;SAJPD,E;CAuCJ;AApDI,SAAAS,MAAAS,CAAA;EAAA,IA+BkBA,CAAA,CAAAC,GAAA,KAAU;IACZD,CAAA,CAAAE,eAAA,CAAiB;EAAA;AAAA;AAhCjC,SAAAT,OAAAU,GAAA;EAAA,OAmCgCH,GAAA,CAAAE,eAAA,CAAiB;AAAA;AAnCjD,SAAAL,OAAAO,GAAA;EAAA,OAsC+BJ,GAAA,CAAAE,eAAA,CAAiB;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAGpF,OAAO,KAAsB,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAQpD,OAAO,cAAc,CAAA;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAGpF,OAAO,KAAsB,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAQpD,OAAO,cAAc,CAAA;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAA;AA+F5C,eAAO,MAAM,aAAa;wBA7FT,MAAO,GAAG;yBAA6C,MACpE,oBACU;;;;;;;oCA2FoD,CAAA"}
|
|
@@ -29,6 +29,7 @@ const TextareaFieldComponent = props => {
|
|
|
29
29
|
name,
|
|
30
30
|
_path: pathFromProps,
|
|
31
31
|
admin: t1,
|
|
32
|
+
label,
|
|
32
33
|
localized,
|
|
33
34
|
maxLength,
|
|
34
35
|
minLength,
|
|
@@ -134,6 +135,7 @@ const TextareaFieldComponent = props => {
|
|
|
134
135
|
descriptionProps,
|
|
135
136
|
Error: field?.admin?.components?.Error,
|
|
136
137
|
errorProps,
|
|
138
|
+
label,
|
|
137
139
|
Label: field?.admin?.components?.Label,
|
|
138
140
|
labelProps,
|
|
139
141
|
onChange: t7,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCallback","useFieldProps","useField","withCondition","useConfig","useTranslation","isFieldRTL","TextareaInput","TextareaFieldComponent","props","$","descriptionProps","errorProps","field","t0","labelProps","locale","readOnly","readOnlyFromTopLevelProps","validate","name","_path","pathFromProps","admin","t1","localized","maxLength","minLength","required","t2","undefined","className","description","placeholder","readOnlyFromAdmin","rows","rtl","style","width","readOnlyFromProps","i18n","config","t3","localization","isRTL","fieldLocalized","fieldRTL","localizationConfig","t4","value","options","memoizedValidate","path","pathFromContext","readOnlyFromContext","t5","t6","formInitializing","formProcessing","setValue","showError","value_0","disabled","t7","e","target","_jsx","afterInput","components","beforeInput","Description","Error","Label","onChange","TextareaField"],"sources":["../../../src/fields/Textarea/index.tsx"],"sourcesContent":["'use client'\nimport type { TextareaFieldClientComponent, TextareaFieldValidation } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useCallback } from 'react'\n\nimport type { TextAreaInputProps } from './types.js'\n\nimport { useFieldProps } from '../../forms/FieldPropsProvider/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { useConfig } from '../../providers/Config/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { isFieldRTL } from '../shared/index.js'\nimport './index.scss'\nimport { TextareaInput } from './Input.js'\n\nexport { TextareaInput, TextAreaInputProps }\n\nconst TextareaFieldComponent: TextareaFieldClientComponent = (props) => {\n const {\n descriptionProps,\n errorProps,\n field,\n field: {\n name,\n _path: pathFromProps,\n admin: {\n className,\n description,\n placeholder,\n readOnly: readOnlyFromAdmin,\n rows,\n rtl,\n style,\n width,\n } = {},\n localized,\n maxLength,\n minLength,\n required,\n },\n labelProps,\n locale,\n readOnly: readOnlyFromTopLevelProps,\n validate,\n } = props\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const { i18n } = useTranslation()\n\n const {\n config: { localization },\n } = useConfig()\n\n const isRTL = isFieldRTL({\n fieldLocalized: localized,\n fieldRTL: rtl,\n locale,\n localizationConfig: localization || undefined,\n })\n\n const memoizedValidate: TextareaFieldValidation = useCallback(\n (value, options) => {\n if (typeof validate === 'function') {\n return validate(value, { ...options, maxLength, minLength, required })\n }\n },\n [validate, required, maxLength, minLength],\n )\n\n const { path: pathFromContext, readOnly: readOnlyFromContext } = useFieldProps()\n\n const { formInitializing, formProcessing, path, setValue, showError, value } = useField<string>({\n path: pathFromContext ?? pathFromProps ?? name,\n validate: memoizedValidate,\n })\n\n const disabled = readOnlyFromProps || readOnlyFromContext || formProcessing || formInitializing\n\n return (\n <TextareaInput\n afterInput={field?.admin?.components?.afterInput}\n beforeInput={field?.admin?.components?.beforeInput}\n className={className}\n Description={field?.admin?.components?.Description}\n description={description}\n descriptionProps={descriptionProps}\n Error={field?.admin?.components?.Error}\n errorProps={errorProps}\n Label={field?.admin?.components?.Label}\n labelProps={labelProps}\n onChange={(e) => {\n setValue(e.target.value)\n }}\n path={path}\n placeholder={getTranslation(placeholder, i18n)}\n readOnly={disabled}\n required={required}\n rows={rows}\n rtl={isRTL}\n showError={showError}\n style={style}\n value={value}\n width={width}\n />\n )\n}\n\nexport const TextareaField = withCondition(TextareaFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,QAAQ;AAInC,SAASC,aAAa,QAAQ;AAC9B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,UAAU,QAAQ;AAC3B,OAAO;AACP,SAASC,aAAa,QAAQ;AAE9B,SAASA,aAAa;AAEtB,MAAMC,sBAAA,GAAuDC,KAAA;EAAA,MAAAC,CAAA,GAAAb,EAAA;EAC3D;IAAAc,gBAAA;IAAAC,UAAA;IAAAC,KAAA;IAAAA,KAAA,EAAAC,EAAA;IAAAC,UAAA;IAAAC,MAAA;IAAAC,QAAA,EAAAC,yBAAA;IAAAC;EAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCallback","useFieldProps","useField","withCondition","useConfig","useTranslation","isFieldRTL","TextareaInput","TextareaFieldComponent","props","$","descriptionProps","errorProps","field","t0","labelProps","locale","readOnly","readOnlyFromTopLevelProps","validate","name","_path","pathFromProps","admin","t1","label","localized","maxLength","minLength","required","t2","undefined","className","description","placeholder","readOnlyFromAdmin","rows","rtl","style","width","readOnlyFromProps","i18n","config","t3","localization","isRTL","fieldLocalized","fieldRTL","localizationConfig","t4","value","options","memoizedValidate","path","pathFromContext","readOnlyFromContext","t5","t6","formInitializing","formProcessing","setValue","showError","value_0","disabled","t7","e","target","_jsx","afterInput","components","beforeInput","Description","Error","Label","onChange","TextareaField"],"sources":["../../../src/fields/Textarea/index.tsx"],"sourcesContent":["'use client'\nimport type { TextareaFieldClientComponent, TextareaFieldValidation } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useCallback } from 'react'\n\nimport type { TextAreaInputProps } from './types.js'\n\nimport { useFieldProps } from '../../forms/FieldPropsProvider/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { useConfig } from '../../providers/Config/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { isFieldRTL } from '../shared/index.js'\nimport './index.scss'\nimport { TextareaInput } from './Input.js'\n\nexport { TextareaInput, TextAreaInputProps }\n\nconst TextareaFieldComponent: TextareaFieldClientComponent = (props) => {\n const {\n descriptionProps,\n errorProps,\n field,\n field: {\n name,\n _path: pathFromProps,\n admin: {\n className,\n description,\n placeholder,\n readOnly: readOnlyFromAdmin,\n rows,\n rtl,\n style,\n width,\n } = {},\n label,\n localized,\n maxLength,\n minLength,\n required,\n },\n labelProps,\n locale,\n readOnly: readOnlyFromTopLevelProps,\n validate,\n } = props\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const { i18n } = useTranslation()\n\n const {\n config: { localization },\n } = useConfig()\n\n const isRTL = isFieldRTL({\n fieldLocalized: localized,\n fieldRTL: rtl,\n locale,\n localizationConfig: localization || undefined,\n })\n\n const memoizedValidate: TextareaFieldValidation = useCallback(\n (value, options) => {\n if (typeof validate === 'function') {\n return validate(value, { ...options, maxLength, minLength, required })\n }\n },\n [validate, required, maxLength, minLength],\n )\n\n const { path: pathFromContext, readOnly: readOnlyFromContext } = useFieldProps()\n\n const { formInitializing, formProcessing, path, setValue, showError, value } = useField<string>({\n path: pathFromContext ?? pathFromProps ?? name,\n validate: memoizedValidate,\n })\n\n const disabled = readOnlyFromProps || readOnlyFromContext || formProcessing || formInitializing\n\n return (\n <TextareaInput\n afterInput={field?.admin?.components?.afterInput}\n beforeInput={field?.admin?.components?.beforeInput}\n className={className}\n Description={field?.admin?.components?.Description}\n description={description}\n descriptionProps={descriptionProps}\n Error={field?.admin?.components?.Error}\n errorProps={errorProps}\n label={label}\n Label={field?.admin?.components?.Label}\n labelProps={labelProps}\n onChange={(e) => {\n setValue(e.target.value)\n }}\n path={path}\n placeholder={getTranslation(placeholder, i18n)}\n readOnly={disabled}\n required={required}\n rows={rows}\n rtl={isRTL}\n showError={showError}\n style={style}\n value={value}\n width={width}\n />\n )\n}\n\nexport const TextareaField = withCondition(TextareaFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,QAAQ;AAInC,SAASC,aAAa,QAAQ;AAC9B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,UAAU,QAAQ;AAC3B,OAAO;AACP,SAASC,aAAa,QAAQ;AAE9B,SAASA,aAAa;AAEtB,MAAMC,sBAAA,GAAuDC,KAAA;EAAA,MAAAC,CAAA,GAAAb,EAAA;EAC3D;IAAAc,gBAAA;IAAAC,UAAA;IAAAC,KAAA;IAAAA,KAAA,EAAAC,EAAA;IAAAC,UAAA;IAAAC,MAAA;IAAAC,QAAA,EAAAC,yBAAA;IAAAC;EAAA,IA2BIV,KAAA;EAvBK;IAAAW,IAAA;IAAAC,KAAA,EAAAC,aAAA;IAAAC,KAAA,EAAAC,EAAA;IAAAC,KAAA;IAAAC,SAAA;IAAAC,SAAA;IAAAC,SAAA;IAAAC;EAAA,IAAAf,EAkBN;EAAA,IAAAgB,EAAA;EAAA,IAAApB,CAAA,QAAAc,EAAA;IAfQM,EAAA,GAAAN,EASD,KAAAO,SAAA,QATCP,EASD;IAAAd,CAAA,MAAAc,EAAA;IAAAd,CAAA,MAAAoB,EAAA;EAAA;IAAAA,EAAA,GAAApB,CAAA;EAAA;EATC;IAAAsB,SAAA;IAAAC,WAAA;IAAAC,WAAA;IAAAjB,QAAA,EAAAkB,iBAAA;IAAAC,IAAA;IAAAC,GAAA;IAAAC,KAAA;IAAAC;EAAA,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;IAAAX;EAAA,C;CAIb;AAEA,OAAO,MAAMoC,aAAA,GAAgBxE,aAAA,CAAcK,sBAAA","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ import { ThumbnailComponent } from '../../../elements/Thumbnail/index.js';
|
|
|
10
10
|
import './index.scss';
|
|
11
11
|
const baseClass = 'upload-relationship-details';
|
|
12
12
|
export function RelationshipContent(props) {
|
|
13
|
-
const $ = _c(
|
|
13
|
+
const $ = _c(20);
|
|
14
14
|
const {
|
|
15
15
|
id,
|
|
16
16
|
allowEdit,
|
|
@@ -66,19 +66,20 @@ export function RelationshipContent(props) {
|
|
|
66
66
|
t3 = $[5];
|
|
67
67
|
}
|
|
68
68
|
const generateMetaText = t3;
|
|
69
|
+
const metaText = withMeta ? generateMetaText(mimeType, byteSize) : "";
|
|
69
70
|
let t4;
|
|
70
|
-
if ($[6] !==
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
className: t5
|
|
71
|
+
if ($[6] !== className) {
|
|
72
|
+
t4 = [baseClass, className].filter(Boolean);
|
|
73
|
+
$[6] = className;
|
|
74
|
+
$[7] = t4;
|
|
75
|
+
} else {
|
|
76
|
+
t4 = $[7];
|
|
77
|
+
}
|
|
78
|
+
const t5 = t4.join(" ");
|
|
79
|
+
let t6;
|
|
80
|
+
if ($[8] !== alt || $[9] !== filename || $[10] !== src || $[11] !== withMeta || $[12] !== metaText || $[13] !== allowEdit || $[14] !== allowRemove || $[15] !== openDrawer || $[16] !== onRemove || $[17] !== DocumentDrawer || $[18] !== t5) {
|
|
81
|
+
t6 = _jsxs("div", {
|
|
82
|
+
className: t5,
|
|
82
83
|
children: [_jsxs("div", {
|
|
83
84
|
className: `${baseClass}__imageAndDetails`,
|
|
84
85
|
children: [_jsx(ThumbnailComponent, {
|
|
@@ -118,23 +119,21 @@ export function RelationshipContent(props) {
|
|
|
118
119
|
}) : null, _jsx(DocumentDrawer, {})]
|
|
119
120
|
}) : null]
|
|
120
121
|
});
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[18] = DocumentDrawer;
|
|
134
|
-
$[19] = t4;
|
|
122
|
+
$[8] = alt;
|
|
123
|
+
$[9] = filename;
|
|
124
|
+
$[10] = src;
|
|
125
|
+
$[11] = withMeta;
|
|
126
|
+
$[12] = metaText;
|
|
127
|
+
$[13] = allowEdit;
|
|
128
|
+
$[14] = allowRemove;
|
|
129
|
+
$[15] = openDrawer;
|
|
130
|
+
$[16] = onRemove;
|
|
131
|
+
$[17] = DocumentDrawer;
|
|
132
|
+
$[18] = t5;
|
|
133
|
+
$[19] = t6;
|
|
135
134
|
} else {
|
|
136
|
-
|
|
135
|
+
t6 = $[19];
|
|
137
136
|
}
|
|
138
|
-
return
|
|
137
|
+
return t6;
|
|
139
138
|
}
|
|
140
139
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","formatFilesize","React","Button","useDocumentDrawer","ThumbnailComponent","baseClass","RelationshipContent","props","$","id","allowEdit","allowRemove","alt","byteSize","className","collectionSlug","filename","mimeType","onRemove","src","withMeta","t0","x","y","undefined","t1","DocumentDrawer","_","t2","openDrawer","t3","generateMetaText","mimeType_0","size","sections","includes","push","join","t4","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","formatFilesize","React","Button","useDocumentDrawer","ThumbnailComponent","baseClass","RelationshipContent","props","$","id","allowEdit","allowRemove","alt","byteSize","className","collectionSlug","filename","mimeType","onRemove","src","withMeta","t0","x","y","undefined","t1","DocumentDrawer","_","t2","openDrawer","t3","generateMetaText","mimeType_0","size","sections","includes","push","join","metaText","t4","filter","Boolean","t5","t6","_jsxs","children","_jsx","fileSrc","href","target","buttonStyle","icon","iconStyle","onClick"],"sources":["../../../../src/fields/Upload/RelationshipContent/index.tsx"],"sourcesContent":["'use client'\n\nimport { formatFilesize } from 'payload/shared'\nimport React from 'react'\n\nimport { Button } from '../../../elements/Button/index.js'\nimport { useDocumentDrawer } from '../../../elements/DocumentDrawer/index.js'\nimport { ThumbnailComponent } from '../../../elements/Thumbnail/index.js'\nimport './index.scss'\n\nconst baseClass = 'upload-relationship-details'\n\ntype Props = {\n readonly allowEdit?: boolean\n readonly allowRemove?: boolean\n readonly alt: string\n readonly byteSize: number\n readonly className?: string\n readonly collectionSlug: string\n readonly filename: string\n readonly id: number | string\n readonly mimeType: string\n readonly onRemove: () => void\n readonly src: string\n readonly withMeta?: boolean\n readonly x?: number\n readonly y?: number\n}\nexport function RelationshipContent(props: Props) {\n const {\n id,\n allowEdit,\n allowRemove,\n alt,\n byteSize,\n className,\n collectionSlug,\n filename,\n mimeType,\n onRemove,\n src,\n withMeta = true,\n x,\n y,\n } = props\n\n const [DocumentDrawer, _, { openDrawer }] = useDocumentDrawer({\n id,\n collectionSlug,\n })\n\n function generateMetaText(mimeType: string, size: number): string {\n const sections: string[] = []\n if (mimeType.includes('image')) {\n sections.push(formatFilesize(size))\n }\n\n if (x && y) {\n sections.push(`${x}x${y}`)\n }\n\n if (mimeType) {\n sections.push(mimeType)\n }\n\n return sections.join(' — ')\n }\n\n const metaText = withMeta ? generateMetaText(mimeType, byteSize) : ''\n\n return (\n <div className={[baseClass, className].filter(Boolean).join(' ')}>\n <div className={`${baseClass}__imageAndDetails`}>\n <ThumbnailComponent\n alt={alt}\n className={`${baseClass}__thumbnail`}\n filename={filename}\n fileSrc={src}\n size=\"small\"\n />\n <div className={`${baseClass}__details`}>\n <p className={`${baseClass}__filename`}>\n <a href={src} target=\"_blank\">\n {filename}\n </a>\n </p>\n {withMeta ? <p className={`${baseClass}__meta`}>{metaText}</p> : null}\n </div>\n </div>\n\n {allowEdit !== false || allowRemove !== false ? (\n <div className={`${baseClass}__actions`}>\n {allowEdit !== false ? (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__edit`}\n icon=\"edit\"\n iconStyle=\"none\"\n onClick={openDrawer}\n />\n ) : null}\n {allowRemove !== false ? (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__remove`}\n icon=\"x\"\n iconStyle=\"none\"\n onClick={() => onRemove()}\n />\n ) : null}\n <DocumentDrawer />\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,MAAM,QAAQ;AACvB,SAASC,iBAAiB,QAAQ;AAClC,SAASC,kBAAkB,QAAQ;AACnC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAkBlB,OAAO,SAAAC,oBAAAC,KAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EACL;IAAAU,EAAA;IAAAC,SAAA;IAAAC,WAAA;IAAAC,GAAA;IAAAC,QAAA;IAAAC,SAAA;IAAAC,cAAA;IAAAC,QAAA;IAAAC,QAAA;IAAAC,QAAA;IAAAC,GAAA;IAAAC,QAAA,EAAAC,EAAA;IAAAC,CAAA;IAAAC;EAAA,IAeIhB,KAAA;EAHF,MAAAa,QAAA,GAAAC,EAAe,KAAAG,SAAA,UAAfH,EAAe;EAAA,IAAAI,EAAA;EAAA,IAAAjB,CAAA,QAAAC,EAAA,IAAAD,CAAA,QAAAO,cAAA;IAK6CU,EAAA;MAAAhB,EAAA;MAAAM;IAAA;IAG9DP,CAAA,MAAAC,EAAA;IAAAD,CAAA,MAAAO,cAAA;IAAAP,CAAA,MAAAiB,EAAA;EAAA;IAAAA,EAAA,GAAAjB,CAAA;EAAA;EAHA,OAAAkB,cAAA,EAAAC,CAAA,EAAAC,EAAA,IAA4CzB,iB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EAC5B;UAAAC,SAAA,EACK;UAAAC,OAAA,EAAAA,CAAA,KACKnC,QAAA;QAAA,C,QAEf,EACJ4B,IAAA,CAACpB,cAAA;MAAA,C,QAED;IAAA,C;;;;;;;;;;;;;;;;SAzCNiB,E","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA4B9B,cAAc,mBAAmB,CAAA;AAEjC,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC,EAAE;CACxE,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,oBA0B7B,CAAA"}
|
package/dist/fields/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { DateTimeField } from './DateTime/index.js';
|
|
|
10
10
|
import { EmailField } from './Email/index.js';
|
|
11
11
|
import { GroupField } from './Group/index.js';
|
|
12
12
|
import { HiddenField } from './Hidden/index.js';
|
|
13
|
+
import { JoinField } from './Join/index.js';
|
|
13
14
|
import { JSONField } from './JSON/index.js';
|
|
14
15
|
import { NumberField } from './Number/index.js';
|
|
15
16
|
import { PasswordField } from './Password/index.js';
|
|
@@ -36,6 +37,7 @@ export const fieldComponents = {
|
|
|
36
37
|
email: EmailField,
|
|
37
38
|
group: GroupField,
|
|
38
39
|
hidden: HiddenField,
|
|
40
|
+
join: JoinField,
|
|
39
41
|
json: JSONField,
|
|
40
42
|
number: NumberField,
|
|
41
43
|
password: PasswordField,
|