@payloadcms/next 3.49.0 → 3.49.1
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/DocumentHeader/Tabs/Tab/index.d.ts +12 -4
- package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js +19 -22
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.d.ts +2 -4
- package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.js +26 -22
- package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.d.ts +2 -4
- package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/index.js +4 -6
- package/dist/elements/DocumentHeader/index.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/views/Account/index.d.ts.map +1 -1
- package/dist/views/Account/index.js +2 -3
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/Document/index.js +4 -5
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/List/handleGroupBy.d.ts +2 -1
- package/dist/views/List/handleGroupBy.d.ts.map +1 -1
- package/dist/views/List/handleGroupBy.js +4 -1
- package/dist/views/List/handleGroupBy.js.map +1 -1
- package/dist/views/List/index.d.ts +1 -1
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +78 -68
- package/dist/views/List/index.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type { DocumentTabConfig,
|
|
1
|
+
import type { DocumentTabConfig, PayloadRequest, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import './index.scss';
|
|
4
4
|
export declare const baseClass = "doc-tab";
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare const DefaultDocumentTab: React.FC<{
|
|
6
|
+
apiURL?: string;
|
|
7
|
+
collectionConfig?: SanitizedCollectionConfig;
|
|
8
|
+
globalConfig?: SanitizedGlobalConfig;
|
|
9
|
+
path?: string;
|
|
10
|
+
permissions?: SanitizedPermissions;
|
|
11
|
+
req: PayloadRequest;
|
|
12
|
+
tabConfig: {
|
|
13
|
+
readonly Pill_Component?: React.FC;
|
|
14
|
+
} & DocumentTabConfig;
|
|
15
|
+
}>;
|
|
8
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/DocumentHeader/Tabs/Tab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/DocumentHeader/Tabs/Tab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,SAAS,YAAY,CAAA;AAElC,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE;QAAE,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;KAAE,GAAG,iBAAiB,CAAA;CACtE,CAkEA,CAAA"}
|
|
@@ -3,27 +3,22 @@ import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerCompo
|
|
|
3
3
|
import { Fragment } from 'react';
|
|
4
4
|
import { DocumentTabLink } from './TabLink.js';
|
|
5
5
|
export const baseClass = 'doc-tab';
|
|
6
|
-
export const
|
|
6
|
+
export const DefaultDocumentTab = props => {
|
|
7
7
|
const {
|
|
8
8
|
apiURL,
|
|
9
9
|
collectionConfig,
|
|
10
10
|
globalConfig,
|
|
11
|
-
href: tabHref,
|
|
12
|
-
i18n,
|
|
13
|
-
isActive: tabIsActive,
|
|
14
|
-
label,
|
|
15
|
-
newTab,
|
|
16
|
-
payload,
|
|
17
11
|
permissions,
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
req,
|
|
13
|
+
tabConfig: {
|
|
14
|
+
href: tabHref,
|
|
15
|
+
isActive: tabIsActive,
|
|
16
|
+
label,
|
|
17
|
+
newTab,
|
|
18
|
+
Pill,
|
|
19
|
+
Pill_Component
|
|
20
|
+
}
|
|
20
21
|
} = props;
|
|
21
|
-
const {
|
|
22
|
-
config
|
|
23
|
-
} = payload;
|
|
24
|
-
const {
|
|
25
|
-
routes
|
|
26
|
-
} = config;
|
|
27
22
|
let href = typeof tabHref === 'string' ? tabHref : '';
|
|
28
23
|
let isActive = typeof tabIsActive === 'boolean' ? tabIsActive : false;
|
|
29
24
|
if (typeof tabHref === 'function') {
|
|
@@ -31,7 +26,7 @@ export const DocumentTab = props => {
|
|
|
31
26
|
apiURL,
|
|
32
27
|
collection: collectionConfig,
|
|
33
28
|
global: globalConfig,
|
|
34
|
-
routes
|
|
29
|
+
routes: req.payload.config.routes
|
|
35
30
|
});
|
|
36
31
|
}
|
|
37
32
|
if (typeof tabIsActive === 'function') {
|
|
@@ -40,10 +35,10 @@ export const DocumentTab = props => {
|
|
|
40
35
|
});
|
|
41
36
|
}
|
|
42
37
|
const labelToRender = typeof label === 'function' ? label({
|
|
43
|
-
t: i18n.t
|
|
38
|
+
t: req.i18n.t
|
|
44
39
|
}) : label;
|
|
45
40
|
return /*#__PURE__*/_jsx(DocumentTabLink, {
|
|
46
|
-
adminRoute: routes.admin,
|
|
41
|
+
adminRoute: req.payload.config.routes.admin,
|
|
47
42
|
ariaLabel: labelToRender,
|
|
48
43
|
baseClass: baseClass,
|
|
49
44
|
href: href,
|
|
@@ -55,11 +50,13 @@ export const DocumentTab = props => {
|
|
|
55
50
|
children: [" ", RenderServerComponent({
|
|
56
51
|
Component: Pill,
|
|
57
52
|
Fallback: Pill_Component,
|
|
58
|
-
importMap: payload.importMap,
|
|
53
|
+
importMap: req.payload.importMap,
|
|
59
54
|
serverProps: {
|
|
60
|
-
i18n,
|
|
61
|
-
payload,
|
|
62
|
-
permissions
|
|
55
|
+
i18n: req.i18n,
|
|
56
|
+
payload: req.payload,
|
|
57
|
+
permissions,
|
|
58
|
+
req,
|
|
59
|
+
user: req.user
|
|
63
60
|
}
|
|
64
61
|
})]
|
|
65
62
|
}) : null]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RenderServerComponent","Fragment","DocumentTabLink","baseClass","
|
|
1
|
+
{"version":3,"file":"index.js","names":["RenderServerComponent","Fragment","DocumentTabLink","baseClass","DefaultDocumentTab","props","apiURL","collectionConfig","globalConfig","permissions","req","tabConfig","href","tabHref","isActive","tabIsActive","label","newTab","Pill","Pill_Component","collection","global","routes","payload","config","labelToRender","t","i18n","_jsx","adminRoute","admin","ariaLabel","_jsxs","className","Component","Fallback","importMap","serverProps","user"],"sources":["../../../../../src/elements/DocumentHeader/Tabs/Tab/index.tsx"],"sourcesContent":["import type {\n DocumentTabConfig,\n DocumentTabServerPropsOnly,\n PayloadRequest,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n} from 'payload'\nimport type React from 'react'\n\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { Fragment } from 'react'\n\nimport { DocumentTabLink } from './TabLink.js'\nimport './index.scss'\n\nexport const baseClass = 'doc-tab'\n\nexport const DefaultDocumentTab: React.FC<{\n apiURL?: string\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n path?: string\n permissions?: SanitizedPermissions\n req: PayloadRequest\n tabConfig: { readonly Pill_Component?: React.FC } & DocumentTabConfig\n}> = (props) => {\n const {\n apiURL,\n collectionConfig,\n globalConfig,\n permissions,\n req,\n tabConfig: { href: tabHref, isActive: tabIsActive, label, newTab, Pill, Pill_Component },\n } = props\n\n let href = typeof tabHref === 'string' ? tabHref : ''\n let isActive = typeof tabIsActive === 'boolean' ? tabIsActive : false\n\n if (typeof tabHref === 'function') {\n href = tabHref({\n apiURL,\n collection: collectionConfig,\n global: globalConfig,\n routes: req.payload.config.routes,\n })\n }\n\n if (typeof tabIsActive === 'function') {\n isActive = tabIsActive({\n href,\n })\n }\n\n const labelToRender =\n typeof label === 'function'\n ? label({\n t: req.i18n.t,\n })\n : label\n\n return (\n <DocumentTabLink\n adminRoute={req.payload.config.routes.admin}\n ariaLabel={labelToRender}\n baseClass={baseClass}\n href={href}\n isActive={isActive}\n newTab={newTab}\n >\n <span className={`${baseClass}__label`}>\n {labelToRender}\n {Pill || Pill_Component ? (\n <Fragment>\n \n {RenderServerComponent({\n Component: Pill,\n Fallback: Pill_Component,\n importMap: req.payload.importMap,\n serverProps: {\n i18n: req.i18n,\n payload: req.payload,\n permissions,\n req,\n user: req.user,\n } satisfies DocumentTabServerPropsOnly,\n })}\n </Fragment>\n ) : null}\n </span>\n </DocumentTabLink>\n )\n}\n"],"mappings":";AAUA,SAASA,qBAAqB,QAAQ;AACtC,SAASC,QAAQ,QAAQ;AAEzB,SAASC,eAAe,QAAQ;AAGhC,OAAO,MAAMC,SAAA,GAAY;AAEzB,OAAO,MAAMC,kBAAA,GAQPC,KAAA;EACJ,MAAM;IACJC,MAAM;IACNC,gBAAgB;IAChBC,YAAY;IACZC,WAAW;IACXC,GAAG;IACHC,SAAA,EAAW;MAAEC,IAA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IiB,IAAI;YACdJ,OAAA,EAASb,GAAA,CAAIa,OAAO;YACpBd,WAAA;YACAC,GAAA;YACA4B,IAAA,EAAM5B,GAAA,CAAI4B;UACZ;QACF;WAEA;;;AAIZ","ignoreList":[]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Payload, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
1
|
+
import type { PayloadRequest, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import './index.scss';
|
|
5
4
|
export declare const DocumentTabs: React.FC<{
|
|
6
5
|
collectionConfig: SanitizedCollectionConfig;
|
|
7
6
|
globalConfig: SanitizedGlobalConfig;
|
|
8
|
-
i18n: I18n;
|
|
9
|
-
payload: Payload;
|
|
10
7
|
permissions: SanitizedPermissions;
|
|
8
|
+
req: PayloadRequest;
|
|
11
9
|
}>;
|
|
12
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/DocumentHeader/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/DocumentHeader/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,YAAY,EAAE,qBAAqB,CAAA;IACnC,WAAW,EAAE,oBAAoB,CAAA;IACjC,GAAG,EAAE,cAAc,CAAA;CACpB,CA6DA,CAAA"}
|
|
@@ -2,20 +2,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { ShouldRenderTabs } from './ShouldRenderTabs.js';
|
|
5
|
-
import {
|
|
5
|
+
import { DefaultDocumentTab } from './Tab/index.js';
|
|
6
6
|
import { getTabs } from './tabs/index.js';
|
|
7
7
|
const baseClass = 'doc-tabs';
|
|
8
|
-
export const DocumentTabs =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
permissions
|
|
15
|
-
} = props;
|
|
8
|
+
export const DocumentTabs = ({
|
|
9
|
+
collectionConfig,
|
|
10
|
+
globalConfig,
|
|
11
|
+
permissions,
|
|
12
|
+
req
|
|
13
|
+
}) => {
|
|
16
14
|
const {
|
|
17
15
|
config
|
|
18
|
-
} = payload;
|
|
16
|
+
} = req.payload;
|
|
19
17
|
const tabs = getTabs({
|
|
20
18
|
collectionConfig,
|
|
21
19
|
globalConfig
|
|
@@ -28,42 +26,48 @@ export const DocumentTabs = props => {
|
|
|
28
26
|
children: /*#__PURE__*/_jsx("ul", {
|
|
29
27
|
className: `${baseClass}__tabs`,
|
|
30
28
|
children: tabs?.map(({
|
|
31
|
-
tab,
|
|
29
|
+
tab: tabConfig,
|
|
32
30
|
viewPath
|
|
33
31
|
}, index) => {
|
|
34
32
|
const {
|
|
35
33
|
condition
|
|
36
|
-
} =
|
|
34
|
+
} = tabConfig || {};
|
|
37
35
|
const meetsCondition = !condition || condition({
|
|
38
36
|
collectionConfig,
|
|
39
37
|
config,
|
|
40
38
|
globalConfig,
|
|
41
|
-
permissions
|
|
39
|
+
permissions,
|
|
40
|
+
req
|
|
42
41
|
});
|
|
43
42
|
if (!meetsCondition) {
|
|
44
43
|
return null;
|
|
45
44
|
}
|
|
46
|
-
if (
|
|
45
|
+
if (tabConfig?.Component) {
|
|
47
46
|
return RenderServerComponent({
|
|
48
47
|
clientProps: {
|
|
49
48
|
path: viewPath
|
|
50
49
|
},
|
|
51
|
-
Component:
|
|
52
|
-
importMap: payload.importMap,
|
|
50
|
+
Component: tabConfig.Component,
|
|
51
|
+
importMap: req.payload.importMap,
|
|
53
52
|
key: `tab-${index}`,
|
|
54
53
|
serverProps: {
|
|
55
54
|
collectionConfig,
|
|
56
55
|
globalConfig,
|
|
57
|
-
i18n,
|
|
58
|
-
payload,
|
|
59
|
-
permissions
|
|
56
|
+
i18n: req.i18n,
|
|
57
|
+
payload: req.payload,
|
|
58
|
+
permissions,
|
|
59
|
+
req,
|
|
60
|
+
user: req.user
|
|
60
61
|
}
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
|
-
return /*#__PURE__*/_jsx(
|
|
64
|
+
return /*#__PURE__*/_jsx(DefaultDocumentTab, {
|
|
65
|
+
collectionConfig: collectionConfig,
|
|
66
|
+
globalConfig: globalConfig,
|
|
64
67
|
path: viewPath,
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
permissions: permissions,
|
|
69
|
+
req: req,
|
|
70
|
+
tabConfig: tabConfig
|
|
67
71
|
}, `tab-${index}`);
|
|
68
72
|
})
|
|
69
73
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RenderServerComponent","React","ShouldRenderTabs","
|
|
1
|
+
{"version":3,"file":"index.js","names":["RenderServerComponent","React","ShouldRenderTabs","DefaultDocumentTab","getTabs","baseClass","DocumentTabs","collectionConfig","globalConfig","permissions","req","config","payload","tabs","_jsx","className","map","tab","tabConfig","viewPath","index","condition","meetsCondition","Component","clientProps","path","importMap","key","serverProps","i18n","user"],"sources":["../../../../src/elements/DocumentHeader/Tabs/index.tsx"],"sourcesContent":["import type {\n DocumentTabClientProps,\n DocumentTabServerPropsOnly,\n PayloadRequest,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n} from 'payload'\n\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport React from 'react'\n\nimport { ShouldRenderTabs } from './ShouldRenderTabs.js'\nimport { DefaultDocumentTab } from './Tab/index.js'\nimport { getTabs } from './tabs/index.js'\nimport './index.scss'\n\nconst baseClass = 'doc-tabs'\n\nexport const DocumentTabs: React.FC<{\n collectionConfig: SanitizedCollectionConfig\n globalConfig: SanitizedGlobalConfig\n permissions: SanitizedPermissions\n req: PayloadRequest\n}> = ({ collectionConfig, globalConfig, permissions, req }) => {\n const { config } = req.payload\n\n const tabs = getTabs({\n collectionConfig,\n globalConfig,\n })\n\n return (\n <ShouldRenderTabs>\n <div className={baseClass}>\n <div className={`${baseClass}__tabs-container`}>\n <ul className={`${baseClass}__tabs`}>\n {tabs?.map(({ tab: tabConfig, viewPath }, index) => {\n const { condition } = tabConfig || {}\n\n const meetsCondition =\n !condition ||\n condition({ collectionConfig, config, globalConfig, permissions, req })\n\n if (!meetsCondition) {\n return null\n }\n\n if (tabConfig?.Component) {\n return RenderServerComponent({\n clientProps: {\n path: viewPath,\n } satisfies DocumentTabClientProps,\n Component: tabConfig.Component,\n importMap: req.payload.importMap,\n key: `tab-${index}`,\n serverProps: {\n collectionConfig,\n globalConfig,\n i18n: req.i18n,\n payload: req.payload,\n permissions,\n req,\n user: req.user,\n } satisfies DocumentTabServerPropsOnly,\n })\n }\n\n return (\n <DefaultDocumentTab\n collectionConfig={collectionConfig}\n globalConfig={globalConfig}\n key={`tab-${index}`}\n path={viewPath}\n permissions={permissions}\n req={req}\n tabConfig={tabConfig}\n />\n )\n })}\n </ul>\n </div>\n </div>\n </ShouldRenderTabs>\n )\n}\n"],"mappings":";AASA,SAASA,qBAAqB,QAAQ;AACtC,OAAOC,KAAA,MAAW;AAElB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,kBAAkB,QAAQ;AACnC,SAASC,OAAO,QAAQ;AAGxB,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,YAAA,GAKRA,C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,kBAAA;cACCI,gBAAA,EAAkBA,gBAAA;cAClBC,YAAA,EAAcA,YAAA;cAEdiB,IAAA,EAAMN,QAAA;cACNV,WAAA,EAAaA,WAAA;cACbC,GAAA,EAAKA,GAAA;cACLQ,SAAA,EAAWA;eAJN,OAAOE,KAAA,EAAO;UAOzB;;;;;AAMZ","ignoreList":[]}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Payload, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
1
|
+
import type { PayloadRequest, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import './index.scss';
|
|
5
4
|
export declare const DocumentHeader: React.FC<{
|
|
6
5
|
collectionConfig?: SanitizedCollectionConfig;
|
|
7
6
|
globalConfig?: SanitizedGlobalConfig;
|
|
8
7
|
hideTabs?: boolean;
|
|
9
|
-
i18n: I18n;
|
|
10
|
-
payload: Payload;
|
|
11
8
|
permissions: SanitizedPermissions;
|
|
9
|
+
req: PayloadRequest;
|
|
12
10
|
}>;
|
|
13
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentHeader/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentHeader/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IACpC,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,oBAAoB,CAAA;IACjC,GAAG,EAAE,cAAc,CAAA;CACpB,CAgBA,CAAA"}
|
|
@@ -8,9 +8,8 @@ export const DocumentHeader = props => {
|
|
|
8
8
|
collectionConfig,
|
|
9
9
|
globalConfig,
|
|
10
10
|
hideTabs,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
permissions
|
|
11
|
+
permissions,
|
|
12
|
+
req
|
|
14
13
|
} = props;
|
|
15
14
|
return /*#__PURE__*/_jsxs(Gutter, {
|
|
16
15
|
className: baseClass,
|
|
@@ -19,9 +18,8 @@ export const DocumentHeader = props => {
|
|
|
19
18
|
}), !hideTabs && /*#__PURE__*/_jsx(DocumentTabs, {
|
|
20
19
|
collectionConfig: collectionConfig,
|
|
21
20
|
globalConfig: globalConfig,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
permissions: permissions
|
|
21
|
+
permissions: permissions,
|
|
22
|
+
req: req
|
|
25
23
|
})]
|
|
26
24
|
});
|
|
27
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Gutter","RenderTitle","React","DocumentTabs","baseClass","DocumentHeader","props","collectionConfig","globalConfig","hideTabs","
|
|
1
|
+
{"version":3,"file":"index.js","names":["Gutter","RenderTitle","React","DocumentTabs","baseClass","DocumentHeader","props","collectionConfig","globalConfig","hideTabs","permissions","req","_jsxs","className","_jsx"],"sources":["../../../src/elements/DocumentHeader/index.tsx"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type {\n PayloadRequest,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n} from 'payload'\n\nimport { Gutter, RenderTitle } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DocumentTabs } from './Tabs/index.js'\nimport './index.scss'\n\nconst baseClass = `doc-header`\n\nexport const DocumentHeader: React.FC<{\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n hideTabs?: boolean\n permissions: SanitizedPermissions\n req: PayloadRequest\n}> = (props) => {\n const { collectionConfig, globalConfig, hideTabs, permissions, req } = props\n\n return (\n <Gutter className={baseClass}>\n <RenderTitle className={`${baseClass}__title`} />\n {!hideTabs && (\n <DocumentTabs\n collectionConfig={collectionConfig}\n globalConfig={globalConfig}\n permissions={permissions}\n req={req}\n />\n )}\n </Gutter>\n )\n}\n"],"mappings":";AAQA,SAASA,MAAM,EAAEC,WAAW,QAAQ;AACpC,OAAOC,KAAA,MAAW;AAElB,SAASC,YAAY,QAAQ;AAG7B,MAAMC,SAAA,GAAY,YAAY;AAE9B,OAAO,MAAMC,cAAA,GAMPC,KAAA;EACJ,MAAM;IAAEC,gBAAgB;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,WAAW;IAAEC;EAAG,CAAE,GAAGL,KAAA;EAEvE,oBACEM,KAAA,CAACZ,MAAA;IAAOa,SAAA,EAAWT,SAAA;4BACjBU,IAAA,CAACb,WAAA;MAAYY,SAAA,EAAW,GAAGT,SAAA;QAC1B,CAACK,QAAA,iBACAK,IAAA,CAACX,YAAA;MACCI,gBAAA,EAAkBA,gBAAA;MAClBC,YAAA,EAAcA,YAAA;MACdE,WAAA,EAAaA,WAAA;MACbC,GAAA,EAAKA;;;AAKf","ignoreList":[]}
|