tinacms 1.6.7 → 2.1.0
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/admin/components/AuthTemplate.d.ts +2 -2
- package/dist/admin/components/ErrorDialog.d.ts +2 -2
- package/dist/admin/components/FullscreenError.d.ts +2 -2
- package/dist/admin/components/GetCMS.d.ts +2 -2
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/components/GetCollections.d.ts +2 -2
- package/dist/admin/components/GetDocument.d.ts +2 -2
- package/dist/admin/components/Layout.d.ts +2 -2
- package/dist/admin/components/LoadingPage.d.ts +2 -2
- package/dist/admin/components/Page.d.ts +11 -11
- package/dist/admin/components/Sidebar.d.ts +2 -2
- package/dist/admin/index.d.ts +2 -2
- package/dist/admin/pages/CollectionCreatePage.d.ts +3 -3
- package/dist/admin/pages/CollectionDuplicatePage.d.ts +2 -2
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/admin/pages/CollectionUpdatePage.d.ts +2 -2
- package/dist/admin/pages/DashboardPage.d.ts +2 -2
- package/dist/admin/pages/ScreenPage.d.ts +2 -2
- package/dist/auth/AuthModal.d.ts +3 -3
- package/dist/auth/TinaCloudProvider.d.ts +3 -3
- package/dist/index.js +114 -262
- package/dist/index.mjs +114 -263
- package/dist/internalClient/formify.d.ts +1 -1
- package/dist/rich-text/index.d.ts +2 -2
- package/dist/rich-text/prism.d.ts +2 -2
- package/dist/tina-cms.d.ts +3 -9
- package/dist/toolkit/alerts/alerts.d.ts +1 -1
- package/dist/toolkit/components/account/update-password.d.ts +2 -2
- package/dist/toolkit/components/active-field-indicator.d.ts +2 -2
- package/dist/toolkit/components/media/breadcrumb.d.ts +2 -2
- package/dist/toolkit/components/media/copy-field.d.ts +2 -2
- package/dist/toolkit/components/media/media-item.d.ts +3 -3
- package/dist/toolkit/components/media/media-manager.d.ts +3 -3
- package/dist/toolkit/components/media/modal.d.ts +3 -3
- package/dist/toolkit/components/media/pagination.d.ts +2 -2
- package/dist/toolkit/components/mutation-signal.d.ts +1 -1
- package/dist/toolkit/fields/components/image-upload/image-upload.d.ts +3 -3
- package/dist/toolkit/fields/components/input.d.ts +2 -2
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/components/textarea.d.ts +1 -1
- package/dist/toolkit/fields/plugins/blocks-field-plugin/block-selector-big.d.ts +2 -2
- package/dist/toolkit/fields/plugins/blocks-field-plugin/block-selector.d.ts +2 -2
- package/dist/toolkit/fields/plugins/blocks-field-plugin/index.d.ts +3 -3
- package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/color-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +4 -4
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +7 -7
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +8 -8
- package/dist/toolkit/fields/plugins/hidden-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/image-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +6 -6
- package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +6 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/error-message.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/nested-form.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/component.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +21 -21
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/dropdown.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/icons.d.ts +17 -17
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/floating-toolbar.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/index.d.ts +9 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/overflow-menu.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/toolbar-item.d.ts +4 -4
- package/dist/toolkit/fields/plugins/number-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/password-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/reference-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/tags-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/text-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/textarea-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +7 -7
- package/dist/toolkit/form-builder/fields-builder.d.ts +3 -3
- package/dist/toolkit/form-builder/form-actions.d.ts +2 -1
- package/dist/toolkit/form-builder/form-builder.d.ts +6 -6
- package/dist/toolkit/form-builder/form-portal.d.ts +5 -1
- package/dist/toolkit/form-builder/form.d.ts +2 -2
- package/dist/toolkit/form-builder/loading-dots.d.ts +2 -2
- package/dist/toolkit/icons/Add.d.ts +2 -2
- package/dist/toolkit/icons/Alert.d.ts +2 -2
- package/dist/toolkit/icons/AlignCenter.d.ts +2 -2
- package/dist/toolkit/icons/AlignLeft.d.ts +2 -2
- package/dist/toolkit/icons/AlignRight.d.ts +2 -2
- package/dist/toolkit/icons/Bold.d.ts +2 -2
- package/dist/toolkit/icons/ChevronDown.d.ts +2 -2
- package/dist/toolkit/icons/ChevronLeft.d.ts +2 -2
- package/dist/toolkit/icons/ChevronRight.d.ts +2 -2
- package/dist/toolkit/icons/ChevronUp.d.ts +2 -2
- package/dist/toolkit/icons/Circle.d.ts +2 -2
- package/dist/toolkit/icons/CircleCheck.d.ts +2 -2
- package/dist/toolkit/icons/Close.d.ts +2 -2
- package/dist/toolkit/icons/Code.d.ts +2 -2
- package/dist/toolkit/icons/Drag.d.ts +2 -2
- package/dist/toolkit/icons/Duplicate.d.ts +2 -2
- package/dist/toolkit/icons/Edit.d.ts +2 -2
- package/dist/toolkit/icons/EllipsisVertical.d.ts +2 -2
- package/dist/toolkit/icons/Error.d.ts +2 -2
- package/dist/toolkit/icons/Exit.d.ts +2 -2
- package/dist/toolkit/icons/File.d.ts +2 -2
- package/dist/toolkit/icons/Folder.d.ts +2 -2
- package/dist/toolkit/icons/Hamburger.d.ts +2 -2
- package/dist/toolkit/icons/Heading.d.ts +2 -2
- package/dist/toolkit/icons/Info.d.ts +2 -2
- package/dist/toolkit/icons/Italic.d.ts +2 -2
- package/dist/toolkit/icons/LeftArrow.d.ts +2 -2
- package/dist/toolkit/icons/Link.d.ts +2 -2
- package/dist/toolkit/icons/Lock.d.ts +2 -2
- package/dist/toolkit/icons/Markdown.d.ts +2 -2
- package/dist/toolkit/icons/Media.d.ts +2 -2
- package/dist/toolkit/icons/OrderedList.d.ts +2 -2
- package/dist/toolkit/icons/PullRequest.d.ts +2 -2
- package/dist/toolkit/icons/Quote.d.ts +2 -2
- package/dist/toolkit/icons/Redo.d.ts +2 -2
- package/dist/toolkit/icons/Reorder.d.ts +2 -2
- package/dist/toolkit/icons/ReorderRow.d.ts +2 -2
- package/dist/toolkit/icons/Reset.d.ts +2 -2
- package/dist/toolkit/icons/RightArrow.d.ts +2 -2
- package/dist/toolkit/icons/Settings.d.ts +2 -2
- package/dist/toolkit/icons/Strikethrough.d.ts +2 -2
- package/dist/toolkit/icons/Table.d.ts +2 -2
- package/dist/toolkit/icons/Tina.d.ts +2 -2
- package/dist/toolkit/icons/Trash.d.ts +2 -2
- package/dist/toolkit/icons/Underline.d.ts +2 -2
- package/dist/toolkit/icons/Undo.d.ts +2 -2
- package/dist/toolkit/icons/UnorderedList.d.ts +2 -2
- package/dist/toolkit/icons/Upload.d.ts +2 -2
- package/dist/toolkit/icons/Warning.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-data.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-modal.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +3 -3
- package/dist/toolkit/plugin-branch-switcher/plugin.d.ts +2 -2
- package/dist/toolkit/plugin-fields/markdown.d.ts +3 -3
- package/dist/toolkit/react-alerts/alerts.d.ts +3 -3
- package/dist/toolkit/react-core/with-plugin.d.ts +2 -2
- package/dist/toolkit/react-datetime/DateTime.d.ts +3 -3
- package/dist/toolkit/react-datetime/parts/ViewNavigation.d.ts +2 -1
- package/dist/toolkit/react-datetime/views/DaysView.d.ts +6 -6
- package/dist/toolkit/react-datetime/views/MonthsView.d.ts +3 -3
- package/dist/toolkit/react-datetime/views/TimeView.d.ts +3 -3
- package/dist/toolkit/react-datetime/views/YearsView.d.ts +4 -4
- package/dist/toolkit/react-dismissible/dismissible.d.ts +1 -0
- package/dist/toolkit/react-forms/form-modal.d.ts +2 -2
- package/dist/toolkit/react-modals/fullscreen-modal.d.ts +3 -3
- package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -2
- package/dist/toolkit/react-modals/modal/modal-body.d.ts +2 -2
- package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
- package/dist/toolkit/react-modals/modal/modal-overlay.d.ts +2 -2
- package/dist/toolkit/react-modals/modal-provider.d.ts +5 -1
- package/dist/toolkit/react-modals/popup-modal.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +4 -4
- package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/nav.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +2 -2
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +4 -4
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/sync-status.d.ts +4 -4
- package/dist/toolkit/react-tinacms/with-tina.d.ts +2 -2
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/styles/container.d.ts +2 -2
- package/dist/toolkit/styles/message.d.ts +1 -1
- package/dist/toolkit/styles/overflow-menu.d.ts +2 -2
- package/dist/types/cms.d.ts +1 -0
- package/package.json +16 -25
- package/dist/admin/pages/LoginPage.d.ts +0 -6
- package/dist/admin/pages/LogoutPage.d.ts +0 -7
- package/dist/dev-tools.d.ts +0 -21
- package/dist/dev-tools.js +0 -492
- package/dist/dev-tools.mjs +0 -489
- package/dist/edit-state.d.ts +0 -38
- package/dist/edit-state.js +0 -110
- package/dist/edit-state.mjs +0 -103
- package/dist/toolkit/react-core/tina-error-boundary.d.ts +0 -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("
|
|
3
|
-
})(this, function(exports2, zod, React, reactDom, plateHeadless, MonacoEditor, slateReact, react, slate, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, Popover$1, pkg$1, pkg, dropzone,
|
|
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("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", "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));
|
|
3
|
+
})(this, function(exports2, zod, React, reactDom, plateHeadless, MonacoEditor, slateReact, react, slate, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, Popover$1, pkg$1, pkg, dropzone, get, moment, dateFns, isHotkey, dom, windowSize, graphql, gql, 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) => {
|
|
@@ -2794,12 +2794,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2794
2794
|
function BiLock(props) {
|
|
2795
2795
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M12 2C9.243 2 7 4.243 7 7v2H6c-1.103 0-2 .897-2 2v9c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-9c0-1.103-.897-2-2-2h-1V7c0-2.757-2.243-5-5-5zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v2H9V7zm9.002 13H13v-2.278c.595-.347 1-.985 1-1.722 0-1.103-.897-2-2-2s-2 .897-2 2c0 .736.405 1.375 1 1.722V20H6v-9h12l.002 9z" }, "child": [] }] })(props);
|
|
2796
2796
|
}
|
|
2797
|
-
function BiLogIn(props) {
|
|
2798
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" }, "child": [] }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" }, "child": [] }] })(props);
|
|
2799
|
-
}
|
|
2800
|
-
function BiLogOut(props) {
|
|
2801
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M16 13v-2H7V8l-5 4 5 4v-3z" }, "child": [] }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" }, "child": [] }] })(props);
|
|
2802
|
-
}
|
|
2803
2797
|
function BiMenu(props) {
|
|
2804
2798
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, "child": [] }] })(props);
|
|
2805
2799
|
}
|
|
@@ -2935,7 +2929,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2935
2929
|
function useFormPortal() {
|
|
2936
2930
|
return React.useContext(FormPortalContext);
|
|
2937
2931
|
}
|
|
2938
|
-
const FormPortalProvider = ({
|
|
2932
|
+
const FormPortalProvider = ({
|
|
2933
|
+
children
|
|
2934
|
+
}) => {
|
|
2939
2935
|
const wrapperRef = React__namespace.useRef(null);
|
|
2940
2936
|
const zIndexRef = React__namespace.useRef(0);
|
|
2941
2937
|
const FormPortal = React__namespace.useCallback(
|
|
@@ -3154,9 +3150,6 @@ var __publicField = (obj, key, value) => {
|
|
|
3154
3150
|
function MdOutlineArrowBackIos(props) {
|
|
3155
3151
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z", "opacity": ".87" }, "child": [] }, { "tag": "path", "attr": { "d": "M17.51 3.87 15.73 2.1 5.84 12l9.9 9.9 1.77-1.77L9.38 12l8.13-8.13z" }, "child": [] }] })(props);
|
|
3156
3152
|
}
|
|
3157
|
-
function MdOutlineArrowBack(props) {
|
|
3158
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }, "child": [] }] })(props);
|
|
3159
|
-
}
|
|
3160
3153
|
function MdOutlinePerson(props) {
|
|
3161
3154
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }, "child": [] }] })(props);
|
|
3162
3155
|
}
|
|
@@ -3706,7 +3699,18 @@ var __publicField = (obj, key, value) => {
|
|
|
3706
3699
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
3707
3700
|
"application/msword",
|
|
3708
3701
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
3709
|
-
"
|
|
3702
|
+
"application/postscript",
|
|
3703
|
+
"model/fbx",
|
|
3704
|
+
"model/gltf+json",
|
|
3705
|
+
"model/ply",
|
|
3706
|
+
"model/u3d+mesh",
|
|
3707
|
+
"model/vnd.usdz+zip",
|
|
3708
|
+
"application/x-indesign",
|
|
3709
|
+
"application/vnd.apple.mpegurl",
|
|
3710
|
+
"application/dash+xml",
|
|
3711
|
+
"application/mxf",
|
|
3712
|
+
"image/*",
|
|
3713
|
+
"video/*"
|
|
3710
3714
|
];
|
|
3711
3715
|
const DEFAULT_MEDIA_UPLOAD_TYPES = supportedFileTypes.join(",");
|
|
3712
3716
|
const dropzoneAcceptFromString = (str) => {
|
|
@@ -8255,22 +8259,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8255
8259
|
return this.add("error", message, timeout);
|
|
8256
8260
|
}
|
|
8257
8261
|
};
|
|
8258
|
-
const PendingFormsPlaceholder = () => /* @__PURE__ */ React__namespace.createElement(
|
|
8259
|
-
"div",
|
|
8260
|
-
{
|
|
8261
|
-
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
8262
|
-
style: {
|
|
8263
|
-
animationName: "fade-in",
|
|
8264
|
-
animationDelay: "300ms",
|
|
8265
|
-
animationTimingFunction: "ease-out",
|
|
8266
|
-
animationIterationCount: 1,
|
|
8267
|
-
animationFillMode: "both",
|
|
8268
|
-
animationDuration: "150ms"
|
|
8269
|
-
}
|
|
8270
|
-
},
|
|
8271
|
-
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pb-5" }, "Please wait while Tina", /* @__PURE__ */ React__namespace.createElement("br", null), "loads your forms"),
|
|
8272
|
-
/* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" })
|
|
8273
|
-
);
|
|
8274
8262
|
const NoFormsPlaceholder = () => /* @__PURE__ */ React__namespace.createElement(
|
|
8275
8263
|
"div",
|
|
8276
8264
|
{
|
|
@@ -8523,38 +8511,19 @@ var __publicField = (obj, key, value) => {
|
|
|
8523
8511
|
}) => {
|
|
8524
8512
|
const cms = useCMS$1();
|
|
8525
8513
|
const { setFormIsPristine } = React__namespace.useContext(SidebarContext);
|
|
8526
|
-
const { formsRegistering, setFormsRegistering } = React__namespace.useContext(sharedctx.EditContext);
|
|
8527
|
-
React__namespace.useMemo(
|
|
8528
|
-
() => cms.events.subscribe("forms:register", (event) => {
|
|
8529
|
-
if (event.value === "start") {
|
|
8530
|
-
setFormsRegistering(true);
|
|
8531
|
-
} else {
|
|
8532
|
-
setFormsRegistering(false);
|
|
8533
|
-
}
|
|
8534
|
-
}),
|
|
8535
|
-
[]
|
|
8536
|
-
);
|
|
8537
8514
|
const isMultiform = cms.state.forms.length > 1;
|
|
8538
8515
|
const activeForm = cms.state.forms.find(
|
|
8539
8516
|
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
8540
8517
|
);
|
|
8541
8518
|
const isEditing = !!activeForm;
|
|
8542
8519
|
if (!cms.state.formLists.length) {
|
|
8543
|
-
if (formsRegistering)
|
|
8544
|
-
return /* @__PURE__ */ React__namespace.createElement(PendingFormsPlaceholder, null);
|
|
8545
8520
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, " ", children, " ");
|
|
8546
8521
|
}
|
|
8547
8522
|
if (isMultiform && !activeForm) {
|
|
8548
8523
|
return /* @__PURE__ */ React__namespace.createElement(FormLists, { isEditing });
|
|
8549
8524
|
}
|
|
8550
8525
|
const formMetas = cms.plugins.all("form:meta");
|
|
8551
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, activeForm && /* @__PURE__ */ React__namespace.createElement(FormWrapper$1, { isEditing, isMultiform }, isMultiform && /* @__PURE__ */ React__namespace.createElement(MultiformFormHeader, { activeForm }), !isMultiform && /* @__PURE__ */ React__namespace.createElement(FormHeader, { activeForm }), formMetas
|
|
8552
|
-
FormBuilder,
|
|
8553
|
-
{
|
|
8554
|
-
form: activeForm,
|
|
8555
|
-
onPristineChange: setFormIsPristine
|
|
8556
|
-
}
|
|
8557
|
-
)));
|
|
8526
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, activeForm && /* @__PURE__ */ React__namespace.createElement(FormWrapper$1, { isEditing, isMultiform }, isMultiform && /* @__PURE__ */ React__namespace.createElement(MultiformFormHeader, { activeForm }), !isMultiform && /* @__PURE__ */ React__namespace.createElement(FormHeader, { activeForm }), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, { key: meta.name }, /* @__PURE__ */ React__namespace.createElement(meta.Component, null))), /* @__PURE__ */ React__namespace.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine })));
|
|
8558
8527
|
};
|
|
8559
8528
|
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
8560
8529
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -8583,11 +8552,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8583
8552
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
8584
8553
|
"div",
|
|
8585
8554
|
{
|
|
8586
|
-
className:
|
|
8555
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
8587
8556
|
},
|
|
8588
8557
|
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
8589
8558
|
"button",
|
|
8590
8559
|
{
|
|
8560
|
+
type: "button",
|
|
8591
8561
|
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
8592
8562
|
onClick: () => {
|
|
8593
8563
|
const state = activeForm.tinaForm.finalForm.getState();
|
|
@@ -8608,7 +8578,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8608
8578
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
8609
8579
|
"div",
|
|
8610
8580
|
{
|
|
8611
|
-
className:
|
|
8581
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
8612
8582
|
},
|
|
8613
8583
|
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, shortFormLabel && /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
|
|
8614
8584
|
);
|
|
@@ -8872,7 +8842,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8872
8842
|
...props
|
|
8873
8843
|
}) => {
|
|
8874
8844
|
const cms = useCMS$1();
|
|
8875
|
-
const { setEdit } = sharedctx.useEditState();
|
|
8876
8845
|
const [eventsOpen, setEventsOpen] = React__namespace.useState(false);
|
|
8877
8846
|
const { contentCollections, authCollection } = collectionsInfo.collections.reduce(
|
|
8878
8847
|
(acc, collection) => {
|
|
@@ -8966,7 +8935,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8966
8935
|
window.location.href
|
|
8967
8936
|
).pathname;
|
|
8968
8937
|
}
|
|
8969
|
-
setEdit(false);
|
|
8970
8938
|
} catch (e) {
|
|
8971
8939
|
cms.alerts.error(`Error logging out: ${e}`);
|
|
8972
8940
|
console.error("Unexpected error calling logout");
|
|
@@ -10783,7 +10751,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10783
10751
|
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] pointer-events-none" }, alerts.all.filter((alert) => {
|
|
10784
10752
|
return alert.level !== "error";
|
|
10785
10753
|
}).map((alert) => {
|
|
10786
|
-
return /* @__PURE__ */ React.createElement(Alert, { key: alert.id, level: alert.level }, alert.level === "info" && /* @__PURE__ */ React.createElement(BiInfoCircle, { className: "w-5 h-auto opacity-70" }), alert.level === "success" && /* @__PURE__ */ React.createElement(BiCheckCircle, { className: "w-5 h-auto opacity-70" }), alert.level === "warn" && /* @__PURE__ */ React.createElement(BiError, { className: "w-5 h-auto opacity-70" }), /* @__PURE__ */ React.createElement("p", { className: "m-0 flex-1 max-w-[680px] text-left" }, alert.message), /* @__PURE__ */ React.createElement(
|
|
10754
|
+
return /* @__PURE__ */ React.createElement(Alert, { key: alert.id, level: alert.level }, alert.level === "info" && /* @__PURE__ */ React.createElement(BiInfoCircle, { className: "w-5 h-auto opacity-70" }), alert.level === "success" && /* @__PURE__ */ React.createElement(BiCheckCircle, { className: "w-5 h-auto opacity-70" }), alert.level === "warn" && /* @__PURE__ */ React.createElement(BiError, { className: "w-5 h-auto opacity-70" }), /* @__PURE__ */ React.createElement("p", { className: "m-0 flex-1 max-w-[680px] text-left" }, alert.message.toString()), /* @__PURE__ */ React.createElement(
|
|
10787
10755
|
CloseAlert,
|
|
10788
10756
|
{
|
|
10789
10757
|
onClick: () => {
|
|
@@ -10795,7 +10763,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10795
10763
|
return alert.level === "error";
|
|
10796
10764
|
}).map((alert) => {
|
|
10797
10765
|
const AlertMessage = typeof alert.message === "string" ? () => {
|
|
10798
|
-
return /* @__PURE__ */ React.createElement("p", { className: "text-base mb-3 overflow-y-auto" }, alert.message);
|
|
10766
|
+
return /* @__PURE__ */ React.createElement("p", { className: "text-base mb-3 overflow-y-auto" }, alert.message.toString());
|
|
10799
10767
|
} : alert.message;
|
|
10800
10768
|
return /* @__PURE__ */ React.createElement(Modal, { key: alert.id }, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(
|
|
10801
10769
|
ModalHeader,
|
|
@@ -10819,7 +10787,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10819
10787
|
))));
|
|
10820
10788
|
}));
|
|
10821
10789
|
}
|
|
10822
|
-
const Alert = ({
|
|
10790
|
+
const Alert = ({
|
|
10791
|
+
level,
|
|
10792
|
+
...props
|
|
10793
|
+
}) => {
|
|
10823
10794
|
const colorClasses = {
|
|
10824
10795
|
info: "bg-blue-100 border-blue-500 text-blue-600 fill-blue-500",
|
|
10825
10796
|
success: "bg-green-100 border-green-500 text-green-600 fill-green-500",
|
|
@@ -11322,7 +11293,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11322
11293
|
header: /* @__PURE__ */ React__namespace.createElement(PanelHeader, { ...fieldGroup, id: tinaForm.id }),
|
|
11323
11294
|
id: tinaForm.id
|
|
11324
11295
|
},
|
|
11325
|
-
tinaForm
|
|
11296
|
+
(tinaForm == null ? void 0 : tinaForm.fields.length) ? /* @__PURE__ */ React__namespace.createElement(
|
|
11326
11297
|
FieldsBuilder,
|
|
11327
11298
|
{
|
|
11328
11299
|
form: tinaForm,
|
|
@@ -11407,6 +11378,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11407
11378
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
11408
11379
|
"button",
|
|
11409
11380
|
{
|
|
11381
|
+
type: "button",
|
|
11410
11382
|
className: `relative z-40 group text-left w-full bg-white hover:bg-gray-50 py-2 border-t border-b shadow-sm
|
|
11411
11383
|
border-gray-100 px-6 -mt-px`,
|
|
11412
11384
|
onClick: () => {
|
|
@@ -12809,6 +12781,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12809
12781
|
const EMBED_ICON_WIDTH = 85;
|
|
12810
12782
|
function Toolbar({
|
|
12811
12783
|
templates,
|
|
12784
|
+
toolbarOverride,
|
|
12812
12785
|
tinaForm
|
|
12813
12786
|
}) {
|
|
12814
12787
|
const { setRawMode } = useEditorContext();
|
|
@@ -12824,8 +12797,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12824
12797
|
const codeBlockActive = helpers.isNodeActive(editor, plateHeadless.ELEMENT_CODE_BLOCK);
|
|
12825
12798
|
const blockQuoteActive = helpers.isNodeActive(editor, plateHeadless.ELEMENT_BLOCKQUOTE);
|
|
12826
12799
|
const isImgActive = helpers.isNodeActive(editor, ELEMENT_IMG);
|
|
12827
|
-
const
|
|
12828
|
-
{
|
|
12800
|
+
const toolbarItemLookup = {
|
|
12801
|
+
heading: {
|
|
12829
12802
|
tinaForm,
|
|
12830
12803
|
name: "heading",
|
|
12831
12804
|
label: "Heading",
|
|
@@ -12846,19 +12819,19 @@ var __publicField = (obj, key, value) => {
|
|
|
12846
12819
|
item.render
|
|
12847
12820
|
))
|
|
12848
12821
|
},
|
|
12849
|
-
{
|
|
12822
|
+
link: {
|
|
12850
12823
|
tinaForm,
|
|
12851
12824
|
name: "link",
|
|
12852
12825
|
label: "Link",
|
|
12853
12826
|
active: isLinkActive2
|
|
12854
12827
|
},
|
|
12855
|
-
{
|
|
12828
|
+
image: {
|
|
12856
12829
|
tinaForm,
|
|
12857
12830
|
name: "image",
|
|
12858
12831
|
label: "Image",
|
|
12859
12832
|
active: isImgActive
|
|
12860
12833
|
},
|
|
12861
|
-
{
|
|
12834
|
+
quote: {
|
|
12862
12835
|
tinaForm,
|
|
12863
12836
|
name: "quote",
|
|
12864
12837
|
label: "Quote",
|
|
@@ -12869,7 +12842,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12869
12842
|
plateHeadless.toggleNodeType(editor, { activeType: plateHeadless.ELEMENT_BLOCKQUOTE });
|
|
12870
12843
|
}
|
|
12871
12844
|
},
|
|
12872
|
-
{
|
|
12845
|
+
ul: {
|
|
12873
12846
|
tinaForm,
|
|
12874
12847
|
name: "ul",
|
|
12875
12848
|
label: "Bullet List",
|
|
@@ -12880,7 +12853,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12880
12853
|
plateHeadless.toggleList(editor, { type: plateHeadless.ELEMENT_UL });
|
|
12881
12854
|
}
|
|
12882
12855
|
},
|
|
12883
|
-
{
|
|
12856
|
+
ol: {
|
|
12884
12857
|
tinaForm,
|
|
12885
12858
|
name: "ol",
|
|
12886
12859
|
label: "List",
|
|
@@ -12891,7 +12864,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12891
12864
|
plateHeadless.toggleList(editor, { type: plateHeadless.ELEMENT_OL });
|
|
12892
12865
|
}
|
|
12893
12866
|
},
|
|
12894
|
-
{
|
|
12867
|
+
code: {
|
|
12895
12868
|
tinaForm,
|
|
12896
12869
|
name: "code",
|
|
12897
12870
|
label: "Code",
|
|
@@ -12902,7 +12875,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12902
12875
|
plateHeadless.toggleMark(editor, { key: plateHeadless.MARK_CODE });
|
|
12903
12876
|
}
|
|
12904
12877
|
},
|
|
12905
|
-
{
|
|
12878
|
+
codeBlock: {
|
|
12906
12879
|
tinaForm,
|
|
12907
12880
|
name: "codeBlock",
|
|
12908
12881
|
label: "Code Block",
|
|
@@ -12913,7 +12886,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12913
12886
|
insertEmptyCodeBlock(editor);
|
|
12914
12887
|
}
|
|
12915
12888
|
},
|
|
12916
|
-
{
|
|
12889
|
+
bold: {
|
|
12917
12890
|
tinaForm,
|
|
12918
12891
|
name: "bold",
|
|
12919
12892
|
label: "Bold",
|
|
@@ -12924,7 +12897,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12924
12897
|
plateHeadless.toggleMark(editor, { key: plateHeadless.MARK_BOLD });
|
|
12925
12898
|
}
|
|
12926
12899
|
},
|
|
12927
|
-
{
|
|
12900
|
+
italic: {
|
|
12928
12901
|
tinaForm,
|
|
12929
12902
|
name: "italic",
|
|
12930
12903
|
label: "Italic",
|
|
@@ -12935,14 +12908,15 @@ var __publicField = (obj, key, value) => {
|
|
|
12935
12908
|
plateHeadless.toggleMark(editor, { key: plateHeadless.MARK_ITALIC });
|
|
12936
12909
|
}
|
|
12937
12910
|
},
|
|
12938
|
-
{
|
|
12911
|
+
raw: {
|
|
12939
12912
|
tinaForm,
|
|
12940
12913
|
name: "raw",
|
|
12941
12914
|
label: "Raw",
|
|
12942
12915
|
active: false,
|
|
12943
12916
|
onMouseDown: () => setRawMode(true)
|
|
12944
12917
|
}
|
|
12945
|
-
|
|
12918
|
+
};
|
|
12919
|
+
const toolbarItems = toolbarOverride === void 0 ? Object.values(toolbarItemLookup) : toolbarOverride.map((item) => toolbarItemLookup[item]).filter((item) => item !== void 0);
|
|
12946
12920
|
const [itemsShown, setItemsShown] = React__namespace.useState(toolbarItems.length);
|
|
12947
12921
|
useResize(toolbarRef, (entry) => {
|
|
12948
12922
|
const width = entry.target.getBoundingClientRect().width;
|
|
@@ -13087,10 +13061,11 @@ var __publicField = (obj, key, value) => {
|
|
|
13087
13061
|
))));
|
|
13088
13062
|
}
|
|
13089
13063
|
const RichEditor = (props) => {
|
|
13064
|
+
var _a;
|
|
13090
13065
|
const initialValue = React.useMemo(
|
|
13091
13066
|
() => {
|
|
13092
|
-
var
|
|
13093
|
-
return ((_b = (
|
|
13067
|
+
var _a2, _b;
|
|
13068
|
+
return ((_b = (_a2 = props.input.value) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) ? props.input.value.children.map(helpers.normalize) : [{ type: "p", children: [{ type: "text", text: "" }] }];
|
|
13094
13069
|
},
|
|
13095
13070
|
[]
|
|
13096
13071
|
);
|
|
@@ -13118,8 +13093,8 @@ var __publicField = (obj, key, value) => {
|
|
|
13118
13093
|
React.useEffect(() => {
|
|
13119
13094
|
if (ref.current) {
|
|
13120
13095
|
setTimeout(() => {
|
|
13121
|
-
var
|
|
13122
|
-
const plateElement = (
|
|
13096
|
+
var _a2;
|
|
13097
|
+
const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
|
|
13123
13098
|
'[role="textbox"]'
|
|
13124
13099
|
);
|
|
13125
13100
|
if (props.field.experimental_focusIntent && plateElement) {
|
|
@@ -13145,6 +13120,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13145
13120
|
Toolbar,
|
|
13146
13121
|
{
|
|
13147
13122
|
tinaForm: props.tinaForm,
|
|
13123
|
+
toolbarOverride: (_a = props.field) == null ? void 0 : _a.toolbarOverride,
|
|
13148
13124
|
templates: props.field.templates,
|
|
13149
13125
|
inlineOnly: false
|
|
13150
13126
|
}
|
|
@@ -13154,38 +13130,36 @@ var __publicField = (obj, key, value) => {
|
|
|
13154
13130
|
};
|
|
13155
13131
|
const MdxFieldPlugin = {
|
|
13156
13132
|
name: "rich-text",
|
|
13157
|
-
Component: wrapFieldsWithMeta(
|
|
13158
|
-
(
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13133
|
+
Component: wrapFieldsWithMeta((props) => {
|
|
13134
|
+
const [rawMode, setRawMode] = React.useState(false);
|
|
13135
|
+
const [key, setKey] = React.useState(0);
|
|
13136
|
+
React.useMemo(() => {
|
|
13137
|
+
const { reset } = props.form;
|
|
13138
|
+
props.form.reset = (initialValues) => {
|
|
13139
|
+
setKey((key2) => key2 + 1);
|
|
13140
|
+
return reset(initialValues);
|
|
13141
|
+
};
|
|
13142
|
+
}, []);
|
|
13143
|
+
return /* @__PURE__ */ React.createElement(
|
|
13144
|
+
EditorContext.Provider,
|
|
13145
|
+
{
|
|
13146
|
+
key,
|
|
13147
|
+
value: {
|
|
13148
|
+
fieldName: props.field.name,
|
|
13149
|
+
templates: props.field.templates,
|
|
13150
|
+
rawMode,
|
|
13151
|
+
setRawMode
|
|
13152
|
+
}
|
|
13153
|
+
},
|
|
13154
|
+
/* @__PURE__ */ React.createElement(
|
|
13155
|
+
"div",
|
|
13170
13156
|
{
|
|
13171
|
-
|
|
13172
|
-
value: {
|
|
13173
|
-
fieldName: props.field.name,
|
|
13174
|
-
templates: props.field.templates,
|
|
13175
|
-
rawMode,
|
|
13176
|
-
setRawMode
|
|
13177
|
-
}
|
|
13157
|
+
className: "min-h-[100px] max-w-full tina-prose relative shadow-inner focus-within:shadow-outline focus-within:border-blue-500 block w-full bg-white border border-gray-200 text-gray-600 focus-within:text-gray-900 rounded-md px-3 py-2"
|
|
13178
13158
|
},
|
|
13179
|
-
/* @__PURE__ */ React.createElement(
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
},
|
|
13184
|
-
/* @__PURE__ */ React.createElement(RichEditor, { ...props })
|
|
13185
|
-
)
|
|
13186
|
-
);
|
|
13187
|
-
}
|
|
13188
|
-
)
|
|
13159
|
+
/* @__PURE__ */ React.createElement(RichEditor, { ...props })
|
|
13160
|
+
)
|
|
13161
|
+
);
|
|
13162
|
+
})
|
|
13189
13163
|
};
|
|
13190
13164
|
const MdxFieldPluginExtendible = {
|
|
13191
13165
|
name: "rich-text",
|
|
@@ -13196,37 +13170,35 @@ var __publicField = (obj, key, value) => {
|
|
|
13196
13170
|
return void 0;
|
|
13197
13171
|
}
|
|
13198
13172
|
},
|
|
13199
|
-
Component: wrapFieldsWithMeta(
|
|
13200
|
-
(
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13173
|
+
Component: wrapFieldsWithMeta((props) => {
|
|
13174
|
+
const [key, setKey] = React.useState(0);
|
|
13175
|
+
React.useMemo(() => {
|
|
13176
|
+
const { reset } = props.form;
|
|
13177
|
+
props.form.reset = (initialValues) => {
|
|
13178
|
+
setKey((key2) => key2 + 1);
|
|
13179
|
+
return reset(initialValues);
|
|
13180
|
+
};
|
|
13181
|
+
}, []);
|
|
13182
|
+
return /* @__PURE__ */ React.createElement(
|
|
13183
|
+
EditorContext.Provider,
|
|
13184
|
+
{
|
|
13185
|
+
key,
|
|
13186
|
+
value: {
|
|
13187
|
+
fieldName: props.field.name,
|
|
13188
|
+
templates: props.field.templates,
|
|
13189
|
+
rawMode: props.rawMode,
|
|
13190
|
+
setRawMode: props.setRawMode
|
|
13191
|
+
}
|
|
13192
|
+
},
|
|
13193
|
+
/* @__PURE__ */ React.createElement(
|
|
13194
|
+
"div",
|
|
13211
13195
|
{
|
|
13212
|
-
|
|
13213
|
-
value: {
|
|
13214
|
-
fieldName: props.field.name,
|
|
13215
|
-
templates: props.field.templates,
|
|
13216
|
-
rawMode: props.rawMode,
|
|
13217
|
-
setRawMode: props.setRawMode
|
|
13218
|
-
}
|
|
13196
|
+
className: "min-h-[100px] max-w-full tina-prose relative shadow-inner focus-within:shadow-outline focus-within:border-blue-500 block w-full bg-white border border-gray-200 text-gray-600 focus-within:text-gray-900 rounded-md px-3 py-2"
|
|
13219
13197
|
},
|
|
13220
|
-
/* @__PURE__ */ React.createElement(
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
},
|
|
13225
|
-
props.rawMode ? props.rawEditor : /* @__PURE__ */ React.createElement(RichEditor, { ...props })
|
|
13226
|
-
)
|
|
13227
|
-
);
|
|
13228
|
-
}
|
|
13229
|
-
)
|
|
13198
|
+
props.rawMode ? props.rawEditor : /* @__PURE__ */ React.createElement(RichEditor, { ...props })
|
|
13199
|
+
)
|
|
13200
|
+
);
|
|
13201
|
+
})
|
|
13230
13202
|
};
|
|
13231
13203
|
class FormMetaPlugin {
|
|
13232
13204
|
constructor(options) {
|
|
@@ -27198,7 +27170,7 @@ mutation addPendingDocumentMutation(
|
|
|
27198
27170
|
method: "POST",
|
|
27199
27171
|
headers: headers2,
|
|
27200
27172
|
body: JSON.stringify({
|
|
27201
|
-
query: typeof query === "function" ? graphql.print(query(gql
|
|
27173
|
+
query: typeof query === "function" ? graphql.print(query(gql)) : query,
|
|
27202
27174
|
variables
|
|
27203
27175
|
})
|
|
27204
27176
|
});
|
|
@@ -28559,6 +28531,7 @@ mutation addPendingDocumentMutation(
|
|
|
28559
28531
|
/* @__PURE__ */ React.createElement(
|
|
28560
28532
|
"button",
|
|
28561
28533
|
{
|
|
28534
|
+
type: "button",
|
|
28562
28535
|
style: errorButtonStyles,
|
|
28563
28536
|
onClick: () => {
|
|
28564
28537
|
this.setState({ pageRefresh: true });
|
|
@@ -28782,13 +28755,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
28782
28755
|
}
|
|
28783
28756
|
return client.request(query, { variables });
|
|
28784
28757
|
};
|
|
28785
|
-
function gql(strings, ...args) {
|
|
28786
|
-
let str = "";
|
|
28787
|
-
strings.forEach((string, i) => {
|
|
28788
|
-
str += string + (args[i] || "");
|
|
28789
|
-
});
|
|
28790
|
-
return str;
|
|
28791
|
-
}
|
|
28792
28758
|
const Layout = ({ children }) => {
|
|
28793
28759
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
28794
28760
|
"div",
|
|
@@ -29010,106 +28976,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29010
28976
|
return null;
|
|
29011
28977
|
}
|
|
29012
28978
|
};
|
|
29013
|
-
const
|
|
29014
|
-
message,
|
|
29015
|
-
children
|
|
29016
|
-
}) => {
|
|
29017
|
-
return /* @__PURE__ */ React.createElement("div", { className: "h-screen w-full bg-gradient-to-b from-blue-900 to-gray-900 flex items-center justify-center px-4 py-6" }, /* @__PURE__ */ React.createElement("div", { className: "bg-white rounded-lg overflow-hidden shadow-lg w-full max-w-lg" }, /* @__PURE__ */ React.createElement("div", { className: "px-5 py-4 border-b border-gray-150" }, /* @__PURE__ */ React.createElement("h2", { className: "text-2xl font-sans tracking-wide text-gray-700 flex items-center gap-0.5" }, /* @__PURE__ */ React.createElement(
|
|
29018
|
-
"svg",
|
|
29019
|
-
{
|
|
29020
|
-
viewBox: "0 0 32 32",
|
|
29021
|
-
fill: "#EC4815",
|
|
29022
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29023
|
-
className: "w-10 h-auto"
|
|
29024
|
-
},
|
|
29025
|
-
/* @__PURE__ */ React.createElement("path", { d: "M18.6466 14.5553C19.9018 13.5141 20.458 7.36086 21.0014 5.14903C21.5447 2.9372 23.7919 3.04938 23.7919 3.04938C23.7919 3.04938 23.2085 4.06764 23.4464 4.82751C23.6844 5.58738 25.3145 6.26662 25.3145 6.26662L24.9629 7.19622C24.9629 7.19622 24.2288 7.10204 23.7919 7.9785C23.355 8.85496 24.3392 17.4442 24.3392 17.4442C24.3392 17.4442 21.4469 22.7275 21.4469 24.9206C21.4469 27.1136 22.4819 28.9515 22.4819 28.9515H21.0296C21.0296 28.9515 18.899 26.4086 18.462 25.1378C18.0251 23.8669 18.1998 22.596 18.1998 22.596C18.1998 22.596 15.8839 22.4646 13.8303 22.596C11.7767 22.7275 10.4072 24.498 10.16 25.4884C9.91287 26.4787 9.81048 28.9515 9.81048 28.9515H8.66211C7.96315 26.7882 7.40803 26.0129 7.70918 24.9206C8.54334 21.8949 8.37949 20.1788 8.18635 19.4145C7.99321 18.6501 6.68552 17.983 6.68552 17.983C7.32609 16.6741 7.97996 16.0452 10.7926 15.9796C13.6052 15.914 17.3915 15.5965 18.6466 14.5553Z" }),
|
|
29026
|
-
/* @__PURE__ */ React.createElement("path", { d: "M11.1268 24.7939C11.1268 24.7939 11.4236 27.5481 13.0001 28.9516H14.3511C13.0001 27.4166 12.8527 23.4155 12.8527 23.4155C12.1656 23.6399 11.3045 24.3846 11.1268 24.7939Z" })
|
|
29027
|
-
), /* @__PURE__ */ React.createElement("span", null, "Tina"))), message && /* @__PURE__ */ React.createElement("div", { className: "px-5 pt-4" }, /* @__PURE__ */ React.createElement("p", { className: "text-base font-sans leading-normal" }, message)), /* @__PURE__ */ React.createElement("div", { className: "px-5 py-4 flex gap-4 w-full justify-between" }, children)));
|
|
29028
|
-
};
|
|
29029
|
-
const LoginPage = () => {
|
|
29030
|
-
const { setEdit } = sharedctx.useEditState();
|
|
29031
|
-
const login = () => setEdit(true);
|
|
29032
|
-
return /* @__PURE__ */ React.createElement(AuthTemplate, null, /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-1 gap-4 items-center justify-end" }, /* @__PURE__ */ React.createElement(
|
|
29033
|
-
Button,
|
|
29034
|
-
{
|
|
29035
|
-
onClick: () => {
|
|
29036
|
-
window.location.href = "/";
|
|
29037
|
-
},
|
|
29038
|
-
variant: "white",
|
|
29039
|
-
size: "custom",
|
|
29040
|
-
className: "text-base h-12 px-6 flex-shrink-0 flex-grow-0"
|
|
29041
|
-
},
|
|
29042
|
-
/* @__PURE__ */ React.createElement(MdOutlineArrowBack, { className: "w-6 h-auto mr-1.5 opacity-80" }),
|
|
29043
|
-
" Back To Site"
|
|
29044
|
-
), /* @__PURE__ */ React.createElement(
|
|
29045
|
-
Button,
|
|
29046
|
-
{
|
|
29047
|
-
onClick: () => login(),
|
|
29048
|
-
variant: "primary",
|
|
29049
|
-
size: "custom",
|
|
29050
|
-
className: "text-base h-12 px-6 flex-1",
|
|
29051
|
-
type: "submit"
|
|
29052
|
-
},
|
|
29053
|
-
/* @__PURE__ */ React.createElement(BiLogIn, { className: "w-6 h-auto mr-2 opacity-80" }),
|
|
29054
|
-
" Edit With Tina"
|
|
29055
|
-
)));
|
|
29056
|
-
};
|
|
29057
|
-
const LogoutRedirect = () => {
|
|
29058
|
-
const cms = useCMS$1();
|
|
29059
|
-
const { setEdit } = sharedctx.useEditState();
|
|
29060
|
-
const [searchParams] = reactRouterDom.useSearchParams();
|
|
29061
|
-
const slug = searchParams.get("slug") || "/";
|
|
29062
|
-
const logout2 = async () => {
|
|
29063
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
29064
|
-
if ((_c = (_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.authProvider) == null ? void 0 : _c.logout) {
|
|
29065
|
-
await ((_f = (_e = (_d = cms == null ? void 0 : cms.api) == null ? void 0 : _d.tina) == null ? void 0 : _e.authProvider) == null ? void 0 : _f.logout());
|
|
29066
|
-
if ((_h = (_g = cms == null ? void 0 : cms.api) == null ? void 0 : _g.tina) == null ? void 0 : _h.onLogout) {
|
|
29067
|
-
await ((_j = (_i = cms == null ? void 0 : cms.api) == null ? void 0 : _i.tina) == null ? void 0 : _j.onLogout());
|
|
29068
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
29069
|
-
}
|
|
29070
|
-
}
|
|
29071
|
-
setEdit(false);
|
|
29072
|
-
};
|
|
29073
|
-
React.useEffect(() => {
|
|
29074
|
-
logout2().then(() => {
|
|
29075
|
-
window.location.href = slug;
|
|
29076
|
-
});
|
|
29077
|
-
}, []);
|
|
29078
|
-
return /* @__PURE__ */ React.createElement("div", null, "Redirecting to ", slug, " ...");
|
|
29079
|
-
};
|
|
29080
|
-
const logout = () => {
|
|
29081
|
-
sharedctx.setEditing(false);
|
|
29082
|
-
window.location.href = "/";
|
|
29083
|
-
};
|
|
29084
|
-
const LogoutPage = () => {
|
|
29085
|
-
return /* @__PURE__ */ React.createElement(AuthTemplate, null, /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-1 gap-4 items-center justify-end" }, /* @__PURE__ */ React.createElement(
|
|
29086
|
-
Button,
|
|
29087
|
-
{
|
|
29088
|
-
onClick: () => {
|
|
29089
|
-
window.location.href = "/";
|
|
29090
|
-
},
|
|
29091
|
-
variant: "white",
|
|
29092
|
-
size: "custom",
|
|
29093
|
-
className: "text-base h-12 px-6 flex-shrink-0 flex-grow-0"
|
|
29094
|
-
},
|
|
29095
|
-
/* @__PURE__ */ React.createElement(MdOutlineArrowBack, { className: "w-6 h-auto mr-1.5 opacity-80" }),
|
|
29096
|
-
" Back To Site"
|
|
29097
|
-
), /* @__PURE__ */ React.createElement(
|
|
29098
|
-
Button,
|
|
29099
|
-
{
|
|
29100
|
-
onClick: () => logout(),
|
|
29101
|
-
type: "submit",
|
|
29102
|
-
variant: "primary",
|
|
29103
|
-
size: "custom",
|
|
29104
|
-
className: "text-base h-12 px-6 flex-1"
|
|
29105
|
-
},
|
|
29106
|
-
/* @__PURE__ */ React.createElement(BiLogOut, { className: "w-6 h-auto mr-1.5 opacity-80" }),
|
|
29107
|
-
" Log Out of Tina"
|
|
29108
|
-
)));
|
|
29109
|
-
};
|
|
29110
|
-
const PageWrapper = ({
|
|
29111
|
-
children
|
|
29112
|
-
}) => {
|
|
28979
|
+
const PageWrapper = ({ children }) => {
|
|
29113
28980
|
var _a, _b;
|
|
29114
28981
|
const cms = useCMS$1();
|
|
29115
28982
|
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
@@ -29131,12 +28998,8 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
29131
28998
|
}) => {
|
|
29132
28999
|
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))));
|
|
29133
29000
|
};
|
|
29134
|
-
const PageBody = ({
|
|
29135
|
-
|
|
29136
|
-
}) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
29137
|
-
const PageBodyNarrow = ({
|
|
29138
|
-
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));
|
|
29001
|
+
const PageBody = ({ children }) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
29002
|
+
const PageBodyNarrow = ({ children }) => /* @__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));
|
|
29140
29003
|
const DashboardPage = () => {
|
|
29141
29004
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
29142
29005
|
var _a, _b;
|
|
@@ -30483,7 +30346,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30483
30346
|
}) : "text",
|
|
30484
30347
|
disabled: (_b2 = (_a2 = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b2.readonly,
|
|
30485
30348
|
description: /* @__PURE__ */ React.createElement("span", null, "A unique filename for the content.", /* @__PURE__ */ React.createElement("br", null), "Examples: ", /* @__PURE__ */ React.createElement("code", null, "My_Document"), ", ", /* @__PURE__ */ React.createElement("code", null, "My_Document.en"), ",", " ", /* @__PURE__ */ React.createElement("code", null, "sub-folder/My_Document")),
|
|
30486
|
-
placeholder:
|
|
30349
|
+
placeholder: "My_Document",
|
|
30487
30350
|
validate: (value, allValues, meta) => {
|
|
30488
30351
|
var _a3, _b3;
|
|
30489
30352
|
if (!value) {
|
|
@@ -30500,11 +30363,11 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
30500
30363
|
const filePath = `${schemaTools.normalizePath(
|
|
30501
30364
|
schemaCollection.path
|
|
30502
30365
|
)}/${value}.${schemaCollection.format || "md"}`;
|
|
30503
|
-
const match = schema.matchFiles({
|
|
30366
|
+
const match = schema == null ? void 0 : schema.matchFiles({
|
|
30504
30367
|
files: [filePath],
|
|
30505
30368
|
collection: schemaCollection
|
|
30506
30369
|
});
|
|
30507
|
-
if (match.length === 0) {
|
|
30370
|
+
if ((match == null ? void 0 : match.length) === 0) {
|
|
30508
30371
|
return `The filename "${value}" is not allowed for this collection.`;
|
|
30509
30372
|
}
|
|
30510
30373
|
}
|
|
@@ -31078,13 +30941,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31078
30941
|
schemaJson
|
|
31079
30942
|
}) => {
|
|
31080
30943
|
const isSSR2 = typeof window === "undefined";
|
|
31081
|
-
const { edit } = sharedctx.useEditState();
|
|
31082
30944
|
if (isSSR2) {
|
|
31083
30945
|
return null;
|
|
31084
30946
|
}
|
|
31085
|
-
if (!edit) {
|
|
31086
|
-
return /* @__PURE__ */ React.createElement(Layout, null, /* @__PURE__ */ React.createElement(LoginPage, null));
|
|
31087
|
-
}
|
|
31088
30947
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
31089
30948
|
var _a, _b, _c;
|
|
31090
30949
|
const isTinaAdminEnabled = cms.flags.get("tina-admin") === false ? false : true;
|
|
@@ -31167,12 +31026,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31167
31026
|
path: "screens/:screenName",
|
|
31168
31027
|
element: /* @__PURE__ */ React.createElement(DefaultWrapper, { cms }, /* @__PURE__ */ React.createElement(ScreenPage, null))
|
|
31169
31028
|
}
|
|
31170
|
-
), /* @__PURE__ */ React.createElement(
|
|
31171
|
-
reactRouterDom.Route,
|
|
31172
|
-
{
|
|
31173
|
-
path: "logout",
|
|
31174
|
-
element: /* @__PURE__ */ React.createElement(DefaultWrapper, { cms }, /* @__PURE__ */ React.createElement(LogoutRedirect, null))
|
|
31175
|
-
}
|
|
31176
31029
|
), /* @__PURE__ */ React.createElement(
|
|
31177
31030
|
reactRouterDom.Route,
|
|
31178
31031
|
{
|
|
@@ -31187,7 +31040,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31187
31040
|
}
|
|
31188
31041
|
)))));
|
|
31189
31042
|
} else {
|
|
31190
|
-
return /* @__PURE__ */ React.createElement(Layout, null, /* @__PURE__ */ React.createElement(reactRouterDom.HashRouter, null, /* @__PURE__ */ React.createElement(reactRouterDom.Routes, null, /* @__PURE__ */ React.createElement(reactRouterDom.Route, { path: "
|
|
31043
|
+
return /* @__PURE__ */ React.createElement(Layout, null, /* @__PURE__ */ React.createElement(reactRouterDom.HashRouter, null, /* @__PURE__ */ React.createElement(reactRouterDom.Routes, null, /* @__PURE__ */ React.createElement(reactRouterDom.Route, { path: "/", element: /* @__PURE__ */ React.createElement(Redirect, null) }))));
|
|
31191
31044
|
}
|
|
31192
31045
|
});
|
|
31193
31046
|
};
|
|
@@ -31563,7 +31416,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31563
31416
|
exports2.formatBranchName = formatBranchName;
|
|
31564
31417
|
exports2.getFilteredBranchList = getFilteredBranchList;
|
|
31565
31418
|
exports2.getStaticPropsForTina = getStaticPropsForTina;
|
|
31566
|
-
exports2.gql = gql;
|
|
31567
31419
|
exports2.passwordFieldClasses = passwordFieldClasses;
|
|
31568
31420
|
exports2.safeAssertShape = safeAssertShape;
|
|
31569
31421
|
exports2.selectFieldClasses = selectFieldClasses;
|