tinacms 0.0.0-d900f4e-20251117211602 → 0.0.0-d9487bf-20251119052214

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 CHANGED
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  (function(global2, factory) {
8
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/cn"), require("@udecode/plate-heading"), require("is-hotkey"), require("clsx"), require("@radix-ui/react-slot"), require("@udecode/plate-code-block"), require("lucide-react"), require("mermaid"), require("class-variance-authority"), require("cmdk"), require("@radix-ui/react-dialog"), require("@radix-ui/react-popover"), require("@udecode/plate"), require("@ariakit/react"), require("@udecode/plate-combobox"), require("@udecode/plate-reset-node"), require("@udecode/plate-list"), require("@udecode/plate-resizable"), require("@udecode/plate-dnd"), require("@udecode/plate-table"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-separator"), require("@radix-ui/react-tooltip"), require("final-form"), require("final-form-arrays"), require("final-form-set-field-data"), require("react-final-form"), require("prop-types"), require("tailwind-merge"), require("react-beautiful-dnd"), require("react-color"), require("color-string"), require("graphql"), require("@graphql-inspector/core"), require("react-dropzone"), require("@udecode/cmdk"), require("@headlessui/react"), require("@udecode/plate-trailing-block"), require("@udecode/plate-floating"), require("@udecode/plate-block-quote"), require("@udecode/plate-node-id"), require("@udecode/plate-link"), require("@udecode/plate-autoformat"), require("lodash.get"), require("moment"), require("date-fns"), require("@tinacms/schema-tools"), require("graphql-tag"), require("yup"), require("react-router-dom"), require("@tinacms/mdx")) : typeof define === "function" && define.amd ? define(["exports", "zod", "react", "react-dom", "@udecode/cn", "@udecode/plate-heading", "is-hotkey", "clsx", "@radix-ui/react-slot", "@udecode/plate-code-block", "lucide-react", "mermaid", "class-variance-authority", "cmdk", "@radix-ui/react-dialog", "@radix-ui/react-popover", "@udecode/plate", "@ariakit/react", "@udecode/plate-combobox", "@udecode/plate-reset-node", "@udecode/plate-list", "@udecode/plate-resizable", "@udecode/plate-dnd", "@udecode/plate-table", "@radix-ui/react-dropdown-menu", "@radix-ui/react-toolbar", "@radix-ui/react-separator", "@radix-ui/react-tooltip", "final-form", "final-form-arrays", "final-form-set-field-data", "react-final-form", "prop-types", "tailwind-merge", "react-beautiful-dnd", "react-color", "color-string", "graphql", "@graphql-inspector/core", "react-dropzone", "@udecode/cmdk", "@headlessui/react", "@udecode/plate-trailing-block", "@udecode/plate-floating", "@udecode/plate-block-quote", "@udecode/plate-node-id", "@udecode/plate-link", "@udecode/plate-autoformat", "lodash.get", "moment", "date-fns", "@tinacms/schema-tools", "graphql-tag", "yup", "react-router-dom", "@tinacms/mdx"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.tinacms = {}, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP));
9
- })(this, function(exports2, zod, React, ReactDOM, cn$2, plateHeading, isHotkey, clsx, reactSlot, plateCodeBlock, lucideReact, mermaid, classVarianceAuthority, cmdk, DialogPrimitive, PopoverPrimitive, plate, react, plateCombobox, plateResetNode, plateList, plateResizable, plateDnd, plateTable, DropdownMenuPrimitive, ToolbarPrimitive, SeparatorPrimitive, TooltipPrimitive, finalForm, arrayMutators, setFieldData, reactFinalForm, PropTypes, tailwindMerge, reactBeautifulDnd, pkg$1, pkg, graphql$1, core$1, dropzone, cmdk$1, react$1, plateTrailingBlock, plateFloating, plateBlockQuote, plateNodeId, plateLink, plateAutoformat, get$5, moment, dateFns, schemaTools, gql, yup, reactRouterDom, mdx) {
8
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/cn"), require("@udecode/plate-heading"), require("is-hotkey"), require("clsx"), require("@radix-ui/react-slot"), require("@udecode/plate-code-block"), require("lucide-react"), require("mermaid"), require("class-variance-authority"), require("cmdk"), require("@radix-ui/react-dialog"), require("@radix-ui/react-popover"), require("@udecode/plate"), require("@ariakit/react"), require("@udecode/plate-combobox"), require("@udecode/plate-reset-node"), require("@udecode/plate-list"), require("@udecode/plate-resizable"), require("@udecode/plate-dnd"), require("@udecode/plate-table"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-separator"), require("@radix-ui/react-tooltip"), require("final-form"), require("final-form-arrays"), require("final-form-set-field-data"), require("react-final-form"), require("prop-types"), require("tailwind-merge"), require("@dnd-kit/core"), require("@dnd-kit/sortable"), require("@dnd-kit/utilities"), require("react-color"), require("color-string"), require("graphql"), require("@graphql-inspector/core"), require("react-dropzone"), require("@udecode/cmdk"), require("@headlessui/react"), require("@udecode/plate-trailing-block"), require("@udecode/plate-floating"), require("@udecode/plate-block-quote"), require("@udecode/plate-node-id"), require("@udecode/plate-link"), require("@udecode/plate-autoformat"), require("lodash.get"), require("moment"), require("date-fns"), require("@tinacms/schema-tools"), require("graphql-tag"), require("yup"), require("react-router-dom"), require("@tinacms/mdx")) : typeof define === "function" && define.amd ? define(["exports", "zod", "react", "react-dom", "@udecode/cn", "@udecode/plate-heading", "is-hotkey", "clsx", "@radix-ui/react-slot", "@udecode/plate-code-block", "lucide-react", "mermaid", "class-variance-authority", "cmdk", "@radix-ui/react-dialog", "@radix-ui/react-popover", "@udecode/plate", "@ariakit/react", "@udecode/plate-combobox", "@udecode/plate-reset-node", "@udecode/plate-list", "@udecode/plate-resizable", "@udecode/plate-dnd", "@udecode/plate-table", "@radix-ui/react-dropdown-menu", "@radix-ui/react-toolbar", "@radix-ui/react-separator", "@radix-ui/react-tooltip", "final-form", "final-form-arrays", "final-form-set-field-data", "react-final-form", "prop-types", "tailwind-merge", "@dnd-kit/core", "@dnd-kit/sortable", "@dnd-kit/utilities", "react-color", "color-string", "graphql", "@graphql-inspector/core", "react-dropzone", "@udecode/cmdk", "@headlessui/react", "@udecode/plate-trailing-block", "@udecode/plate-floating", "@udecode/plate-block-quote", "@udecode/plate-node-id", "@udecode/plate-link", "@udecode/plate-autoformat", "lodash.get", "moment", "date-fns", "@tinacms/schema-tools", "graphql-tag", "yup", "react-router-dom", "@tinacms/mdx"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.tinacms = {}, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP, global2.NOOP));
9
+ })(this, function(exports2, zod, React, ReactDOM, cn$2, plateHeading, isHotkey, clsx, reactSlot, plateCodeBlock, lucideReact, mermaid, classVarianceAuthority, cmdk, DialogPrimitive, PopoverPrimitive, plate, react, plateCombobox, plateResetNode, plateList, plateResizable, plateDnd, plateTable, DropdownMenuPrimitive, ToolbarPrimitive, SeparatorPrimitive, TooltipPrimitive, finalForm, arrayMutators, setFieldData, reactFinalForm, PropTypes, tailwindMerge, core$1, sortable, utilities, pkg$1, pkg, graphql$1, core$2, dropzone, cmdk$1, react$1, plateTrailingBlock, plateFloating, plateBlockQuote, plateNodeId, plateLink, plateAutoformat, get$5, moment, dateFns, schemaTools, gql, yup, reactRouterDom, mdx) {
10
10
  var _a;
11
11
  "use strict";
12
12
  function _interopNamespaceDefault(e3) {
@@ -38960,6 +38960,128 @@ Please wrap them with useCallback or configure the deps array correctly.`
38960
38960
  }
38961
38961
  );
38962
38962
  DropdownButton.displayName = "DropdownButton";
38963
+ const DragDropContext = ({
38964
+ onDragEnd,
38965
+ children
38966
+ }) => {
38967
+ const sensors = core$1.useSensors(
38968
+ core$1.useSensor(core$1.PointerSensor, {
38969
+ activationConstraint: {
38970
+ delay: 100,
38971
+ tolerance: 5
38972
+ }
38973
+ }),
38974
+ core$1.useSensor(core$1.KeyboardSensor, {
38975
+ coordinateGetter: sortable.sortableKeyboardCoordinates
38976
+ })
38977
+ );
38978
+ const handleDragEnd = (event) => {
38979
+ const { active, over } = event;
38980
+ if (!over || active.id === over.id) {
38981
+ return;
38982
+ }
38983
+ const activeIdStr = String(active.id);
38984
+ const overIdStr = String(over.id);
38985
+ const activeFieldName = activeIdStr.substring(
38986
+ 0,
38987
+ activeIdStr.lastIndexOf(".")
38988
+ );
38989
+ const overFieldName = overIdStr.substring(0, overIdStr.lastIndexOf("."));
38990
+ const activeIndex = parseInt(
38991
+ activeIdStr.substring(activeIdStr.lastIndexOf(".") + 1)
38992
+ );
38993
+ const overIndex = parseInt(
38994
+ overIdStr.substring(overIdStr.lastIndexOf(".") + 1)
38995
+ );
38996
+ if (activeFieldName === overFieldName) {
38997
+ const result = {
38998
+ destination: {
38999
+ index: overIndex
39000
+ },
39001
+ source: {
39002
+ index: activeIndex
39003
+ },
39004
+ type: activeFieldName
39005
+ };
39006
+ onDragEnd(result);
39007
+ }
39008
+ };
39009
+ return /* @__PURE__ */ React.createElement(
39010
+ core$1.DndContext,
39011
+ {
39012
+ sensors,
39013
+ collisionDetection: core$1.closestCenter,
39014
+ onDragEnd: handleDragEnd
39015
+ },
39016
+ children
39017
+ );
39018
+ };
39019
+ const Droppable = ({
39020
+ droppableId,
39021
+ type,
39022
+ children
39023
+ }) => {
39024
+ const ref = React.useRef(null);
39025
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, children({
39026
+ innerRef: ref,
39027
+ placeholder: null
39028
+ }));
39029
+ };
39030
+ const Draggable = ({
39031
+ draggableId,
39032
+ children
39033
+ }) => {
39034
+ const animateLayoutChanges = (args) => {
39035
+ const { isSorting, wasDragging } = args;
39036
+ if (wasDragging) {
39037
+ return false;
39038
+ }
39039
+ if (isSorting) {
39040
+ return sortable.defaultAnimateLayoutChanges(args);
39041
+ }
39042
+ return true;
39043
+ };
39044
+ const {
39045
+ attributes,
39046
+ listeners,
39047
+ setNodeRef,
39048
+ transform,
39049
+ transition,
39050
+ isDragging,
39051
+ setActivatorNodeRef
39052
+ } = sortable.useSortable({
39053
+ id: draggableId,
39054
+ animateLayoutChanges
39055
+ });
39056
+ const style = {
39057
+ transform: utilities.CSS.Transform.toString(transform),
39058
+ transition,
39059
+ ...isDragging && { zIndex: 9999 }
39060
+ };
39061
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, children(
39062
+ {
39063
+ innerRef: { current: null },
39064
+ draggableProps: {
39065
+ ref: setNodeRef,
39066
+ style,
39067
+ ...attributes
39068
+ },
39069
+ dragHandleProps: {
39070
+ ref: setActivatorNodeRef,
39071
+ ...listeners
39072
+ }
39073
+ },
39074
+ {
39075
+ isDragging
39076
+ }
39077
+ ));
39078
+ };
39079
+ const SortableProvider = ({
39080
+ items: items2,
39081
+ children
39082
+ }) => {
39083
+ return /* @__PURE__ */ React.createElement(sortable.SortableContext, { items: items2, strategy: sortable.verticalListSortingStrategy }, children);
39084
+ };
38963
39085
  function FaCircle(props) {
38964
39086
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z" }, "child": [] }] })(props);
38965
39087
  }
@@ -39506,6 +39628,9 @@ Please wrap them with useCallback or configure the deps array correctly.`
39506
39628
  function MdVpnKey(props) {
39507
39629
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12.65 10A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z" }, "child": [] }] })(props);
39508
39630
  }
39631
+ function MdAccessTime(props) {
39632
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z" }, "child": [] }] })(props);
39633
+ }
39509
39634
  function MdKeyboardArrowDown(props) {
39510
39635
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" }, "child": [] }] })(props);
39511
39636
  }
@@ -39515,6 +39640,9 @@ Please wrap them with useCallback or configure the deps array correctly.`
39515
39640
  function MdSyncProblem(props) {
39516
39641
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M3 12c0 2.21.91 4.2 2.36 5.64L3 20h6v-6l-2.24 2.24A6.003 6.003 0 0 1 5 12a5.99 5.99 0 0 1 4-5.65V4.26C5.55 5.15 3 8.27 3 12zm8 5h2v-2h-2v2zM21 4h-6v6l2.24-2.24A6.003 6.003 0 0 1 19 12a5.99 5.99 0 0 1-4 5.65v2.09c3.45-.89 6-4.01 6-7.74 0-2.21-.91-4.2-2.36-5.64L21 4zm-10 9h2V7h-2v6z" }, "child": [] }] })(props);
39517
39642
  }
39643
+ function MdWifiOff(props) {
39644
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 0 0-4.49-2.56l3.53 3.53.96-.97zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 0 0 5 13v.01L6.99 15a7.042 7.042 0 0 1 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 0 0-6 0z" }, "child": [] }] })(props);
39645
+ }
39518
39646
  function MdOutlineHelpOutline(props) {
39519
39647
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z" }, "child": [] }] })(props);
39520
39648
  }
@@ -39524,6 +39652,9 @@ Please wrap them with useCallback or configure the deps array correctly.`
39524
39652
  function MdOutlineClear(props) {
39525
39653
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }, "child": [] }] })(props);
39526
39654
  }
