tinacms 1.6.4 → 1.6.6
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/index.js +108 -98
- package/dist/index.mjs +107 -97
- package/dist/toolkit/components/media/utils.d.ts +1 -0
- package/dist/toolkit/core/media-store.default.d.ts +1 -0
- package/dist/toolkit/core/media.d.ts +5 -0
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/react-datetime/DateTime.d.ts +9 -0
- package/dist/toolkit/react-datetime/views/DaysView.d.ts +1 -0
- package/dist/toolkit/react-datetime/views/MonthsView.d.ts +1 -0
- package/dist/toolkit/react-datetime/views/TimeView.d.ts +9 -0
- package/dist/toolkit/react-datetime/views/YearsView.d.ts +1 -0
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +1 -1
- package/package.json +12 -21
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/plate-headless"), require("@monaco-editor/react"), require("slate-react"), require("@headlessui/react"), require("slate"), require("final-form-arrays"), require("final-form-set-field-data"), require("final-form"), require("react-final-form"), require("prop-types"), require("react-beautiful-dnd"), require("@radix-ui/react-popover"), require("react-color"), require("color-string"), require("react-dropzone"), require("@tinacms/sharedctx"), require("lodash.get"), require("moment"), require("date-fns"), require("
|
|
3
|
-
})(this, function(exports2, zod, React, reactDom, plateHeadless, MonacoEditor, slateReact, react, slate, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, Popover$1, pkg$1, pkg, dropzone, sharedctx, get, moment, dateFns,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/plate-headless"), require("@monaco-editor/react"), require("slate-react"), require("@headlessui/react"), require("slate"), require("final-form-arrays"), require("final-form-set-field-data"), require("final-form"), require("react-final-form"), require("prop-types"), require("react-beautiful-dnd"), require("@radix-ui/react-popover"), require("react-color"), require("color-string"), require("react-dropzone"), require("@tinacms/sharedctx"), require("lodash.get"), require("moment"), require("date-fns"), require("is-hotkey"), require("@floating-ui/dom"), require("@react-hook/window-size"), require("graphql"), require("graphql-tag"), require("@tinacms/schema-tools"), require("yup"), require("@graphql-inspector/core"), require("react-router-dom"), require("@tinacms/mdx")) : typeof define === "function" && define.amd ? define(["exports", "zod", "react", "react-dom", "@udecode/plate-headless", "@monaco-editor/react", "slate-react", "@headlessui/react", "slate", "final-form-arrays", "final-form-set-field-data", "final-form", "react-final-form", "prop-types", "react-beautiful-dnd", "@radix-ui/react-popover", "react-color", "color-string", "react-dropzone", "@tinacms/sharedctx", "lodash.get", "moment", "date-fns", "is-hotkey", "@floating-ui/dom", "@react-hook/window-size", "graphql", "graphql-tag", "@tinacms/schema-tools", "yup", "@graphql-inspector/core", "react-router-dom", "@tinacms/mdx"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP));
|
|
3
|
+
})(this, function(exports2, zod, React, reactDom, plateHeadless, MonacoEditor, slateReact, react, slate, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, Popover$1, pkg$1, pkg, dropzone, sharedctx, get, moment, dateFns, isHotkey, dom, windowSize, graphql, gql$1, schemaTools, yup, core, reactRouterDom, mdx) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -56,7 +56,7 @@ var __publicField = (obj, key, value) => {
|
|
|
56
56
|
return modalContainer;
|
|
57
57
|
}
|
|
58
58
|
const ModalOverlay = ({ children }) => {
|
|
59
|
-
return /* @__PURE__ */ React__namespace.createElement("div", { className: "fixed inset-0 z-modal w-screen h-
|
|
59
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: "fixed inset-0 z-modal w-screen h-dvh overflow-y-auto" }, children, /* @__PURE__ */ React__namespace.createElement("div", { className: "fixed -z-1 inset-0 opacity-80 bg-gradient-to-br from-gray-800 via-gray-900 to-black" }));
|
|
60
60
|
};
|
|
61
61
|
const Modal = (props) => {
|
|
62
62
|
const { portalNode } = useModalContainer();
|
|
@@ -2803,6 +2803,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2803
2803
|
function BiMenu(props) {
|
|
2804
2804
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, "child": [] }] })(props);
|
|
2805
2805
|
}
|
|
2806
|
+
function BiMovie(props) {
|
|
2807
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zm.001 6c-.001 0-.001 0 0 0h-.466l-2.667-4H20l.001 4zM9.535 9 6.868 5h2.597l2.667 4H9.535zm5 0-2.667-4h2.597l2.667 4h-2.597zM4 5h.465l2.667 4H4V5zm0 14v-8h16l.002 8H4z" }, "child": [] }] })(props);
|
|
2808
|
+
}
|
|
2806
2809
|
function BiPencil(props) {
|
|
2807
2810
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M4 21a1 1 0 0 0 .24 0l4-1a1 1 0 0 0 .47-.26L21 7.41a2 2 0 0 0 0-2.82L19.42 3a2 2 0 0 0-2.83 0L4.3 15.29a1.06 1.06 0 0 0-.27.47l-1 4A1 1 0 0 0 3.76 21 1 1 0 0 0 4 21zM18 4.41 19.59 6 18 7.59 16.42 6zM5.91 16.51 15 7.41 16.59 9l-9.1 9.1-2.11.52z" }, "child": [] }] })(props);
|
|
2808
2811
|
}
|
|
@@ -2887,13 +2890,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2887
2890
|
{
|
|
2888
2891
|
className: `rounded-lg border shadow-sm ${sizeClasses[size]} ${containerClasses[type]} ${className}`
|
|
2889
2892
|
},
|
|
2890
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
|
|
2893
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
|
|
2891
2894
|
MessageIcon,
|
|
2892
2895
|
{
|
|
2893
2896
|
type,
|
|
2894
2897
|
className: `${size === "small" ? "w-5" : "w-6"} h-auto flex-shrink-0 ${iconClasses[type]}`
|
|
2895
2898
|
}
|
|
2896
|
-
), /* @__PURE__ */ React.createElement("div", { className: `flex-1 ${textClasses[type]}` }, children), link && /* @__PURE__ */ React.createElement(
|
|
2899
|
+
), /* @__PURE__ */ React.createElement("div", { className: `flex-1 ${textClasses[type]}` }, children)), link && /* @__PURE__ */ React.createElement(
|
|
2897
2900
|
"a",
|
|
2898
2901
|
{
|
|
2899
2902
|
href: link,
|
|
@@ -3513,7 +3516,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3513
3516
|
ref.current.focus();
|
|
3514
3517
|
}
|
|
3515
3518
|
}, [field == null ? void 0 : field.experimental_focusIntent, ref]);
|
|
3516
|
-
return /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group" }, /* @__PURE__ */ React__namespace.createElement(
|
|
3519
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group w-full md:w-auto" }, /* @__PURE__ */ React__namespace.createElement(
|
|
3517
3520
|
"select",
|
|
3518
3521
|
{
|
|
3519
3522
|
id: input.name,
|
|
@@ -3715,6 +3718,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3715
3718
|
const isImage = (filename) => {
|
|
3716
3719
|
return /\.(gif|jpg|jpeg|tiff|png|svg|webp|avif)(\?.*)?$/i.test(filename);
|
|
3717
3720
|
};
|
|
3721
|
+
const isVideo = (filename) => {
|
|
3722
|
+
return /\.(mp4|webm|ogg|m4v|mov|avi|flv|mkv)(\?.*)?$/i.test(filename);
|
|
3723
|
+
};
|
|
3718
3724
|
const absoluteImgURL = (str) => {
|
|
3719
3725
|
if (str.startsWith("http"))
|
|
3720
3726
|
return str;
|
|
@@ -5870,6 +5876,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5870
5876
|
handlersMap[_this._uid] = function(event) {
|
|
5871
5877
|
if (_this.componentNode === null)
|
|
5872
5878
|
return;
|
|
5879
|
+
if (_this.initTimeStamp > event.timeStamp)
|
|
5880
|
+
return;
|
|
5873
5881
|
if (_this.props.preventDefault) {
|
|
5874
5882
|
event.preventDefault();
|
|
5875
5883
|
}
|
|
@@ -5906,6 +5914,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5906
5914
|
return _this.instanceRef = ref;
|
|
5907
5915
|
};
|
|
5908
5916
|
_this._uid = uid();
|
|
5917
|
+
_this.initTimeStamp = performance.now();
|
|
5909
5918
|
return _this;
|
|
5910
5919
|
}
|
|
5911
5920
|
var _proto = onClickOutside.prototype;
|
|
@@ -7688,6 +7697,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7688
7697
|
return fetch(input, init);
|
|
7689
7698
|
};
|
|
7690
7699
|
this.accept = DEFAULT_MEDIA_UPLOAD_TYPES;
|
|
7700
|
+
this.maxSize = 100 * 1024 * 1024;
|
|
7691
7701
|
this.parse = (img) => {
|
|
7692
7702
|
return img.src;
|
|
7693
7703
|
};
|
|
@@ -7988,6 +7998,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7988
7998
|
get accept() {
|
|
7989
7999
|
return this.store.accept;
|
|
7990
8000
|
}
|
|
8001
|
+
get maxSize() {
|
|
8002
|
+
return this.store.maxSize || void 0;
|
|
8003
|
+
}
|
|
7991
8004
|
async persist(files) {
|
|
7992
8005
|
try {
|
|
7993
8006
|
this.events.dispatch({ type: "media:upload:start", uploaded: files });
|
|
@@ -8074,7 +8087,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8074
8087
|
this.events.dispatch({ type: "flag:set", key, value });
|
|
8075
8088
|
}
|
|
8076
8089
|
}
|
|
8077
|
-
const _CMS = class {
|
|
8090
|
+
const _CMS = class _CMS2 {
|
|
8078
8091
|
/**
|
|
8079
8092
|
* @hidden
|
|
8080
8093
|
*/
|
|
@@ -8086,11 +8099,11 @@ var __publicField = (obj, key, value) => {
|
|
|
8086
8099
|
this.media = new MediaManager$1(new DummyMediaStore(), this.events);
|
|
8087
8100
|
this.enable = () => {
|
|
8088
8101
|
this._enabled = true;
|
|
8089
|
-
this.events.dispatch(
|
|
8102
|
+
this.events.dispatch(_CMS2.ENABLED);
|
|
8090
8103
|
};
|
|
8091
8104
|
this.disable = () => {
|
|
8092
8105
|
this._enabled = false;
|
|
8093
|
-
this.events.dispatch(
|
|
8106
|
+
this.events.dispatch(_CMS2.DISABLED);
|
|
8094
8107
|
};
|
|
8095
8108
|
this.toggle = () => {
|
|
8096
8109
|
if (this.enabled) {
|
|
@@ -8172,9 +8185,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8172
8185
|
return !this._enabled;
|
|
8173
8186
|
}
|
|
8174
8187
|
};
|
|
8188
|
+
_CMS.ENABLED = { type: "cms:enable" };
|
|
8189
|
+
_CMS.DISABLED = { type: "cms:disable" };
|
|
8175
8190
|
let CMS = _CMS;
|
|
8176
|
-
CMS.ENABLED = { type: "cms:enable" };
|
|
8177
|
-
CMS.DISABLED = { type: "cms:disable" };
|
|
8178
8191
|
let Alerts$1 = class Alerts {
|
|
8179
8192
|
constructor(events, map = {}) {
|
|
8180
8193
|
this.events = events;
|
|
@@ -9088,7 +9101,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9088
9101
|
const SidebarContext = React__namespace.createContext(null);
|
|
9089
9102
|
const minPreviewWidth = 440;
|
|
9090
9103
|
const minSidebarWidth = 360;
|
|
9091
|
-
const navBreakpoint =
|
|
9104
|
+
const navBreakpoint = 1279;
|
|
9092
9105
|
const LOCALSTATEKEY = "tina.sidebarState";
|
|
9093
9106
|
const LOCALWIDTHKEY = "tina.sidebarWidth";
|
|
9094
9107
|
const defaultSidebarWidth = 440;
|
|
@@ -9559,12 +9572,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9559
9572
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
9560
9573
|
"div",
|
|
9561
9574
|
{
|
|
9562
|
-
className: `fixed top-0 left-0 h-
|
|
9575
|
+
className: `fixed top-0 left-0 h-dvh z-base ${displayState === "closed" ? `pointer-events-none` : ``}`
|
|
9563
9576
|
},
|
|
9564
9577
|
/* @__PURE__ */ React__namespace.createElement(
|
|
9565
9578
|
"div",
|
|
9566
9579
|
{
|
|
9567
|
-
className: `relative h-
|
|
9580
|
+
className: `relative h-dvh transform flex ${displayState !== "closed" ? `` : `-translate-x-full`} ${resizingSidebar ? `transition-none` : displayState === "closed" ? `transition-all duration-300 ease-in` : displayState === "fullscreen" ? `transition-all duration-150 ease-out` : `transition-all duration-300 ease-out`}`,
|
|
9568
9581
|
style: {
|
|
9569
9582
|
width: displayState === "fullscreen" ? "100vw" : sidebarWidth + "px",
|
|
9570
9583
|
maxWidth: displayState === "fullscreen" ? "100vw" : "calc(100vw - 8px)",
|
|
@@ -9631,7 +9644,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9631
9644
|
return /* @__PURE__ */ React.createElement("div", { className: "w-full flex flex-shrink-0 justify-end gap-2 items-center" }, /* @__PURE__ */ React.createElement(Button, { variant, disabled: !hasPrev, onClick: navigatePrev }, /* @__PURE__ */ React.createElement(BiLeftArrowAlt, { className: "w-6 h-full mr-2 opacity-70" }), " Previous"), /* @__PURE__ */ React.createElement(Button, { variant, disabled: !hasNext, onClick: navigateNext }, "Next ", /* @__PURE__ */ React.createElement(BiRightArrowAlt, { className: "w-6 h-full ml-2 opacity-70" })));
|
|
9632
9645
|
}
|
|
9633
9646
|
function ListMediaItem({ item, onClick, active }) {
|
|
9634
|
-
|
|
9647
|
+
let FileIcon = BiFile;
|
|
9648
|
+
if (item.type === "dir") {
|
|
9649
|
+
FileIcon = BiFolder;
|
|
9650
|
+
} else if (isVideo(item.src)) {
|
|
9651
|
+
FileIcon = BiMovie;
|
|
9652
|
+
}
|
|
9635
9653
|
const thumbnail = (item.thumbnails || {})["75x75"];
|
|
9636
9654
|
return /* @__PURE__ */ React.createElement(
|
|
9637
9655
|
"li",
|
|
@@ -9664,7 +9682,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9664
9682
|
);
|
|
9665
9683
|
}
|
|
9666
9684
|
function GridMediaItem({ item, active, onClick }) {
|
|
9667
|
-
|
|
9685
|
+
let FileIcon = BiFile;
|
|
9686
|
+
if (item.type === "dir") {
|
|
9687
|
+
FileIcon = BiFolder;
|
|
9688
|
+
} else if (isVideo(item.src)) {
|
|
9689
|
+
FileIcon = BiMovie;
|
|
9690
|
+
}
|
|
9668
9691
|
const thumbnail = (item.thumbnails || {})["400x400"];
|
|
9669
9692
|
return /* @__PURE__ */ React.createElement(
|
|
9670
9693
|
"li",
|
|
@@ -9873,6 +9896,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9873
9896
|
close: close2,
|
|
9874
9897
|
...props
|
|
9875
9898
|
}) {
|
|
9899
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9876
9900
|
const cms = useCMS();
|
|
9877
9901
|
const [listState, setListState] = React.useState(() => {
|
|
9878
9902
|
if (cms.media.isConfigured)
|
|
@@ -9967,10 +9991,14 @@ var __publicField = (obj, key, value) => {
|
|
|
9967
9991
|
};
|
|
9968
9992
|
}
|
|
9969
9993
|
const [uploading, setUploading] = React.useState(false);
|
|
9994
|
+
const accept = Array.isArray(
|
|
9995
|
+
(_c = (_b = (_a = cms.api.tina.schema.schema) == null ? void 0 : _a.config) == null ? void 0 : _b.media) == null ? void 0 : _c.accept
|
|
9996
|
+
) ? (_f = (_e = (_d = cms.api.tina.schema.schema) == null ? void 0 : _d.config) == null ? void 0 : _e.media) == null ? void 0 : _f.accept.join(",") : (_i = (_h = (_g = cms.api.tina.schema.schema) == null ? void 0 : _g.config) == null ? void 0 : _h.media) == null ? void 0 : _i.accept;
|
|
9970
9997
|
const { getRootProps, getInputProps, isDragActive } = useDropzone({
|
|
9971
9998
|
accept: dropzoneAcceptFromString(
|
|
9972
|
-
cms.media.accept || DEFAULT_MEDIA_UPLOAD_TYPES
|
|
9999
|
+
accept || cms.media.accept || DEFAULT_MEDIA_UPLOAD_TYPES
|
|
9973
10000
|
),
|
|
10001
|
+
maxSize: cms.media.maxSize,
|
|
9974
10002
|
multiple: true,
|
|
9975
10003
|
onDrop: async (files, fileRejections) => {
|
|
9976
10004
|
try {
|
|
@@ -11067,16 +11095,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11067
11095
|
const openModal = () => setOpen(true);
|
|
11068
11096
|
const { currentBranch } = useBranchData();
|
|
11069
11097
|
const isProtected = cms.api.tina.usingProtectedBranch();
|
|
11070
|
-
const navBreakpoint2 = 1e3;
|
|
11071
|
-
const windowWidth = windowSize.useWindowWidth();
|
|
11072
|
-
const renderNavToggle = windowWidth < navBreakpoint2 + 1;
|
|
11073
11098
|
const previewFunction = (_d = (_c = (_b = (_a = cms.api.tina.schema) == null ? void 0 : _a.config) == null ? void 0 : _b.config) == null ? void 0 : _c.ui) == null ? void 0 : _d.previewUrl;
|
|
11074
11099
|
const branch = decodeURIComponent(cms.api.tina.branch);
|
|
11075
11100
|
const previewUrl = previewFunction ? (_e = previewFunction({ branch })) == null ? void 0 : _e.url : null;
|
|
11076
11101
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
|
|
11077
11102
|
"div",
|
|
11078
11103
|
{
|
|
11079
|
-
className: `w-full bg-white flex items-center gap-2 -mb-px border-b border-gray-100 py-3 pr-4
|
|
11104
|
+
className: `w-full bg-white flex items-center gap-2 -mb-px border-b border-gray-100 py-3 pr-4 pl-20 xl:pl-4`
|
|
11080
11105
|
},
|
|
11081
11106
|
/* @__PURE__ */ React__namespace.createElement(
|
|
11082
11107
|
Button,
|
|
@@ -11338,7 +11363,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11338
11363
|
);
|
|
11339
11364
|
};
|
|
11340
11365
|
const FormStatus = ({ pristine }) => {
|
|
11341
|
-
return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-0 items-center" }, !pristine && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("
|
|
11366
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-0 items-center" }, !pristine && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("p", { className: "text-gray-500 text-xs leading-tight whitespace-nowrap mr-2" }, "Unsaved Changes"), /* @__PURE__ */ React__namespace.createElement("span", { className: "w-3 h-3 flex-0 rounded-full bg-red-300 border border-red-400" }), " "), pristine && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("span", { className: "w-3 h-3 flex-0 rounded-full bg-green-300 border border-green-400" }), " "));
|
|
11342
11367
|
};
|
|
11343
11368
|
const FormWrapper = ({
|
|
11344
11369
|
header,
|
|
@@ -11352,7 +11377,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11352
11377
|
className: "h-full overflow-y-auto max-h-full bg-gray-50"
|
|
11353
11378
|
},
|
|
11354
11379
|
header,
|
|
11355
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: "py-5 px-6" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full flex justify-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full
|
|
11380
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: "py-5 px-6 xl:px-12" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full flex justify-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full" }, children)))
|
|
11356
11381
|
);
|
|
11357
11382
|
};
|
|
11358
11383
|
const Emoji = ({ className = "", ...props }) => /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -13052,7 +13077,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13052
13077
|
function ErrorMessage({ error }) {
|
|
13053
13078
|
const message = buildErrorMessage(error);
|
|
13054
13079
|
const { setRawMode } = useEditorContext();
|
|
13055
|
-
return /* @__PURE__ */ React.createElement("div", { contentEditable: false, className: "bg-red-50 sm:rounded-lg" }, /* @__PURE__ */ React.createElement("div", { className: "px-4 py-5 sm:p-6" }, /* @__PURE__ */ React.createElement("h3", { className: "text-lg leading-6 font-medium text-red-800" }, "Error parsing markdown"), /* @__PURE__ */ React.createElement("div", { className: "mt-2 max-w-xl text-sm text-red-800 space-y-4" }, /* @__PURE__ */ React.createElement("p", null, message), /* @__PURE__ */ React.createElement("p", null, "To fix these errors, edit the content in raw-mode."), /* @__PURE__ */ React.createElement(
|
|
13080
|
+
return /* @__PURE__ */ React.createElement("div", { contentEditable: false, className: "bg-red-50 sm:rounded-lg" }, /* @__PURE__ */ React.createElement("div", { className: "px-4 py-5 sm:p-6" }, /* @__PURE__ */ React.createElement("h3", { className: "text-lg leading-6 font-medium text-red-800" }, "❌ Error parsing markdown"), /* @__PURE__ */ React.createElement("div", { className: "mt-2 max-w-xl text-sm text-red-800 space-y-4" }, /* @__PURE__ */ React.createElement("p", null, message), /* @__PURE__ */ React.createElement("p", null, "To fix these errors, edit the content in raw-mode."), /* @__PURE__ */ React.createElement(
|
|
13056
13081
|
"button",
|
|
13057
13082
|
{
|
|
13058
13083
|
onClick: () => setRawMode(true),
|
|
@@ -28022,7 +28047,7 @@ mutation addPendingDocumentMutation(
|
|
|
28022
28047
|
});
|
|
28023
28048
|
}
|
|
28024
28049
|
};
|
|
28025
|
-
let modalTitle = "Tina Cloud
|
|
28050
|
+
let modalTitle = "Tina Cloud";
|
|
28026
28051
|
if (activeModal === "authenticate" && loginStrategy === "Redirect" && !isTinaCloud) {
|
|
28027
28052
|
modalTitle = "Enter into edit mode";
|
|
28028
28053
|
} else if (activeModal === "authenticate" && loginStrategy === "UsernamePassword") {
|
|
@@ -28038,20 +28063,12 @@ mutation addPendingDocumentMutation(
|
|
|
28038
28063
|
ModalBuilder,
|
|
28039
28064
|
{
|
|
28040
28065
|
title: modalTitle,
|
|
28041
|
-
message: isTinaCloud ? "
|
|
28066
|
+
message: isTinaCloud ? "Your site uses Tina Cloud to track changes. To make edits, you must log in." : "To save edits, enter into edit mode. On save, changes will saved to the local filesystem.",
|
|
28042
28067
|
close,
|
|
28043
28068
|
actions: [
|
|
28044
28069
|
...otherModalActions,
|
|
28045
28070
|
{
|
|
28046
|
-
|
|
28047
|
-
sharedctx.setEditing(false);
|
|
28048
|
-
window.location.reload();
|
|
28049
|
-
},
|
|
28050
|
-
name: "Close",
|
|
28051
|
-
primary: false
|
|
28052
|
-
},
|
|
28053
|
-
{
|
|
28054
|
-
name: isTinaCloud ? "Continue to Tina Cloud" : "Enter Edit Mode",
|
|
28071
|
+
name: isTinaCloud ? "Log in" : "Enter Edit Mode",
|
|
28055
28072
|
action: handleAuthenticate,
|
|
28056
28073
|
primary: true
|
|
28057
28074
|
}
|
|
@@ -28589,7 +28606,7 @@ mutation addPendingDocumentMutation(
|
|
|
28589
28606
|
!schema.config.contentApiUrlOverride
|
|
28590
28607
|
) {
|
|
28591
28608
|
throw new Error(
|
|
28592
|
-
"Invalid setup. See https://tina.io/docs/tina-cloud/
|
|
28609
|
+
"Invalid setup. See https://tina.io/docs/tina-cloud/overview for more information."
|
|
28593
28610
|
);
|
|
28594
28611
|
}
|
|
28595
28612
|
if (!schema) {
|
|
@@ -28805,7 +28822,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
28805
28822
|
const cloudConfigs = cms.plugins.getType("cloud-config").all();
|
|
28806
28823
|
const [menuIsOpen, setMenuIsOpen] = React.useState(false);
|
|
28807
28824
|
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
28808
|
-
const navBreakpoint2 =
|
|
28825
|
+
const navBreakpoint2 = 1279;
|
|
28809
28826
|
const windowWidth = windowSize.useWindowWidth();
|
|
28810
28827
|
const renderDesktopNav = windowWidth > navBreakpoint2;
|
|
28811
28828
|
const activeScreens = screens.filter(
|
|
@@ -29112,14 +29129,14 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29112
29129
|
isLocalMode,
|
|
29113
29130
|
children
|
|
29114
29131
|
}) => {
|
|
29115
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, isLocalMode && /* @__PURE__ */ React.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "pt-12 px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
|
|
29132
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, isLocalMode && /* @__PURE__ */ React.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "pt-16 xl:pt-12 px-6 xl:px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
|
|
29116
29133
|
};
|
|
29117
29134
|
const PageBody = ({
|
|
29118
29135
|
children
|
|
29119
|
-
}) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-12" }, children);
|
|
29136
|
+
}) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
29120
29137
|
const PageBodyNarrow = ({
|
|
29121
29138
|
children
|
|
29122
|
-
}) => /* @__PURE__ */ React.createElement("div", { className: "py-10 px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
|
|
29139
|
+
}) => /* @__PURE__ */ React.createElement("div", { className: "py-10 px-6 xl:px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
|
|
29123
29140
|
const DashboardPage = () => {
|
|
29124
29141
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
29125
29142
|
var _a, _b;
|
|
@@ -29634,7 +29651,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29634
29651
|
},
|
|
29635
29652
|
(collection, _loading, reFetchCollection, collectionExtra) => {
|
|
29636
29653
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
29637
|
-
collection.documents.totalCount;
|
|
29638
29654
|
const documents = collection.documents.edges;
|
|
29639
29655
|
const admin = cms.api.admin;
|
|
29640
29656
|
const pageInfo = collection.documents.pageInfo;
|
|
@@ -29768,7 +29784,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29768
29784
|
},
|
|
29769
29785
|
close: () => setFolderModalOpen(false)
|
|
29770
29786
|
}
|
|
29771
|
-
), /* @__PURE__ */ React.createElement(PageHeader, { isLocalMode: (_l = (_k = cms == null ? void 0 : cms.api) == null ? void 0 : _k.tina) == null ? void 0 : _l.isLocalMode }, /* @__PURE__ */ React.createElement("div", { className: "w-full
|
|
29787
|
+
), /* @__PURE__ */ React.createElement(PageHeader, { isLocalMode: (_l = (_k = cms == null ? void 0 : cms.api) == null ? void 0 : _k.tina) == null ? void 0 : _l.isLocalMode }, /* @__PURE__ */ React.createElement("div", { className: "w-full" }, /* @__PURE__ */ React.createElement("h3", { className: "font-sans text-2xl text-gray-700" }, 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-start" }, (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(
|
|
29772
29788
|
"label",
|
|
29773
29789
|
{
|
|
29774
29790
|
htmlFor: "sort",
|
|
@@ -29839,7 +29855,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29839
29855
|
size: "small"
|
|
29840
29856
|
},
|
|
29841
29857
|
"Search not configured."
|
|
29842
|
-
))))
|
|
29858
|
+
)))), /* @__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" }, !collection.templates && allowCreate && /* @__PURE__ */ React.createElement(React.Fragment, null, allowCreateNestedFolder && /* @__PURE__ */ React.createElement(
|
|
29843
29859
|
reactRouterDom.Link,
|
|
29844
29860
|
{
|
|
29845
29861
|
onMouseDown: (evt) => {
|
|
@@ -29852,7 +29868,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29852
29868
|
evt.stopPropagation();
|
|
29853
29869
|
},
|
|
29854
29870
|
to: "/collections/new-folder",
|
|
29855
|
-
className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-blue-500 bg-white hover:bg-[#f1f5f9] focus:ring-white focus:ring-blue-500 text-sm h-10 px-6 mr-4"
|
|
29871
|
+
className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-blue-500 bg-white hover:bg-[#f1f5f9] focus:ring-white focus:ring-blue-500 w-full md:w-auto text-sm h-10 px-6 mr-4"
|
|
29856
29872
|
},
|
|
29857
29873
|
/* @__PURE__ */ React.createElement(FaFolder, { className: "mr-2" }),
|
|
29858
29874
|
"Add Folder",
|
|
@@ -29871,7 +29887,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29871
29887
|
"new",
|
|
29872
29888
|
collectionName
|
|
29873
29889
|
].join("/")}`,
|
|
29874
|
-
className: "inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-white bg-blue-500 hover:bg-blue-600 text-sm h-10 px-6"
|
|
29890
|
+
className: "inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-white bg-blue-500 hover:bg-blue-600 w-full md:w-auto text-sm h-10 px-6"
|
|
29875
29891
|
},
|
|
29876
29892
|
/* @__PURE__ */ React.createElement(FaFile, { className: "mr-2" }),
|
|
29877
29893
|
"Add Files",
|
|
@@ -29883,7 +29899,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29883
29899
|
templates: collection.templates,
|
|
29884
29900
|
folder
|
|
29885
29901
|
}
|
|
29886
|
-
)))), /* @__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, ")")), (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", { className: "divide-y divide-gray-150" }, folder.name && !search ? /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React.createElement(
|
|
29902
|
+
))))), /* @__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", { className: "divide-y divide-gray-150" }, folder.name && !search ? /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React.createElement(
|
|
29887
29903
|
Breadcrumb,
|
|
29888
29904
|
{
|
|
29889
29905
|
folder,
|
|
@@ -29893,34 +29909,33 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29893
29909
|
))) : null, documents.length > 0 && documents.map((document2) => {
|
|
29894
29910
|
var _a2;
|
|
29895
29911
|
if (document2.node.__typename === "Folder") {
|
|
29896
|
-
return /* @__PURE__ */ React.createElement(
|
|
29897
|
-
"
|
|
29898
|
-
{
|
|
29899
|
-
className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
|
|
29900
|
-
onClick: () => {
|
|
29901
|
-
navigate(
|
|
29902
|
-
`/${[
|
|
29903
|
-
"collections",
|
|
29904
|
-
collectionName,
|
|
29905
|
-
document2.node.path
|
|
29906
|
-
].join("/")}`,
|
|
29907
|
-
{ replace: true }
|
|
29908
|
-
);
|
|
29909
|
-
}
|
|
29910
|
-
},
|
|
29911
|
-
/* @__PURE__ */ React.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
|
|
29912
|
-
/* @__PURE__ */ React.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Name"), /* @__PURE__ */ React.createElement("span", { className: "h-5 leading-5 block truncate" }, /* @__PURE__ */ React.createElement("span", null, document2.node.name)))
|
|
29913
|
-
)), /* @__PURE__ */ React.createElement(
|
|
29914
|
-
"td",
|
|
29912
|
+
return /* @__PURE__ */ React.createElement(
|
|
29913
|
+
"tr",
|
|
29915
29914
|
{
|
|
29916
|
-
|
|
29917
|
-
colSpan: 4
|
|
29915
|
+
key: `folder-${document2.node.path}`
|
|
29918
29916
|
},
|
|
29919
|
-
/* @__PURE__ */ React.createElement("
|
|
29920
|
-
|
|
29917
|
+
/* @__PURE__ */ React.createElement("td", { className: "pl-5 pr-3 py-3" }, /* @__PURE__ */ React.createElement(
|
|
29918
|
+
"a",
|
|
29919
|
+
{
|
|
29920
|
+
className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
|
|
29921
|
+
onClick: () => {
|
|
29922
|
+
navigate(
|
|
29923
|
+
`/${[
|
|
29924
|
+
"collections",
|
|
29925
|
+
collectionName,
|
|
29926
|
+
document2.node.path
|
|
29927
|
+
].join("/")}`,
|
|
29928
|
+
{ replace: true }
|
|
29929
|
+
);
|
|
29930
|
+
}
|
|
29931
|
+
},
|
|
29932
|
+
/* @__PURE__ */ React.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
|
|
29933
|
+
/* @__PURE__ */ React.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Name"), /* @__PURE__ */ React.createElement("span", { className: "h-5 leading-5 block truncate" }, /* @__PURE__ */ React.createElement("span", null, document2.node.name)))
|
|
29934
|
+
)),
|
|
29935
|
+
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-3", colSpan: 4 }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Path"), /* @__PURE__ */ React.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900 truncate" }, document2.node.path.substring(2).split("/").map((node) => {
|
|
29921
29936
|
return /* @__PURE__ */ React.createElement("span", { key: node }, /* @__PURE__ */ React.createElement("span", { className: "text-gray-300 pr-0.5" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "pr-0.5" }, node));
|
|
29922
|
-
}))
|
|
29923
|
-
)
|
|
29937
|
+
})))
|
|
29938
|
+
);
|
|
29924
29939
|
}
|
|
29925
29940
|
const hasTitle = Boolean(
|
|
29926
29941
|
document2.node._sys.title
|
|
@@ -29929,13 +29944,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29929
29944
|
return /* @__PURE__ */ React.createElement(
|
|
29930
29945
|
"tr",
|
|
29931
29946
|
{
|
|
29932
|
-
key: `document-${document2.node._sys.relativePath}
|
|
29933
|
-
className: ""
|
|
29947
|
+
key: `document-${document2.node._sys.relativePath}`
|
|
29934
29948
|
},
|
|
29935
29949
|
/* @__PURE__ */ React.createElement(
|
|
29936
29950
|
"td",
|
|
29937
29951
|
{
|
|
29938
|
-
className: "pl-5 pr-3 py-3
|
|
29952
|
+
className: "pl-5 pr-3 py-3",
|
|
29939
29953
|
colSpan: hasTitle ? 1 : 2
|
|
29940
29954
|
},
|
|
29941
29955
|
/* @__PURE__ */ React.createElement(
|
|
@@ -29956,9 +29970,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29956
29970
|
/* @__PURE__ */ React.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, hasTitle ? "Title" : "Filename"), /* @__PURE__ */ React.createElement("span", { className: "h-5 leading-5 block truncate" }, !folderView && !hasTitle && subfolders && /* @__PURE__ */ React.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React.createElement("span", null, hasTitle ? (_a2 = document2.node._sys) == null ? void 0 : _a2.title : document2.node._sys.filename)))
|
|
29957
29971
|
)
|
|
29958
29972
|
),
|
|
29959
|
-
hasTitle && /* @__PURE__ */ React.createElement("td", { className: "px-3 py-3
|
|
29960
|
-
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-3
|
|
29961
|
-
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-3
|
|
29973
|
+
hasTitle && /* @__PURE__ */ React.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Filename"), /* @__PURE__ */ React.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900 truncate" }, !folderView && subfolders && /* @__PURE__ */ React.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React.createElement("span", null, document2.node._sys.filename))),
|
|
29974
|
+
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Extension"), /* @__PURE__ */ React.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.extension)),
|
|
29975
|
+
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Template"), /* @__PURE__ */ React.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.template)),
|
|
29962
29976
|
/* @__PURE__ */ React.createElement("td", { className: "w-0" }, /* @__PURE__ */ React.createElement(
|
|
29963
29977
|
OverflowMenu$1,
|
|
29964
29978
|
{
|
|
@@ -30051,7 +30065,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30051
30065
|
}
|
|
30052
30066
|
))
|
|
30053
30067
|
);
|
|
30054
|
-
}))), documents.length === 0 && /* @__PURE__ */ React.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React.createElement(
|
|
30068
|
+
})))), documents.length === 0 && /* @__PURE__ */ React.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React.createElement(
|
|
30055
30069
|
CursorPaginator,
|
|
30056
30070
|
{
|
|
30057
30071
|
variant: "white",
|
|
@@ -30098,7 +30112,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30098
30112
|
className: "block font-sans text-xs font-semibold text-gray-500 whitespace-normal"
|
|
30099
30113
|
},
|
|
30100
30114
|
"Search"
|
|
30101
|
-
), /* @__PURE__ */ React.createElement("div", { className: "flex flex-
|
|
30115
|
+
), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-center w-full md:w-auto gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "flex-1 min-w-[200px] w-full md:w-auto" }, /* @__PURE__ */ React.createElement(
|
|
30102
30116
|
Input,
|
|
30103
30117
|
{
|
|
30104
30118
|
type: "text",
|
|
@@ -30109,14 +30123,15 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30109
30123
|
setSearchInput(e.target.value);
|
|
30110
30124
|
}
|
|
30111
30125
|
}
|
|
30112
|
-
)), /* @__PURE__ */ React.createElement("div", { className: "flex gap-3" }, /* @__PURE__ */ React.createElement(
|
|
30126
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "flex w-full md:w-auto gap-3" }, /* @__PURE__ */ React.createElement(
|
|
30113
30127
|
Button,
|
|
30114
30128
|
{
|
|
30115
30129
|
onClick: () => {
|
|
30116
30130
|
setSearch(searchInput);
|
|
30117
30131
|
setSearchLoaded(false);
|
|
30118
30132
|
},
|
|
30119
|
-
variant: "primary"
|
|
30133
|
+
variant: "primary",
|
|
30134
|
+
className: "w-full md:w-auto"
|
|
30120
30135
|
},
|
|
30121
30136
|
"Search ",
|
|
30122
30137
|
/* @__PURE__ */ React.createElement(BiSearch, { className: "w-5 h-full ml-1.5 opacity-70" })
|
|
@@ -30536,10 +30551,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30536
30551
|
}
|
|
30537
30552
|
});
|
|
30538
30553
|
}, [cms, collection, mutationInfo]);
|
|
30539
|
-
const navBreakpoint2 = 1e3;
|
|
30540
|
-
const windowWidth = windowSize.useWindowWidth();
|
|
30541
|
-
const renderNavToggle = windowWidth < navBreakpoint2 + 1;
|
|
30542
|
-
const headerPadding = renderNavToggle ? "px-20" : "px-6";
|
|
30543
30554
|
React.useEffect(() => {
|
|
30544
30555
|
cms.dispatch({ type: "forms:add", value: form });
|
|
30545
30556
|
cms.dispatch({ type: "forms:set-active-form-id", value: form.id });
|
|
@@ -30557,9 +30568,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30557
30568
|
return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, ((_f = (_e = cms == null ? void 0 : cms.api) == null ? void 0 : _e.tina) == null ? void 0 : _f.isLocalMode) ? /* @__PURE__ */ React.createElement(LocalWarning, null) : /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement(
|
|
30558
30569
|
"div",
|
|
30559
30570
|
{
|
|
30560
|
-
className: `pt-3 pb-4 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center
|
|
30571
|
+
className: `pt-10 xl:pt-3 pb-10 xl:pb-4 px-20 xl:px-12 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center`
|
|
30561
30572
|
},
|
|
30562
|
-
/* @__PURE__ */ React.createElement("div", { className: "w-full
|
|
30573
|
+
/* @__PURE__ */ React.createElement("div", { className: "w-full flex gap-1.5 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
30563
30574
|
reactRouterDom.Link,
|
|
30564
30575
|
{
|
|
30565
30576
|
to: `/collections/${collection.name}${folder.fullyQualifiedName ? `/${folder.fullyQualifiedName}` : ""}`,
|
|
@@ -30767,10 +30778,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30767
30778
|
}
|
|
30768
30779
|
});
|
|
30769
30780
|
}, [cms, document2, relativePath2, collection, mutationInfo]);
|
|
30770
|
-
const navBreakpoint2 = 1e3;
|
|
30771
|
-
const windowWidth = windowSize.useWindowWidth();
|
|
30772
|
-
const renderNavToggle = windowWidth < navBreakpoint2 + 1;
|
|
30773
|
-
const headerPadding = renderNavToggle ? "px-20" : "px-6";
|
|
30774
30781
|
React.useEffect(() => {
|
|
30775
30782
|
cms.dispatch({ type: "forms:add", value: form });
|
|
30776
30783
|
cms.dispatch({ type: "forms:set-active-form-id", value: form.id });
|
|
@@ -30788,9 +30795,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30788
30795
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) ? /* @__PURE__ */ React.createElement(LocalWarning, null) : /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement(
|
|
30789
30796
|
"div",
|
|
30790
30797
|
{
|
|
30791
|
-
className: `pt-3 pb-4 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center
|
|
30798
|
+
className: `pt-10 xl:pt-3 pb-10 xl:pb-4 px-20 xl:px-12 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center`
|
|
30792
30799
|
},
|
|
30793
|
-
/* @__PURE__ */ React.createElement("div", { className: "w-full
|
|
30800
|
+
/* @__PURE__ */ React.createElement("div", { className: "w-full flex gap-1.5 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
30794
30801
|
reactRouterDom.Link,
|
|
30795
30802
|
{
|
|
30796
30803
|
to: `/collections/${collection.name}/~${parentFolder2}`,
|
|
@@ -30802,16 +30809,19 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30802
30809
|
};
|
|
30803
30810
|
const ScreenPage = () => {
|
|
30804
30811
|
const { screenName } = reactRouterDom.useParams();
|
|
30805
|
-
const navBreakpoint2 = 1e3;
|
|
30806
|
-
const windowWidth = windowSize.useWindowWidth();
|
|
30807
|
-
const renderNavToggle = windowWidth < navBreakpoint2 + 1;
|
|
30808
30812
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
30809
30813
|
var _a, _b;
|
|
30810
30814
|
const screens = cms.plugins.getType("screen").all();
|
|
30811
30815
|
const selectedScreen = screens.find(
|
|
30812
30816
|
({ name }) => slugify(name) === screenName
|
|
30813
30817
|
);
|
|
30814
|
-
return /* @__PURE__ */ React.createElement("div", { className: "relative w-full h-full flex flex-col items-stretch justify-between" }, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) ? /* @__PURE__ */ React.createElement(LocalWarning, null) : /* @__PURE__ */ React.createElement(BillingWarning, null),
|
|
30818
|
+
return /* @__PURE__ */ React.createElement("div", { className: "relative w-full h-full flex flex-col items-stretch justify-between" }, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) ? /* @__PURE__ */ React.createElement(LocalWarning, null) : /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement(
|
|
30819
|
+
"div",
|
|
30820
|
+
{
|
|
30821
|
+
className: `xl:hidden py-5 border-b border-gray-200 bg-white pl-18`
|
|
30822
|
+
},
|
|
30823
|
+
selectedScreen.name
|
|
30824
|
+
), /* @__PURE__ */ React.createElement("div", { className: "flex-1 overflow-y-auto relative flex flex-col items-stretch justify-between" }, /* @__PURE__ */ React.createElement(selectedScreen.Component, { close: () => {
|
|
30815
30825
|
} })));
|
|
30816
30826
|
});
|
|
30817
30827
|
};
|
|
@@ -31185,7 +31195,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31185
31195
|
cms,
|
|
31186
31196
|
children
|
|
31187
31197
|
}) => {
|
|
31188
|
-
return /* @__PURE__ */ React.createElement(Layout, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-stretch h-
|
|
31198
|
+
return /* @__PURE__ */ React.createElement(Layout, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-stretch h-dvh overflow-hidden" }, /* @__PURE__ */ React.createElement(Sidebar, { cms }), /* @__PURE__ */ React.createElement("div", { className: "w-full relative" }, children)));
|
|
31189
31199
|
};
|
|
31190
31200
|
const PlainLayout = ({ children }) => {
|
|
31191
31201
|
return /* @__PURE__ */ React.createElement(
|