tinacms 2.8.3 → 2.9.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/client.js +2 -2
- package/dist/client.mjs +2 -2
- package/dist/index.js +146 -99
- package/dist/index.mjs +146 -99
- package/dist/rich-text/index.d.ts +6 -0
- package/dist/rich-text/index.js +8 -1
- package/dist/rich-text/index.mjs +8 -1
- package/dist/rich-text/static.d.ts +6 -0
- package/dist/rich-text/static.js +8 -1
- package/dist/rich-text/static.mjs +8 -1
- package/dist/tina-cms.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/badge.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
- package/package.json +1 -1
- package/dist/toolkit/react-sidebar/components/alert.d.ts +0 -5
package/dist/index.js
CHANGED
|
@@ -38855,6 +38855,18 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
38855
38855
|
}
|
|
38856
38856
|
);
|
|
38857
38857
|
};
|
|
38858
|
+
function MdCheckCircle(props) {
|
|
38859
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }, "child": [] }] })(props);
|
|
38860
|
+
}
|
|
38861
|
+
function MdInfo(props) {
|
|
38862
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }, "child": [] }] })(props);
|
|
38863
|
+
}
|
|
38864
|
+
function MdError(props) {
|
|
38865
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }, "child": [] }] })(props);
|
|
38866
|
+
}
|
|
38867
|
+
function MdWarning(props) {
|
|
38868
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" }, "child": [] }] })(props);
|
|
38869
|
+
}
|
|
38858
38870
|
function MdVpnKey(props) {
|
|
38859
38871
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12.65 10A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z" }, "child": [] }] })(props);
|
|
38860
38872
|
}
|
|
@@ -39255,7 +39267,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
39255
39267
|
},
|
|
39256
39268
|
className: classNames(
|
|
39257
39269
|
toolbarItem.active ? "bg-gray-50 text-blue-500" : "bg-white text-gray-600",
|
|
39258
|
-
"hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap"
|
|
39270
|
+
"hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap",
|
|
39271
|
+
toolbarItem.className ?? ""
|
|
39259
39272
|
)
|
|
39260
39273
|
},
|
|
39261
39274
|
/* @__PURE__ */ React.createElement("div", { className: "mr-2 opacity-80" }, toolbarItem.Icon),
|
|
@@ -40330,6 +40343,18 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
40330
40343
|
name: "group",
|
|
40331
40344
|
Component: Group
|
|
40332
40345
|
};
|
|
40346
|
+
const constructUrlWithBasePath = (url, basePath) => {
|
|
40347
|
+
if (!url)
|
|
40348
|
+
return url;
|
|
40349
|
+
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
|
|
40350
|
+
return url;
|
|
40351
|
+
}
|
|
40352
|
+
if (basePath) {
|
|
40353
|
+
const cleanBasePath = basePath.replace(/^\/+|\/+$/g, "");
|
|
40354
|
+
return `/${cleanBasePath}/${url}`;
|
|
40355
|
+
}
|
|
40356
|
+
return url;
|
|
40357
|
+
};
|
|
40333
40358
|
const BlockSelectorBig = ({
|
|
40334
40359
|
templates,
|
|
40335
40360
|
addItem,
|
|
@@ -40529,6 +40554,10 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
40529
40554
|
);
|
|
40530
40555
|
};
|
|
40531
40556
|
const BlockCard = ({ close: close2, name, template }) => {
|
|
40557
|
+
const cms = useCMS$1();
|
|
40558
|
+
const basePath = cms.flags.get("tina-basepath");
|
|
40559
|
+
const basePathStr = typeof basePath === "string" ? basePath : void 0;
|
|
40560
|
+
const previewSrc = template.previewSrc ? constructUrlWithBasePath(template.previewSrc, basePathStr) : void 0;
|
|
40532
40561
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
40533
40562
|
"button",
|
|
40534
40563
|
{
|
|
@@ -40539,17 +40568,17 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
40539
40568
|
close2(name, template);
|
|
40540
40569
|
}
|
|
40541
40570
|
},
|
|
40542
|
-
|
|
40571
|
+
previewSrc && /* @__PURE__ */ React__namespace.createElement(
|
|
40543
40572
|
"img",
|
|
40544
40573
|
{
|
|
40545
|
-
src:
|
|
40574
|
+
src: previewSrc,
|
|
40546
40575
|
className: "w-full h-auto transition-all ease-out duration-150 group-hover:opacity-50"
|
|
40547
40576
|
}
|
|
40548
40577
|
),
|
|
40549
40578
|
/* @__PURE__ */ React__namespace.createElement(
|
|
40550
40579
|
"span",
|
|
40551
40580
|
{
|
|
40552
|
-
className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${
|
|
40581
|
+
className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
|
|
40553
40582
|
},
|
|
40554
40583
|
template.label ? template.label : name,
|
|
40555
40584
|
/* @__PURE__ */ React__namespace.createElement(AddIcon, { className: "w-5 h-auto group-hover:text-blue-500 opacity-30 transition-all ease-out duration-150 group-hover:opacity-80" })
|
|
@@ -42585,13 +42614,13 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
42585
42614
|
{
|
|
42586
42615
|
target: "_blank",
|
|
42587
42616
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
42588
|
-
href: "https://tina.io/docs/
|
|
42617
|
+
href: "https://tina.io/docs/r/what-is-tinacloud/"
|
|
42589
42618
|
},
|
|
42590
42619
|
"Learn more about moving to production with TinaCloud."
|
|
42591
42620
|
)), /* @__PURE__ */ React__namespace.createElement("p", null, /* @__PURE__ */ React__namespace.createElement(
|
|
42592
42621
|
Button$1,
|
|
42593
42622
|
{
|
|
42594
|
-
href: "https://tina.io/docs/
|
|
42623
|
+
href: "https://tina.io/docs/r/what-is-tinacloud/",
|
|
42595
42624
|
target: "_blank",
|
|
42596
42625
|
as: "a"
|
|
42597
42626
|
},
|
|
@@ -42821,13 +42850,13 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
42821
42850
|
{
|
|
42822
42851
|
target: "_blank",
|
|
42823
42852
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
42824
|
-
href: "https://tina.io/docs/
|
|
42853
|
+
href: "https://tina.io/docs/r/what-is-tinacloud/"
|
|
42825
42854
|
},
|
|
42826
42855
|
"Learn more about moving to production with TinaCloud."
|
|
42827
42856
|
)), /* @__PURE__ */ React__namespace.createElement("p", null, /* @__PURE__ */ React__namespace.createElement(
|
|
42828
42857
|
Button$1,
|
|
42829
42858
|
{
|
|
42830
|
-
href: "https://tina.io/docs/
|
|
42859
|
+
href: "https://tina.io/docs/r/what-is-tinacloud/",
|
|
42831
42860
|
target: "_blank",
|
|
42832
42861
|
as: "a"
|
|
42833
42862
|
},
|
|
@@ -43744,18 +43773,14 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
43744
43773
|
}
|
|
43745
43774
|
let res;
|
|
43746
43775
|
if (!this.isLocal) {
|
|
43747
|
-
|
|
43748
|
-
|
|
43749
|
-
|
|
43750
|
-
|
|
43751
|
-
|
|
43752
|
-
|
|
43753
|
-
|
|
43754
|
-
|
|
43755
|
-
throw E_BAD_ROUTE;
|
|
43756
|
-
}
|
|
43757
|
-
} else {
|
|
43758
|
-
throw new Error("Not authenticated");
|
|
43776
|
+
res = await this.api.authProvider.fetchWithToken(
|
|
43777
|
+
`${this.url}/list/${options.directory || ""}?limit=${options.limit || 20}${options.offset ? `&cursor=${options.offset}` : ""}`
|
|
43778
|
+
);
|
|
43779
|
+
if (res.status == 401) {
|
|
43780
|
+
throw E_UNAUTHORIZED;
|
|
43781
|
+
}
|
|
43782
|
+
if (res.status == 404) {
|
|
43783
|
+
throw E_BAD_ROUTE;
|
|
43759
43784
|
}
|
|
43760
43785
|
} else {
|
|
43761
43786
|
res = await this.fetchFunction(
|
|
@@ -43955,18 +43980,17 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
43955
43980
|
const E_UNAUTHORIZED = new MediaListError({
|
|
43956
43981
|
title: "Unauthorized",
|
|
43957
43982
|
message: "You don't have access to this resource.",
|
|
43958
|
-
docsLink: "https://tina.io/docs/
|
|
43983
|
+
docsLink: "https://tina.io/docs/r/repo-based-media"
|
|
43959
43984
|
});
|
|
43960
43985
|
const E_BAD_ROUTE = new MediaListError({
|
|
43961
43986
|
title: "Bad Route",
|
|
43962
43987
|
message: "The Cloudinary API route is missing or misconfigured.",
|
|
43963
|
-
docsLink: "https://tina.io/docs/
|
|
43988
|
+
docsLink: "https://tina.io/docs/r/backend-media-handler/"
|
|
43964
43989
|
});
|
|
43965
43990
|
new MediaListError({
|
|
43966
43991
|
title: "An Error Occurred",
|
|
43967
43992
|
message: "Something went wrong accessing your media from TinaCloud.",
|
|
43968
|
-
docsLink: ""
|
|
43969
|
-
// TODO
|
|
43993
|
+
docsLink: "https://tina.io/docs/r/repo-based-media"
|
|
43970
43994
|
});
|
|
43971
43995
|
class Flags {
|
|
43972
43996
|
constructor(events2) {
|
|
@@ -44110,7 +44134,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44110
44134
|
"a",
|
|
44111
44135
|
{
|
|
44112
44136
|
className: "text-blue-500 underline",
|
|
44113
|
-
href: "https://tina.io/docs/
|
|
44137
|
+
href: "https://tina.io/docs/r/custom-fields-react",
|
|
44114
44138
|
target: "_blank",
|
|
44115
44139
|
rel: "noreferrer noopener"
|
|
44116
44140
|
},
|
|
@@ -44314,7 +44338,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44314
44338
|
}
|
|
44315
44339
|
const thumbnail = (item.thumbnails || {})["400x400"];
|
|
44316
44340
|
const itemIsImage = isImage(thumbnail);
|
|
44317
|
-
return /* @__PURE__ */ React.createElement("li", { className: "block
|
|
44341
|
+
return /* @__PURE__ */ React.createElement("li", { className: "block flex justify-center shrink-0 w-full transition duration-150 ease-out" }, /* @__PURE__ */ React.createElement(
|
|
44318
44342
|
"button",
|
|
44319
44343
|
{
|
|
44320
44344
|
className: cn(
|
|
@@ -44332,6 +44356,17 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44332
44356
|
}
|
|
44333
44357
|
}
|
|
44334
44358
|
},
|
|
44359
|
+
/* @__PURE__ */ React.createElement(
|
|
44360
|
+
"span",
|
|
44361
|
+
{
|
|
44362
|
+
className: cn(
|
|
44363
|
+
"absolute bottom-0 left-0 w-full text-xs text-white px-2 py-1 truncate z-10",
|
|
44364
|
+
active ? "bg-blue-500/60" : "bg-black/60"
|
|
44365
|
+
),
|
|
44366
|
+
style: { pointerEvents: "none" }
|
|
44367
|
+
},
|
|
44368
|
+
item.filename
|
|
44369
|
+
),
|
|
44335
44370
|
item.new && /* @__PURE__ */ React.createElement("span", { className: "absolute top-1 right-1 rounded shadow bg-green-100 border border-green-200 text-[10px] tracking-wide font-bold text-green-600 px-1.5 py-0.5 z-10" }, "NEW"),
|
|
44336
44371
|
/* @__PURE__ */ React.createElement("div", { className: "relative w-full flex items-center justify-center" }, itemIsImage ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
44337
44372
|
"img",
|
|
@@ -44344,16 +44379,6 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44344
44379
|
src: thumbnail,
|
|
44345
44380
|
alt: item.filename
|
|
44346
44381
|
}
|
|
44347
|
-
), /* @__PURE__ */ React.createElement(
|
|
44348
|
-
"span",
|
|
44349
|
-
{
|
|
44350
|
-
className: cn(
|
|
44351
|
-
"absolute bottom-0 left-0 w-full text-xs text-white px-2 py-1 truncate z-10",
|
|
44352
|
-
active ? "bg-blue-500/60" : "bg-black/60"
|
|
44353
|
-
),
|
|
44354
|
-
style: { pointerEvents: "none" }
|
|
44355
|
-
},
|
|
44356
|
-
item.filename
|
|
44357
44382
|
)) : /* @__PURE__ */ React.createElement("div", { className: "p-4 w-full flex flex-col gap-4 items-center justify-center" }, /* @__PURE__ */ React.createElement(FileIcon, { className: "w-[30%] h-auto fill-gray-300" }), /* @__PURE__ */ React.createElement("span", { className: "block text-base text-gray-600 w-full break-words truncate" }, item.filename)))
|
|
44358
44383
|
));
|
|
44359
44384
|
}
|
|
@@ -44449,7 +44474,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44449
44474
|
const defaultListError = new MediaListError({
|
|
44450
44475
|
title: "Error fetching media",
|
|
44451
44476
|
message: "Something went wrong while requesting the resource.",
|
|
44452
|
-
docsLink: "https://tina.io/docs/media
|
|
44477
|
+
docsLink: "https://tina.io/docs/r/repo-based-media"
|
|
44453
44478
|
});
|
|
44454
44479
|
function MediaPicker({
|
|
44455
44480
|
allowDelete,
|
|
@@ -44669,7 +44694,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44669
44694
|
{
|
|
44670
44695
|
title: "No Media Store Configured",
|
|
44671
44696
|
message: "To use the media manager, you need to configure a Media Store.",
|
|
44672
|
-
docsLink: "https://tina.io/docs/
|
|
44697
|
+
docsLink: "https://tina.io/docs/r/repo-based-media"
|
|
44673
44698
|
}
|
|
44674
44699
|
);
|
|
44675
44700
|
}
|
|
@@ -44825,8 +44850,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44825
44850
|
variant: "primary",
|
|
44826
44851
|
onClick: () => selectMediaItem(activeItem)
|
|
44827
44852
|
},
|
|
44828
|
-
"
|
|
44829
|
-
|
|
44853
|
+
/* @__PURE__ */ React.createElement(BiArrowToBottom, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
|
|
44854
|
+
"Insert"
|
|
44830
44855
|
), allowDelete && /* @__PURE__ */ React.createElement(
|
|
44831
44856
|
Button$1,
|
|
44832
44857
|
{
|
|
@@ -44834,8 +44859,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
44834
44859
|
size: "medium",
|
|
44835
44860
|
onClick: deleteMediaItem
|
|
44836
44861
|
},
|
|
44837
|
-
"
|
|
44838
|
-
|
|
44862
|
+
/* @__PURE__ */ React.createElement(TrashIcon, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
|
|
44863
|
+
"Delete"
|
|
44839
44864
|
))))
|
|
44840
44865
|
);
|
|
44841
44866
|
};
|
|
@@ -45157,19 +45182,35 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
45157
45182
|
function PiSidebarSimpleLight(props) {
|
|
45158
45183
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 256 256", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z" }, "child": [] }] })(props);
|
|
45159
45184
|
}
|
|
45160
|
-
const
|
|
45185
|
+
const Callout = ({
|
|
45161
45186
|
children,
|
|
45162
|
-
|
|
45187
|
+
calloutStyle = "warning",
|
|
45163
45188
|
className = "",
|
|
45164
45189
|
...props
|
|
45165
45190
|
}) => {
|
|
45191
|
+
const commonAlertStyles = "ml-8 text-sm px-4 py-3 rounded-md border";
|
|
45166
45192
|
const styles = {
|
|
45167
|
-
warning:
|
|
45193
|
+
warning: `text-amber-700 bg-amber-100 border-amber-700/20`,
|
|
45194
|
+
info: `text-blue-600 bg-blue-100/50 border-blue-600/20`,
|
|
45195
|
+
success: `text-green-600 bg-green-100/50 border-green-600/20`,
|
|
45196
|
+
error: `text-red-600 bg-red-100/50 border-red-600/20`
|
|
45168
45197
|
};
|
|
45169
45198
|
const icon = {
|
|
45170
|
-
warning: /* @__PURE__ */ React__namespace.createElement(
|
|
45199
|
+
warning: /* @__PURE__ */ React__namespace.createElement(MdWarning, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-amber-600" }),
|
|
45200
|
+
info: /* @__PURE__ */ React__namespace.createElement(MdInfo, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-[#1D4ED8]" }),
|
|
45201
|
+
success: /* @__PURE__ */ React__namespace.createElement(MdCheckCircle, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-green-600" }),
|
|
45202
|
+
error: /* @__PURE__ */ React__namespace.createElement(MdError, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-red-600" })
|
|
45171
45203
|
};
|
|
45172
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
45204
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
45205
|
+
"div",
|
|
45206
|
+
{
|
|
45207
|
+
className: cn$1(commonAlertStyles, styles[calloutStyle], className),
|
|
45208
|
+
...props
|
|
45209
|
+
},
|
|
45210
|
+
icon[calloutStyle],
|
|
45211
|
+
" ",
|
|
45212
|
+
children
|
|
45213
|
+
);
|
|
45173
45214
|
};
|
|
45174
45215
|
const LocalWarning = () => {
|
|
45175
45216
|
var _a2, _b;
|
|
@@ -45178,7 +45219,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
45178
45219
|
if (!isLocalMode) {
|
|
45179
45220
|
return null;
|
|
45180
45221
|
}
|
|
45181
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
45222
|
+
return /* @__PURE__ */ React__namespace.createElement(Callout, { calloutStyle: "warning", className: "w-fit" }, /* @__PURE__ */ React__namespace.createElement("a", { href: "https://tina.io/docs/r/what-is-tinacloud/", target: "_blank" }, "You are in local mode"));
|
|
45182
45223
|
};
|
|
45183
45224
|
const BillingWarning = () => {
|
|
45184
45225
|
var _a2;
|
|
@@ -45919,7 +45960,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
45919
45960
|
requiredArgs(1, arguments);
|
|
45920
45961
|
return formatDistance(dirtyDate, Date.now(), options);
|
|
45921
45962
|
}
|
|
45922
|
-
const version$1 = "2.
|
|
45963
|
+
const version$1 = "2.9.1";
|
|
45923
45964
|
const VersionInfo = () => {
|
|
45924
45965
|
var _a2, _b, _c, _d, _e, _f;
|
|
45925
45966
|
const cms = useCMS();
|
|
@@ -46144,11 +46185,11 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
46144
46185
|
},
|
|
46145
46186
|
{ Site: [] }
|
|
46146
46187
|
);
|
|
46147
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
|
|
46188
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-baseline" }, /* @__PURE__ */ React__namespace.createElement(
|
|
46148
46189
|
"button",
|
|
46149
46190
|
{
|
|
46150
46191
|
className: cn(
|
|
46151
|
-
"
|
|
46192
|
+
"pointer-events-auto p-4 hover:bg-gray-100 transition-colors duration-150 ease-in-out rounded z-10",
|
|
46152
46193
|
menuIsOpen ? "hidden" : ""
|
|
46153
46194
|
),
|
|
46154
46195
|
onClick: () => {
|
|
@@ -46156,7 +46197,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
46156
46197
|
}
|
|
46157
46198
|
},
|
|
46158
46199
|
/* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-6 w-auto text-gray-600" })
|
|
46159
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
46200
|
+
)), /* @__PURE__ */ React__namespace.createElement(
|
|
46160
46201
|
"div",
|
|
46161
46202
|
{
|
|
46162
46203
|
className: cn(
|
|
@@ -46182,7 +46223,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
46182
46223
|
/* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col px-6 flex-1 overflow-auto" }, showCollections && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("h4", { className: "flex space-x-1 justify-items-start uppercase font-sans font-bold text-sm mb-3 mt-8 text-gray-700" }, /* @__PURE__ */ React__namespace.createElement("span", null, "Collections"), isLocalMode && /* @__PURE__ */ React__namespace.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
46183
46224
|
"a",
|
|
46184
46225
|
{
|
|
46185
|
-
href: "https://tina.io/docs/
|
|
46226
|
+
href: "https://tina.io/docs/r/content-modelling-collections",
|
|
46186
46227
|
target: "_blank"
|
|
46187
46228
|
},
|
|
46188
46229
|
/* @__PURE__ */ React__namespace.createElement(FiInfo, null)
|
|
@@ -46626,12 +46667,12 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
46626
46667
|
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pt-5" }, /* @__PURE__ */ React__namespace.createElement(
|
|
46627
46668
|
Button$1,
|
|
46628
46669
|
{
|
|
46629
|
-
href: "https://tina.io/docs/
|
|
46670
|
+
href: "https://tina.io/docs/r/visual-editing-setup",
|
|
46630
46671
|
target: "_blank",
|
|
46631
46672
|
as: "a"
|
|
46632
46673
|
},
|
|
46633
46674
|
/* @__PURE__ */ React__namespace.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
46634
|
-
"
|
|
46675
|
+
" Visual Editing Docs"
|
|
46635
46676
|
))
|
|
46636
46677
|
);
|
|
46637
46678
|
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -47280,7 +47321,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
47280
47321
|
name: "Support",
|
|
47281
47322
|
link: {
|
|
47282
47323
|
text: "Support",
|
|
47283
|
-
href: "https://tina.io/docs/support"
|
|
47324
|
+
href: "https://tina.io/docs/r/support"
|
|
47284
47325
|
},
|
|
47285
47326
|
Icon: MdOutlineHelpOutline
|
|
47286
47327
|
})
|
|
@@ -47617,7 +47658,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
47617
47658
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "fixed bottom-0 left-0 right-0 p-6 flex flex-col items-center z-[999999]" }, alerts.all.filter((alert) => {
|
|
47618
47659
|
return alert.level !== "error";
|
|
47619
47660
|
}).map((alert) => {
|
|
47620
|
-
return /* @__PURE__ */ React.createElement(Alert, { key: alert.id, level: alert.level }, alert.level === "info" && /* @__PURE__ */ React.createElement(
|
|
47661
|
+
return /* @__PURE__ */ React.createElement(Alert, { key: alert.id, level: alert.level }, alert.level === "info" && /* @__PURE__ */ React.createElement(MdInfo, { className: "w-5 h-auto opacity-70" }), alert.level === "success" && /* @__PURE__ */ React.createElement(MdCheckCircle, { className: "w-5 h-auto opacity-70" }), alert.level === "warn" && /* @__PURE__ */ React.createElement(MdWarning, { className: "w-5 h-auto opacity-70" }), /* @__PURE__ */ React.createElement("p", { className: "m-0 flex-1 max-w-[680px] text-left" }, parseUrlsInText(alert.message.toString())), /* @__PURE__ */ React.createElement(
|
|
47621
47662
|
CloseAlert,
|
|
47622
47663
|
{
|
|
47623
47664
|
onClick: () => {
|
|
@@ -47638,7 +47679,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
47638
47679
|
alerts.dismiss(alert);
|
|
47639
47680
|
}
|
|
47640
47681
|
},
|
|
47641
|
-
/* @__PURE__ */ React.createElement(
|
|
47682
|
+
/* @__PURE__ */ React.createElement(MdError, { className: "mr-1 w-6 h-auto fill-current inline-block text-red-600" }),
|
|
47642
47683
|
" ",
|
|
47643
47684
|
"Error"
|
|
47644
47685
|
), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("div", { className: "tina-prose" }, /* @__PURE__ */ React.createElement(AlertMessage, null))), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement("div", { className: "flex-1" }), /* @__PURE__ */ React.createElement(
|
|
@@ -47672,7 +47713,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
47672
47713
|
return /* @__PURE__ */ React.createElement(
|
|
47673
47714
|
"div",
|
|
47674
47715
|
{
|
|
47675
|
-
className: `rounded shadow-lg
|
|
47716
|
+
className: `rounded shadow-lg font-normal cursor-pointer pointer-events-all text-sm transition-all duration-100 ease-out mb-4 max-w-full ${colorClasses[level]}}`,
|
|
47676
47717
|
style: {
|
|
47677
47718
|
animationName: "fly-in-up, fade-in",
|
|
47678
47719
|
animationTimingFunction: "ease-out",
|
|
@@ -47684,7 +47725,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
47684
47725
|
/* @__PURE__ */ React.createElement(
|
|
47685
47726
|
"div",
|
|
47686
47727
|
{
|
|
47687
|
-
className: `flex items-center gap-1.5 min-w-[350px] rounded-
|
|
47728
|
+
className: `flex items-center gap-1.5 min-w-[350px] rounded-md border p-2 ${borderClasses[level]}`,
|
|
47688
47729
|
...props
|
|
47689
47730
|
}
|
|
47690
47731
|
)
|
|
@@ -47696,7 +47737,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
|
|
|
47696
47737
|
className: "border-none bg-transparent p-0 outline-none flex items-center",
|
|
47697
47738
|
...styleProps
|
|
47698
47739
|
},
|
|
47699
|
-
/* @__PURE__ */ React.createElement(BiX, { className: "w-5 auto flex-grow-0 flex-shrink-0
|
|
47740
|
+
/* @__PURE__ */ React.createElement(BiX, { className: "w-5 auto flex-grow-0 flex-shrink-0" })
|
|
47700
47741
|
);
|
|
47701
47742
|
function CursorPaginator({
|
|
47702
47743
|
navigateNext,
|
|
@@ -63795,7 +63836,9 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
|
|
|
63795
63836
|
const tinaApi = cms.api.tina;
|
|
63796
63837
|
const { setCurrentBranch } = useBranchData();
|
|
63797
63838
|
const [disabled, setDisabled] = React__namespace.useState(false);
|
|
63798
|
-
const [newBranchName, setNewBranchName] = React__namespace.useState(
|
|
63839
|
+
const [newBranchName, setNewBranchName] = React__namespace.useState(
|
|
63840
|
+
`${crudType}-${path2}`
|
|
63841
|
+
);
|
|
63799
63842
|
const [isExecuting, setIsExecuting] = React__namespace.useState(false);
|
|
63800
63843
|
const [errorMessage, setErrorMessage] = React__namespace.useState("");
|
|
63801
63844
|
const [currentStep, setCurrentStep] = React__namespace.useState(0);
|
|
@@ -64007,7 +64050,15 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
|
|
|
64007
64050
|
if (isExecuting) {
|
|
64008
64051
|
return renderProgressIndicator();
|
|
64009
64052
|
} else {
|
|
64010
|
-
return /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React__namespace.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React__namespace.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "
|
|
64053
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React__namespace.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React__namespace.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "First, let's create a copy"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, you need to create a copy then get it approved and merged for it to go live. Learn more about", " ", /* @__PURE__ */ React__namespace.createElement(
|
|
64054
|
+
"a",
|
|
64055
|
+
{
|
|
64056
|
+
className: "underline hover:text-tina-orange",
|
|
64057
|
+
href: "https://tina.io/docs/tinacloud/editorial-workflow",
|
|
64058
|
+
target: "_blank"
|
|
64059
|
+
},
|
|
64060
|
+
"Editorial Workflow"
|
|
64061
|
+
), "."), /* @__PURE__ */ React__namespace.createElement(
|
|
64011
64062
|
PrefixedTextField,
|
|
64012
64063
|
{
|
|
64013
64064
|
placeholder: "e.g. {{PAGE-NAME}}-updates",
|
|
@@ -64029,7 +64080,7 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
|
|
|
64029
64080
|
disabled: newBranchName === "" || disabled,
|
|
64030
64081
|
onClick: executeEditorialWorkflow
|
|
64031
64082
|
},
|
|
64032
|
-
"
|
|
64083
|
+
"Continue"
|
|
64033
64084
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
64034
64085
|
OverflowMenu$1,
|
|
64035
64086
|
{
|
|
@@ -118985,7 +119036,7 @@ mutation addPendingDocumentMutation(
|
|
|
118985
119036
|
}
|
|
118986
119037
|
usingProtectedBranch() {
|
|
118987
119038
|
var _a2;
|
|
118988
|
-
return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(this.branch));
|
|
119039
|
+
return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(decodeURIComponent(this.branch)));
|
|
118989
119040
|
}
|
|
118990
119041
|
async createBranch({ baseBranch, branchName }) {
|
|
118991
119042
|
const url = `${this.contentApiBase}/github/${this.clientId}/create_branch`;
|
|
@@ -119894,7 +119945,7 @@ mutation addPendingDocumentMutation(
|
|
|
119894
119945
|
{
|
|
119895
119946
|
className: "text-gray-600",
|
|
119896
119947
|
style: { textDecoration: "underline" },
|
|
119897
|
-
href: "https://tina.io/docs/
|
|
119948
|
+
href: "https://tina.io/docs/r/FAQ/",
|
|
119898
119949
|
target: "_blank"
|
|
119899
119950
|
},
|
|
119900
119951
|
" ",
|
|
@@ -119952,7 +120003,7 @@ mutation addPendingDocumentMutation(
|
|
|
119952
120003
|
!schema.config.contentApiUrlOverride
|
|
119953
120004
|
) {
|
|
119954
120005
|
throw new Error(
|
|
119955
|
-
"Invalid setup. See https://tina.io/docs/
|
|
120006
|
+
"Invalid setup. See https://tina.io/docs/r/what-is-tinacloud for more information."
|
|
119956
120007
|
);
|
|
119957
120008
|
}
|
|
119958
120009
|
if (!schema) {
|
|
@@ -120286,7 +120337,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120286
120337
|
{
|
|
120287
120338
|
className: "text-gray-600",
|
|
120288
120339
|
style: { textDecoration: "underline" },
|
|
120289
|
-
href: "https://tina.io/docs/
|
|
120340
|
+
href: "https://tina.io/docs/r/FAQ/",
|
|
120290
120341
|
target: "_blank"
|
|
120291
120342
|
},
|
|
120292
120343
|
" ",
|
|
@@ -120412,7 +120463,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120412
120463
|
headerClassName,
|
|
120413
120464
|
children
|
|
120414
120465
|
}) => {
|
|
120415
|
-
return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50
|
|
120466
|
+
return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, /* @__PURE__ */ React.createElement("div", { className: `py-2 pl-4 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "flex justify-between items-center" }, /* @__PURE__ */ React.createElement(BranchButton, null), /* @__PURE__ */ React.createElement(BranchPreviewButton, null))), children);
|
|
120416
120467
|
};
|
|
120417
120468
|
const PageHeader = ({
|
|
120418
120469
|
children
|
|
@@ -120517,6 +120568,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120517
120568
|
const plugins2 = cms.plugins.all("tina-admin");
|
|
120518
120569
|
const routeMapping = plugins2.find(({ name }) => name === "route-mapping");
|
|
120519
120570
|
const tinaPreview = cms.flags.get("tina-preview") || false;
|
|
120571
|
+
const basePath = cms.flags.get("tina-basepath");
|
|
120520
120572
|
let routeOverride = ((_a2 = collectionDefinition.ui) == null ? void 0 : _a2.router) ? await ((_b = collectionDefinition.ui) == null ? void 0 : _b.router({
|
|
120521
120573
|
document: document2,
|
|
120522
120574
|
collection: collectionDefinition
|
|
@@ -120525,7 +120577,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120525
120577
|
if (routeOverride.startsWith("/")) {
|
|
120526
120578
|
routeOverride = routeOverride.slice(1);
|
|
120527
120579
|
}
|
|
120528
|
-
tinaPreview ? navigate(
|
|
120580
|
+
tinaPreview ? navigate(`/~${basePath ? `/${basePath}` : ""}/${routeOverride}`) : window.location.href = `${basePath ? `/${basePath}` : ""}/${routeOverride}`;
|
|
120529
120581
|
return null;
|
|
120530
120582
|
} else {
|
|
120531
120583
|
const pathToDoc = document2._sys.breadcrumbs;
|
|
@@ -120803,7 +120855,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120803
120855
|
},
|
|
120804
120856
|
close: () => setFolderModalOpen(false)
|
|
120805
120857
|
}
|
|
120806
|
-
), /* @__PURE__ */ React.createElement(PageHeader, null, /* @__PURE__ */ React.createElement("div", { className: "w-full" }, /* @__PURE__ */ React.createElement("h3", { className: "font-sans text-2xl text-
|
|
120858
|
+
), /* @__PURE__ */ React.createElement(PageHeader, null, /* @__PURE__ */ React.createElement("div", { className: "w-full" }, /* @__PURE__ */ React.createElement("h3", { className: "font-sans text-2xl text-tina-orange" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col lg:flex-row justify-between lg:items-end pt-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row gap-2 md:gap-4 items-baseline" }, (fields == null ? void 0 : fields.length) > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, !search && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2 items-start w-full md:w-auto" }, /* @__PURE__ */ React.createElement(
|
|
120807
120859
|
"label",
|
|
120808
120860
|
{
|
|
120809
120861
|
htmlFor: "sort",
|
|
@@ -120858,7 +120910,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120858
120910
|
}
|
|
120859
120911
|
}
|
|
120860
120912
|
}
|
|
120861
|
-
))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-1 flex-
|
|
120913
|
+
))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-1 flex-row gap-2 items-end w-full" }, searchEnabled ? /* @__PURE__ */ React.createElement(
|
|
120862
120914
|
SearchInput,
|
|
120863
120915
|
{
|
|
120864
120916
|
loading: _loading,
|
|
@@ -120867,16 +120919,15 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120867
120919
|
searchInput,
|
|
120868
120920
|
setSearchInput
|
|
120869
120921
|
}
|
|
120870
|
-
) : /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2 items-start w-full md:w-auto" }, /* @__PURE__ */ React.createElement("div", { className: "
|
|
120871
|
-
|
|
120922
|
+
) : /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2 items-start w-full md:w-auto" }, /* @__PURE__ */ React.createElement("div", { className: "block font-sans text-xs font-semibold opacity-0" }, " "), /* @__PURE__ */ React.createElement(Callout, { calloutStyle: "info" }, " ", "You have not configured search.", " ", /* @__PURE__ */ React.createElement(
|
|
120923
|
+
"a",
|
|
120872
120924
|
{
|
|
120873
|
-
|
|
120874
|
-
|
|
120875
|
-
|
|
120876
|
-
size: "small"
|
|
120925
|
+
href: "https://tina.io/docs/r/content-search",
|
|
120926
|
+
target: "_blank",
|
|
120927
|
+
className: "underline hover:text-blue-700 transition-all duration-150"
|
|
120877
120928
|
},
|
|
120878
|
-
"
|
|
120879
|
-
)))), allowCreate && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-2 md:gap-0 pt-4 lg:pt-0" }, allowCreateNestedFolder && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
|
|
120929
|
+
"Read the docs"
|
|
120930
|
+
))))), allowCreate && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-2 md:gap-0 pt-4 lg:pt-0" }, allowCreateNestedFolder && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
|
|
120880
120931
|
reactRouterDom.Link,
|
|
120881
120932
|
{
|
|
120882
120933
|
onMouseDown: (evt) => {
|
|
@@ -120908,15 +120959,15 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120908
120959
|
side: "top",
|
|
120909
120960
|
align: "center"
|
|
120910
120961
|
},
|
|
120911
|
-
/* @__PURE__ */ React.createElement("p", null, "Folders can
|
|
120962
|
+
/* @__PURE__ */ React.createElement("p", null, "Folders can't be manually added when using templates.", /* @__PURE__ */ React.createElement("br", null), "See the docs -", " ", /* @__PURE__ */ React.createElement(
|
|
120912
120963
|
"a",
|
|
120913
120964
|
{
|
|
120914
|
-
href: "https://tina.io/docs/
|
|
120965
|
+
href: "https://tina.io/docs/r/content-modelling-templates",
|
|
120915
120966
|
target: "_blank",
|
|
120916
120967
|
rel: "noopener noreferrer",
|
|
120917
120968
|
className: "underline text-blue-500"
|
|
120918
120969
|
},
|
|
120919
|
-
"https://tina.io/docs/
|
|
120970
|
+
"https://tina.io/docs/r/content-modelling-templates"
|
|
120920
120971
|
))
|
|
120921
120972
|
)))), !collection.templates && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
120922
120973
|
reactRouterDom.Link,
|
|
@@ -120943,7 +120994,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120943
120994
|
templates: collection.templates,
|
|
120944
120995
|
folder
|
|
120945
120996
|
}
|
|
120946
|
-
))))), /* @__PURE__ */ React.createElement(PageBody, null, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React.createElement("em", null, "Sorting on a non-required field. Some documents may be excluded (if they don't have a value for", " ", sortName, ")")), /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-x-auto" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React.createElement("table", { className: "table-auto shadow bg-white border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React.createElement("tbody",
|
|
120997
|
+
))))), /* @__PURE__ */ React.createElement(PageBody, null, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React.createElement("em", null, "Sorting on a non-required field. Some documents may be excluded (if they don't have a value for", " ", sortName, ")")), /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-x-auto shadow-md rounded-md" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React.createElement("table", { className: "table-auto shadow bg-white border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React.createElement("tbody", null, folder.name && !search ? /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React.createElement(
|
|
120947
120998
|
Breadcrumb,
|
|
120948
120999
|
{
|
|
120949
121000
|
folder,
|
|
@@ -120988,6 +121039,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
120988
121039
|
return /* @__PURE__ */ React.createElement(
|
|
120989
121040
|
"tr",
|
|
120990
121041
|
{
|
|
121042
|
+
className: "hover:bg-gray-100 transition-colors duration-300",
|
|
120991
121043
|
key: `document-${document2.node._sys.relativePath}`
|
|
120992
121044
|
},
|
|
120993
121045
|
/* @__PURE__ */ React.createElement(
|
|
@@ -121062,15 +121114,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
121062
121114
|
}
|
|
121063
121115
|
},
|
|
121064
121116
|
allowDelete && {
|
|
121065
|
-
name: "
|
|
121066
|
-
label: "
|
|
121067
|
-
Icon: /* @__PURE__ */ React.createElement(
|
|
121068
|
-
BiTrash,
|
|
121069
|
-
{
|
|
121070
|
-
size: "1.3rem",
|
|
121071
|
-
className: "text-red-500"
|
|
121072
|
-
}
|
|
121073
|
-
),
|
|
121117
|
+
name: "rename",
|
|
121118
|
+
label: "Rename",
|
|
121119
|
+
Icon: /* @__PURE__ */ React.createElement(BiRename, { size: "1.3rem" }),
|
|
121074
121120
|
onMouseDown: () => {
|
|
121075
121121
|
setVars((old) => ({
|
|
121076
121122
|
...old,
|
|
@@ -121083,19 +121129,20 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
121083
121129
|
) + document2.node._sys.extension,
|
|
121084
121130
|
newRelativePath: ""
|
|
121085
121131
|
}));
|
|
121086
|
-
|
|
121132
|
+
setRenameModalOpen(true);
|
|
121087
121133
|
}
|
|
121088
121134
|
},
|
|
121089
121135
|
allowDelete && {
|
|
121090
|
-
name: "
|
|
121091
|
-
label: "
|
|
121136
|
+
name: "delete",
|
|
121137
|
+
label: "Delete",
|
|
121092
121138
|
Icon: /* @__PURE__ */ React.createElement(
|
|
121093
|
-
|
|
121139
|
+
BiTrash,
|
|
121094
121140
|
{
|
|
121095
121141
|
size: "1.3rem",
|
|
121096
121142
|
className: "text-red-500"
|
|
121097
121143
|
}
|
|
121098
121144
|
),
|
|
121145
|
+
className: "text-red-500",
|
|
121099
121146
|
onMouseDown: () => {
|
|
121100
121147
|
setVars((old) => ({
|
|
121101
121148
|
...old,
|
|
@@ -121108,7 +121155,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
121108
121155
|
) + document2.node._sys.extension,
|
|
121109
121156
|
newRelativePath: ""
|
|
121110
121157
|
}));
|
|
121111
|
-
|
|
121158
|
+
setDeleteModalOpen(true);
|
|
121112
121159
|
}
|
|
121113
121160
|
}
|
|
121114
121161
|
].filter(Boolean)
|
|
@@ -122067,7 +122114,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
122067
122114
|
const selectedScreen = screens.find(
|
|
122068
122115
|
({ name }) => slugify(name) === screenName
|
|
122069
122116
|
);
|
|
122070
|
-
return /* @__PURE__ */ React.createElement("div", { className: "relative w-full h-full flex flex-col items-stretch justify-between" }, /* @__PURE__ */ React.createElement("div", { className: "
|
|
122117
|
+
return /* @__PURE__ */ React.createElement("div", { className: "relative w-full h-full flex flex-col items-stretch justify-between" }, /* @__PURE__ */ React.createElement("div", { className: "py-2 px-6 w-fit " }, /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement(BillingWarning, null)), /* @__PURE__ */ React.createElement(
|
|
122071
122118
|
"div",
|
|
122072
122119
|
{
|
|
122073
122120
|
className: `xl:hidden pl-6 py-5 border-b border-gray-200 bg-white`
|