39655
+ function MdOutlineDataSaverOff(props) {
39656
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M13 2.05v3.03c3.39.49 6 3.39 6 6.92 0 .9-.18 1.75-.48 2.54l2.6 1.53c.56-1.24.88-2.62.88-4.07 0-5.18-3.95-9.45-9-9.95zM12 19c-3.87 0-7-3.13-7-7 0-3.53 2.61-6.43 6-6.92V2.05c-5.06.5-9 4.76-9 9.95 0 5.52 4.47 10 9.99 10 3.31 0 6.24-1.61 8.06-4.09l-2.6-1.53A6.95 6.95 0 0 1 12 19z" }, "child": [] }] })(props);
39657
+ }
39527
39658
  function MdOutlineCloud(props) {
39528
39659
  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 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0 1 22 15c0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0 1 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96A7.49 7.49 0 0 0 12 4z" }, "child": [] }] })(props);
39529
39660
  }
@@ -39533,7 +39664,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
39533
39664
  function MdOutlinePerson(props) {
39534
39665
  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);
39535
39666
  }
39536
- const selectFieldClasses = "shadow appearance-none bg-white block pl-3 pr-8 py-2 truncate w-full text-base cursor-pointer border border-gray-200 focus:outline-none focus:shadow-outline focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded";
39667
+ const selectFieldClasses = "shadow appearance-none h-full bg-white block pl-3 pr-8 py-2 truncate w-full text-base cursor-pointer border border-gray-200 focus:outline-none focus:shadow-outline focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded";
39537
39668
  const Select = ({
39538
39669
  input,
39539
39670
  field,
@@ -39547,7 +39678,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
39547
39678
  ref.current.focus();
39548
39679
  }
39549
39680
  }, [field == null ? void 0 : field.experimental_focusIntent, ref]);
39550
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group w-full md:w-auto" }, /* @__PURE__ */ React__namespace.createElement(
39681
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group w-full h-full md:w-auto" }, /* @__PURE__ */ React__namespace.createElement(
39551
39682
  "select",
