tinacms 0.0.0-ed38135-20250102012919 → 0.0.0-ee8d9a3-20250429131017
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/README.md +1 -1
- package/dist/admin/api.d.ts +1 -0
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client.js +82 -42
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +59 -31
- package/dist/client.mjs.map +1 -0
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.js +2340 -981
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2350 -991
- package/dist/index.mjs.map +1 -0
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/{node-cache-4c336858.mjs → node-cache-5e8db9f0.mjs} +24 -10
- package/dist/node-cache-5e8db9f0.mjs.map +1 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +14 -1
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +14 -1
- package/dist/react.mjs.map +1 -0
- package/dist/rich-text/index.js +1 -0
- package/dist/rich-text/index.js.map +1 -0
- package/dist/rich-text/index.mjs +1 -0
- package/dist/rich-text/index.mjs.map +1 -0
- package/dist/rich-text/prism.js +2 -1
- package/dist/rich-text/prism.js.map +1 -0
- package/dist/rich-text/prism.mjs +2 -1
- package/dist/rich-text/prism.mjs.map +1 -0
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/tina-state.d.ts +4 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/package.json +36 -35
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
package/dist/index.mjs
CHANGED
|
@@ -9,18 +9,18 @@ import * as React from "react";
|
|
|
9
9
|
import React__default, { useState, useCallback, useEffect, useRef, createContext, forwardRef, useContext, useMemo, startTransition } from "react";
|
|
10
10
|
import { createPortal } from "react-dom";
|
|
11
11
|
import { withRef, cn as cn$1, withVariants, withProps, withCn, createPrimitiveElement } from "@udecode/cn";
|
|
12
|
-
import { toggleList, ELEMENT_UL, ELEMENT_OL, ELEMENT_H1 as ELEMENT_H1$1, ELEMENT_H2 as ELEMENT_H2$1, ELEMENT_H3 as ELEMENT_H3$1, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_PARAGRAPH, ELEMENT_BLOCKQUOTE, ELEMENT_CODE_BLOCK, ELEMENT_CODE_LINE, ELEMENT_CODE_SYNTAX, ELEMENT_LI, ELEMENT_LINK, MARK_CODE, MARK_UNDERLINE, MARK_STRIKETHROUGH, MARK_ITALIC, MARK_BOLD, ELEMENT_HR, ELEMENT_TABLE, ELEMENT_TR, ELEMENT_TD, ELEMENT_TH, unwrapList, ELEMENT_TODO_LI, createTrailingBlockPlugin, createAutoformatPlugin, createExitBreakPlugin, KEYS_HEADING, createResetNodePlugin, createHeadingPlugin, createParagraphPlugin, createBlockquotePlugin,
|
|
13
|
-
import { PlateElement, isCollapsed, findNodePath, getPointAfter, insertNodes, ELEMENT_DEFAULT, focusEditor, getPointBefore, setNodes, isElement, PlateLeaf, createPluginFactory, useComposedRef, useEditorRef, createPointRef, insertText, moveSelection, toggleNodeType, useElement, useRemoveNodeButton, useEditorSelector, isSelectionExpanded, withHOC, normalizeEditor, getBlockAbove, queryNode, getParentNode, isType, someNode, isSelectionAtBlockStart, setElements, insertNode, getPluginType, isBlock, isBlockAboveEmpty, findNode, PlateContent, getNodeEntries, useEditorState, collapseSelection, useMarkToolbarButtonState, useMarkToolbarButton,
|
|
12
|
+
import { toggleList, ELEMENT_UL, ELEMENT_OL, ELEMENT_H1 as ELEMENT_H1$1, ELEMENT_H2 as ELEMENT_H2$1, ELEMENT_H3 as ELEMENT_H3$1, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_PARAGRAPH, ELEMENT_BLOCKQUOTE, ELEMENT_CODE_BLOCK, ELEMENT_CODE_LINE, ELEMENT_CODE_SYNTAX, ELEMENT_LI, ELEMENT_LINK, MARK_CODE, MARK_UNDERLINE, MARK_STRIKETHROUGH, MARK_ITALIC, MARK_BOLD, ELEMENT_HR, ELEMENT_TABLE, ELEMENT_TR, ELEMENT_TD, ELEMENT_TH, unwrapList, ELEMENT_TODO_LI, createTrailingBlockPlugin, createAutoformatPlugin, createExitBreakPlugin, KEYS_HEADING, createResetNodePlugin, createBasicMarksPlugin, createHeadingPlugin, createParagraphPlugin, createBlockquotePlugin, createUnderlinePlugin, createListPlugin, createIndentListPlugin, createHorizontalRulePlugin, createNodeIdPlugin, createTablePlugin, getListItemEntry, useListToolbarButtonState, useListToolbarButton } from "@udecode/plate";
|
|
13
|
+
import { PlateElement, isCollapsed, findNodePath, getPointAfter, insertNodes, ELEMENT_DEFAULT, focusEditor, getPointBefore, setNodes, isElement, PlateLeaf, createPluginFactory, useComposedRef, useEditorRef, createPointRef, insertText, moveSelection, toggleNodeType, useElement, useRemoveNodeButton, useEditorSelector, isSelectionExpanded, withHOC, normalizeEditor, getBlockAbove, queryNode, getParentNode, isType, someNode, isSelectionAtBlockStart, setElements, insertNode, getPluginType, isBlock, isBlockAboveEmpty, findNode, PlateContent, getNodeEntries, useEditorState, collapseSelection, insertEmptyElement, useMarkToolbarButtonState, useMarkToolbarButton, usePlateSelectors, useEventEditorSelectors, PortalBody, useFormInputProps, createPlugins, Plate } from "@udecode/plate-common";
|
|
14
14
|
import { ELEMENT_SLASH_INPUT, createSlashPlugin } from "@udecode/plate-slash-command";
|
|
15
|
-
import { useSelected, useReadOnly, ReactEditor } from "slate-react";
|
|
16
15
|
import { useCodeBlockElementState, useCodeSyntaxLeaf, ELEMENT_CODE_BLOCK as ELEMENT_CODE_BLOCK$1 } from "@udecode/plate-code-block";
|
|
17
16
|
import MonacoEditor, { loader, useMonaco } from "@monaco-editor/react";
|
|
18
|
-
import {
|
|
17
|
+
import { useSelected, useReadOnly, ReactEditor } from "slate-react";
|
|
18
|
+
import { Combobox as Combobox$1, ComboboxInput, ComboboxButton, Transition, ComboboxOptions, ComboboxOption, Popover as Popover$3, PopoverButton, PopoverPanel, TransitionChild, Disclosure, DisclosureButton, DisclosurePanel, Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/react";
|
|
19
19
|
import { cva } from "class-variance-authority";
|
|
20
20
|
import { Eye, SquarePen, Plus, AlignCenter as AlignCenter$1, AlignJustify, AlignLeft as AlignLeft$1, AlignRight as AlignRight$1, ChevronDown, PaintBucket, Quote, Check, ChevronRight, ChevronsUpDown, X, FileCode, Baseline, RectangleVertical, Combine, Ungroup, MessageSquare, MessageSquarePlus, Trash, GripVertical, Edit2, Smile, ExternalLink, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Indent, Keyboard, WrapText, Minus, MoreHorizontal, Outdent, Pilcrow, RotateCcw, RectangleHorizontal, Search, Settings, Strikethrough, Subscript, Superscript, Table, Text, Underline, Link2Off, Moon, SunMedium, Twitter } from "lucide-react";
|
|
21
21
|
import mermaid from "mermaid";
|
|
22
22
|
import { ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4 as ELEMENT_H4$1, ELEMENT_H5 as ELEMENT_H5$1, ELEMENT_H6 as ELEMENT_H6$1 } from "@udecode/plate-heading";
|
|
23
|
-
import { useComboboxContext, Combobox as Combobox$
|
|
23
|
+
import { useComboboxContext, Combobox as Combobox$2, useComboboxStore, ComboboxProvider, Portal, ComboboxPopover, ComboboxItem } from "@ariakit/react";
|
|
24
24
|
import { useHTMLInputCursorState, useComboboxInput, filterWords } from "@udecode/plate-combobox";
|
|
25
25
|
import { useTableCellElementState, useTableCellElement, useTableCellElementResizableState, useTableCellElementResizable, useTableBordersDropdownMenuContentState, useTableMergeState, TableProvider, useTableElementState, useTableElement, mergeTableCells, unmergeTableCells, ELEMENT_TABLE as ELEMENT_TABLE$1, getTableColumnCount, insertTable, deleteTable, insertTableColumn, deleteColumn, insertTableRow, deleteRow } from "@udecode/plate-table";
|
|
26
26
|
import { ResizeHandle as ResizeHandle$1 } from "@udecode/plate-resizable";
|
|
@@ -43,6 +43,7 @@ import { twMerge } from "tailwind-merge";
|
|
|
43
43
|
import { Command as Command$1 } from "cmdk";
|
|
44
44
|
import { isHotkey } from "is-hotkey";
|
|
45
45
|
import { Transforms, Element, Range, Path, Node, Editor as Editor$1 } from "slate";
|
|
46
|
+
import { useWindowWidth } from "@react-hook/window-size";
|
|
46
47
|
import get from "lodash.get";
|
|
47
48
|
import moment from "moment";
|
|
48
49
|
import { formatDistanceToNow } from "date-fns";
|
|
@@ -52,14 +53,13 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
|
52
53
|
import { ELEMENT_PARAGRAPH as ELEMENT_PARAGRAPH$1 } from "@udecode/plate-paragraph";
|
|
53
54
|
import { ELEMENT_BLOCKQUOTE as ELEMENT_BLOCKQUOTE$1 } from "@udecode/plate-block-quote";
|
|
54
55
|
import { useFloatingToolbarState, offset, flip, useFloatingToolbar } from "@udecode/plate-floating";
|
|
55
|
-
import { useWindowWidth } from "@react-hook/window-size";
|
|
56
56
|
import { getIntrospectionQuery, buildClientSchema, print, parse as parse$3, buildSchema } from "graphql";
|
|
57
|
-
import gql from "graphql-tag";
|
|
58
57
|
import { TinaSchema, addNamespaceToSchema, parseURL, resolveForm, normalizePath, validateSchema } from "@tinacms/schema-tools";
|
|
59
58
|
import { NAMER, resolveField } from "@tinacms/schema-tools";
|
|
60
|
-
import
|
|
59
|
+
import gql from "graphql-tag";
|
|
61
60
|
import { diff } from "@graphql-inspector/core";
|
|
62
|
-
import
|
|
61
|
+
import * as yup from "yup";
|
|
62
|
+
import { NavLink, useLocation, useNavigate, useParams, Link, useSearchParams, HashRouter, Routes, Route } from "react-router-dom";
|
|
63
63
|
import { stringifyMDX } from "@tinacms/mdx";
|
|
64
64
|
const ModalProvider = ({ children }) => {
|
|
65
65
|
const [modalRootContainerRef, setModalRootContainerRef] = useState(
|
|
@@ -992,7 +992,7 @@ const Autocomplete = ({
|
|
|
992
992
|
}
|
|
993
993
|
}, [items2, query]);
|
|
994
994
|
return /* @__PURE__ */ React__default.createElement(
|
|
995
|
-
Combobox,
|
|
995
|
+
Combobox$1,
|
|
996
996
|
{
|
|
997
997
|
value,
|
|
998
998
|
onChange,
|
|
@@ -2173,7 +2173,7 @@ const InlineComboboxInput = forwardRef(({ className, ...props }, propRef) => {
|
|
|
2173
2173
|
},
|
|
2174
2174
|
value || ""
|
|
2175
2175
|
), /* @__PURE__ */ React__default.createElement(
|
|
2176
|
-
Combobox$
|
|
2176
|
+
Combobox$2,
|
|
2177
2177
|
{
|
|
2178
2178
|
autoSelect: true,
|
|
2179
2179
|
className: cn$1(
|
|
@@ -2970,7 +2970,7 @@ const Components = () => {
|
|
|
2970
2970
|
),
|
|
2971
2971
|
[MARK_CODE]: CodeLeaf,
|
|
2972
2972
|
[MARK_UNDERLINE]: withProps(PlateLeaf, { as: "u" }),
|
|
2973
|
-
[MARK_STRIKETHROUGH]:
|
|
2973
|
+
[MARK_STRIKETHROUGH]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React__default.createElement("s", { ...props.attributes, ...props }),
|
|
2974
2974
|
[MARK_ITALIC]: withProps(PlateLeaf, { as: "em" }),
|
|
2975
2975
|
[MARK_BOLD]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React__default.createElement("strong", { ...props.attributes, ...props }),
|
|
2976
2976
|
[ELEMENT_HR]: ({
|
|
@@ -2981,7 +2981,6 @@ const Components = () => {
|
|
|
2981
2981
|
children,
|
|
2982
2982
|
...props
|
|
2983
2983
|
}) => {
|
|
2984
|
-
const selected = useSelected();
|
|
2985
2984
|
return /* @__PURE__ */ React__default.createElement(
|
|
2986
2985
|
"div",
|
|
2987
2986
|
{
|
|
@@ -2992,8 +2991,7 @@ const Components = () => {
|
|
|
2992
2991
|
...attributes,
|
|
2993
2992
|
...props
|
|
2994
2993
|
},
|
|
2995
|
-
children
|
|
2996
|
-
selected && /* @__PURE__ */ React__default.createElement("span", { className: "absolute h-4 -top-2 inset-0 ring-2 ring-blue-100 ring-inset rounded-md z-10 pointer-events-none" })
|
|
2994
|
+
children
|
|
2997
2995
|
);
|
|
2998
2996
|
},
|
|
2999
2997
|
[ELEMENT_TABLE]: TableElement,
|
|
@@ -4430,36 +4428,6 @@ function MdOutlineArrowBackIos(props) {
|
|
|
4430
4428
|
function MdOutlinePerson(props) {
|
|
4431
4429
|
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);
|
|
4432
4430
|
}
|
|
4433
|
-
const BranchContext = React.createContext({
|
|
4434
|
-
currentBranch: null,
|
|
4435
|
-
setCurrentBranch: (branch) => {
|
|
4436
|
-
console.warn("BranchContext not initialized");
|
|
4437
|
-
}
|
|
4438
|
-
});
|
|
4439
|
-
const BranchDataProvider = ({
|
|
4440
|
-
currentBranch,
|
|
4441
|
-
setCurrentBranch,
|
|
4442
|
-
children
|
|
4443
|
-
}) => {
|
|
4444
|
-
return /* @__PURE__ */ React.createElement(
|
|
4445
|
-
BranchContext.Provider,
|
|
4446
|
-
{
|
|
4447
|
-
value: {
|
|
4448
|
-
currentBranch,
|
|
4449
|
-
setCurrentBranch
|
|
4450
|
-
}
|
|
4451
|
-
},
|
|
4452
|
-
children
|
|
4453
|
-
);
|
|
4454
|
-
};
|
|
4455
|
-
const useBranchData = () => {
|
|
4456
|
-
const branchData = React.useContext(BranchContext);
|
|
4457
|
-
const { dispatch } = useEvent("branch:change");
|
|
4458
|
-
React.useEffect(() => {
|
|
4459
|
-
dispatch({ branchName: branchData.currentBranch });
|
|
4460
|
-
}, [branchData.currentBranch]);
|
|
4461
|
-
return branchData;
|
|
4462
|
-
};
|
|
4463
4431
|
const textFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded-md";
|
|
4464
4432
|
const disabledClasses$1 = "opacity-50 pointer-events-none cursor-not-allowed";
|
|
4465
4433
|
const BaseTextField = React.forwardRef(({ className, disabled, ...rest }, ref) => {
|
|
@@ -5224,7 +5192,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
|
|
|
5224
5192
|
side: "bottom",
|
|
5225
5193
|
className: cn(
|
|
5226
5194
|
"rounded-md border bg-white p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
5227
|
-
"max-h-[30vh] max-w-[
|
|
5195
|
+
"max-h-[30vh] max-w-[30vw] overflow-y-auto",
|
|
5228
5196
|
className
|
|
5229
5197
|
),
|
|
5230
5198
|
...props
|
|
@@ -5316,11 +5284,7 @@ const getFilename = (optionSets, value) => {
|
|
|
5316
5284
|
const node = nodes.find((node2) => node2.id === value);
|
|
5317
5285
|
return node ? node._internalSys.filename : null;
|
|
5318
5286
|
};
|
|
5319
|
-
const
|
|
5320
|
-
cms,
|
|
5321
|
-
input,
|
|
5322
|
-
field
|
|
5323
|
-
}) => {
|
|
5287
|
+
const Combobox = ({ cms, input, field }) => {
|
|
5324
5288
|
const [open2, setOpen] = React.useState(false);
|
|
5325
5289
|
const [value, setValue] = React.useState(input.value);
|
|
5326
5290
|
const [displayText, setDisplayText] = React.useState(null);
|
|
@@ -5336,7 +5300,9 @@ const ComboboxDemo = ({
|
|
|
5336
5300
|
}, [value, input, optionSets]);
|
|
5337
5301
|
React.useEffect(() => {
|
|
5338
5302
|
if (field.experimental___filter && optionSets.length > 0) {
|
|
5339
|
-
setFilteredOptionsList(
|
|
5303
|
+
setFilteredOptionsList(
|
|
5304
|
+
field.experimental___filter(optionSets, void 0)
|
|
5305
|
+
);
|
|
5340
5306
|
} else {
|
|
5341
5307
|
setFilteredOptionsList(optionSets);
|
|
5342
5308
|
}
|
|
@@ -5344,17 +5310,17 @@ const ComboboxDemo = ({
|
|
|
5344
5310
|
if (loading === true) {
|
|
5345
5311
|
return /* @__PURE__ */ React.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
|
|
5346
5312
|
}
|
|
5347
|
-
return /* @__PURE__ */ React.createElement(
|
|
5313
|
+
return /* @__PURE__ */ React.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
5348
5314
|
Button,
|
|
5349
5315
|
{
|
|
5350
5316
|
variant: "outline",
|
|
5351
5317
|
role: "combobox",
|
|
5352
5318
|
"aria-expanded": open2,
|
|
5353
|
-
className: "w-
|
|
5319
|
+
className: "w-full justify-between"
|
|
5354
5320
|
},
|
|
5355
5321
|
/* @__PURE__ */ React.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
|
|
5356
5322
|
open2 ? /* @__PURE__ */ React.createElement(IoMdArrowDropup, { size: 20 }) : /* @__PURE__ */ React.createElement(IoMdArrowDropdown, { size: 20 })
|
|
5357
|
-
)), /* @__PURE__ */ React.createElement(PopoverContent, { className: "p-0 relative" }, /* @__PURE__ */ React.createElement(
|
|
5323
|
+
)), /* @__PURE__ */ React.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React.createElement(
|
|
5358
5324
|
Command,
|
|
5359
5325
|
{
|
|
5360
5326
|
shouldFilter: !field.experimental___filter,
|
|
@@ -5378,32 +5344,25 @@ const ComboboxDemo = ({
|
|
|
5378
5344
|
}
|
|
5379
5345
|
),
|
|
5380
5346
|
/* @__PURE__ */ React.createElement(CommandEmpty, null, "No reference found"),
|
|
5381
|
-
/* @__PURE__ */ React.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React.createElement(
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
field,
|
|
5396
|
-
_values,
|
|
5397
|
-
node,
|
|
5398
|
-
onSelect: (currentValue) => {
|
|
5399
|
-
setValue(currentValue);
|
|
5400
|
-
setOpen(false);
|
|
5401
|
-
}
|
|
5347
|
+
/* @__PURE__ */ React.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React.createElement(CommandGroup, { key: `${collection}-group`, heading: collection }, /* @__PURE__ */ React.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
|
|
5348
|
+
const { id, _values } = node;
|
|
5349
|
+
return /* @__PURE__ */ React.createElement(
|
|
5350
|
+
OptionComponent,
|
|
5351
|
+
{
|
|
5352
|
+
id,
|
|
5353
|
+
key: id,
|
|
5354
|
+
value,
|
|
5355
|
+
field,
|
|
5356
|
+
_values,
|
|
5357
|
+
node,
|
|
5358
|
+
onSelect: (currentValue) => {
|
|
5359
|
+
setValue(currentValue);
|
|
5360
|
+
setOpen(false);
|
|
5402
5361
|
}
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
))))
|
|
5406
|
-
)))
|
|
5362
|
+
}
|
|
5363
|
+
);
|
|
5364
|
+
}))))))
|
|
5365
|
+
)));
|
|
5407
5366
|
};
|
|
5408
5367
|
const useGetNode = (cms, id) => {
|
|
5409
5368
|
const [document2, setDocument] = React.useState(
|
|
@@ -5476,7 +5435,7 @@ const ReferenceLink = ({ cms, input }) => {
|
|
|
5476
5435
|
};
|
|
5477
5436
|
const Reference = ({ input, field }) => {
|
|
5478
5437
|
const cms = useCMS();
|
|
5479
|
-
return /* @__PURE__ */ React.createElement(
|
|
5438
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "relative group" }, /* @__PURE__ */ React.createElement(Combobox, { cms, input, field })), /* @__PURE__ */ React.createElement(ReferenceLink, { cms, input }));
|
|
5480
5439
|
};
|
|
5481
5440
|
const ButtonToggle = ({
|
|
5482
5441
|
input,
|
|
@@ -5713,7 +5672,9 @@ const Item$2 = ({
|
|
|
5713
5672
|
onClick: () => {
|
|
5714
5673
|
const state = tinaForm.finalForm.getState();
|
|
5715
5674
|
if (state.invalid === true) {
|
|
5716
|
-
cms.alerts.error(
|
|
5675
|
+
cms.alerts.error(
|
|
5676
|
+
"Cannot navigate away from an invalid form."
|
|
5677
|
+
);
|
|
5717
5678
|
return;
|
|
5718
5679
|
}
|
|
5719
5680
|
cms.dispatch({
|
|
@@ -6297,7 +6258,9 @@ const BlockListItem = ({
|
|
|
6297
6258
|
onClick: () => {
|
|
6298
6259
|
const state = tinaForm.finalForm.getState();
|
|
6299
6260
|
if (state.invalid === true) {
|
|
6300
|
-
cms.alerts.error(
|
|
6261
|
+
cms.alerts.error(
|
|
6262
|
+
"Cannot navigate away from an invalid form."
|
|
6263
|
+
);
|
|
6301
6264
|
return;
|
|
6302
6265
|
}
|
|
6303
6266
|
cms.dispatch({
|
|
@@ -6779,28 +6742,28 @@ class DaysView extends React__default.Component {
|
|
|
6779
6742
|
}
|
|
6780
6743
|
renderDayHeaders() {
|
|
6781
6744
|
const locale = this.props.viewDate.localeData();
|
|
6782
|
-
|
|
6745
|
+
const dayItems = getDaysOfWeek(locale).map((day, index) => /* @__PURE__ */ React__default.createElement("th", { key: day + index, className: "dow" }, day));
|
|
6783
6746
|
return /* @__PURE__ */ React__default.createElement("tr", null, dayItems);
|
|
6784
6747
|
}
|
|
6785
6748
|
renderDays() {
|
|
6786
6749
|
const date = this.props.viewDate;
|
|
6787
6750
|
const startOfMonth = date.clone().startOf("month");
|
|
6788
6751
|
const endOfMonth = date.clone().endOf("month");
|
|
6789
|
-
|
|
6790
|
-
|
|
6752
|
+
const rows = [[], [], [], [], [], []];
|
|
6753
|
+
const startDate = date.clone().subtract(1, "months");
|
|
6791
6754
|
startDate.date(startDate.daysInMonth()).startOf("week");
|
|
6792
|
-
|
|
6755
|
+
const endDate = startDate.clone().add(42, "d");
|
|
6793
6756
|
let i = 0;
|
|
6794
6757
|
while (startDate.isBefore(endDate)) {
|
|
6795
|
-
|
|
6758
|
+
const row = getRow$2(rows, i++);
|
|
6796
6759
|
row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
|
|
6797
6760
|
startDate.add(1, "d");
|
|
6798
6761
|
}
|
|
6799
6762
|
return rows.map((r, i2) => /* @__PURE__ */ React__default.createElement("tr", { key: `${endDate.month()}_${i2}` }, r));
|
|
6800
6763
|
}
|
|
6801
6764
|
renderDay(date, startOfMonth, endOfMonth) {
|
|
6802
|
-
|
|
6803
|
-
|
|
6765
|
+
const selectedDate = this.props.selectedDate;
|
|
6766
|
+
const dayProps = {
|
|
6804
6767
|
key: date.format("M_D"),
|
|
6805
6768
|
"data-value": date.date(),
|
|
6806
6769
|
"data-month": date.month(),
|
|
@@ -6854,7 +6817,7 @@ function getRow$2(rows, day) {
|
|
|
6854
6817
|
}
|
|
6855
6818
|
function getDaysOfWeek(locale) {
|
|
6856
6819
|
const first = locale.firstDayOfWeek();
|
|
6857
|
-
|
|
6820
|
+
const dow = [];
|
|
6858
6821
|
let i = 0;
|
|
6859
6822
|
locale._weekdaysMin.forEach(function(day) {
|
|
6860
6823
|
dow[(7 + i++ - first) % 7] = day;
|
|
@@ -6872,7 +6835,7 @@ class MonthsView extends React__default.Component {
|
|
|
6872
6835
|
return /* @__PURE__ */ React__default.createElement("div", { className: "rdtMonths" }, /* @__PURE__ */ React__default.createElement("table", null, /* @__PURE__ */ React__default.createElement("thead", null, this.renderNavigation())), /* @__PURE__ */ React__default.createElement("table", null, /* @__PURE__ */ React__default.createElement("tbody", null, this.renderMonths())));
|
|
6873
6836
|
}
|
|
6874
6837
|
renderNavigation() {
|
|
6875
|
-
|
|
6838
|
+
const year = this.props.viewDate.year();
|
|
6876
6839
|
return /* @__PURE__ */ React__default.createElement(
|
|
6877
6840
|
ViewNavigation,
|
|
6878
6841
|
{
|
|
@@ -6885,9 +6848,9 @@ class MonthsView extends React__default.Component {
|
|
|
6885
6848
|
);
|
|
6886
6849
|
}
|
|
6887
6850
|
renderMonths() {
|
|
6888
|
-
|
|
6851
|
+
const rows = [[], [], []];
|
|
6889
6852
|
for (let month = 0; month < 12; month++) {
|
|
6890
|
-
|
|
6853
|
+
const row = getRow$1(rows, month);
|
|
6891
6854
|
row.push(this.renderMonth(month));
|
|
6892
6855
|
}
|
|
6893
6856
|
return rows.map((months, i) => /* @__PURE__ */ React__default.createElement("tr", { key: i }, months));
|
|
@@ -6904,7 +6867,7 @@ class MonthsView extends React__default.Component {
|
|
|
6904
6867
|
if (selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month) {
|
|
6905
6868
|
className += " rdtActive";
|
|
6906
6869
|
}
|
|
6907
|
-
|
|
6870
|
+
const props = { key: month, className, "data-value": month, onClick };
|
|
6908
6871
|
if (this.props.renderMonth) {
|
|
6909
6872
|
return this.props.renderMonth(
|
|
6910
6873
|
props,
|
|
@@ -6916,11 +6879,11 @@ class MonthsView extends React__default.Component {
|
|
|
6916
6879
|
return /* @__PURE__ */ React__default.createElement("td", { ...props }, this.getMonthText(month));
|
|
6917
6880
|
}
|
|
6918
6881
|
isDisabledMonth(month) {
|
|
6919
|
-
|
|
6882
|
+
const isValidDate = this.props.isValidDate;
|
|
6920
6883
|
if (!isValidDate) {
|
|
6921
6884
|
return false;
|
|
6922
6885
|
}
|
|
6923
|
-
|
|
6886
|
+
const date = this.props.viewDate.clone().set({ month });
|
|
6924
6887
|
let day = date.endOf("month").date() + 1;
|
|
6925
6888
|
while (day-- > 1) {
|
|
6926
6889
|
if (isValidDate(date.date(day))) {
|
|
@@ -6972,9 +6935,9 @@ class YearsView extends React__default.Component {
|
|
|
6972
6935
|
}
|
|
6973
6936
|
renderYears() {
|
|
6974
6937
|
const viewYear = this.getViewYear();
|
|
6975
|
-
|
|
6938
|
+
const rows = [[], [], []];
|
|
6976
6939
|
for (let year = viewYear - 1; year < viewYear + 11; year++) {
|
|
6977
|
-
|
|
6940
|
+
const row = getRow(rows, year - viewYear);
|
|
6978
6941
|
row.push(this.renderYear(year));
|
|
6979
6942
|
}
|
|
6980
6943
|
return rows.map((years, i) => /* @__PURE__ */ React__default.createElement("tr", { key: i }, years));
|
|
@@ -6991,7 +6954,7 @@ class YearsView extends React__default.Component {
|
|
|
6991
6954
|
if (selectedYear === year) {
|
|
6992
6955
|
className += " rdtActive";
|
|
6993
6956
|
}
|
|
6994
|
-
|
|
6957
|
+
const props = { key: year, className, "data-value": year, onClick };
|
|
6995
6958
|
return this.props.renderYear(
|
|
6996
6959
|
props,
|
|
6997
6960
|
year,
|
|
@@ -7005,15 +6968,15 @@ class YearsView extends React__default.Component {
|
|
|
7005
6968
|
return this.props.selectedDate && this.props.selectedDate.year();
|
|
7006
6969
|
}
|
|
7007
6970
|
isDisabledYear(year) {
|
|
7008
|
-
|
|
6971
|
+
const cache = this.disabledYearsCache;
|
|
7009
6972
|
if (cache[year] !== void 0) {
|
|
7010
6973
|
return cache[year];
|
|
7011
6974
|
}
|
|
7012
|
-
|
|
6975
|
+
const isValidDate = this.props.isValidDate;
|
|
7013
6976
|
if (!isValidDate) {
|
|
7014
6977
|
return false;
|
|
7015
6978
|
}
|
|
7016
|
-
|
|
6979
|
+
const date = this.props.viewDate.clone().set({ year });
|
|
7017
6980
|
let day = date.endOf("year").dayOfYear() + 1;
|
|
7018
6981
|
while (day-- > 1) {
|
|
7019
6982
|
if (isValidDate(date.dayOfYear(day))) {
|
|
@@ -7060,7 +7023,7 @@ const timeConstraints = {
|
|
|
7060
7023
|
}
|
|
7061
7024
|
};
|
|
7062
7025
|
function createConstraints(overrideTimeConstraints) {
|
|
7063
|
-
|
|
7026
|
+
const constraints = {};
|
|
7064
7027
|
Object.keys(timeConstraints).forEach((type) => {
|
|
7065
7028
|
constraints[type] = {
|
|
7066
7029
|
...timeConstraints[type],
|
|
@@ -7076,7 +7039,7 @@ class TimeView extends React__default.Component {
|
|
|
7076
7039
|
this.state = this.getTimeParts(props.selectedDate || props.viewDate);
|
|
7077
7040
|
}
|
|
7078
7041
|
render() {
|
|
7079
|
-
|
|
7042
|
+
const items2 = [];
|
|
7080
7043
|
const timeParts = this.state;
|
|
7081
7044
|
this.getCounters().forEach((c, i) => {
|
|
7082
7045
|
if (i && c !== "ampm") {
|
|
@@ -7138,8 +7101,8 @@ class TimeView extends React__default.Component {
|
|
|
7138
7101
|
}
|
|
7139
7102
|
if (type === "ampm")
|
|
7140
7103
|
return this.toggleDayPart();
|
|
7141
|
-
|
|
7142
|
-
|
|
7104
|
+
const update = {};
|
|
7105
|
+
const body = document.body;
|
|
7143
7106
|
update[type] = this[action](type);
|
|
7144
7107
|
this.setState(update);
|
|
7145
7108
|
this.timer = setTimeout(() => {
|
|
@@ -7182,8 +7145,8 @@ class TimeView extends React__default.Component {
|
|
|
7182
7145
|
return pad(type, value);
|
|
7183
7146
|
}
|
|
7184
7147
|
getCounters() {
|
|
7185
|
-
|
|
7186
|
-
|
|
7148
|
+
const counters = [];
|
|
7149
|
+
const format2 = this.props.timeFormat;
|
|
7187
7150
|
if (format2.toLowerCase().indexOf("h") !== -1) {
|
|
7188
7151
|
counters.push("hours");
|
|
7189
7152
|
if (format2.indexOf("m") !== -1) {
|
|
@@ -7315,7 +7278,7 @@ class Datetime extends React__default.Component {
|
|
|
7315
7278
|
__publicField(this, "_renderCalendar", () => {
|
|
7316
7279
|
const props = this.props;
|
|
7317
7280
|
const state = this.state;
|
|
7318
|
-
|
|
7281
|
+
const viewProps = {
|
|
7319
7282
|
viewDate: state.viewDate.clone(),
|
|
7320
7283
|
selectedDate: this.getSelectedDate(),
|
|
7321
7284
|
isValidDate: props.isValidDate,
|
|
@@ -7358,10 +7321,10 @@ class Datetime extends React__default.Component {
|
|
|
7358
7321
|
__publicField(this, "viewToMethod", { days: "date", months: "month", years: "year" });
|
|
7359
7322
|
__publicField(this, "nextView", { days: "time", months: "days", years: "months" });
|
|
7360
7323
|
__publicField(this, "_updateDate", (e) => {
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7324
|
+
const state = this.state;
|
|
7325
|
+
const currentView = state.currentView;
|
|
7326
|
+
const updateOnView = this.getUpdateOn(this.getFormat("date"));
|
|
7327
|
+
const viewDate = this.state.viewDate.clone();
|
|
7365
7328
|
viewDate[this.viewToMethod[currentView]](
|
|
7366
7329
|
parseInt(e.target.getAttribute("data-value"), 10)
|
|
7367
7330
|
);
|
|
@@ -7369,7 +7332,7 @@ class Datetime extends React__default.Component {
|
|
|
7369
7332
|
viewDate.month(parseInt(e.target.getAttribute("data-month"), 10));
|
|
7370
7333
|
viewDate.year(parseInt(e.target.getAttribute("data-year"), 10));
|
|
7371
7334
|
}
|
|
7372
|
-
|
|
7335
|
+
const update = { viewDate };
|
|
7373
7336
|
if (currentView === updateOnView) {
|
|
7374
7337
|
update.selectedDate = viewDate.clone();
|
|
7375
7338
|
update.inputValue = viewDate.format(this.getFormat("datetime"));
|
|
@@ -7383,7 +7346,7 @@ class Datetime extends React__default.Component {
|
|
|
7383
7346
|
this.setState(update);
|
|
7384
7347
|
});
|
|
7385
7348
|
__publicField(this, "_viewNavigate", (modifier, unit) => {
|
|
7386
|
-
|
|
7349
|
+
const viewDate = this.state.viewDate.clone();
|
|
7387
7350
|
viewDate.add(modifier, unit);
|
|
7388
7351
|
if (modifier > 0) {
|
|
7389
7352
|
this.props.onNavigateForward(modifier, unit);
|
|
@@ -7393,7 +7356,7 @@ class Datetime extends React__default.Component {
|
|
|
7393
7356
|
this.setState({ viewDate });
|
|
7394
7357
|
});
|
|
7395
7358
|
__publicField(this, "_setTime", (type, value) => {
|
|
7396
|
-
|
|
7359
|
+
const date = (this.getSelectedDate() || this.state.viewDate).clone();
|
|
7397
7360
|
date[type](value);
|
|
7398
7361
|
if (!this.props.value) {
|
|
7399
7362
|
this.setState({
|
|
@@ -7417,7 +7380,7 @@ class Datetime extends React__default.Component {
|
|
|
7417
7380
|
});
|
|
7418
7381
|
});
|
|
7419
7382
|
__publicField(this, "_handleClickOutside", () => {
|
|
7420
|
-
|
|
7383
|
+
const props = this.props;
|
|
7421
7384
|
if (props.input && this.state.open && props.open === void 0 && props.closeOnClickOutside) {
|
|
7422
7385
|
this._closeCalendar();
|
|
7423
7386
|
}
|
|
@@ -7432,7 +7395,7 @@ class Datetime extends React__default.Component {
|
|
|
7432
7395
|
return;
|
|
7433
7396
|
const value = e.target ? e.target.value : e;
|
|
7434
7397
|
const localMoment = this.localMoment(value, this.getFormat("datetime"));
|
|
7435
|
-
|
|
7398
|
+
const update = { inputValue: value };
|
|
7436
7399
|
if (localMoment.isValid()) {
|
|
7437
7400
|
update.selectedDate = localMoment;
|
|
7438
7401
|
update.viewDate = localMoment.clone().startOf("month");
|
|
@@ -7496,9 +7459,9 @@ class Datetime extends React__default.Component {
|
|
|
7496
7459
|
return this.props.renderView(this.state.currentView, this._renderCalendar);
|
|
7497
7460
|
}
|
|
7498
7461
|
getInitialState() {
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7462
|
+
const props = this.props;
|
|
7463
|
+
const inputFormat = this.getFormat("datetime");
|
|
7464
|
+
const selectedDate = this.parseDate(
|
|
7502
7465
|
props.value || props.initialValue,
|
|
7503
7466
|
inputFormat
|
|
7504
7467
|
);
|
|
@@ -7529,7 +7492,7 @@ class Datetime extends React__default.Component {
|
|
|
7529
7492
|
return this.getInitialDate();
|
|
7530
7493
|
}
|
|
7531
7494
|
getInitialDate() {
|
|
7532
|
-
|
|
7495
|
+
const m = this.localMoment();
|
|
7533
7496
|
m.hour(0).minute(0).second(0).millisecond(0);
|
|
7534
7497
|
return m;
|
|
7535
7498
|
}
|
|
@@ -7549,8 +7512,8 @@ class Datetime extends React__default.Component {
|
|
|
7549
7512
|
}
|
|
7550
7513
|
getClassName() {
|
|
7551
7514
|
let cn2 = "rdt";
|
|
7552
|
-
|
|
7553
|
-
|
|
7515
|
+
const props = this.props;
|
|
7516
|
+
const propCn = props.className;
|
|
7554
7517
|
if (Array.isArray(propCn)) {
|
|
7555
7518
|
cn2 += " " + propCn.join(" ");
|
|
7556
7519
|
} else if (propCn) {
|
|
@@ -7583,14 +7546,14 @@ class Datetime extends React__default.Component {
|
|
|
7583
7546
|
return viewModes.DAYS;
|
|
7584
7547
|
}
|
|
7585
7548
|
getLocaleData() {
|
|
7586
|
-
|
|
7549
|
+
const p = this.props;
|
|
7587
7550
|
return this.localMoment(
|
|
7588
7551
|
p.value || p.defaultValue || /* @__PURE__ */ new Date()
|
|
7589
7552
|
).localeData();
|
|
7590
7553
|
}
|
|
7591
7554
|
getDateFormat() {
|
|
7592
7555
|
const locale = this.getLocaleData();
|
|
7593
|
-
|
|
7556
|
+
const format2 = this.props.dateFormat;
|
|
7594
7557
|
if (format2 === true)
|
|
7595
7558
|
return locale.longDateFormat("L");
|
|
7596
7559
|
if (format2)
|
|
@@ -7599,7 +7562,7 @@ class Datetime extends React__default.Component {
|
|
|
7599
7562
|
}
|
|
7600
7563
|
getTimeFormat() {
|
|
7601
7564
|
const locale = this.getLocaleData();
|
|
7602
|
-
|
|
7565
|
+
const format2 = this.props.timeFormat;
|
|
7603
7566
|
if (format2 === true) {
|
|
7604
7567
|
return locale.longDateFormat("LT");
|
|
7605
7568
|
}
|
|
@@ -7611,12 +7574,12 @@ class Datetime extends React__default.Component {
|
|
|
7611
7574
|
} else if (type === "time") {
|
|
7612
7575
|
return this.getTimeFormat();
|
|
7613
7576
|
}
|
|
7614
|
-
|
|
7615
|
-
|
|
7577
|
+
const dateFormat = this.getDateFormat();
|
|
7578
|
+
const timeFormat = this.getTimeFormat();
|
|
7616
7579
|
return dateFormat && timeFormat ? dateFormat + " " + timeFormat : dateFormat || timeFormat;
|
|
7617
7580
|
}
|
|
7618
7581
|
updateTime(op, amount, type, toSelected) {
|
|
7619
|
-
|
|
7582
|
+
const update = {};
|
|
7620
7583
|
const date = toSelected ? "selectedDate" : "viewDate";
|
|
7621
7584
|
update[date] = this.state[date].clone()[op](amount, type);
|
|
7622
7585
|
this.setState(update);
|
|
@@ -7649,7 +7612,7 @@ class Datetime extends React__default.Component {
|
|
|
7649
7612
|
if (prevProps === this.props)
|
|
7650
7613
|
return;
|
|
7651
7614
|
let needsUpdate = false;
|
|
7652
|
-
|
|
7615
|
+
const thisProps = this.props;
|
|
7653
7616
|
["locale", "utc", "displayZone", "dateFormat", "timeFormat"].forEach(
|
|
7654
7617
|
function(p) {
|
|
7655
7618
|
prevProps[p] !== thisProps[p] && (needsUpdate = true);
|
|
@@ -7665,8 +7628,8 @@ class Datetime extends React__default.Component {
|
|
|
7665
7628
|
}
|
|
7666
7629
|
regenerateDates() {
|
|
7667
7630
|
const props = this.props;
|
|
7668
|
-
|
|
7669
|
-
|
|
7631
|
+
const viewDate = this.state.viewDate.clone();
|
|
7632
|
+
const selectedDate = this.state.selectedDate && this.state.selectedDate.clone();
|
|
7670
7633
|
if (props.locale) {
|
|
7671
7634
|
viewDate.locale(props.locale);
|
|
7672
7635
|
selectedDate && selectedDate.locale(props.locale);
|
|
@@ -7681,7 +7644,7 @@ class Datetime extends React__default.Component {
|
|
|
7681
7644
|
viewDate.locale();
|
|
7682
7645
|
selectedDate && selectedDate.locale();
|
|
7683
7646
|
}
|
|
7684
|
-
|
|
7647
|
+
const update = { viewDate, selectedDate };
|
|
7685
7648
|
if (selectedDate && selectedDate.isValid()) {
|
|
7686
7649
|
update.inputValue = selectedDate.format(this.getFormat("datetime"));
|
|
7687
7650
|
}
|
|
@@ -7690,7 +7653,7 @@ class Datetime extends React__default.Component {
|
|
|
7690
7653
|
getSelectedDate() {
|
|
7691
7654
|
if (this.props.value === void 0)
|
|
7692
7655
|
return this.state.selectedDate;
|
|
7693
|
-
|
|
7656
|
+
const selectedDate = this.parseDate(
|
|
7694
7657
|
this.props.value,
|
|
7695
7658
|
this.getFormat("datetime")
|
|
7696
7659
|
);
|
|
@@ -7709,7 +7672,7 @@ class Datetime extends React__default.Component {
|
|
|
7709
7672
|
return "";
|
|
7710
7673
|
}
|
|
7711
7674
|
getInputValue() {
|
|
7712
|
-
|
|
7675
|
+
const selectedDate = this.getSelectedDate();
|
|
7713
7676
|
return selectedDate ? selectedDate.format(this.getFormat("datetime")) : this.state.inputValue;
|
|
7714
7677
|
}
|
|
7715
7678
|
/**
|
|
@@ -7719,7 +7682,7 @@ class Datetime extends React__default.Component {
|
|
|
7719
7682
|
* @public
|
|
7720
7683
|
*/
|
|
7721
7684
|
setViewDate(date) {
|
|
7722
|
-
|
|
7685
|
+
const logError = function() {
|
|
7723
7686
|
return log("Invalid date passed to the `setViewDate` method: " + date);
|
|
7724
7687
|
};
|
|
7725
7688
|
if (!date)
|
|
@@ -7815,7 +7778,7 @@ __publicField(Datetime, "defaultProps", {
|
|
|
7815
7778
|
// Make moment accessible through the Datetime class
|
|
7816
7779
|
__publicField(Datetime, "moment", moment);
|
|
7817
7780
|
function log(message, method) {
|
|
7818
|
-
|
|
7781
|
+
const con = typeof window !== "undefined" && window.console;
|
|
7819
7782
|
if (!con)
|
|
7820
7783
|
return;
|
|
7821
7784
|
if (!method) {
|
|
@@ -8068,9 +8031,6 @@ const PasswordFieldPlugin = {
|
|
|
8068
8031
|
},
|
|
8069
8032
|
parse: parse$2
|
|
8070
8033
|
};
|
|
8071
|
-
function GrCircleQuestion(props) {
|
|
8072
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "strokeWidth": "2", "d": "M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M12,15 L12,14 C12,13 12,12.5 13,12 C14,11.5 15,11 15,9.5 C15,8.5 14,7 12,7 C10,7 9,8.26413718 9,10 M12,16 L12,18" }, "child": [] }] })(props);
|
|
8073
|
-
}
|
|
8074
8034
|
function AiFillWarning(props) {
|
|
8075
8035
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 1024 1024" }, "child": [{ "tag": "path", "attr": { "d": "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z" }, "child": [] }] })(props);
|
|
8076
8036
|
}
|
|
@@ -8089,6 +8049,39 @@ function FaSpinner(props) {
|
|
|
8089
8049
|
function FaUnlock(props) {
|
|
8090
8050
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z" }, "child": [] }] })(props);
|
|
8091
8051
|
}
|
|
8052
|
+
function GrCircleQuestion(props) {
|
|
8053
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "strokeWidth": "2", "d": "M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M12,15 L12,14 C12,13 12,12.5 13,12 C14,11.5 15,11 15,9.5 C15,8.5 14,7 12,7 C10,7 9,8.26413718 9,10 M12,16 L12,18" }, "child": [] }] })(props);
|
|
8054
|
+
}
|
|
8055
|
+
const BranchContext = React.createContext({
|
|
8056
|
+
currentBranch: null,
|
|
8057
|
+
setCurrentBranch: (branch) => {
|
|
8058
|
+
console.warn("BranchContext not initialized");
|
|
8059
|
+
}
|
|
8060
|
+
});
|
|
8061
|
+
const BranchDataProvider = ({
|
|
8062
|
+
currentBranch,
|
|
8063
|
+
setCurrentBranch,
|
|
8064
|
+
children
|
|
8065
|
+
}) => {
|
|
8066
|
+
return /* @__PURE__ */ React.createElement(
|
|
8067
|
+
BranchContext.Provider,
|
|
8068
|
+
{
|
|
8069
|
+
value: {
|
|
8070
|
+
currentBranch,
|
|
8071
|
+
setCurrentBranch
|
|
8072
|
+
}
|
|
8073
|
+
},
|
|
8074
|
+
children
|
|
8075
|
+
);
|
|
8076
|
+
};
|
|
8077
|
+
const useBranchData = () => {
|
|
8078
|
+
const branchData = React.useContext(BranchContext);
|
|
8079
|
+
const { dispatch } = useEvent("branch:change");
|
|
8080
|
+
React.useEffect(() => {
|
|
8081
|
+
dispatch({ branchName: branchData.currentBranch });
|
|
8082
|
+
}, [branchData.currentBranch]);
|
|
8083
|
+
return branchData;
|
|
8084
|
+
};
|
|
8092
8085
|
function formatBranchName$1(str) {
|
|
8093
8086
|
const pattern = /[^/\w-]+/g;
|
|
8094
8087
|
const formattedStr = str.replace(pattern, "");
|
|
@@ -8187,7 +8180,7 @@ const BranchSwitcherLegacy = ({
|
|
|
8187
8180
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8188
8181
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8189
8182
|
},
|
|
8190
|
-
"Learn more about moving to production with
|
|
8183
|
+
"Learn more about moving to production with TinaCloud."
|
|
8191
8184
|
)), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement(
|
|
8192
8185
|
Button$1,
|
|
8193
8186
|
{
|
|
@@ -8423,7 +8416,7 @@ const EditoralBranchSwitcher = ({
|
|
|
8423
8416
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8424
8417
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8425
8418
|
},
|
|
8426
|
-
"Learn more about moving to production with
|
|
8419
|
+
"Learn more about moving to production with TinaCloud."
|
|
8427
8420
|
)), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement(
|
|
8428
8421
|
Button$1,
|
|
8429
8422
|
{
|
|
@@ -8638,7 +8631,10 @@ const BranchSelector = ({
|
|
|
8638
8631
|
label: "View in GitHub",
|
|
8639
8632
|
Icon: /* @__PURE__ */ React.createElement(BiLinkExternal, { className: "w-5 h-auto text-blue-500 opacity-70" }),
|
|
8640
8633
|
onMouseDown: () => {
|
|
8641
|
-
window.open(
|
|
8634
|
+
window.open(
|
|
8635
|
+
branch.githubPullRequestUrl,
|
|
8636
|
+
"_blank"
|
|
8637
|
+
);
|
|
8642
8638
|
}
|
|
8643
8639
|
},
|
|
8644
8640
|
typeof previewFunction === "function" && ((_b2 = previewFunction({ branch: branch.name })) == null ? void 0 : _b2.url) && {
|
|
@@ -8944,7 +8940,9 @@ class EventBus {
|
|
|
8944
8940
|
} else {
|
|
8945
8941
|
events = event;
|
|
8946
8942
|
}
|
|
8947
|
-
const newListeners = events.map(
|
|
8943
|
+
const newListeners = events.map(
|
|
8944
|
+
(event2) => new Listener(event2, callback)
|
|
8945
|
+
);
|
|
8948
8946
|
newListeners.forEach((newListener) => this.listeners.add(newListener));
|
|
8949
8947
|
return () => {
|
|
8950
8948
|
newListeners.forEach((listener) => this.listeners.delete(listener));
|
|
@@ -9300,9 +9298,7 @@ class TinaMediaStore {
|
|
|
9300
9298
|
const deleteStartTime = Date.now();
|
|
9301
9299
|
while (true) {
|
|
9302
9300
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
9303
|
-
const { error, message } = await this.api.getRequestStatus(
|
|
9304
|
-
requestId
|
|
9305
|
-
);
|
|
9301
|
+
const { error, message } = await this.api.getRequestStatus(requestId);
|
|
9306
9302
|
if (error !== void 0) {
|
|
9307
9303
|
if (error) {
|
|
9308
9304
|
throw new Error(message);
|
|
@@ -9327,6 +9323,17 @@ class TinaMediaStore {
|
|
|
9327
9323
|
}
|
|
9328
9324
|
}
|
|
9329
9325
|
}
|
|
9326
|
+
const encodeUrlIfNeeded = (url) => {
|
|
9327
|
+
if (url) {
|
|
9328
|
+
try {
|
|
9329
|
+
return new URL(url).toString();
|
|
9330
|
+
} catch (e) {
|
|
9331
|
+
return url;
|
|
9332
|
+
}
|
|
9333
|
+
} else {
|
|
9334
|
+
return url;
|
|
9335
|
+
}
|
|
9336
|
+
};
|
|
9330
9337
|
let MediaManager$1 = class MediaManager {
|
|
9331
9338
|
constructor(store, events) {
|
|
9332
9339
|
this.store = store;
|
|
@@ -9399,6 +9406,20 @@ let MediaManager$1 = class MediaManager {
|
|
|
9399
9406
|
try {
|
|
9400
9407
|
this.events.dispatch({ type: "media:list:start", ...options });
|
|
9401
9408
|
const media = await this.store.list(options);
|
|
9409
|
+
media.items = media.items.map((item) => {
|
|
9410
|
+
if (item.type === "dir") {
|
|
9411
|
+
return item;
|
|
9412
|
+
}
|
|
9413
|
+
if (item.thumbnails) {
|
|
9414
|
+
for (const [size, src] of Object.entries(item.thumbnails)) {
|
|
9415
|
+
item.thumbnails[size] = encodeUrlIfNeeded(src);
|
|
9416
|
+
}
|
|
9417
|
+
}
|
|
9418
|
+
return {
|
|
9419
|
+
...item,
|
|
9420
|
+
src: encodeUrlIfNeeded(item.src)
|
|
9421
|
+
};
|
|
9422
|
+
});
|
|
9402
9423
|
this.events.dispatch({ type: "media:list:success", ...options, media });
|
|
9403
9424
|
return media;
|
|
9404
9425
|
} catch (error) {
|
|
@@ -9427,7 +9448,7 @@ const E_BAD_ROUTE = new MediaListError({
|
|
|
9427
9448
|
});
|
|
9428
9449
|
new MediaListError({
|
|
9429
9450
|
title: "An Error Occurred",
|
|
9430
|
-
message: "Something went wrong accessing your media from
|
|
9451
|
+
message: "Something went wrong accessing your media from TinaCloud.",
|
|
9431
9452
|
docsLink: ""
|
|
9432
9453
|
// TODO
|
|
9433
9454
|
});
|
|
@@ -9612,7 +9633,7 @@ let Alerts$1 = class Alerts {
|
|
|
9612
9633
|
return this.add("error", message, timeout);
|
|
9613
9634
|
}
|
|
9614
9635
|
};
|
|
9615
|
-
const
|
|
9636
|
+
const SidebarLoadingPlaceholder = () => /* @__PURE__ */ React.createElement(
|
|
9616
9637
|
"div",
|
|
9617
9638
|
{
|
|
9618
9639
|
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
@@ -9625,25 +9646,8 @@ const NoFormsPlaceholder = () => /* @__PURE__ */ React.createElement(
|
|
|
9625
9646
|
animationDuration: "150ms"
|
|
9626
9647
|
}
|
|
9627
9648
|
},
|
|
9628
|
-
/* @__PURE__ */ React.createElement(
|
|
9629
|
-
/* @__PURE__ */ React.createElement(
|
|
9630
|
-
/* @__PURE__ */ React.createElement("p", { className: "block" }, /* @__PURE__ */ React.createElement(
|
|
9631
|
-
Button$1,
|
|
9632
|
-
{
|
|
9633
|
-
href: "https://tina.io/docs/tinacms-context/",
|
|
9634
|
-
target: "_blank",
|
|
9635
|
-
as: "a"
|
|
9636
|
-
},
|
|
9637
|
-
/* @__PURE__ */ React.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
9638
|
-
" Contextual Editing"
|
|
9639
|
-
))
|
|
9640
|
-
);
|
|
9641
|
-
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
9642
|
-
"span",
|
|
9643
|
-
{
|
|
9644
|
-
className: `text-[24px] leading-none inline-block ${className}`,
|
|
9645
|
-
...props
|
|
9646
|
-
}
|
|
9649
|
+
/* @__PURE__ */ React.createElement("p", { className: "block pb-5" }, "Please wait while TinaCMS", /* @__PURE__ */ React.createElement("br", null), "loads your content"),
|
|
9650
|
+
/* @__PURE__ */ React.createElement(LoadingDots, { color: "var(--tina-color-primary)" })
|
|
9647
9651
|
);
|
|
9648
9652
|
class SidebarState {
|
|
9649
9653
|
constructor(events, options = {}) {
|
|
@@ -9658,7 +9662,7 @@ class SidebarState {
|
|
|
9658
9662
|
};
|
|
9659
9663
|
this.position = options.position || "displace";
|
|
9660
9664
|
this.renderNav = options.renderNav || true;
|
|
9661
|
-
this.
|
|
9665
|
+
this.loadingPlaceholder = options.placeholder || SidebarLoadingPlaceholder;
|
|
9662
9666
|
if ((_a = options.buttons) == null ? void 0 : _a.save) {
|
|
9663
9667
|
this.buttons.save = options.buttons.save;
|
|
9664
9668
|
}
|
|
@@ -9732,238 +9736,6 @@ const ModalLayout = ({ children, name, close: close2, layout }) => {
|
|
|
9732
9736
|
children
|
|
9733
9737
|
)));
|
|
9734
9738
|
};
|
|
9735
|
-
const Item = ({
|
|
9736
|
-
item,
|
|
9737
|
-
depth,
|
|
9738
|
-
setActiveFormId
|
|
9739
|
-
}) => {
|
|
9740
|
-
const cms = useCMS();
|
|
9741
|
-
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
9742
|
-
const form = React.useMemo(
|
|
9743
|
-
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
9744
|
-
[item.formId]
|
|
9745
|
-
);
|
|
9746
|
-
return /* @__PURE__ */ React.createElement(
|
|
9747
|
-
"button",
|
|
9748
|
-
{
|
|
9749
|
-
type: "button",
|
|
9750
|
-
key: item.path,
|
|
9751
|
-
onClick: () => setActiveFormId(item.formId),
|
|
9752
|
-
className: `${depths[depth] || "pl-12"} pr-6 py-3 w-full h-full bg-transparent border-none text-lg text-gray-700 group hover:bg-gray-50 transition-all ease-out duration-150 flex items-center justify-between gap-2`
|
|
9753
|
-
},
|
|
9754
|
-
/* @__PURE__ */ React.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
9755
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex-1 flex flex-col gap-0.5 items-start" }, /* @__PURE__ */ React.createElement("div", { className: "group-hover:text-blue-500 font-sans text-xs font-semibold text-gray-700 whitespace-normal" }, form.tinaForm.label), /* @__PURE__ */ React.createElement("div", { className: "group-hover:text-blue-500 text-base truncate leading-tight text-gray-600" }, form.tinaForm.id))
|
|
9756
|
-
);
|
|
9757
|
-
};
|
|
9758
|
-
const FormListItem = ({
|
|
9759
|
-
item,
|
|
9760
|
-
depth,
|
|
9761
|
-
setActiveFormId
|
|
9762
|
-
}) => {
|
|
9763
|
-
var _a;
|
|
9764
|
-
return /* @__PURE__ */ React.createElement("div", { className: "divide-y divide-gray-200" }, /* @__PURE__ */ React.createElement(Item, { setActiveFormId, item, depth }), item.subItems && /* @__PURE__ */ React.createElement("ul", { className: "divide-y divide-gray-200" }, (_a = item.subItems) == null ? void 0 : _a.map((subItem) => {
|
|
9765
|
-
if (subItem.type === "document") {
|
|
9766
|
-
return /* @__PURE__ */ React.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React.createElement(
|
|
9767
|
-
Item,
|
|
9768
|
-
{
|
|
9769
|
-
setActiveFormId,
|
|
9770
|
-
depth: depth + 1,
|
|
9771
|
-
item: subItem
|
|
9772
|
-
}
|
|
9773
|
-
));
|
|
9774
|
-
}
|
|
9775
|
-
})));
|
|
9776
|
-
};
|
|
9777
|
-
const FormLists = (props) => {
|
|
9778
|
-
const cms = useCMS();
|
|
9779
|
-
return /* @__PURE__ */ React.createElement(
|
|
9780
|
-
Transition,
|
|
9781
|
-
{
|
|
9782
|
-
appear: true,
|
|
9783
|
-
show: true,
|
|
9784
|
-
as: "div",
|
|
9785
|
-
enter: "transition-all ease-out duration-150",
|
|
9786
|
-
enterFrom: "opacity-0 -translate-x-1/2",
|
|
9787
|
-
enterTo: "opacity-100",
|
|
9788
|
-
leave: "transition-all ease-out duration-150",
|
|
9789
|
-
leaveFrom: "opacity-100",
|
|
9790
|
-
leaveTo: "opacity-0 -translate-x-1/2"
|
|
9791
|
-
},
|
|
9792
|
-
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React.createElement(
|
|
9793
|
-
FormList,
|
|
9794
|
-
{
|
|
9795
|
-
isEditing: props.isEditing,
|
|
9796
|
-
setActiveFormId: (id) => {
|
|
9797
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
9798
|
-
},
|
|
9799
|
-
formList
|
|
9800
|
-
}
|
|
9801
|
-
)))
|
|
9802
|
-
);
|
|
9803
|
-
};
|
|
9804
|
-
const FormList = (props) => {
|
|
9805
|
-
const cms = useCMS();
|
|
9806
|
-
const listItems = React.useMemo(() => {
|
|
9807
|
-
var _a;
|
|
9808
|
-
const orderedListItems = [];
|
|
9809
|
-
const globalItems = [];
|
|
9810
|
-
const topItems = [];
|
|
9811
|
-
props.formList.items.forEach((item) => {
|
|
9812
|
-
if (item.type === "document") {
|
|
9813
|
-
const form = cms.state.forms.find(
|
|
9814
|
-
({ tinaForm }) => tinaForm.id === item.formId
|
|
9815
|
-
);
|
|
9816
|
-
if (form.tinaForm.global) {
|
|
9817
|
-
globalItems.push(item);
|
|
9818
|
-
} else {
|
|
9819
|
-
orderedListItems.push(item);
|
|
9820
|
-
}
|
|
9821
|
-
} else {
|
|
9822
|
-
orderedListItems.push(item);
|
|
9823
|
-
}
|
|
9824
|
-
});
|
|
9825
|
-
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
9826
|
-
topItems.push({ type: "list", label: "Documents" });
|
|
9827
|
-
}
|
|
9828
|
-
let extra = [];
|
|
9829
|
-
if (globalItems.length) {
|
|
9830
|
-
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
9831
|
-
}
|
|
9832
|
-
return [...topItems, ...orderedListItems, ...extra];
|
|
9833
|
-
}, [JSON.stringify(props.formList.items)]);
|
|
9834
|
-
return /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
9835
|
-
if (item.type === "list") {
|
|
9836
|
-
return /* @__PURE__ */ React.createElement(
|
|
9837
|
-
"div",
|
|
9838
|
-
{
|
|
9839
|
-
key: item.label,
|
|
9840
|
-
className: `relative group text-left w-full bg-white shadow-sm
|
|
9841
|
-
border-gray-100 px-6 -mt-px pb-3 ${index > 0 ? "pt-6 bg-gradient-to-b from-gray-50 via-white to-white" : "pt-3"}`
|
|
9842
|
-
},
|
|
9843
|
-
/* @__PURE__ */ React.createElement(
|
|
9844
|
-
"span",
|
|
9845
|
-
{
|
|
9846
|
-
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
9847
|
-
},
|
|
9848
|
-
item.label
|
|
9849
|
-
)
|
|
9850
|
-
);
|
|
9851
|
-
}
|
|
9852
|
-
return /* @__PURE__ */ React.createElement(
|
|
9853
|
-
FormListItem,
|
|
9854
|
-
{
|
|
9855
|
-
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
9856
|
-
key: item.formId,
|
|
9857
|
-
item,
|
|
9858
|
-
depth: 0
|
|
9859
|
-
}
|
|
9860
|
-
);
|
|
9861
|
-
})));
|
|
9862
|
-
};
|
|
9863
|
-
const FormsView = ({
|
|
9864
|
-
children
|
|
9865
|
-
}) => {
|
|
9866
|
-
const cms = useCMS$1();
|
|
9867
|
-
const { setFormIsPristine } = React.useContext(SidebarContext);
|
|
9868
|
-
const isMultiform = cms.state.forms.length > 1;
|
|
9869
|
-
const activeForm = cms.state.forms.find(
|
|
9870
|
-
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
9871
|
-
);
|
|
9872
|
-
const isEditing = !!activeForm;
|
|
9873
|
-
if (!cms.state.formLists.length) {
|
|
9874
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, " ", children, " ");
|
|
9875
|
-
}
|
|
9876
|
-
if (isMultiform && !activeForm) {
|
|
9877
|
-
return /* @__PURE__ */ React.createElement(FormLists, { isEditing });
|
|
9878
|
-
}
|
|
9879
|
-
const formMetas = cms.plugins.all("form:meta");
|
|
9880
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, activeForm && /* @__PURE__ */ React.createElement(FormWrapper$1, { isEditing, isMultiform }, isMultiform && /* @__PURE__ */ React.createElement(MultiformFormHeader, { activeForm }), !isMultiform && /* @__PURE__ */ React.createElement(FormHeader, { activeForm }), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React.createElement(React.Fragment, { key: meta.name }, /* @__PURE__ */ React.createElement(meta.Component, null))), /* @__PURE__ */ React.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine })));
|
|
9881
|
-
};
|
|
9882
|
-
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
9883
|
-
return /* @__PURE__ */ React.createElement(
|
|
9884
|
-
"div",
|
|
9885
|
-
{
|
|
9886
|
-
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
9887
|
-
style: isEditing ? {
|
|
9888
|
-
transform: "none",
|
|
9889
|
-
animationName: "fly-in-left",
|
|
9890
|
-
animationDuration: "150ms",
|
|
9891
|
-
animationDelay: "0",
|
|
9892
|
-
animationIterationCount: 1,
|
|
9893
|
-
animationTimingFunction: "ease-out"
|
|
9894
|
-
} : {
|
|
9895
|
-
transform: "translate3d(100%, 0, 0)"
|
|
9896
|
-
}
|
|
9897
|
-
},
|
|
9898
|
-
children
|
|
9899
|
-
);
|
|
9900
|
-
};
|
|
9901
|
-
const MultiformFormHeader = ({
|
|
9902
|
-
activeForm
|
|
9903
|
-
}) => {
|
|
9904
|
-
const cms = useCMS$1();
|
|
9905
|
-
const { formIsPristine } = React.useContext(SidebarContext);
|
|
9906
|
-
return /* @__PURE__ */ React.createElement(
|
|
9907
|
-
"div",
|
|
9908
|
-
{
|
|
9909
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9910
|
-
},
|
|
9911
|
-
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
9912
|
-
"button",
|
|
9913
|
-
{
|
|
9914
|
-
type: "button",
|
|
9915
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9916
|
-
onClick: () => {
|
|
9917
|
-
const state = activeForm.tinaForm.finalForm.getState();
|
|
9918
|
-
if (state.invalid === true) {
|
|
9919
|
-
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
9920
|
-
} else {
|
|
9921
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
9922
|
-
}
|
|
9923
|
-
}
|
|
9924
|
-
},
|
|
9925
|
-
/* @__PURE__ */ React.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9926
|
-
), /* @__PURE__ */ React.createElement(
|
|
9927
|
-
"button",
|
|
9928
|
-
{
|
|
9929
|
-
type: "button",
|
|
9930
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9931
|
-
onClick: () => {
|
|
9932
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9933
|
-
cms.state.activeFormId
|
|
9934
|
-
).name;
|
|
9935
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9936
|
-
}
|
|
9937
|
-
},
|
|
9938
|
-
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9939
|
-
), /* @__PURE__ */ React.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, activeForm.tinaForm.label || activeForm.tinaForm.id), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
9940
|
-
);
|
|
9941
|
-
};
|
|
9942
|
-
const FormHeader = ({ activeForm }) => {
|
|
9943
|
-
const { formIsPristine } = React.useContext(SidebarContext);
|
|
9944
|
-
const cms = useCMS$1();
|
|
9945
|
-
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
9946
|
-
return /* @__PURE__ */ React.createElement(
|
|
9947
|
-
"div",
|
|
9948
|
-
{
|
|
9949
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9950
|
-
},
|
|
9951
|
-
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
9952
|
-
"button",
|
|
9953
|
-
{
|
|
9954
|
-
type: "button",
|
|
9955
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9956
|
-
onClick: () => {
|
|
9957
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9958
|
-
cms.state.activeFormId
|
|
9959
|
-
).name;
|
|
9960
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9961
|
-
}
|
|
9962
|
-
},
|
|
9963
|
-
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9964
|
-
), shortFormLabel && /* @__PURE__ */ React.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
9965
|
-
);
|
|
9966
|
-
};
|
|
9967
9739
|
function ImFilesEmpty(props) {
|
|
9968
9740
|
return GenIcon({ "tag": "svg", "attr": { "version": "1.1", "viewBox": "0 0 16 16" }, "child": [{ "tag": "path", "attr": { "d": "M14.341 5.579c-0.347-0.473-0.831-1.027-1.362-1.558s-1.085-1.015-1.558-1.362c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.689 0.561 1.25 1.25 1.25h9.5c0.689 0 1.25-0.561 1.25-1.25v-7.75c0-0.224-0.068-0.615-0.659-1.421zM12.271 4.729c0.48 0.48 0.856 0.912 1.134 1.271h-2.406v-2.405c0.359 0.278 0.792 0.654 1.271 1.134v0zM14 14.75c0 0.136-0.114 0.25-0.25 0.25h-9.5c-0.136 0-0.25-0.114-0.25-0.25v-11.5c0-0.135 0.114-0.25 0.25-0.25 0 0 5.749-0 5.75 0v3.5c0 0.276 0.224 0.5 0.5 0.5h3.5v7.75z" }, "child": [] }, { "tag": "path", "attr": { "d": "M9.421 0.659c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.604 0.43 1.109 1 1.225v-12.725c0-0.135 0.115-0.25 0.25-0.25h7.607c-0.151-0.124-0.297-0.238-0.437-0.341z" }, "child": [] }] })(props);
|
|
9969
9741
|
}
|
|
@@ -10206,7 +9978,7 @@ const SyncStatus = ({ cms, setEventsOpen }) => {
|
|
|
10206
9978
|
"Event Log"
|
|
10207
9979
|
));
|
|
10208
9980
|
};
|
|
10209
|
-
const version = "2.5
|
|
9981
|
+
const version = "2.7.5";
|
|
10210
9982
|
const Nav = ({
|
|
10211
9983
|
isLocalMode,
|
|
10212
9984
|
className = "",
|
|
@@ -10448,6 +10220,293 @@ const ResizeHandle = () => {
|
|
|
10448
10220
|
/* @__PURE__ */ React.createElement("span", { className: "absolute top-1/2 left-1/2 h-4/6 w-px bg-gray-200 transform -translate-y-1/2 -translate-x-1/2 opacity-30 transition-opacity duration-150 ease-out group-hover:opacity-100" })
|
|
10449
10221
|
);
|
|
10450
10222
|
};
|
|
10223
|
+
const Item = ({
|
|
10224
|
+
item,
|
|
10225
|
+
depth,
|
|
10226
|
+
setActiveFormId
|
|
10227
|
+
}) => {
|
|
10228
|
+
const cms = useCMS();
|
|
10229
|
+
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
10230
|
+
const form = React.useMemo(
|
|
10231
|
+
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
10232
|
+
[item.formId]
|
|
10233
|
+
);
|
|
10234
|
+
return /* @__PURE__ */ React.createElement(
|
|
10235
|
+
"button",
|
|
10236
|
+
{
|
|
10237
|
+
type: "button",
|
|
10238
|
+
key: item.path,
|
|
10239
|
+
onClick: () => setActiveFormId(item.formId),
|
|
10240
|
+
className: `${depths[depth] || "pl-12"} pr-6 py-3 w-full h-full bg-transparent border-none text-lg text-gray-700 group hover:bg-gray-50 transition-all ease-out duration-150 flex items-center justify-between gap-2`
|
|
10241
|
+
},
|
|
10242
|
+
/* @__PURE__ */ React.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
10243
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex-1 flex flex-col gap-0.5 items-start" }, /* @__PURE__ */ React.createElement("div", { className: "group-hover:text-blue-500 font-sans text-xs font-semibold text-gray-700 whitespace-normal" }, form.tinaForm.label), /* @__PURE__ */ React.createElement("div", { className: "group-hover:text-blue-500 text-base truncate leading-tight text-gray-600" }, form.tinaForm.id))
|
|
10244
|
+
);
|
|
10245
|
+
};
|
|
10246
|
+
const FormListItem = ({
|
|
10247
|
+
item,
|
|
10248
|
+
depth,
|
|
10249
|
+
setActiveFormId
|
|
10250
|
+
}) => {
|
|
10251
|
+
var _a;
|
|
10252
|
+
return /* @__PURE__ */ React.createElement("div", { className: "divide-y divide-gray-200" }, /* @__PURE__ */ React.createElement(Item, { setActiveFormId, item, depth }), item.subItems && /* @__PURE__ */ React.createElement("ul", { className: "divide-y divide-gray-200" }, (_a = item.subItems) == null ? void 0 : _a.map((subItem) => {
|
|
10253
|
+
if (subItem.type === "document") {
|
|
10254
|
+
return /* @__PURE__ */ React.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React.createElement(
|
|
10255
|
+
Item,
|
|
10256
|
+
{
|
|
10257
|
+
setActiveFormId,
|
|
10258
|
+
depth: depth + 1,
|
|
10259
|
+
item: subItem
|
|
10260
|
+
}
|
|
10261
|
+
));
|
|
10262
|
+
}
|
|
10263
|
+
})));
|
|
10264
|
+
};
|
|
10265
|
+
const FormLists = (props) => {
|
|
10266
|
+
const cms = useCMS();
|
|
10267
|
+
return /* @__PURE__ */ React.createElement(
|
|
10268
|
+
Transition,
|
|
10269
|
+
{
|
|
10270
|
+
appear: true,
|
|
10271
|
+
show: true,
|
|
10272
|
+
as: "div",
|
|
10273
|
+
enter: "transition-all ease-out duration-150",
|
|
10274
|
+
enterFrom: "opacity-0 -translate-x-1/2",
|
|
10275
|
+
enterTo: "opacity-100",
|
|
10276
|
+
leave: "transition-all ease-out duration-150",
|
|
10277
|
+
leaveFrom: "opacity-100",
|
|
10278
|
+
leaveTo: "opacity-0 -translate-x-1/2"
|
|
10279
|
+
},
|
|
10280
|
+
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React.createElement(
|
|
10281
|
+
FormList,
|
|
10282
|
+
{
|
|
10283
|
+
isEditing: props.isEditing,
|
|
10284
|
+
setActiveFormId: (id) => {
|
|
10285
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
10286
|
+
},
|
|
10287
|
+
formList
|
|
10288
|
+
}
|
|
10289
|
+
)))
|
|
10290
|
+
);
|
|
10291
|
+
};
|
|
10292
|
+
const FormList = (props) => {
|
|
10293
|
+
const cms = useCMS();
|
|
10294
|
+
const listItems = React.useMemo(() => {
|
|
10295
|
+
var _a;
|
|
10296
|
+
const orderedListItems = [];
|
|
10297
|
+
const globalItems = [];
|
|
10298
|
+
const topItems = [];
|
|
10299
|
+
props.formList.items.forEach((item) => {
|
|
10300
|
+
if (item.type === "document") {
|
|
10301
|
+
const form = cms.state.forms.find(
|
|
10302
|
+
({ tinaForm }) => tinaForm.id === item.formId
|
|
10303
|
+
);
|
|
10304
|
+
if (form.tinaForm.global) {
|
|
10305
|
+
globalItems.push(item);
|
|
10306
|
+
} else {
|
|
10307
|
+
orderedListItems.push(item);
|
|
10308
|
+
}
|
|
10309
|
+
} else {
|
|
10310
|
+
orderedListItems.push(item);
|
|
10311
|
+
}
|
|
10312
|
+
});
|
|
10313
|
+
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
10314
|
+
topItems.push({ type: "list", label: "Documents" });
|
|
10315
|
+
}
|
|
10316
|
+
let extra = [];
|
|
10317
|
+
if (globalItems.length) {
|
|
10318
|
+
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
10319
|
+
}
|
|
10320
|
+
return [...topItems, ...orderedListItems, ...extra];
|
|
10321
|
+
}, [JSON.stringify(props.formList.items)]);
|
|
10322
|
+
return /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
10323
|
+
if (item.type === "list") {
|
|
10324
|
+
return /* @__PURE__ */ React.createElement(
|
|
10325
|
+
"div",
|
|
10326
|
+
{
|
|
10327
|
+
key: item.label,
|
|
10328
|
+
className: `relative group text-left w-full bg-white shadow-sm
|
|
10329
|
+
border-gray-100 px-6 -mt-px pb-3 ${index > 0 ? "pt-6 bg-gradient-to-b from-gray-50 via-white to-white" : "pt-3"}`
|
|
10330
|
+
},
|
|
10331
|
+
/* @__PURE__ */ React.createElement(
|
|
10332
|
+
"span",
|
|
10333
|
+
{
|
|
10334
|
+
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
10335
|
+
},
|
|
10336
|
+
item.label
|
|
10337
|
+
)
|
|
10338
|
+
);
|
|
10339
|
+
}
|
|
10340
|
+
return /* @__PURE__ */ React.createElement(
|
|
10341
|
+
FormListItem,
|
|
10342
|
+
{
|
|
10343
|
+
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
10344
|
+
key: item.formId,
|
|
10345
|
+
item,
|
|
10346
|
+
depth: 0
|
|
10347
|
+
}
|
|
10348
|
+
);
|
|
10349
|
+
})));
|
|
10350
|
+
};
|
|
10351
|
+
const SidebarNoFormsPlaceholder = () => /* @__PURE__ */ React.createElement(
|
|
10352
|
+
"div",
|
|
10353
|
+
{
|
|
10354
|
+
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
10355
|
+
style: {
|
|
10356
|
+
animationName: "fade-in",
|
|
10357
|
+
animationDelay: "300ms",
|
|
10358
|
+
animationTimingFunction: "ease-out",
|
|
10359
|
+
animationIterationCount: 1,
|
|
10360
|
+
animationFillMode: "both",
|
|
10361
|
+
animationDuration: "150ms"
|
|
10362
|
+
}
|
|
10363
|
+
},
|
|
10364
|
+
/* @__PURE__ */ React.createElement("p", { className: "block pb-5" }, "Looks like there's ", /* @__PURE__ */ React.createElement("br", null), "nothing to edit on ", /* @__PURE__ */ React.createElement("br", null), "this page."),
|
|
10365
|
+
/* @__PURE__ */ React.createElement("p", { className: "block pt-5" }, /* @__PURE__ */ React.createElement(
|
|
10366
|
+
Button$1,
|
|
10367
|
+
{
|
|
10368
|
+
href: "https://tina.io/docs/contextual-editing/overview",
|
|
10369
|
+
target: "_blank",
|
|
10370
|
+
as: "a"
|
|
10371
|
+
},
|
|
10372
|
+
/* @__PURE__ */ React.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
10373
|
+
" Contextual Editing Docs"
|
|
10374
|
+
))
|
|
10375
|
+
);
|
|
10376
|
+
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
10377
|
+
"span",
|
|
10378
|
+
{
|
|
10379
|
+
className: `text-[24px] leading-none inline-block ${className}`,
|
|
10380
|
+
...props
|
|
10381
|
+
}
|
|
10382
|
+
);
|
|
10383
|
+
const minimumTimeToShowLoadingIndicator = 1e3;
|
|
10384
|
+
const FormsView = ({ loadingPlaceholder } = {}) => {
|
|
10385
|
+
const cms = useCMS$1();
|
|
10386
|
+
const { setFormIsPristine } = React.useContext(SidebarContext);
|
|
10387
|
+
const [isShowingLoading, setIsShowingLoading] = React.useState(true);
|
|
10388
|
+
const [initialLoadComplete, setInitialLoadComplete] = React.useState(false);
|
|
10389
|
+
React.useEffect(() => {
|
|
10390
|
+
if (cms.state.isLoadingContent) {
|
|
10391
|
+
setIsShowingLoading(true);
|
|
10392
|
+
const timer = setTimeout(() => {
|
|
10393
|
+
if (!cms.state.isLoadingContent) {
|
|
10394
|
+
setIsShowingLoading(false);
|
|
10395
|
+
setInitialLoadComplete(true);
|
|
10396
|
+
}
|
|
10397
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10398
|
+
return () => clearTimeout(timer);
|
|
10399
|
+
} else {
|
|
10400
|
+
const timer = setTimeout(() => {
|
|
10401
|
+
setIsShowingLoading(false);
|
|
10402
|
+
setInitialLoadComplete(true);
|
|
10403
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10404
|
+
return () => clearTimeout(timer);
|
|
10405
|
+
}
|
|
10406
|
+
}, [cms.state.isLoadingContent]);
|
|
10407
|
+
if (isShowingLoading || !initialLoadComplete) {
|
|
10408
|
+
const LoadingPlaceholder = loadingPlaceholder || SidebarLoadingPlaceholder;
|
|
10409
|
+
return /* @__PURE__ */ React.createElement(LoadingPlaceholder, null);
|
|
10410
|
+
}
|
|
10411
|
+
if (!cms.state.formLists.length) {
|
|
10412
|
+
return /* @__PURE__ */ React.createElement(SidebarNoFormsPlaceholder, null);
|
|
10413
|
+
}
|
|
10414
|
+
const isMultiform = cms.state.forms.length > 1;
|
|
10415
|
+
const activeForm = cms.state.forms.find(
|
|
10416
|
+
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
10417
|
+
);
|
|
10418
|
+
const isEditing = !!activeForm;
|
|
10419
|
+
if (isMultiform && !activeForm) {
|
|
10420
|
+
return /* @__PURE__ */ React.createElement(FormLists, { isEditing });
|
|
10421
|
+
}
|
|
10422
|
+
const formMetas = cms.plugins.all("form:meta");
|
|
10423
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, activeForm && /* @__PURE__ */ React.createElement(FormWrapper$1, { isEditing, isMultiform }, isMultiform && /* @__PURE__ */ React.createElement(MultiformFormHeader, { activeForm }), !isMultiform && /* @__PURE__ */ React.createElement(FormHeader, { activeForm }), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React.createElement(React.Fragment, { key: meta.name }, /* @__PURE__ */ React.createElement(meta.Component, null))), /* @__PURE__ */ React.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine })));
|
|
10424
|
+
};
|
|
10425
|
+
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
10426
|
+
return /* @__PURE__ */ React.createElement(
|
|
10427
|
+
"div",
|
|
10428
|
+
{
|
|
10429
|
+
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
10430
|
+
style: isEditing ? {
|
|
10431
|
+
transform: "none",
|
|
10432
|
+
animationName: "fly-in-left",
|
|
10433
|
+
animationDuration: "150ms",
|
|
10434
|
+
animationDelay: "0",
|
|
10435
|
+
animationIterationCount: 1,
|
|
10436
|
+
animationTimingFunction: "ease-out"
|
|
10437
|
+
} : {
|
|
10438
|
+
transform: "translate3d(100%, 0, 0)"
|
|
10439
|
+
}
|
|
10440
|
+
},
|
|
10441
|
+
children
|
|
10442
|
+
);
|
|
10443
|
+
};
|
|
10444
|
+
const MultiformFormHeader = ({
|
|
10445
|
+
activeForm
|
|
10446
|
+
}) => {
|
|
10447
|
+
const cms = useCMS$1();
|
|
10448
|
+
const { formIsPristine } = React.useContext(SidebarContext);
|
|
10449
|
+
return /* @__PURE__ */ React.createElement(
|
|
10450
|
+
"div",
|
|
10451
|
+
{
|
|
10452
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10453
|
+
},
|
|
10454
|
+
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
10455
|
+
"button",
|
|
10456
|
+
{
|
|
10457
|
+
type: "button",
|
|
10458
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10459
|
+
onClick: () => {
|
|
10460
|
+
const state = activeForm.tinaForm.finalForm.getState();
|
|
10461
|
+
if (state.invalid === true) {
|
|
10462
|
+
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
10463
|
+
} else {
|
|
10464
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
10465
|
+
}
|
|
10466
|
+
}
|
|
10467
|
+
},
|
|
10468
|
+
/* @__PURE__ */ React.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10469
|
+
), /* @__PURE__ */ React.createElement(
|
|
10470
|
+
"button",
|
|
10471
|
+
{
|
|
10472
|
+
type: "button",
|
|
10473
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10474
|
+
onClick: () => {
|
|
10475
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10476
|
+
cms.state.activeFormId
|
|
10477
|
+
).name;
|
|
10478
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10479
|
+
}
|
|
10480
|
+
},
|
|
10481
|
+
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10482
|
+
), /* @__PURE__ */ React.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, activeForm.tinaForm.label || activeForm.tinaForm.id), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
10483
|
+
);
|
|
10484
|
+
};
|
|
10485
|
+
const FormHeader = ({ activeForm }) => {
|
|
10486
|
+
const { formIsPristine } = React.useContext(SidebarContext);
|
|
10487
|
+
const cms = useCMS$1();
|
|
10488
|
+
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
10489
|
+
return /* @__PURE__ */ React.createElement(
|
|
10490
|
+
"div",
|
|
10491
|
+
{
|
|
10492
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10493
|
+
},
|
|
10494
|
+
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
10495
|
+
"button",
|
|
10496
|
+
{
|
|
10497
|
+
type: "button",
|
|
10498
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10499
|
+
onClick: () => {
|
|
10500
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10501
|
+
cms.state.activeFormId
|
|
10502
|
+
).name;
|
|
10503
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10504
|
+
}
|
|
10505
|
+
},
|
|
10506
|
+
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10507
|
+
), shortFormLabel && /* @__PURE__ */ React.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
10508
|
+
);
|
|
10509
|
+
};
|
|
10451
10510
|
const SidebarContext = React.createContext(null);
|
|
10452
10511
|
const minPreviewWidth = 440;
|
|
10453
10512
|
const minSidebarWidth = 360;
|
|
@@ -10666,7 +10725,7 @@ const Sidebar$1 = ({
|
|
|
10666
10725
|
isLocalMode: (_d = (_c = cms.api) == null ? void 0 : _c.tina) == null ? void 0 : _d.isLocalMode,
|
|
10667
10726
|
branchingEnabled
|
|
10668
10727
|
}
|
|
10669
|
-
), /* @__PURE__ */ React.createElement(FormsView,
|
|
10728
|
+
), /* @__PURE__ */ React.createElement(FormsView, { loadingPlaceholder: sidebar.loadingPlaceholder }), activeScreen && /* @__PURE__ */ React.createElement(
|
|
10670
10729
|
ScreenPluginModal,
|
|
10671
10730
|
{
|
|
10672
10731
|
screen: activeScreen,
|
|
@@ -10842,7 +10901,7 @@ const SidebarHeader = ({
|
|
|
10842
10901
|
className: "h-5 w-auto -mx-1 text-blue-500",
|
|
10843
10902
|
stroke: "currentColor",
|
|
10844
10903
|
fill: "currentColor",
|
|
10845
|
-
|
|
10904
|
+
strokeWidth: "0",
|
|
10846
10905
|
viewBox: "0 0 24 24",
|
|
10847
10906
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10848
10907
|
},
|
|
@@ -10982,6 +11041,93 @@ function createPlaceholder(name, _pr) {
|
|
|
10982
11041
|
);
|
|
10983
11042
|
};
|
|
10984
11043
|
}
|
|
11044
|
+
function dirname(path) {
|
|
11045
|
+
var _a, _b;
|
|
11046
|
+
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11047
|
+
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11048
|
+
}
|
|
11049
|
+
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React__default.createElement(
|
|
11050
|
+
"button",
|
|
11051
|
+
{
|
|
11052
|
+
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11053
|
+
...props
|
|
11054
|
+
}
|
|
11055
|
+
);
|
|
11056
|
+
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11057
|
+
directory = directory.replace(/^\/|\/$/g, "");
|
|
11058
|
+
let prevDir = dirname(directory) || "";
|
|
11059
|
+
if (prevDir === ".") {
|
|
11060
|
+
prevDir = "";
|
|
11061
|
+
}
|
|
11062
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React__default.createElement(
|
|
11063
|
+
IconButton,
|
|
11064
|
+
{
|
|
11065
|
+
variant: "ghost",
|
|
11066
|
+
className: "mr-2",
|
|
11067
|
+
onClick: () => setDirectory(prevDir)
|
|
11068
|
+
},
|
|
11069
|
+
/* @__PURE__ */ React__default.createElement(
|
|
11070
|
+
LeftArrowIcon,
|
|
11071
|
+
{
|
|
11072
|
+
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11073
|
+
}
|
|
11074
|
+
)
|
|
11075
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
11076
|
+
BreadcrumbButton,
|
|
11077
|
+
{
|
|
11078
|
+
onClick: () => setDirectory(""),
|
|
11079
|
+
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11080
|
+
},
|
|
11081
|
+
"Media"
|
|
11082
|
+
), directory && directory.split("/").map((part, index, parts) => {
|
|
11083
|
+
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11084
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
11085
|
+
BreadcrumbButton,
|
|
11086
|
+
{
|
|
11087
|
+
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11088
|
+
key: currentDir,
|
|
11089
|
+
onClick: () => {
|
|
11090
|
+
setDirectory(currentDir);
|
|
11091
|
+
}
|
|
11092
|
+
},
|
|
11093
|
+
part
|
|
11094
|
+
);
|
|
11095
|
+
}));
|
|
11096
|
+
}
|
|
11097
|
+
const CopyField = ({ label, description, value }) => {
|
|
11098
|
+
const [copied, setCopied] = React__default.useState(false);
|
|
11099
|
+
const [fadeOut, setFadeOut] = React__default.useState(false);
|
|
11100
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full" }, label && /* @__PURE__ */ React__default.createElement("label", { className: "w-full mb-1 block flex-1 text-sm font-bold leading-5 text-gray-700" }, label), /* @__PURE__ */ React__default.createElement(
|
|
11101
|
+
"span",
|
|
11102
|
+
{
|
|
11103
|
+
onClick: () => {
|
|
11104
|
+
if (copied === true)
|
|
11105
|
+
return;
|
|
11106
|
+
setCopied(true);
|
|
11107
|
+
setTimeout(() => {
|
|
11108
|
+
setFadeOut(true);
|
|
11109
|
+
}, 2500);
|
|
11110
|
+
setTimeout(() => {
|
|
11111
|
+
setCopied(false);
|
|
11112
|
+
setFadeOut(false);
|
|
11113
|
+
}, 3e3);
|
|
11114
|
+
navigator.clipboard.writeText(value);
|
|
11115
|
+
},
|
|
11116
|
+
className: `shadow-inner text-base leading-5 whitespace-normal break-all px-3 py-2 text-gray-600 w-full bg-gray-50 border border-gray-200 transition-all ease-out duration-150 rounded-md relative overflow-hidden appearance-none flex items-center w-full cursor-pointer hover:bg-white hover:text-blue-500 ${copied ? `pointer-events-none` : ``}`
|
|
11117
|
+
},
|
|
11118
|
+
/* @__PURE__ */ React__default.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11119
|
+
" ",
|
|
11120
|
+
value,
|
|
11121
|
+
" ",
|
|
11122
|
+
copied && /* @__PURE__ */ React__default.createElement(
|
|
11123
|
+
"span",
|
|
11124
|
+
{
|
|
11125
|
+
className: `${fadeOut ? `opacity-0` : `opacity-100`} text-blue-500 transition-opacity duration-500 absolute right-0 w-full h-full px-3 py-2 bg-white bg-opacity-90 flex items-center justify-center text-center tracking-wide font-medium z-10`
|
|
11126
|
+
},
|
|
11127
|
+
/* @__PURE__ */ React__default.createElement("span", null, "Copied to clipboard!")
|
|
11128
|
+
)
|
|
11129
|
+
), description && /* @__PURE__ */ React__default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11130
|
+
};
|
|
10985
11131
|
function ListMediaItem({ item, onClick, active }) {
|
|
10986
11132
|
let FileIcon = BiFile;
|
|
10987
11133
|
if (item.type === "dir") {
|
|
@@ -11057,59 +11203,6 @@ function GridMediaItem({ item, active, onClick }) {
|
|
|
11057
11203
|
)
|
|
11058
11204
|
);
|
|
11059
11205
|
}
|
|
11060
|
-
function dirname(path) {
|
|
11061
|
-
var _a, _b;
|
|
11062
|
-
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11063
|
-
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11064
|
-
}
|
|
11065
|
-
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React__default.createElement(
|
|
11066
|
-
"button",
|
|
11067
|
-
{
|
|
11068
|
-
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11069
|
-
...props
|
|
11070
|
-
}
|
|
11071
|
-
);
|
|
11072
|
-
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11073
|
-
directory = directory.replace(/^\/|\/$/g, "");
|
|
11074
|
-
let prevDir = dirname(directory) || "";
|
|
11075
|
-
if (prevDir === ".") {
|
|
11076
|
-
prevDir = "";
|
|
11077
|
-
}
|
|
11078
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React__default.createElement(
|
|
11079
|
-
IconButton,
|
|
11080
|
-
{
|
|
11081
|
-
variant: "ghost",
|
|
11082
|
-
className: "mr-2",
|
|
11083
|
-
onClick: () => setDirectory(prevDir)
|
|
11084
|
-
},
|
|
11085
|
-
/* @__PURE__ */ React__default.createElement(
|
|
11086
|
-
LeftArrowIcon,
|
|
11087
|
-
{
|
|
11088
|
-
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11089
|
-
}
|
|
11090
|
-
)
|
|
11091
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
11092
|
-
BreadcrumbButton,
|
|
11093
|
-
{
|
|
11094
|
-
onClick: () => setDirectory(""),
|
|
11095
|
-
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11096
|
-
},
|
|
11097
|
-
"Media"
|
|
11098
|
-
), directory && directory.split("/").map((part, index, parts) => {
|
|
11099
|
-
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11100
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
11101
|
-
BreadcrumbButton,
|
|
11102
|
-
{
|
|
11103
|
-
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11104
|
-
key: currentDir,
|
|
11105
|
-
onClick: () => {
|
|
11106
|
-
setDirectory(currentDir);
|
|
11107
|
-
}
|
|
11108
|
-
},
|
|
11109
|
-
part
|
|
11110
|
-
);
|
|
11111
|
-
}));
|
|
11112
|
-
}
|
|
11113
11206
|
const DeleteModal$1 = ({
|
|
11114
11207
|
close: close2,
|
|
11115
11208
|
deleteFunc,
|
|
@@ -11163,40 +11256,6 @@ const NewFolderModal = ({ onSubmit, close: close2 }) => {
|
|
|
11163
11256
|
"Create New Folder"
|
|
11164
11257
|
))));
|
|
11165
11258
|
};
|
|
11166
|
-
const CopyField = ({ label, description, value }) => {
|
|
11167
|
-
const [copied, setCopied] = React__default.useState(false);
|
|
11168
|
-
const [fadeOut, setFadeOut] = React__default.useState(false);
|
|
11169
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full" }, label && /* @__PURE__ */ React__default.createElement("label", { className: "w-full mb-1 block flex-1 text-sm font-bold leading-5 text-gray-700" }, label), /* @__PURE__ */ React__default.createElement(
|
|
11170
|
-
"span",
|
|
11171
|
-
{
|
|
11172
|
-
onClick: () => {
|
|
11173
|
-
if (copied === true)
|
|
11174
|
-
return;
|
|
11175
|
-
setCopied(true);
|
|
11176
|
-
setTimeout(() => {
|
|
11177
|
-
setFadeOut(true);
|
|
11178
|
-
}, 2500);
|
|
11179
|
-
setTimeout(() => {
|
|
11180
|
-
setCopied(false);
|
|
11181
|
-
setFadeOut(false);
|
|
11182
|
-
}, 3e3);
|
|
11183
|
-
navigator.clipboard.writeText(value);
|
|
11184
|
-
},
|
|
11185
|
-
className: `shadow-inner text-base leading-5 whitespace-normal break-all px-3 py-2 text-gray-600 w-full bg-gray-50 border border-gray-200 transition-all ease-out duration-150 rounded-md relative overflow-hidden appearance-none flex items-center w-full cursor-pointer hover:bg-white hover:text-blue-500 ${copied ? `pointer-events-none` : ``}`
|
|
11186
|
-
},
|
|
11187
|
-
/* @__PURE__ */ React__default.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11188
|
-
" ",
|
|
11189
|
-
value,
|
|
11190
|
-
" ",
|
|
11191
|
-
copied && /* @__PURE__ */ React__default.createElement(
|
|
11192
|
-
"span",
|
|
11193
|
-
{
|
|
11194
|
-
className: `${fadeOut ? `opacity-0` : `opacity-100`} text-blue-500 transition-opacity duration-500 absolute right-0 w-full h-full px-3 py-2 bg-white bg-opacity-90 flex items-center justify-center text-center tracking-wide font-medium z-10`
|
|
11195
|
-
},
|
|
11196
|
-
/* @__PURE__ */ React__default.createElement("span", null, "Copied to clipboard!")
|
|
11197
|
-
)
|
|
11198
|
-
), description && /* @__PURE__ */ React__default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11199
|
-
};
|
|
11200
11259
|
const { useDropzone } = dropzone;
|
|
11201
11260
|
const join = function(...parts) {
|
|
11202
11261
|
const [first, last, slash] = [0, parts.length - 1, "/"];
|
|
@@ -11432,7 +11491,10 @@ function MediaPicker({
|
|
|
11432
11491
|
const observer = new IntersectionObserver((entries) => {
|
|
11433
11492
|
const target = entries[0];
|
|
11434
11493
|
if (target.isIntersecting && list.nextOffset) {
|
|
11435
|
-
setOffsetHistory((offsetHistory2) => [
|
|
11494
|
+
setOffsetHistory((offsetHistory2) => [
|
|
11495
|
+
...offsetHistory2,
|
|
11496
|
+
list.nextOffset
|
|
11497
|
+
]);
|
|
11436
11498
|
}
|
|
11437
11499
|
});
|
|
11438
11500
|
if (loaderRef.current) {
|
|
@@ -11695,7 +11757,7 @@ const SyncStatusContainer = ({ children }) => {
|
|
|
11695
11757
|
target: "_blank",
|
|
11696
11758
|
href: `${cms.api.tina.appDashboardLink}/media`
|
|
11697
11759
|
},
|
|
11698
|
-
"Sync Your Media In
|
|
11760
|
+
"Sync Your Media In TinaCloud.",
|
|
11699
11761
|
/* @__PURE__ */ React__default.createElement(BiLinkExternal, { className: `w-5 h-auto flex-shrink-0` })
|
|
11700
11762
|
)
|
|
11701
11763
|
)))) : /* @__PURE__ */ React__default.createElement(SyncStatusContext.Provider, { value: { syncStatus } }, children);
|
|
@@ -12027,6 +12089,7 @@ const initialState = (cms) => {
|
|
|
12027
12089
|
forms: [],
|
|
12028
12090
|
formLists: [],
|
|
12029
12091
|
editingMode: "basic",
|
|
12092
|
+
isLoadingContent: false,
|
|
12030
12093
|
quickEditSupported: false,
|
|
12031
12094
|
sidebarDisplayState: ((_a = cms == null ? void 0 : cms.sidebar) == null ? void 0 : _a.defaultState) || "open"
|
|
12032
12095
|
};
|
|
@@ -12086,7 +12149,12 @@ function tinaReducer(state, action) {
|
|
|
12086
12149
|
}
|
|
12087
12150
|
});
|
|
12088
12151
|
}
|
|
12089
|
-
return {
|
|
12152
|
+
return {
|
|
12153
|
+
...state,
|
|
12154
|
+
activeFormId,
|
|
12155
|
+
formLists: nextFormLists,
|
|
12156
|
+
isLoadingContent: false
|
|
12157
|
+
};
|
|
12090
12158
|
}
|
|
12091
12159
|
case "form-lists:remove": {
|
|
12092
12160
|
const nextFormLists = state.formLists.filter(
|
|
@@ -12155,6 +12223,9 @@ function tinaReducer(state, action) {
|
|
|
12155
12223
|
}
|
|
12156
12224
|
return { ...state, sidebarDisplayState: action.value };
|
|
12157
12225
|
}
|
|
12226
|
+
case "sidebar:set-loading-state": {
|
|
12227
|
+
return { ...state, isLoadingContent: action.value };
|
|
12228
|
+
}
|
|
12158
12229
|
default:
|
|
12159
12230
|
throw new Error(`Unhandled action ${action.type}`);
|
|
12160
12231
|
}
|
|
@@ -12396,7 +12467,9 @@ const ActiveFieldIndicator = () => {
|
|
|
12396
12467
|
if (activeEle) {
|
|
12397
12468
|
setDisplay(true);
|
|
12398
12469
|
setPosition(activeEle.getBoundingClientRect());
|
|
12399
|
-
const iframe = document.getElementById(
|
|
12470
|
+
const iframe = document.getElementById(
|
|
12471
|
+
"tina-iframe"
|
|
12472
|
+
);
|
|
12400
12473
|
if (iframe) {
|
|
12401
12474
|
setIframePosition(iframe.getBoundingClientRect());
|
|
12402
12475
|
}
|
|
@@ -12838,7 +12911,6 @@ const CreateBranchModel = ({
|
|
|
12838
12911
|
}) => {
|
|
12839
12912
|
const cms = useCMS$1();
|
|
12840
12913
|
const tinaApi = cms.api.tina;
|
|
12841
|
-
tinaApi.branch;
|
|
12842
12914
|
const [disabled, setDisabled] = React.useState(false);
|
|
12843
12915
|
const [newBranchName, setNewBranchName] = React.useState("");
|
|
12844
12916
|
const [error, setError] = React.useState("");
|
|
@@ -12864,10 +12936,10 @@ const CreateBranchModel = ({
|
|
|
12864
12936
|
const newUrl = window.location.href.replace(hash, newHash);
|
|
12865
12937
|
window.location.href = newUrl;
|
|
12866
12938
|
};
|
|
12867
|
-
return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, /* @__PURE__ */ React.createElement(BiGitBranch, { className: "w-6 h-auto mr-1 text-blue-500 opacity-70" }), " ", "Create Branch"), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", { className: "text-
|
|
12939
|
+
return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, /* @__PURE__ */ React.createElement(BiGitBranch, { className: "w-6 h-auto mr-1 text-blue-500 opacity-70" }), " ", "Create Branch"), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "This content is protected 🚧"), /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-700 mb-4" }, "To make changes, you need to create a copy then get it approved and merged for it to go live."), /* @__PURE__ */ React.createElement(
|
|
12868
12940
|
PrefixedTextField,
|
|
12869
12941
|
{
|
|
12870
|
-
placeholder: "
|
|
12942
|
+
placeholder: "e.g. {{PAGE-NAME}}-updates",
|
|
12871
12943
|
value: newBranchName,
|
|
12872
12944
|
onChange: (e) => {
|
|
12873
12945
|
setError("");
|
|
@@ -13014,7 +13086,9 @@ const ImgEmbed = ({
|
|
|
13014
13086
|
const { fieldName } = useTemplates();
|
|
13015
13087
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13016
13088
|
useHotkey("enter", () => {
|
|
13017
|
-
insertNodes(editor, [
|
|
13089
|
+
insertNodes(editor, [
|
|
13090
|
+
{ type: ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13091
|
+
]);
|
|
13018
13092
|
});
|
|
13019
13093
|
return /* @__PURE__ */ React__default.createElement("span", { ...attributes, className: "" }, children, element.url ? /* @__PURE__ */ React__default.createElement(
|
|
13020
13094
|
"div",
|
|
@@ -13157,7 +13231,9 @@ const InlineEmbed = ({
|
|
|
13157
13231
|
const { templates, fieldName } = useTemplates();
|
|
13158
13232
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13159
13233
|
useHotkey("enter", () => {
|
|
13160
|
-
insertNodes(editor, [
|
|
13234
|
+
insertNodes(editor, [
|
|
13235
|
+
{ type: ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13236
|
+
]);
|
|
13161
13237
|
});
|
|
13162
13238
|
useHotkey("space", () => {
|
|
13163
13239
|
insertNodes(editor, [{ text: " " }], {
|
|
@@ -13213,7 +13289,9 @@ const BlockEmbed = ({
|
|
|
13213
13289
|
const { templates, fieldName } = useTemplates();
|
|
13214
13290
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13215
13291
|
useHotkey("enter", () => {
|
|
13216
|
-
insertNodes(editor, [
|
|
13292
|
+
insertNodes(editor, [
|
|
13293
|
+
{ type: ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13294
|
+
]);
|
|
13217
13295
|
});
|
|
13218
13296
|
const activeTemplate = templates.find(
|
|
13219
13297
|
(template) => template.name === element.name
|
|
@@ -13559,6 +13637,11 @@ const autoformatMarks = [
|
|
|
13559
13637
|
mode: "mark",
|
|
13560
13638
|
type: MARK_CODE,
|
|
13561
13639
|
match: "`"
|
|
13640
|
+
},
|
|
13641
|
+
{
|
|
13642
|
+
mode: "mark",
|
|
13643
|
+
type: MARK_STRIKETHROUGH,
|
|
13644
|
+
match: ["~~", "~"]
|
|
13562
13645
|
}
|
|
13563
13646
|
];
|
|
13564
13647
|
const autoformatRules = [
|
|
@@ -13700,16 +13783,14 @@ const plugins$1 = [
|
|
|
13700
13783
|
})
|
|
13701
13784
|
];
|
|
13702
13785
|
const plugins = [
|
|
13786
|
+
createBasicMarksPlugin(),
|
|
13703
13787
|
createHeadingPlugin(),
|
|
13704
13788
|
createParagraphPlugin(),
|
|
13705
13789
|
createCodeBlockPlugin(),
|
|
13706
13790
|
createHTMLBlockPlugin(),
|
|
13707
13791
|
createHTMLInlinePlugin(),
|
|
13708
13792
|
createBlockquotePlugin(),
|
|
13709
|
-
createBoldPlugin(),
|
|
13710
|
-
createItalicPlugin(),
|
|
13711
13793
|
createUnderlinePlugin(),
|
|
13712
|
-
createCodePlugin(),
|
|
13713
13794
|
createListPlugin(),
|
|
13714
13795
|
createIndentListPlugin(),
|
|
13715
13796
|
createHorizontalRulePlugin(),
|
|
@@ -14069,7 +14150,9 @@ const EMBED_ICON_WIDTH = 78;
|
|
|
14069
14150
|
const CONTAINER_MD_BREAKPOINT = 448;
|
|
14070
14151
|
const FLOAT_BUTTON_WIDTH = 25;
|
|
14071
14152
|
const HEADING_LABEL = "Headings";
|
|
14072
|
-
const ToolbarContext = createContext(
|
|
14153
|
+
const ToolbarContext = createContext(
|
|
14154
|
+
void 0
|
|
14155
|
+
);
|
|
14073
14156
|
const ToolbarProvider = ({
|
|
14074
14157
|
tinaForm,
|
|
14075
14158
|
templates,
|
|
@@ -14219,7 +14302,7 @@ const useCodeBlockToolbarButton = (state) => {
|
|
|
14219
14302
|
const CodeBlockToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
14220
14303
|
const state = useCodeBlockToolbarButtonState();
|
|
14221
14304
|
const { props } = useCodeBlockToolbarButton(state);
|
|
14222
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "
|
|
14305
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Code Block", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.codeBlock, null));
|
|
14223
14306
|
});
|
|
14224
14307
|
const useImageToolbarButtonState = () => {
|
|
14225
14308
|
const editor = useEditorState();
|
|
@@ -14251,36 +14334,54 @@ const useImageToolbarButton = (state) => {
|
|
|
14251
14334
|
const ImageToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
14252
14335
|
const state = useImageToolbarButtonState();
|
|
14253
14336
|
const { props } = useImageToolbarButton(state);
|
|
14254
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "
|
|
14255
|
-
});
|
|
14256
|
-
const IndentListToolbarButton = withRef(({ nodeType = ELEMENT_UL }, ref) => {
|
|
14257
|
-
const editor = useEditorState();
|
|
14258
|
-
const state = useListToolbarButtonState({ nodeType });
|
|
14259
|
-
const { props } = useListToolbarButton(state);
|
|
14260
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
14261
|
-
ToolbarButton,
|
|
14262
|
-
{
|
|
14263
|
-
ref,
|
|
14264
|
-
tooltip: nodeType === ELEMENT_UL ? "Bulleted List" : "Numbered List",
|
|
14265
|
-
...props,
|
|
14266
|
-
onClick: (e) => {
|
|
14267
|
-
e.preventDefault();
|
|
14268
|
-
e.stopPropagation();
|
|
14269
|
-
toggleList(editor, { type: nodeType });
|
|
14270
|
-
}
|
|
14271
|
-
},
|
|
14272
|
-
nodeType === ELEMENT_UL ? /* @__PURE__ */ React__default.createElement(Icons.ul, null) : /* @__PURE__ */ React__default.createElement(Icons.ol, null)
|
|
14273
|
-
);
|
|
14337
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Image", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.image, null));
|
|
14274
14338
|
});
|
|
14339
|
+
const UnorderedListToolbarButton = withRef(
|
|
14340
|
+
(props, ref) => {
|
|
14341
|
+
const editor = useEditorState();
|
|
14342
|
+
const state = useListToolbarButtonState({ nodeType: ELEMENT_UL });
|
|
14343
|
+
const { props: buttonProps } = useListToolbarButton(state);
|
|
14344
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
14345
|
+
ToolbarButton,
|
|
14346
|
+
{
|
|
14347
|
+
ref,
|
|
14348
|
+
tooltip: "Bulleted List",
|
|
14349
|
+
...buttonProps,
|
|
14350
|
+
onClick: (e) => {
|
|
14351
|
+
e.preventDefault();
|
|
14352
|
+
e.stopPropagation();
|
|
14353
|
+
toggleList(editor, { type: ELEMENT_UL });
|
|
14354
|
+
}
|
|
14355
|
+
},
|
|
14356
|
+
/* @__PURE__ */ React__default.createElement(Icons.ul, null)
|
|
14357
|
+
);
|
|
14358
|
+
}
|
|
14359
|
+
);
|
|
14360
|
+
const OrderedListToolbarButton = withRef(
|
|
14361
|
+
(props, ref) => {
|
|
14362
|
+
const editor = useEditorState();
|
|
14363
|
+
const state = useListToolbarButtonState({ nodeType: ELEMENT_OL });
|
|
14364
|
+
const { props: buttonProps } = useListToolbarButton(state);
|
|
14365
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
14366
|
+
ToolbarButton,
|
|
14367
|
+
{
|
|
14368
|
+
ref,
|
|
14369
|
+
tooltip: "Numbered List",
|
|
14370
|
+
...buttonProps,
|
|
14371
|
+
onClick: (e) => {
|
|
14372
|
+
e.preventDefault();
|
|
14373
|
+
e.stopPropagation();
|
|
14374
|
+
toggleList(editor, { type: ELEMENT_OL });
|
|
14375
|
+
}
|
|
14376
|
+
},
|
|
14377
|
+
/* @__PURE__ */ React__default.createElement(Icons.ol, null)
|
|
14378
|
+
);
|
|
14379
|
+
}
|
|
14380
|
+
);
|
|
14275
14381
|
const LinkToolbarButton = withRef((rest, ref) => {
|
|
14276
14382
|
const state = useLinkToolbarButtonState();
|
|
14277
14383
|
const { props } = useLinkToolbarButton(state);
|
|
14278
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link"
|
|
14279
|
-
});
|
|
14280
|
-
const MarkToolbarButton = withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14281
|
-
const state = useMarkToolbarButtonState({ clear, nodeType });
|
|
14282
|
-
const { props } = useMarkToolbarButton(state);
|
|
14283
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14384
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest, tooltip: "Link" }, /* @__PURE__ */ React__default.createElement(Icons.link, null));
|
|
14284
14385
|
});
|
|
14285
14386
|
const useMermaidToolbarButtonState = () => {
|
|
14286
14387
|
const editor = useEditorState();
|
|
@@ -14361,7 +14462,7 @@ const useBlockQuoteToolbarButton = (state) => {
|
|
|
14361
14462
|
const QuoteToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
14362
14463
|
const state = useBlockQuoteToolbarButtonState();
|
|
14363
14464
|
const { props } = useBlockQuoteToolbarButton(state);
|
|
14364
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "
|
|
14465
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Quote (⌘+⇧+.)", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.quote, null));
|
|
14365
14466
|
});
|
|
14366
14467
|
const useRawMarkdownToolbarButton = () => {
|
|
14367
14468
|
const { setRawMode } = useEditorContext();
|
|
@@ -14381,7 +14482,7 @@ const RawMarkdownToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
|
14381
14482
|
ToolbarButton,
|
|
14382
14483
|
{
|
|
14383
14484
|
ref,
|
|
14384
|
-
tooltip: "
|
|
14485
|
+
tooltip: "Raw Markdown",
|
|
14385
14486
|
...rest,
|
|
14386
14487
|
...props,
|
|
14387
14488
|
"data-testid": "markdown-button"
|
|
@@ -14526,7 +14627,7 @@ const EmbedButton = ({ editor, templates }) => {
|
|
|
14526
14627
|
key: template.name,
|
|
14527
14628
|
onMouseDown: (e) => {
|
|
14528
14629
|
e.preventDefault();
|
|
14529
|
-
|
|
14630
|
+
setOpen(false);
|
|
14530
14631
|
insertMDX(editor, template);
|
|
14531
14632
|
},
|
|
14532
14633
|
className: ""
|
|
@@ -14534,6 +14635,15 @@ const EmbedButton = ({ editor, templates }) => {
|
|
|
14534
14635
|
template.label || template.name
|
|
14535
14636
|
))));
|
|
14536
14637
|
};
|
|
14638
|
+
const MarkToolbarButton = withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14639
|
+
const state = useMarkToolbarButtonState({ clear, nodeType });
|
|
14640
|
+
const { props } = useMarkToolbarButton(state);
|
|
14641
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14642
|
+
});
|
|
14643
|
+
const BoldToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: MARK_BOLD }, /* @__PURE__ */ React__default.createElement(Icons.bold, null));
|
|
14644
|
+
const StrikethroughToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Strikethrough", nodeType: MARK_STRIKETHROUGH }, /* @__PURE__ */ React__default.createElement(Icons.strikethrough, null));
|
|
14645
|
+
const ItalicToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: MARK_ITALIC }, /* @__PURE__ */ React__default.createElement(Icons.italic, null));
|
|
14646
|
+
const CodeToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: MARK_CODE }, /* @__PURE__ */ React__default.createElement(Icons.code, null));
|
|
14537
14647
|
const toolbarItems = {
|
|
14538
14648
|
heading: {
|
|
14539
14649
|
label: HEADING_LABEL,
|
|
@@ -14554,32 +14664,37 @@ const toolbarItems = {
|
|
|
14554
14664
|
quote: {
|
|
14555
14665
|
label: "Quote",
|
|
14556
14666
|
width: () => STANDARD_ICON_WIDTH,
|
|
14557
|
-
Component: /* @__PURE__ */ React__default.createElement(QuoteToolbarButton,
|
|
14667
|
+
Component: /* @__PURE__ */ React__default.createElement(QuoteToolbarButton, null)
|
|
14558
14668
|
},
|
|
14559
14669
|
ul: {
|
|
14560
14670
|
label: "Unordered List",
|
|
14561
14671
|
width: () => STANDARD_ICON_WIDTH,
|
|
14562
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14672
|
+
Component: /* @__PURE__ */ React__default.createElement(UnorderedListToolbarButton, null)
|
|
14563
14673
|
},
|
|
14564
14674
|
ol: {
|
|
14565
14675
|
label: "Ordered List",
|
|
14566
14676
|
width: () => STANDARD_ICON_WIDTH,
|
|
14567
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14677
|
+
Component: /* @__PURE__ */ React__default.createElement(OrderedListToolbarButton, null)
|
|
14568
14678
|
},
|
|
14569
14679
|
bold: {
|
|
14570
14680
|
label: "Bold",
|
|
14571
14681
|
width: () => STANDARD_ICON_WIDTH,
|
|
14572
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14682
|
+
Component: /* @__PURE__ */ React__default.createElement(BoldToolbarButton, null)
|
|
14683
|
+
},
|
|
14684
|
+
strikethrough: {
|
|
14685
|
+
label: "Strikethrough",
|
|
14686
|
+
width: () => STANDARD_ICON_WIDTH,
|
|
14687
|
+
Component: /* @__PURE__ */ React__default.createElement(StrikethroughToolbarButton, null)
|
|
14573
14688
|
},
|
|
14574
14689
|
italic: {
|
|
14575
14690
|
label: "Italic",
|
|
14576
14691
|
width: () => STANDARD_ICON_WIDTH,
|
|
14577
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14692
|
+
Component: /* @__PURE__ */ React__default.createElement(ItalicToolbarButton, null)
|
|
14578
14693
|
},
|
|
14579
14694
|
code: {
|
|
14580
14695
|
label: "Code",
|
|
14581
14696
|
width: () => STANDARD_ICON_WIDTH,
|
|
14582
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14697
|
+
Component: /* @__PURE__ */ React__default.createElement(CodeToolbarButton, null)
|
|
14583
14698
|
},
|
|
14584
14699
|
codeBlock: {
|
|
14585
14700
|
label: "Code Block",
|
|
@@ -14612,7 +14727,12 @@ function FixedToolbarButtons() {
|
|
|
14612
14727
|
const [itemsShown, setItemsShown] = React__default.useState(11);
|
|
14613
14728
|
const { overrides, templates } = useToolbarContext();
|
|
14614
14729
|
const showEmbedButton = templates.length > 0;
|
|
14615
|
-
let items2 =
|
|
14730
|
+
let items2 = [];
|
|
14731
|
+
if (Array.isArray(overrides)) {
|
|
14732
|
+
items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14733
|
+
} else {
|
|
14734
|
+
items2 = (overrides == null ? void 0 : overrides.toolbar) === void 0 ? Object.values(toolbarItems) : overrides.toolbar.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14735
|
+
}
|
|
14616
14736
|
if (!showEmbedButton) {
|
|
14617
14737
|
items2 = items2.filter((item) => item.label !== toolbarItems.embed.label);
|
|
14618
14738
|
}
|
|
@@ -14940,6 +15060,9 @@ const isUrl = (string) => {
|
|
|
14940
15060
|
if (typeof string !== "string") {
|
|
14941
15061
|
return false;
|
|
14942
15062
|
}
|
|
15063
|
+
if (string.startsWith("#")) {
|
|
15064
|
+
return true;
|
|
15065
|
+
}
|
|
14943
15066
|
const generalMatch = string.match(protocolAndDomainRE);
|
|
14944
15067
|
const emailLinkMatch = string.match(emailLintRE);
|
|
14945
15068
|
const localUrlMatch = string.match(localUrlRE);
|
|
@@ -14961,12 +15084,12 @@ const isUrl = (string) => {
|
|
|
14961
15084
|
}
|
|
14962
15085
|
return localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol);
|
|
14963
15086
|
};
|
|
14964
|
-
const RichEditor = (
|
|
15087
|
+
const RichEditor = ({ input, tinaForm, field }) => {
|
|
14965
15088
|
var _a;
|
|
14966
15089
|
const initialValue = React__default.useMemo(
|
|
14967
15090
|
() => {
|
|
14968
15091
|
var _a2, _b;
|
|
14969
|
-
return ((_b = (_a2 =
|
|
15092
|
+
return ((_b = (_a2 = input.value) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) ? input.value.children.map(helpers.normalize) : [{ type: "p", children: [{ type: "text", text: "" }] }];
|
|
14970
15093
|
},
|
|
14971
15094
|
[]
|
|
14972
15095
|
);
|
|
@@ -14994,7 +15117,7 @@ const RichEditor = (props) => {
|
|
|
14994
15117
|
),
|
|
14995
15118
|
[]
|
|
14996
15119
|
);
|
|
14997
|
-
const tempId = [
|
|
15120
|
+
const tempId = [tinaForm.id, input.name].join(".");
|
|
14998
15121
|
const id = React__default.useMemo(() => uuid() + tempId, [tempId]);
|
|
14999
15122
|
const ref = React__default.useRef(null);
|
|
15000
15123
|
React__default.useEffect(() => {
|
|
@@ -15004,13 +15127,13 @@ const RichEditor = (props) => {
|
|
|
15004
15127
|
const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
|
|
15005
15128
|
'[role="textbox"]'
|
|
15006
15129
|
);
|
|
15007
|
-
if (
|
|
15130
|
+
if (field.experimental_focusIntent && plateElement) {
|
|
15008
15131
|
if (plateElement)
|
|
15009
15132
|
plateElement.focus();
|
|
15010
15133
|
}
|
|
15011
15134
|
}, 100);
|
|
15012
15135
|
}
|
|
15013
|
-
}, [
|
|
15136
|
+
}, [field.experimental_focusIntent, ref]);
|
|
15014
15137
|
return /* @__PURE__ */ React__default.createElement("div", { ref }, /* @__PURE__ */ React__default.createElement(
|
|
15015
15138
|
Plate,
|
|
15016
15139
|
{
|
|
@@ -15018,7 +15141,7 @@ const RichEditor = (props) => {
|
|
|
15018
15141
|
initialValue,
|
|
15019
15142
|
plugins: plugins$2,
|
|
15020
15143
|
onChange: (value) => {
|
|
15021
|
-
|
|
15144
|
+
input.onChange({
|
|
15022
15145
|
type: "root",
|
|
15023
15146
|
children: value
|
|
15024
15147
|
});
|
|
@@ -15027,12 +15150,12 @@ const RichEditor = (props) => {
|
|
|
15027
15150
|
/* @__PURE__ */ React__default.createElement(TooltipProvider, null, /* @__PURE__ */ React__default.createElement(
|
|
15028
15151
|
ToolbarProvider,
|
|
15029
15152
|
{
|
|
15030
|
-
tinaForm
|
|
15031
|
-
templates:
|
|
15032
|
-
overrides: (
|
|
15153
|
+
tinaForm,
|
|
15154
|
+
templates: field.templates,
|
|
15155
|
+
overrides: (field == null ? void 0 : field.toolbarOverride) ? field.toolbarOverride : field.overrides
|
|
15033
15156
|
},
|
|
15034
15157
|
/* @__PURE__ */ React__default.createElement(FixedToolbar, null, /* @__PURE__ */ React__default.createElement(FixedToolbarButtons, null)),
|
|
15035
|
-
/* @__PURE__ */ React__default.createElement(FloatingToolbar, null, /* @__PURE__ */ React__default.createElement(FloatingToolbarButtons, null))
|
|
15158
|
+
((_a = field == null ? void 0 : field.overrides) == null ? void 0 : _a.showFloatingToolbar) !== false ? /* @__PURE__ */ React__default.createElement(FloatingToolbar, null, /* @__PURE__ */ React__default.createElement(FloatingToolbarButtons, null)) : null
|
|
15036
15159
|
), /* @__PURE__ */ React__default.createElement(Editor, null))
|
|
15037
15160
|
));
|
|
15038
15161
|
};
|
|
@@ -16220,132 +16343,1209 @@ const ben = [
|
|
|
16220
16343
|
"হয়"
|
|
16221
16344
|
];
|
|
16222
16345
|
const bre = [
|
|
16346
|
+
"'blam",
|
|
16347
|
+
"'d",
|
|
16348
|
+
"'m",
|
|
16349
|
+
"'r",
|
|
16350
|
+
"'ta",
|
|
16351
|
+
"'vat",
|
|
16352
|
+
"'z",
|
|
16353
|
+
"'zo",
|
|
16223
16354
|
"a",
|
|
16224
|
-
"
|
|
16225
|
-
"
|
|
16226
|
-
"
|
|
16227
|
-
"
|
|
16228
|
-
"
|
|
16229
|
-
"
|
|
16230
|
-
"
|
|
16231
|
-
"
|
|
16232
|
-
"
|
|
16233
|
-
"
|
|
16234
|
-
"
|
|
16235
|
-
"
|
|
16236
|
-
"
|
|
16237
|
-
"
|
|
16238
|
-
"
|
|
16239
|
-
"
|
|
16240
|
-
"
|
|
16241
|
-
"
|
|
16242
|
-
"
|
|
16243
|
-
"
|
|
16244
|
-
"
|
|
16355
|
+
"a:",
|
|
16356
|
+
"aba",
|
|
16357
|
+
"abalamour",
|
|
16358
|
+
"abaoe",
|
|
16359
|
+
"ac'hane",
|
|
16360
|
+
"ac'hanoc'h",
|
|
16361
|
+
"ac'hanomp",
|
|
16362
|
+
"ac'hanon",
|
|
16363
|
+
"ac'hanout",
|
|
16364
|
+
"adal",
|
|
16365
|
+
"adalek",
|
|
16366
|
+
"adarre",
|
|
16367
|
+
"ae",
|
|
16368
|
+
"aec'h",
|
|
16369
|
+
"aed",
|
|
16370
|
+
"aemp",
|
|
16371
|
+
"aen",
|
|
16372
|
+
"aent",
|
|
16373
|
+
"aes",
|
|
16374
|
+
"afe",
|
|
16375
|
+
"afec'h",
|
|
16376
|
+
"afed",
|
|
16377
|
+
"afemp",
|
|
16378
|
+
"afen",
|
|
16379
|
+
"afent",
|
|
16380
|
+
"afes",
|
|
16381
|
+
"ag",
|
|
16382
|
+
"ah",
|
|
16383
|
+
"aimp",
|
|
16384
|
+
"aint",
|
|
16385
|
+
"aio",
|
|
16386
|
+
"aiou",
|
|
16387
|
+
"aje",
|
|
16388
|
+
"ajec'h",
|
|
16389
|
+
"ajed",
|
|
16390
|
+
"ajemp",
|
|
16391
|
+
"ajen",
|
|
16392
|
+
"ajent",
|
|
16393
|
+
"ajes",
|
|
16394
|
+
"al",
|
|
16395
|
+
"alato",
|
|
16396
|
+
"alies",
|
|
16397
|
+
"aliesañ",
|
|
16398
|
+
"alkent",
|
|
16399
|
+
"all",
|
|
16400
|
+
"allas",
|
|
16401
|
+
"allo",
|
|
16402
|
+
"allô",
|
|
16403
|
+
"am",
|
|
16404
|
+
"amañ",
|
|
16405
|
+
"amzer",
|
|
16406
|
+
"an",
|
|
16407
|
+
"anezhañ",
|
|
16408
|
+
"anezhe",
|
|
16409
|
+
"anezhi",
|
|
16410
|
+
"anezho",
|
|
16411
|
+
"anvet",
|
|
16412
|
+
"aon",
|
|
16413
|
+
"aotren",
|
|
16414
|
+
"ar",
|
|
16415
|
+
"arall",
|
|
16416
|
+
"araok",
|
|
16417
|
+
"araoki",
|
|
16418
|
+
"araozañ",
|
|
16419
|
+
"araozo",
|
|
16420
|
+
"araozoc'h",
|
|
16421
|
+
"araozomp",
|
|
16422
|
+
"araozon",
|
|
16423
|
+
"araozor",
|
|
16424
|
+
"araozout",
|
|
16425
|
+
"arbenn",
|
|
16426
|
+
"arre",
|
|
16427
|
+
"atalek",
|
|
16428
|
+
"atav",
|
|
16429
|
+
"az",
|
|
16430
|
+
"azalek",
|
|
16431
|
+
"azirazañ",
|
|
16432
|
+
"azirazi",
|
|
16433
|
+
"azirazo",
|
|
16434
|
+
"azirazoc'h",
|
|
16435
|
+
"azirazomp",
|
|
16436
|
+
"azirazon",
|
|
16437
|
+
"azirazor",
|
|
16438
|
+
"azirazout",
|
|
16439
|
+
"b:",
|
|
16440
|
+
"ba",
|
|
16441
|
+
"ba'l",
|
|
16442
|
+
"ba'n",
|
|
16443
|
+
"ba'r",
|
|
16444
|
+
"bad",
|
|
16445
|
+
"bah",
|
|
16446
|
+
"bal",
|
|
16447
|
+
"ban",
|
|
16448
|
+
"bar",
|
|
16449
|
+
"bastañ",
|
|
16450
|
+
"befe",
|
|
16451
|
+
"bell",
|
|
16452
|
+
"benaos",
|
|
16453
|
+
"benn",
|
|
16454
|
+
"bennag",
|
|
16455
|
+
"bennak",
|
|
16456
|
+
"bennozh",
|
|
16457
|
+
"bep",
|
|
16458
|
+
"bepred",
|
|
16459
|
+
"berr",
|
|
16460
|
+
"berzh",
|
|
16461
|
+
"bet",
|
|
16462
|
+
"betek",
|
|
16463
|
+
"betra",
|
|
16464
|
+
"bev",
|
|
16465
|
+
"bevet",
|
|
16466
|
+
"bez",
|
|
16467
|
+
"bezañ",
|
|
16468
|
+
"beze",
|
|
16469
|
+
"bezent",
|
|
16470
|
+
"bezet",
|
|
16471
|
+
"bezh",
|
|
16472
|
+
"bezit",
|
|
16473
|
+
"bezomp",
|
|
16474
|
+
"bihan",
|
|
16475
|
+
"bije",
|
|
16476
|
+
"biou",
|
|
16477
|
+
"biskoazh",
|
|
16478
|
+
"blam",
|
|
16479
|
+
"bo",
|
|
16480
|
+
"boa",
|
|
16481
|
+
"bominapl",
|
|
16482
|
+
"boudoudom",
|
|
16483
|
+
"bouez",
|
|
16484
|
+
"boull",
|
|
16485
|
+
"boum",
|
|
16486
|
+
"bout",
|
|
16487
|
+
"bras",
|
|
16488
|
+
"brasañ",
|
|
16489
|
+
"brav",
|
|
16490
|
+
"bravo",
|
|
16491
|
+
"bremañ",
|
|
16492
|
+
"bres",
|
|
16493
|
+
"brokenn",
|
|
16494
|
+
"bronn",
|
|
16495
|
+
"brrr",
|
|
16496
|
+
"brutal",
|
|
16497
|
+
"buhezek",
|
|
16498
|
+
"c'h:",
|
|
16499
|
+
"c'haout",
|
|
16500
|
+
"c'he",
|
|
16501
|
+
"c'hem",
|
|
16502
|
+
"c'herz",
|
|
16503
|
+
"c'heñver",
|
|
16504
|
+
"c'hichen",
|
|
16505
|
+
"c'hiz",
|
|
16506
|
+
"c'hoazh",
|
|
16507
|
+
"c'horre",
|
|
16508
|
+
"c'houde",
|
|
16509
|
+
"c'houst",
|
|
16510
|
+
"c'hreiz",
|
|
16511
|
+
"c'hwec'h",
|
|
16512
|
+
"c'hwec'hvet",
|
|
16513
|
+
"c'hwezek",
|
|
16514
|
+
"c'hwi",
|
|
16515
|
+
"ch:",
|
|
16516
|
+
"chaous",
|
|
16517
|
+
"chik",
|
|
16518
|
+
"chit",
|
|
16519
|
+
"chom",
|
|
16520
|
+
"chut",
|
|
16521
|
+
"d'",
|
|
16522
|
+
"d'al",
|
|
16523
|
+
"d'an",
|
|
16524
|
+
"d'ar",
|
|
16525
|
+
"d'az",
|
|
16526
|
+
"d'e",
|
|
16527
|
+
"d'he",
|
|
16528
|
+
"d'ho",
|
|
16529
|
+
"d'hol",
|
|
16530
|
+
"d'hon",
|
|
16531
|
+
"d'hor",
|
|
16532
|
+
"d'o",
|
|
16533
|
+
"d'ober",
|
|
16534
|
+
"d'ul",
|
|
16535
|
+
"d'un",
|
|
16536
|
+
"d'ur",
|
|
16537
|
+
"d:",
|
|
16245
16538
|
"da",
|
|
16246
|
-
"
|
|
16247
|
-
"
|
|
16248
|
-
"
|
|
16249
|
-
"
|
|
16250
|
-
"
|
|
16251
|
-
"
|
|
16252
|
-
"
|
|
16253
|
-
"
|
|
16254
|
-
"
|
|
16255
|
-
"
|
|
16256
|
-
"
|
|
16257
|
-
"
|
|
16258
|
-
"
|
|
16259
|
-
"
|
|
16260
|
-
"
|
|
16539
|
+
"dak",
|
|
16540
|
+
"daka",
|
|
16541
|
+
"dal",
|
|
16542
|
+
"dalbezh",
|
|
16543
|
+
"dalc'hmat",
|
|
16544
|
+
"dalit",
|
|
16545
|
+
"damdost",
|
|
16546
|
+
"damheñvel",
|
|
16547
|
+
"damm",
|
|
16548
|
+
"dan",
|
|
16549
|
+
"danvez",
|
|
16550
|
+
"dao",
|
|
16551
|
+
"daol",
|
|
16552
|
+
"daonet",
|
|
16553
|
+
"daou",
|
|
16554
|
+
"daoust",
|
|
16555
|
+
"daouzek",
|
|
16556
|
+
"daouzekvet",
|
|
16557
|
+
"darn",
|
|
16558
|
+
"dastrewiñ",
|
|
16559
|
+
"dav",
|
|
16560
|
+
"davedoc'h",
|
|
16561
|
+
"davedomp",
|
|
16562
|
+
"davedon",
|
|
16563
|
+
"davedor",
|
|
16564
|
+
"davedout",
|
|
16565
|
+
"davet",
|
|
16566
|
+
"davetañ",
|
|
16567
|
+
"davete",
|
|
16568
|
+
"daveti",
|
|
16569
|
+
"daveto",
|
|
16570
|
+
"defe",
|
|
16571
|
+
"dehou",
|
|
16572
|
+
"dek",
|
|
16573
|
+
"dekvet",
|
|
16574
|
+
"den",
|
|
16575
|
+
"deoc'h",
|
|
16576
|
+
"deomp",
|
|
16577
|
+
"deor",
|
|
16578
|
+
"derc'hel",
|
|
16579
|
+
"deus",
|
|
16580
|
+
"dez",
|
|
16581
|
+
"deze",
|
|
16582
|
+
"dezhañ",
|
|
16583
|
+
"dezhe",
|
|
16584
|
+
"dezhi",
|
|
16585
|
+
"dezho",
|
|
16586
|
+
"di",
|
|
16587
|
+
"diabarzh",
|
|
16588
|
+
"diagent",
|
|
16589
|
+
"diar",
|
|
16590
|
+
"diaraok",
|
|
16591
|
+
"diavaez",
|
|
16592
|
+
"dibaoe",
|
|
16593
|
+
"dibaot",
|
|
16594
|
+
"dibar",
|
|
16595
|
+
"dic'halañ",
|
|
16596
|
+
"didiac'h",
|
|
16597
|
+
"dienn",
|
|
16598
|
+
"difer",
|
|
16599
|
+
"diganeoc'h",
|
|
16600
|
+
"diganeomp",
|
|
16601
|
+
"diganeor",
|
|
16602
|
+
"diganimp",
|
|
16603
|
+
"diganin",
|
|
16604
|
+
"diganit",
|
|
16605
|
+
"digant",
|
|
16606
|
+
"digantañ",
|
|
16607
|
+
"digante",
|
|
16608
|
+
"diganti",
|
|
16609
|
+
"diganto",
|
|
16610
|
+
"digemmesk",
|
|
16611
|
+
"diget",
|
|
16612
|
+
"digor",
|
|
16613
|
+
"digoret",
|
|
16614
|
+
"dija",
|
|
16615
|
+
"dije",
|
|
16616
|
+
"dimp",
|
|
16617
|
+
"din",
|
|
16618
|
+
"dinaou",
|
|
16619
|
+
"dindan",
|
|
16620
|
+
"dindanañ",
|
|
16621
|
+
"dindani",
|
|
16622
|
+
"dindano",
|
|
16623
|
+
"dindanoc'h",
|
|
16624
|
+
"dindanomp",
|
|
16625
|
+
"dindanon",
|
|
16626
|
+
"dindanor",
|
|
16627
|
+
"dindanout",
|
|
16628
|
+
"dioutañ",
|
|
16629
|
+
"dioute",
|
|
16630
|
+
"diouti",
|
|
16631
|
+
"diouto",
|
|
16632
|
+
"diouzh",
|
|
16633
|
+
"diouzhin",
|
|
16634
|
+
"diouzhit",
|
|
16635
|
+
"diouzhoc'h",
|
|
16636
|
+
"diouzhomp",
|
|
16637
|
+
"diouzhor",
|
|
16638
|
+
"dirak",
|
|
16639
|
+
"dirazañ",
|
|
16640
|
+
"dirazi",
|
|
16641
|
+
"dirazo",
|
|
16642
|
+
"dirazoc'h",
|
|
16643
|
+
"dirazomp",
|
|
16644
|
+
"dirazon",
|
|
16645
|
+
"dirazor",
|
|
16646
|
+
"dirazout",
|
|
16647
|
+
"disheñvel",
|
|
16648
|
+
"dispar",
|
|
16649
|
+
"distank",
|
|
16650
|
+
"dister",
|
|
16651
|
+
"disterañ",
|
|
16652
|
+
"disterig",
|
|
16653
|
+
"distro",
|
|
16654
|
+
"dit",
|
|
16655
|
+
"divaez",
|
|
16656
|
+
"diwar",
|
|
16657
|
+
"diwezhat",
|
|
16658
|
+
"diwezhañ",
|
|
16261
16659
|
"do",
|
|
16262
|
-
"
|
|
16263
|
-
"
|
|
16660
|
+
"doa",
|
|
16661
|
+
"doare",
|
|
16662
|
+
"dont",
|
|
16663
|
+
"dost",
|
|
16664
|
+
"doue",
|
|
16665
|
+
"douetus",
|
|
16666
|
+
"douez",
|
|
16667
|
+
"doug",
|
|
16668
|
+
"draou",
|
|
16669
|
+
"draoñ",
|
|
16670
|
+
"dre",
|
|
16671
|
+
"drede",
|
|
16672
|
+
"dreist",
|
|
16673
|
+
"dreistañ",
|
|
16674
|
+
"dreisti",
|
|
16675
|
+
"dreisto",
|
|
16676
|
+
"dreistoc'h",
|
|
16677
|
+
"dreistomp",
|
|
16678
|
+
"dreiston",
|
|
16679
|
+
"dreistor",
|
|
16680
|
+
"dreistout",
|
|
16681
|
+
"drek",
|
|
16682
|
+
"dreñv",
|
|
16683
|
+
"dring",
|
|
16684
|
+
"dro",
|
|
16685
|
+
"du",
|
|
16264
16686
|
"e",
|
|
16265
|
-
"
|
|
16266
|
-
"
|
|
16267
|
-
"
|
|
16268
|
-
"
|
|
16687
|
+
"e:",
|
|
16688
|
+
"eas",
|
|
16689
|
+
"ebet",
|
|
16690
|
+
"ec'h",
|
|
16691
|
+
"edo",
|
|
16692
|
+
"edoc'h",
|
|
16693
|
+
"edod",
|
|
16694
|
+
"edomp",
|
|
16695
|
+
"edon",
|
|
16696
|
+
"edont",
|
|
16697
|
+
"edos",
|
|
16698
|
+
"eer",
|
|
16699
|
+
"eeun",
|
|
16700
|
+
"efed",
|
|
16701
|
+
"egedoc'h",
|
|
16702
|
+
"egedomp",
|
|
16703
|
+
"egedon",
|
|
16704
|
+
"egedor",
|
|
16705
|
+
"egedout",
|
|
16706
|
+
"eget",
|
|
16707
|
+
"egetañ",
|
|
16708
|
+
"egete",
|
|
16709
|
+
"egeti",
|
|
16710
|
+
"egeto",
|
|
16711
|
+
"eh",
|
|
16712
|
+
"eil",
|
|
16713
|
+
"eilvet",
|
|
16714
|
+
"eizh",
|
|
16715
|
+
"eizhvet",
|
|
16716
|
+
"ejoc'h",
|
|
16717
|
+
"ejod",
|
|
16718
|
+
"ejomp",
|
|
16719
|
+
"ejont",
|
|
16720
|
+
"ejout",
|
|
16721
|
+
"el",
|
|
16269
16722
|
"em",
|
|
16270
|
-
"
|
|
16271
|
-
"
|
|
16272
|
-
"
|
|
16273
|
-
"
|
|
16274
|
-
"
|
|
16275
|
-
"
|
|
16276
|
-
"
|
|
16277
|
-
"
|
|
16278
|
-
"
|
|
16279
|
-
"
|
|
16723
|
+
"emaint",
|
|
16724
|
+
"emaoc'h",
|
|
16725
|
+
"emaomp",
|
|
16726
|
+
"emaon",
|
|
16727
|
+
"emaout",
|
|
16728
|
+
"emañ",
|
|
16729
|
+
"eme",
|
|
16730
|
+
"emeur",
|
|
16731
|
+
"emezañ",
|
|
16732
|
+
"emezi",
|
|
16733
|
+
"emezo",
|
|
16734
|
+
"emezoc'h",
|
|
16735
|
+
"emezomp",
|
|
16736
|
+
"emezon",
|
|
16737
|
+
"emezout",
|
|
16738
|
+
"emporzhiañ",
|
|
16739
|
+
"en",
|
|
16740
|
+
"end",
|
|
16741
|
+
"endan",
|
|
16742
|
+
"endra",
|
|
16743
|
+
"enep",
|
|
16744
|
+
"ennañ",
|
|
16745
|
+
"enni",
|
|
16746
|
+
"enno",
|
|
16747
|
+
"ennoc'h",
|
|
16748
|
+
"ennomp",
|
|
16749
|
+
"ennon",
|
|
16750
|
+
"ennor",
|
|
16751
|
+
"ennout",
|
|
16752
|
+
"enta",
|
|
16753
|
+
"eo",
|
|
16754
|
+
"eomp",
|
|
16755
|
+
"eont",
|
|
16756
|
+
"eor",
|
|
16757
|
+
"eot",
|
|
16758
|
+
"er",
|
|
16759
|
+
"erbet",
|
|
16760
|
+
"erfin",
|
|
16761
|
+
"esa",
|
|
16762
|
+
"esae",
|
|
16763
|
+
"espar",
|
|
16764
|
+
"estlamm",
|
|
16765
|
+
"estrañj",
|
|
16766
|
+
"eta",
|
|
16767
|
+
"etre",
|
|
16768
|
+
"etreoc'h",
|
|
16769
|
+
"etrezo",
|
|
16770
|
+
"etrezoc'h",
|
|
16771
|
+
"etrezomp",
|
|
16772
|
+
"etrezor",
|
|
16773
|
+
"euh",
|
|
16774
|
+
"eur",
|
|
16775
|
+
"eus",
|
|
16776
|
+
"evel",
|
|
16777
|
+
"evelato",
|
|
16778
|
+
"eveldoc'h",
|
|
16779
|
+
"eveldomp",
|
|
16780
|
+
"eveldon",
|
|
16781
|
+
"eveldor",
|
|
16782
|
+
"eveldout",
|
|
16783
|
+
"evelkent",
|
|
16784
|
+
"eveltañ",
|
|
16785
|
+
"evelte",
|
|
16786
|
+
"evelti",
|
|
16787
|
+
"evelto",
|
|
16788
|
+
"evidoc'h",
|
|
16789
|
+
"evidomp",
|
|
16790
|
+
"evidon",
|
|
16791
|
+
"evidor",
|
|
16792
|
+
"evidout",
|
|
16793
|
+
"evit",
|
|
16794
|
+
"evitañ",
|
|
16795
|
+
"evite",
|
|
16796
|
+
"eviti",
|
|
16797
|
+
"evito",
|
|
16798
|
+
"ez",
|
|
16799
|
+
"eñ",
|
|
16800
|
+
"f:",
|
|
16801
|
+
"fac'h",
|
|
16802
|
+
"fall",
|
|
16803
|
+
"fed",
|
|
16804
|
+
"feiz",
|
|
16805
|
+
"fenn",
|
|
16806
|
+
"fezh",
|
|
16807
|
+
"fin",
|
|
16808
|
+
"finsalvet",
|
|
16809
|
+
"foei",
|
|
16810
|
+
"fouilhezañ",
|
|
16811
|
+
"g:",
|
|
16812
|
+
"gallout",
|
|
16813
|
+
"ganeoc'h",
|
|
16814
|
+
"ganeomp",
|
|
16815
|
+
"ganin",
|
|
16816
|
+
"ganit",
|
|
16817
|
+
"gant",
|
|
16818
|
+
"gantañ",
|
|
16819
|
+
"ganti",
|
|
16820
|
+
"ganto",
|
|
16821
|
+
"gaout",
|
|
16822
|
+
"gast",
|
|
16823
|
+
"gein",
|
|
16824
|
+
"gellout",
|
|
16825
|
+
"genndost",
|
|
16826
|
+
"gentañ",
|
|
16827
|
+
"ger",
|
|
16828
|
+
"gerz",
|
|
16829
|
+
"get",
|
|
16830
|
+
"geñver",
|
|
16831
|
+
"gichen",
|
|
16832
|
+
"gin",
|
|
16833
|
+
"giz",
|
|
16834
|
+
"glan",
|
|
16835
|
+
"gloev",
|
|
16836
|
+
"goll",
|
|
16837
|
+
"gorre",
|
|
16838
|
+
"goude",
|
|
16839
|
+
"gouez",
|
|
16840
|
+
"gouezit",
|
|
16841
|
+
"gouezomp",
|
|
16842
|
+
"goulz",
|
|
16843
|
+
"gounnar",
|
|
16844
|
+
"gour",
|
|
16845
|
+
"goust",
|
|
16846
|
+
"gouze",
|
|
16847
|
+
"gouzout",
|
|
16848
|
+
"gra",
|
|
16849
|
+
"grak",
|
|
16850
|
+
"grec'h",
|
|
16851
|
+
"greiz",
|
|
16852
|
+
"grenn",
|
|
16853
|
+
"greomp",
|
|
16854
|
+
"grit",
|
|
16855
|
+
"groñs",
|
|
16856
|
+
"gutez",
|
|
16857
|
+
"gwall",
|
|
16858
|
+
"gwashoc'h",
|
|
16859
|
+
"gwazh",
|
|
16860
|
+
"gwech",
|
|
16861
|
+
"gwechall",
|
|
16862
|
+
"gwechoù",
|
|
16863
|
+
"gwell",
|
|
16864
|
+
"gwezh",
|
|
16865
|
+
"gwezhall",
|
|
16866
|
+
"gwezharall",
|
|
16867
|
+
"gwezhoù",
|
|
16868
|
+
"gwig",
|
|
16869
|
+
"gwirionez",
|
|
16870
|
+
"gwitibunan",
|
|
16871
|
+
"gêr",
|
|
16872
|
+
"h:",
|
|
16280
16873
|
"ha",
|
|
16281
|
-
"
|
|
16282
|
-
"
|
|
16283
|
-
"
|
|
16284
|
-
"
|
|
16285
|
-
"
|
|
16286
|
-
"
|
|
16287
|
-
"
|
|
16288
|
-
"
|
|
16289
|
-
"
|
|
16290
|
-
"
|
|
16291
|
-
"
|
|
16874
|
+
"hag",
|
|
16875
|
+
"han",
|
|
16876
|
+
"hanter",
|
|
16877
|
+
"hanterc'hantad",
|
|
16878
|
+
"hanterkantved",
|
|
16879
|
+
"harz",
|
|
16880
|
+
"hañ",
|
|
16881
|
+
"hañval",
|
|
16882
|
+
"he",
|
|
16883
|
+
"hebioù",
|
|
16884
|
+
"hec'h",
|
|
16885
|
+
"hei",
|
|
16886
|
+
"hein",
|
|
16887
|
+
"hem",
|
|
16888
|
+
"hemañ",
|
|
16889
|
+
"hen",
|
|
16890
|
+
"hend",
|
|
16891
|
+
"henhont",
|
|
16892
|
+
"henn",
|
|
16893
|
+
"hennezh",
|
|
16894
|
+
"hent",
|
|
16895
|
+
"hep",
|
|
16896
|
+
"hervez",
|
|
16897
|
+
"hervezañ",
|
|
16898
|
+
"hervezi",
|
|
16899
|
+
"hervezo",
|
|
16900
|
+
"hervezoc'h",
|
|
16901
|
+
"hervezomp",
|
|
16902
|
+
"hervezon",
|
|
16903
|
+
"hervezor",
|
|
16904
|
+
"hervezout",
|
|
16905
|
+
"heul",
|
|
16906
|
+
"heuliañ",
|
|
16907
|
+
"hevelep",
|
|
16908
|
+
"heverk",
|
|
16909
|
+
"heñvel",
|
|
16910
|
+
"heñvelat",
|
|
16911
|
+
"heñvelañ",
|
|
16912
|
+
"heñveliñ",
|
|
16913
|
+
"heñveloc'h",
|
|
16914
|
+
"heñvelout",
|
|
16915
|
+
"hi",
|
|
16916
|
+
"hilh",
|
|
16917
|
+
"hini",
|
|
16918
|
+
"hirie",
|
|
16919
|
+
"hirio",
|
|
16920
|
+
"hiziv",
|
|
16921
|
+
"hiziviken",
|
|
16922
|
+
"ho",
|
|
16923
|
+
"hoaliñ",
|
|
16924
|
+
"hoc'h",
|
|
16925
|
+
"hogen",
|
|
16926
|
+
"hogos",
|
|
16927
|
+
"hogozik",
|
|
16928
|
+
"hol",
|
|
16929
|
+
"holl",
|
|
16930
|
+
"holà",
|
|
16931
|
+
"homañ",
|
|
16932
|
+
"hon",
|
|
16933
|
+
"honhont",
|
|
16934
|
+
"honnezh",
|
|
16935
|
+
"hont",
|
|
16936
|
+
"hop",
|
|
16937
|
+
"hopala",
|
|
16938
|
+
"hor",
|
|
16939
|
+
"hou",
|
|
16940
|
+
"houp",
|
|
16941
|
+
"hudu",
|
|
16942
|
+
"hue",
|
|
16943
|
+
"hui",
|
|
16944
|
+
"hum",
|
|
16945
|
+
"hurrah",
|
|
16946
|
+
"i",
|
|
16947
|
+
"i:",
|
|
16948
|
+
"in",
|
|
16949
|
+
"int",
|
|
16950
|
+
"is",
|
|
16951
|
+
"ispisial",
|
|
16952
|
+
"isurzhiet",
|
|
16953
|
+
"it",
|
|
16954
|
+
"ivez",
|
|
16955
|
+
"izelañ",
|
|
16956
|
+
"j:",
|
|
16957
|
+
"just",
|
|
16958
|
+
"k:",
|
|
16959
|
+
"kae",
|
|
16960
|
+
"kaer",
|
|
16961
|
+
"kalon",
|
|
16962
|
+
"kalz",
|
|
16963
|
+
"kant",
|
|
16964
|
+
"kaout",
|
|
16965
|
+
"kar",
|
|
16966
|
+
"kazi",
|
|
16967
|
+
"keid",
|
|
16968
|
+
"kein",
|
|
16969
|
+
"keit",
|
|
16970
|
+
"kel",
|
|
16971
|
+
"kellies",
|
|
16972
|
+
"keloù",
|
|
16973
|
+
"kement",
|
|
16974
|
+
"ken",
|
|
16975
|
+
"kenkent",
|
|
16976
|
+
"kenkoulz",
|
|
16977
|
+
"kenment",
|
|
16978
|
+
"kent",
|
|
16979
|
+
"kentañ",
|
|
16980
|
+
"kentizh",
|
|
16981
|
+
"kentoc'h",
|
|
16982
|
+
"kentre",
|
|
16983
|
+
"ker",
|
|
16984
|
+
"kerkent",
|
|
16985
|
+
"kerz",
|
|
16986
|
+
"kerzh",
|
|
16987
|
+
"ket",
|
|
16988
|
+
"keta",
|
|
16989
|
+
"keñver",
|
|
16990
|
+
"keñverel",
|
|
16991
|
+
"keñverius",
|
|
16992
|
+
"kichen",
|
|
16993
|
+
"kichenik",
|
|
16994
|
+
"kit",
|
|
16995
|
+
"kiz",
|
|
16996
|
+
"klak",
|
|
16997
|
+
"klek",
|
|
16998
|
+
"klik",
|
|
16999
|
+
"komprenet",
|
|
17000
|
+
"komz",
|
|
17001
|
+
"kont",
|
|
17002
|
+
"korf",
|
|
17003
|
+
"korre",
|
|
17004
|
+
"koulskoude",
|
|
17005
|
+
"koulz",
|
|
17006
|
+
"koust",
|
|
17007
|
+
"krak",
|
|
17008
|
+
"krampouezh",
|
|
17009
|
+
"krec'h",
|
|
17010
|
+
"kreiz",
|
|
17011
|
+
"kuit",
|
|
17012
|
+
"kwir",
|
|
17013
|
+
"l:",
|
|
17014
|
+
"la",
|
|
17015
|
+
"laez",
|
|
17016
|
+
"laoskel",
|
|
17017
|
+
"laouen",
|
|
17018
|
+
"lavar",
|
|
17019
|
+
"lavaret",
|
|
17020
|
+
"lavarout",
|
|
17021
|
+
"lec'h",
|
|
17022
|
+
"lein",
|
|
17023
|
+
"leizh",
|
|
17024
|
+
"lerc'h",
|
|
17025
|
+
"leun",
|
|
17026
|
+
"leuskel",
|
|
17027
|
+
"lew",
|
|
17028
|
+
"lies",
|
|
17029
|
+
"liesañ",
|
|
17030
|
+
"lod",
|
|
17031
|
+
"lusk",
|
|
17032
|
+
"lâr",
|
|
17033
|
+
"lârout",
|
|
17034
|
+
"m:",
|
|
17035
|
+
"ma",
|
|
17036
|
+
"ma'z",
|
|
17037
|
+
"mac'h",
|
|
17038
|
+
"mac'hat",
|
|
17039
|
+
"mac'hañ",
|
|
17040
|
+
"mac'hoc'h",
|
|
17041
|
+
"mad",
|
|
17042
|
+
"maez",
|
|
17043
|
+
"maksimal",
|
|
17044
|
+
"mann",
|
|
17045
|
+
"mar",
|
|
17046
|
+
"mard",
|
|
17047
|
+
"marg",
|
|
17048
|
+
"marzh",
|
|
17049
|
+
"mat",
|
|
17050
|
+
"mañ",
|
|
17051
|
+
"me",
|
|
17052
|
+
"memes",
|
|
17053
|
+
"memestra",
|
|
17054
|
+
"merkapl",
|
|
17055
|
+
"mersi",
|
|
17056
|
+
"mes",
|
|
17057
|
+
"mesk",
|
|
17058
|
+
"met",
|
|
17059
|
+
"meur",
|
|
17060
|
+
"mil",
|
|
17061
|
+
"minimal",
|
|
17062
|
+
"moan",
|
|
17063
|
+
"moaniaat",
|
|
17064
|
+
"mod",
|
|
17065
|
+
"mont",
|
|
17066
|
+
"mout",
|
|
17067
|
+
"mui",
|
|
17068
|
+
"muiañ",
|
|
17069
|
+
"muioc'h",
|
|
17070
|
+
"n",
|
|
17071
|
+
"n'",
|
|
17072
|
+
"n:",
|
|
16292
17073
|
"na",
|
|
16293
|
-
"
|
|
16294
|
-
"
|
|
16295
|
-
"
|
|
16296
|
-
"
|
|
16297
|
-
"
|
|
16298
|
-
"
|
|
17074
|
+
"nag",
|
|
17075
|
+
"naontek",
|
|
17076
|
+
"naturel",
|
|
17077
|
+
"nav",
|
|
17078
|
+
"navet",
|
|
17079
|
+
"ne",
|
|
17080
|
+
"nebeudig",
|
|
17081
|
+
"nebeut",
|
|
17082
|
+
"nebeutañ",
|
|
17083
|
+
"nebeutoc'h",
|
|
17084
|
+
"neketa",
|
|
17085
|
+
"nemedoc'h",
|
|
17086
|
+
"nemedomp",
|
|
17087
|
+
"nemedon",
|
|
17088
|
+
"nemedor",
|
|
17089
|
+
"nemedout",
|
|
17090
|
+
"nemet",
|
|
17091
|
+
"nemetañ",
|
|
17092
|
+
"nemete",
|
|
17093
|
+
"nemeti",
|
|
17094
|
+
"nemeto",
|
|
17095
|
+
"nemeur",
|
|
17096
|
+
"neoac'h",
|
|
17097
|
+
"nepell",
|
|
17098
|
+
"nerzh",
|
|
17099
|
+
"nes",
|
|
17100
|
+
"neseser",
|
|
17101
|
+
"netra",
|
|
17102
|
+
"neubeudoù",
|
|
17103
|
+
"neuhe",
|
|
17104
|
+
"neuze",
|
|
17105
|
+
"nevez",
|
|
17106
|
+
"newazh",
|
|
17107
|
+
"nez",
|
|
17108
|
+
"ni",
|
|
17109
|
+
"nikun",
|
|
17110
|
+
"niverus",
|
|
17111
|
+
"nul",
|
|
16299
17112
|
"o",
|
|
16300
|
-
"
|
|
16301
|
-
"
|
|
16302
|
-
"
|
|
16303
|
-
"
|
|
16304
|
-
"
|
|
16305
|
-
"
|
|
16306
|
-
"
|
|
16307
|
-
"
|
|
16308
|
-
"
|
|
16309
|
-
"
|
|
16310
|
-
"
|
|
16311
|
-
"
|
|
16312
|
-
"
|
|
16313
|
-
"
|
|
16314
|
-
"
|
|
16315
|
-
"
|
|
16316
|
-
"
|
|
16317
|
-
"
|
|
16318
|
-
"
|
|
16319
|
-
"
|
|
16320
|
-
"
|
|
16321
|
-
"
|
|
16322
|
-
"
|
|
16323
|
-
"
|
|
17113
|
+
"o:",
|
|
17114
|
+
"oa",
|
|
17115
|
+
"oac'h",
|
|
17116
|
+
"oad",
|
|
17117
|
+
"oamp",
|
|
17118
|
+
"oan",
|
|
17119
|
+
"oant",
|
|
17120
|
+
"oar",
|
|
17121
|
+
"oas",
|
|
17122
|
+
"ober",
|
|
17123
|
+
"oc'h",
|
|
17124
|
+
"oc'ho",
|
|
17125
|
+
"oc'hola",
|
|
17126
|
+
"oc'hpenn",
|
|
17127
|
+
"oh",
|
|
17128
|
+
"ohe",
|
|
17129
|
+
"ollé",
|
|
17130
|
+
"olole",
|
|
17131
|
+
"olé",
|
|
17132
|
+
"omp",
|
|
17133
|
+
"on",
|
|
17134
|
+
"ordin",
|
|
17135
|
+
"ordinal",
|
|
17136
|
+
"ouejoc'h",
|
|
17137
|
+
"ouejod",
|
|
17138
|
+
"ouejomp",
|
|
17139
|
+
"ouejont",
|
|
17140
|
+
"ouejout",
|
|
17141
|
+
"ouek",
|
|
17142
|
+
"ouezas",
|
|
17143
|
+
"ouezi",
|
|
17144
|
+
"ouezimp",
|
|
17145
|
+
"ouezin",
|
|
17146
|
+
"ouezint",
|
|
17147
|
+
"ouezis",
|
|
17148
|
+
"ouezo",
|
|
17149
|
+
"ouezoc'h",
|
|
17150
|
+
"ouezor",
|
|
17151
|
+
"ouf",
|
|
17152
|
+
"oufe",
|
|
17153
|
+
"oufec'h",
|
|
17154
|
+
"oufed",
|
|
17155
|
+
"oufemp",
|
|
17156
|
+
"oufen",
|
|
17157
|
+
"oufent",
|
|
17158
|
+
"oufes",
|
|
17159
|
+
"ouie",
|
|
17160
|
+
"ouiec'h",
|
|
17161
|
+
"ouied",
|
|
17162
|
+
"ouiemp",
|
|
17163
|
+
"ouien",
|
|
17164
|
+
"ouient",
|
|
17165
|
+
"ouies",
|
|
17166
|
+
"ouije",
|
|
17167
|
+
"ouijec'h",
|
|
17168
|
+
"ouijed",
|
|
17169
|
+
"ouijemp",
|
|
17170
|
+
"ouijen",
|
|
17171
|
+
"ouijent",
|
|
17172
|
+
"ouijes",
|
|
17173
|
+
"out",
|
|
17174
|
+
"outañ",
|
|
17175
|
+
"outi",
|
|
17176
|
+
"outo",
|
|
17177
|
+
"ouzer",
|
|
17178
|
+
"ouzh",
|
|
17179
|
+
"ouzhin",
|
|
17180
|
+
"ouzhit",
|
|
17181
|
+
"ouzhoc'h",
|
|
17182
|
+
"ouzhomp",
|
|
17183
|
+
"ouzhor",
|
|
17184
|
+
"ouzhpenn",
|
|
17185
|
+
"ouzhpennik",
|
|
17186
|
+
"ouzoc'h",
|
|
17187
|
+
"ouzomp",
|
|
17188
|
+
"ouzon",
|
|
17189
|
+
"ouzont",
|
|
17190
|
+
"ouzout",
|
|
17191
|
+
"p'",
|
|
17192
|
+
"p:",
|
|
17193
|
+
"pa",
|
|
17194
|
+
"pad",
|
|
17195
|
+
"padal",
|
|
17196
|
+
"paf",
|
|
17197
|
+
"pan",
|
|
17198
|
+
"panevedeoc'h",
|
|
17199
|
+
"panevedo",
|
|
17200
|
+
"panevedomp",
|
|
17201
|
+
"panevedon",
|
|
17202
|
+
"panevedout",
|
|
17203
|
+
"panevet",
|
|
17204
|
+
"panevetañ",
|
|
17205
|
+
"paneveti",
|
|
17206
|
+
"pas",
|
|
17207
|
+
"paseet",
|
|
17208
|
+
"pe",
|
|
17209
|
+
"peadra",
|
|
17210
|
+
"peder",
|
|
17211
|
+
"pedervet",
|
|
17212
|
+
"pedervetvet",
|
|
17213
|
+
"pefe",
|
|
17214
|
+
"pegeit",
|
|
17215
|
+
"pegement",
|
|
17216
|
+
"pegen",
|
|
17217
|
+
"pegiz",
|
|
17218
|
+
"pegoulz",
|
|
17219
|
+
"pehini",
|
|
17220
|
+
"pelec'h",
|
|
17221
|
+
"pell",
|
|
17222
|
+
"pemod",
|
|
17223
|
+
"pemp",
|
|
17224
|
+
"pempved",
|
|
17225
|
+
"pemzek",
|
|
17226
|
+
"penaos",
|
|
17227
|
+
"penn",
|
|
17228
|
+
"peogwir",
|
|
17229
|
+
"peotramant",
|
|
17230
|
+
"pep",
|
|
17231
|
+
"perak",
|
|
17232
|
+
"perc'hennañ",
|
|
17233
|
+
"pergen",
|
|
17234
|
+
"permetiñ",
|
|
17235
|
+
"peseurt",
|
|
17236
|
+
"pet",
|
|
17237
|
+
"petiaoul",
|
|
17238
|
+
"petoare",
|
|
17239
|
+
"petra",
|
|
17240
|
+
"peur",
|
|
17241
|
+
"peurgetket",
|
|
17242
|
+
"peurheñvel",
|
|
17243
|
+
"peurliesañ",
|
|
17244
|
+
"peurvuiañ",
|
|
17245
|
+
"peus",
|
|
17246
|
+
"peustost",
|
|
17247
|
+
"peuz",
|
|
17248
|
+
"pevar",
|
|
17249
|
+
"pevare",
|
|
17250
|
+
"pevarevet",
|
|
17251
|
+
"pevarzek",
|
|
17252
|
+
"pez",
|
|
17253
|
+
"peze",
|
|
17254
|
+
"pezh",
|
|
17255
|
+
"pff",
|
|
17256
|
+
"pfft",
|
|
17257
|
+
"pfut",
|
|
17258
|
+
"picher",
|
|
17259
|
+
"pif",
|
|
17260
|
+
"pife",
|
|
17261
|
+
"pign",
|
|
17262
|
+
"pije",
|
|
17263
|
+
"pikol",
|
|
17264
|
+
"pitiaoul",
|
|
17265
|
+
"piv",
|
|
17266
|
+
"plaouf",
|
|
17267
|
+
"plok",
|
|
17268
|
+
"plouf",
|
|
17269
|
+
"po",
|
|
17270
|
+
"poa",
|
|
17271
|
+
"poelladus",
|
|
17272
|
+
"pof",
|
|
17273
|
+
"pok",
|
|
17274
|
+
"posupl",
|
|
17275
|
+
"pouah",
|
|
17276
|
+
"pourc'henn",
|
|
17277
|
+
"prest",
|
|
17278
|
+
"prestik",
|
|
17279
|
+
"prim",
|
|
17280
|
+
"prin",
|
|
17281
|
+
"provostapl",
|
|
17282
|
+
"pst",
|
|
17283
|
+
"pu",
|
|
17284
|
+
"pur",
|
|
17285
|
+
"r:",
|
|
17286
|
+
"ra",
|
|
17287
|
+
"rae",
|
|
17288
|
+
"raec'h",
|
|
17289
|
+
"raed",
|
|
17290
|
+
"raemp",
|
|
17291
|
+
"raen",
|
|
17292
|
+
"raent",
|
|
17293
|
+
"raes",
|
|
17294
|
+
"rafe",
|
|
17295
|
+
"rafec'h",
|
|
17296
|
+
"rafed",
|
|
17297
|
+
"rafemp",
|
|
17298
|
+
"rafen",
|
|
17299
|
+
"rafent",
|
|
17300
|
+
"rafes",
|
|
17301
|
+
"rag",
|
|
17302
|
+
"raimp",
|
|
17303
|
+
"raint",
|
|
17304
|
+
"raio",
|
|
17305
|
+
"raje",
|
|
17306
|
+
"rajec'h",
|
|
17307
|
+
"rajed",
|
|
17308
|
+
"rajemp",
|
|
17309
|
+
"rajen",
|
|
17310
|
+
"rajent",
|
|
17311
|
+
"rajes",
|
|
17312
|
+
"rak",
|
|
17313
|
+
"ral",
|
|
17314
|
+
"ran",
|
|
17315
|
+
"rankout",
|
|
17316
|
+
"raok",
|
|
17317
|
+
"razh",
|
|
17318
|
+
"re",
|
|
17319
|
+
"reas",
|
|
17320
|
+
"reer",
|
|
17321
|
+
"regennoù",
|
|
17322
|
+
"reiñ",
|
|
17323
|
+
"rejoc'h",
|
|
17324
|
+
"rejod",
|
|
17325
|
+
"rejomp",
|
|
17326
|
+
"rejont",
|
|
17327
|
+
"rejout",
|
|
17328
|
+
"rener",
|
|
17329
|
+
"rentañ",
|
|
17330
|
+
"reoc'h",
|
|
17331
|
+
"reomp",
|
|
17332
|
+
"reont",
|
|
17333
|
+
"reor",
|
|
17334
|
+
"reot",
|
|
17335
|
+
"resis",
|
|
17336
|
+
"ret",
|
|
17337
|
+
"reve",
|
|
17338
|
+
"rez",
|
|
17339
|
+
"ri",
|
|
17340
|
+
"rik",
|
|
17341
|
+
"rin",
|
|
17342
|
+
"ris",
|
|
17343
|
+
"rit",
|
|
17344
|
+
"rouez",
|
|
17345
|
+
"s:",
|
|
17346
|
+
"sac'h",
|
|
17347
|
+
"sant",
|
|
17348
|
+
"sav",
|
|
17349
|
+
"sañset",
|
|
16324
17350
|
"se",
|
|
16325
|
-
"
|
|
16326
|
-
"
|
|
16327
|
-
"
|
|
16328
|
-
"
|
|
16329
|
-
"
|
|
16330
|
-
"
|
|
16331
|
-
"
|
|
16332
|
-
"
|
|
16333
|
-
"
|
|
17351
|
+
"sed",
|
|
17352
|
+
"seitek",
|
|
17353
|
+
"seizh",
|
|
17354
|
+
"seizhvet",
|
|
17355
|
+
"sell",
|
|
17356
|
+
"sellit",
|
|
17357
|
+
"ser",
|
|
17358
|
+
"setu",
|
|
17359
|
+
"seul",
|
|
17360
|
+
"seurt",
|
|
17361
|
+
"siwazh",
|
|
17362
|
+
"skignañ",
|
|
17363
|
+
"skoaz",
|
|
17364
|
+
"skouer",
|
|
17365
|
+
"sort",
|
|
17366
|
+
"souden",
|
|
17367
|
+
"souvitañ",
|
|
17368
|
+
"soñj",
|
|
17369
|
+
"speriañ",
|
|
17370
|
+
"spririñ",
|
|
17371
|
+
"stad",
|
|
17372
|
+
"stlabezañ",
|
|
17373
|
+
"stop",
|
|
17374
|
+
"stranañ",
|
|
17375
|
+
"strewiñ",
|
|
17376
|
+
"strishaat",
|
|
17377
|
+
"stumm",
|
|
17378
|
+
"sujed",
|
|
17379
|
+
"surtoud",
|
|
17380
|
+
"t:",
|
|
17381
|
+
"ta",
|
|
17382
|
+
"taer",
|
|
17383
|
+
"tailh",
|
|
17384
|
+
"tak",
|
|
16334
17385
|
"tal",
|
|
16335
|
-
"
|
|
16336
|
-
"
|
|
17386
|
+
"talvoudegezh",
|
|
17387
|
+
"tamm",
|
|
17388
|
+
"tanav",
|
|
17389
|
+
"taol",
|
|
17390
|
+
"te",
|
|
17391
|
+
"techet",
|
|
17392
|
+
"teir",
|
|
17393
|
+
"teirvet",
|
|
17394
|
+
"telt",
|
|
17395
|
+
"teltenn",
|
|
16337
17396
|
"teus",
|
|
16338
|
-
"
|
|
16339
|
-
"
|
|
16340
|
-
"
|
|
16341
|
-
"
|
|
16342
|
-
"
|
|
16343
|
-
"
|
|
16344
|
-
"
|
|
16345
|
-
"
|
|
16346
|
-
"
|
|
16347
|
-
"
|
|
16348
|
-
"
|
|
17397
|
+
"teut",
|
|
17398
|
+
"teuteu",
|
|
17399
|
+
"ti",
|
|
17400
|
+
"tik",
|
|
17401
|
+
"toa",
|
|
17402
|
+
"tok",
|
|
17403
|
+
"tost",
|
|
17404
|
+
"tostig",
|
|
17405
|
+
"toud",
|
|
17406
|
+
"touesk",
|
|
17407
|
+
"touez",
|
|
17408
|
+
"toull",
|
|
17409
|
+
"tra",
|
|
17410
|
+
"trantenn",
|
|
17411
|
+
"traoñ",
|
|
17412
|
+
"trawalc'h",
|
|
17413
|
+
"tre",
|
|
17414
|
+
"trede",
|
|
17415
|
+
"tregont",
|
|
17416
|
+
"tremenet",
|
|
17417
|
+
"tri",
|
|
17418
|
+
"trivet",
|
|
17419
|
+
"triwec'h",
|
|
17420
|
+
"trizek",
|
|
17421
|
+
"tro",
|
|
17422
|
+
"trugarez",
|
|
17423
|
+
"trumm",
|
|
17424
|
+
"tsoin",
|
|
17425
|
+
"tsouin",
|
|
17426
|
+
"tu",
|
|
17427
|
+
"tud",
|
|
17428
|
+
"u:",
|
|
17429
|
+
"ugent",
|
|
17430
|
+
"uhel",
|
|
17431
|
+
"uhelañ",
|
|
17432
|
+
"ul",
|
|
17433
|
+
"un",
|
|
17434
|
+
"unan",
|
|
17435
|
+
"unanez",
|
|
17436
|
+
"unanig",
|
|
17437
|
+
"unnek",
|
|
17438
|
+
"unnekvet",
|
|
17439
|
+
"ur",
|
|
17440
|
+
"urzh",
|
|
17441
|
+
"us",
|
|
17442
|
+
"v:",
|
|
17443
|
+
"va",
|
|
17444
|
+
"vale",
|
|
17445
|
+
"van",
|
|
17446
|
+
"vare",
|
|
17447
|
+
"vat",
|
|
17448
|
+
"vefe",
|
|
17449
|
+
"vefec'h",
|
|
17450
|
+
"vefed",
|
|
17451
|
+
"vefemp",
|
|
17452
|
+
"vefen",
|
|
17453
|
+
"vefent",
|
|
17454
|
+
"vefes",
|
|
17455
|
+
"vesk",
|
|
17456
|
+
"vete",
|
|
17457
|
+
"vez",
|
|
17458
|
+
"vezan",
|
|
17459
|
+
"vezañ",
|
|
17460
|
+
"veze",
|
|
17461
|
+
"vezec'h",
|
|
17462
|
+
"vezed",
|
|
17463
|
+
"vezemp",
|
|
17464
|
+
"vezen",
|
|
17465
|
+
"vezent",
|
|
17466
|
+
"vezer",
|
|
17467
|
+
"vezes",
|
|
17468
|
+
"vezez",
|
|
17469
|
+
"vezit",
|
|
17470
|
+
"vezomp",
|
|
17471
|
+
"vezont",
|
|
17472
|
+
"vi",
|
|
17473
|
+
"vihan",
|
|
17474
|
+
"vihanañ",
|
|
17475
|
+
"vije",
|
|
17476
|
+
"vijec'h",
|
|
17477
|
+
"vijed",
|
|
17478
|
+
"vijemp",
|
|
17479
|
+
"vijen",
|
|
17480
|
+
"vijent",
|
|
17481
|
+
"vijes",
|
|
17482
|
+
"viken",
|
|
17483
|
+
"vimp",
|
|
17484
|
+
"vin",
|
|
17485
|
+
"vint",
|
|
17486
|
+
"vior",
|
|
17487
|
+
"viot",
|
|
17488
|
+
"virviken",
|
|
17489
|
+
"viskoazh",
|
|
17490
|
+
"vlan",
|
|
17491
|
+
"vlaou",
|
|
17492
|
+
"vo",
|
|
17493
|
+
"vod",
|
|
17494
|
+
"voe",
|
|
17495
|
+
"voec'h",
|
|
17496
|
+
"voed",
|
|
17497
|
+
"voemp",
|
|
17498
|
+
"voen",
|
|
17499
|
+
"voent",
|
|
17500
|
+
"voes",
|
|
17501
|
+
"vont",
|
|
17502
|
+
"vostapl",
|
|
17503
|
+
"vrac'h",
|
|
17504
|
+
"vrasañ",
|
|
17505
|
+
"vremañ",
|
|
17506
|
+
"w:",
|
|
17507
|
+
"walc'h",
|
|
17508
|
+
"war",
|
|
17509
|
+
"warnañ",
|
|
17510
|
+
"warni",
|
|
17511
|
+
"warno",
|
|
17512
|
+
"warnoc'h",
|
|
17513
|
+
"warnomp",
|
|
17514
|
+
"warnon",
|
|
17515
|
+
"warnor",
|
|
17516
|
+
"warnout",
|
|
17517
|
+
"wazh",
|
|
17518
|
+
"wech",
|
|
17519
|
+
"wechoù",
|
|
17520
|
+
"well",
|
|
17521
|
+
"y:",
|
|
17522
|
+
"you",
|
|
17523
|
+
"youadenn",
|
|
17524
|
+
"youc'hadenn",
|
|
17525
|
+
"youc'hou",
|
|
17526
|
+
"z:",
|
|
17527
|
+
"za",
|
|
17528
|
+
"zan",
|
|
17529
|
+
"zaw",
|
|
17530
|
+
"zeu",
|
|
17531
|
+
"zi",
|
|
17532
|
+
"ziar",
|
|
17533
|
+
"zigarez",
|
|
17534
|
+
"ziget",
|
|
17535
|
+
"zindan",
|
|
17536
|
+
"zioc'h",
|
|
17537
|
+
"ziouzh",
|
|
17538
|
+
"zirak",
|
|
17539
|
+
"zivout",
|
|
17540
|
+
"ziwar",
|
|
17541
|
+
"ziwezhañ",
|
|
17542
|
+
"zo",
|
|
17543
|
+
"zoken",
|
|
17544
|
+
"zokenoc'h",
|
|
17545
|
+
"zouesk",
|
|
17546
|
+
"zouez",
|
|
17547
|
+
"zro",
|
|
17548
|
+
"zu"
|
|
16349
17549
|
];
|
|
16350
17550
|
const bul = [
|
|
16351
17551
|
"а",
|
|
@@ -28001,22 +29201,32 @@ const tur = [
|
|
|
28001
29201
|
"şöyle"
|
|
28002
29202
|
];
|
|
28003
29203
|
const ukr = [
|
|
29204
|
+
"а",
|
|
29205
|
+
"або",
|
|
28004
29206
|
"авжеж",
|
|
28005
29207
|
"адже",
|
|
29208
|
+
"аж",
|
|
28006
29209
|
"але",
|
|
29210
|
+
"ані",
|
|
28007
29211
|
"б",
|
|
28008
29212
|
"без",
|
|
29213
|
+
"би",
|
|
29214
|
+
"бо",
|
|
28009
29215
|
"був",
|
|
28010
29216
|
"була",
|
|
28011
29217
|
"були",
|
|
28012
29218
|
"було",
|
|
28013
29219
|
"бути",
|
|
28014
29220
|
"більш",
|
|
29221
|
+
"в",
|
|
28015
29222
|
"вам",
|
|
29223
|
+
"вами",
|
|
28016
29224
|
"вас",
|
|
28017
29225
|
"весь",
|
|
29226
|
+
"вже",
|
|
28018
29227
|
"вздовж",
|
|
28019
29228
|
"ви",
|
|
29229
|
+
"від",
|
|
28020
29230
|
"вниз",
|
|
28021
29231
|
"внизу",
|
|
28022
29232
|
"вона",
|
|
@@ -28025,55 +29235,138 @@ const ukr = [
|
|
|
28025
29235
|
"все",
|
|
28026
29236
|
"всередині",
|
|
28027
29237
|
"всіх",
|
|
29238
|
+
"вся",
|
|
28028
29239
|
"від",
|
|
28029
29240
|
"він",
|
|
28030
29241
|
"да",
|
|
28031
29242
|
"давай",
|
|
28032
29243
|
"давати",
|
|
28033
29244
|
"де",
|
|
29245
|
+
"десь",
|
|
28034
29246
|
"дещо",
|
|
28035
29247
|
"для",
|
|
28036
29248
|
"до",
|
|
29249
|
+
"є",
|
|
29250
|
+
"ж",
|
|
29251
|
+
"же",
|
|
28037
29252
|
"з",
|
|
29253
|
+
"за",
|
|
28038
29254
|
"завжди",
|
|
28039
29255
|
"замість",
|
|
29256
|
+
"зі",
|
|
29257
|
+
"і",
|
|
29258
|
+
"із",
|
|
29259
|
+
"інших",
|
|
29260
|
+
"її",
|
|
29261
|
+
"їй",
|
|
29262
|
+
"їм",
|
|
29263
|
+
"їх",
|
|
28040
29264
|
"й",
|
|
29265
|
+
"його",
|
|
29266
|
+
"йому",
|
|
28041
29267
|
"коли",
|
|
28042
29268
|
"ледве",
|
|
29269
|
+
"лиш",
|
|
28043
29270
|
"майже",
|
|
29271
|
+
"мене",
|
|
29272
|
+
"мені",
|
|
28044
29273
|
"ми",
|
|
29274
|
+
"між",
|
|
29275
|
+
"мій",
|
|
29276
|
+
"мною",
|
|
29277
|
+
"мов",
|
|
29278
|
+
"мого",
|
|
29279
|
+
"моєї",
|
|
29280
|
+
"моє",
|
|
29281
|
+
"може",
|
|
29282
|
+
"мої",
|
|
29283
|
+
"моїх",
|
|
29284
|
+
"моя",
|
|
29285
|
+
"на",
|
|
29286
|
+
"над",
|
|
28045
29287
|
"навколо",
|
|
28046
29288
|
"навіть",
|
|
28047
29289
|
"нам",
|
|
29290
|
+
"нами",
|
|
29291
|
+
"нас",
|
|
29292
|
+
"наче",
|
|
29293
|
+
"наш",
|
|
29294
|
+
"не",
|
|
29295
|
+
"нє",
|
|
29296
|
+
"неї",
|
|
29297
|
+
"нема",
|
|
29298
|
+
"немов",
|
|
29299
|
+
"неначе",
|
|
29300
|
+
"нею",
|
|
29301
|
+
"ним",
|
|
29302
|
+
"ними",
|
|
29303
|
+
"них",
|
|
29304
|
+
"ні",
|
|
29305
|
+
"ніби",
|
|
29306
|
+
"ніщо",
|
|
29307
|
+
"нього",
|
|
29308
|
+
"о",
|
|
29309
|
+
"ось",
|
|
28048
29310
|
"от",
|
|
28049
29311
|
"отже",
|
|
28050
29312
|
"отож",
|
|
29313
|
+
"під",
|
|
29314
|
+
"по",
|
|
28051
29315
|
"поза",
|
|
28052
29316
|
"про",
|
|
28053
29317
|
"під",
|
|
29318
|
+
"сам",
|
|
29319
|
+
"сама",
|
|
29320
|
+
"свій",
|
|
29321
|
+
"свої",
|
|
29322
|
+
"своя",
|
|
29323
|
+
"свою",
|
|
29324
|
+
"себе",
|
|
29325
|
+
"собі",
|
|
28054
29326
|
"та",
|
|
29327
|
+
"там",
|
|
28055
29328
|
"так",
|
|
29329
|
+
"така",
|
|
28056
29330
|
"такий",
|
|
28057
29331
|
"також",
|
|
29332
|
+
"твій",
|
|
29333
|
+
"твого",
|
|
29334
|
+
"твоєї",
|
|
29335
|
+
"твої",
|
|
29336
|
+
"твоя",
|
|
28058
29337
|
"те",
|
|
29338
|
+
"тебе",
|
|
28059
29339
|
"ти",
|
|
29340
|
+
"ті",
|
|
29341
|
+
"тільки",
|
|
29342
|
+
"то",
|
|
29343
|
+
"тобі",
|
|
29344
|
+
"тобою",
|
|
28060
29345
|
"тобто",
|
|
29346
|
+
"тоді",
|
|
28061
29347
|
"тож",
|
|
29348
|
+
"той",
|
|
28062
29349
|
"тощо",
|
|
29350
|
+
"тут",
|
|
29351
|
+
"у",
|
|
29352
|
+
"хіба",
|
|
29353
|
+
"хоч",
|
|
28063
29354
|
"хоча",
|
|
28064
29355
|
"це",
|
|
28065
29356
|
"цей",
|
|
29357
|
+
"ці",
|
|
29358
|
+
"ця",
|
|
28066
29359
|
"чи",
|
|
28067
29360
|
"чого",
|
|
29361
|
+
"ще",
|
|
28068
29362
|
"що",
|
|
29363
|
+
"щоб",
|
|
29364
|
+
"щось",
|
|
29365
|
+
"я",
|
|
28069
29366
|
"як",
|
|
29367
|
+
"яка",
|
|
28070
29368
|
"який",
|
|
28071
|
-
"якої"
|
|
28072
|
-
"є",
|
|
28073
|
-
"із",
|
|
28074
|
-
"інших",
|
|
28075
|
-
"їх",
|
|
28076
|
-
"її"
|
|
29369
|
+
"якої"
|
|
28077
29370
|
];
|
|
28078
29371
|
const urd = [
|
|
28079
29372
|
"آئی",
|
|
@@ -29071,7 +30364,14 @@ const TINA_LOGIN_EVENT = "tinaCloudLogin";
|
|
|
29071
30364
|
const AUTH_TOKEN_KEY = "tinacms-auth";
|
|
29072
30365
|
const authenticate = (clientId, frontendUrl) => {
|
|
29073
30366
|
return new Promise((resolve) => {
|
|
29074
|
-
|
|
30367
|
+
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
30368
|
+
const authTab = popupWindow(
|
|
30369
|
+
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
30370
|
+
"_blank",
|
|
30371
|
+
window,
|
|
30372
|
+
1e3,
|
|
30373
|
+
700
|
|
30374
|
+
);
|
|
29075
30375
|
window.addEventListener("message", function(e) {
|
|
29076
30376
|
if (e.data.source === TINA_LOGIN_EVENT) {
|
|
29077
30377
|
if (authTab) {
|
|
@@ -29084,14 +30384,6 @@ const authenticate = (clientId, frontendUrl) => {
|
|
|
29084
30384
|
});
|
|
29085
30385
|
}
|
|
29086
30386
|
});
|
|
29087
|
-
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
29088
|
-
authTab = popupWindow(
|
|
29089
|
-
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
29090
|
-
"_blank",
|
|
29091
|
-
window,
|
|
29092
|
-
1e3,
|
|
29093
|
-
700
|
|
29094
|
-
);
|
|
29095
30387
|
});
|
|
29096
30388
|
};
|
|
29097
30389
|
const DefaultSessionProvider = ({
|
|
@@ -29402,6 +30694,7 @@ mutation addPendingDocumentMutation(
|
|
|
29402
30694
|
setBranch(branchName) {
|
|
29403
30695
|
var _a, _b, _c, _d;
|
|
29404
30696
|
const encodedBranch = encodeURIComponent(branchName);
|
|
30697
|
+
document.cookie = `x-branch=${encodedBranch}; path=/; max-age=3600`;
|
|
29405
30698
|
this.branch = encodedBranch;
|
|
29406
30699
|
this.assetsApiUrl = ((_a = this.options.tinaioConfig) == null ? void 0 : _a.assetsApiUrlOverride) || "https://assets.tinajs.io";
|
|
29407
30700
|
this.frontendUrl = ((_b = this.options.tinaioConfig) == null ? void 0 : _b.frontendUrlOverride) || "https://app.tina.io";
|
|
@@ -29444,7 +30737,7 @@ mutation addPendingDocumentMutation(
|
|
|
29444
30737
|
branch: ${this.branch}.`;
|
|
29445
30738
|
if (this.branch !== "main") {
|
|
29446
30739
|
errorMessage = `${errorMessage}
|
|
29447
|
-
Note: This error can occur if the branch does not exist on GitHub or on
|
|
30740
|
+
Note: This error can occur if the branch does not exist on GitHub or on TinaCloud`;
|
|
29448
30741
|
}
|
|
29449
30742
|
}
|
|
29450
30743
|
throw new Error(errorMessage);
|
|
@@ -29580,7 +30873,7 @@ mutation addPendingDocumentMutation(
|
|
|
29580
30873
|
unknownCount++;
|
|
29581
30874
|
if (unknownCount > 5) {
|
|
29582
30875
|
throw new Error(
|
|
29583
|
-
"AsyncPoller: status unknown for too long, please check indexing progress the
|
|
30876
|
+
"AsyncPoller: status unknown for too long, please check indexing progress the TinaCloud dashboard"
|
|
29584
30877
|
);
|
|
29585
30878
|
}
|
|
29586
30879
|
}
|
|
@@ -29797,56 +31090,6 @@ const AsyncButton = ({ name, primary, action }) => {
|
|
|
29797
31090
|
!submitting && name
|
|
29798
31091
|
);
|
|
29799
31092
|
};
|
|
29800
|
-
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
29801
|
-
const useTinaAuthRedirect = () => {
|
|
29802
|
-
useEffect(() => {
|
|
29803
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
29804
|
-
const config = {
|
|
29805
|
-
code: urlParams.get("code") || "",
|
|
29806
|
-
scope: urlParams.get("scope") || "email",
|
|
29807
|
-
state: urlParams.get("state")
|
|
29808
|
-
};
|
|
29809
|
-
if (!config.code) {
|
|
29810
|
-
return;
|
|
29811
|
-
}
|
|
29812
|
-
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
29813
|
-
}, []);
|
|
29814
|
-
};
|
|
29815
|
-
const createClient = ({
|
|
29816
|
-
clientId,
|
|
29817
|
-
isLocalClient = true,
|
|
29818
|
-
branch,
|
|
29819
|
-
tinaioConfig,
|
|
29820
|
-
schema,
|
|
29821
|
-
apiUrl,
|
|
29822
|
-
tinaGraphQLVersion
|
|
29823
|
-
}) => {
|
|
29824
|
-
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
29825
|
-
clientId: clientId || "",
|
|
29826
|
-
branch: branch || "main",
|
|
29827
|
-
tokenStorage: "LOCAL_STORAGE",
|
|
29828
|
-
tinaioConfig,
|
|
29829
|
-
schema,
|
|
29830
|
-
tinaGraphQLVersion
|
|
29831
|
-
});
|
|
29832
|
-
};
|
|
29833
|
-
function assertShape(value, yupSchema, errorMessage) {
|
|
29834
|
-
const shape = yupSchema(yup);
|
|
29835
|
-
try {
|
|
29836
|
-
shape.validateSync(value);
|
|
29837
|
-
} catch (e) {
|
|
29838
|
-
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
29839
|
-
throw new Error(message);
|
|
29840
|
-
}
|
|
29841
|
-
}
|
|
29842
|
-
function safeAssertShape(value, yupSchema) {
|
|
29843
|
-
try {
|
|
29844
|
-
assertShape(value, yupSchema);
|
|
29845
|
-
return true;
|
|
29846
|
-
} catch (e) {
|
|
29847
|
-
return false;
|
|
29848
|
-
}
|
|
29849
|
-
}
|
|
29850
31093
|
class TinaAdminApi {
|
|
29851
31094
|
constructor(cms) {
|
|
29852
31095
|
var _a, _b, _c, _d;
|
|
@@ -30193,6 +31436,56 @@ class TinaAdminApi {
|
|
|
30193
31436
|
);
|
|
30194
31437
|
}
|
|
30195
31438
|
}
|
|
31439
|
+
const createClient = ({
|
|
31440
|
+
clientId,
|
|
31441
|
+
isLocalClient = true,
|
|
31442
|
+
branch,
|
|
31443
|
+
tinaioConfig,
|
|
31444
|
+
schema,
|
|
31445
|
+
apiUrl,
|
|
31446
|
+
tinaGraphQLVersion
|
|
31447
|
+
}) => {
|
|
31448
|
+
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
31449
|
+
clientId: clientId || "",
|
|
31450
|
+
branch: branch || "main",
|
|
31451
|
+
tokenStorage: "LOCAL_STORAGE",
|
|
31452
|
+
tinaioConfig,
|
|
31453
|
+
schema,
|
|
31454
|
+
tinaGraphQLVersion
|
|
31455
|
+
});
|
|
31456
|
+
};
|
|
31457
|
+
function assertShape(value, yupSchema, errorMessage) {
|
|
31458
|
+
const shape = yupSchema(yup);
|
|
31459
|
+
try {
|
|
31460
|
+
shape.validateSync(value);
|
|
31461
|
+
} catch (e) {
|
|
31462
|
+
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
31463
|
+
throw new Error(message);
|
|
31464
|
+
}
|
|
31465
|
+
}
|
|
31466
|
+
function safeAssertShape(value, yupSchema) {
|
|
31467
|
+
try {
|
|
31468
|
+
assertShape(value, yupSchema);
|
|
31469
|
+
return true;
|
|
31470
|
+
} catch (e) {
|
|
31471
|
+
return false;
|
|
31472
|
+
}
|
|
31473
|
+
}
|
|
31474
|
+
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
31475
|
+
const useTinaAuthRedirect = () => {
|
|
31476
|
+
useEffect(() => {
|
|
31477
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
31478
|
+
const config = {
|
|
31479
|
+
code: urlParams.get("code") || "",
|
|
31480
|
+
scope: urlParams.get("scope") || "email",
|
|
31481
|
+
state: urlParams.get("state")
|
|
31482
|
+
};
|
|
31483
|
+
if (!config.code) {
|
|
31484
|
+
return;
|
|
31485
|
+
}
|
|
31486
|
+
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
31487
|
+
}, []);
|
|
31488
|
+
};
|
|
30196
31489
|
function sleep(ms) {
|
|
30197
31490
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
30198
31491
|
}
|
|
@@ -30291,7 +31584,7 @@ const AuthWallInner = ({
|
|
|
30291
31584
|
});
|
|
30292
31585
|
}
|
|
30293
31586
|
};
|
|
30294
|
-
let modalTitle = "
|
|
31587
|
+
let modalTitle = "TinaCloud";
|
|
30295
31588
|
if (activeModal === "authenticate" && loginStrategy === "Redirect" && !isTinaCloud) {
|
|
30296
31589
|
modalTitle = "Enter into edit mode";
|
|
30297
31590
|
} else if (activeModal === "authenticate" && loginStrategy === "UsernamePassword") {
|
|
@@ -30307,7 +31600,7 @@ const AuthWallInner = ({
|
|
|
30307
31600
|
ModalBuilder,
|
|
30308
31601
|
{
|
|
30309
31602
|
title: modalTitle,
|
|
30310
|
-
message: isTinaCloud ? "Your site uses
|
|
31603
|
+
message: isTinaCloud ? "Your site uses TinaCloud to track changes. To make edits, you must log in." : "To save edits, enter into edit mode. On save, changes will saved to the local filesystem.",
|
|
30311
31604
|
close,
|
|
30312
31605
|
actions: [
|
|
30313
31606
|
...otherModalActions,
|
|
@@ -30529,6 +31822,9 @@ const TinaCloudProvider = (props) => {
|
|
|
30529
31822
|
cms.flags.set("branch-switcher", true);
|
|
30530
31823
|
client.usingEditorialWorkflow = true;
|
|
30531
31824
|
client.protectedBranches = project.protectedBranches;
|
|
31825
|
+
if (!project.metadata[currentBranch]) {
|
|
31826
|
+
setCurrentBranch(project.defaultBranch || "main");
|
|
31827
|
+
}
|
|
30532
31828
|
}
|
|
30533
31829
|
});
|
|
30534
31830
|
};
|
|
@@ -30541,7 +31837,7 @@ const TinaCloudProvider = (props) => {
|
|
|
30541
31837
|
}
|
|
30542
31838
|
});
|
|
30543
31839
|
return unsubscribe;
|
|
30544
|
-
}, [isTinaCloud, cms]);
|
|
31840
|
+
}, [currentBranch, isTinaCloud, cms]);
|
|
30545
31841
|
return /* @__PURE__ */ React__default.createElement(SessionProvider, { basePath: "/api/tina/auth" }, /* @__PURE__ */ React__default.createElement(
|
|
30546
31842
|
BranchDataProvider,
|
|
30547
31843
|
{
|
|
@@ -31027,6 +32323,14 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31027
32323
|
}
|
|
31028
32324
|
return client.request(query, { variables });
|
|
31029
32325
|
};
|
|
32326
|
+
const GetCMS = ({ children }) => {
|
|
32327
|
+
const cms = useCMS$1();
|
|
32328
|
+
try {
|
|
32329
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(cms));
|
|
32330
|
+
} catch (e) {
|
|
32331
|
+
return null;
|
|
32332
|
+
}
|
|
32333
|
+
};
|
|
31030
32334
|
const Layout = ({ children }) => {
|
|
31031
32335
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
31032
32336
|
"div",
|
|
@@ -31238,47 +32542,6 @@ const SidebarCloudLink = ({ config }) => {
|
|
|
31238
32542
|
}
|
|
31239
32543
|
return /* @__PURE__ */ React__default.createElement("span", { className: "text-base tracking-wide text-gray-500 hover:text-blue-600 flex items-center opacity-90 hover:opacity-100" }, /* @__PURE__ */ React__default.createElement(config.Icon, { className: "mr-2 h-6 opacity-80 w-auto" }), /* @__PURE__ */ React__default.createElement("a", { target: "_blank", href: config.link.href }, config.link.text));
|
|
31240
32544
|
};
|
|
31241
|
-
const GetCMS = ({ children }) => {
|
|
31242
|
-
try {
|
|
31243
|
-
const cms = useCMS$1();
|
|
31244
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(cms));
|
|
31245
|
-
} catch (e) {
|
|
31246
|
-
return null;
|
|
31247
|
-
}
|
|
31248
|
-
};
|
|
31249
|
-
const PageWrapper = ({ children }) => {
|
|
31250
|
-
var _a, _b;
|
|
31251
|
-
const cms = useCMS$1();
|
|
31252
|
-
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
31253
|
-
const [branchingEnabled, setBranchingEnabled] = React__default.useState(
|
|
31254
|
-
() => cms.flags.get("branch-switcher")
|
|
31255
|
-
);
|
|
31256
|
-
React__default.useEffect(() => {
|
|
31257
|
-
cms.events.subscribe("flag:set", ({ key, value }) => {
|
|
31258
|
-
if (key === "branch-switcher") {
|
|
31259
|
-
setBranchingEnabled(value);
|
|
31260
|
-
}
|
|
31261
|
-
});
|
|
31262
|
-
}, [cms.events]);
|
|
31263
|
-
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 shadow-2xl overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, branchingEnabled && !isLocalMode && /* @__PURE__ */ React__default.createElement(BranchBanner, null), children);
|
|
31264
|
-
};
|
|
31265
|
-
const PageHeader = ({
|
|
31266
|
-
isLocalMode,
|
|
31267
|
-
children
|
|
31268
|
-
}) => {
|
|
31269
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, isLocalMode && /* @__PURE__ */ React__default.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-16 xl:pt-12 px-6 xl:px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
|
|
31270
|
-
};
|
|
31271
|
-
const PageBody = ({ children }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
31272
|
-
const PageBodyNarrow = ({ children }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-10 px-6 xl:px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
|
|
31273
|
-
const DashboardPage = () => {
|
|
31274
|
-
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
31275
|
-
var _a, _b;
|
|
31276
|
-
return /* @__PURE__ */ React__default.createElement(PageWrapper, null, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(PageHeader, { isLocalMode: (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode }, /* @__PURE__ */ React__default.createElement("h3", { className: "text-2xl font-sans text-gray-700" }, "Welcome to Tina!")), /* @__PURE__ */ React__default.createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
|
|
31277
|
-
});
|
|
31278
|
-
};
|
|
31279
|
-
function RiHome2Line(props) {
|
|
31280
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M19 21H5C4.44772 21 4 20.5523 4 20V11L1 11L11.3273 1.6115C11.7087 1.26475 12.2913 1.26475 12.6727 1.6115L23 11L20 11V20C20 20.5523 19.5523 21 19 21ZM6 19H18V9.15745L12 3.7029L6 9.15745V19Z" }, "child": [] }] })(props);
|
|
31281
|
-
}
|
|
31282
32545
|
const LoadingPage = () => /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
31283
32546
|
"div",
|
|
31284
32547
|
{
|
|
@@ -31388,203 +32651,33 @@ const LoadingPage = () => /* @__PURE__ */ React__default.createElement(React__de
|
|
|
31388
32651
|
)
|
|
31389
32652
|
)
|
|
31390
32653
|
));
|
|
31391
|
-
|
|
31392
|
-
|
|
31393
|
-
|
|
31394
|
-
}) => {
|
|
31395
|
-
|
|
31396
|
-
|
|
31397
|
-
const
|
|
31398
|
-
const
|
|
31399
|
-
|
|
31400
|
-
|
|
31401
|
-
|
|
31402
|
-
|
|
31403
|
-
|
|
31404
|
-
|
|
31405
|
-
useEffect(() => {
|
|
31406
|
-
let cancelled = false;
|
|
31407
|
-
const fetchCollection = async () => {
|
|
31408
|
-
var _a;
|
|
31409
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31410
|
-
const { name, order } = JSON.parse(sortKey || "{}");
|
|
31411
|
-
const validSortKey = ((_a = collectionExtra.fields) == null ? void 0 : _a.map((x) => x.name).includes(name)) ? name : void 0;
|
|
31412
|
-
try {
|
|
31413
|
-
const collection2 = await api.fetchCollection(
|
|
31414
|
-
collectionName,
|
|
31415
|
-
includeDocuments,
|
|
31416
|
-
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
31417
|
-
after,
|
|
31418
|
-
validSortKey,
|
|
31419
|
-
order,
|
|
31420
|
-
filterArgs
|
|
31421
|
-
);
|
|
31422
|
-
setCollection(collection2);
|
|
31423
|
-
} catch (error2) {
|
|
31424
|
-
cms.alerts.error(
|
|
31425
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31426
|
-
);
|
|
31427
|
-
console.error(error2);
|
|
31428
|
-
setCollection(void 0);
|
|
31429
|
-
setError(error2);
|
|
31430
|
-
}
|
|
31431
|
-
setLoading(false);
|
|
31432
|
-
}
|
|
31433
|
-
};
|
|
31434
|
-
if (cancelled)
|
|
31435
|
-
return;
|
|
31436
|
-
setLoading(true);
|
|
31437
|
-
fetchCollection();
|
|
31438
|
-
return () => {
|
|
31439
|
-
cancelled = true;
|
|
31440
|
-
};
|
|
31441
|
-
}, [
|
|
31442
|
-
cms,
|
|
31443
|
-
collectionName,
|
|
31444
|
-
folder.loading,
|
|
31445
|
-
folder.fullyQualifiedName,
|
|
31446
|
-
resetState,
|
|
31447
|
-
after,
|
|
31448
|
-
sortKey
|
|
31449
|
-
]);
|
|
31450
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31451
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
31452
|
-
};
|
|
31453
|
-
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
31454
|
-
const api = new TinaAdminApi(cms);
|
|
31455
|
-
const schema = cms.api.tina.schema;
|
|
31456
|
-
const collectionExtra = schema.getCollection(collectionName);
|
|
31457
|
-
const [collection, setCollection] = useState(void 0);
|
|
31458
|
-
const [loading, setLoading] = useState(true);
|
|
31459
|
-
const [error, setError] = useState(void 0);
|
|
31460
|
-
const [resetState, setResetSate] = useState(0);
|
|
31461
|
-
useEffect(() => {
|
|
31462
|
-
let cancelled = false;
|
|
31463
|
-
const searchCollection = async () => {
|
|
31464
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31465
|
-
try {
|
|
31466
|
-
const response = await cms.api.search.query(
|
|
31467
|
-
`${search} AND _collection:${collectionName}`,
|
|
31468
|
-
{
|
|
31469
|
-
limit: 15,
|
|
31470
|
-
cursor: after
|
|
31471
|
-
}
|
|
31472
|
-
);
|
|
31473
|
-
const docs = await Promise.allSettled(
|
|
31474
|
-
response.results.map((result) => {
|
|
31475
|
-
const [collection2, relativePath2] = result._id.split(":");
|
|
31476
|
-
return api.fetchDocument(collection2, relativePath2, false);
|
|
31477
|
-
})
|
|
31478
|
-
);
|
|
31479
|
-
const edges = docs.filter((p) => {
|
|
31480
|
-
var _a;
|
|
31481
|
-
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
31482
|
-
}).map((result) => ({ node: result.value.document }));
|
|
31483
|
-
const c = await api.fetchCollection(collectionName, false, "");
|
|
31484
|
-
setCollection({
|
|
31485
|
-
format: collection.format,
|
|
31486
|
-
label: collection.label,
|
|
31487
|
-
name: collectionName,
|
|
31488
|
-
templates: collection.templates,
|
|
31489
|
-
documents: {
|
|
31490
|
-
pageInfo: {
|
|
31491
|
-
hasNextPage: !!response.nextCursor,
|
|
31492
|
-
hasPreviousPage: !!response.prevCursor,
|
|
31493
|
-
startCursor: "",
|
|
31494
|
-
endCursor: response.nextCursor || ""
|
|
31495
|
-
},
|
|
31496
|
-
edges
|
|
31497
|
-
}
|
|
31498
|
-
});
|
|
31499
|
-
} catch (error2) {
|
|
31500
|
-
cms.alerts.error(
|
|
31501
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31502
|
-
);
|
|
31503
|
-
console.error(error2);
|
|
31504
|
-
setCollection(void 0);
|
|
31505
|
-
setError(error2);
|
|
31506
|
-
}
|
|
31507
|
-
setLoading(false);
|
|
32654
|
+
function RiHome2Line(props) {
|
|
32655
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M19 21H5C4.44772 21 4 20.5523 4 20V11L1 11L11.3273 1.6115C11.7087 1.26475 12.2913 1.26475 12.6727 1.6115L23 11L20 11V20C20 20.5523 19.5523 21 19 21ZM6 19H18V9.15745L12 3.7029L6 9.15745V19Z" }, "child": [] }] })(props);
|
|
32656
|
+
}
|
|
32657
|
+
const PageWrapper = ({ children }) => {
|
|
32658
|
+
var _a, _b;
|
|
32659
|
+
const cms = useCMS$1();
|
|
32660
|
+
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
32661
|
+
const [branchingEnabled, setBranchingEnabled] = React__default.useState(
|
|
32662
|
+
() => cms.flags.get("branch-switcher")
|
|
32663
|
+
);
|
|
32664
|
+
React__default.useEffect(() => {
|
|
32665
|
+
cms.events.subscribe("flag:set", ({ key, value }) => {
|
|
32666
|
+
if (key === "branch-switcher") {
|
|
32667
|
+
setBranchingEnabled(value);
|
|
31508
32668
|
}
|
|
31509
|
-
};
|
|
31510
|
-
|
|
31511
|
-
|
|
31512
|
-
setLoading(true);
|
|
31513
|
-
searchCollection();
|
|
31514
|
-
return () => {
|
|
31515
|
-
cancelled = true;
|
|
31516
|
-
};
|
|
31517
|
-
}, [
|
|
31518
|
-
cms,
|
|
31519
|
-
collectionName,
|
|
31520
|
-
folder.loading,
|
|
31521
|
-
folder.fullyQualifiedName,
|
|
31522
|
-
resetState,
|
|
31523
|
-
after,
|
|
31524
|
-
search
|
|
31525
|
-
]);
|
|
31526
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31527
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
32669
|
+
});
|
|
32670
|
+
}, [cms.events]);
|
|
32671
|
+
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 shadow-2xl overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, branchingEnabled && !isLocalMode && /* @__PURE__ */ React__default.createElement(BranchBanner, null), children);
|
|
31528
32672
|
};
|
|
31529
|
-
const
|
|
31530
|
-
|
|
31531
|
-
|
|
31532
|
-
folder,
|
|
31533
|
-
includeDocuments = true,
|
|
31534
|
-
startCursor,
|
|
31535
|
-
sortKey,
|
|
31536
|
-
children,
|
|
31537
|
-
filterArgs,
|
|
31538
|
-
search
|
|
32673
|
+
const PageHeader = ({
|
|
32674
|
+
isLocalMode,
|
|
32675
|
+
children
|
|
31539
32676
|
}) => {
|
|
31540
|
-
|
|
31541
|
-
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? useSearchCollection(
|
|
31542
|
-
cms,
|
|
31543
|
-
collectionName,
|
|
31544
|
-
includeDocuments,
|
|
31545
|
-
folder,
|
|
31546
|
-
startCursor || "",
|
|
31547
|
-
search
|
|
31548
|
-
) : useGetCollection(
|
|
31549
|
-
cms,
|
|
31550
|
-
collectionName,
|
|
31551
|
-
includeDocuments,
|
|
31552
|
-
folder,
|
|
31553
|
-
startCursor || "",
|
|
31554
|
-
sortKey,
|
|
31555
|
-
filterArgs
|
|
31556
|
-
) || {};
|
|
31557
|
-
useEffect(() => {
|
|
31558
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
31559
|
-
if (loading)
|
|
31560
|
-
return;
|
|
31561
|
-
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
31562
|
-
collection.name
|
|
31563
|
-
);
|
|
31564
|
-
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
31565
|
-
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
31566
|
-
const collectionResponse = collection;
|
|
31567
|
-
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
31568
|
-
((_f = (_e = collectionResponse.documents) == null ? void 0 : _e.edges) == null ? void 0 : _f.length) === 1 && // Check to make sure the file is not a folder
|
|
31569
|
-
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
31570
|
-
const doc = collectionResponse.documents.edges[0].node;
|
|
31571
|
-
handleNavigate(
|
|
31572
|
-
navigate,
|
|
31573
|
-
cms,
|
|
31574
|
-
collectionResponse,
|
|
31575
|
-
collectionDefinition,
|
|
31576
|
-
doc
|
|
31577
|
-
);
|
|
31578
|
-
}
|
|
31579
|
-
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
31580
|
-
if (error) {
|
|
31581
|
-
return /* @__PURE__ */ React__default.createElement(FullscreenError, null);
|
|
31582
|
-
}
|
|
31583
|
-
if (loading) {
|
|
31584
|
-
return /* @__PURE__ */ React__default.createElement(LoadingPage, null);
|
|
31585
|
-
}
|
|
31586
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
32677
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, isLocalMode && /* @__PURE__ */ React__default.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-16 xl:pt-12 px-6 xl:px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
|
|
31587
32678
|
};
|
|
32679
|
+
const PageBody = ({ children }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
32680
|
+
const PageBodyNarrow = ({ children }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-10 px-6 xl:px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
|
|
31588
32681
|
const folderRegex = /^.*\/~\/*(.*)$/;
|
|
31589
32682
|
const parentFolder = (folder) => {
|
|
31590
32683
|
return {
|
|
@@ -31704,6 +32797,7 @@ const CollectionListPage = () => {
|
|
|
31704
32797
|
const [vars, setVars] = React__default.useState({
|
|
31705
32798
|
collection: collectionName,
|
|
31706
32799
|
relativePath: "",
|
|
32800
|
+
relativePathWithoutExtension: "",
|
|
31707
32801
|
newRelativePath: "",
|
|
31708
32802
|
filterField: "",
|
|
31709
32803
|
folderName: "",
|
|
@@ -31745,6 +32839,7 @@ const CollectionListPage = () => {
|
|
|
31745
32839
|
...old,
|
|
31746
32840
|
collection: collectionName,
|
|
31747
32841
|
relativePath: "",
|
|
32842
|
+
relativePathWithoutExtension: "",
|
|
31748
32843
|
newRelativePath: "",
|
|
31749
32844
|
filterField: "",
|
|
31750
32845
|
startsWith: "",
|
|
@@ -31770,6 +32865,7 @@ const CollectionListPage = () => {
|
|
|
31770
32865
|
collectionName === vars.collection ? vars : {
|
|
31771
32866
|
collection: collectionName,
|
|
31772
32867
|
relativePath: "",
|
|
32868
|
+
relativePathWithoutExtension: "",
|
|
31773
32869
|
newRelativePath: "",
|
|
31774
32870
|
filterField: "",
|
|
31775
32871
|
startsWith: "",
|
|
@@ -31857,7 +32953,9 @@ const CollectionListPage = () => {
|
|
|
31857
32953
|
safeSubmit: async () => {
|
|
31858
32954
|
try {
|
|
31859
32955
|
await admin.deleteDocument(vars);
|
|
31860
|
-
cms.alerts.info(
|
|
32956
|
+
cms.alerts.info(
|
|
32957
|
+
"Document was successfully deleted"
|
|
32958
|
+
);
|
|
31861
32959
|
reFetchCollection();
|
|
31862
32960
|
} catch (error) {
|
|
31863
32961
|
cms.alerts.warn(
|
|
@@ -31871,7 +32969,7 @@ const CollectionListPage = () => {
|
|
|
31871
32969
|
), renameModalOpen && /* @__PURE__ */ React__default.createElement(
|
|
31872
32970
|
RenameModal,
|
|
31873
32971
|
{
|
|
31874
|
-
filename: vars.
|
|
32972
|
+
filename: vars.relativePathWithoutExtension,
|
|
31875
32973
|
newRelativePath: vars.newRelativePath,
|
|
31876
32974
|
setNewRelativePath: (newRelativePath) => {
|
|
31877
32975
|
setVars((vars2) => {
|
|
@@ -31886,7 +32984,9 @@ const CollectionListPage = () => {
|
|
|
31886
32984
|
relativePath: vars.relativePath,
|
|
31887
32985
|
newRelativePath
|
|
31888
32986
|
});
|
|
31889
|
-
cms.alerts.info(
|
|
32987
|
+
cms.alerts.info(
|
|
32988
|
+
"Document was successfully renamed"
|
|
32989
|
+
);
|
|
31890
32990
|
reFetchCollection();
|
|
31891
32991
|
} catch (error) {
|
|
31892
32992
|
if (error.message.indexOf("has references")) {
|
|
@@ -31986,7 +33086,9 @@ const CollectionListPage = () => {
|
|
|
31986
33086
|
name: "sort",
|
|
31987
33087
|
value: sortKey,
|
|
31988
33088
|
onChange: (e) => {
|
|
31989
|
-
const val = JSON.parse(
|
|
33089
|
+
const val = JSON.parse(
|
|
33090
|
+
e.target.value
|
|
33091
|
+
);
|
|
31990
33092
|
setEndCursor("");
|
|
31991
33093
|
setPrevCursors([]);
|
|
31992
33094
|
window == null ? void 0 : window.localStorage.setItem(
|
|
@@ -32192,6 +33294,9 @@ const CollectionListPage = () => {
|
|
|
32192
33294
|
setVars((old) => ({
|
|
32193
33295
|
...old,
|
|
32194
33296
|
collection: collectionName,
|
|
33297
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33298
|
+
"/"
|
|
33299
|
+
),
|
|
32195
33300
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32196
33301
|
"/"
|
|
32197
33302
|
) + document2.node._sys.extension,
|
|
@@ -32214,6 +33319,9 @@ const CollectionListPage = () => {
|
|
|
32214
33319
|
setVars((old) => ({
|
|
32215
33320
|
...old,
|
|
32216
33321
|
collection: collectionName,
|
|
33322
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33323
|
+
"/"
|
|
33324
|
+
),
|
|
32217
33325
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32218
33326
|
"/"
|
|
32219
33327
|
) + document2.node._sys.extension,
|
|
@@ -32426,7 +33534,7 @@ const RenameModal = ({
|
|
|
32426
33534
|
newRelativePath,
|
|
32427
33535
|
setNewRelativePath
|
|
32428
33536
|
}) => {
|
|
32429
|
-
return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React__default.createElement("strong", null, filename), "?
|
|
33537
|
+
return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React__default.createElement("strong", null, filename), "?"), /* @__PURE__ */ React__default.createElement(
|
|
32430
33538
|
BaseTextField,
|
|
32431
33539
|
{
|
|
32432
33540
|
placeholder: "Enter a new name for the document's file",
|
|
@@ -32441,11 +33549,243 @@ const RenameModal = ({
|
|
|
32441
33549
|
onClick: async () => {
|
|
32442
33550
|
await renameFunc();
|
|
32443
33551
|
close2();
|
|
32444
|
-
}
|
|
33552
|
+
},
|
|
33553
|
+
disabled: !newRelativePath || newRelativePath === filename
|
|
32445
33554
|
},
|
|
32446
33555
|
"Rename"
|
|
32447
33556
|
))));
|
|
32448
33557
|
};
|
|
33558
|
+
const FullscreenError = ({
|
|
33559
|
+
title = "Error",
|
|
33560
|
+
errorMessage = "It looks like something went wrong."
|
|
33561
|
+
}) => {
|
|
33562
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col justify-center items-center h-screen bg-gray-100" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-red-500 text-4xl mb-6 flex items-center" }, /* @__PURE__ */ React__default.createElement(BiError, { className: "w-12 h-auto fill-current text-red-400 opacity-70 mr-1" }), " ", title), /* @__PURE__ */ React__default.createElement("p", { className: "text-gray-700 text-xl mb-8" }, errorMessage), /* @__PURE__ */ React__default.createElement(Button$1, { variant: "danger", onClick: () => window.location.reload() }, /* @__PURE__ */ React__default.createElement(BiSync, { className: "w-7 h-auto fill-current opacity-70 mr-1" }), " Reload"));
|
|
33563
|
+
};
|
|
33564
|
+
const isValidSortKey = (sortKey, collection) => {
|
|
33565
|
+
if (collection.fields) {
|
|
33566
|
+
const sortKeys = collection.fields.map((x) => x.name);
|
|
33567
|
+
return sortKeys.includes(sortKey);
|
|
33568
|
+
} else if (collection.templates) {
|
|
33569
|
+
const collectionMap = {};
|
|
33570
|
+
const conflictedFields = /* @__PURE__ */ new Set();
|
|
33571
|
+
for (const template of collection.templates) {
|
|
33572
|
+
for (const field of template.fields) {
|
|
33573
|
+
if (collectionMap[field.name]) {
|
|
33574
|
+
if (collectionMap[field.name].type !== field.type) {
|
|
33575
|
+
conflictedFields.add(field.name);
|
|
33576
|
+
}
|
|
33577
|
+
} else {
|
|
33578
|
+
collectionMap[field.name] = field;
|
|
33579
|
+
}
|
|
33580
|
+
}
|
|
33581
|
+
}
|
|
33582
|
+
for (const key in conflictedFields) {
|
|
33583
|
+
delete collectionMap[key];
|
|
33584
|
+
}
|
|
33585
|
+
for (const key in collectionMap) {
|
|
33586
|
+
if (key === sortKey) {
|
|
33587
|
+
return true;
|
|
33588
|
+
}
|
|
33589
|
+
}
|
|
33590
|
+
return false;
|
|
33591
|
+
}
|
|
33592
|
+
};
|
|
33593
|
+
const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
|
|
33594
|
+
const api = new TinaAdminApi(cms);
|
|
33595
|
+
const schema = cms.api.tina.schema;
|
|
33596
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33597
|
+
const [collection, setCollection] = useState(void 0);
|
|
33598
|
+
const [loading, setLoading] = useState(true);
|
|
33599
|
+
const [error, setError] = useState(void 0);
|
|
33600
|
+
const [resetState, setResetSate] = useState(0);
|
|
33601
|
+
useEffect(() => {
|
|
33602
|
+
let cancelled = false;
|
|
33603
|
+
const fetchCollection = async () => {
|
|
33604
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33605
|
+
const { name, order } = JSON.parse(sortKey || "{}");
|
|
33606
|
+
const validSortKey = isValidSortKey(name, collectionExtra) ? name : void 0;
|
|
33607
|
+
try {
|
|
33608
|
+
const collection2 = await api.fetchCollection(
|
|
33609
|
+
collectionName,
|
|
33610
|
+
includeDocuments,
|
|
33611
|
+
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
33612
|
+
after,
|
|
33613
|
+
validSortKey,
|
|
33614
|
+
order,
|
|
33615
|
+
filterArgs
|
|
33616
|
+
);
|
|
33617
|
+
setCollection(collection2);
|
|
33618
|
+
} catch (error2) {
|
|
33619
|
+
cms.alerts.error(
|
|
33620
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33621
|
+
);
|
|
33622
|
+
console.error(error2);
|
|
33623
|
+
setCollection(void 0);
|
|
33624
|
+
setError(error2);
|
|
33625
|
+
}
|
|
33626
|
+
setLoading(false);
|
|
33627
|
+
}
|
|
33628
|
+
};
|
|
33629
|
+
if (cancelled)
|
|
33630
|
+
return;
|
|
33631
|
+
setLoading(true);
|
|
33632
|
+
fetchCollection();
|
|
33633
|
+
return () => {
|
|
33634
|
+
cancelled = true;
|
|
33635
|
+
};
|
|
33636
|
+
}, [
|
|
33637
|
+
cms,
|
|
33638
|
+
collectionName,
|
|
33639
|
+
folder.loading,
|
|
33640
|
+
folder.fullyQualifiedName,
|
|
33641
|
+
resetState,
|
|
33642
|
+
after,
|
|
33643
|
+
sortKey
|
|
33644
|
+
]);
|
|
33645
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33646
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33647
|
+
};
|
|
33648
|
+
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
33649
|
+
const api = new TinaAdminApi(cms);
|
|
33650
|
+
const schema = cms.api.tina.schema;
|
|
33651
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33652
|
+
const [collection, setCollection] = useState(void 0);
|
|
33653
|
+
const [loading, setLoading] = useState(true);
|
|
33654
|
+
const [error, setError] = useState(void 0);
|
|
33655
|
+
const [resetState, setResetSate] = useState(0);
|
|
33656
|
+
useEffect(() => {
|
|
33657
|
+
let cancelled = false;
|
|
33658
|
+
const searchCollection = async () => {
|
|
33659
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33660
|
+
try {
|
|
33661
|
+
const response = await cms.api.search.query(
|
|
33662
|
+
`${search} AND _collection:${collectionName}`,
|
|
33663
|
+
{
|
|
33664
|
+
limit: 15,
|
|
33665
|
+
cursor: after
|
|
33666
|
+
}
|
|
33667
|
+
);
|
|
33668
|
+
const docs = await Promise.allSettled(
|
|
33669
|
+
response.results.map((result) => {
|
|
33670
|
+
const [collection2, relativePath2] = result._id.split(":");
|
|
33671
|
+
return api.fetchDocument(collection2, relativePath2, false);
|
|
33672
|
+
})
|
|
33673
|
+
);
|
|
33674
|
+
const edges = docs.filter((p) => {
|
|
33675
|
+
var _a;
|
|
33676
|
+
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
33677
|
+
}).map((result) => ({ node: result.value.document }));
|
|
33678
|
+
const c = await api.fetchCollection(collectionName, false, "");
|
|
33679
|
+
setCollection({
|
|
33680
|
+
format: collection.format,
|
|
33681
|
+
label: collection.label,
|
|
33682
|
+
name: collectionName,
|
|
33683
|
+
templates: collection.templates,
|
|
33684
|
+
documents: {
|
|
33685
|
+
pageInfo: {
|
|
33686
|
+
hasNextPage: !!response.nextCursor,
|
|
33687
|
+
hasPreviousPage: !!response.prevCursor,
|
|
33688
|
+
startCursor: "",
|
|
33689
|
+
endCursor: response.nextCursor || ""
|
|
33690
|
+
},
|
|
33691
|
+
edges
|
|
33692
|
+
}
|
|
33693
|
+
});
|
|
33694
|
+
} catch (error2) {
|
|
33695
|
+
cms.alerts.error(
|
|
33696
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33697
|
+
);
|
|
33698
|
+
console.error(error2);
|
|
33699
|
+
setCollection(void 0);
|
|
33700
|
+
setError(error2);
|
|
33701
|
+
}
|
|
33702
|
+
setLoading(false);
|
|
33703
|
+
}
|
|
33704
|
+
};
|
|
33705
|
+
if (cancelled)
|
|
33706
|
+
return;
|
|
33707
|
+
setLoading(true);
|
|
33708
|
+
searchCollection();
|
|
33709
|
+
return () => {
|
|
33710
|
+
cancelled = true;
|
|
33711
|
+
};
|
|
33712
|
+
}, [
|
|
33713
|
+
cms,
|
|
33714
|
+
collectionName,
|
|
33715
|
+
folder.loading,
|
|
33716
|
+
folder.fullyQualifiedName,
|
|
33717
|
+
resetState,
|
|
33718
|
+
after,
|
|
33719
|
+
search
|
|
33720
|
+
]);
|
|
33721
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33722
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33723
|
+
};
|
|
33724
|
+
const GetCollection = ({
|
|
33725
|
+
cms,
|
|
33726
|
+
collectionName,
|
|
33727
|
+
folder,
|
|
33728
|
+
includeDocuments = true,
|
|
33729
|
+
startCursor,
|
|
33730
|
+
sortKey,
|
|
33731
|
+
children,
|
|
33732
|
+
filterArgs,
|
|
33733
|
+
search
|
|
33734
|
+
}) => {
|
|
33735
|
+
const navigate = useNavigate();
|
|
33736
|
+
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? (
|
|
33737
|
+
// biome-ignore lint/correctness/useHookAtTopLevel: not ready to fix these yet
|
|
33738
|
+
useSearchCollection(
|
|
33739
|
+
cms,
|
|
33740
|
+
collectionName,
|
|
33741
|
+
includeDocuments,
|
|
33742
|
+
folder,
|
|
33743
|
+
startCursor || "",
|
|
33744
|
+
search
|
|
33745
|
+
)
|
|
33746
|
+
) : (
|
|
33747
|
+
// biome-ignore lint/correctness/useHookAtTopLevel: not ready to fix these yet
|
|
33748
|
+
useGetCollection(
|
|
33749
|
+
cms,
|
|
33750
|
+
collectionName,
|
|
33751
|
+
includeDocuments,
|
|
33752
|
+
folder,
|
|
33753
|
+
startCursor || "",
|
|
33754
|
+
sortKey,
|
|
33755
|
+
filterArgs
|
|
33756
|
+
) || {}
|
|
33757
|
+
);
|
|
33758
|
+
useEffect(() => {
|
|
33759
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
33760
|
+
if (loading)
|
|
33761
|
+
return;
|
|
33762
|
+
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
33763
|
+
collection.name
|
|
33764
|
+
);
|
|
33765
|
+
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
33766
|
+
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
33767
|
+
const collectionResponse = collection;
|
|
33768
|
+
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
33769
|
+
((_f = (_e = collectionResponse.documents) == null ? void 0 : _e.edges) == null ? void 0 : _f.length) === 1 && // Check to make sure the file is not a folder
|
|
33770
|
+
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
33771
|
+
const doc = collectionResponse.documents.edges[0].node;
|
|
33772
|
+
handleNavigate(
|
|
33773
|
+
navigate,
|
|
33774
|
+
cms,
|
|
33775
|
+
collectionResponse,
|
|
33776
|
+
collectionDefinition,
|
|
33777
|
+
doc
|
|
33778
|
+
);
|
|
33779
|
+
}
|
|
33780
|
+
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
33781
|
+
if (error) {
|
|
33782
|
+
return /* @__PURE__ */ React__default.createElement(FullscreenError, null);
|
|
33783
|
+
}
|
|
33784
|
+
if (loading) {
|
|
33785
|
+
return /* @__PURE__ */ React__default.createElement(LoadingPage, null);
|
|
33786
|
+
}
|
|
33787
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
33788
|
+
};
|
|
32449
33789
|
const ErrorDialog = (props) => {
|
|
32450
33790
|
return /* @__PURE__ */ React__default.createElement(
|
|
32451
33791
|
"div",
|
|
@@ -32768,7 +34108,10 @@ const useGetDocument = (cms, collectionName, relativePath2) => {
|
|
|
32768
34108
|
const fetchDocument = async () => {
|
|
32769
34109
|
if (api.isAuthenticated()) {
|
|
32770
34110
|
try {
|
|
32771
|
-
const response = await api.fetchDocument(
|
|
34111
|
+
const response = await api.fetchDocument(
|
|
34112
|
+
collectionName,
|
|
34113
|
+
relativePath2
|
|
34114
|
+
);
|
|
32772
34115
|
setDocument(response.document);
|
|
32773
34116
|
} catch (error2) {
|
|
32774
34117
|
cms.alerts.error(
|
|
@@ -32986,6 +34329,12 @@ const RenderForm = ({
|
|
|
32986
34329
|
), /* @__PURE__ */ React__default.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React__default.createElement("span", { className: "flex-1 w-full text-sm leading-tight whitespace-nowrap truncate" }, `${filename}.${collection.format}`), /* @__PURE__ */ React__default.createElement(FormStatus, { pristine: formIsPristine }))
|
|
32987
34330
|
), activeForm && /* @__PURE__ */ React__default.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine }));
|
|
32988
34331
|
};
|
|
34332
|
+
const DashboardPage = () => {
|
|
34333
|
+
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
34334
|
+
var _a, _b;
|
|
34335
|
+
return /* @__PURE__ */ React__default.createElement(PageWrapper, null, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(PageHeader, { isLocalMode: (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode }, /* @__PURE__ */ React__default.createElement("h3", { className: "text-2xl font-sans text-gray-700" }, "Welcome to Tina!")), /* @__PURE__ */ React__default.createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
|
|
34336
|
+
});
|
|
34337
|
+
};
|
|
32989
34338
|
const ScreenPage = () => {
|
|
32990
34339
|
const { screenName } = useParams();
|
|
32991
34340
|
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
@@ -33068,7 +34417,7 @@ const IndexingPage = () => {
|
|
|
33068
34417
|
} catch {
|
|
33069
34418
|
cms.alerts.error("Branch indexing failed.");
|
|
33070
34419
|
setErrorMessage(
|
|
33071
|
-
'Branch indexing failed, please check the
|
|
34420
|
+
'Branch indexing failed, please check the TinaCloud dashboard for more information. To try again chick "re-index" on the branch in the dashboard.'
|
|
33072
34421
|
);
|
|
33073
34422
|
setState("error");
|
|
33074
34423
|
}
|
|
@@ -33112,15 +34461,24 @@ const IndexingPage = () => {
|
|
|
33112
34461
|
}
|
|
33113
34462
|
}
|
|
33114
34463
|
if (state === "creatingPR") {
|
|
33115
|
-
|
|
33116
|
-
|
|
33117
|
-
|
|
33118
|
-
|
|
33119
|
-
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
|
|
33123
|
-
|
|
34464
|
+
try {
|
|
34465
|
+
const foo = await tinaApi.createPullRequest({
|
|
34466
|
+
baseBranch,
|
|
34467
|
+
branch,
|
|
34468
|
+
title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
|
|
34469
|
+
});
|
|
34470
|
+
console.log("PR created", foo);
|
|
34471
|
+
cms.alerts.success("Pull request created.");
|
|
34472
|
+
localStorage.setItem("tina.createBranchState", "done");
|
|
34473
|
+
setState("done");
|
|
34474
|
+
} catch (e) {
|
|
34475
|
+
console.error(e);
|
|
34476
|
+
cms.alerts.error("Failed to create PR");
|
|
34477
|
+
setErrorMessage(
|
|
34478
|
+
"Failed to create PR, please try again. If the problem persists please contact support."
|
|
34479
|
+
);
|
|
34480
|
+
setState("error");
|
|
34481
|
+
}
|
|
33124
34482
|
}
|
|
33125
34483
|
if (state === "done") {
|
|
33126
34484
|
window.location.href = back;
|
|
@@ -33227,7 +34585,7 @@ const CheckSchema = ({
|
|
|
33227
34585
|
);
|
|
33228
34586
|
}
|
|
33229
34587
|
}).catch((e) => {
|
|
33230
|
-
if (e.message.includes("has not been indexed by
|
|
34588
|
+
if (e.message.includes("has not been indexed by TinaCloud")) {
|
|
33231
34589
|
setSchemaMissingError(true);
|
|
33232
34590
|
} else {
|
|
33233
34591
|
cms.alerts.error(`Unexpected error checking schema: ${e}`);
|
|
@@ -33745,3 +35103,4 @@ export {
|
|
|
33745
35103
|
wrapFieldWithNoHeader,
|
|
33746
35104
|
wrapFieldsWithMeta
|
|
33747
35105
|
};
|
|
35106
|
+
//# sourceMappingURL=index.mjs.map
|