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 +497 -235
- package/dist/index.mjs +495 -231
- package/dist/toolkit/fields/components/select.d.ts +1 -1
- package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +2 -1
- package/dist/toolkit/react-sidebar/components/badge.d.ts +2 -1
- package/package.json +8 -9
package/dist/index.mjs
CHANGED
|
@@ -40,7 +40,9 @@ import setFieldData from "final-form-set-field-data";
|
|
|
40
40
|
import { Field, Form as Form$1 } from "react-final-form";
|
|
41
41
|
import PropTypes from "prop-types";
|
|
42
42
|
import { twMerge } from "tailwind-merge";
|
|
43
|
-
import {
|
|
43
|
+
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from "@dnd-kit/core";
|
|
44
|
+
import { sortableKeyboardCoordinates, useSortable, SortableContext, verticalListSortingStrategy, defaultAnimateLayoutChanges } from "@dnd-kit/sortable";
|
|
45
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
44
46
|
import * as pkg$1 from "react-color";
|
|
45
47
|
import * as pkg from "color-string";
|
|
46
48
|
import { buildSchema, print, getIntrospectionQuery, buildClientSchema, parse as parse$4 } from "graphql";
|
|
@@ -38987,6 +38989,128 @@ const DropdownButton = React.forwardRef(
|
|
|
38987
38989
|
}
|
|
38988
38990
|
);
|
|
38989
38991
|
DropdownButton.displayName = "DropdownButton";
|
|
38992
|
+
const DragDropContext = ({
|
|
38993
|
+
onDragEnd,
|
|
38994
|
+
children
|
|
38995
|
+
}) => {
|
|
38996
|
+
const sensors = useSensors(
|
|
38997
|
+
useSensor(PointerSensor, {
|
|
38998
|
+
activationConstraint: {
|
|
38999
|
+
delay: 100,
|
|
39000
|
+
tolerance: 5
|
|
39001
|
+
}
|
|
39002
|
+
}),
|
|
39003
|
+
useSensor(KeyboardSensor, {
|
|
39004
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
39005
|
+
})
|
|
39006
|
+
);
|
|
39007
|
+
const handleDragEnd = (event) => {
|
|
39008
|
+
const { active, over } = event;
|
|
39009
|
+
if (!over || active.id === over.id) {
|
|
39010
|
+
return;
|
|
39011
|
+
}
|
|
39012
|
+
const activeIdStr = String(active.id);
|
|
39013
|
+
const overIdStr = String(over.id);
|
|
39014
|
+
const activeFieldName = activeIdStr.substring(
|
|
39015
|
+
0,
|
|
39016
|
+
activeIdStr.lastIndexOf(".")
|
|
39017
|
+
);
|
|
39018
|
+
const overFieldName = overIdStr.substring(0, overIdStr.lastIndexOf("."));
|
|
39019
|
+
const activeIndex = parseInt(
|
|
39020
|
+
activeIdStr.substring(activeIdStr.lastIndexOf(".") + 1)
|
|
39021
|
+
);
|
|
39022
|
+
const overIndex = parseInt(
|
|
39023
|
+
overIdStr.substring(overIdStr.lastIndexOf(".") + 1)
|
|
39024
|
+
);
|
|
39025
|
+
if (activeFieldName === overFieldName) {
|
|
39026
|
+
const result = {
|
|
39027
|
+
destination: {
|
|
39028
|
+
index: overIndex
|
|
39029
|
+
},
|
|
39030
|
+
source: {
|
|
39031
|
+
index: activeIndex
|
|
39032
|
+
},
|
|
39033
|
+
type: activeFieldName
|
|
39034
|
+
};
|
|
39035
|
+
onDragEnd(result);
|
|
39036
|
+
}
|
|
39037
|
+
};
|
|
39038
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39039
|
+
DndContext,
|
|
39040
|
+
{
|
|
39041
|
+
sensors,
|
|
39042
|
+
collisionDetection: closestCenter,
|
|
39043
|
+
onDragEnd: handleDragEnd
|
|
39044
|
+
},
|
|
39045
|
+
children
|
|
39046
|
+
);
|
|
39047
|
+
};
|
|
39048
|
+
const Droppable = ({
|
|
39049
|
+
droppableId,
|
|
39050
|
+
type,
|
|
39051
|
+
children
|
|
39052
|
+
}) => {
|
|
39053
|
+
const ref = React__default.useRef(null);
|
|
39054
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children({
|
|
39055
|
+
innerRef: ref,
|
|
39056
|
+
placeholder: null
|
|
39057
|
+
}));
|
|
39058
|
+
};
|
|
39059
|
+
const Draggable = ({
|
|
39060
|
+
draggableId,
|
|
39061
|
+
children
|
|
39062
|
+
}) => {
|
|
39063
|
+
const animateLayoutChanges = (args) => {
|
|
39064
|
+
const { isSorting, wasDragging } = args;
|
|
39065
|
+
if (wasDragging) {
|
|
39066
|
+
return false;
|
|
39067
|
+
}
|
|
39068
|
+
if (isSorting) {
|
|
39069
|
+
return defaultAnimateLayoutChanges(args);
|
|
39070
|
+
}
|
|
39071
|
+
return true;
|
|
39072
|
+
};
|
|
39073
|
+
const {
|
|
39074
|
+
attributes,
|
|
39075
|
+
listeners,
|
|
39076
|
+
setNodeRef,
|
|
39077
|
+
transform,
|
|
39078
|
+
transition,
|
|
39079
|
+
isDragging,
|
|
39080
|
+
setActivatorNodeRef
|
|
39081
|
+
} = useSortable({
|
|
39082
|
+
id: draggableId,
|
|
39083
|
+
animateLayoutChanges
|
|
39084
|
+
});
|
|
39085
|
+
const style = {
|
|
39086
|
+
transform: CSS.Transform.toString(transform),
|
|
39087
|
+
transition,
|
|
39088
|
+
...isDragging && { zIndex: 9999 }
|
|
39089
|
+
};
|
|
39090
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(
|
|
39091
|
+
{
|
|
39092
|
+
innerRef: { current: null },
|
|
39093
|
+
draggableProps: {
|
|
39094
|
+
ref: setNodeRef,
|
|
39095
|
+
style,
|
|
39096
|
+
...attributes
|
|
39097
|
+
},
|
|
39098
|
+
dragHandleProps: {
|
|
39099
|
+
ref: setActivatorNodeRef,
|
|
39100
|
+
...listeners
|
|
39101
|
+
}
|
|
39102
|
+
},
|
|
39103
|
+
{
|
|
39104
|
+
isDragging
|
|
39105
|
+
}
|
|
39106
|
+
));
|
|
39107
|
+
};
|
|
39108
|
+
const SortableProvider = ({
|
|
39109
|
+
items: items2,
|
|
39110
|
+
children
|
|
39111
|
+
}) => {
|
|
39112
|
+
return /* @__PURE__ */ React__default.createElement(SortableContext, { items: items2, strategy: verticalListSortingStrategy }, children);
|
|
39113
|
+
};
|
|
38990
39114
|
function FaCircle(props) {
|
|
38991
39115
|
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);
|
|
38992
39116
|
}
|
|
@@ -39533,6 +39657,9 @@ function MdWarning(props) {
|
|
|
39533
39657
|
function MdVpnKey(props) {
|
|
39534
39658
|
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);
|
|
39535
39659
|
}
|
|
39660
|
+
function MdAccessTime(props) {
|
|
39661
|
+
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);
|
|
39662
|
+
}
|
|
39536
39663
|
function MdKeyboardArrowDown(props) {
|
|
39537
39664
|
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);
|
|
39538
39665
|
}
|
|
@@ -39542,6 +39669,9 @@ function MdArrowForward(props) {
|
|
|
39542
39669
|
function MdSyncProblem(props) {
|
|
39543
39670
|
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);
|
|
39544
39671
|
}
|
|
39672
|
+
function MdWifiOff(props) {
|
|
39673
|
+
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);
|
|
39674
|
+
}
|
|
39545
39675
|
function MdOutlineHelpOutline(props) {
|
|
39546
39676
|
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);
|
|
39547
39677
|
}
|
|
@@ -39551,6 +39681,9 @@ function MdOutlineSettings(props) {
|
|
|
39551
39681
|
function MdOutlineClear(props) {
|
|
39552
39682
|
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);
|
|
39553
39683
|
}
|
|
39684
|
+
function MdOutlineDataSaverOff(props) {
|
|
39685
|
+
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);
|
|
39686
|
+
}
|
|
39554
39687
|
function MdOutlineCloud(props) {
|
|
39555
39688
|
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);
|
|
39556
39689
|
}
|
|
@@ -39560,7 +39693,7 @@ function MdOutlinePhotoLibrary(props) {
|
|
|
39560
39693
|
function MdOutlinePerson(props) {
|
|
39561
39694
|
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);
|
|
39562
39695
|
}
|
|
39563
|
-
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";
|
|
39696
|
+
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";
|
|
39564
39697
|
const Select = ({
|
|
39565
39698
|
input,
|
|
39566
39699
|
field,
|
|
@@ -39574,7 +39707,7 @@ const Select = ({
|
|
|
39574
39707
|
ref.current.focus();
|
|
39575
39708
|
}
|
|
39576
39709
|
}, [field == null ? void 0 : field.experimental_focusIntent, ref]);
|
|
39577
|
-
return /* @__PURE__ */ React.createElement("div", { className: "relative group w-full md:w-auto" }, /* @__PURE__ */ React.createElement(
|
|
39710
|
+
return /* @__PURE__ */ React.createElement("div", { className: "relative group w-full h-full md:w-auto" }, /* @__PURE__ */ React.createElement(
|
|
39578
39711
|
"select",
|
|
39579
39712
|
{
|
|
39580
39713
|
id: input.name,
|
|
@@ -40466,19 +40599,25 @@ const Group$1 = ({ tinaForm, form, field, input, meta, index }) => {
|
|
|
40466
40599
|
/* @__PURE__ */ React__default.createElement(AddIcon, { className: "w-5/6 h-auto" })
|
|
40467
40600
|
)
|
|
40468
40601
|
},
|
|
40469
|
-
/* @__PURE__ */ React__default.createElement(ListPanel, null, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React__default.createElement("div", { ref: provider.innerRef }, items2.length === 0 && /* @__PURE__ */ React__default.createElement(EmptyList, null),
|
|
40470
|
-
|
|
40602
|
+
/* @__PURE__ */ React__default.createElement(ListPanel, null, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React__default.createElement("div", { ref: provider.innerRef }, items2.length === 0 && /* @__PURE__ */ React__default.createElement(EmptyList, null), /* @__PURE__ */ React__default.createElement(
|
|
40603
|
+
SortableProvider,
|
|
40471
40604
|
{
|
|
40472
|
-
|
|
40473
|
-
|
|
40474
|
-
|
|
40475
|
-
|
|
40476
|
-
|
|
40477
|
-
|
|
40478
|
-
|
|
40479
|
-
|
|
40480
|
-
|
|
40481
|
-
|
|
40605
|
+
items: items2.map((_, index2) => `${field.name}.${index2}`)
|
|
40606
|
+
},
|
|
40607
|
+
items2.map((item, index2) => /* @__PURE__ */ React__default.createElement(
|
|
40608
|
+
Item$2,
|
|
40609
|
+
{
|
|
40610
|
+
key: index2,
|
|
40611
|
+
tinaForm,
|
|
40612
|
+
field,
|
|
40613
|
+
item,
|
|
40614
|
+
index: index2,
|
|
40615
|
+
isMin,
|
|
40616
|
+
fixedLength,
|
|
40617
|
+
...itemProps(item)
|
|
40618
|
+
}
|
|
40619
|
+
))
|
|
40620
|
+
), provider.placeholder))))
|
|
40482
40621
|
);
|
|
40483
40622
|
};
|
|
40484
40623
|
const Item$2 = ({
|
|
@@ -40505,7 +40644,13 @@ const Item$2 = ({
|
|
|
40505
40644
|
isDragging: snapshot.isDragging,
|
|
40506
40645
|
...p2
|
|
40507
40646
|
},
|
|
40508
|
-
/* @__PURE__ */ React__default.createElement(
|
|
40647
|
+
/* @__PURE__ */ React__default.createElement(
|
|
40648
|
+
DragHandle,
|
|
40649
|
+
{
|
|
40650
|
+
isDragging: snapshot.isDragging,
|
|
40651
|
+
dragHandleProps: provider.dragHandleProps
|
|
40652
|
+
}
|
|
40653
|
+
),
|
|
40509
40654
|
/* @__PURE__ */ React__default.createElement(
|
|
40510
40655
|
ItemClickTarget,
|
|
40511
40656
|
{
|
|
@@ -40569,17 +40714,16 @@ const ItemHeader = ({
|
|
|
40569
40714
|
provider,
|
|
40570
40715
|
...props
|
|
40571
40716
|
}) => {
|
|
40717
|
+
var _a2, _b;
|
|
40572
40718
|
return /* @__PURE__ */ React__default.createElement(
|
|
40573
40719
|
"div",
|
|
40574
40720
|
{
|
|
40575
|
-
ref: provider.
|
|
40721
|
+
ref: (_a2 = provider.draggableProps) == null ? void 0 : _a2.ref,
|
|
40576
40722
|
...provider.draggableProps,
|
|
40577
|
-
...provider.dragHandleProps,
|
|
40578
40723
|
...props,
|
|
40579
40724
|
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 ?? ""}`,
|
|
40580
40725
|
style: {
|
|
40581
|
-
...provider.draggableProps.style ?? {},
|
|
40582
|
-
...provider.dragHandleProps.style ?? {},
|
|
40726
|
+
...((_b = provider.draggableProps) == null ? void 0 : _b.style) ?? {},
|
|
40583
40727
|
...props.style ?? {}
|
|
40584
40728
|
}
|
|
40585
40729
|
},
|
|
@@ -40597,10 +40741,14 @@ const ItemDeleteButton = ({ onClick, disabled = false }) => {
|
|
|
40597
40741
|
/* @__PURE__ */ React__default.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
|
|
40598
40742
|
);
|
|
40599
40743
|
};
|
|
40600
|
-
const DragHandle = ({
|
|
40744
|
+
const DragHandle = ({
|
|
40745
|
+
isDragging,
|
|
40746
|
+
dragHandleProps
|
|
40747
|
+
}) => {
|
|
40601
40748
|
return /* @__PURE__ */ React__default.createElement(
|
|
40602
40749
|
"div",
|
|
40603
40750
|
{
|
|
40751
|
+
...dragHandleProps,
|
|
40604
40752
|
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`}`
|
|
40605
40753
|
},
|
|
40606
40754
|
isDragging ? /* @__PURE__ */ React__default.createElement(ReorderIcon, { className: "fill-current w-7 h-auto" }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(DragIcon, { className: "fill-current w-7 h-auto group-hover:opacity-0 transition-opacity duration-150 ease-out" }), /* @__PURE__ */ React__default.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" }))
|
|
@@ -41052,39 +41200,45 @@ const Blocks = ({
|
|
|
41052
41200
|
}
|
|
41053
41201
|
))
|
|
41054
41202
|
},
|
|
41055
|
-
/* @__PURE__ */ React.createElement(ListPanel, null, /* @__PURE__ */ React.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React.createElement("div", { ref: provider.innerRef, className: "edit-page--list-parent" }, items2.length === 0 && /* @__PURE__ */ React.createElement(EmptyList, null),
|
|
41056
|
-
|
|
41057
|
-
|
|
41203
|
+
/* @__PURE__ */ React.createElement(ListPanel, null, /* @__PURE__ */ React.createElement(Droppable, { droppableId: field.name, type: field.name }, (provider) => /* @__PURE__ */ React.createElement("div", { ref: provider.innerRef, className: "edit-page--list-parent" }, items2.length === 0 && /* @__PURE__ */ React.createElement(EmptyList, null), /* @__PURE__ */ React.createElement(
|
|
41204
|
+
SortableProvider,
|
|
41205
|
+
{
|
|
41206
|
+
items: items2.map((_, index2) => `${field.name}.${index2}`)
|
|
41207
|
+
},
|
|
41208
|
+
items2.map((block2, index2) => {
|
|
41209
|
+
const template = field.templates[block2._template];
|
|
41210
|
+
if (!template) {
|
|
41211
|
+
return /* @__PURE__ */ React.createElement(
|
|
41212
|
+
InvalidBlockListItem,
|
|
41213
|
+
{
|
|
41214
|
+
key: index2,
|
|
41215
|
+
index: index2,
|
|
41216
|
+
field,
|
|
41217
|
+
tinaForm
|
|
41218
|
+
}
|
|
41219
|
+
);
|
|
41220
|
+
}
|
|
41221
|
+
const itemProps = (item) => {
|
|
41222
|
+
if (!template.itemProps)
|
|
41223
|
+
return {};
|
|
41224
|
+
return template.itemProps(item);
|
|
41225
|
+
};
|
|
41058
41226
|
return /* @__PURE__ */ React.createElement(
|
|
41059
|
-
|
|
41227
|
+
BlockListItem,
|
|
41060
41228
|
{
|
|
41061
41229
|
key: index2,
|
|
41230
|
+
block: block2,
|
|
41231
|
+
template,
|
|
41062
41232
|
index: index2,
|
|
41063
41233
|
field,
|
|
41064
|
-
tinaForm
|
|
41234
|
+
tinaForm,
|
|
41235
|
+
isMin,
|
|
41236
|
+
fixedLength,
|
|
41237
|
+
...itemProps(block2)
|
|
41065
41238
|
}
|
|
41066
41239
|
);
|
|
41067
|
-
}
|
|
41068
|
-
|
|
41069
|
-
if (!template.itemProps)
|
|
41070
|
-
return {};
|
|
41071
|
-
return template.itemProps(item);
|
|
41072
|
-
};
|
|
41073
|
-
return /* @__PURE__ */ React.createElement(
|
|
41074
|
-
BlockListItem,
|
|
41075
|
-
{
|
|
41076
|
-
key: index2,
|
|
41077
|
-
block: block2,
|
|
41078
|
-
template,
|
|
41079
|
-
index: index2,
|
|
41080
|
-
field,
|
|
41081
|
-
tinaForm,
|
|
41082
|
-
isMin,
|
|
41083
|
-
fixedLength,
|
|
41084
|
-
...itemProps(block2)
|
|
41085
|
-
}
|
|
41086
|
-
);
|
|
41087
|
-
}), provider.placeholder)))
|
|
41240
|
+
})
|
|
41241
|
+
), provider.placeholder)))
|
|
41088
41242
|
);
|
|
41089
41243
|
};
|
|
41090
41244
|
const BlockListItem = ({
|
|
@@ -41102,7 +41256,13 @@ const BlockListItem = ({
|
|
|
41102
41256
|
}, [tinaForm, field, index]);
|
|
41103
41257
|
const { dispatch: setHoveredField } = useEvent("field:hover");
|
|
41104
41258
|
const { dispatch: setFocusedField } = useEvent("field:focus");
|
|
41105
|
-
return /* @__PURE__ */ React.createElement(Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React.createElement(
|
|
41259
|
+
return /* @__PURE__ */ React.createElement(Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React.createElement(
|
|
41260
|
+
DragHandle,
|
|
41261
|
+
{
|
|
41262
|
+
isDragging: snapshot.isDragging,
|
|
41263
|
+
dragHandleProps: provider.dragHandleProps
|
|
41264
|
+
}
|
|
41265
|
+
), /* @__PURE__ */ React.createElement(
|
|
41106
41266
|
ItemClickTarget,
|
|
41107
41267
|
{
|
|
41108
41268
|
onClick: () => {
|
|
@@ -41143,7 +41303,13 @@ const InvalidBlockListItem = ({
|
|
|
41143
41303
|
const removeItem = React.useCallback(() => {
|
|
41144
41304
|
tinaForm.mutators.remove(field.name, index);
|
|
41145
41305
|
}, [tinaForm, field, index]);
|
|
41146
|
-
return /* @__PURE__ */ React.createElement(Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React.createElement(
|
|
41306
|
+
return /* @__PURE__ */ React.createElement(Draggable, { key: index, draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging }, /* @__PURE__ */ React.createElement(
|
|
41307
|
+
DragHandle,
|
|
41308
|
+
{
|
|
41309
|
+
isDragging: snapshot.isDragging,
|
|
41310
|
+
dragHandleProps: provider.dragHandleProps
|
|
41311
|
+
}
|
|
41312
|
+
), /* @__PURE__ */ React.createElement(ItemClickTarget, null, /* @__PURE__ */ React.createElement(GroupLabel, { error: true }, "Invalid Block")), /* @__PURE__ */ React.createElement(ItemDeleteButton, { onClick: removeItem })));
|
|
41147
41313
|
};
|
|
41148
41314
|
const BlocksField = Blocks;
|
|
41149
41315
|
const BlocksFieldPlugin = {
|
|
@@ -41210,19 +41376,25 @@ const List = ({ tinaForm, form, field, input, meta, index }) => {
|
|
|
41210
41376
|
tinaForm,
|
|
41211
41377
|
actions: (!fixedLength || fixedLength && !isMax) && /* @__PURE__ */ React.createElement(IconButton, { onClick: addItem, variant: "primary", size: "small" }, /* @__PURE__ */ React.createElement(AddIcon, { className: "w-5/6 h-auto" }))
|
|
41212
41378
|
},
|
|
41213
|
-
/* @__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),
|
|
41214
|
-
|
|
41379
|
+
/* @__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(
|
|
41380
|
+
SortableProvider,
|
|
41215
41381
|
{
|
|
41216
|
-
|
|
41217
|
-
|
|
41218
|
-
|
|
41219
|
-
|
|
41220
|
-
|
|
41221
|
-
|
|
41222
|
-
|
|
41223
|
-
|
|
41224
|
-
|
|
41225
|
-
|
|
41382
|
+
items: items2.map((_, index2) => `${field.name}.${index2}`)
|
|
41383
|
+
},
|
|
41384
|
+
items2.map((item, index2) => /* @__PURE__ */ React.createElement(
|
|
41385
|
+
Item$1,
|
|
41386
|
+
{
|
|
41387
|
+
key: index2,
|
|
41388
|
+
tinaForm,
|
|
41389
|
+
field,
|
|
41390
|
+
item,
|
|
41391
|
+
index: index2,
|
|
41392
|
+
isMin,
|
|
41393
|
+
fixedLength,
|
|
41394
|
+
...itemProps(item)
|
|
41395
|
+
}
|
|
41396
|
+
))
|
|
41397
|
+
), provider.placeholder))))
|
|
41226
41398
|
);
|
|
41227
41399
|
};
|
|
41228
41400
|
const Item$1 = ({
|
|
@@ -41248,7 +41420,13 @@ const Item$1 = ({
|
|
|
41248
41420
|
name: `${field.name}.${index}`
|
|
41249
41421
|
}
|
|
41250
41422
|
];
|
|
41251
|
-
return /* @__PURE__ */ React.createElement(Draggable, { draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging, ...p2 }, /* @__PURE__ */ React.createElement(
|
|
41423
|
+
return /* @__PURE__ */ React.createElement(Draggable, { draggableId: `${field.name}.${index}`, index }, (provider, snapshot) => /* @__PURE__ */ React.createElement(ItemHeader, { provider, isDragging: snapshot.isDragging, ...p2 }, /* @__PURE__ */ React.createElement(
|
|
41424
|
+
DragHandle,
|
|
41425
|
+
{
|
|
41426
|
+
isDragging: snapshot.isDragging,
|
|
41427
|
+
dragHandleProps: provider.dragHandleProps
|
|
41428
|
+
}
|
|
41429
|
+
), /* @__PURE__ */ React.createElement(ItemClickTarget, null, /* @__PURE__ */ React.createElement(FieldsBuilder, { padding: false, form: tinaForm, fields })), (!fixedLength || fixedLength && !isMin) && /* @__PURE__ */ React.createElement(ItemDeleteButton, { disabled: isMin, onClick: removeItem })));
|
|
41252
41430
|
};
|
|
41253
41431
|
const ListField = List;
|
|
41254
41432
|
const ListFieldPlugin = {
|
|
@@ -43131,6 +43309,38 @@ const CreateBranch = ({ currentBranch, newBranchName, onCreateBranch, setNewBran
|
|
|
43131
43309
|
" Create Branch"
|
|
43132
43310
|
)));
|
|
43133
43311
|
};
|
|
43312
|
+
const Badge = ({
|
|
43313
|
+
children,
|
|
43314
|
+
calloutStyle = "warning",
|
|
43315
|
+
className = "",
|
|
43316
|
+
displayIcon = true,
|
|
43317
|
+
...props
|
|
43318
|
+
}) => {
|
|
43319
|
+
const commonAlertStyles = "text-xs px-2 py-0.5 flex items-center rounded-md border";
|
|
43320
|
+
const styles = {
|
|
43321
|
+
warning: `text-amber-700 bg-amber-100 border-amber-700/20`,
|
|
43322
|
+
info: `text-blue-600 bg-blue-100/50 border-blue-600/20`,
|
|
43323
|
+
success: `text-green-600 bg-green-100/50 border-green-600/20`,
|
|
43324
|
+
error: `text-red-700 bg-red-100/50 border-red-700/20`
|
|
43325
|
+
};
|
|
43326
|
+
const icon = {
|
|
43327
|
+
warning: /* @__PURE__ */ React.createElement(MdAccessTime, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-amber-600" }),
|
|
43328
|
+
info: /* @__PURE__ */ React.createElement(MdOutlineDataSaverOff, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-blue-600" }),
|
|
43329
|
+
success: /* @__PURE__ */ React.createElement(MdCheckCircle, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-green-600" }),
|
|
43330
|
+
error: /* @__PURE__ */ React.createElement(MdWifiOff, { className: "w-5 h-auto inline-block mr-1 opacity-70 text-red-700" })
|
|
43331
|
+
};
|
|
43332
|
+
return /* @__PURE__ */ React.createElement(
|
|
43333
|
+
"div",
|
|
43334
|
+
{
|
|
43335
|
+
className: cn$1(commonAlertStyles, styles[calloutStyle], className),
|
|
43336
|
+
...props
|
|
43337
|
+
},
|
|
43338
|
+
displayIcon && icon[calloutStyle],
|
|
43339
|
+
" ",
|
|
43340
|
+
children
|
|
43341
|
+
);
|
|
43342
|
+
};
|
|
43343
|
+
const tableHeadingStyle = "px-3 py-3 text-left text-xs font-bold text-gray-700 tracking-wider";
|
|
43134
43344
|
function formatBranchName(str) {
|
|
43135
43345
|
const pattern = /[^/\w-]+/g;
|
|
43136
43346
|
const formattedStr = str.replace(pattern, "-");
|
|
@@ -43374,7 +43584,7 @@ const BranchSelector = ({
|
|
|
43374
43584
|
filter2
|
|
43375
43585
|
).sort(sortBranchListFn(sortValue));
|
|
43376
43586
|
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;
|
|
43377
|
-
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-
|
|
43587
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-stretch space-x-4" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
43378
43588
|
"label",
|
|
43379
43589
|
{
|
|
43380
43590
|
htmlFor: "search",
|
|
@@ -43397,7 +43607,7 @@ const BranchSelector = ({
|
|
|
43397
43607
|
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"
|
|
43398
43608
|
},
|
|
43399
43609
|
/* @__PURE__ */ React.createElement(MdOutlineClear, { className: "w-5 h-auto text-gray-600" })
|
|
43400
|
-
))), /* @__PURE__ */ React.createElement("div",
|
|
43610
|
+
))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement(
|
|
43401
43611
|
"label",
|
|
43402
43612
|
{
|
|
43403
43613
|
htmlFor: "branch-type",
|
|
@@ -43425,7 +43635,7 @@ const BranchSelector = ({
|
|
|
43425
43635
|
}
|
|
43426
43636
|
]
|
|
43427
43637
|
}
|
|
43428
|
-
))), filteredBranchList.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "block relative text-gray-300 italic py-1" }, "No branches to display"), filteredBranchList.length > 0 && /* @__PURE__ */ React.createElement("div", { className: "min-w-[192px] max-h-[24rem] overflow-y-auto
|
|
43638
|
+
))), filteredBranchList.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "block relative text-gray-300 italic py-1" }, "No branches to display"), filteredBranchList.length > 0 && /* @__PURE__ */ React.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.createElement("table", { className: "w-full" }, /* @__PURE__ */ React.createElement("thead", { className: "bg-gray-100 border-b-2 border-gray-200" }, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", { className: tableHeadingStyle }, "Branch Name"), /* @__PURE__ */ React.createElement("th", { className: tableHeadingStyle }, "Last Updated"), /* @__PURE__ */ React.createElement("th", null), /* @__PURE__ */ React.createElement("th", null))), /* @__PURE__ */ React.createElement("tbody", null, filteredBranchList.map((branch) => /* @__PURE__ */ React.createElement(
|
|
43429
43639
|
BranchItem,
|
|
43430
43640
|
{
|
|
43431
43641
|
key: branch.name,
|
|
@@ -43436,7 +43646,7 @@ const BranchSelector = ({
|
|
|
43436
43646
|
previewFunction,
|
|
43437
43647
|
cms
|
|
43438
43648
|
}
|
|
43439
|
-
))));
|
|
43649
|
+
))))));
|
|
43440
43650
|
};
|
|
43441
43651
|
const BranchItem = ({
|
|
43442
43652
|
branch,
|
|
@@ -43472,15 +43682,15 @@ const BranchItem = ({
|
|
|
43472
43682
|
const isCurrentBranch = branch.name === currentBranch;
|
|
43473
43683
|
const indexingStatus = (_a2 = branch == null ? void 0 : branch.indexStatus) == null ? void 0 : _a2.status;
|
|
43474
43684
|
return /* @__PURE__ */ React.createElement(
|
|
43475
|
-
"
|
|
43685
|
+
"tr",
|
|
43476
43686
|
{
|
|
43477
|
-
className: `
|
|
43687
|
+
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"}`
|
|
43478
43688
|
},
|
|
43479
|
-
/* @__PURE__ */ React.createElement("
|
|
43480
|
-
/* @__PURE__ */ React.createElement("
|
|
43689
|
+
/* @__PURE__ */ React.createElement("td", { className: "pl-3 pr-3 py-1.5 min-w-0" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1" }, branch.protected && /* @__PURE__ */ React.createElement(BiLock, { className: "w-5 h-auto opacity-70 text-blue-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm leading-tight truncate" }, branch.name)), indexingStatus !== "complete" && /* @__PURE__ */ React.createElement("div", { className: "w-fit mt-1" }, /* @__PURE__ */ React.createElement(IndexStatus, { indexingStatus: branch.indexStatus.status })))),
|
|
43690
|
+
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-1.5 min-w-0" }, creatingPR ? /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "text-xs font-bold text-blue-600" }, "Creating PR"), /* @__PURE__ */ React.createElement("span", { className: "text-sm leading-tight text-blue-500" }, "Please wait...")), /* @__PURE__ */ React.createElement(FaSpinner, { className: "w-3 h-auto animate-spin text-blue-500" })) : /* @__PURE__ */ React.createElement("span", { className: "text-sm leading-tight whitespace-nowrap" }, formatDistanceToNow$1(new Date(branch.indexStatus.timestamp), {
|
|
43481
43691
|
addSuffix: true
|
|
43482
|
-
})))
|
|
43483
|
-
/* @__PURE__ */ React.createElement("
|
|
43692
|
+
}))),
|
|
43693
|
+
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-1.5 text-left" }, indexingStatus === "complete" && !isCurrentBranch && /* @__PURE__ */ React.createElement(
|
|
43484
43694
|
Button$1,
|
|
43485
43695
|
{
|
|
43486
43696
|
variant: "white",
|
|
@@ -43488,12 +43698,13 @@ const BranchItem = ({
|
|
|
43488
43698
|
onClick: () => {
|
|
43489
43699
|
onChange(branch.name);
|
|
43490
43700
|
},
|
|
43491
|
-
className: "
|
|
43701
|
+
className: "cursor-pointer text-sm h-9 px-4 flex items-center gap-1"
|
|
43492
43702
|
},
|
|
43493
43703
|
/* @__PURE__ */ React.createElement(BiPencil, { className: "h-4 w-auto text-blue-500 opacity-70 -mt-px" }),
|
|
43494
43704
|
" ",
|
|
43495
43705
|
"Select"
|
|
43496
|
-
), /* @__PURE__ */ React.createElement("
|
|
43706
|
+
), indexingStatus === "complete" && isCurrentBranch && /* @__PURE__ */ React.createElement(Badge, { calloutStyle: "info", className: "w-fit", displayIcon: false }, /* @__PURE__ */ React.createElement("span", null, "Selected"))),
|
|
43707
|
+
/* @__PURE__ */ React.createElement("td", { className: "px-3 py-1.5 text-right" }, /* @__PURE__ */ React.createElement(
|
|
43497
43708
|
OverflowMenu$1,
|
|
43498
43709
|
{
|
|
43499
43710
|
toolbarItems: [
|
|
@@ -43524,7 +43735,7 @@ const BranchItem = ({
|
|
|
43524
43735
|
}
|
|
43525
43736
|
].filter(Boolean)
|
|
43526
43737
|
}
|
|
43527
|
-
))
|
|
43738
|
+
))
|
|
43528
43739
|
);
|
|
43529
43740
|
};
|
|
43530
43741
|
const IndexStatus = ({ indexingStatus }) => {
|
|
@@ -46352,7 +46563,7 @@ function formatDistanceToNow(dirtyDate, options) {
|
|
|
46352
46563
|
requiredArgs(1, arguments);
|
|
46353
46564
|
return formatDistance2(dirtyDate, Date.now(), options);
|
|
46354
46565
|
}
|
|
46355
|
-
const version$1 = "2.9.
|
|
46566
|
+
const version$1 = "2.9.5";
|
|
46356
46567
|
const VersionInfo = () => {
|
|
46357
46568
|
var _a2, _b, _c, _d, _e, _f;
|
|
46358
46569
|
const cms = useCMS();
|
|
@@ -120638,7 +120849,7 @@ const PageWrapper = ({
|
|
|
120638
120849
|
headerClassName,
|
|
120639
120850
|
children
|
|
120640
120851
|
}) => {
|
|
120641
|
-
return /* @__PURE__ */ React__default.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__default.createElement("div", { className: `py-2 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React__default.createElement(
|
|
120852
|
+
return /* @__PURE__ */ React__default.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__default.createElement("div", { className: `py-2 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React__default.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500" }), /* @__PURE__ */ React__default.createElement(LocalWarning, null), /* @__PURE__ */ React__default.createElement(BranchButton, null), /* @__PURE__ */ React__default.createElement(BranchPreviewButton, null))), children);
|
|
120642
120853
|
};
|
|
120643
120854
|
const PageHeader = ({
|
|
120644
120855
|
children
|
|
@@ -120706,7 +120917,7 @@ const TemplateMenu = ({
|
|
|
120706
120917
|
folder,
|
|
120707
120918
|
collectionName
|
|
120708
120919
|
}) => {
|
|
120709
|
-
return /* @__PURE__ */ React__default.createElement(Menu, { as: "div", className: "relative inline-block text-left" }, () => /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(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-
|
|
120920
|
+
return /* @__PURE__ */ React__default.createElement(Menu, { as: "div", className: "relative inline-block text-left w-full md:w-auto" }, () => /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(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__default.createElement(BiPlus, { className: "w-5 h-full ml-1 opacity-70" }))), /* @__PURE__ */ React__default.createElement(
|
|
120710
120921
|
Transition,
|
|
120711
120922
|
{
|
|
120712
120923
|
enter: "transition ease-out duration-100",
|
|
@@ -120834,6 +121045,9 @@ const CollectionListPage = () => {
|
|
|
120834
121045
|
booleanEquals: null
|
|
120835
121046
|
}));
|
|
120836
121047
|
}, [collectionName]);
|
|
121048
|
+
const tableRowStyle = "hover:bg-gray-50/50 border-b-2 border-gray-50 transition-colors duration-300";
|
|
121049
|
+
const tableHeadingCellStyle = "px-3 py-3 text-left text-xs font-bold text-gray-700 tracking-wider";
|
|
121050
|
+
const tableHeadingStyle2 = "bg-gray-100 border-b-2 border-gray-200";
|
|
120837
121051
|
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
120838
121052
|
return /* @__PURE__ */ React__default.createElement(PageWrapper, null, /* @__PURE__ */ React__default.createElement(
|
|
120839
121053
|
GetCollection,
|
|
@@ -121030,7 +121244,7 @@ const CollectionListPage = () => {
|
|
|
121030
121244
|
},
|
|
121031
121245
|
close: () => setFolderModalOpen(false)
|
|
121032
121246
|
}
|
|
121033
|
-
), /* @__PURE__ */ React__default.createElement(PageHeader, null, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React__default.createElement("h3", { className: "font-sans text-2xl text-tina-orange" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col lg:flex-row justify-between lg:items-end pt-2" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col md:flex-row gap-2 md:gap-4
|
|
121247
|
+
), /* @__PURE__ */ React__default.createElement(PageHeader, null, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React__default.createElement("h3", { className: "font-sans text-2xl text-tina-orange" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col lg:flex-row justify-between lg:items-end pt-2" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col md:flex-row gap-2 md:gap-4" }, (fields == null ? void 0 : fields.length) > 0 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !search && /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col gap-2 items-start w-full md:w-auto" }, /* @__PURE__ */ React__default.createElement(
|
|
121034
121248
|
"label",
|
|
121035
121249
|
{
|
|
121036
121250
|
htmlFor: "sort",
|
|
@@ -121102,7 +121316,7 @@ const CollectionListPage = () => {
|
|
|
121102
121316
|
className: "underline hover:text-blue-700 transition-all duration-150"
|
|
121103
121317
|
},
|
|
121104
121318
|
"Read the docs"
|
|
121105
|
-
))))), allowCreate && /* @__PURE__ */ React__default.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__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(TooltipProvider, null, /* @__PURE__ */ React__default.createElement(Tooltip, null, /* @__PURE__ */ React__default.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React__default.createElement(
|
|
121319
|
+
))))), allowCreate && /* @__PURE__ */ React__default.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__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(TooltipProvider, null, /* @__PURE__ */ React__default.createElement(Tooltip, null, /* @__PURE__ */ React__default.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React__default.createElement(
|
|
121106
121320
|
Link$1,
|
|
121107
121321
|
{
|
|
121108
121322
|
onMouseDown: (evt) => {
|
|
@@ -121120,7 +121334,7 @@ const CollectionListPage = () => {
|
|
|
121120
121334
|
},
|
|
121121
121335
|
to: "/collections/new-folder",
|
|
121122
121336
|
className: cn$1(
|
|
121123
|
-
"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
|
|
121337
|
+
"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",
|
|
121124
121338
|
collection.templates && "opacity-50 pointer-events-none cursor-not-allowed"
|
|
121125
121339
|
),
|
|
121126
121340
|
"aria-disabled": !!collection.templates,
|
|
@@ -121128,7 +121342,7 @@ const CollectionListPage = () => {
|
|
|
121128
121342
|
},
|
|
121129
121343
|
/* @__PURE__ */ React__default.createElement(FaFolder, { className: "mr-2" }),
|
|
121130
121344
|
"Add Folder"
|
|
121131
|
-
))
|
|
121345
|
+
)), collection.templates && /* @__PURE__ */ React__default.createElement(
|
|
121132
121346
|
TooltipContent,
|
|
121133
121347
|
{
|
|
121134
121348
|
side: "top",
|
|
@@ -121169,175 +121383,225 @@ const CollectionListPage = () => {
|
|
|
121169
121383
|
templates: collection.templates,
|
|
121170
121384
|
folder
|
|
121171
121385
|
}
|
|
121172
|
-
))))), /* @__PURE__ */ React__default.createElement(PageBody, null, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React__default.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React__default.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__default.createElement("div", { className: "w-full overflow-x-auto shadow-md rounded-md" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React__default.createElement("table", { className: "table-auto shadow bg-white border
|
|
121173
|
-
|
|
121174
|
-
|
|
121175
|
-
folder,
|
|
121176
|
-
navigate,
|
|
121177
|
-
collectionName
|
|
121178
|
-
}
|
|
121179
|
-
))) : null, documents.length > 0 && documents.map((document2) => {
|
|
121180
|
-
var _a3;
|
|
121181
|
-
if (document2.node.__typename === "Folder") {
|
|
121182
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
121183
|
-
"tr",
|
|
121184
|
-
{
|
|
121185
|
-
key: `folder-${document2.node.path}`
|
|
121186
|
-
},
|
|
121187
|
-
/* @__PURE__ */ React__default.createElement("td", { className: "pl-5 pr-3 py-3" }, /* @__PURE__ */ React__default.createElement(
|
|
121188
|
-
"a",
|
|
121189
|
-
{
|
|
121190
|
-
className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
|
|
121191
|
-
onClick: () => {
|
|
121192
|
-
navigate(
|
|
121193
|
-
`/${[
|
|
121194
|
-
"collections",
|
|
121195
|
-
collectionName,
|
|
121196
|
-
document2.node.path
|
|
121197
|
-
].join("/")}`,
|
|
121198
|
-
{ replace: true }
|
|
121199
|
-
);
|
|
121200
|
-
}
|
|
121201
|
-
},
|
|
121202
|
-
/* @__PURE__ */ React__default.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
|
|
121203
|
-
/* @__PURE__ */ React__default.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Name"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block truncate" }, /* @__PURE__ */ React__default.createElement("span", null, document2.node.name)))
|
|
121204
|
-
)),
|
|
121205
|
-
/* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3", colSpan: 4 }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Path"), /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900 truncate" }, document2.node.path.substring(2).split("/").map((node3) => {
|
|
121206
|
-
return /* @__PURE__ */ React__default.createElement("span", { key: node3 }, /* @__PURE__ */ React__default.createElement("span", { className: "text-gray-300 pr-0.5" }, "/"), /* @__PURE__ */ React__default.createElement("span", { className: "pr-0.5" }, node3));
|
|
121207
|
-
})))
|
|
121208
|
-
);
|
|
121209
|
-
}
|
|
121210
|
-
const hasTitle = Boolean(
|
|
121211
|
-
document2.node._sys.title
|
|
121386
|
+
))))), /* @__PURE__ */ React__default.createElement(PageBody, null, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React__default.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React__default.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__default.createElement("div", { className: "w-full overflow-x-auto shadow-md rounded-md" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React__default.createElement("table", { className: "table-auto shadow bg-white border border-gray-200 w-full max-w-full rounded-lg" }, (() => {
|
|
121387
|
+
const hasAnyDocuments = documents.some(
|
|
121388
|
+
(doc) => doc.node.__typename !== "Folder"
|
|
121212
121389
|
);
|
|
121213
|
-
const
|
|
121214
|
-
|
|
121215
|
-
|
|
121390
|
+
const hasAnyFolders = documents.some(
|
|
121391
|
+
(doc) => doc.node.__typename === "Folder"
|
|
121392
|
+
);
|
|
121393
|
+
const hasAnyTitles = documents.some(
|
|
121394
|
+
(doc) => {
|
|
121395
|
+
var _a3;
|
|
121396
|
+
return doc.node.__typename !== "Folder" && Boolean((_a3 = doc.node._sys) == null ? void 0 : _a3.title);
|
|
121397
|
+
}
|
|
121398
|
+
);
|
|
121399
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, hasAnyDocuments && /* @__PURE__ */ React__default.createElement("thead", { className: tableHeadingStyle2 }, /* @__PURE__ */ React__default.createElement("tr", null, /* @__PURE__ */ React__default.createElement(
|
|
121400
|
+
"th",
|
|
121216
121401
|
{
|
|
121217
|
-
className:
|
|
121218
|
-
|
|
121402
|
+
className: tableHeadingCellStyle,
|
|
121403
|
+
colSpan: hasAnyTitles ? 1 : 2
|
|
121219
121404
|
},
|
|
121220
|
-
|
|
121221
|
-
|
|
121222
|
-
|
|
121223
|
-
|
|
121224
|
-
|
|
121225
|
-
|
|
121226
|
-
|
|
121227
|
-
|
|
121405
|
+
hasAnyTitles ? "Title" : "Filename"
|
|
121406
|
+
), hasAnyTitles && /* @__PURE__ */ React__default.createElement(
|
|
121407
|
+
"th",
|
|
121408
|
+
{
|
|
121409
|
+
className: tableHeadingCellStyle
|
|
121410
|
+
},
|
|
121411
|
+
"Filename"
|
|
121412
|
+
), /* @__PURE__ */ React__default.createElement("th", { className: tableHeadingCellStyle }, "Extension"), /* @__PURE__ */ React__default.createElement("th", { className: tableHeadingCellStyle }, "Template"), /* @__PURE__ */ React__default.createElement("th", null))), !hasAnyDocuments && hasAnyFolders && /* @__PURE__ */ React__default.createElement("thead", { className: tableHeadingStyle2 }, /* @__PURE__ */ React__default.createElement("tr", null, /* @__PURE__ */ React__default.createElement("th", { className: tableHeadingCellStyle }, "Name"), /* @__PURE__ */ React__default.createElement(
|
|
121413
|
+
"th",
|
|
121414
|
+
{
|
|
121415
|
+
className: tableHeadingCellStyle,
|
|
121416
|
+
colSpan: 4
|
|
121417
|
+
},
|
|
121418
|
+
"Path"
|
|
121419
|
+
))), /* @__PURE__ */ React__default.createElement("tbody", null, folder.name && !search ? /* @__PURE__ */ React__default.createElement("tr", null, /* @__PURE__ */ React__default.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React__default.createElement(
|
|
121420
|
+
Breadcrumb,
|
|
121421
|
+
{
|
|
121422
|
+
folder,
|
|
121423
|
+
navigate,
|
|
121424
|
+
collectionName
|
|
121425
|
+
}
|
|
121426
|
+
))) : null, documents.length > 0 && documents.map((document2) => {
|
|
121427
|
+
var _a3;
|
|
121428
|
+
if (document2.node.__typename === "Folder") {
|
|
121429
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
121430
|
+
"tr",
|
|
121228
121431
|
{
|
|
121229
|
-
className:
|
|
121230
|
-
|
|
121231
|
-
handleNavigate(
|
|
121232
|
-
navigate,
|
|
121233
|
-
cms,
|
|
121234
|
-
collection,
|
|
121235
|
-
collectionDefinition,
|
|
121236
|
-
document2.node
|
|
121237
|
-
);
|
|
121238
|
-
}
|
|
121432
|
+
className: tableRowStyle,
|
|
121433
|
+
key: `folder-${document2.node.path}`
|
|
121239
121434
|
},
|
|
121240
|
-
/* @__PURE__ */ React__default.createElement(
|
|
121241
|
-
|
|
121242
|
-
)
|
|
121243
|
-
),
|
|
121244
|
-
hasTitle && /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Filename"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900 truncate" }, !folderView && subfolders && /* @__PURE__ */ React__default.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React__default.createElement("span", null, document2.node._sys.filename))),
|
|
121245
|
-
/* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Extension"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.extension)),
|
|
121246
|
-
/* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Template"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.template)),
|
|
121247
|
-
/* @__PURE__ */ React__default.createElement("td", { className: "w-0" }, /* @__PURE__ */ React__default.createElement(
|
|
121248
|
-
OverflowMenu$1,
|
|
121249
|
-
{
|
|
121250
|
-
toolbarItems: [
|
|
121435
|
+
/* @__PURE__ */ React__default.createElement("td", { className: "pl-5 pr-3 py-3" }, /* @__PURE__ */ React__default.createElement(
|
|
121436
|
+
"a",
|
|
121251
121437
|
{
|
|
121252
|
-
|
|
121253
|
-
|
|
121254
|
-
Icon: /* @__PURE__ */ React__default.createElement(BiEdit, { size: "1.3rem" }),
|
|
121255
|
-
onMouseDown: () => {
|
|
121256
|
-
const pathToDoc = document2.node._sys.breadcrumbs;
|
|
121257
|
-
if (folder.fullyQualifiedName) {
|
|
121258
|
-
pathToDoc.unshift("~");
|
|
121259
|
-
}
|
|
121438
|
+
className: "text-blue-600 flex items-center gap-3 cursor-pointer truncate",
|
|
121439
|
+
onClick: () => {
|
|
121260
121440
|
navigate(
|
|
121261
121441
|
`/${[
|
|
121262
121442
|
"collections",
|
|
121263
|
-
"edit",
|
|
121264
121443
|
collectionName,
|
|
121265
|
-
|
|
121444
|
+
document2.node.path
|
|
121266
121445
|
].join("/")}`,
|
|
121267
121446
|
{ replace: true }
|
|
121268
121447
|
);
|
|
121269
121448
|
}
|
|
121270
121449
|
},
|
|
121271
|
-
|
|
121272
|
-
|
|
121273
|
-
|
|
121274
|
-
|
|
121275
|
-
|
|
121276
|
-
|
|
121277
|
-
|
|
121278
|
-
|
|
121279
|
-
}
|
|
121280
|
-
navigate(
|
|
121281
|
-
`/${[
|
|
121282
|
-
"collections",
|
|
121283
|
-
"duplicate",
|
|
121284
|
-
collectionName,
|
|
121285
|
-
...pathToDoc
|
|
121286
|
-
].join("/")}`,
|
|
121287
|
-
{ replace: true }
|
|
121288
|
-
);
|
|
121289
|
-
}
|
|
121450
|
+
/* @__PURE__ */ React__default.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
|
|
121451
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block truncate" }, /* @__PURE__ */ React__default.createElement("span", null, document2.node.name)))
|
|
121452
|
+
)),
|
|
121453
|
+
/* @__PURE__ */ React__default.createElement(
|
|
121454
|
+
"td",
|
|
121455
|
+
{
|
|
121456
|
+
className: "px-3 py-3",
|
|
121457
|
+
colSpan: 4
|
|
121290
121458
|
},
|
|
121291
|
-
|
|
121292
|
-
|
|
121293
|
-
|
|
121294
|
-
|
|
121295
|
-
|
|
121296
|
-
|
|
121297
|
-
|
|
121298
|
-
|
|
121299
|
-
|
|
121300
|
-
|
|
121301
|
-
|
|
121302
|
-
|
|
121303
|
-
|
|
121304
|
-
|
|
121305
|
-
|
|
121306
|
-
|
|
121307
|
-
|
|
121459
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-400 truncate" }, document2.node.path.substring(2).split("/").map((node3) => {
|
|
121460
|
+
return /* @__PURE__ */ React__default.createElement("span", { key: node3 }, /* @__PURE__ */ React__default.createElement("span", { className: "text-gray-300 pr-0.5" }, "/"), /* @__PURE__ */ React__default.createElement("span", { className: "pr-0.5" }, node3));
|
|
121461
|
+
}))
|
|
121462
|
+
)
|
|
121463
|
+
);
|
|
121464
|
+
}
|
|
121465
|
+
const hasTitle = Boolean(
|
|
121466
|
+
document2.node._sys.title
|
|
121467
|
+
);
|
|
121468
|
+
const subfolders = document2.node._sys.breadcrumbs.slice(0, -1).join("/");
|
|
121469
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
121470
|
+
"tr",
|
|
121471
|
+
{
|
|
121472
|
+
className: tableRowStyle,
|
|
121473
|
+
key: `document-${document2.node._sys.relativePath}`
|
|
121474
|
+
},
|
|
121475
|
+
/* @__PURE__ */ React__default.createElement(
|
|
121476
|
+
"td",
|
|
121477
|
+
{
|
|
121478
|
+
className: "pl-5 pr-3 py-3",
|
|
121479
|
+
colSpan: hasTitle ? 1 : 2
|
|
121480
|
+
},
|
|
121481
|
+
/* @__PURE__ */ React__default.createElement(
|
|
121482
|
+
"a",
|
|
121483
|
+
{
|
|
121484
|
+
className: "text-blue-600 flex items-center gap-3 cursor-pointer truncate",
|
|
121485
|
+
onClick: () => {
|
|
121486
|
+
handleNavigate(
|
|
121487
|
+
navigate,
|
|
121488
|
+
cms,
|
|
121489
|
+
collection,
|
|
121490
|
+
collectionDefinition,
|
|
121491
|
+
document2.node
|
|
121492
|
+
);
|
|
121308
121493
|
}
|
|
121309
121494
|
},
|
|
121310
|
-
|
|
121311
|
-
|
|
121312
|
-
|
|
121313
|
-
|
|
121314
|
-
|
|
121315
|
-
|
|
121316
|
-
|
|
121317
|
-
|
|
121495
|
+
/* @__PURE__ */ React__default.createElement(BiFile, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
|
|
121496
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block truncate mb-1" }, !folderView && !hasTitle && subfolders && /* @__PURE__ */ React__default.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React__default.createElement("span", null, hasTitle ? (_a3 = document2.node._sys) == null ? void 0 : _a3.title : document2.node._sys.filename)), /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400" }, document2.node._sys.path))
|
|
121497
|
+
)
|
|
121498
|
+
),
|
|
121499
|
+
hasTitle && /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900 truncate" }, !folderView && subfolders && /* @__PURE__ */ React__default.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React__default.createElement("span", null, document2.node._sys.filename))),
|
|
121500
|
+
/* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.extension)),
|
|
121501
|
+
/* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.template)),
|
|
121502
|
+
/* @__PURE__ */ React__default.createElement("td", { className: "w-0" }, /* @__PURE__ */ React__default.createElement(
|
|
121503
|
+
OverflowMenu$1,
|
|
121504
|
+
{
|
|
121505
|
+
toolbarItems: [
|
|
121506
|
+
{
|
|
121507
|
+
name: "edit",
|
|
121508
|
+
label: "Edit in Admin",
|
|
121509
|
+
Icon: /* @__PURE__ */ React__default.createElement(BiEdit, { size: "1.3rem" }),
|
|
121510
|
+
onMouseDown: () => {
|
|
121511
|
+
const pathToDoc = document2.node._sys.breadcrumbs;
|
|
121512
|
+
if (folder.fullyQualifiedName) {
|
|
121513
|
+
pathToDoc.unshift(
|
|
121514
|
+
"~"
|
|
121515
|
+
);
|
|
121516
|
+
}
|
|
121517
|
+
navigate(
|
|
121518
|
+
`/${[
|
|
121519
|
+
"collections",
|
|
121520
|
+
"edit",
|
|
121521
|
+
collectionName,
|
|
121522
|
+
...pathToDoc
|
|
121523
|
+
].join("/")}`,
|
|
121524
|
+
{ replace: true }
|
|
121525
|
+
);
|
|
121526
|
+
}
|
|
121527
|
+
},
|
|
121528
|
+
allowCreate && {
|
|
121529
|
+
name: "duplicate",
|
|
121530
|
+
label: "Duplicate",
|
|
121531
|
+
Icon: /* @__PURE__ */ React__default.createElement(BiCopy, { size: "1.3rem" }),
|
|
121532
|
+
onMouseDown: () => {
|
|
121533
|
+
const pathToDoc = document2.node._sys.breadcrumbs;
|
|
121534
|
+
if (folder.fullyQualifiedName) {
|
|
121535
|
+
pathToDoc.unshift(
|
|
121536
|
+
"~"
|
|
121537
|
+
);
|
|
121538
|
+
}
|
|
121539
|
+
navigate(
|
|
121540
|
+
`/${[
|
|
121541
|
+
"collections",
|
|
121542
|
+
"duplicate",
|
|
121543
|
+
collectionName,
|
|
121544
|
+
...pathToDoc
|
|
121545
|
+
].join("/")}`,
|
|
121546
|
+
{ replace: true }
|
|
121547
|
+
);
|
|
121548
|
+
}
|
|
121549
|
+
},
|
|
121550
|
+
allowDelete && {
|
|
121551
|
+
name: "rename",
|
|
121552
|
+
label: "Rename",
|
|
121553
|
+
Icon: /* @__PURE__ */ React__default.createElement(BiRename, { size: "1.3rem" }),
|
|
121554
|
+
onMouseDown: () => {
|
|
121555
|
+
setVars((old) => ({
|
|
121556
|
+
...old,
|
|
121557
|
+
collection: collectionName,
|
|
121558
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
121559
|
+
"/"
|
|
121560
|
+
),
|
|
121561
|
+
relativePath: document2.node._sys.breadcrumbs.join(
|
|
121562
|
+
"/"
|
|
121563
|
+
) + document2.node._sys.extension,
|
|
121564
|
+
newRelativePath: ""
|
|
121565
|
+
}));
|
|
121566
|
+
setRenameModalOpen(
|
|
121567
|
+
true
|
|
121568
|
+
);
|
|
121569
|
+
}
|
|
121570
|
+
},
|
|
121571
|
+
allowDelete && {
|
|
121572
|
+
name: "delete",
|
|
121573
|
+
label: "Delete",
|
|
121574
|
+
Icon: /* @__PURE__ */ React__default.createElement(
|
|
121575
|
+
BiTrash,
|
|
121576
|
+
{
|
|
121577
|
+
size: "1.3rem",
|
|
121578
|
+
className: "text-red-500"
|
|
121579
|
+
}
|
|
121580
|
+
),
|
|
121581
|
+
className: "text-red-500",
|
|
121582
|
+
onMouseDown: () => {
|
|
121583
|
+
setVars((old) => ({
|
|
121584
|
+
...old,
|
|
121585
|
+
collection: collectionName,
|
|
121586
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
121587
|
+
"/"
|
|
121588
|
+
),
|
|
121589
|
+
relativePath: document2.node._sys.breadcrumbs.join(
|
|
121590
|
+
"/"
|
|
121591
|
+
) + document2.node._sys.extension,
|
|
121592
|
+
newRelativePath: ""
|
|
121593
|
+
}));
|
|
121594
|
+
setDeleteModalOpen(
|
|
121595
|
+
true
|
|
121596
|
+
);
|
|
121318
121597
|
}
|
|
121319
|
-
),
|
|
121320
|
-
className: "text-red-500",
|
|
121321
|
-
onMouseDown: () => {
|
|
121322
|
-
setVars((old) => ({
|
|
121323
|
-
...old,
|
|
121324
|
-
collection: collectionName,
|
|
121325
|
-
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
121326
|
-
"/"
|
|
121327
|
-
),
|
|
121328
|
-
relativePath: document2.node._sys.breadcrumbs.join(
|
|
121329
|
-
"/"
|
|
121330
|
-
) + document2.node._sys.extension,
|
|
121331
|
-
newRelativePath: ""
|
|
121332
|
-
}));
|
|
121333
|
-
setDeleteModalOpen(true);
|
|
121334
121598
|
}
|
|
121335
|
-
|
|
121336
|
-
|
|
121337
|
-
|
|
121338
|
-
)
|
|
121339
|
-
);
|
|
121340
|
-
})))), documents.length === 0 && /* @__PURE__ */ React__default.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React__default.createElement(
|
|
121599
|
+
].filter(Boolean)
|
|
121600
|
+
}
|
|
121601
|
+
))
|
|
121602
|
+
);
|
|
121603
|
+
})));
|
|
121604
|
+
})())), documents.length === 0 && /* @__PURE__ */ React__default.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React__default.createElement(
|
|
121341
121605
|
CursorPaginator,
|
|
121342
121606
|
{
|
|
121343
121607
|
variant: "white",
|