39552
39683
  {
39553
39684
  id: input.name,
@@ -40439,19 +40570,25 @@ Please wrap them with useCallback or configure the deps array correctly.`
40439
40570
  /* @__PURE__ */ React.createElement(AddIcon, { className: "w-5/6 h-auto" })
40440
40571
  )
40441
40572
  },
40442
- /* @__PURE__ */ React.createElement(ListPanel, null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(reactBeautifulDnd.Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React.createElement("div", { ref: provider.innerRef }, items2.length === 0 && /* @__PURE__ */ React.createElement(EmptyList, null), items2.map((item, index2) => /* @__PURE__ */ React.createElement(
40443
- Item$2,
40573
+ /* @__PURE__ */ React.createElement(ListPanel, null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React.createElement("div", { ref: provider.innerRef }, items2.length === 0 && /* @__PURE__ */ React.createElement(EmptyList, null), /* @__PURE__ */ React.createElement(
40574
+ SortableProvider,
40444
40575
  {
40445
- key: index2,
40446
- tinaForm,
40447
- field,
40448
- item,
40449
- index: index2,
40450
- isMin,
40451
- fixedLength,
40452
- ...itemProps(item)
40453
- }
40454
- )), provider.placeholder))))
40576
+ items: items2.map((_, index2) => `${field.name}.${index2}`)
40577
+ },
40578
+ items2.map((item, index2) => /* @__PURE__ */ React.createElement(
40579
+ Item$2,
40580
+ {
40581
+ key: index2,
40582
+ tinaForm,
40583
+ field,
40584
+ item,
40585
+ index: index2,
40586
+ isMin,
40587
+ fixedLength,
40588
+ ...itemProps(item)
40589
+ }
40590
+ ))
40591
+ ), provider.placeholder))))
40455
40592
  );
40456
40593
  };
40457
40594
  const Item$2 = ({
@@ -40471,14 +40608,20 @@ Please wrap them with useCallback or configure the deps array correctly.`
40471
40608
  const title = label || `${field.label || field.name} Item`;
40472
40609
  const { dispatch: setHoveredField } = useEvent("field:hover");
40473
40610
  const { dispatch: setFocusedField } = useEvent("field:focus");
40474
- return /* @__PURE__ */ React.createElement(reactBeautifulDnd.Draggable, { draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
40611
+ return /* @__PURE__ */ React.createElement(Draggable, { draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
40475
40612
  ItemHeader,
40476
40613
  {
40477
40614
  provider,
40478
40615
  isDragging: snapshot.isDragging,
40479
40616
  ...p2
40480
40617
  },
40481
- /* @__PURE__ */ React.createElement(DragHandle, { isDragging: snapshot.isDragging }),
40618
+ /* @__PURE__ */ React.createElement(
40619
+ DragHandle,
40620
+ {
40621
+ isDragging: snapshot.isDragging,
40622
+ dragHandleProps: provider.dragHandleProps
40623
+ }
40624
+ ),
40482
40625
  /* @__PURE__ */ React.createElement(
40483
40626
  ItemClickTarget,
40484
40627
  {
@@ -40542,17 +40685,16 @@ Please wrap them with useCallback or configure the deps array correctly.`
40542
40685
  provider,
40543
40686
  ...props
40544
40687
  }) => {
40688
+ var _a2, _b;
40545
40689
  return /* @__PURE__ */ React.createElement(
40546
40690
  "div",
40547
40691
  {
40548
- ref: provider.innerRef,
40692
+ ref: (_a2 = provider.draggableProps) == null ? void 0 : _a2.ref,
40549
40693
  ...provider.draggableProps,
40550
- ...provider.dragHandleProps,
40551
40694
  ...props,
40552
40695
  className: `relative group cursor-pointer flex justify-between items-stretch bg-white border border-gray-100 -mb-px overflow-visible p-0 text-sm font-normal ${isDragging ? "rounded shadow text-blue-600" : "text-gray-600 first:rounded-t last:rounded-b"} ${props.className ?? ""}`,
40553
40696
  style: {
40554
- ...provider.draggableProps.style ?? {},
40555
- ...provider.dragHandleProps.style ?? {},
40697
+ ...((_b = provider.draggableProps) == null ? void 0 : _b.style) ?? {},
40556
40698
  ...props.style ?? {}
40557
40699
  }
40558
40700
  },
@@ -40570,10 +40712,14 @@ Please wrap them with useCallback or configure the deps array correctly.`
40570
40712
  /* @__PURE__ */ React.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
40571
40713
  );
40572
40714
  };
40573
- const DragHandle = ({ isDragging }) => {
40715
+ const DragHandle = ({
40716
+ isDragging,
40717
+ dragHandleProps
40718
+ }) => {
40574
40719
  return /* @__PURE__ */ React.createElement(
40575
40720
  "div",
40576
40721
  {
40722
+ ...dragHandleProps,
40577
40723
  className: `relative w-8 px-1 py-2.5 flex items-center justify-center hover:bg-gray-50 group cursor-[grab] ${isDragging ? `text-blue-500` : `text-gray-200 hover:text-gray-600`}`
40578
40724
  },
40579
40725
  isDragging ? /* @__PURE__ */ React.createElement(ReorderIcon, { className: "fill-current w-7 h-auto" }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DragIcon, { className: "fill-current w-7 h-auto group-hover:opacity-0 transition-opacity duration-150 ease-out" }), /* @__PURE__ */ React.createElement(ReorderIcon, { className: "fill-current w-7 h-auto absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity duration-150 ease-out" }))
@@ -41025,39 +41171,45 @@ Please wrap them with useCallback or configure the deps array correctly.`
41025
41171
  }
41026
41172
  ))
41027
41173
  },
41028
- /* @__PURE__ */ React__namespace.createElement(ListPanel, null, /* @__PURE__ */ React__namespace.createElement(reactBeautifulDnd.Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React__namespace.createElement("div", { ref: provider.innerRef, className: "edit-page--list-parent" }, items2.length === 0 && /* @__PURE__ */ React__namespace.createElement(EmptyList, null), items2.map((block2, index2) => {
41029
- const template = field.templates[block2._template];
41030
- if (!template) {
41174
+ /* @__PURE__ */ React__namespace.createElement(ListPanel, null, /* @__PURE__ */ React__namespace.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React__namespace.createElement("div", { ref: provider.innerRef, className: "edit-page--list-parent" }, items2.length === 0 && /* @__PURE__ */ React__namespace.createElement(EmptyList, null), /* @__PURE__ */ React__namespace.createElement(
41175
+ SortableProvider,
41176
+ {
41177
+ items: items2.map((_, index2) => `${field.name}.${index2}`)
41178
+ },
41179
+ items2.map((block2, index2) => {
41180
+ const template = field.templates[block2._template];
41181
+ if (!template) {
41182
+ return /* @__PURE__ */ React__namespace.createElement(
41183
+ InvalidBlockListItem,
41184
+ {
41185
+ key: index2,
41186
+ index: index2,
41187
+ field,
41188
+ tinaForm
41189
+ }
41190
+ );
41191
+ }
41192
+ const itemProps = (item) => {
41193
+ if (!template.itemProps)
41194
+ return {};
41195
+ return template.itemProps(item);
41196
+ };
41031
41197
  return /* @__PURE__ */ React__namespace.createElement(
41032
- InvalidBlockListItem,
41198
+ BlockListItem,
41033
41199
  {
41034
41200
  key: index2,
41201
+ block: block2,
41202
+ template,
41035
41203
  index: index2,
41036
41204
  field,
41037
- tinaForm
41205
+ tinaForm,
41206
+ isMin,
41207
+ fixedLength,
41208
+ ...itemProps(block2)
41038
41209
  }
41039
41210
  );
41040
- }
41041
- const itemProps = (item) => {
41042
- if (!template.itemProps)
41043
- return {};
41044
- return template.itemProps(item);
41045
- };
41046
- return /* @__PURE__ */ React__namespace.createElement(
41047
- BlockListItem,
41048
- {
41049
- key: index2,
41050
- block: block2,
41051
- template,
41052
- index: index2,
41053
- field,
41054
- tinaForm,
41055
- isMin,
41056
- fixedLength,
41057
- ...itemProps(block2)
41058
- }
41059
- );
41060
- }), provider.placeholder)))
41211
+ })
41212
+ ), provider.placeholder)))
41061
41213
  );
41062
41214
  };
41063
41215
  const BlockListItem = ({
@@ -41075,7 +41227,13 @@ Please wrap them with useCallback or configure the deps array correctly.`
41075
41227
  }, [tinaForm, field, index]);
41076
41228
  const { dispatch: setHoveredField } = useEvent("field:hover");
41077
41229
  const { dispatch: setFocusedField } = useEvent("field:focus");
41078
- return /* @__PURE__ */ React__namespace.createElement(reactBeautifulDnd.Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React__namespace.createElement(DragHandle, { isDragging: snapshot.isDragging }), /* @__PURE__ */ React__namespace.createElement(
41230
+ return /* @__PURE__ */ React__namespace.createElement(Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React__namespace.createElement(
41231
+ DragHandle,
41232
+ {
41233
+ isDragging: snapshot.isDragging,
41234
+ dragHandleProps: provider.dragHandleProps
41235
+ }
41236
+ ), /* @__PURE__ */ React__namespace.createElement(
41079
41237
  ItemClickTarget,
41080
41238
  {
41081
41239
  onClick: () => {
@@ -41116,7 +41274,13 @@ Please wrap them with useCallback or configure the deps array correctly.`
41116
41274
  const removeItem = React__namespace.useCallback(() => {
41117
41275
  tinaForm.mutators.remove(field.name, index);
41118
41276
  }, [tinaForm, field, index]);
41119
- return /* @__PURE__ */ React__namespace.createElement(reactBeautifulDnd.Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React__namespace.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React__namespace.createElement(DragHandle, { isDragging: snapshot.isDragging }), /* @__PURE__ */ React__namespace.createElement(ItemClickTarget, null, /* @__PURE__ */ React__namespace.createElement(GroupLabel, { error: true }, "Invalid Block")), /* @__PURE__ */ React__namespace.createElement(ItemDeleteButton, { onClick: removeItem })));
41277
+ return /* @__PURE__ */ React__namespace.createElement(Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React__namespace.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React__namespace.createElement(
41278
+ DragHandle,
41279
+ {
41280
+ isDragging: snapshot.isDragging,
41281
+ dragHandleProps: provider.dragHandleProps
41282
+ }
41283
+ ), /* @__PURE__ */ React__namespace.createElement(ItemClickTarget, null, /* @__PURE__ */ React__namespace.createElement(GroupLabel, { error: true }, "Invalid Block")), /* @__PURE__ */ React__namespace.createElement(ItemDeleteButton, { onClick: removeItem })));
41120
41284
  };
41121
41285
  const BlocksField = Blocks;
41122
41286
  const BlocksFieldPlugin = {
@@ -41183,19 +41347,25 @@ Please wrap them with useCallback or configure the deps array correctly.`
41183
41347
  tinaForm,
41184
41348
  actions: (!fixedLength || fixedLength && !isMax) && /* @__PURE__ */ React__namespace.createElement(IconButton, { onClick: addItem, variant: "primary", size: "small" }, /* @__PURE__ */ React__namespace.createElement(AddIcon, { className: "w-5/6 h-auto" }))
41185
41349
  },
41186
- /* @__PURE__ */ React__namespace.createElement(ListPanel, null, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(reactBeautifulDnd.Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React__namespace.createElement("div", { ref: provider.innerRef }, items2.length === 0 && /* @__PURE__ */ React__namespace.createElement(EmptyList, null), items2.map((item, index2) => /* @__PURE__ */ React__namespace.createElement(
41187
- Item$1,
41350
+ /* @__PURE__ */ React__namespace.createElement(ListPanel, null, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React__namespace.createElement("div", { ref: provider.innerRef }, items2.length === 0 && /* @__PURE__ */ React__namespace.createElement(EmptyList, null), /* @__PURE__ */ React__namespace.createElement(
41351
+ SortableProvider,
41188
41352
  {
41189
- key: index2,
41190
- tinaForm,
41191
- field,
41192
- item,
41193
- index: index2,
41194
- isMin,
41195
- fixedLength,
41196
- ...itemProps(item)
41197
- }
41198
- )), provider.placeholder))))
41353
+ items: items2.map((_, index2) => `${field.name}.${index2}`)
41354
+ },
41355
+ items2.map((item, index2) => /* @__PURE__ */ React__namespace.createElement(
41356
+ Item$1,
41357
+ {
41358
+ key: index2,
41359
+ tinaForm,
41360
+ field,
41361
+ item,
41362
+ index: index2,
41363
+ isMin,
41364
+ fixedLength,
41365
+ ...itemProps(item)
41366
+ }
41367
+ ))
41368
+ ), provider.placeholder))))
41199
41369
  );
41200
41370
  };
41201
41371
  const Item$1 = ({
@@ -41221,7 +41391,13 @@ Please wrap them with useCallback or configure the deps array correctly.`
41221
41391
  name: `${field.name}.${index}`
41222
41392
  }
41223
41393
  ];
41224
- return /* @__PURE__ */ React__namespace.createElement(reactBeautifulDnd.Draggable, { draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React__namespace.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging, ...p2 }, /* @__PURE__ */ React__namespace.createElement(DragHandle, { isDragging: snapshot.isDragging }), /* @__PURE__ */ React__namespace.createElement(ItemClickTarget, null, /* @__PURE__ */ React__namespace.createElement(FieldsBuilder, { padding: false, form: tinaForm, fields })), (!fixedLength || fixedLength && !isMin) && /* @__PURE__ */ React__namespace.createElement(ItemDeleteButton, { disabled: isMin, onClick: removeItem })));
41394
+ return /* @__PURE__ */ React__namespace.createElement(Draggable, { draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React__namespace.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging, ...p2 }, /* @__PURE__ */ React__namespace.createElement(
41395
+ DragHandle,
41396
+ {
41397
+ isDragging: snapshot.isDragging,
41398
+ dragHandleProps: provider.dragHandleProps
41399
+ }
41400
+ ), /* @__PURE__ */ React__namespace.createElement(ItemClickTarget, null, /* @__PURE__ */ React__namespace.createElement(FieldsBuilder, { padding: false, form: tinaForm, fields })), (!fixedLength || fixedLength && !isMin) && /* @__PURE__ */ React__namespace.createElement(ItemDeleteButton, { disabled: isMin, onClick: removeItem })));
41225
41401
  };
41226
41402
  const ListField = List;
41227
41403
  const ListFieldPlugin = {
@@ -43104,6 +43280,38 @@ Please wrap them with useCallback or configure the deps array correctly.`
43104
43280
  " Create Branch"
43105
43281
  )));
43106
43282
  };
43283
+ const Badge = ({
43284
+ children,
43285
+ calloutStyle = "warning",
43286
+ className = "",
43287
+ displayIcon = true,
43288
+ ...props
43289
+ }) => {
43290
+ const commonAlertStyles = "text-xs px-2 py-0.5 flex items-center rounded-md border";
43291
+ const styles = {
43292
+ warning: `text-amber-700 bg-amber-100 border-amber-700/20`,
43293
+ info: `text-blue-600 bg-blue-100/50 border-blue-600/20`,
43294
+ success: `text-green-600 bg-green-100/50 border-green-600/20`,
43295
+ error: `text-red-700 bg-red-100/50 border-red-700/20`
43296
+ };
43297
+ const icon = {
43298
+ warning: /* @__PURE__ */ React__namespace.createElement(MdAccessTime, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-amber-600" }),
43299
+ info: /* @__PURE__ */ React__namespace.createElement(MdOutlineDataSaverOff, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-blue-600" }),
43300
+ success: /* @__PURE__ */ React__namespace.createElement(MdCheckCircle, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-green-600" }),
43301
+ error: /* @__PURE__ */ React__namespace.createElement(MdWifiOff, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-red-700" })
43302
+ };
43303
+ return /* @__PURE__ */ React__namespace.createElement(
43304
+ "div",
43305
+ {
43306
+ className: cn$1(commonAlertStyles, styles[calloutStyle], className),
43307
+ ...props
43308
+ },
43309
+ displayIcon && icon[calloutStyle],
43310
+ " ",
43311
+ children
43312
+ );
43313
+ };
43314
+ const tableHeadingStyle = "px-3 py-3 text-left text-xs font-bold text-gray-700 tracking-wider";
43107
43315
  function formatBranchName(str) {
43108
43316
  const pattern = /[^/\w-]+/g;
43109
43317
  const formattedStr = str.replace(pattern, "-");
@@ -43347,7 +43555,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
43347
43555
  filter2
43348
43556
  ).sort(sortBranchListFn(sortValue));
43349
43557
  const previewFunction = (_d = (_c = (_b = (_a2 = cms.api.tina.schema) == null ? void 0 : _a2.config) == null ? void 0 : _b.config) == null ? void 0 : _c.ui) == null ? void 0 : _d.previewUrl;
43350
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-end space-x-4" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(
43558
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-stretch space-x-4" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(
43351
43559
  "label",
43352
43560
  {
43353
43561
  htmlFor: "search",
@@ -43370,7 +43578,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
43370
43578
  className: "outline-none focus:outline-none bg-transparent border-0 p-0 m-0 absolute right-2.5 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 transition-all ease-out duration-150"
43371
43579
  },
43372
43580
  /* @__PURE__ */ React__namespace.createElement(MdOutlineClear, { className: "w-5 h-auto text-gray-600" })
43373
- ))), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(
43581
+ ))), /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React__namespace.createElement(
43374
43582
  "label",
43375
43583
  {
43376
43584
  htmlFor: "branch-type",
@@ -43398,7 +43606,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
43398
43606
  }
43399
43607
  ]
43400
43608
  }
