@payloadcms/next 3.50.0-canary.5 → 3.50.0-internal.ca62628
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 +4 -12
- package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js +22 -19
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.d.ts +4 -2
- package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.js +22 -26
- package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.d.ts +4 -2
- package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/index.js +6 -4
- 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 +3 -2
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/CollectionTrash/index.d.ts +3 -1
- package/dist/views/CollectionTrash/index.d.ts.map +1 -1
- package/dist/views/CollectionTrash/index.js +4 -1
- package/dist/views/CollectionTrash/index.js.map +1 -1
- package/dist/views/Document/index.js +5 -4
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/List/handleGroupBy.d.ts +1 -2
- package/dist/views/List/handleGroupBy.d.ts.map +1 -1
- package/dist/views/List/handleGroupBy.js +1 -4
- package/dist/views/List/handleGroupBy.js.map +1 -1
- package/dist/views/List/index.d.ts +1 -5
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +55 -80
- package/dist/views/List/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { DocumentTabConfig,
|
|
1
|
+
import type { DocumentTabConfig, DocumentTabServerProps } 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
|
-
|
|
8
|
-
globalConfig?: SanitizedGlobalConfig;
|
|
9
|
-
path?: string;
|
|
10
|
-
permissions?: SanitizedPermissions;
|
|
11
|
-
req: PayloadRequest;
|
|
12
|
-
tabConfig: {
|
|
13
|
-
readonly Pill_Component?: React.FC;
|
|
14
|
-
} & DocumentTabConfig;
|
|
15
|
-
}>;
|
|
5
|
+
export declare const DocumentTab: React.FC<{
|
|
6
|
+
readonly Pill_Component?: React.FC;
|
|
7
|
+
} & DocumentTabConfig & DocumentTabServerProps>;
|
|
16
8
|
//# 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,EAAE,iBAAiB,EAAE,sBAAsB,EAAe,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,SAAS,YAAY,CAAA;AAElC,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAChC;IAAE,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;CAAE,GAAG,iBAAiB,GAAG,sBAAsB,CA0EpF,CAAA"}
|
|
@@ -3,22 +3,27 @@ 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 DocumentTab = 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,
|
|
11
17
|
permissions,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
href: tabHref,
|
|
15
|
-
isActive: tabIsActive,
|
|
16
|
-
label,
|
|
17
|
-
newTab,
|
|
18
|
-
Pill,
|
|
19
|
-
Pill_Component
|
|
20
|
-
}
|
|
18
|
+
Pill,
|
|
19
|
+
Pill_Component
|
|
21
20
|
} = props;
|
|
21
|
+
const {
|
|
22
|
+
config
|
|
23
|
+
} = payload;
|
|
24
|
+
const {
|
|
25
|
+
routes
|
|
26
|
+
} = config;
|
|
22
27
|
let href = typeof tabHref === 'string' ? tabHref : '';
|
|
23
28
|
let isActive = typeof tabIsActive === 'boolean' ? tabIsActive : false;
|
|
24
29
|
if (typeof tabHref === 'function') {
|
|
@@ -26,7 +31,7 @@ export const DefaultDocumentTab = props => {
|
|
|
26
31
|
apiURL,
|
|
27
32
|
collection: collectionConfig,
|
|
28
33
|
global: globalConfig,
|
|
29
|
-
routes
|
|
34
|
+
routes
|
|
30
35
|
});
|
|
31
36
|
}
|
|
32
37
|
if (typeof tabIsActive === 'function') {
|
|
@@ -35,10 +40,10 @@ export const DefaultDocumentTab = props => {
|
|
|
35
40
|
});
|
|
36
41
|
}
|
|
37
42
|
const labelToRender = typeof label === 'function' ? label({
|
|
38
|
-
t:
|
|
43
|
+
t: i18n.t
|
|
39
44
|
}) : label;
|
|
40
45
|
return /*#__PURE__*/_jsx(DocumentTabLink, {
|
|
41
|
-
adminRoute:
|
|
46
|
+
adminRoute: routes.admin,
|
|
42
47
|
ariaLabel: labelToRender,
|
|
43
48
|
baseClass: baseClass,
|
|
44
49
|
href: href,
|
|
@@ -50,13 +55,11 @@ export const DefaultDocumentTab = props => {
|
|
|
50
55
|
children: [" ", RenderServerComponent({
|
|
51
56
|
Component: Pill,
|
|
52
57
|
Fallback: Pill_Component,
|
|
53
|
-
importMap:
|
|
58
|
+
importMap: payload.importMap,
|
|
54
59
|
serverProps: {
|
|
55
|
-
i18n
|
|
56
|
-
payload
|
|
57
|
-
permissions
|
|
58
|
-
req,
|
|
59
|
-
user: req.user
|
|
60
|
+
i18n,
|
|
61
|
+
payload,
|
|
62
|
+
permissions
|
|
60
63
|
}
|
|
61
64
|
})]
|
|
62
65
|
}) : 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","DocumentTab","props","apiURL","collectionConfig","globalConfig","href","tabHref","i18n","isActive","tabIsActive","label","newTab","payload","permissions","Pill","Pill_Component","config","routes","collection","global","labelToRender","t","_jsx","adminRoute","admin","ariaLabel","_jsxs","className","Component","Fallback","importMap","serverProps"],"sources":["../../../../../src/elements/DocumentHeader/Tabs/Tab/index.tsx"],"sourcesContent":["import type { DocumentTabConfig, DocumentTabServerProps, ServerProps } 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 DocumentTab: React.FC<\n { readonly Pill_Component?: React.FC } & DocumentTabConfig & DocumentTabServerProps\n> = (props) => {\n const {\n apiURL,\n collectionConfig,\n globalConfig,\n href: tabHref,\n i18n,\n isActive: tabIsActive,\n label,\n newTab,\n payload,\n permissions,\n Pill,\n Pill_Component,\n } = props\n\n const { config } = payload\n const { routes } = config\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,\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: i18n.t,\n })\n : label\n\n return (\n <DocumentTabLink\n adminRoute={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: payload.importMap,\n serverProps: {\n i18n,\n payload,\n permissions,\n } satisfies ServerProps,\n })}\n </Fragment>\n ) : null}\n </span>\n </DocumentTabLink>\n )\n}\n"],"mappings":";AAGA,SAASA,qBAAqB,QAAQ;AACtC,SAASC,QAAQ,QAAQ;AAEzB,SAASC,eAAe,QAAQ;AAGhC,OAAO,MAAMC,SAAA,GAAY;AAEzB,OAAO,MAAMC,WAAA,GAERC,KAAA;EACH,MAAM;IACJC,MAAM;IACNC,gBAAgB;IAChBC,YAAY;IACZC,IAAA,EAAMC,OAAO;IACbC,IAAI;IACJC,QAAA,EAAUC,WAAW;IACrBC,KAAK;IACLC,MAAM;IACNC,OAAO;IACPC,WAAW;IACXC,IAAI;IACJC;EAAc,CACf,GAAGd,KAAA;EAEJ,MAAM;IAAEe;EAAM,CAAE,GAAGJ,OAAA;EACnB,MAAM;IAAEK;EAAM,CAAE,GAAGD,MAAA;EAEnB,IAAIX,IAAA,GAAO,OAAOC,OAAA,KAAY,WAAWA,OAAA,GAAU;EACnD,IAAIE,QAAA,GAAW,OAAOC,WAAA,KAAgB,YAAYA,WAAA,GAAc;EAEhE,IAAI,OAAOH,OAAA,KAAY,YAAY;IACjCD,IAAA,GAAOC,OAAA,CAAQ;MACbJ,MAAA;MACAgB,UAAA,EAAYf,gBAAA;MACZgB,MAAA,EAAQf,YAAA;MACRa;IACF;EACF;EAEA,IAAI,OAAOR,WAAA,KAAgB,YAAY;IACrCD,QAAA,GAAWC,WAAA,CAAY;MACrBJ;IACF;EACF;EAEA,MAAMe,aAAA,GACJ,OAAOV,KAAA,KAAU,aACbA,KAAA,CAAM;IACJW,CAAA,EAAGd,IAAA,CAAKc;EACV,KACAX,KAAA;EAEN,oBACEY,IAAA,CAACxB,eAAA;IACCyB,UAAA,EAAYN,MAAA,CAAOO,KAAK;IACxBC,SAAA,EAAWL,aAAA;IACXrB,SAAA,EAAWA,SAAA;IACXM,IAAA,EAAMA,IAAA;IACNG,QAAA,EAAUA,QAAA;IACVG,MAAA,EAAQA,MAAA;cAER,aAAAe,KAAA,CAAC;MAAKC,SAAA,EAAW,GAAG5B,SAAA,SAAkB;iBACnCqB,aAAA,EACAN,IAAA,IAAQC,cAAA,gBACPW,KAAA,CAAC7B,QAAA;mBAAS,KAEPD,qBAAA,CAAsB;UACrBgC,SAAA,EAAWd,IAAA;UACXe,QAAA,EAAUd,cAAA;UACVe,SAAA,EAAWlB,OAAA,CAAQkB,SAAS;UAC5BC,WAAA,EAAa;YACXxB,IAAA;YACAK,OAAA;YACAC;UACF;QACF;WAEA;;;AAIZ","ignoreList":[]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { I18n } from '@payloadcms/translations';
|
|
2
|
+
import type { Payload, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import './index.scss';
|
|
4
5
|
export declare const DocumentTabs: React.FC<{
|
|
5
6
|
collectionConfig: SanitizedCollectionConfig;
|
|
6
7
|
globalConfig: SanitizedGlobalConfig;
|
|
8
|
+
i18n: I18n;
|
|
9
|
+
payload: Payload;
|
|
7
10
|
permissions: SanitizedPermissions;
|
|
8
|
-
req: PayloadRequest;
|
|
9
11
|
}>;
|
|
10
12
|
//# 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,EAGV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/DocumentHeader/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAGV,OAAO,EACP,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,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,oBAAoB,CAAA;CAClC,CA0DA,CAAA"}
|
|
@@ -2,18 +2,20 @@ 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 { DocumentTab } 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
|
-
|
|
8
|
+
export const DocumentTabs = props => {
|
|
9
|
+
const {
|
|
10
|
+
collectionConfig,
|
|
11
|
+
globalConfig,
|
|
12
|
+
i18n,
|
|
13
|
+
payload,
|
|
14
|
+
permissions
|
|
15
|
+
} = props;
|
|
14
16
|
const {
|
|
15
17
|
config
|
|
16
|
-
} =
|
|
18
|
+
} = payload;
|
|
17
19
|
const tabs = getTabs({
|
|
18
20
|
collectionConfig,
|
|
19
21
|
globalConfig
|
|
@@ -26,48 +28,42 @@ export const DocumentTabs = ({
|
|
|
26
28
|
children: /*#__PURE__*/_jsx("ul", {
|
|
27
29
|
className: `${baseClass}__tabs`,
|
|
28
30
|
children: tabs?.map(({
|
|
29
|
-
tab
|
|
31
|
+
tab,
|
|
30
32
|
viewPath
|
|
31
33
|
}, index) => {
|
|
32
34
|
const {
|
|
33
35
|
condition
|
|
34
|
-
} =
|
|
36
|
+
} = tab || {};
|
|
35
37
|
const meetsCondition = !condition || condition({
|
|
36
38
|
collectionConfig,
|
|
37
39
|
config,
|
|
38
40
|
globalConfig,
|
|
39
|
-
permissions
|
|
40
|
-
req
|
|
41
|
+
permissions
|
|
41
42
|
});
|
|
42
43
|
if (!meetsCondition) {
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
|
-
if (
|
|
46
|
+
if (tab?.Component) {
|
|
46
47
|
return RenderServerComponent({
|
|
47
48
|
clientProps: {
|
|
48
49
|
path: viewPath
|
|
49
50
|
},
|
|
50
|
-
Component:
|
|
51
|
-
importMap:
|
|
51
|
+
Component: tab.Component,
|
|
52
|
+
importMap: payload.importMap,
|
|
52
53
|
key: `tab-${index}`,
|
|
53
54
|
serverProps: {
|
|
54
55
|
collectionConfig,
|
|
55
56
|
globalConfig,
|
|
56
|
-
i18n
|
|
57
|
-
payload
|
|
58
|
-
permissions
|
|
59
|
-
req,
|
|
60
|
-
user: req.user
|
|
57
|
+
i18n,
|
|
58
|
+
payload,
|
|
59
|
+
permissions
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
62
|
}
|
|
64
|
-
return /*#__PURE__*/_jsx(
|
|
65
|
-
collectionConfig: collectionConfig,
|
|
66
|
-
globalConfig: globalConfig,
|
|
63
|
+
return /*#__PURE__*/_jsx(DocumentTab, {
|
|
67
64
|
path: viewPath,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
tabConfig: tabConfig
|
|
65
|
+
...props,
|
|
66
|
+
...tab
|
|
71
67
|
}, `tab-${index}`);
|
|
72
68
|
})
|
|
73
69
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RenderServerComponent","React","ShouldRenderTabs","
|
|
1
|
+
{"version":3,"file":"index.js","names":["RenderServerComponent","React","ShouldRenderTabs","DocumentTab","getTabs","baseClass","DocumentTabs","props","collectionConfig","globalConfig","i18n","payload","permissions","config","tabs","_jsx","className","map","tab","viewPath","index","condition","meetsCondition","Component","clientProps","path","importMap","key","serverProps"],"sources":["../../../../src/elements/DocumentHeader/Tabs/index.tsx"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type {\n DocumentTabClientProps,\n DocumentTabServerPropsOnly,\n Payload,\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 { DocumentTab } 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 i18n: I18n\n payload: Payload\n permissions: SanitizedPermissions\n}> = (props) => {\n const { collectionConfig, globalConfig, i18n, payload, permissions } = props\n const { config } = 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, viewPath }, index) => {\n const { condition } = tab || {}\n\n const meetsCondition =\n !condition || condition({ collectionConfig, config, globalConfig, permissions })\n\n if (!meetsCondition) {\n return null\n }\n\n if (tab?.Component) {\n return RenderServerComponent({\n clientProps: {\n path: viewPath,\n } satisfies DocumentTabClientProps,\n Component: tab.Component,\n importMap: payload.importMap,\n key: `tab-${index}`,\n serverProps: {\n collectionConfig,\n globalConfig,\n i18n,\n payload,\n permissions,\n } satisfies DocumentTabServerPropsOnly,\n })\n }\n\n return (\n <DocumentTab\n key={`tab-${index}`}\n path={viewPath}\n {...{\n ...props,\n ...tab,\n }}\n />\n )\n })}\n </ul>\n </div>\n </div>\n </ShouldRenderTabs>\n )\n}\n"],"mappings":";AAUA,SAASA,qBAAqB,QAAQ;AACtC,OAAOC,KAAA,MAAW;AAElB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,WAAW,QAAQ;AAC5B,SAASC,OAAO,QAAQ;AAGxB,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,YAAA,GAMPC,KAAA;EACJ,MAAM;IAAEC,gBAAgB;IAAEC,YAAY;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAW,CAAE,GAAGL,KAAA;EACvE,MAAM;IAAEM;EAAM,CAAE,GAAGF,OAAA;EAEnB,MAAMG,IAAA,GAAOV,OAAA,CAAQ;IACnBI,gBAAA;IACAC;EACF;EAEA,oBACEM,IAAA,CAACb,gBAAA;cACC,aAAAa,IAAA,CAAC;MAAIC,SAAA,EAAWX,SAAA;gBACd,aAAAU,IAAA,CAAC;QAAIC,SAAA,EAAW,GAAGX,SAAA,kBAA2B;kBAC5C,aAAAU,IAAA,CAAC;UAAGC,SAAA,EAAW,GAAGX,SAAA,QAAiB;oBAChCS,IAAA,EAAMG,GAAA,CAAI,CAAC;YAAEC,GAAG;YAAEC;UAAQ,CAAE,EAAEC,KAAA;YAC7B,MAAM;cAAEC;YAAS,CAAE,GAAGH,GAAA,IAAO,CAAC;YAE9B,MAAMI,cAAA,GACJ,CAACD,SAAA,IAAaA,SAAA,CAAU;cAAEb,gBAAA;cAAkBK,MAAA;cAAQJ,YAAA;cAAcG;YAAY;YAEhF,IAAI,CAACU,cAAA,EAAgB;cACnB,OAAO;YACT;YAEA,IAAIJ,GAAA,EAAKK,SAAA,EAAW;cAClB,OAAOvB,qBAAA,CAAsB;gBAC3BwB,WAAA,EAAa;kBACXC,IAAA,EAAMN;gBACR;gBACAI,SAAA,EAAWL,GAAA,CAAIK,SAAS;gBACxBG,SAAA,EAAWf,OAAA,CAAQe,SAAS;gBAC5BC,GAAA,EAAK,OAAOP,KAAA,EAAO;gBACnBQ,WAAA,EAAa;kBACXpB,gBAAA;kBACAC,YAAA;kBACAC,IAAA;kBACAC,OAAA;kBACAC;gBACF;cACF;YACF;YAEA,oBACEG,IAAA,CAACZ,WAAA;cAECsB,IAAA,EAAMN,QAAA;cAEJ,GAAGZ,KAAK;cACR,GAAGW;eAJA,OAAOE,KAAA,EAAO;UAQzB;;;;;AAMZ","ignoreList":[]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { I18n } from '@payloadcms/translations';
|
|
2
|
+
import type { Payload, SanitizedCollectionConfig, SanitizedGlobalConfig, SanitizedPermissions } from 'payload';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import './index.scss';
|
|
4
5
|
export declare const DocumentHeader: React.FC<{
|
|
5
6
|
collectionConfig?: SanitizedCollectionConfig;
|
|
6
7
|
globalConfig?: SanitizedGlobalConfig;
|
|
7
8
|
hideTabs?: boolean;
|
|
9
|
+
i18n: I18n;
|
|
10
|
+
payload: Payload;
|
|
8
11
|
permissions: SanitizedPermissions;
|
|
9
|
-
req: PayloadRequest;
|
|
10
12
|
}>;
|
|
11
13
|
//# 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":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EACV,OAAO,EACP,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,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,oBAAoB,CAAA;CAClC,CAiBA,CAAA"}
|
|
@@ -8,8 +8,9 @@ export const DocumentHeader = props => {
|
|
|
8
8
|
collectionConfig,
|
|
9
9
|
globalConfig,
|
|
10
10
|
hideTabs,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
i18n,
|
|
12
|
+
payload,
|
|
13
|
+
permissions
|
|
13
14
|
} = props;
|
|
14
15
|
return /*#__PURE__*/_jsxs(Gutter, {
|
|
15
16
|
className: baseClass,
|
|
@@ -18,8 +19,9 @@ export const DocumentHeader = props => {
|
|
|
18
19
|
}), !hideTabs && /*#__PURE__*/_jsx(DocumentTabs, {
|
|
19
20
|
collectionConfig: collectionConfig,
|
|
20
21
|
globalConfig: globalConfig,
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
i18n: i18n,
|
|
23
|
+
payload: payload,
|
|
24
|
+
permissions: permissions
|
|
23
25
|
})]
|
|
24
26
|
});
|
|
25
27
|
};
|
|
@@ -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","i18n","payload","permissions","_jsxs","className","_jsx"],"sources":["../../../src/elements/DocumentHeader/index.tsx"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type {\n Payload,\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 i18n: I18n\n payload: Payload\n permissions: SanitizedPermissions\n}> = (props) => {\n const { collectionConfig, globalConfig, hideTabs, i18n, payload, permissions } = props\n\n return (\n <Gutter className={baseClass}>\n <RenderTitle className={`${baseClass}__title`} />\n {!hideTabs && (\n <DocumentTabs\n collectionConfig={collectionConfig}\n globalConfig={globalConfig}\n i18n={i18n}\n payload={payload}\n permissions={permissions}\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,GAOPC,KAAA;EACJ,MAAM;IAAEC,gBAAgB;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAW,CAAE,GAAGN,KAAA;EAEjF,oBACEO,KAAA,CAACb,MAAA;IAAOc,SAAA,EAAWV,SAAA;4BACjBW,IAAA,CAACd,WAAA;MAAYa,SAAA,EAAW,GAAGV,SAAA;QAC1B,CAACK,QAAA,iBACAM,IAAA,CAACZ,YAAA;MACCI,gBAAA,EAAkBA,gBAAA;MAClBC,YAAA,EAAcA,YAAA;MACdE,IAAA,EAAMA,IAAA;MACNC,OAAA,EAASA,OAAA;MACTC,WAAA,EAAaA;;;AAKvB","ignoreList":[]}
|