43401
- ))), filteredBranchList.length === 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "block relative text-gray-300 italic py-1" }, "No branches to display"), filteredBranchList.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-[192px] max-h-[24rem] overflow-y-auto flex flex-col w-full h-full rounded-lg shadow-inner bg-white border border-gray-200" }, filteredBranchList.map((branch) => /* @__PURE__ */ React__namespace.createElement(
43609
+ ))), filteredBranchList.length === 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "block relative text-gray-300 italic py-1" }, "No branches to display"), filteredBranchList.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-[192px] max-h-[24rem] overflow-y-auto w-full h-full rounded-lg shadow-inner bg-white border border-gray-200" }, /* @__PURE__ */ React__namespace.createElement("table", { className: "w-full" }, /* @__PURE__ */ React__namespace.createElement("thead", { className: "bg-gray-100 border-b-2 border-gray-200" }, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", { className: tableHeadingStyle }, "Branch Name"), /* @__PURE__ */ React__namespace.createElement("th", { className: tableHeadingStyle }, "Last Updated"), /* @__PURE__ */ React__namespace.createElement("th", null), /* @__PURE__ */ React__namespace.createElement("th", null))), /* @__PURE__ */ React__namespace.createElement("tbody", null, filteredBranchList.map((branch) => /* @__PURE__ */ React__namespace.createElement(
43402
43610
  BranchItem,
43403
43611
  {
43404
43612
  key: branch.name,
@@ -43409,7 +43617,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
43409
43617
  previewFunction,
43410
43618
  cms
43411
43619
  }
43412
- ))));
43620
+ ))))));
43413
43621
  };
43414
43622
  const BranchItem = ({
43415
43623
  branch,
@@ -43445,15 +43653,15 @@ Please wrap them with useCallback or configure the deps array correctly.`
43445
43653
  const isCurrentBranch = branch.name === currentBranch;
43446
43654
  const indexingStatus = (_a2 = branch == null ? void 0 : branch.indexStatus) == null ? void 0 : _a2.status;
43447
43655
  return /* @__PURE__ */ React__namespace.createElement(
43448
- "div",
43656
+ "tr",
43449
43657
  {
43450
- className: `relative text-base py-1.5 px-3 flex items-center gap-1.5 border-l-0 border-t-0 border-r-0 border-gray-50 w-full outline-none transition-all ease-out duration-150 ${indexingStatus !== "complete" ? "bg-gray-50 text-gray-400" : isCurrentBranch ? "border-blue-500 border-l-5 bg-blue-50 text-blue-800 border-b-0" : "border-b-2"}`
43658
+ className: `text-base border-l-0 border-t-0 border-r-0 outline-none transition-all ease-out duration-150 ${indexingStatus !== "complete" ? "bg-gray-50 text-gray-400" : isCurrentBranch ? "bg-blue-50 text-blue-800 border-b-0" : "border-b-2 border-gray-50"}`
43451
43659
  },
43452
- /* @__PURE__ */ React__namespace.createElement("div", { className: "w-1/2" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-0" }, branch.protected && /* @__PURE__ */ React__namespace.createElement(BiLock, { className: "w-5 h-auto opacity-70 text-blue-500" })), /* @__PURE__ */ React__namespace.createElement("div", { className: "truncate flex-1" }, branch.name)), indexingStatus !== "complete" && /* @__PURE__ */ React__namespace.createElement("div", { className: "w-fit" }, /* @__PURE__ */ React__namespace.createElement(IndexStatus, { indexingStatus: branch.indexStatus.status }))),
43453
- /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1" }, creatingPR ? /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs font-bold text-blue-600" }, "Creating PR"), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm leading-tight text-blue-500" }, "Please wait...")), /* @__PURE__ */ React__namespace.createElement(FaSpinner, { className: "w-3 h-auto animate-spin text-blue-500" })) : /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs font-bold" }, "Last Updated"), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm leading-tight" }, dateFns.formatDistanceToNow(new Date(branch.indexStatus.timestamp), {
43660
+ /* @__PURE__ */ React__namespace.createElement("td", { className: "pl-3 pr-3 py-1.5 min-w-0" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1" }, branch.protected && /* @__PURE__ */ React__namespace.createElement(BiLock, { className: "w-5 h-auto opacity-70 text-blue-500 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm leading-tight truncate" }, branch.name)), indexingStatus !== "complete" && /* @__PURE__ */ React__namespace.createElement("div", { className: "w-fit mt-1" }, /* @__PURE__ */ React__namespace.createElement(IndexStatus, { indexingStatus: branch.indexStatus.status })))),
43661
+ /* @__PURE__ */ React__namespace.createElement("td", { className: "px-3 py-1.5 min-w-0" }, creatingPR ? /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs font-bold text-blue-600" }, "Creating PR"), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm leading-tight text-blue-500" }, "Please wait...")), /* @__PURE__ */ React__namespace.createElement(FaSpinner, { className: "w-3 h-auto animate-spin text-blue-500" })) : /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm leading-tight whitespace-nowrap" }, dateFns.formatDistanceToNow(new Date(branch.indexStatus.timestamp), {
43454
43662
  addSuffix: true
43455
- })))),
43456
- /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center" }, indexingStatus === "complete" && !isCurrentBranch && /* @__PURE__ */ React__namespace.createElement(
43663
+ }))),
43664
+ /* @__PURE__ */ React__namespace.createElement("td", { className: "px-3 py-1.5 text-left" }, indexingStatus === "complete" && !isCurrentBranch && /* @__PURE__ */ React__namespace.createElement(
43457
43665
  Button$1,
43458
43666
  {
43459
43667
  variant: "white",
@@ -43461,12 +43669,13 @@ Please wrap them with useCallback or configure the deps array correctly.`
43461
43669
  onClick: () => {
43462
43670
  onChange(branch.name);
43463
43671
  },
43464
- className: "mr-auto cursor-pointer text-sm h-9 px-4 flex items-center gap-1"
43672
+ className: "cursor-pointer text-sm h-9 px-4 flex items-center gap-1"
43465
43673
  },
43466
43674
  /* @__PURE__ */ React__namespace.createElement(BiPencil, { className: "h-4 w-auto text-blue-500 opacity-70 -mt-px" }),
43467
43675
  " ",
43468
43676
  "Select"
43469
- ), /* @__PURE__ */ React__namespace.createElement("div", { className: "ml-auto" }, /* @__PURE__ */ React__namespace.createElement(
43677
+ ), indexingStatus === "complete" && isCurrentBranch && /* @__PURE__ */ React__namespace.createElement(Badge, { calloutStyle: "info", className: "w-fit", displayIcon: false }, /* @__PURE__ */ React__namespace.createElement("span", null, "Selected"))),
43678
+ /* @__PURE__ */ React__namespace.createElement("td", { className: "px-3 py-1.5 text-right" }, /* @__PURE__ */ React__namespace.createElement(
43470
43679
  OverflowMenu$1,
43471
43680
  {
43472
43681
  toolbarItems: [
@@ -43497,7 +43706,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
43497
43706
  }
43498
43707
  ].filter(Boolean)
43499
43708
  }
43500
- )))
43709
+ ))
43501
43710
  );
43502
43711
  };
43503
43712
  const IndexStatus = ({ indexingStatus }) => {
@@ -46325,7 +46534,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
46325
46534
  requiredArgs(1, arguments);
46326
46535
  return formatDistance(dirtyDate, Date.now(), options);
46327
46536
  }
46328
- const version$1 = "2.9.4";
46537
+ const version$1 = "2.9.5";
46329
46538
  const VersionInfo = () => {
46330
46539
  var _a2, _b, _c, _d, _e, _f;
46331
46540
  const cms = useCMS();
@@ -63467,7 +63676,7 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
63467
63676
  const schemaFromCloud = await this.api.getSchema();
63468
63677
  const schema1 = schemaFromCloud;
63469
63678
  const schema2 = graphql$1.buildSchema(graphql$1.print(localSchema));
63470
- const diffOutput = await core$1.diff(schema1, schema2);
63679
+ const diffOutput = await core$2.diff(schema1, schema2);
63471
63680
  if (diffOutput.length > 0) {
63472
63681
  return false;
63473
63682
  } else {
@@ -64180,7 +64389,7 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
64180
64389
  values: tinaForm.values,
64181
64390
  close: () => setCreateBranchModalOpen(false)
64182
64391
  }
64183
- ), /* @__PURE__ */ React__namespace.createElement(reactBeautifulDnd.DragDropContext, { onDragEnd: moveArrayItem }, /* @__PURE__ */ React__namespace.createElement(FormKeyBindings, { onSubmit: safeHandleSubmit }), /* @__PURE__ */ React__namespace.createElement(FormPortalProvider, null, /* @__PURE__ */ React__namespace.createElement(FormWrapper, { id: tinaForm.id }, (tinaForm == null ? void 0 : tinaForm.fields.length) ? /* @__PURE__ */ React__namespace.createElement(
64392
+ ), /* @__PURE__ */ React__namespace.createElement(DragDropContext, { onDragEnd: moveArrayItem }, /* @__PURE__ */ React__namespace.createElement(FormKeyBindings, { onSubmit: safeHandleSubmit }), /* @__PURE__ */ React__namespace.createElement(FormPortalProvider, null, /* @__PURE__ */ React__namespace.createElement(FormWrapper, { id: tinaForm.id }, (tinaForm == null ? void 0 : tinaForm.fields.length) ? /* @__PURE__ */ React__namespace.createElement(
64184
64393
  FieldsBuilder,
64185
64394
  {
64186
64395
  form: tinaForm,
@@ -120611,7 +120820,7 @@ This will work when developing locally but NOT when deployed to production.
120611
120820
  headerClassName,
120612
120821
  children
120613
120822
  }) => {
120614
- return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, /* @__PURE__ */ React.createElement("div", { className: `py-2 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500" }), /* @__PURE__ */ React.createElement(BranchButton, null), /* @__PURE__ */ React.createElement(BranchPreviewButton, null))), children);
120823
+ return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, /* @__PURE__ */ React.createElement("div", { className: `py-2 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500" }), /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement(BranchButton, null), /* @__PURE__ */ React.createElement(BranchPreviewButton, null))), children);
120615
120824
  };
120616
120825
  const PageHeader = ({
120617
120826
  children
@@ -120679,7 +120888,7 @@ This will work when developing locally but NOT when deployed to production.
120679
120888
  folder,
120680
120889
  collectionName
120681
120890
  }) => {
120682
- return /* @__PURE__ */ React.createElement(react$1.Menu, { as: "div", className: "relative inline-block text-left" }, () => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(react$1.MenuButton, { className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out shadow text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 text-sm h-10 px-6" }, "Create New ", /* @__PURE__ */ React.createElement(BiPlus, { className: "w-5 h-full ml-1 opacity-70" }))), /* @__PURE__ */ React.createElement(
120891
+ return /* @__PURE__ */ React.createElement(react$1.Menu, { as: "div", className: "relative inline-block text-left w-full md:w-auto" }, () => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(react$1.MenuButton, { className: "w-full md:w-auto icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out shadow text-white bg-tina-orange-dark hover:bg-tina-orange focus:ring-tina-orange-dark text-sm h-10 px-6" }, "Create New ", /* @__PURE__ */ React.createElement(BiPlus, { className: "w-5 h-full ml-1 opacity-70" }))), /* @__PURE__ */ React.createElement(
120683
120892
  react$1.Transition,
120684
120893
  {
120685
120894
  enter: "transition ease-out duration-100",
@@ -120807,6 +121016,9 @@ This will work when developing locally but NOT when deployed to production.
120807
121016
  booleanEquals: null
120808
121017
  }));
120809
121018
  }, [collectionName]);
121019
+ const tableRowStyle = "hover:bg-gray-50/50 border-b-2 border-gray-50 transition-colors duration-300";
121020
+ const tableHeadingCellStyle = "px-3 py-3 text-left text-xs font-bold text-gray-700 tracking-wider";
121021
+ const tableHeadingStyle2 = "bg-gray-100 border-b-2 border-gray-200";
120810
121022
  return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
120811
121023
  return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(
120812
121024
  GetCollection,
@@ -121003,7 +121215,7 @@ This will work when developing locally but NOT when deployed to production.
121003
121215
  },
121004
121216
  close: () => setFolderModalOpen(false)
121005
121217
  }
121006
- ), /* @__PURE__ */ React.createElement(PageHeader, null, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React.createElement("h3", { className: "font-sans text-2xl text-tina-orange" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col lg:flex-row justify-between lg:items-end pt-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row gap-2 md:gap-4 items-baseline" }, (fields == null ? void 0 : fields.length) > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, !search && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2 items-start w-full md:w-auto" }, /* @__PURE__ */ React.createElement(
121218
+ ), /* @__PURE__ */ React.createElement(PageHeader, null, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React.createElement("h3", { className: "font-sans text-2xl text-tina-orange" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col lg:flex-row justify-between lg:items-end pt-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row gap-2 md:gap-4" }, (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(
121007
121219
  "label",
121008
121220
  {
121009
121221
  htmlFor: "sort",
@@ -121075,7 +121287,7 @@ This will work when developing locally but NOT when deployed to production.
121075
121287
  className: "underline hover:text-blue-700 transition-all duration-150"
121076
121288
  },
121077
121289
  "Read the docs"
121078
- ))))), allowCreate && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-2 md:gap-0 pt-4 lg:pt-0" }, allowCreateNestedFolder && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
121290
+ ))))), allowCreate && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-2 md:gap-0 pt-4 lg:pt-0" }, allowCreateNestedFolder && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
121079
121291
  reactRouterDom.Link,
121080
121292
  {
121081
121293
  onMouseDown: (evt) => {
@@ -121093,7 +121305,7 @@ This will work when developing locally but NOT when deployed to production.
121093
121305
  },
121094
121306
  to: "/collections/new-folder",
121095
121307
  className: cn$1(
121096
- "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-gray-500 hover:tina-orange-dark bg-white hover:bg-gray-50 border border-gray-100 focus:ring-white focus:ring-tina-orange-dark w-full md:w-auto text-sm h-10 px-6 mr-4",
121308
+ "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-gray-500 bg-white hover:bg-gray-50 border border-gray-100 focus:ring-white focus:ring-blue-500 w-full md:w-auto text-sm h-10 px-6 mr-4",
121097
121309
  collection.templates && "opacity-50 pointer-events-none cursor-not-allowed"
121098
121310
  ),
121099
121311
  "aria-disabled": !!collection.templates,
@@ -121101,7 +121313,7 @@ This will work when developing locally but NOT when deployed to production.
121101
121313
  },
121102
121314
  /* @__PURE__ */ React.createElement(FaFolder, { className: "mr-2" }),
121103
121315
  "Add Folder"
121104
- ))), collection.templates && /* @__PURE__ */ React.createElement(
121316
+ )), collection.templates && /* @__PURE__ */ React.createElement(
121105
121317
  TooltipContent,
121106
121318
  {
121107
121319
  side: "top",
@@ -121142,175 +121354,225 @@ This will work when developing locally but NOT when deployed to production.
121142
121354
  templates: collection.templates,
121143
121355
  folder
121144
121356
  }
121145
- ))))), /* @__PURE__ */ React.createElement(PageBody, null, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React.createElement("em", null, "Sorting on a non-required field. Some documents may be excluded (if they don't have a value for", " ", sortName, ")")), /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-x-auto shadow-md rounded-md" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React.createElement("table", { className: "table-auto shadow bg-white border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React.createElement("tbody", null, folder.name && !search ? /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React.createElement(
121146
- Breadcrumb,
121147
- {
121148
- folder,
121149
- navigate,
121150
- collectionName
121151
- }
121152
- ))) : null, documents.length > 0 && documents.map((document2) => {
121153
- var _a3;
121154
- if (document2.node.__typename === "Folder") {
121155
- return /* @__PURE__ */ React.createElement(
121156
- "tr",
121157
- {
121158
- key: `folder-${document2.node.path}`
121159
- },
121160
- /* @__PURE__ */ React.createElement("td", { className: "pl-5 pr-3 py-3" }, /* @__PURE__ */ React.createElement(
121161
- "a",
121162
- {
121163
- className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
121164
- onClick: () => {
121165
- navigate(
121166
- `/${[
121167
- "collections",
121168
- collectionName,
121169
- document2.node.path
121170
- ].join("/")}`,
121171
- { replace: true }
121172
- );
121173
- }
121174
- },
121175
- /* @__PURE__ */ React.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
121176
- /* @__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)))
121177
- )),
121178
- /* @__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((node2) => {
121179
- return /* @__PURE__ */ React.createElement("span", { key: node2 }, /* @__PURE__ */ React.createElement("span", { className: "text-gray-300 pr-0.5" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "pr-0.5" }, node2));
121180
- })))
121181
- );
121182
- }
121183
- const hasTitle = Boolean(
121184
- document2.node._sys.title
121357
+ ))))), /* @__PURE__ */ React.createElement(PageBody, null, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React.createElement("em", null, "Sorting on a non-required field. Some documents may be excluded (if they don't have a value for", " ", sortName, ")")), /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-x-auto shadow-md rounded-md" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React.createElement("table", { className: "table-auto shadow bg-white border border-gray-200 w-full max-w-full rounded-lg" }, (() => {
121358
+ const hasAnyDocuments = documents.some(
121359
+ (doc) => doc.node.__typename !== "Folder"
121185
121360
  );
121186
- const subfolders = document2.node._sys.breadcrumbs.slice(0, -1).join("/");
121187
- return /* @__PURE__ */ React.createElement(
121188
- "tr",
121361
+ const hasAnyFolders = documents.some(
121362
+ (doc) => doc.node.__typename === "Folder"
121363
+ );
121364
+ const hasAnyTitles = documents.some(
121365
+ (doc) => {
121366
+ var _a3;
121367
+ return doc.node.__typename !== "Folder" && Boolean((_a3 = doc.node._sys) == null ? void 0 : _a3.title);
121368
+ }
121369
+ );
121370
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, hasAnyDocuments && /* @__PURE__ */ React.createElement("thead", { className: tableHeadingStyle2 }, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement(
121371
+ "th",
121189
121372
  {
121190
- className: "hover:bg-gray-100 transition-colors duration-300",
121191
- key: `document-${document2.node._sys.relativePath}`
121373
+ className: tableHeadingCellStyle,
121374
+ colSpan: hasAnyTitles ? 1 : 2
121192
121375
  },
121193
- /* @__PURE__ */ React.createElement(
121194
- "td",
121195
- {
121196
- className: "pl-5 pr-3 py-3",
121197
- colSpan: hasTitle ? 1 : 2
121198
- },
121199
- /* @__PURE__ */ React.createElement(
121200
- "a",
121376
+ hasAnyTitles ? "Title" : "Filename"
121377
+ ), hasAnyTitles && /* @__PURE__ */ React.createElement(
121378
+ "th",
121379
+ {
121380
+ className: tableHeadingCellStyle
121381
+ },
121382
+ "Filename"
121383
+ ), /* @__PURE__ */ React.createElement("th", { className: tableHeadingCellStyle }, "Extension"), /* @__PURE__ */ React.createElement("th", { className: tableHeadingCellStyle }, "Template"), /* @__PURE__ */ React.createElement("th", null))), !hasAnyDocuments && hasAnyFolders && /* @__PURE__ */ React.createElement("thead", { className: tableHeadingStyle2 }, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", { className: tableHeadingCellStyle }, "Name"), /* @__PURE__ */ React.createElement(
121384
+ "th",
121385
+ {
121386
+ className: tableHeadingCellStyle,
121387
+ colSpan: 4
121388
+ },
121389
+ "Path"
121390
+ ))), /* @__PURE__ */ React.createElement("tbody", null, folder.name && !search ? /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React.createElement(
121391
+ Breadcrumb,
121392
+ {
121393
+ folder,
121394
+ navigate,
121395
+ collectionName
121396
+ }
121397
+ ))) : null, documents.length > 0 && documents.map((document2) => {
121398
+ var _a3;
121399
+ if (document2.node.__typename === "Folder") {
121400
+ return /* @__PURE__ */ React.createElement(
121401
+ "tr",
121201
121402
  {
121202
- className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
121203
- onClick: () => {
121204
- handleNavigate(
121205
- navigate,
121206
- cms,
121207
- collection,
121208
- collectionDefinition,
121209
- document2.node
121210
- );
121211
- }
121403
+ className: tableRowStyle,
121404
+ key: `folder-${document2.node.path}`
121212
121405
  },
121213
- /* @__PURE__ */ React.createElement(BiFile, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
121214
- /* @__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 mb-1" }, !folderView && !hasTitle && subfolders && /* @__PURE__ */ React.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React.createElement("span", null, hasTitle ? (_a3 = document2.node._sys) == null ? void 0 : _a3.title : document2.node._sys.filename)), /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400" }, document2.node._sys.path))
121215
- )
121216
- ),
121217
- 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))),
121218
- /* @__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)),
121219
- /* @__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)),
121220
- /* @__PURE__ */ React.createElement("td", { className: "w-0" }, /* @__PURE__ */ React.createElement(
121221
- OverflowMenu$1,
121222
- {
121223
- toolbarItems: [
121406
+ /* @__PURE__ */ React.createElement("td", { className: "pl-5 pr-3 py-3" }, /* @__PURE__ */ React.createElement(
121407
+ "a",
121224
121408
  {
121225
- name: "edit",
121226
- label: "Edit in Admin",
121227
- Icon: /* @__PURE__ */ React.createElement(BiEdit, { size: "1.3rem" }),
121228
- onMouseDown: () => {
121229
- const pathToDoc = document2.node._sys.breadcrumbs;
121230
- if (folder.fullyQualifiedName) {
121231
- pathToDoc.unshift("~");
121232
- }
121409
+ className: "text-blue-600 flex items-center gap-3 cursor-pointer truncate",
121410
+ onClick: () => {
121233
121411
  navigate(
121234
121412
  `/${[
121235
121413
  "collections",
121236
- "edit",
121237
121414
  collectionName,
121238
- ...pathToDoc
121415
+ document2.node.path
121239
121416
  ].join("/")}`,
121240
121417
  { replace: true }
121241
121418
  );
121242
121419
  }
121243
121420
  },
121244
- allowCreate && {
121245
- name: "duplicate",
121246
- label: "Duplicate",
121247
- Icon: /* @__PURE__ */ React.createElement(BiCopy, { size: "1.3rem" }),
121248
- onMouseDown: () => {
121249
- const pathToDoc = document2.node._sys.breadcrumbs;
121250
- if (folder.fullyQualifiedName) {
121251
- pathToDoc.unshift("~");
121252
- }
121253
- navigate(
121254
- `/${[
121255
- "collections",
121256
- "duplicate",
121257
- collectionName,
121258
- ...pathToDoc
121259
- ].join("/")}`,
121260
- { replace: true }
121261
- );
121262
- }
121421
+ /* @__PURE__ */ React.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
121422
+ /* @__PURE__ */ React.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React.createElement("span", { className: "leading-5 block truncate" }, /* @__PURE__ */ React.createElement("span", null, document2.node.name)))
121423
+ )),
121424
+ /* @__PURE__ */ React.createElement(
121425
+ "td",
121426
+ {
121427
+ className: "px-3 py-3",
121428
+ colSpan: 4
121263
121429
  },
121264
- allowDelete && {
121265
- name: "rename",
121266
- label: "Rename",
121267
- Icon: /* @__PURE__ */ React.createElement(BiRename, { size: "1.3rem" }),
121268
- onMouseDown: () => {
121269
- setVars((old) => ({
121270
- ...old,
121271
- collection: collectionName,
121272
- relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
121273
- "/"
121274
- ),
121275
- relativePath: document2.node._sys.breadcrumbs.join(
121276
- "/"
121277
- ) + document2.node._sys.extension,
121278
- newRelativePath: ""
121279
- }));
121280
- setRenameModalOpen(true);
121430
+ /* @__PURE__ */ React.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-400 truncate" }, document2.node.path.substring(2).split("/").map((node2) => {
121431
+ return /* @__PURE__ */ React.createElement("span", { key: node2 }, /* @__PURE__ */ React.createElement("span", { className: "text-gray-300 pr-0.5" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "pr-0.5" }, node2));
121432
+ }))
121433
+ )
121434
+ );
121435
+ }
121436
+ const hasTitle = Boolean(
121437
+ document2.node._sys.title
121438
+ );
121439
+ const subfolders = document2.node._sys.breadcrumbs.slice(0, -1).join("/");
121440
+ return /* @__PURE__ */ React.createElement(
121441
+ "tr",
121442
+ {
121443
+ className: tableRowStyle,
121444
+ key: `document-${document2.node._sys.relativePath}`
121445
+ },
121446
+ /* @__PURE__ */ React.createElement(
121447
+ "td",
121448
+ {
121449
+ className: "pl-5 pr-3 py-3",
121450
+ colSpan: hasTitle ? 1 : 2
121451
+ },
121452
+ /* @__PURE__ */ React.createElement(
121453
+ "a",
121454
+ {
121455
+ className: "text-blue-600 flex items-center gap-3 cursor-pointer truncate",
121456
+ onClick: () => {
121457
+ handleNavigate(
121458
+ navigate,
121459
+ cms,
121460
+ collection,
121461
+ collectionDefinition,
121462
+ document2.node
121463
+ );
121281
121464
  }
121282
121465
  },
121283
- allowDelete && {
121284
- name: "delete",
121285
- label: "Delete",
121286
- Icon: /* @__PURE__ */ React.createElement(
121287
- BiTrash,
121288
- {
121289
- size: "1.3rem",
121290
- className: "text-red-500"
121466
+ /* @__PURE__ */ React.createElement(BiFile, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
121467
+ /* @__PURE__ */ React.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React.createElement("span", { className: "leading-5 block truncate mb-1" }, !folderView && !hasTitle && subfolders && /* @__PURE__ */ React.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React.createElement("span", null, hasTitle ? (_a3 = document2.node._sys) == null ? void 0 : _a3.title : document2.node._sys.filename)), /* @__PURE__ */ React.createElement("span", { className: "block text-xs text-gray-400" }, document2.node._sys.path))
121468
+ )
121469
+ ),
121470
+ hasTitle && /* @__PURE__ */ React.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React.createElement("span", { className: "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))),
121471
+ /* @__PURE__ */ React.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.extension)),
121472
+ /* @__PURE__ */ React.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.template)),
121473
+ /* @__PURE__ */ React.createElement("td", { className: "w-0" }, /* @__PURE__ */ React.createElement(
121474
+ OverflowMenu$1,
121475
+ {
121476
+ toolbarItems: [
121477
+ {
121478
+ name: "edit",
121479
+ label: "Edit in Admin",
121480
+ Icon: /* @__PURE__ */ React.createElement(BiEdit, { size: "1.3rem" }),
121481
+ onMouseDown: () => {
121482
+ const pathToDoc = document2.node._sys.breadcrumbs;
121483
+ if (folder.fullyQualifiedName) {
121484
+ pathToDoc.unshift(
121485
+ "~"
121486
+ );
121487
+ }
121488
+ navigate(
121489
+ `/${[
121490
+ "collections",
121491
+ "edit",
121492
+ collectionName,
121493
+ ...pathToDoc
121494
+ ].join("/")}`,
121495
+ { replace: true }
121496
+ );
121497
+ }
121498
+ },
121499
+ allowCreate && {
121500
+ name: "duplicate",
121501
+ label: "Duplicate",
121502
+ Icon: /* @__PURE__ */ React.createElement(BiCopy, { size: "1.3rem" }),
121503
+ onMouseDown: () => {
121504
+ const pathToDoc = document2.node._sys.breadcrumbs;
121505
+ if (folder.fullyQualifiedName) {
121506
+ pathToDoc.unshift(
121507
+ "~"
121508
+ );
121509
+ }
121510
+ navigate(
121511
+ `/${[
121512
+ "collections",
121513
+ "duplicate",
121514
+ collectionName,
121515
+ ...pathToDoc
121516
+ ].join("/")}`,
121517
+ { replace: true }
121518
+ );
121519
+ }
121520
+ },
121521
+ allowDelete && {
121522
+ name: "rename",
121523
+ label: "Rename",
121524
+ Icon: /* @__PURE__ */ React.createElement(BiRename, { size: "1.3rem" }),
121525
+ onMouseDown: () => {
121526
+ setVars((old) => ({
121527
+ ...old,
121528
+ collection: collectionName,
121529
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
121530
+ "/"
121531
+ ),
121532
+ relativePath: document2.node._sys.breadcrumbs.join(
121533
+ "/"
121534
+ ) + document2.node._sys.extension,
121535
+ newRelativePath: ""
121536
+ }));
121537
+ setRenameModalOpen(
121538
+ true
121539
+ );
121540
+ }
121541
+ },
121542
+ allowDelete && {
121543
+ name: "delete",
121544
+ label: "Delete",
121545
+ Icon: /* @__PURE__ */ React.createElement(
121546
+ BiTrash,
121547
+ {
121548
+ size: "1.3rem",
121549
+ className: "text-red-500"
121550
+ }
121551
+ ),
121552
+ className: "text-red-500",
121553
+ onMouseDown: () => {
121554
+ setVars((old) => ({
121555
+ ...old,
121556
+ collection: collectionName,
121557
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
121558
+ "/"
121559
+ ),
121560
+ relativePath: document2.node._sys.breadcrumbs.join(
121561
+ "/"
121562
+ ) + document2.node._sys.extension,
121563
+ newRelativePath: ""
121564
+ }));
121565
+ setDeleteModalOpen(
121566
+ true
121567
+ );
121291
121568
  }
121292
- ),
121293
- className: "text-red-500",
121294
- onMouseDown: () => {
121295
- setVars((old) => ({
121296
- ...old,
121297
- collection: collectionName,
121298
- relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
121299
- "/"
121300
- ),
121301
- relativePath: document2.node._sys.breadcrumbs.join(
121302
- "/"
121303
- ) + document2.node._sys.extension,
121304
- newRelativePath: ""
121305
- }));
121306
- setDeleteModalOpen(true);
121307
121569
  }
121308
- }
121309
- ].filter(Boolean)
121310
- }
121311
- ))
121312
- );
121313
- })))), documents.length === 0 && /* @__PURE__ */ React.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React.createElement(
121570
+ ].filter(Boolean)
121571
+ }
121572
+ ))
121573
+ );
121574
+ })));
121575
+ })())), documents.length === 0 && /* @__PURE__ */ React.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React.createElement(
121314
121576
  CursorPaginator,
121315
121577
  {
121316
121578
  variant: "white",