tinacms 0.0.0-de1bef5-20250124020627 → 0.0.0-df15996-20250420014759
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/auth/authenticate.d.ts +1 -1
- package/dist/client.d.ts +1 -4
- package/dist/client.js +10 -1
- package/dist/client.mjs +10 -1
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.d.ts +1 -61
- package/dist/index.js +2395 -1065
- package/dist/index.mjs +2403 -1073
- package/dist/internalClient/authProvider.d.ts +2 -0
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/react.d.ts +1 -33
- package/dist/react.js +13 -1
- package/dist/react.mjs +13 -1
- package/dist/rich-text/index.d.ts +1 -142
- package/dist/rich-text/prism.d.ts +1 -10
- 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/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/plugins/ui/components.d.ts +6 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +1 -1
- 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 +1 -1
- package/package.json +34 -34
- 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
15
|
import { useSelected, useReadOnly, ReactEditor } from "slate-react";
|
|
16
16
|
import { useCodeBlockElementState, useCodeSyntaxLeaf, ELEMENT_CODE_BLOCK as ELEMENT_CODE_BLOCK$1 } from "@udecode/plate-code-block";
|
|
17
17
|
import MonacoEditor, { loader, useMonaco } from "@monaco-editor/react";
|
|
18
|
-
import { Combobox, ComboboxInput, ComboboxButton, Transition, ComboboxOptions, ComboboxOption, Popover as Popover$3, PopoverButton, PopoverPanel, TransitionChild, Disclosure, DisclosureButton, DisclosurePanel, Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/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]: ({
|
|
@@ -4430,36 +4430,6 @@ function MdOutlineArrowBackIos(props) {
|
|
|
4430
4430
|
function MdOutlinePerson(props) {
|
|
4431
4431
|
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
4432
|
}
|
|
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
4433
|
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
4434
|
const disabledClasses$1 = "opacity-50 pointer-events-none cursor-not-allowed";
|
|
4465
4435
|
const BaseTextField = React.forwardRef(({ className, disabled, ...rest }, ref) => {
|
|
@@ -5224,7 +5194,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
|
|
|
5224
5194
|
side: "bottom",
|
|
5225
5195
|
className: cn(
|
|
5226
5196
|
"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-[
|
|
5197
|
+
"max-h-[30vh] max-w-[30vw] overflow-y-auto",
|
|
5228
5198
|
className
|
|
5229
5199
|
),
|
|
5230
5200
|
...props
|
|
@@ -5316,11 +5286,7 @@ const getFilename = (optionSets, value) => {
|
|
|
5316
5286
|
const node = nodes.find((node2) => node2.id === value);
|
|
5317
5287
|
return node ? node._internalSys.filename : null;
|
|
5318
5288
|
};
|
|
5319
|
-
const
|
|
5320
|
-
cms,
|
|
5321
|
-
input,
|
|
5322
|
-
field
|
|
5323
|
-
}) => {
|
|
5289
|
+
const Combobox = ({ cms, input, field }) => {
|
|
5324
5290
|
const [open2, setOpen] = React.useState(false);
|
|
5325
5291
|
const [value, setValue] = React.useState(input.value);
|
|
5326
5292
|
const [displayText, setDisplayText] = React.useState(null);
|
|
@@ -5336,7 +5302,9 @@ const ComboboxDemo = ({
|
|
|
5336
5302
|
}, [value, input, optionSets]);
|
|
5337
5303
|
React.useEffect(() => {
|
|
5338
5304
|
if (field.experimental___filter && optionSets.length > 0) {
|
|
5339
|
-
setFilteredOptionsList(
|
|
5305
|
+
setFilteredOptionsList(
|
|
5306
|
+
field.experimental___filter(optionSets, void 0)
|
|
5307
|
+
);
|
|
5340
5308
|
} else {
|
|
5341
5309
|
setFilteredOptionsList(optionSets);
|
|
5342
5310
|
}
|
|
@@ -5344,17 +5312,17 @@ const ComboboxDemo = ({
|
|
|
5344
5312
|
if (loading === true) {
|
|
5345
5313
|
return /* @__PURE__ */ React.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
|
|
5346
5314
|
}
|
|
5347
|
-
return /* @__PURE__ */ React.createElement(
|
|
5315
|
+
return /* @__PURE__ */ React.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
5348
5316
|
Button,
|
|
5349
5317
|
{
|
|
5350
5318
|
variant: "outline",
|
|
5351
5319
|
role: "combobox",
|
|
5352
5320
|
"aria-expanded": open2,
|
|
5353
|
-
className: "w-
|
|
5321
|
+
className: "w-full justify-between"
|
|
5354
5322
|
},
|
|
5355
5323
|
/* @__PURE__ */ React.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
|
|
5356
5324
|
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(
|
|
5325
|
+
)), /* @__PURE__ */ React.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React.createElement(
|
|
5358
5326
|
Command,
|
|
5359
5327
|
{
|
|
5360
5328
|
shouldFilter: !field.experimental___filter,
|
|
@@ -5378,32 +5346,25 @@ const ComboboxDemo = ({
|
|
|
5378
5346
|
}
|
|
5379
5347
|
),
|
|
5380
5348
|
/* @__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
|
-
}
|
|
5349
|
+
/* @__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 }) => {
|
|
5350
|
+
const { id, _values } = node;
|
|
5351
|
+
return /* @__PURE__ */ React.createElement(
|
|
5352
|
+
OptionComponent,
|
|
5353
|
+
{
|
|
5354
|
+
id,
|
|
5355
|
+
key: id,
|
|
5356
|
+
value,
|
|
5357
|
+
field,
|
|
5358
|
+
_values,
|
|
5359
|
+
node,
|
|
5360
|
+
onSelect: (currentValue) => {
|
|
5361
|
+
setValue(currentValue);
|
|
5362
|
+
setOpen(false);
|
|
5402
5363
|
}
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
))))
|
|
5406
|
-
)))
|
|
5364
|
+
}
|
|
5365
|
+
);
|
|
5366
|
+
}))))))
|
|
5367
|
+
)));
|
|
5407
5368
|
};
|
|
5408
5369
|
const useGetNode = (cms, id) => {
|
|
5409
5370
|
const [document2, setDocument] = React.useState(
|
|
@@ -5476,7 +5437,7 @@ const ReferenceLink = ({ cms, input }) => {
|
|
|
5476
5437
|
};
|
|
5477
5438
|
const Reference = ({ input, field }) => {
|
|
5478
5439
|
const cms = useCMS();
|
|
5479
|
-
return /* @__PURE__ */ React.createElement(
|
|
5440
|
+
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
5441
|
};
|
|
5481
5442
|
const ButtonToggle = ({
|
|
5482
5443
|
input,
|
|
@@ -5713,7 +5674,9 @@ const Item$2 = ({
|
|
|
5713
5674
|
onClick: () => {
|
|
5714
5675
|
const state = tinaForm.finalForm.getState();
|
|
5715
5676
|
if (state.invalid === true) {
|
|
5716
|
-
cms.alerts.error(
|
|
5677
|
+
cms.alerts.error(
|
|
5678
|
+
"Cannot navigate away from an invalid form."
|
|
5679
|
+
);
|
|
5717
5680
|
return;
|
|
5718
5681
|
}
|
|
5719
5682
|
cms.dispatch({
|
|
@@ -6297,7 +6260,9 @@ const BlockListItem = ({
|
|
|
6297
6260
|
onClick: () => {
|
|
6298
6261
|
const state = tinaForm.finalForm.getState();
|
|
6299
6262
|
if (state.invalid === true) {
|
|
6300
|
-
cms.alerts.error(
|
|
6263
|
+
cms.alerts.error(
|
|
6264
|
+
"Cannot navigate away from an invalid form."
|
|
6265
|
+
);
|
|
6301
6266
|
return;
|
|
6302
6267
|
}
|
|
6303
6268
|
cms.dispatch({
|
|
@@ -6779,28 +6744,28 @@ class DaysView extends React__default.Component {
|
|
|
6779
6744
|
}
|
|
6780
6745
|
renderDayHeaders() {
|
|
6781
6746
|
const locale = this.props.viewDate.localeData();
|
|
6782
|
-
|
|
6747
|
+
const dayItems = getDaysOfWeek(locale).map((day, index) => /* @__PURE__ */ React__default.createElement("th", { key: day + index, className: "dow" }, day));
|
|
6783
6748
|
return /* @__PURE__ */ React__default.createElement("tr", null, dayItems);
|
|
6784
6749
|
}
|
|
6785
6750
|
renderDays() {
|
|
6786
6751
|
const date = this.props.viewDate;
|
|
6787
6752
|
const startOfMonth = date.clone().startOf("month");
|
|
6788
6753
|
const endOfMonth = date.clone().endOf("month");
|
|
6789
|
-
|
|
6790
|
-
|
|
6754
|
+
const rows = [[], [], [], [], [], []];
|
|
6755
|
+
const startDate = date.clone().subtract(1, "months");
|
|
6791
6756
|
startDate.date(startDate.daysInMonth()).startOf("week");
|
|
6792
|
-
|
|
6757
|
+
const endDate = startDate.clone().add(42, "d");
|
|
6793
6758
|
let i = 0;
|
|
6794
6759
|
while (startDate.isBefore(endDate)) {
|
|
6795
|
-
|
|
6760
|
+
const row = getRow$2(rows, i++);
|
|
6796
6761
|
row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
|
|
6797
6762
|
startDate.add(1, "d");
|
|
6798
6763
|
}
|
|
6799
6764
|
return rows.map((r, i2) => /* @__PURE__ */ React__default.createElement("tr", { key: `${endDate.month()}_${i2}` }, r));
|
|
6800
6765
|
}
|
|
6801
6766
|
renderDay(date, startOfMonth, endOfMonth) {
|
|
6802
|
-
|
|
6803
|
-
|
|
6767
|
+
const selectedDate = this.props.selectedDate;
|
|
6768
|
+
const dayProps = {
|
|
6804
6769
|
key: date.format("M_D"),
|
|
6805
6770
|
"data-value": date.date(),
|
|
6806
6771
|
"data-month": date.month(),
|
|
@@ -6854,7 +6819,7 @@ function getRow$2(rows, day) {
|
|
|
6854
6819
|
}
|
|
6855
6820
|
function getDaysOfWeek(locale) {
|
|
6856
6821
|
const first = locale.firstDayOfWeek();
|
|
6857
|
-
|
|
6822
|
+
const dow = [];
|
|
6858
6823
|
let i = 0;
|
|
6859
6824
|
locale._weekdaysMin.forEach(function(day) {
|
|
6860
6825
|
dow[(7 + i++ - first) % 7] = day;
|
|
@@ -6872,7 +6837,7 @@ class MonthsView extends React__default.Component {
|
|
|
6872
6837
|
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
6838
|
}
|
|
6874
6839
|
renderNavigation() {
|
|
6875
|
-
|
|
6840
|
+
const year = this.props.viewDate.year();
|
|
6876
6841
|
return /* @__PURE__ */ React__default.createElement(
|
|
6877
6842
|
ViewNavigation,
|
|
6878
6843
|
{
|
|
@@ -6885,9 +6850,9 @@ class MonthsView extends React__default.Component {
|
|
|
6885
6850
|
);
|
|
6886
6851
|
}
|
|
6887
6852
|
renderMonths() {
|
|
6888
|
-
|
|
6853
|
+
const rows = [[], [], []];
|
|
6889
6854
|
for (let month = 0; month < 12; month++) {
|
|
6890
|
-
|
|
6855
|
+
const row = getRow$1(rows, month);
|
|
6891
6856
|
row.push(this.renderMonth(month));
|
|
6892
6857
|
}
|
|
6893
6858
|
return rows.map((months, i) => /* @__PURE__ */ React__default.createElement("tr", { key: i }, months));
|
|
@@ -6904,7 +6869,7 @@ class MonthsView extends React__default.Component {
|
|
|
6904
6869
|
if (selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month) {
|
|
6905
6870
|
className += " rdtActive";
|
|
6906
6871
|
}
|
|
6907
|
-
|
|
6872
|
+
const props = { key: month, className, "data-value": month, onClick };
|
|
6908
6873
|
if (this.props.renderMonth) {
|
|
6909
6874
|
return this.props.renderMonth(
|
|
6910
6875
|
props,
|
|
@@ -6916,11 +6881,11 @@ class MonthsView extends React__default.Component {
|
|
|
6916
6881
|
return /* @__PURE__ */ React__default.createElement("td", { ...props }, this.getMonthText(month));
|
|
6917
6882
|
}
|
|
6918
6883
|
isDisabledMonth(month) {
|
|
6919
|
-
|
|
6884
|
+
const isValidDate = this.props.isValidDate;
|
|
6920
6885
|
if (!isValidDate) {
|
|
6921
6886
|
return false;
|
|
6922
6887
|
}
|
|
6923
|
-
|
|
6888
|
+
const date = this.props.viewDate.clone().set({ month });
|
|
6924
6889
|
let day = date.endOf("month").date() + 1;
|
|
6925
6890
|
while (day-- > 1) {
|
|
6926
6891
|
if (isValidDate(date.date(day))) {
|
|
@@ -6972,9 +6937,9 @@ class YearsView extends React__default.Component {
|
|
|
6972
6937
|
}
|
|
6973
6938
|
renderYears() {
|
|
6974
6939
|
const viewYear = this.getViewYear();
|
|
6975
|
-
|
|
6940
|
+
const rows = [[], [], []];
|
|
6976
6941
|
for (let year = viewYear - 1; year < viewYear + 11; year++) {
|
|
6977
|
-
|
|
6942
|
+
const row = getRow(rows, year - viewYear);
|
|
6978
6943
|
row.push(this.renderYear(year));
|
|
6979
6944
|
}
|
|
6980
6945
|
return rows.map((years, i) => /* @__PURE__ */ React__default.createElement("tr", { key: i }, years));
|
|
@@ -6991,7 +6956,7 @@ class YearsView extends React__default.Component {
|
|
|
6991
6956
|
if (selectedYear === year) {
|
|
6992
6957
|
className += " rdtActive";
|
|
6993
6958
|
}
|
|
6994
|
-
|
|
6959
|
+
const props = { key: year, className, "data-value": year, onClick };
|
|
6995
6960
|
return this.props.renderYear(
|
|
6996
6961
|
props,
|
|
6997
6962
|
year,
|
|
@@ -7005,15 +6970,15 @@ class YearsView extends React__default.Component {
|
|
|
7005
6970
|
return this.props.selectedDate && this.props.selectedDate.year();
|
|
7006
6971
|
}
|
|
7007
6972
|
isDisabledYear(year) {
|
|
7008
|
-
|
|
6973
|
+
const cache = this.disabledYearsCache;
|
|
7009
6974
|
if (cache[year] !== void 0) {
|
|
7010
6975
|
return cache[year];
|
|
7011
6976
|
}
|
|
7012
|
-
|
|
6977
|
+
const isValidDate = this.props.isValidDate;
|
|
7013
6978
|
if (!isValidDate) {
|
|
7014
6979
|
return false;
|
|
7015
6980
|
}
|
|
7016
|
-
|
|
6981
|
+
const date = this.props.viewDate.clone().set({ year });
|
|
7017
6982
|
let day = date.endOf("year").dayOfYear() + 1;
|
|
7018
6983
|
while (day-- > 1) {
|
|
7019
6984
|
if (isValidDate(date.dayOfYear(day))) {
|
|
@@ -7060,7 +7025,7 @@ const timeConstraints = {
|
|
|
7060
7025
|
}
|
|
7061
7026
|
};
|
|
7062
7027
|
function createConstraints(overrideTimeConstraints) {
|
|
7063
|
-
|
|
7028
|
+
const constraints = {};
|
|
7064
7029
|
Object.keys(timeConstraints).forEach((type) => {
|
|
7065
7030
|
constraints[type] = {
|
|
7066
7031
|
...timeConstraints[type],
|
|
@@ -7076,7 +7041,7 @@ class TimeView extends React__default.Component {
|
|
|
7076
7041
|
this.state = this.getTimeParts(props.selectedDate || props.viewDate);
|
|
7077
7042
|
}
|
|
7078
7043
|
render() {
|
|
7079
|
-
|
|
7044
|
+
const items2 = [];
|
|
7080
7045
|
const timeParts = this.state;
|
|
7081
7046
|
this.getCounters().forEach((c, i) => {
|
|
7082
7047
|
if (i && c !== "ampm") {
|
|
@@ -7138,8 +7103,8 @@ class TimeView extends React__default.Component {
|
|
|
7138
7103
|
}
|
|
7139
7104
|
if (type === "ampm")
|
|
7140
7105
|
return this.toggleDayPart();
|
|
7141
|
-
|
|
7142
|
-
|
|
7106
|
+
const update = {};
|
|
7107
|
+
const body = document.body;
|
|
7143
7108
|
update[type] = this[action](type);
|
|
7144
7109
|
this.setState(update);
|
|
7145
7110
|
this.timer = setTimeout(() => {
|
|
@@ -7182,8 +7147,8 @@ class TimeView extends React__default.Component {
|
|
|
7182
7147
|
return pad(type, value);
|
|
7183
7148
|
}
|
|
7184
7149
|
getCounters() {
|
|
7185
|
-
|
|
7186
|
-
|
|
7150
|
+
const counters = [];
|
|
7151
|
+
const format2 = this.props.timeFormat;
|
|
7187
7152
|
if (format2.toLowerCase().indexOf("h") !== -1) {
|
|
7188
7153
|
counters.push("hours");
|
|
7189
7154
|
if (format2.indexOf("m") !== -1) {
|
|
@@ -7315,7 +7280,7 @@ class Datetime extends React__default.Component {
|
|
|
7315
7280
|
__publicField(this, "_renderCalendar", () => {
|
|
7316
7281
|
const props = this.props;
|
|
7317
7282
|
const state = this.state;
|
|
7318
|
-
|
|
7283
|
+
const viewProps = {
|
|
7319
7284
|
viewDate: state.viewDate.clone(),
|
|
7320
7285
|
selectedDate: this.getSelectedDate(),
|
|
7321
7286
|
isValidDate: props.isValidDate,
|
|
@@ -7358,10 +7323,10 @@ class Datetime extends React__default.Component {
|
|
|
7358
7323
|
__publicField(this, "viewToMethod", { days: "date", months: "month", years: "year" });
|
|
7359
7324
|
__publicField(this, "nextView", { days: "time", months: "days", years: "months" });
|
|
7360
7325
|
__publicField(this, "_updateDate", (e) => {
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7326
|
+
const state = this.state;
|
|
7327
|
+
const currentView = state.currentView;
|
|
7328
|
+
const updateOnView = this.getUpdateOn(this.getFormat("date"));
|
|
7329
|
+
const viewDate = this.state.viewDate.clone();
|
|
7365
7330
|
viewDate[this.viewToMethod[currentView]](
|
|
7366
7331
|
parseInt(e.target.getAttribute("data-value"), 10)
|
|
7367
7332
|
);
|
|
@@ -7369,7 +7334,7 @@ class Datetime extends React__default.Component {
|
|
|
7369
7334
|
viewDate.month(parseInt(e.target.getAttribute("data-month"), 10));
|
|
7370
7335
|
viewDate.year(parseInt(e.target.getAttribute("data-year"), 10));
|
|
7371
7336
|
}
|
|
7372
|
-
|
|
7337
|
+
const update = { viewDate };
|
|
7373
7338
|
if (currentView === updateOnView) {
|
|
7374
7339
|
update.selectedDate = viewDate.clone();
|
|
7375
7340
|
update.inputValue = viewDate.format(this.getFormat("datetime"));
|
|
@@ -7383,7 +7348,7 @@ class Datetime extends React__default.Component {
|
|
|
7383
7348
|
this.setState(update);
|
|
7384
7349
|
});
|
|
7385
7350
|
__publicField(this, "_viewNavigate", (modifier, unit) => {
|
|
7386
|
-
|
|
7351
|
+
const viewDate = this.state.viewDate.clone();
|
|
7387
7352
|
viewDate.add(modifier, unit);
|
|
7388
7353
|
if (modifier > 0) {
|
|
7389
7354
|
this.props.onNavigateForward(modifier, unit);
|
|
@@ -7393,7 +7358,7 @@ class Datetime extends React__default.Component {
|
|
|
7393
7358
|
this.setState({ viewDate });
|
|
7394
7359
|
});
|
|
7395
7360
|
__publicField(this, "_setTime", (type, value) => {
|
|
7396
|
-
|
|
7361
|
+
const date = (this.getSelectedDate() || this.state.viewDate).clone();
|
|
7397
7362
|
date[type](value);
|
|
7398
7363
|
if (!this.props.value) {
|
|
7399
7364
|
this.setState({
|
|
@@ -7417,7 +7382,7 @@ class Datetime extends React__default.Component {
|
|
|
7417
7382
|
});
|
|
7418
7383
|
});
|
|
7419
7384
|
__publicField(this, "_handleClickOutside", () => {
|
|
7420
|
-
|
|
7385
|
+
const props = this.props;
|
|
7421
7386
|
if (props.input && this.state.open && props.open === void 0 && props.closeOnClickOutside) {
|
|
7422
7387
|
this._closeCalendar();
|
|
7423
7388
|
}
|
|
@@ -7432,7 +7397,7 @@ class Datetime extends React__default.Component {
|
|
|
7432
7397
|
return;
|
|
7433
7398
|
const value = e.target ? e.target.value : e;
|
|
7434
7399
|
const localMoment = this.localMoment(value, this.getFormat("datetime"));
|
|
7435
|
-
|
|
7400
|
+
const update = { inputValue: value };
|
|
7436
7401
|
if (localMoment.isValid()) {
|
|
7437
7402
|
update.selectedDate = localMoment;
|
|
7438
7403
|
update.viewDate = localMoment.clone().startOf("month");
|
|
@@ -7496,9 +7461,9 @@ class Datetime extends React__default.Component {
|
|
|
7496
7461
|
return this.props.renderView(this.state.currentView, this._renderCalendar);
|
|
7497
7462
|
}
|
|
7498
7463
|
getInitialState() {
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7464
|
+
const props = this.props;
|
|
7465
|
+
const inputFormat = this.getFormat("datetime");
|
|
7466
|
+
const selectedDate = this.parseDate(
|
|
7502
7467
|
props.value || props.initialValue,
|
|
7503
7468
|
inputFormat
|
|
7504
7469
|
);
|
|
@@ -7529,7 +7494,7 @@ class Datetime extends React__default.Component {
|
|
|
7529
7494
|
return this.getInitialDate();
|
|
7530
7495
|
}
|
|
7531
7496
|
getInitialDate() {
|
|
7532
|
-
|
|
7497
|
+
const m = this.localMoment();
|
|
7533
7498
|
m.hour(0).minute(0).second(0).millisecond(0);
|
|
7534
7499
|
return m;
|
|
7535
7500
|
}
|
|
@@ -7549,8 +7514,8 @@ class Datetime extends React__default.Component {
|
|
|
7549
7514
|
}
|
|
7550
7515
|
getClassName() {
|
|
7551
7516
|
let cn2 = "rdt";
|
|
7552
|
-
|
|
7553
|
-
|
|
7517
|
+
const props = this.props;
|
|
7518
|
+
const propCn = props.className;
|
|
7554
7519
|
if (Array.isArray(propCn)) {
|
|
7555
7520
|
cn2 += " " + propCn.join(" ");
|
|
7556
7521
|
} else if (propCn) {
|
|
@@ -7583,14 +7548,14 @@ class Datetime extends React__default.Component {
|
|
|
7583
7548
|
return viewModes.DAYS;
|
|
7584
7549
|
}
|
|
7585
7550
|
getLocaleData() {
|
|
7586
|
-
|
|
7551
|
+
const p = this.props;
|
|
7587
7552
|
return this.localMoment(
|
|
7588
7553
|
p.value || p.defaultValue || /* @__PURE__ */ new Date()
|
|
7589
7554
|
).localeData();
|
|
7590
7555
|
}
|
|
7591
7556
|
getDateFormat() {
|
|
7592
7557
|
const locale = this.getLocaleData();
|
|
7593
|
-
|
|
7558
|
+
const format2 = this.props.dateFormat;
|
|
7594
7559
|
if (format2 === true)
|
|
7595
7560
|
return locale.longDateFormat("L");
|
|
7596
7561
|
if (format2)
|
|
@@ -7599,7 +7564,7 @@ class Datetime extends React__default.Component {
|
|
|
7599
7564
|
}
|
|
7600
7565
|
getTimeFormat() {
|
|
7601
7566
|
const locale = this.getLocaleData();
|
|
7602
|
-
|
|
7567
|
+
const format2 = this.props.timeFormat;
|
|
7603
7568
|
if (format2 === true) {
|
|
7604
7569
|
return locale.longDateFormat("LT");
|
|
7605
7570
|
}
|
|
@@ -7611,12 +7576,12 @@ class Datetime extends React__default.Component {
|
|
|
7611
7576
|
} else if (type === "time") {
|
|
7612
7577
|
return this.getTimeFormat();
|
|
7613
7578
|
}
|
|
7614
|
-
|
|
7615
|
-
|
|
7579
|
+
const dateFormat = this.getDateFormat();
|
|
7580
|
+
const timeFormat = this.getTimeFormat();
|
|
7616
7581
|
return dateFormat && timeFormat ? dateFormat + " " + timeFormat : dateFormat || timeFormat;
|
|
7617
7582
|
}
|
|
7618
7583
|
updateTime(op, amount, type, toSelected) {
|
|
7619
|
-
|
|
7584
|
+
const update = {};
|
|
7620
7585
|
const date = toSelected ? "selectedDate" : "viewDate";
|
|
7621
7586
|
update[date] = this.state[date].clone()[op](amount, type);
|
|
7622
7587
|
this.setState(update);
|
|
@@ -7649,7 +7614,7 @@ class Datetime extends React__default.Component {
|
|
|
7649
7614
|
if (prevProps === this.props)
|
|
7650
7615
|
return;
|
|
7651
7616
|
let needsUpdate = false;
|
|
7652
|
-
|
|
7617
|
+
const thisProps = this.props;
|
|
7653
7618
|
["locale", "utc", "displayZone", "dateFormat", "timeFormat"].forEach(
|
|
7654
7619
|
function(p) {
|
|
7655
7620
|
prevProps[p] !== thisProps[p] && (needsUpdate = true);
|
|
@@ -7665,8 +7630,8 @@ class Datetime extends React__default.Component {
|
|
|
7665
7630
|
}
|
|
7666
7631
|
regenerateDates() {
|
|
7667
7632
|
const props = this.props;
|
|
7668
|
-
|
|
7669
|
-
|
|
7633
|
+
const viewDate = this.state.viewDate.clone();
|
|
7634
|
+
const selectedDate = this.state.selectedDate && this.state.selectedDate.clone();
|
|
7670
7635
|
if (props.locale) {
|
|
7671
7636
|
viewDate.locale(props.locale);
|
|
7672
7637
|
selectedDate && selectedDate.locale(props.locale);
|
|
@@ -7681,7 +7646,7 @@ class Datetime extends React__default.Component {
|
|
|
7681
7646
|
viewDate.locale();
|
|
7682
7647
|
selectedDate && selectedDate.locale();
|
|
7683
7648
|
}
|
|
7684
|
-
|
|
7649
|
+
const update = { viewDate, selectedDate };
|
|
7685
7650
|
if (selectedDate && selectedDate.isValid()) {
|
|
7686
7651
|
update.inputValue = selectedDate.format(this.getFormat("datetime"));
|
|
7687
7652
|
}
|
|
@@ -7690,7 +7655,7 @@ class Datetime extends React__default.Component {
|
|
|
7690
7655
|
getSelectedDate() {
|
|
7691
7656
|
if (this.props.value === void 0)
|
|
7692
7657
|
return this.state.selectedDate;
|
|
7693
|
-
|
|
7658
|
+
const selectedDate = this.parseDate(
|
|
7694
7659
|
this.props.value,
|
|
7695
7660
|
this.getFormat("datetime")
|
|
7696
7661
|
);
|
|
@@ -7709,7 +7674,7 @@ class Datetime extends React__default.Component {
|
|
|
7709
7674
|
return "";
|
|
7710
7675
|
}
|
|
7711
7676
|
getInputValue() {
|
|
7712
|
-
|
|
7677
|
+
const selectedDate = this.getSelectedDate();
|
|
7713
7678
|
return selectedDate ? selectedDate.format(this.getFormat("datetime")) : this.state.inputValue;
|
|
7714
7679
|
}
|
|
7715
7680
|
/**
|
|
@@ -7719,7 +7684,7 @@ class Datetime extends React__default.Component {
|
|
|
7719
7684
|
* @public
|
|
7720
7685
|
*/
|
|
7721
7686
|
setViewDate(date) {
|
|
7722
|
-
|
|
7687
|
+
const logError = function() {
|
|
7723
7688
|
return log("Invalid date passed to the `setViewDate` method: " + date);
|
|
7724
7689
|
};
|
|
7725
7690
|
if (!date)
|
|
@@ -7815,7 +7780,7 @@ __publicField(Datetime, "defaultProps", {
|
|
|
7815
7780
|
// Make moment accessible through the Datetime class
|
|
7816
7781
|
__publicField(Datetime, "moment", moment);
|
|
7817
7782
|
function log(message, method) {
|
|
7818
|
-
|
|
7783
|
+
const con = typeof window !== "undefined" && window.console;
|
|
7819
7784
|
if (!con)
|
|
7820
7785
|
return;
|
|
7821
7786
|
if (!method) {
|
|
@@ -8068,9 +8033,6 @@ const PasswordFieldPlugin = {
|
|
|
8068
8033
|
},
|
|
8069
8034
|
parse: parse$2
|
|
8070
8035
|
};
|
|
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
8036
|
function AiFillWarning(props) {
|
|
8075
8037
|
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
8038
|
}
|
|
@@ -8089,6 +8051,39 @@ function FaSpinner(props) {
|
|
|
8089
8051
|
function FaUnlock(props) {
|
|
8090
8052
|
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
8053
|
}
|
|
8054
|
+
function GrCircleQuestion(props) {
|
|
8055
|
+
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);
|
|
8056
|
+
}
|
|
8057
|
+
const BranchContext = React.createContext({
|
|
8058
|
+
currentBranch: null,
|
|
8059
|
+
setCurrentBranch: (branch) => {
|
|
8060
|
+
console.warn("BranchContext not initialized");
|
|
8061
|
+
}
|
|
8062
|
+
});
|
|
8063
|
+
const BranchDataProvider = ({
|
|
8064
|
+
currentBranch,
|
|
8065
|
+
setCurrentBranch,
|
|
8066
|
+
children
|
|
8067
|
+
}) => {
|
|
8068
|
+
return /* @__PURE__ */ React.createElement(
|
|
8069
|
+
BranchContext.Provider,
|
|
8070
|
+
{
|
|
8071
|
+
value: {
|
|
8072
|
+
currentBranch,
|
|
8073
|
+
setCurrentBranch
|
|
8074
|
+
}
|
|
8075
|
+
},
|
|
8076
|
+
children
|
|
8077
|
+
);
|
|
8078
|
+
};
|
|
8079
|
+
const useBranchData = () => {
|
|
8080
|
+
const branchData = React.useContext(BranchContext);
|
|
8081
|
+
const { dispatch } = useEvent("branch:change");
|
|
8082
|
+
React.useEffect(() => {
|
|
8083
|
+
dispatch({ branchName: branchData.currentBranch });
|
|
8084
|
+
}, [branchData.currentBranch]);
|
|
8085
|
+
return branchData;
|
|
8086
|
+
};
|
|
8092
8087
|
function formatBranchName$1(str) {
|
|
8093
8088
|
const pattern = /[^/\w-]+/g;
|
|
8094
8089
|
const formattedStr = str.replace(pattern, "");
|
|
@@ -8187,7 +8182,7 @@ const BranchSwitcherLegacy = ({
|
|
|
8187
8182
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8188
8183
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8189
8184
|
},
|
|
8190
|
-
"Learn more about moving to production with
|
|
8185
|
+
"Learn more about moving to production with TinaCloud."
|
|
8191
8186
|
)), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement(
|
|
8192
8187
|
Button$1,
|
|
8193
8188
|
{
|
|
@@ -8423,7 +8418,7 @@ const EditoralBranchSwitcher = ({
|
|
|
8423
8418
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8424
8419
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8425
8420
|
},
|
|
8426
|
-
"Learn more about moving to production with
|
|
8421
|
+
"Learn more about moving to production with TinaCloud."
|
|
8427
8422
|
)), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement(
|
|
8428
8423
|
Button$1,
|
|
8429
8424
|
{
|
|
@@ -8638,7 +8633,10 @@ const BranchSelector = ({
|
|
|
8638
8633
|
label: "View in GitHub",
|
|
8639
8634
|
Icon: /* @__PURE__ */ React.createElement(BiLinkExternal, { className: "w-5 h-auto text-blue-500 opacity-70" }),
|
|
8640
8635
|
onMouseDown: () => {
|
|
8641
|
-
window.open(
|
|
8636
|
+
window.open(
|
|
8637
|
+
branch.githubPullRequestUrl,
|
|
8638
|
+
"_blank"
|
|
8639
|
+
);
|
|
8642
8640
|
}
|
|
8643
8641
|
},
|
|
8644
8642
|
typeof previewFunction === "function" && ((_b2 = previewFunction({ branch: branch.name })) == null ? void 0 : _b2.url) && {
|
|
@@ -8944,7 +8942,9 @@ class EventBus {
|
|
|
8944
8942
|
} else {
|
|
8945
8943
|
events = event;
|
|
8946
8944
|
}
|
|
8947
|
-
const newListeners = events.map(
|
|
8945
|
+
const newListeners = events.map(
|
|
8946
|
+
(event2) => new Listener(event2, callback)
|
|
8947
|
+
);
|
|
8948
8948
|
newListeners.forEach((newListener) => this.listeners.add(newListener));
|
|
8949
8949
|
return () => {
|
|
8950
8950
|
newListeners.forEach((listener) => this.listeners.delete(listener));
|
|
@@ -9300,9 +9300,7 @@ class TinaMediaStore {
|
|
|
9300
9300
|
const deleteStartTime = Date.now();
|
|
9301
9301
|
while (true) {
|
|
9302
9302
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
9303
|
-
const { error, message } = await this.api.getRequestStatus(
|
|
9304
|
-
requestId
|
|
9305
|
-
);
|
|
9303
|
+
const { error, message } = await this.api.getRequestStatus(requestId);
|
|
9306
9304
|
if (error !== void 0) {
|
|
9307
9305
|
if (error) {
|
|
9308
9306
|
throw new Error(message);
|
|
@@ -9330,11 +9328,8 @@ class TinaMediaStore {
|
|
|
9330
9328
|
const encodeUrlIfNeeded = (url) => {
|
|
9331
9329
|
if (url) {
|
|
9332
9330
|
try {
|
|
9333
|
-
|
|
9334
|
-
parsed.pathname = parsed.pathname.split("/").filter((part) => part !== "").map(encodeURIComponent).join("/");
|
|
9335
|
-
return parsed.toString();
|
|
9331
|
+
return new URL(url).toString();
|
|
9336
9332
|
} catch (e) {
|
|
9337
|
-
console.error("Failed to parse URL:", e);
|
|
9338
9333
|
return url;
|
|
9339
9334
|
}
|
|
9340
9335
|
} else {
|
|
@@ -9455,7 +9450,7 @@ const E_BAD_ROUTE = new MediaListError({
|
|
|
9455
9450
|
});
|
|
9456
9451
|
new MediaListError({
|
|
9457
9452
|
title: "An Error Occurred",
|
|
9458
|
-
message: "Something went wrong accessing your media from
|
|
9453
|
+
message: "Something went wrong accessing your media from TinaCloud.",
|
|
9459
9454
|
docsLink: ""
|
|
9460
9455
|
// TODO
|
|
9461
9456
|
});
|
|
@@ -9640,7 +9635,7 @@ let Alerts$1 = class Alerts {
|
|
|
9640
9635
|
return this.add("error", message, timeout);
|
|
9641
9636
|
}
|
|
9642
9637
|
};
|
|
9643
|
-
const
|
|
9638
|
+
const SidebarLoadingPlaceholder = () => /* @__PURE__ */ React.createElement(
|
|
9644
9639
|
"div",
|
|
9645
9640
|
{
|
|
9646
9641
|
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
@@ -9653,25 +9648,8 @@ const NoFormsPlaceholder = () => /* @__PURE__ */ React.createElement(
|
|
|
9653
9648
|
animationDuration: "150ms"
|
|
9654
9649
|
}
|
|
9655
9650
|
},
|
|
9656
|
-
/* @__PURE__ */ React.createElement(
|
|
9657
|
-
/* @__PURE__ */ React.createElement(
|
|
9658
|
-
/* @__PURE__ */ React.createElement("p", { className: "block" }, /* @__PURE__ */ React.createElement(
|
|
9659
|
-
Button$1,
|
|
9660
|
-
{
|
|
9661
|
-
href: "https://tina.io/docs/tinacms-context/",
|
|
9662
|
-
target: "_blank",
|
|
9663
|
-
as: "a"
|
|
9664
|
-
},
|
|
9665
|
-
/* @__PURE__ */ React.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
9666
|
-
" Contextual Editing"
|
|
9667
|
-
))
|
|
9668
|
-
);
|
|
9669
|
-
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
9670
|
-
"span",
|
|
9671
|
-
{
|
|
9672
|
-
className: `text-[24px] leading-none inline-block ${className}`,
|
|
9673
|
-
...props
|
|
9674
|
-
}
|
|
9651
|
+
/* @__PURE__ */ React.createElement("p", { className: "block pb-5" }, "Please wait while TinaCMS", /* @__PURE__ */ React.createElement("br", null), "loads your content"),
|
|
9652
|
+
/* @__PURE__ */ React.createElement(LoadingDots, { color: "var(--tina-color-primary)" })
|
|
9675
9653
|
);
|
|
9676
9654
|
class SidebarState {
|
|
9677
9655
|
constructor(events, options = {}) {
|
|
@@ -9686,7 +9664,7 @@ class SidebarState {
|
|
|
9686
9664
|
};
|
|
9687
9665
|
this.position = options.position || "displace";
|
|
9688
9666
|
this.renderNav = options.renderNav || true;
|
|
9689
|
-
this.
|
|
9667
|
+
this.loadingPlaceholder = options.placeholder || SidebarLoadingPlaceholder;
|
|
9690
9668
|
if ((_a = options.buttons) == null ? void 0 : _a.save) {
|
|
9691
9669
|
this.buttons.save = options.buttons.save;
|
|
9692
9670
|
}
|
|
@@ -9760,238 +9738,6 @@ const ModalLayout = ({ children, name, close: close2, layout }) => {
|
|
|
9760
9738
|
children
|
|
9761
9739
|
)));
|
|
9762
9740
|
};
|
|
9763
|
-
const Item = ({
|
|
9764
|
-
item,
|
|
9765
|
-
depth,
|
|
9766
|
-
setActiveFormId
|
|
9767
|
-
}) => {
|
|
9768
|
-
const cms = useCMS();
|
|
9769
|
-
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
9770
|
-
const form = React.useMemo(
|
|
9771
|
-
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
9772
|
-
[item.formId]
|
|
9773
|
-
);
|
|
9774
|
-
return /* @__PURE__ */ React.createElement(
|
|
9775
|
-
"button",
|
|
9776
|
-
{
|
|
9777
|
-
type: "button",
|
|
9778
|
-
key: item.path,
|
|
9779
|
-
onClick: () => setActiveFormId(item.formId),
|
|
9780
|
-
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`
|
|
9781
|
-
},
|
|
9782
|
-
/* @__PURE__ */ React.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
9783
|
-
/* @__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))
|
|
9784
|
-
);
|
|
9785
|
-
};
|
|
9786
|
-
const FormListItem = ({
|
|
9787
|
-
item,
|
|
9788
|
-
depth,
|
|
9789
|
-
setActiveFormId
|
|
9790
|
-
}) => {
|
|
9791
|
-
var _a;
|
|
9792
|
-
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) => {
|
|
9793
|
-
if (subItem.type === "document") {
|
|
9794
|
-
return /* @__PURE__ */ React.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React.createElement(
|
|
9795
|
-
Item,
|
|
9796
|
-
{
|
|
9797
|
-
setActiveFormId,
|
|
9798
|
-
depth: depth + 1,
|
|
9799
|
-
item: subItem
|
|
9800
|
-
}
|
|
9801
|
-
));
|
|
9802
|
-
}
|
|
9803
|
-
})));
|
|
9804
|
-
};
|
|
9805
|
-
const FormLists = (props) => {
|
|
9806
|
-
const cms = useCMS();
|
|
9807
|
-
return /* @__PURE__ */ React.createElement(
|
|
9808
|
-
Transition,
|
|
9809
|
-
{
|
|
9810
|
-
appear: true,
|
|
9811
|
-
show: true,
|
|
9812
|
-
as: "div",
|
|
9813
|
-
enter: "transition-all ease-out duration-150",
|
|
9814
|
-
enterFrom: "opacity-0 -translate-x-1/2",
|
|
9815
|
-
enterTo: "opacity-100",
|
|
9816
|
-
leave: "transition-all ease-out duration-150",
|
|
9817
|
-
leaveFrom: "opacity-100",
|
|
9818
|
-
leaveTo: "opacity-0 -translate-x-1/2"
|
|
9819
|
-
},
|
|
9820
|
-
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React.createElement(
|
|
9821
|
-
FormList,
|
|
9822
|
-
{
|
|
9823
|
-
isEditing: props.isEditing,
|
|
9824
|
-
setActiveFormId: (id) => {
|
|
9825
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
9826
|
-
},
|
|
9827
|
-
formList
|
|
9828
|
-
}
|
|
9829
|
-
)))
|
|
9830
|
-
);
|
|
9831
|
-
};
|
|
9832
|
-
const FormList = (props) => {
|
|
9833
|
-
const cms = useCMS();
|
|
9834
|
-
const listItems = React.useMemo(() => {
|
|
9835
|
-
var _a;
|
|
9836
|
-
const orderedListItems = [];
|
|
9837
|
-
const globalItems = [];
|
|
9838
|
-
const topItems = [];
|
|
9839
|
-
props.formList.items.forEach((item) => {
|
|
9840
|
-
if (item.type === "document") {
|
|
9841
|
-
const form = cms.state.forms.find(
|
|
9842
|
-
({ tinaForm }) => tinaForm.id === item.formId
|
|
9843
|
-
);
|
|
9844
|
-
if (form.tinaForm.global) {
|
|
9845
|
-
globalItems.push(item);
|
|
9846
|
-
} else {
|
|
9847
|
-
orderedListItems.push(item);
|
|
9848
|
-
}
|
|
9849
|
-
} else {
|
|
9850
|
-
orderedListItems.push(item);
|
|
9851
|
-
}
|
|
9852
|
-
});
|
|
9853
|
-
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
9854
|
-
topItems.push({ type: "list", label: "Documents" });
|
|
9855
|
-
}
|
|
9856
|
-
let extra = [];
|
|
9857
|
-
if (globalItems.length) {
|
|
9858
|
-
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
9859
|
-
}
|
|
9860
|
-
return [...topItems, ...orderedListItems, ...extra];
|
|
9861
|
-
}, [JSON.stringify(props.formList.items)]);
|
|
9862
|
-
return /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
9863
|
-
if (item.type === "list") {
|
|
9864
|
-
return /* @__PURE__ */ React.createElement(
|
|
9865
|
-
"div",
|
|
9866
|
-
{
|
|
9867
|
-
key: item.label,
|
|
9868
|
-
className: `relative group text-left w-full bg-white shadow-sm
|
|
9869
|
-
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"}`
|
|
9870
|
-
},
|
|
9871
|
-
/* @__PURE__ */ React.createElement(
|
|
9872
|
-
"span",
|
|
9873
|
-
{
|
|
9874
|
-
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
9875
|
-
},
|
|
9876
|
-
item.label
|
|
9877
|
-
)
|
|
9878
|
-
);
|
|
9879
|
-
}
|
|
9880
|
-
return /* @__PURE__ */ React.createElement(
|
|
9881
|
-
FormListItem,
|
|
9882
|
-
{
|
|
9883
|
-
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
9884
|
-
key: item.formId,
|
|
9885
|
-
item,
|
|
9886
|
-
depth: 0
|
|
9887
|
-
}
|
|
9888
|
-
);
|
|
9889
|
-
})));
|
|
9890
|
-
};
|
|
9891
|
-
const FormsView = ({
|
|
9892
|
-
children
|
|
9893
|
-
}) => {
|
|
9894
|
-
const cms = useCMS$1();
|
|
9895
|
-
const { setFormIsPristine } = React.useContext(SidebarContext);
|
|
9896
|
-
const isMultiform = cms.state.forms.length > 1;
|
|
9897
|
-
const activeForm = cms.state.forms.find(
|
|
9898
|
-
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
9899
|
-
);
|
|
9900
|
-
const isEditing = !!activeForm;
|
|
9901
|
-
if (!cms.state.formLists.length) {
|
|
9902
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, " ", children, " ");
|
|
9903
|
-
}
|
|
9904
|
-
if (isMultiform && !activeForm) {
|
|
9905
|
-
return /* @__PURE__ */ React.createElement(FormLists, { isEditing });
|
|
9906
|
-
}
|
|
9907
|
-
const formMetas = cms.plugins.all("form:meta");
|
|
9908
|
-
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 })));
|
|
9909
|
-
};
|
|
9910
|
-
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
9911
|
-
return /* @__PURE__ */ React.createElement(
|
|
9912
|
-
"div",
|
|
9913
|
-
{
|
|
9914
|
-
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
9915
|
-
style: isEditing ? {
|
|
9916
|
-
transform: "none",
|
|
9917
|
-
animationName: "fly-in-left",
|
|
9918
|
-
animationDuration: "150ms",
|
|
9919
|
-
animationDelay: "0",
|
|
9920
|
-
animationIterationCount: 1,
|
|
9921
|
-
animationTimingFunction: "ease-out"
|
|
9922
|
-
} : {
|
|
9923
|
-
transform: "translate3d(100%, 0, 0)"
|
|
9924
|
-
}
|
|
9925
|
-
},
|
|
9926
|
-
children
|
|
9927
|
-
);
|
|
9928
|
-
};
|
|
9929
|
-
const MultiformFormHeader = ({
|
|
9930
|
-
activeForm
|
|
9931
|
-
}) => {
|
|
9932
|
-
const cms = useCMS$1();
|
|
9933
|
-
const { formIsPristine } = React.useContext(SidebarContext);
|
|
9934
|
-
return /* @__PURE__ */ React.createElement(
|
|
9935
|
-
"div",
|
|
9936
|
-
{
|
|
9937
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9938
|
-
},
|
|
9939
|
-
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
9940
|
-
"button",
|
|
9941
|
-
{
|
|
9942
|
-
type: "button",
|
|
9943
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9944
|
-
onClick: () => {
|
|
9945
|
-
const state = activeForm.tinaForm.finalForm.getState();
|
|
9946
|
-
if (state.invalid === true) {
|
|
9947
|
-
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
9948
|
-
} else {
|
|
9949
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
9950
|
-
}
|
|
9951
|
-
}
|
|
9952
|
-
},
|
|
9953
|
-
/* @__PURE__ */ React.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9954
|
-
), /* @__PURE__ */ React.createElement(
|
|
9955
|
-
"button",
|
|
9956
|
-
{
|
|
9957
|
-
type: "button",
|
|
9958
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9959
|
-
onClick: () => {
|
|
9960
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9961
|
-
cms.state.activeFormId
|
|
9962
|
-
).name;
|
|
9963
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9964
|
-
}
|
|
9965
|
-
},
|
|
9966
|
-
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9967
|
-
), /* @__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 }))
|
|
9968
|
-
);
|
|
9969
|
-
};
|
|
9970
|
-
const FormHeader = ({ activeForm }) => {
|
|
9971
|
-
const { formIsPristine } = React.useContext(SidebarContext);
|
|
9972
|
-
const cms = useCMS$1();
|
|
9973
|
-
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
9974
|
-
return /* @__PURE__ */ React.createElement(
|
|
9975
|
-
"div",
|
|
9976
|
-
{
|
|
9977
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9978
|
-
},
|
|
9979
|
-
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
9980
|
-
"button",
|
|
9981
|
-
{
|
|
9982
|
-
type: "button",
|
|
9983
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9984
|
-
onClick: () => {
|
|
9985
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9986
|
-
cms.state.activeFormId
|
|
9987
|
-
).name;
|
|
9988
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9989
|
-
}
|
|
9990
|
-
},
|
|
9991
|
-
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9992
|
-
), shortFormLabel && /* @__PURE__ */ React.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
9993
|
-
);
|
|
9994
|
-
};
|
|
9995
9741
|
function ImFilesEmpty(props) {
|
|
9996
9742
|
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);
|
|
9997
9743
|
}
|
|
@@ -10234,7 +9980,7 @@ const SyncStatus = ({ cms, setEventsOpen }) => {
|
|
|
10234
9980
|
"Event Log"
|
|
10235
9981
|
));
|
|
10236
9982
|
};
|
|
10237
|
-
const version = "2.
|
|
9983
|
+
const version = "2.7.5";
|
|
10238
9984
|
const Nav = ({
|
|
10239
9985
|
isLocalMode,
|
|
10240
9986
|
className = "",
|
|
@@ -10476,6 +10222,293 @@ const ResizeHandle = () => {
|
|
|
10476
10222
|
/* @__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" })
|
|
10477
10223
|
);
|
|
10478
10224
|
};
|
|
10225
|
+
const Item = ({
|
|
10226
|
+
item,
|
|
10227
|
+
depth,
|
|
10228
|
+
setActiveFormId
|
|
10229
|
+
}) => {
|
|
10230
|
+
const cms = useCMS();
|
|
10231
|
+
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
10232
|
+
const form = React.useMemo(
|
|
10233
|
+
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
10234
|
+
[item.formId]
|
|
10235
|
+
);
|
|
10236
|
+
return /* @__PURE__ */ React.createElement(
|
|
10237
|
+
"button",
|
|
10238
|
+
{
|
|
10239
|
+
type: "button",
|
|
10240
|
+
key: item.path,
|
|
10241
|
+
onClick: () => setActiveFormId(item.formId),
|
|
10242
|
+
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`
|
|
10243
|
+
},
|
|
10244
|
+
/* @__PURE__ */ React.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
10245
|
+
/* @__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))
|
|
10246
|
+
);
|
|
10247
|
+
};
|
|
10248
|
+
const FormListItem = ({
|
|
10249
|
+
item,
|
|
10250
|
+
depth,
|
|
10251
|
+
setActiveFormId
|
|
10252
|
+
}) => {
|
|
10253
|
+
var _a;
|
|
10254
|
+
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) => {
|
|
10255
|
+
if (subItem.type === "document") {
|
|
10256
|
+
return /* @__PURE__ */ React.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React.createElement(
|
|
10257
|
+
Item,
|
|
10258
|
+
{
|
|
10259
|
+
setActiveFormId,
|
|
10260
|
+
depth: depth + 1,
|
|
10261
|
+
item: subItem
|
|
10262
|
+
}
|
|
10263
|
+
));
|
|
10264
|
+
}
|
|
10265
|
+
})));
|
|
10266
|
+
};
|
|
10267
|
+
const FormLists = (props) => {
|
|
10268
|
+
const cms = useCMS();
|
|
10269
|
+
return /* @__PURE__ */ React.createElement(
|
|
10270
|
+
Transition,
|
|
10271
|
+
{
|
|
10272
|
+
appear: true,
|
|
10273
|
+
show: true,
|
|
10274
|
+
as: "div",
|
|
10275
|
+
enter: "transition-all ease-out duration-150",
|
|
10276
|
+
enterFrom: "opacity-0 -translate-x-1/2",
|
|
10277
|
+
enterTo: "opacity-100",
|
|
10278
|
+
leave: "transition-all ease-out duration-150",
|
|
10279
|
+
leaveFrom: "opacity-100",
|
|
10280
|
+
leaveTo: "opacity-0 -translate-x-1/2"
|
|
10281
|
+
},
|
|
10282
|
+
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React.createElement(
|
|
10283
|
+
FormList,
|
|
10284
|
+
{
|
|
10285
|
+
isEditing: props.isEditing,
|
|
10286
|
+
setActiveFormId: (id) => {
|
|
10287
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
10288
|
+
},
|
|
10289
|
+
formList
|
|
10290
|
+
}
|
|
10291
|
+
)))
|
|
10292
|
+
);
|
|
10293
|
+
};
|
|
10294
|
+
const FormList = (props) => {
|
|
10295
|
+
const cms = useCMS();
|
|
10296
|
+
const listItems = React.useMemo(() => {
|
|
10297
|
+
var _a;
|
|
10298
|
+
const orderedListItems = [];
|
|
10299
|
+
const globalItems = [];
|
|
10300
|
+
const topItems = [];
|
|
10301
|
+
props.formList.items.forEach((item) => {
|
|
10302
|
+
if (item.type === "document") {
|
|
10303
|
+
const form = cms.state.forms.find(
|
|
10304
|
+
({ tinaForm }) => tinaForm.id === item.formId
|
|
10305
|
+
);
|
|
10306
|
+
if (form.tinaForm.global) {
|
|
10307
|
+
globalItems.push(item);
|
|
10308
|
+
} else {
|
|
10309
|
+
orderedListItems.push(item);
|
|
10310
|
+
}
|
|
10311
|
+
} else {
|
|
10312
|
+
orderedListItems.push(item);
|
|
10313
|
+
}
|
|
10314
|
+
});
|
|
10315
|
+
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
10316
|
+
topItems.push({ type: "list", label: "Documents" });
|
|
10317
|
+
}
|
|
10318
|
+
let extra = [];
|
|
10319
|
+
if (globalItems.length) {
|
|
10320
|
+
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
10321
|
+
}
|
|
10322
|
+
return [...topItems, ...orderedListItems, ...extra];
|
|
10323
|
+
}, [JSON.stringify(props.formList.items)]);
|
|
10324
|
+
return /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
10325
|
+
if (item.type === "list") {
|
|
10326
|
+
return /* @__PURE__ */ React.createElement(
|
|
10327
|
+
"div",
|
|
10328
|
+
{
|
|
10329
|
+
key: item.label,
|
|
10330
|
+
className: `relative group text-left w-full bg-white shadow-sm
|
|
10331
|
+
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"}`
|
|
10332
|
+
},
|
|
10333
|
+
/* @__PURE__ */ React.createElement(
|
|
10334
|
+
"span",
|
|
10335
|
+
{
|
|
10336
|
+
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
10337
|
+
},
|
|
10338
|
+
item.label
|
|
10339
|
+
)
|
|
10340
|
+
);
|
|
10341
|
+
}
|
|
10342
|
+
return /* @__PURE__ */ React.createElement(
|
|
10343
|
+
FormListItem,
|
|
10344
|
+
{
|
|
10345
|
+
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
10346
|
+
key: item.formId,
|
|
10347
|
+
item,
|
|
10348
|
+
depth: 0
|
|
10349
|
+
}
|
|
10350
|
+
);
|
|
10351
|
+
})));
|
|
10352
|
+
};
|
|
10353
|
+
const SidebarNoFormsPlaceholder = () => /* @__PURE__ */ React.createElement(
|
|
10354
|
+
"div",
|
|
10355
|
+
{
|
|
10356
|
+
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
10357
|
+
style: {
|
|
10358
|
+
animationName: "fade-in",
|
|
10359
|
+
animationDelay: "300ms",
|
|
10360
|
+
animationTimingFunction: "ease-out",
|
|
10361
|
+
animationIterationCount: 1,
|
|
10362
|
+
animationFillMode: "both",
|
|
10363
|
+
animationDuration: "150ms"
|
|
10364
|
+
}
|
|
10365
|
+
},
|
|
10366
|
+
/* @__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."),
|
|
10367
|
+
/* @__PURE__ */ React.createElement("p", { className: "block pt-5" }, /* @__PURE__ */ React.createElement(
|
|
10368
|
+
Button$1,
|
|
10369
|
+
{
|
|
10370
|
+
href: "https://tina.io/docs/contextual-editing/overview",
|
|
10371
|
+
target: "_blank",
|
|
10372
|
+
as: "a"
|
|
10373
|
+
},
|
|
10374
|
+
/* @__PURE__ */ React.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
10375
|
+
" Contextual Editing Docs"
|
|
10376
|
+
))
|
|
10377
|
+
);
|
|
10378
|
+
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
10379
|
+
"span",
|
|
10380
|
+
{
|
|
10381
|
+
className: `text-[24px] leading-none inline-block ${className}`,
|
|
10382
|
+
...props
|
|
10383
|
+
}
|
|
10384
|
+
);
|
|
10385
|
+
const minimumTimeToShowLoadingIndicator = 1e3;
|
|
10386
|
+
const FormsView = ({ loadingPlaceholder } = {}) => {
|
|
10387
|
+
const cms = useCMS$1();
|
|
10388
|
+
const { setFormIsPristine } = React.useContext(SidebarContext);
|
|
10389
|
+
const [isShowingLoading, setIsShowingLoading] = React.useState(true);
|
|
10390
|
+
const [initialLoadComplete, setInitialLoadComplete] = React.useState(false);
|
|
10391
|
+
React.useEffect(() => {
|
|
10392
|
+
if (cms.state.isLoadingContent) {
|
|
10393
|
+
setIsShowingLoading(true);
|
|
10394
|
+
const timer = setTimeout(() => {
|
|
10395
|
+
if (!cms.state.isLoadingContent) {
|
|
10396
|
+
setIsShowingLoading(false);
|
|
10397
|
+
setInitialLoadComplete(true);
|
|
10398
|
+
}
|
|
10399
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10400
|
+
return () => clearTimeout(timer);
|
|
10401
|
+
} else {
|
|
10402
|
+
const timer = setTimeout(() => {
|
|
10403
|
+
setIsShowingLoading(false);
|
|
10404
|
+
setInitialLoadComplete(true);
|
|
10405
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10406
|
+
return () => clearTimeout(timer);
|
|
10407
|
+
}
|
|
10408
|
+
}, [cms.state.isLoadingContent]);
|
|
10409
|
+
if (isShowingLoading || !initialLoadComplete) {
|
|
10410
|
+
const LoadingPlaceholder = loadingPlaceholder || SidebarLoadingPlaceholder;
|
|
10411
|
+
return /* @__PURE__ */ React.createElement(LoadingPlaceholder, null);
|
|
10412
|
+
}
|
|
10413
|
+
if (!cms.state.formLists.length) {
|
|
10414
|
+
return /* @__PURE__ */ React.createElement(SidebarNoFormsPlaceholder, null);
|
|
10415
|
+
}
|
|
10416
|
+
const isMultiform = cms.state.forms.length > 1;
|
|
10417
|
+
const activeForm = cms.state.forms.find(
|
|
10418
|
+
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
10419
|
+
);
|
|
10420
|
+
const isEditing = !!activeForm;
|
|
10421
|
+
if (isMultiform && !activeForm) {
|
|
10422
|
+
return /* @__PURE__ */ React.createElement(FormLists, { isEditing });
|
|
10423
|
+
}
|
|
10424
|
+
const formMetas = cms.plugins.all("form:meta");
|
|
10425
|
+
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 })));
|
|
10426
|
+
};
|
|
10427
|
+
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
10428
|
+
return /* @__PURE__ */ React.createElement(
|
|
10429
|
+
"div",
|
|
10430
|
+
{
|
|
10431
|
+
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
10432
|
+
style: isEditing ? {
|
|
10433
|
+
transform: "none",
|
|
10434
|
+
animationName: "fly-in-left",
|
|
10435
|
+
animationDuration: "150ms",
|
|
10436
|
+
animationDelay: "0",
|
|
10437
|
+
animationIterationCount: 1,
|
|
10438
|
+
animationTimingFunction: "ease-out"
|
|
10439
|
+
} : {
|
|
10440
|
+
transform: "translate3d(100%, 0, 0)"
|
|
10441
|
+
}
|
|
10442
|
+
},
|
|
10443
|
+
children
|
|
10444
|
+
);
|
|
10445
|
+
};
|
|
10446
|
+
const MultiformFormHeader = ({
|
|
10447
|
+
activeForm
|
|
10448
|
+
}) => {
|
|
10449
|
+
const cms = useCMS$1();
|
|
10450
|
+
const { formIsPristine } = React.useContext(SidebarContext);
|
|
10451
|
+
return /* @__PURE__ */ React.createElement(
|
|
10452
|
+
"div",
|
|
10453
|
+
{
|
|
10454
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10455
|
+
},
|
|
10456
|
+
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
10457
|
+
"button",
|
|
10458
|
+
{
|
|
10459
|
+
type: "button",
|
|
10460
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10461
|
+
onClick: () => {
|
|
10462
|
+
const state = activeForm.tinaForm.finalForm.getState();
|
|
10463
|
+
if (state.invalid === true) {
|
|
10464
|
+
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
10465
|
+
} else {
|
|
10466
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
10467
|
+
}
|
|
10468
|
+
}
|
|
10469
|
+
},
|
|
10470
|
+
/* @__PURE__ */ React.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10471
|
+
), /* @__PURE__ */ React.createElement(
|
|
10472
|
+
"button",
|
|
10473
|
+
{
|
|
10474
|
+
type: "button",
|
|
10475
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10476
|
+
onClick: () => {
|
|
10477
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10478
|
+
cms.state.activeFormId
|
|
10479
|
+
).name;
|
|
10480
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10481
|
+
}
|
|
10482
|
+
},
|
|
10483
|
+
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10484
|
+
), /* @__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 }))
|
|
10485
|
+
);
|
|
10486
|
+
};
|
|
10487
|
+
const FormHeader = ({ activeForm }) => {
|
|
10488
|
+
const { formIsPristine } = React.useContext(SidebarContext);
|
|
10489
|
+
const cms = useCMS$1();
|
|
10490
|
+
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
10491
|
+
return /* @__PURE__ */ React.createElement(
|
|
10492
|
+
"div",
|
|
10493
|
+
{
|
|
10494
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10495
|
+
},
|
|
10496
|
+
/* @__PURE__ */ React.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React.createElement(
|
|
10497
|
+
"button",
|
|
10498
|
+
{
|
|
10499
|
+
type: "button",
|
|
10500
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10501
|
+
onClick: () => {
|
|
10502
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10503
|
+
cms.state.activeFormId
|
|
10504
|
+
).name;
|
|
10505
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10506
|
+
}
|
|
10507
|
+
},
|
|
10508
|
+
/* @__PURE__ */ React.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10509
|
+
), shortFormLabel && /* @__PURE__ */ React.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
10510
|
+
);
|
|
10511
|
+
};
|
|
10479
10512
|
const SidebarContext = React.createContext(null);
|
|
10480
10513
|
const minPreviewWidth = 440;
|
|
10481
10514
|
const minSidebarWidth = 360;
|
|
@@ -10694,7 +10727,7 @@ const Sidebar$1 = ({
|
|
|
10694
10727
|
isLocalMode: (_d = (_c = cms.api) == null ? void 0 : _c.tina) == null ? void 0 : _d.isLocalMode,
|
|
10695
10728
|
branchingEnabled
|
|
10696
10729
|
}
|
|
10697
|
-
), /* @__PURE__ */ React.createElement(FormsView,
|
|
10730
|
+
), /* @__PURE__ */ React.createElement(FormsView, { loadingPlaceholder: sidebar.loadingPlaceholder }), activeScreen && /* @__PURE__ */ React.createElement(
|
|
10698
10731
|
ScreenPluginModal,
|
|
10699
10732
|
{
|
|
10700
10733
|
screen: activeScreen,
|
|
@@ -10870,7 +10903,7 @@ const SidebarHeader = ({
|
|
|
10870
10903
|
className: "h-5 w-auto -mx-1 text-blue-500",
|
|
10871
10904
|
stroke: "currentColor",
|
|
10872
10905
|
fill: "currentColor",
|
|
10873
|
-
|
|
10906
|
+
strokeWidth: "0",
|
|
10874
10907
|
viewBox: "0 0 24 24",
|
|
10875
10908
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10876
10909
|
},
|
|
@@ -11010,6 +11043,93 @@ function createPlaceholder(name, _pr) {
|
|
|
11010
11043
|
);
|
|
11011
11044
|
};
|
|
11012
11045
|
}
|
|
11046
|
+
function dirname(path) {
|
|
11047
|
+
var _a, _b;
|
|
11048
|
+
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11049
|
+
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11050
|
+
}
|
|
11051
|
+
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React__default.createElement(
|
|
11052
|
+
"button",
|
|
11053
|
+
{
|
|
11054
|
+
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11055
|
+
...props
|
|
11056
|
+
}
|
|
11057
|
+
);
|
|
11058
|
+
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11059
|
+
directory = directory.replace(/^\/|\/$/g, "");
|
|
11060
|
+
let prevDir = dirname(directory) || "";
|
|
11061
|
+
if (prevDir === ".") {
|
|
11062
|
+
prevDir = "";
|
|
11063
|
+
}
|
|
11064
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React__default.createElement(
|
|
11065
|
+
IconButton,
|
|
11066
|
+
{
|
|
11067
|
+
variant: "ghost",
|
|
11068
|
+
className: "mr-2",
|
|
11069
|
+
onClick: () => setDirectory(prevDir)
|
|
11070
|
+
},
|
|
11071
|
+
/* @__PURE__ */ React__default.createElement(
|
|
11072
|
+
LeftArrowIcon,
|
|
11073
|
+
{
|
|
11074
|
+
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11075
|
+
}
|
|
11076
|
+
)
|
|
11077
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
11078
|
+
BreadcrumbButton,
|
|
11079
|
+
{
|
|
11080
|
+
onClick: () => setDirectory(""),
|
|
11081
|
+
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11082
|
+
},
|
|
11083
|
+
"Media"
|
|
11084
|
+
), directory && directory.split("/").map((part, index, parts) => {
|
|
11085
|
+
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11086
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
11087
|
+
BreadcrumbButton,
|
|
11088
|
+
{
|
|
11089
|
+
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11090
|
+
key: currentDir,
|
|
11091
|
+
onClick: () => {
|
|
11092
|
+
setDirectory(currentDir);
|
|
11093
|
+
}
|
|
11094
|
+
},
|
|
11095
|
+
part
|
|
11096
|
+
);
|
|
11097
|
+
}));
|
|
11098
|
+
}
|
|
11099
|
+
const CopyField = ({ label, description, value }) => {
|
|
11100
|
+
const [copied, setCopied] = React__default.useState(false);
|
|
11101
|
+
const [fadeOut, setFadeOut] = React__default.useState(false);
|
|
11102
|
+
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(
|
|
11103
|
+
"span",
|
|
11104
|
+
{
|
|
11105
|
+
onClick: () => {
|
|
11106
|
+
if (copied === true)
|
|
11107
|
+
return;
|
|
11108
|
+
setCopied(true);
|
|
11109
|
+
setTimeout(() => {
|
|
11110
|
+
setFadeOut(true);
|
|
11111
|
+
}, 2500);
|
|
11112
|
+
setTimeout(() => {
|
|
11113
|
+
setCopied(false);
|
|
11114
|
+
setFadeOut(false);
|
|
11115
|
+
}, 3e3);
|
|
11116
|
+
navigator.clipboard.writeText(value);
|
|
11117
|
+
},
|
|
11118
|
+
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` : ``}`
|
|
11119
|
+
},
|
|
11120
|
+
/* @__PURE__ */ React__default.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11121
|
+
" ",
|
|
11122
|
+
value,
|
|
11123
|
+
" ",
|
|
11124
|
+
copied && /* @__PURE__ */ React__default.createElement(
|
|
11125
|
+
"span",
|
|
11126
|
+
{
|
|
11127
|
+
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`
|
|
11128
|
+
},
|
|
11129
|
+
/* @__PURE__ */ React__default.createElement("span", null, "Copied to clipboard!")
|
|
11130
|
+
)
|
|
11131
|
+
), description && /* @__PURE__ */ React__default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11132
|
+
};
|
|
11013
11133
|
function ListMediaItem({ item, onClick, active }) {
|
|
11014
11134
|
let FileIcon = BiFile;
|
|
11015
11135
|
if (item.type === "dir") {
|
|
@@ -11085,59 +11205,6 @@ function GridMediaItem({ item, active, onClick }) {
|
|
|
11085
11205
|
)
|
|
11086
11206
|
);
|
|
11087
11207
|
}
|
|
11088
|
-
function dirname(path) {
|
|
11089
|
-
var _a, _b;
|
|
11090
|
-
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11091
|
-
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11092
|
-
}
|
|
11093
|
-
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React__default.createElement(
|
|
11094
|
-
"button",
|
|
11095
|
-
{
|
|
11096
|
-
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11097
|
-
...props
|
|
11098
|
-
}
|
|
11099
|
-
);
|
|
11100
|
-
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11101
|
-
directory = directory.replace(/^\/|\/$/g, "");
|
|
11102
|
-
let prevDir = dirname(directory) || "";
|
|
11103
|
-
if (prevDir === ".") {
|
|
11104
|
-
prevDir = "";
|
|
11105
|
-
}
|
|
11106
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React__default.createElement(
|
|
11107
|
-
IconButton,
|
|
11108
|
-
{
|
|
11109
|
-
variant: "ghost",
|
|
11110
|
-
className: "mr-2",
|
|
11111
|
-
onClick: () => setDirectory(prevDir)
|
|
11112
|
-
},
|
|
11113
|
-
/* @__PURE__ */ React__default.createElement(
|
|
11114
|
-
LeftArrowIcon,
|
|
11115
|
-
{
|
|
11116
|
-
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11117
|
-
}
|
|
11118
|
-
)
|
|
11119
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
11120
|
-
BreadcrumbButton,
|
|
11121
|
-
{
|
|
11122
|
-
onClick: () => setDirectory(""),
|
|
11123
|
-
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11124
|
-
},
|
|
11125
|
-
"Media"
|
|
11126
|
-
), directory && directory.split("/").map((part, index, parts) => {
|
|
11127
|
-
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11128
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
11129
|
-
BreadcrumbButton,
|
|
11130
|
-
{
|
|
11131
|
-
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11132
|
-
key: currentDir,
|
|
11133
|
-
onClick: () => {
|
|
11134
|
-
setDirectory(currentDir);
|
|
11135
|
-
}
|
|
11136
|
-
},
|
|
11137
|
-
part
|
|
11138
|
-
);
|
|
11139
|
-
}));
|
|
11140
|
-
}
|
|
11141
11208
|
const DeleteModal$1 = ({
|
|
11142
11209
|
close: close2,
|
|
11143
11210
|
deleteFunc,
|
|
@@ -11191,40 +11258,6 @@ const NewFolderModal = ({ onSubmit, close: close2 }) => {
|
|
|
11191
11258
|
"Create New Folder"
|
|
11192
11259
|
))));
|
|
11193
11260
|
};
|
|
11194
|
-
const CopyField = ({ label, description, value }) => {
|
|
11195
|
-
const [copied, setCopied] = React__default.useState(false);
|
|
11196
|
-
const [fadeOut, setFadeOut] = React__default.useState(false);
|
|
11197
|
-
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(
|
|
11198
|
-
"span",
|
|
11199
|
-
{
|
|
11200
|
-
onClick: () => {
|
|
11201
|
-
if (copied === true)
|
|
11202
|
-
return;
|
|
11203
|
-
setCopied(true);
|
|
11204
|
-
setTimeout(() => {
|
|
11205
|
-
setFadeOut(true);
|
|
11206
|
-
}, 2500);
|
|
11207
|
-
setTimeout(() => {
|
|
11208
|
-
setCopied(false);
|
|
11209
|
-
setFadeOut(false);
|
|
11210
|
-
}, 3e3);
|
|
11211
|
-
navigator.clipboard.writeText(value);
|
|
11212
|
-
},
|
|
11213
|
-
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` : ``}`
|
|
11214
|
-
},
|
|
11215
|
-
/* @__PURE__ */ React__default.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11216
|
-
" ",
|
|
11217
|
-
value,
|
|
11218
|
-
" ",
|
|
11219
|
-
copied && /* @__PURE__ */ React__default.createElement(
|
|
11220
|
-
"span",
|
|
11221
|
-
{
|
|
11222
|
-
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`
|
|
11223
|
-
},
|
|
11224
|
-
/* @__PURE__ */ React__default.createElement("span", null, "Copied to clipboard!")
|
|
11225
|
-
)
|
|
11226
|
-
), description && /* @__PURE__ */ React__default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11227
|
-
};
|
|
11228
11261
|
const { useDropzone } = dropzone;
|
|
11229
11262
|
const join = function(...parts) {
|
|
11230
11263
|
const [first, last, slash] = [0, parts.length - 1, "/"];
|
|
@@ -11460,7 +11493,10 @@ function MediaPicker({
|
|
|
11460
11493
|
const observer = new IntersectionObserver((entries) => {
|
|
11461
11494
|
const target = entries[0];
|
|
11462
11495
|
if (target.isIntersecting && list.nextOffset) {
|
|
11463
|
-
setOffsetHistory((offsetHistory2) => [
|
|
11496
|
+
setOffsetHistory((offsetHistory2) => [
|
|
11497
|
+
...offsetHistory2,
|
|
11498
|
+
list.nextOffset
|
|
11499
|
+
]);
|
|
11464
11500
|
}
|
|
11465
11501
|
});
|
|
11466
11502
|
if (loaderRef.current) {
|
|
@@ -11723,7 +11759,7 @@ const SyncStatusContainer = ({ children }) => {
|
|
|
11723
11759
|
target: "_blank",
|
|
11724
11760
|
href: `${cms.api.tina.appDashboardLink}/media`
|
|
11725
11761
|
},
|
|
11726
|
-
"Sync Your Media In
|
|
11762
|
+
"Sync Your Media In TinaCloud.",
|
|
11727
11763
|
/* @__PURE__ */ React__default.createElement(BiLinkExternal, { className: `w-5 h-auto flex-shrink-0` })
|
|
11728
11764
|
)
|
|
11729
11765
|
)))) : /* @__PURE__ */ React__default.createElement(SyncStatusContext.Provider, { value: { syncStatus } }, children);
|
|
@@ -12055,6 +12091,7 @@ const initialState = (cms) => {
|
|
|
12055
12091
|
forms: [],
|
|
12056
12092
|
formLists: [],
|
|
12057
12093
|
editingMode: "basic",
|
|
12094
|
+
isLoadingContent: false,
|
|
12058
12095
|
quickEditSupported: false,
|
|
12059
12096
|
sidebarDisplayState: ((_a = cms == null ? void 0 : cms.sidebar) == null ? void 0 : _a.defaultState) || "open"
|
|
12060
12097
|
};
|
|
@@ -12114,7 +12151,12 @@ function tinaReducer(state, action) {
|
|
|
12114
12151
|
}
|
|
12115
12152
|
});
|
|
12116
12153
|
}
|
|
12117
|
-
return {
|
|
12154
|
+
return {
|
|
12155
|
+
...state,
|
|
12156
|
+
activeFormId,
|
|
12157
|
+
formLists: nextFormLists,
|
|
12158
|
+
isLoadingContent: false
|
|
12159
|
+
};
|
|
12118
12160
|
}
|
|
12119
12161
|
case "form-lists:remove": {
|
|
12120
12162
|
const nextFormLists = state.formLists.filter(
|
|
@@ -12183,6 +12225,9 @@ function tinaReducer(state, action) {
|
|
|
12183
12225
|
}
|
|
12184
12226
|
return { ...state, sidebarDisplayState: action.value };
|
|
12185
12227
|
}
|
|
12228
|
+
case "sidebar:set-loading-state": {
|
|
12229
|
+
return { ...state, isLoadingContent: action.value };
|
|
12230
|
+
}
|
|
12186
12231
|
default:
|
|
12187
12232
|
throw new Error(`Unhandled action ${action.type}`);
|
|
12188
12233
|
}
|
|
@@ -12424,7 +12469,9 @@ const ActiveFieldIndicator = () => {
|
|
|
12424
12469
|
if (activeEle) {
|
|
12425
12470
|
setDisplay(true);
|
|
12426
12471
|
setPosition(activeEle.getBoundingClientRect());
|
|
12427
|
-
const iframe = document.getElementById(
|
|
12472
|
+
const iframe = document.getElementById(
|
|
12473
|
+
"tina-iframe"
|
|
12474
|
+
);
|
|
12428
12475
|
if (iframe) {
|
|
12429
12476
|
setIframePosition(iframe.getBoundingClientRect());
|
|
12430
12477
|
}
|
|
@@ -12866,7 +12913,6 @@ const CreateBranchModel = ({
|
|
|
12866
12913
|
}) => {
|
|
12867
12914
|
const cms = useCMS$1();
|
|
12868
12915
|
const tinaApi = cms.api.tina;
|
|
12869
|
-
tinaApi.branch;
|
|
12870
12916
|
const [disabled, setDisabled] = React.useState(false);
|
|
12871
12917
|
const [newBranchName, setNewBranchName] = React.useState("");
|
|
12872
12918
|
const [error, setError] = React.useState("");
|
|
@@ -12892,10 +12938,10 @@ const CreateBranchModel = ({
|
|
|
12892
12938
|
const newUrl = window.location.href.replace(hash, newHash);
|
|
12893
12939
|
window.location.href = newUrl;
|
|
12894
12940
|
};
|
|
12895
|
-
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-
|
|
12941
|
+
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(
|
|
12896
12942
|
PrefixedTextField,
|
|
12897
12943
|
{
|
|
12898
|
-
placeholder: "
|
|
12944
|
+
placeholder: "e.g. {{PAGE-NAME}}-updates",
|
|
12899
12945
|
value: newBranchName,
|
|
12900
12946
|
onChange: (e) => {
|
|
12901
12947
|
setError("");
|
|
@@ -13042,7 +13088,9 @@ const ImgEmbed = ({
|
|
|
13042
13088
|
const { fieldName } = useTemplates();
|
|
13043
13089
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13044
13090
|
useHotkey("enter", () => {
|
|
13045
|
-
insertNodes(editor, [
|
|
13091
|
+
insertNodes(editor, [
|
|
13092
|
+
{ type: ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13093
|
+
]);
|
|
13046
13094
|
});
|
|
13047
13095
|
return /* @__PURE__ */ React__default.createElement("span", { ...attributes, className: "" }, children, element.url ? /* @__PURE__ */ React__default.createElement(
|
|
13048
13096
|
"div",
|
|
@@ -13185,7 +13233,9 @@ const InlineEmbed = ({
|
|
|
13185
13233
|
const { templates, fieldName } = useTemplates();
|
|
13186
13234
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13187
13235
|
useHotkey("enter", () => {
|
|
13188
|
-
insertNodes(editor, [
|
|
13236
|
+
insertNodes(editor, [
|
|
13237
|
+
{ type: ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13238
|
+
]);
|
|
13189
13239
|
});
|
|
13190
13240
|
useHotkey("space", () => {
|
|
13191
13241
|
insertNodes(editor, [{ text: " " }], {
|
|
@@ -13241,7 +13291,9 @@ const BlockEmbed = ({
|
|
|
13241
13291
|
const { templates, fieldName } = useTemplates();
|
|
13242
13292
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13243
13293
|
useHotkey("enter", () => {
|
|
13244
|
-
insertNodes(editor, [
|
|
13294
|
+
insertNodes(editor, [
|
|
13295
|
+
{ type: ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13296
|
+
]);
|
|
13245
13297
|
});
|
|
13246
13298
|
const activeTemplate = templates.find(
|
|
13247
13299
|
(template) => template.name === element.name
|
|
@@ -13587,6 +13639,11 @@ const autoformatMarks = [
|
|
|
13587
13639
|
mode: "mark",
|
|
13588
13640
|
type: MARK_CODE,
|
|
13589
13641
|
match: "`"
|
|
13642
|
+
},
|
|
13643
|
+
{
|
|
13644
|
+
mode: "mark",
|
|
13645
|
+
type: MARK_STRIKETHROUGH,
|
|
13646
|
+
match: ["~~", "~"]
|
|
13590
13647
|
}
|
|
13591
13648
|
];
|
|
13592
13649
|
const autoformatRules = [
|
|
@@ -13728,16 +13785,14 @@ const plugins$1 = [
|
|
|
13728
13785
|
})
|
|
13729
13786
|
];
|
|
13730
13787
|
const plugins = [
|
|
13788
|
+
createBasicMarksPlugin(),
|
|
13731
13789
|
createHeadingPlugin(),
|
|
13732
13790
|
createParagraphPlugin(),
|
|
13733
13791
|
createCodeBlockPlugin(),
|
|
13734
13792
|
createHTMLBlockPlugin(),
|
|
13735
13793
|
createHTMLInlinePlugin(),
|
|
13736
13794
|
createBlockquotePlugin(),
|
|
13737
|
-
createBoldPlugin(),
|
|
13738
|
-
createItalicPlugin(),
|
|
13739
13795
|
createUnderlinePlugin(),
|
|
13740
|
-
createCodePlugin(),
|
|
13741
13796
|
createListPlugin(),
|
|
13742
13797
|
createIndentListPlugin(),
|
|
13743
13798
|
createHorizontalRulePlugin(),
|
|
@@ -14097,7 +14152,9 @@ const EMBED_ICON_WIDTH = 78;
|
|
|
14097
14152
|
const CONTAINER_MD_BREAKPOINT = 448;
|
|
14098
14153
|
const FLOAT_BUTTON_WIDTH = 25;
|
|
14099
14154
|
const HEADING_LABEL = "Headings";
|
|
14100
|
-
const ToolbarContext = createContext(
|
|
14155
|
+
const ToolbarContext = createContext(
|
|
14156
|
+
void 0
|
|
14157
|
+
);
|
|
14101
14158
|
const ToolbarProvider = ({
|
|
14102
14159
|
tinaForm,
|
|
14103
14160
|
templates,
|
|
@@ -14247,7 +14304,7 @@ const useCodeBlockToolbarButton = (state) => {
|
|
|
14247
14304
|
const CodeBlockToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
14248
14305
|
const state = useCodeBlockToolbarButtonState();
|
|
14249
14306
|
const { props } = useCodeBlockToolbarButton(state);
|
|
14250
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "
|
|
14307
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Code Block", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.codeBlock, null));
|
|
14251
14308
|
});
|
|
14252
14309
|
const useImageToolbarButtonState = () => {
|
|
14253
14310
|
const editor = useEditorState();
|
|
@@ -14279,36 +14336,54 @@ const useImageToolbarButton = (state) => {
|
|
|
14279
14336
|
const ImageToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
14280
14337
|
const state = useImageToolbarButtonState();
|
|
14281
14338
|
const { props } = useImageToolbarButton(state);
|
|
14282
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "
|
|
14283
|
-
});
|
|
14284
|
-
const IndentListToolbarButton = withRef(({ nodeType = ELEMENT_UL }, ref) => {
|
|
14285
|
-
const editor = useEditorState();
|
|
14286
|
-
const state = useListToolbarButtonState({ nodeType });
|
|
14287
|
-
const { props } = useListToolbarButton(state);
|
|
14288
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
14289
|
-
ToolbarButton,
|
|
14290
|
-
{
|
|
14291
|
-
ref,
|
|
14292
|
-
tooltip: nodeType === ELEMENT_UL ? "Bulleted List" : "Numbered List",
|
|
14293
|
-
...props,
|
|
14294
|
-
onClick: (e) => {
|
|
14295
|
-
e.preventDefault();
|
|
14296
|
-
e.stopPropagation();
|
|
14297
|
-
toggleList(editor, { type: nodeType });
|
|
14298
|
-
}
|
|
14299
|
-
},
|
|
14300
|
-
nodeType === ELEMENT_UL ? /* @__PURE__ */ React__default.createElement(Icons.ul, null) : /* @__PURE__ */ React__default.createElement(Icons.ol, null)
|
|
14301
|
-
);
|
|
14339
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Image", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.image, null));
|
|
14302
14340
|
});
|
|
14341
|
+
const UnorderedListToolbarButton = withRef(
|
|
14342
|
+
(props, ref) => {
|
|
14343
|
+
const editor = useEditorState();
|
|
14344
|
+
const state = useListToolbarButtonState({ nodeType: ELEMENT_UL });
|
|
14345
|
+
const { props: buttonProps } = useListToolbarButton(state);
|
|
14346
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
14347
|
+
ToolbarButton,
|
|
14348
|
+
{
|
|
14349
|
+
ref,
|
|
14350
|
+
tooltip: "Bulleted List",
|
|
14351
|
+
...buttonProps,
|
|
14352
|
+
onClick: (e) => {
|
|
14353
|
+
e.preventDefault();
|
|
14354
|
+
e.stopPropagation();
|
|
14355
|
+
toggleList(editor, { type: ELEMENT_UL });
|
|
14356
|
+
}
|
|
14357
|
+
},
|
|
14358
|
+
/* @__PURE__ */ React__default.createElement(Icons.ul, null)
|
|
14359
|
+
);
|
|
14360
|
+
}
|
|
14361
|
+
);
|
|
14362
|
+
const OrderedListToolbarButton = withRef(
|
|
14363
|
+
(props, ref) => {
|
|
14364
|
+
const editor = useEditorState();
|
|
14365
|
+
const state = useListToolbarButtonState({ nodeType: ELEMENT_OL });
|
|
14366
|
+
const { props: buttonProps } = useListToolbarButton(state);
|
|
14367
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
14368
|
+
ToolbarButton,
|
|
14369
|
+
{
|
|
14370
|
+
ref,
|
|
14371
|
+
tooltip: "Numbered List",
|
|
14372
|
+
...buttonProps,
|
|
14373
|
+
onClick: (e) => {
|
|
14374
|
+
e.preventDefault();
|
|
14375
|
+
e.stopPropagation();
|
|
14376
|
+
toggleList(editor, { type: ELEMENT_OL });
|
|
14377
|
+
}
|
|
14378
|
+
},
|
|
14379
|
+
/* @__PURE__ */ React__default.createElement(Icons.ol, null)
|
|
14380
|
+
);
|
|
14381
|
+
}
|
|
14382
|
+
);
|
|
14303
14383
|
const LinkToolbarButton = withRef((rest, ref) => {
|
|
14304
14384
|
const state = useLinkToolbarButtonState();
|
|
14305
14385
|
const { props } = useLinkToolbarButton(state);
|
|
14306
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link"
|
|
14307
|
-
});
|
|
14308
|
-
const MarkToolbarButton = withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14309
|
-
const state = useMarkToolbarButtonState({ clear, nodeType });
|
|
14310
|
-
const { props } = useMarkToolbarButton(state);
|
|
14311
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14386
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest, tooltip: "Link" }, /* @__PURE__ */ React__default.createElement(Icons.link, null));
|
|
14312
14387
|
});
|
|
14313
14388
|
const useMermaidToolbarButtonState = () => {
|
|
14314
14389
|
const editor = useEditorState();
|
|
@@ -14389,7 +14464,7 @@ const useBlockQuoteToolbarButton = (state) => {
|
|
|
14389
14464
|
const QuoteToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
14390
14465
|
const state = useBlockQuoteToolbarButtonState();
|
|
14391
14466
|
const { props } = useBlockQuoteToolbarButton(state);
|
|
14392
|
-
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "
|
|
14467
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Quote (⌘+⇧+.)", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.quote, null));
|
|
14393
14468
|
});
|
|
14394
14469
|
const useRawMarkdownToolbarButton = () => {
|
|
14395
14470
|
const { setRawMode } = useEditorContext();
|
|
@@ -14409,7 +14484,7 @@ const RawMarkdownToolbarButton = withRef(({ clear, ...rest }, ref) => {
|
|
|
14409
14484
|
ToolbarButton,
|
|
14410
14485
|
{
|
|
14411
14486
|
ref,
|
|
14412
|
-
tooltip: "
|
|
14487
|
+
tooltip: "Raw Markdown",
|
|
14413
14488
|
...rest,
|
|
14414
14489
|
...props,
|
|
14415
14490
|
"data-testid": "markdown-button"
|
|
@@ -14554,7 +14629,7 @@ const EmbedButton = ({ editor, templates }) => {
|
|
|
14554
14629
|
key: template.name,
|
|
14555
14630
|
onMouseDown: (e) => {
|
|
14556
14631
|
e.preventDefault();
|
|
14557
|
-
|
|
14632
|
+
setOpen(false);
|
|
14558
14633
|
insertMDX(editor, template);
|
|
14559
14634
|
},
|
|
14560
14635
|
className: ""
|
|
@@ -14562,6 +14637,15 @@ const EmbedButton = ({ editor, templates }) => {
|
|
|
14562
14637
|
template.label || template.name
|
|
14563
14638
|
))));
|
|
14564
14639
|
};
|
|
14640
|
+
const MarkToolbarButton = withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14641
|
+
const state = useMarkToolbarButtonState({ clear, nodeType });
|
|
14642
|
+
const { props } = useMarkToolbarButton(state);
|
|
14643
|
+
return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14644
|
+
});
|
|
14645
|
+
const BoldToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: MARK_BOLD }, /* @__PURE__ */ React__default.createElement(Icons.bold, null));
|
|
14646
|
+
const StrikethroughToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Strikethrough", nodeType: MARK_STRIKETHROUGH }, /* @__PURE__ */ React__default.createElement(Icons.strikethrough, null));
|
|
14647
|
+
const ItalicToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: MARK_ITALIC }, /* @__PURE__ */ React__default.createElement(Icons.italic, null));
|
|
14648
|
+
const CodeToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: MARK_CODE }, /* @__PURE__ */ React__default.createElement(Icons.code, null));
|
|
14565
14649
|
const toolbarItems = {
|
|
14566
14650
|
heading: {
|
|
14567
14651
|
label: HEADING_LABEL,
|
|
@@ -14582,32 +14666,37 @@ const toolbarItems = {
|
|
|
14582
14666
|
quote: {
|
|
14583
14667
|
label: "Quote",
|
|
14584
14668
|
width: () => STANDARD_ICON_WIDTH,
|
|
14585
|
-
Component: /* @__PURE__ */ React__default.createElement(QuoteToolbarButton,
|
|
14669
|
+
Component: /* @__PURE__ */ React__default.createElement(QuoteToolbarButton, null)
|
|
14586
14670
|
},
|
|
14587
14671
|
ul: {
|
|
14588
14672
|
label: "Unordered List",
|
|
14589
14673
|
width: () => STANDARD_ICON_WIDTH,
|
|
14590
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14674
|
+
Component: /* @__PURE__ */ React__default.createElement(UnorderedListToolbarButton, null)
|
|
14591
14675
|
},
|
|
14592
14676
|
ol: {
|
|
14593
14677
|
label: "Ordered List",
|
|
14594
14678
|
width: () => STANDARD_ICON_WIDTH,
|
|
14595
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14679
|
+
Component: /* @__PURE__ */ React__default.createElement(OrderedListToolbarButton, null)
|
|
14596
14680
|
},
|
|
14597
14681
|
bold: {
|
|
14598
14682
|
label: "Bold",
|
|
14599
14683
|
width: () => STANDARD_ICON_WIDTH,
|
|
14600
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14684
|
+
Component: /* @__PURE__ */ React__default.createElement(BoldToolbarButton, null)
|
|
14685
|
+
},
|
|
14686
|
+
strikethrough: {
|
|
14687
|
+
label: "Strikethrough",
|
|
14688
|
+
width: () => STANDARD_ICON_WIDTH,
|
|
14689
|
+
Component: /* @__PURE__ */ React__default.createElement(StrikethroughToolbarButton, null)
|
|
14601
14690
|
},
|
|
14602
14691
|
italic: {
|
|
14603
14692
|
label: "Italic",
|
|
14604
14693
|
width: () => STANDARD_ICON_WIDTH,
|
|
14605
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14694
|
+
Component: /* @__PURE__ */ React__default.createElement(ItalicToolbarButton, null)
|
|
14606
14695
|
},
|
|
14607
14696
|
code: {
|
|
14608
14697
|
label: "Code",
|
|
14609
14698
|
width: () => STANDARD_ICON_WIDTH,
|
|
14610
|
-
Component: /* @__PURE__ */ React__default.createElement(
|
|
14699
|
+
Component: /* @__PURE__ */ React__default.createElement(CodeToolbarButton, null)
|
|
14611
14700
|
},
|
|
14612
14701
|
codeBlock: {
|
|
14613
14702
|
label: "Code Block",
|
|
@@ -16256,132 +16345,1209 @@ const ben = [
|
|
|
16256
16345
|
"হয়"
|
|
16257
16346
|
];
|
|
16258
16347
|
const bre = [
|
|
16348
|
+
"'blam",
|
|
16349
|
+
"'d",
|
|
16350
|
+
"'m",
|
|
16351
|
+
"'r",
|
|
16352
|
+
"'ta",
|
|
16353
|
+
"'vat",
|
|
16354
|
+
"'z",
|
|
16355
|
+
"'zo",
|
|
16259
16356
|
"a",
|
|
16260
|
-
"
|
|
16261
|
-
"
|
|
16262
|
-
"
|
|
16263
|
-
"
|
|
16264
|
-
"
|
|
16265
|
-
"
|
|
16266
|
-
"
|
|
16267
|
-
"
|
|
16268
|
-
"
|
|
16269
|
-
"
|
|
16270
|
-
"
|
|
16271
|
-
"
|
|
16272
|
-
"
|
|
16273
|
-
"
|
|
16274
|
-
"
|
|
16275
|
-
"
|
|
16276
|
-
"
|
|
16277
|
-
"
|
|
16278
|
-
"
|
|
16279
|
-
"
|
|
16280
|
-
"
|
|
16357
|
+
"a:",
|
|
16358
|
+
"aba",
|
|
16359
|
+
"abalamour",
|
|
16360
|
+
"abaoe",
|
|
16361
|
+
"ac'hane",
|
|
16362
|
+
"ac'hanoc'h",
|
|
16363
|
+
"ac'hanomp",
|
|
16364
|
+
"ac'hanon",
|
|
16365
|
+
"ac'hanout",
|
|
16366
|
+
"adal",
|
|
16367
|
+
"adalek",
|
|
16368
|
+
"adarre",
|
|
16369
|
+
"ae",
|
|
16370
|
+
"aec'h",
|
|
16371
|
+
"aed",
|
|
16372
|
+
"aemp",
|
|
16373
|
+
"aen",
|
|
16374
|
+
"aent",
|
|
16375
|
+
"aes",
|
|
16376
|
+
"afe",
|
|
16377
|
+
"afec'h",
|
|
16378
|
+
"afed",
|
|
16379
|
+
"afemp",
|
|
16380
|
+
"afen",
|
|
16381
|
+
"afent",
|
|
16382
|
+
"afes",
|
|
16383
|
+
"ag",
|
|
16384
|
+
"ah",
|
|
16385
|
+
"aimp",
|
|
16386
|
+
"aint",
|
|
16387
|
+
"aio",
|
|
16388
|
+
"aiou",
|
|
16389
|
+
"aje",
|
|
16390
|
+
"ajec'h",
|
|
16391
|
+
"ajed",
|
|
16392
|
+
"ajemp",
|
|
16393
|
+
"ajen",
|
|
16394
|
+
"ajent",
|
|
16395
|
+
"ajes",
|
|
16396
|
+
"al",
|
|
16397
|
+
"alato",
|
|
16398
|
+
"alies",
|
|
16399
|
+
"aliesañ",
|
|
16400
|
+
"alkent",
|
|
16401
|
+
"all",
|
|
16402
|
+
"allas",
|
|
16403
|
+
"allo",
|
|
16404
|
+
"allô",
|
|
16405
|
+
"am",
|
|
16406
|
+
"amañ",
|
|
16407
|
+
"amzer",
|
|
16408
|
+
"an",
|
|
16409
|
+
"anezhañ",
|
|
16410
|
+
"anezhe",
|
|
16411
|
+
"anezhi",
|
|
16412
|
+
"anezho",
|
|
16413
|
+
"anvet",
|
|
16414
|
+
"aon",
|
|
16415
|
+
"aotren",
|
|
16416
|
+
"ar",
|
|
16417
|
+
"arall",
|
|
16418
|
+
"araok",
|
|
16419
|
+
"araoki",
|
|
16420
|
+
"araozañ",
|
|
16421
|
+
"araozo",
|
|
16422
|
+
"araozoc'h",
|
|
16423
|
+
"araozomp",
|
|
16424
|
+
"araozon",
|
|
16425
|
+
"araozor",
|
|
16426
|
+
"araozout",
|
|
16427
|
+
"arbenn",
|
|
16428
|
+
"arre",
|
|
16429
|
+
"atalek",
|
|
16430
|
+
"atav",
|
|
16431
|
+
"az",
|
|
16432
|
+
"azalek",
|
|
16433
|
+
"azirazañ",
|
|
16434
|
+
"azirazi",
|
|
16435
|
+
"azirazo",
|
|
16436
|
+
"azirazoc'h",
|
|
16437
|
+
"azirazomp",
|
|
16438
|
+
"azirazon",
|
|
16439
|
+
"azirazor",
|
|
16440
|
+
"azirazout",
|
|
16441
|
+
"b:",
|
|
16442
|
+
"ba",
|
|
16443
|
+
"ba'l",
|
|
16444
|
+
"ba'n",
|
|
16445
|
+
"ba'r",
|
|
16446
|
+
"bad",
|
|
16447
|
+
"bah",
|
|
16448
|
+
"bal",
|
|
16449
|
+
"ban",
|
|
16450
|
+
"bar",
|
|
16451
|
+
"bastañ",
|
|
16452
|
+
"befe",
|
|
16453
|
+
"bell",
|
|
16454
|
+
"benaos",
|
|
16455
|
+
"benn",
|
|
16456
|
+
"bennag",
|
|
16457
|
+
"bennak",
|
|
16458
|
+
"bennozh",
|
|
16459
|
+
"bep",
|
|
16460
|
+
"bepred",
|
|
16461
|
+
"berr",
|
|
16462
|
+
"berzh",
|
|
16463
|
+
"bet",
|
|
16464
|
+
"betek",
|
|
16465
|
+
"betra",
|
|
16466
|
+
"bev",
|
|
16467
|
+
"bevet",
|
|
16468
|
+
"bez",
|
|
16469
|
+
"bezañ",
|
|
16470
|
+
"beze",
|
|
16471
|
+
"bezent",
|
|
16472
|
+
"bezet",
|
|
16473
|
+
"bezh",
|
|
16474
|
+
"bezit",
|
|
16475
|
+
"bezomp",
|
|
16476
|
+
"bihan",
|
|
16477
|
+
"bije",
|
|
16478
|
+
"biou",
|
|
16479
|
+
"biskoazh",
|
|
16480
|
+
"blam",
|
|
16481
|
+
"bo",
|
|
16482
|
+
"boa",
|
|
16483
|
+
"bominapl",
|
|
16484
|
+
"boudoudom",
|
|
16485
|
+
"bouez",
|
|
16486
|
+
"boull",
|
|
16487
|
+
"boum",
|
|
16488
|
+
"bout",
|
|
16489
|
+
"bras",
|
|
16490
|
+
"brasañ",
|
|
16491
|
+
"brav",
|
|
16492
|
+
"bravo",
|
|
16493
|
+
"bremañ",
|
|
16494
|
+
"bres",
|
|
16495
|
+
"brokenn",
|
|
16496
|
+
"bronn",
|
|
16497
|
+
"brrr",
|
|
16498
|
+
"brutal",
|
|
16499
|
+
"buhezek",
|
|
16500
|
+
"c'h:",
|
|
16501
|
+
"c'haout",
|
|
16502
|
+
"c'he",
|
|
16503
|
+
"c'hem",
|
|
16504
|
+
"c'herz",
|
|
16505
|
+
"c'heñver",
|
|
16506
|
+
"c'hichen",
|
|
16507
|
+
"c'hiz",
|
|
16508
|
+
"c'hoazh",
|
|
16509
|
+
"c'horre",
|
|
16510
|
+
"c'houde",
|
|
16511
|
+
"c'houst",
|
|
16512
|
+
"c'hreiz",
|
|
16513
|
+
"c'hwec'h",
|
|
16514
|
+
"c'hwec'hvet",
|
|
16515
|
+
"c'hwezek",
|
|
16516
|
+
"c'hwi",
|
|
16517
|
+
"ch:",
|
|
16518
|
+
"chaous",
|
|
16519
|
+
"chik",
|
|
16520
|
+
"chit",
|
|
16521
|
+
"chom",
|
|
16522
|
+
"chut",
|
|
16523
|
+
"d'",
|
|
16524
|
+
"d'al",
|
|
16525
|
+
"d'an",
|
|
16526
|
+
"d'ar",
|
|
16527
|
+
"d'az",
|
|
16528
|
+
"d'e",
|
|
16529
|
+
"d'he",
|
|
16530
|
+
"d'ho",
|
|
16531
|
+
"d'hol",
|
|
16532
|
+
"d'hon",
|
|
16533
|
+
"d'hor",
|
|
16534
|
+
"d'o",
|
|
16535
|
+
"d'ober",
|
|
16536
|
+
"d'ul",
|
|
16537
|
+
"d'un",
|
|
16538
|
+
"d'ur",
|
|
16539
|
+
"d:",
|
|
16281
16540
|
"da",
|
|
16282
|
-
"
|
|
16283
|
-
"
|
|
16284
|
-
"
|
|
16285
|
-
"
|
|
16286
|
-
"
|
|
16287
|
-
"
|
|
16288
|
-
"
|
|
16289
|
-
"
|
|
16290
|
-
"
|
|
16291
|
-
"
|
|
16292
|
-
"
|
|
16293
|
-
"
|
|
16294
|
-
"
|
|
16295
|
-
"
|
|
16296
|
-
"
|
|
16541
|
+
"dak",
|
|
16542
|
+
"daka",
|
|
16543
|
+
"dal",
|
|
16544
|
+
"dalbezh",
|
|
16545
|
+
"dalc'hmat",
|
|
16546
|
+
"dalit",
|
|
16547
|
+
"damdost",
|
|
16548
|
+
"damheñvel",
|
|
16549
|
+
"damm",
|
|
16550
|
+
"dan",
|
|
16551
|
+
"danvez",
|
|
16552
|
+
"dao",
|
|
16553
|
+
"daol",
|
|
16554
|
+
"daonet",
|
|
16555
|
+
"daou",
|
|
16556
|
+
"daoust",
|
|
16557
|
+
"daouzek",
|
|
16558
|
+
"daouzekvet",
|
|
16559
|
+
"darn",
|
|
16560
|
+
"dastrewiñ",
|
|
16561
|
+
"dav",
|
|
16562
|
+
"davedoc'h",
|
|
16563
|
+
"davedomp",
|
|
16564
|
+
"davedon",
|
|
16565
|
+
"davedor",
|
|
16566
|
+
"davedout",
|
|
16567
|
+
"davet",
|
|
16568
|
+
"davetañ",
|
|
16569
|
+
"davete",
|
|
16570
|
+
"daveti",
|
|
16571
|
+
"daveto",
|
|
16572
|
+
"defe",
|
|
16573
|
+
"dehou",
|
|
16574
|
+
"dek",
|
|
16575
|
+
"dekvet",
|
|
16576
|
+
"den",
|
|
16577
|
+
"deoc'h",
|
|
16578
|
+
"deomp",
|
|
16579
|
+
"deor",
|
|
16580
|
+
"derc'hel",
|
|
16581
|
+
"deus",
|
|
16582
|
+
"dez",
|
|
16583
|
+
"deze",
|
|
16584
|
+
"dezhañ",
|
|
16585
|
+
"dezhe",
|
|
16586
|
+
"dezhi",
|
|
16587
|
+
"dezho",
|
|
16588
|
+
"di",
|
|
16589
|
+
"diabarzh",
|
|
16590
|
+
"diagent",
|
|
16591
|
+
"diar",
|
|
16592
|
+
"diaraok",
|
|
16593
|
+
"diavaez",
|
|
16594
|
+
"dibaoe",
|
|
16595
|
+
"dibaot",
|
|
16596
|
+
"dibar",
|
|
16597
|
+
"dic'halañ",
|
|
16598
|
+
"didiac'h",
|
|
16599
|
+
"dienn",
|
|
16600
|
+
"difer",
|
|
16601
|
+
"diganeoc'h",
|
|
16602
|
+
"diganeomp",
|
|
16603
|
+
"diganeor",
|
|
16604
|
+
"diganimp",
|
|
16605
|
+
"diganin",
|
|
16606
|
+
"diganit",
|
|
16607
|
+
"digant",
|
|
16608
|
+
"digantañ",
|
|
16609
|
+
"digante",
|
|
16610
|
+
"diganti",
|
|
16611
|
+
"diganto",
|
|
16612
|
+
"digemmesk",
|
|
16613
|
+
"diget",
|
|
16614
|
+
"digor",
|
|
16615
|
+
"digoret",
|
|
16616
|
+
"dija",
|
|
16617
|
+
"dije",
|
|
16618
|
+
"dimp",
|
|
16619
|
+
"din",
|
|
16620
|
+
"dinaou",
|
|
16621
|
+
"dindan",
|
|
16622
|
+
"dindanañ",
|
|
16623
|
+
"dindani",
|
|
16624
|
+
"dindano",
|
|
16625
|
+
"dindanoc'h",
|
|
16626
|
+
"dindanomp",
|
|
16627
|
+
"dindanon",
|
|
16628
|
+
"dindanor",
|
|
16629
|
+
"dindanout",
|
|
16630
|
+
"dioutañ",
|
|
16631
|
+
"dioute",
|
|
16632
|
+
"diouti",
|
|
16633
|
+
"diouto",
|
|
16634
|
+
"diouzh",
|
|
16635
|
+
"diouzhin",
|
|
16636
|
+
"diouzhit",
|
|
16637
|
+
"diouzhoc'h",
|
|
16638
|
+
"diouzhomp",
|
|
16639
|
+
"diouzhor",
|
|
16640
|
+
"dirak",
|
|
16641
|
+
"dirazañ",
|
|
16642
|
+
"dirazi",
|
|
16643
|
+
"dirazo",
|
|
16644
|
+
"dirazoc'h",
|
|
16645
|
+
"dirazomp",
|
|
16646
|
+
"dirazon",
|
|
16647
|
+
"dirazor",
|
|
16648
|
+
"dirazout",
|
|
16649
|
+
"disheñvel",
|
|
16650
|
+
"dispar",
|
|
16651
|
+
"distank",
|
|
16652
|
+
"dister",
|
|
16653
|
+
"disterañ",
|
|
16654
|
+
"disterig",
|
|
16655
|
+
"distro",
|
|
16656
|
+
"dit",
|
|
16657
|
+
"divaez",
|
|
16658
|
+
"diwar",
|
|
16659
|
+
"diwezhat",
|
|
16660
|
+
"diwezhañ",
|
|
16297
16661
|
"do",
|
|
16298
|
-
"
|
|
16299
|
-
"
|
|
16662
|
+
"doa",
|
|
16663
|
+
"doare",
|
|
16664
|
+
"dont",
|
|
16665
|
+
"dost",
|
|
16666
|
+
"doue",
|
|
16667
|
+
"douetus",
|
|
16668
|
+
"douez",
|
|
16669
|
+
"doug",
|
|
16670
|
+
"draou",
|
|
16671
|
+
"draoñ",
|
|
16672
|
+
"dre",
|
|
16673
|
+
"drede",
|
|
16674
|
+
"dreist",
|
|
16675
|
+
"dreistañ",
|
|
16676
|
+
"dreisti",
|
|
16677
|
+
"dreisto",
|
|
16678
|
+
"dreistoc'h",
|
|
16679
|
+
"dreistomp",
|
|
16680
|
+
"dreiston",
|
|
16681
|
+
"dreistor",
|
|
16682
|
+
"dreistout",
|
|
16683
|
+
"drek",
|
|
16684
|
+
"dreñv",
|
|
16685
|
+
"dring",
|
|
16686
|
+
"dro",
|
|
16687
|
+
"du",
|
|
16300
16688
|
"e",
|
|
16301
|
-
"
|
|
16302
|
-
"
|
|
16303
|
-
"
|
|
16304
|
-
"
|
|
16689
|
+
"e:",
|
|
16690
|
+
"eas",
|
|
16691
|
+
"ebet",
|
|
16692
|
+
"ec'h",
|
|
16693
|
+
"edo",
|
|
16694
|
+
"edoc'h",
|
|
16695
|
+
"edod",
|
|
16696
|
+
"edomp",
|
|
16697
|
+
"edon",
|
|
16698
|
+
"edont",
|
|
16699
|
+
"edos",
|
|
16700
|
+
"eer",
|
|
16701
|
+
"eeun",
|
|
16702
|
+
"efed",
|
|
16703
|
+
"egedoc'h",
|
|
16704
|
+
"egedomp",
|
|
16705
|
+
"egedon",
|
|
16706
|
+
"egedor",
|
|
16707
|
+
"egedout",
|
|
16708
|
+
"eget",
|
|
16709
|
+
"egetañ",
|
|
16710
|
+
"egete",
|
|
16711
|
+
"egeti",
|
|
16712
|
+
"egeto",
|
|
16713
|
+
"eh",
|
|
16714
|
+
"eil",
|
|
16715
|
+
"eilvet",
|
|
16716
|
+
"eizh",
|
|
16717
|
+
"eizhvet",
|
|
16718
|
+
"ejoc'h",
|
|
16719
|
+
"ejod",
|
|
16720
|
+
"ejomp",
|
|
16721
|
+
"ejont",
|
|
16722
|
+
"ejout",
|
|
16723
|
+
"el",
|
|
16305
16724
|
"em",
|
|
16306
|
-
"
|
|
16307
|
-
"
|
|
16308
|
-
"
|
|
16309
|
-
"
|
|
16310
|
-
"
|
|
16311
|
-
"
|
|
16312
|
-
"
|
|
16313
|
-
"
|
|
16314
|
-
"
|
|
16315
|
-
"
|
|
16725
|
+
"emaint",
|
|
16726
|
+
"emaoc'h",
|
|
16727
|
+
"emaomp",
|
|
16728
|
+
"emaon",
|
|
16729
|
+
"emaout",
|
|
16730
|
+
"emañ",
|
|
16731
|
+
"eme",
|
|
16732
|
+
"emeur",
|
|
16733
|
+
"emezañ",
|
|
16734
|
+
"emezi",
|
|
16735
|
+
"emezo",
|
|
16736
|
+
"emezoc'h",
|
|
16737
|
+
"emezomp",
|
|
16738
|
+
"emezon",
|
|
16739
|
+
"emezout",
|
|
16740
|
+
"emporzhiañ",
|
|
16741
|
+
"en",
|
|
16742
|
+
"end",
|
|
16743
|
+
"endan",
|
|
16744
|
+
"endra",
|
|
16745
|
+
"enep",
|
|
16746
|
+
"ennañ",
|
|
16747
|
+
"enni",
|
|
16748
|
+
"enno",
|
|
16749
|
+
"ennoc'h",
|
|
16750
|
+
"ennomp",
|
|
16751
|
+
"ennon",
|
|
16752
|
+
"ennor",
|
|
16753
|
+
"ennout",
|
|
16754
|
+
"enta",
|
|
16755
|
+
"eo",
|
|
16756
|
+
"eomp",
|
|
16757
|
+
"eont",
|
|
16758
|
+
"eor",
|
|
16759
|
+
"eot",
|
|
16760
|
+
"er",
|
|
16761
|
+
"erbet",
|
|
16762
|
+
"erfin",
|
|
16763
|
+
"esa",
|
|
16764
|
+
"esae",
|
|
16765
|
+
"espar",
|
|
16766
|
+
"estlamm",
|
|
16767
|
+
"estrañj",
|
|
16768
|
+
"eta",
|
|
16769
|
+
"etre",
|
|
16770
|
+
"etreoc'h",
|
|
16771
|
+
"etrezo",
|
|
16772
|
+
"etrezoc'h",
|
|
16773
|
+
"etrezomp",
|
|
16774
|
+
"etrezor",
|
|
16775
|
+
"euh",
|
|
16776
|
+
"eur",
|
|
16777
|
+
"eus",
|
|
16778
|
+
"evel",
|
|
16779
|
+
"evelato",
|
|
16780
|
+
"eveldoc'h",
|
|
16781
|
+
"eveldomp",
|
|
16782
|
+
"eveldon",
|
|
16783
|
+
"eveldor",
|
|
16784
|
+
"eveldout",
|
|
16785
|
+
"evelkent",
|
|
16786
|
+
"eveltañ",
|
|
16787
|
+
"evelte",
|
|
16788
|
+
"evelti",
|
|
16789
|
+
"evelto",
|
|
16790
|
+
"evidoc'h",
|
|
16791
|
+
"evidomp",
|
|
16792
|
+
"evidon",
|
|
16793
|
+
"evidor",
|
|
16794
|
+
"evidout",
|
|
16795
|
+
"evit",
|
|
16796
|
+
"evitañ",
|
|
16797
|
+
"evite",
|
|
16798
|
+
"eviti",
|
|
16799
|
+
"evito",
|
|
16800
|
+
"ez",
|
|
16801
|
+
"eñ",
|
|
16802
|
+
"f:",
|
|
16803
|
+
"fac'h",
|
|
16804
|
+
"fall",
|
|
16805
|
+
"fed",
|
|
16806
|
+
"feiz",
|
|
16807
|
+
"fenn",
|
|
16808
|
+
"fezh",
|
|
16809
|
+
"fin",
|
|
16810
|
+
"finsalvet",
|
|
16811
|
+
"foei",
|
|
16812
|
+
"fouilhezañ",
|
|
16813
|
+
"g:",
|
|
16814
|
+
"gallout",
|
|
16815
|
+
"ganeoc'h",
|
|
16816
|
+
"ganeomp",
|
|
16817
|
+
"ganin",
|
|
16818
|
+
"ganit",
|
|
16819
|
+
"gant",
|
|
16820
|
+
"gantañ",
|
|
16821
|
+
"ganti",
|
|
16822
|
+
"ganto",
|
|
16823
|
+
"gaout",
|
|
16824
|
+
"gast",
|
|
16825
|
+
"gein",
|
|
16826
|
+
"gellout",
|
|
16827
|
+
"genndost",
|
|
16828
|
+
"gentañ",
|
|
16829
|
+
"ger",
|
|
16830
|
+
"gerz",
|
|
16831
|
+
"get",
|
|
16832
|
+
"geñver",
|
|
16833
|
+
"gichen",
|
|
16834
|
+
"gin",
|
|
16835
|
+
"giz",
|
|
16836
|
+
"glan",
|
|
16837
|
+
"gloev",
|
|
16838
|
+
"goll",
|
|
16839
|
+
"gorre",
|
|
16840
|
+
"goude",
|
|
16841
|
+
"gouez",
|
|
16842
|
+
"gouezit",
|
|
16843
|
+
"gouezomp",
|
|
16844
|
+
"goulz",
|
|
16845
|
+
"gounnar",
|
|
16846
|
+
"gour",
|
|
16847
|
+
"goust",
|
|
16848
|
+
"gouze",
|
|
16849
|
+
"gouzout",
|
|
16850
|
+
"gra",
|
|
16851
|
+
"grak",
|
|
16852
|
+
"grec'h",
|
|
16853
|
+
"greiz",
|
|
16854
|
+
"grenn",
|
|
16855
|
+
"greomp",
|
|
16856
|
+
"grit",
|
|
16857
|
+
"groñs",
|
|
16858
|
+
"gutez",
|
|
16859
|
+
"gwall",
|
|
16860
|
+
"gwashoc'h",
|
|
16861
|
+
"gwazh",
|
|
16862
|
+
"gwech",
|
|
16863
|
+
"gwechall",
|
|
16864
|
+
"gwechoù",
|
|
16865
|
+
"gwell",
|
|
16866
|
+
"gwezh",
|
|
16867
|
+
"gwezhall",
|
|
16868
|
+
"gwezharall",
|
|
16869
|
+
"gwezhoù",
|
|
16870
|
+
"gwig",
|
|
16871
|
+
"gwirionez",
|
|
16872
|
+
"gwitibunan",
|
|
16873
|
+
"gêr",
|
|
16874
|
+
"h:",
|
|
16316
16875
|
"ha",
|
|
16317
|
-
"
|
|
16318
|
-
"
|
|
16319
|
-
"
|
|
16320
|
-
"
|
|
16321
|
-
"
|
|
16322
|
-
"
|
|
16323
|
-
"
|
|
16324
|
-
"
|
|
16325
|
-
"
|
|
16326
|
-
"
|
|
16327
|
-
"
|
|
16876
|
+
"hag",
|
|
16877
|
+
"han",
|
|
16878
|
+
"hanter",
|
|
16879
|
+
"hanterc'hantad",
|
|
16880
|
+
"hanterkantved",
|
|
16881
|
+
"harz",
|
|
16882
|
+
"hañ",
|
|
16883
|
+
"hañval",
|
|
16884
|
+
"he",
|
|
16885
|
+
"hebioù",
|
|
16886
|
+
"hec'h",
|
|
16887
|
+
"hei",
|
|
16888
|
+
"hein",
|
|
16889
|
+
"hem",
|
|
16890
|
+
"hemañ",
|
|
16891
|
+
"hen",
|
|
16892
|
+
"hend",
|
|
16893
|
+
"henhont",
|
|
16894
|
+
"henn",
|
|
16895
|
+
"hennezh",
|
|
16896
|
+
"hent",
|
|
16897
|
+
"hep",
|
|
16898
|
+
"hervez",
|
|
16899
|
+
"hervezañ",
|
|
16900
|
+
"hervezi",
|
|
16901
|
+
"hervezo",
|
|
16902
|
+
"hervezoc'h",
|
|
16903
|
+
"hervezomp",
|
|
16904
|
+
"hervezon",
|
|
16905
|
+
"hervezor",
|
|
16906
|
+
"hervezout",
|
|
16907
|
+
"heul",
|
|
16908
|
+
"heuliañ",
|
|
16909
|
+
"hevelep",
|
|
16910
|
+
"heverk",
|
|
16911
|
+
"heñvel",
|
|
16912
|
+
"heñvelat",
|
|
16913
|
+
"heñvelañ",
|
|
16914
|
+
"heñveliñ",
|
|
16915
|
+
"heñveloc'h",
|
|
16916
|
+
"heñvelout",
|
|
16917
|
+
"hi",
|
|
16918
|
+
"hilh",
|
|
16919
|
+
"hini",
|
|
16920
|
+
"hirie",
|
|
16921
|
+
"hirio",
|
|
16922
|
+
"hiziv",
|
|
16923
|
+
"hiziviken",
|
|
16924
|
+
"ho",
|
|
16925
|
+
"hoaliñ",
|
|
16926
|
+
"hoc'h",
|
|
16927
|
+
"hogen",
|
|
16928
|
+
"hogos",
|
|
16929
|
+
"hogozik",
|
|
16930
|
+
"hol",
|
|
16931
|
+
"holl",
|
|
16932
|
+
"holà",
|
|
16933
|
+
"homañ",
|
|
16934
|
+
"hon",
|
|
16935
|
+
"honhont",
|
|
16936
|
+
"honnezh",
|
|
16937
|
+
"hont",
|
|
16938
|
+
"hop",
|
|
16939
|
+
"hopala",
|
|
16940
|
+
"hor",
|
|
16941
|
+
"hou",
|
|
16942
|
+
"houp",
|
|
16943
|
+
"hudu",
|
|
16944
|
+
"hue",
|
|
16945
|
+
"hui",
|
|
16946
|
+
"hum",
|
|
16947
|
+
"hurrah",
|
|
16948
|
+
"i",
|
|
16949
|
+
"i:",
|
|
16950
|
+
"in",
|
|
16951
|
+
"int",
|
|
16952
|
+
"is",
|
|
16953
|
+
"ispisial",
|
|
16954
|
+
"isurzhiet",
|
|
16955
|
+
"it",
|
|
16956
|
+
"ivez",
|
|
16957
|
+
"izelañ",
|
|
16958
|
+
"j:",
|
|
16959
|
+
"just",
|
|
16960
|
+
"k:",
|
|
16961
|
+
"kae",
|
|
16962
|
+
"kaer",
|
|
16963
|
+
"kalon",
|
|
16964
|
+
"kalz",
|
|
16965
|
+
"kant",
|
|
16966
|
+
"kaout",
|
|
16967
|
+
"kar",
|
|
16968
|
+
"kazi",
|
|
16969
|
+
"keid",
|
|
16970
|
+
"kein",
|
|
16971
|
+
"keit",
|
|
16972
|
+
"kel",
|
|
16973
|
+
"kellies",
|
|
16974
|
+
"keloù",
|
|
16975
|
+
"kement",
|
|
16976
|
+
"ken",
|
|
16977
|
+
"kenkent",
|
|
16978
|
+
"kenkoulz",
|
|
16979
|
+
"kenment",
|
|
16980
|
+
"kent",
|
|
16981
|
+
"kentañ",
|
|
16982
|
+
"kentizh",
|
|
16983
|
+
"kentoc'h",
|
|
16984
|
+
"kentre",
|
|
16985
|
+
"ker",
|
|
16986
|
+
"kerkent",
|
|
16987
|
+
"kerz",
|
|
16988
|
+
"kerzh",
|
|
16989
|
+
"ket",
|
|
16990
|
+
"keta",
|
|
16991
|
+
"keñver",
|
|
16992
|
+
"keñverel",
|
|
16993
|
+
"keñverius",
|
|
16994
|
+
"kichen",
|
|
16995
|
+
"kichenik",
|
|
16996
|
+
"kit",
|
|
16997
|
+
"kiz",
|
|
16998
|
+
"klak",
|
|
16999
|
+
"klek",
|
|
17000
|
+
"klik",
|
|
17001
|
+
"komprenet",
|
|
17002
|
+
"komz",
|
|
17003
|
+
"kont",
|
|
17004
|
+
"korf",
|
|
17005
|
+
"korre",
|
|
17006
|
+
"koulskoude",
|
|
17007
|
+
"koulz",
|
|
17008
|
+
"koust",
|
|
17009
|
+
"krak",
|
|
17010
|
+
"krampouezh",
|
|
17011
|
+
"krec'h",
|
|
17012
|
+
"kreiz",
|
|
17013
|
+
"kuit",
|
|
17014
|
+
"kwir",
|
|
17015
|
+
"l:",
|
|
17016
|
+
"la",
|
|
17017
|
+
"laez",
|
|
17018
|
+
"laoskel",
|
|
17019
|
+
"laouen",
|
|
17020
|
+
"lavar",
|
|
17021
|
+
"lavaret",
|
|
17022
|
+
"lavarout",
|
|
17023
|
+
"lec'h",
|
|
17024
|
+
"lein",
|
|
17025
|
+
"leizh",
|
|
17026
|
+
"lerc'h",
|
|
17027
|
+
"leun",
|
|
17028
|
+
"leuskel",
|
|
17029
|
+
"lew",
|
|
17030
|
+
"lies",
|
|
17031
|
+
"liesañ",
|
|
17032
|
+
"lod",
|
|
17033
|
+
"lusk",
|
|
17034
|
+
"lâr",
|
|
17035
|
+
"lârout",
|
|
17036
|
+
"m:",
|
|
17037
|
+
"ma",
|
|
17038
|
+
"ma'z",
|
|
17039
|
+
"mac'h",
|
|
17040
|
+
"mac'hat",
|
|
17041
|
+
"mac'hañ",
|
|
17042
|
+
"mac'hoc'h",
|
|
17043
|
+
"mad",
|
|
17044
|
+
"maez",
|
|
17045
|
+
"maksimal",
|
|
17046
|
+
"mann",
|
|
17047
|
+
"mar",
|
|
17048
|
+
"mard",
|
|
17049
|
+
"marg",
|
|
17050
|
+
"marzh",
|
|
17051
|
+
"mat",
|
|
17052
|
+
"mañ",
|
|
17053
|
+
"me",
|
|
17054
|
+
"memes",
|
|
17055
|
+
"memestra",
|
|
17056
|
+
"merkapl",
|
|
17057
|
+
"mersi",
|
|
17058
|
+
"mes",
|
|
17059
|
+
"mesk",
|
|
17060
|
+
"met",
|
|
17061
|
+
"meur",
|
|
17062
|
+
"mil",
|
|
17063
|
+
"minimal",
|
|
17064
|
+
"moan",
|
|
17065
|
+
"moaniaat",
|
|
17066
|
+
"mod",
|
|
17067
|
+
"mont",
|
|
17068
|
+
"mout",
|
|
17069
|
+
"mui",
|
|
17070
|
+
"muiañ",
|
|
17071
|
+
"muioc'h",
|
|
17072
|
+
"n",
|
|
17073
|
+
"n'",
|
|
17074
|
+
"n:",
|
|
16328
17075
|
"na",
|
|
16329
|
-
"
|
|
16330
|
-
"
|
|
16331
|
-
"
|
|
16332
|
-
"
|
|
16333
|
-
"
|
|
16334
|
-
"
|
|
17076
|
+
"nag",
|
|
17077
|
+
"naontek",
|
|
17078
|
+
"naturel",
|
|
17079
|
+
"nav",
|
|
17080
|
+
"navet",
|
|
17081
|
+
"ne",
|
|
17082
|
+
"nebeudig",
|
|
17083
|
+
"nebeut",
|
|
17084
|
+
"nebeutañ",
|
|
17085
|
+
"nebeutoc'h",
|
|
17086
|
+
"neketa",
|
|
17087
|
+
"nemedoc'h",
|
|
17088
|
+
"nemedomp",
|
|
17089
|
+
"nemedon",
|
|
17090
|
+
"nemedor",
|
|
17091
|
+
"nemedout",
|
|
17092
|
+
"nemet",
|
|
17093
|
+
"nemetañ",
|
|
17094
|
+
"nemete",
|
|
17095
|
+
"nemeti",
|
|
17096
|
+
"nemeto",
|
|
17097
|
+
"nemeur",
|
|
17098
|
+
"neoac'h",
|
|
17099
|
+
"nepell",
|
|
17100
|
+
"nerzh",
|
|
17101
|
+
"nes",
|
|
17102
|
+
"neseser",
|
|
17103
|
+
"netra",
|
|
17104
|
+
"neubeudoù",
|
|
17105
|
+
"neuhe",
|
|
17106
|
+
"neuze",
|
|
17107
|
+
"nevez",
|
|
17108
|
+
"newazh",
|
|
17109
|
+
"nez",
|
|
17110
|
+
"ni",
|
|
17111
|
+
"nikun",
|
|
17112
|
+
"niverus",
|
|
17113
|
+
"nul",
|
|
16335
17114
|
"o",
|
|
16336
|
-
"
|
|
16337
|
-
"
|
|
16338
|
-
"
|
|
16339
|
-
"
|
|
16340
|
-
"
|
|
16341
|
-
"
|
|
16342
|
-
"
|
|
16343
|
-
"
|
|
16344
|
-
"
|
|
16345
|
-
"
|
|
16346
|
-
"
|
|
16347
|
-
"
|
|
16348
|
-
"
|
|
16349
|
-
"
|
|
16350
|
-
"
|
|
16351
|
-
"
|
|
16352
|
-
"
|
|
16353
|
-
"
|
|
16354
|
-
"
|
|
16355
|
-
"
|
|
16356
|
-
"
|
|
16357
|
-
"
|
|
16358
|
-
"
|
|
16359
|
-
"
|
|
17115
|
+
"o:",
|
|
17116
|
+
"oa",
|
|
17117
|
+
"oac'h",
|
|
17118
|
+
"oad",
|
|
17119
|
+
"oamp",
|
|
17120
|
+
"oan",
|
|
17121
|
+
"oant",
|
|
17122
|
+
"oar",
|
|
17123
|
+
"oas",
|
|
17124
|
+
"ober",
|
|
17125
|
+
"oc'h",
|
|
17126
|
+
"oc'ho",
|
|
17127
|
+
"oc'hola",
|
|
17128
|
+
"oc'hpenn",
|
|
17129
|
+
"oh",
|
|
17130
|
+
"ohe",
|
|
17131
|
+
"ollé",
|
|
17132
|
+
"olole",
|
|
17133
|
+
"olé",
|
|
17134
|
+
"omp",
|
|
17135
|
+
"on",
|
|
17136
|
+
"ordin",
|
|
17137
|
+
"ordinal",
|
|
17138
|
+
"ouejoc'h",
|
|
17139
|
+
"ouejod",
|
|
17140
|
+
"ouejomp",
|
|
17141
|
+
"ouejont",
|
|
17142
|
+
"ouejout",
|
|
17143
|
+
"ouek",
|
|
17144
|
+
"ouezas",
|
|
17145
|
+
"ouezi",
|
|
17146
|
+
"ouezimp",
|
|
17147
|
+
"ouezin",
|
|
17148
|
+
"ouezint",
|
|
17149
|
+
"ouezis",
|
|
17150
|
+
"ouezo",
|
|
17151
|
+
"ouezoc'h",
|
|
17152
|
+
"ouezor",
|
|
17153
|
+
"ouf",
|
|
17154
|
+
"oufe",
|
|
17155
|
+
"oufec'h",
|
|
17156
|
+
"oufed",
|
|
17157
|
+
"oufemp",
|
|
17158
|
+
"oufen",
|
|
17159
|
+
"oufent",
|
|
17160
|
+
"oufes",
|
|
17161
|
+
"ouie",
|
|
17162
|
+
"ouiec'h",
|
|
17163
|
+
"ouied",
|
|
17164
|
+
"ouiemp",
|
|
17165
|
+
"ouien",
|
|
17166
|
+
"ouient",
|
|
17167
|
+
"ouies",
|
|
17168
|
+
"ouije",
|
|
17169
|
+
"ouijec'h",
|
|
17170
|
+
"ouijed",
|
|
17171
|
+
"ouijemp",
|
|
17172
|
+
"ouijen",
|
|
17173
|
+
"ouijent",
|
|
17174
|
+
"ouijes",
|
|
17175
|
+
"out",
|
|
17176
|
+
"outañ",
|
|
17177
|
+
"outi",
|
|
17178
|
+
"outo",
|
|
17179
|
+
"ouzer",
|
|
17180
|
+
"ouzh",
|
|
17181
|
+
"ouzhin",
|
|
17182
|
+
"ouzhit",
|
|
17183
|
+
"ouzhoc'h",
|
|
17184
|
+
"ouzhomp",
|
|
17185
|
+
"ouzhor",
|
|
17186
|
+
"ouzhpenn",
|
|
17187
|
+
"ouzhpennik",
|
|
17188
|
+
"ouzoc'h",
|
|
17189
|
+
"ouzomp",
|
|
17190
|
+
"ouzon",
|
|
17191
|
+
"ouzont",
|
|
17192
|
+
"ouzout",
|
|
17193
|
+
"p'",
|
|
17194
|
+
"p:",
|
|
17195
|
+
"pa",
|
|
17196
|
+
"pad",
|
|
17197
|
+
"padal",
|
|
17198
|
+
"paf",
|
|
17199
|
+
"pan",
|
|
17200
|
+
"panevedeoc'h",
|
|
17201
|
+
"panevedo",
|
|
17202
|
+
"panevedomp",
|
|
17203
|
+
"panevedon",
|
|
17204
|
+
"panevedout",
|
|
17205
|
+
"panevet",
|
|
17206
|
+
"panevetañ",
|
|
17207
|
+
"paneveti",
|
|
17208
|
+
"pas",
|
|
17209
|
+
"paseet",
|
|
17210
|
+
"pe",
|
|
17211
|
+
"peadra",
|
|
17212
|
+
"peder",
|
|
17213
|
+
"pedervet",
|
|
17214
|
+
"pedervetvet",
|
|
17215
|
+
"pefe",
|
|
17216
|
+
"pegeit",
|
|
17217
|
+
"pegement",
|
|
17218
|
+
"pegen",
|
|
17219
|
+
"pegiz",
|
|
17220
|
+
"pegoulz",
|
|
17221
|
+
"pehini",
|
|
17222
|
+
"pelec'h",
|
|
17223
|
+
"pell",
|
|
17224
|
+
"pemod",
|
|
17225
|
+
"pemp",
|
|
17226
|
+
"pempved",
|
|
17227
|
+
"pemzek",
|
|
17228
|
+
"penaos",
|
|
17229
|
+
"penn",
|
|
17230
|
+
"peogwir",
|
|
17231
|
+
"peotramant",
|
|
17232
|
+
"pep",
|
|
17233
|
+
"perak",
|
|
17234
|
+
"perc'hennañ",
|
|
17235
|
+
"pergen",
|
|
17236
|
+
"permetiñ",
|
|
17237
|
+
"peseurt",
|
|
17238
|
+
"pet",
|
|
17239
|
+
"petiaoul",
|
|
17240
|
+
"petoare",
|
|
17241
|
+
"petra",
|
|
17242
|
+
"peur",
|
|
17243
|
+
"peurgetket",
|
|
17244
|
+
"peurheñvel",
|
|
17245
|
+
"peurliesañ",
|
|
17246
|
+
"peurvuiañ",
|
|
17247
|
+
"peus",
|
|
17248
|
+
"peustost",
|
|
17249
|
+
"peuz",
|
|
17250
|
+
"pevar",
|
|
17251
|
+
"pevare",
|
|
17252
|
+
"pevarevet",
|
|
17253
|
+
"pevarzek",
|
|
17254
|
+
"pez",
|
|
17255
|
+
"peze",
|
|
17256
|
+
"pezh",
|
|
17257
|
+
"pff",
|
|
17258
|
+
"pfft",
|
|
17259
|
+
"pfut",
|
|
17260
|
+
"picher",
|
|
17261
|
+
"pif",
|
|
17262
|
+
"pife",
|
|
17263
|
+
"pign",
|
|
17264
|
+
"pije",
|
|
17265
|
+
"pikol",
|
|
17266
|
+
"pitiaoul",
|
|
17267
|
+
"piv",
|
|
17268
|
+
"plaouf",
|
|
17269
|
+
"plok",
|
|
17270
|
+
"plouf",
|
|
17271
|
+
"po",
|
|
17272
|
+
"poa",
|
|
17273
|
+
"poelladus",
|
|
17274
|
+
"pof",
|
|
17275
|
+
"pok",
|
|
17276
|
+
"posupl",
|
|
17277
|
+
"pouah",
|
|
17278
|
+
"pourc'henn",
|
|
17279
|
+
"prest",
|
|
17280
|
+
"prestik",
|
|
17281
|
+
"prim",
|
|
17282
|
+
"prin",
|
|
17283
|
+
"provostapl",
|
|
17284
|
+
"pst",
|
|
17285
|
+
"pu",
|
|
17286
|
+
"pur",
|
|
17287
|
+
"r:",
|
|
17288
|
+
"ra",
|
|
17289
|
+
"rae",
|
|
17290
|
+
"raec'h",
|
|
17291
|
+
"raed",
|
|
17292
|
+
"raemp",
|
|
17293
|
+
"raen",
|
|
17294
|
+
"raent",
|
|
17295
|
+
"raes",
|
|
17296
|
+
"rafe",
|
|
17297
|
+
"rafec'h",
|
|
17298
|
+
"rafed",
|
|
17299
|
+
"rafemp",
|
|
17300
|
+
"rafen",
|
|
17301
|
+
"rafent",
|
|
17302
|
+
"rafes",
|
|
17303
|
+
"rag",
|
|
17304
|
+
"raimp",
|
|
17305
|
+
"raint",
|
|
17306
|
+
"raio",
|
|
17307
|
+
"raje",
|
|
17308
|
+
"rajec'h",
|
|
17309
|
+
"rajed",
|
|
17310
|
+
"rajemp",
|
|
17311
|
+
"rajen",
|
|
17312
|
+
"rajent",
|
|
17313
|
+
"rajes",
|
|
17314
|
+
"rak",
|
|
17315
|
+
"ral",
|
|
17316
|
+
"ran",
|
|
17317
|
+
"rankout",
|
|
17318
|
+
"raok",
|
|
17319
|
+
"razh",
|
|
17320
|
+
"re",
|
|
17321
|
+
"reas",
|
|
17322
|
+
"reer",
|
|
17323
|
+
"regennoù",
|
|
17324
|
+
"reiñ",
|
|
17325
|
+
"rejoc'h",
|
|
17326
|
+
"rejod",
|
|
17327
|
+
"rejomp",
|
|
17328
|
+
"rejont",
|
|
17329
|
+
"rejout",
|
|
17330
|
+
"rener",
|
|
17331
|
+
"rentañ",
|
|
17332
|
+
"reoc'h",
|
|
17333
|
+
"reomp",
|
|
17334
|
+
"reont",
|
|
17335
|
+
"reor",
|
|
17336
|
+
"reot",
|
|
17337
|
+
"resis",
|
|
17338
|
+
"ret",
|
|
17339
|
+
"reve",
|
|
17340
|
+
"rez",
|
|
17341
|
+
"ri",
|
|
17342
|
+
"rik",
|
|
17343
|
+
"rin",
|
|
17344
|
+
"ris",
|
|
17345
|
+
"rit",
|
|
17346
|
+
"rouez",
|
|
17347
|
+
"s:",
|
|
17348
|
+
"sac'h",
|
|
17349
|
+
"sant",
|
|
17350
|
+
"sav",
|
|
17351
|
+
"sañset",
|
|
16360
17352
|
"se",
|
|
16361
|
-
"
|
|
16362
|
-
"
|
|
16363
|
-
"
|
|
16364
|
-
"
|
|
16365
|
-
"
|
|
16366
|
-
"
|
|
16367
|
-
"
|
|
16368
|
-
"
|
|
16369
|
-
"
|
|
17353
|
+
"sed",
|
|
17354
|
+
"seitek",
|
|
17355
|
+
"seizh",
|
|
17356
|
+
"seizhvet",
|
|
17357
|
+
"sell",
|
|
17358
|
+
"sellit",
|
|
17359
|
+
"ser",
|
|
17360
|
+
"setu",
|
|
17361
|
+
"seul",
|
|
17362
|
+
"seurt",
|
|
17363
|
+
"siwazh",
|
|
17364
|
+
"skignañ",
|
|
17365
|
+
"skoaz",
|
|
17366
|
+
"skouer",
|
|
17367
|
+
"sort",
|
|
17368
|
+
"souden",
|
|
17369
|
+
"souvitañ",
|
|
17370
|
+
"soñj",
|
|
17371
|
+
"speriañ",
|
|
17372
|
+
"spririñ",
|
|
17373
|
+
"stad",
|
|
17374
|
+
"stlabezañ",
|
|
17375
|
+
"stop",
|
|
17376
|
+
"stranañ",
|
|
17377
|
+
"strewiñ",
|
|
17378
|
+
"strishaat",
|
|
17379
|
+
"stumm",
|
|
17380
|
+
"sujed",
|
|
17381
|
+
"surtoud",
|
|
17382
|
+
"t:",
|
|
17383
|
+
"ta",
|
|
17384
|
+
"taer",
|
|
17385
|
+
"tailh",
|
|
17386
|
+
"tak",
|
|
16370
17387
|
"tal",
|
|
16371
|
-
"
|
|
16372
|
-
"
|
|
17388
|
+
"talvoudegezh",
|
|
17389
|
+
"tamm",
|
|
17390
|
+
"tanav",
|
|
17391
|
+
"taol",
|
|
17392
|
+
"te",
|
|
17393
|
+
"techet",
|
|
17394
|
+
"teir",
|
|
17395
|
+
"teirvet",
|
|
17396
|
+
"telt",
|
|
17397
|
+
"teltenn",
|
|
16373
17398
|
"teus",
|
|
16374
|
-
"
|
|
16375
|
-
"
|
|
16376
|
-
"
|
|
16377
|
-
"
|
|
16378
|
-
"
|
|
16379
|
-
"
|
|
16380
|
-
"
|
|
16381
|
-
"
|
|
16382
|
-
"
|
|
16383
|
-
"
|
|
16384
|
-
"
|
|
17399
|
+
"teut",
|
|
17400
|
+
"teuteu",
|
|
17401
|
+
"ti",
|
|
17402
|
+
"tik",
|
|
17403
|
+
"toa",
|
|
17404
|
+
"tok",
|
|
17405
|
+
"tost",
|
|
17406
|
+
"tostig",
|
|
17407
|
+
"toud",
|
|
17408
|
+
"touesk",
|
|
17409
|
+
"touez",
|
|
17410
|
+
"toull",
|
|
17411
|
+
"tra",
|
|
17412
|
+
"trantenn",
|
|
17413
|
+
"traoñ",
|
|
17414
|
+
"trawalc'h",
|
|
17415
|
+
"tre",
|
|
17416
|
+
"trede",
|
|
17417
|
+
"tregont",
|
|
17418
|
+
"tremenet",
|
|
17419
|
+
"tri",
|
|
17420
|
+
"trivet",
|
|
17421
|
+
"triwec'h",
|
|
17422
|
+
"trizek",
|
|
17423
|
+
"tro",
|
|
17424
|
+
"trugarez",
|
|
17425
|
+
"trumm",
|
|
17426
|
+
"tsoin",
|
|
17427
|
+
"tsouin",
|
|
17428
|
+
"tu",
|
|
17429
|
+
"tud",
|
|
17430
|
+
"u:",
|
|
17431
|
+
"ugent",
|
|
17432
|
+
"uhel",
|
|
17433
|
+
"uhelañ",
|
|
17434
|
+
"ul",
|
|
17435
|
+
"un",
|
|
17436
|
+
"unan",
|
|
17437
|
+
"unanez",
|
|
17438
|
+
"unanig",
|
|
17439
|
+
"unnek",
|
|
17440
|
+
"unnekvet",
|
|
17441
|
+
"ur",
|
|
17442
|
+
"urzh",
|
|
17443
|
+
"us",
|
|
17444
|
+
"v:",
|
|
17445
|
+
"va",
|
|
17446
|
+
"vale",
|
|
17447
|
+
"van",
|
|
17448
|
+
"vare",
|
|
17449
|
+
"vat",
|
|
17450
|
+
"vefe",
|
|
17451
|
+
"vefec'h",
|
|
17452
|
+
"vefed",
|
|
17453
|
+
"vefemp",
|
|
17454
|
+
"vefen",
|
|
17455
|
+
"vefent",
|
|
17456
|
+
"vefes",
|
|
17457
|
+
"vesk",
|
|
17458
|
+
"vete",
|
|
17459
|
+
"vez",
|
|
17460
|
+
"vezan",
|
|
17461
|
+
"vezañ",
|
|
17462
|
+
"veze",
|
|
17463
|
+
"vezec'h",
|
|
17464
|
+
"vezed",
|
|
17465
|
+
"vezemp",
|
|
17466
|
+
"vezen",
|
|
17467
|
+
"vezent",
|
|
17468
|
+
"vezer",
|
|
17469
|
+
"vezes",
|
|
17470
|
+
"vezez",
|
|
17471
|
+
"vezit",
|
|
17472
|
+
"vezomp",
|
|
17473
|
+
"vezont",
|
|
17474
|
+
"vi",
|
|
17475
|
+
"vihan",
|
|
17476
|
+
"vihanañ",
|
|
17477
|
+
"vije",
|
|
17478
|
+
"vijec'h",
|
|
17479
|
+
"vijed",
|
|
17480
|
+
"vijemp",
|
|
17481
|
+
"vijen",
|
|
17482
|
+
"vijent",
|
|
17483
|
+
"vijes",
|
|
17484
|
+
"viken",
|
|
17485
|
+
"vimp",
|
|
17486
|
+
"vin",
|
|
17487
|
+
"vint",
|
|
17488
|
+
"vior",
|
|
17489
|
+
"viot",
|
|
17490
|
+
"virviken",
|
|
17491
|
+
"viskoazh",
|
|
17492
|
+
"vlan",
|
|
17493
|
+
"vlaou",
|
|
17494
|
+
"vo",
|
|
17495
|
+
"vod",
|
|
17496
|
+
"voe",
|
|
17497
|
+
"voec'h",
|
|
17498
|
+
"voed",
|
|
17499
|
+
"voemp",
|
|
17500
|
+
"voen",
|
|
17501
|
+
"voent",
|
|
17502
|
+
"voes",
|
|
17503
|
+
"vont",
|
|
17504
|
+
"vostapl",
|
|
17505
|
+
"vrac'h",
|
|
17506
|
+
"vrasañ",
|
|
17507
|
+
"vremañ",
|
|
17508
|
+
"w:",
|
|
17509
|
+
"walc'h",
|
|
17510
|
+
"war",
|
|
17511
|
+
"warnañ",
|
|
17512
|
+
"warni",
|
|
17513
|
+
"warno",
|
|
17514
|
+
"warnoc'h",
|
|
17515
|
+
"warnomp",
|
|
17516
|
+
"warnon",
|
|
17517
|
+
"warnor",
|
|
17518
|
+
"warnout",
|
|
17519
|
+
"wazh",
|
|
17520
|
+
"wech",
|
|
17521
|
+
"wechoù",
|
|
17522
|
+
"well",
|
|
17523
|
+
"y:",
|
|
17524
|
+
"you",
|
|
17525
|
+
"youadenn",
|
|
17526
|
+
"youc'hadenn",
|
|
17527
|
+
"youc'hou",
|
|
17528
|
+
"z:",
|
|
17529
|
+
"za",
|
|
17530
|
+
"zan",
|
|
17531
|
+
"zaw",
|
|
17532
|
+
"zeu",
|
|
17533
|
+
"zi",
|
|
17534
|
+
"ziar",
|
|
17535
|
+
"zigarez",
|
|
17536
|
+
"ziget",
|
|
17537
|
+
"zindan",
|
|
17538
|
+
"zioc'h",
|
|
17539
|
+
"ziouzh",
|
|
17540
|
+
"zirak",
|
|
17541
|
+
"zivout",
|
|
17542
|
+
"ziwar",
|
|
17543
|
+
"ziwezhañ",
|
|
17544
|
+
"zo",
|
|
17545
|
+
"zoken",
|
|
17546
|
+
"zokenoc'h",
|
|
17547
|
+
"zouesk",
|
|
17548
|
+
"zouez",
|
|
17549
|
+
"zro",
|
|
17550
|
+
"zu"
|
|
16385
17551
|
];
|
|
16386
17552
|
const bul = [
|
|
16387
17553
|
"а",
|
|
@@ -28037,22 +29203,32 @@ const tur = [
|
|
|
28037
29203
|
"şöyle"
|
|
28038
29204
|
];
|
|
28039
29205
|
const ukr = [
|
|
29206
|
+
"а",
|
|
29207
|
+
"або",
|
|
28040
29208
|
"авжеж",
|
|
28041
29209
|
"адже",
|
|
29210
|
+
"аж",
|
|
28042
29211
|
"але",
|
|
29212
|
+
"ані",
|
|
28043
29213
|
"б",
|
|
28044
29214
|
"без",
|
|
29215
|
+
"би",
|
|
29216
|
+
"бо",
|
|
28045
29217
|
"був",
|
|
28046
29218
|
"була",
|
|
28047
29219
|
"були",
|
|
28048
29220
|
"було",
|
|
28049
29221
|
"бути",
|
|
28050
29222
|
"більш",
|
|
29223
|
+
"в",
|
|
28051
29224
|
"вам",
|
|
29225
|
+
"вами",
|
|
28052
29226
|
"вас",
|
|
28053
29227
|
"весь",
|
|
29228
|
+
"вже",
|
|
28054
29229
|
"вздовж",
|
|
28055
29230
|
"ви",
|
|
29231
|
+
"від",
|
|
28056
29232
|
"вниз",
|
|
28057
29233
|
"внизу",
|
|
28058
29234
|
"вона",
|
|
@@ -28061,55 +29237,138 @@ const ukr = [
|
|
|
28061
29237
|
"все",
|
|
28062
29238
|
"всередині",
|
|
28063
29239
|
"всіх",
|
|
29240
|
+
"вся",
|
|
28064
29241
|
"від",
|
|
28065
29242
|
"він",
|
|
28066
29243
|
"да",
|
|
28067
29244
|
"давай",
|
|
28068
29245
|
"давати",
|
|
28069
29246
|
"де",
|
|
29247
|
+
"десь",
|
|
28070
29248
|
"дещо",
|
|
28071
29249
|
"для",
|
|
28072
29250
|
"до",
|
|
29251
|
+
"є",
|
|
29252
|
+
"ж",
|
|
29253
|
+
"же",
|
|
28073
29254
|
"з",
|
|
29255
|
+
"за",
|
|
28074
29256
|
"завжди",
|
|
28075
29257
|
"замість",
|
|
29258
|
+
"зі",
|
|
29259
|
+
"і",
|
|
29260
|
+
"із",
|
|
29261
|
+
"інших",
|
|
29262
|
+
"її",
|
|
29263
|
+
"їй",
|
|
29264
|
+
"їм",
|
|
29265
|
+
"їх",
|
|
28076
29266
|
"й",
|
|
29267
|
+
"його",
|
|
29268
|
+
"йому",
|
|
28077
29269
|
"коли",
|
|
28078
29270
|
"ледве",
|
|
29271
|
+
"лиш",
|
|
28079
29272
|
"майже",
|
|
29273
|
+
"мене",
|
|
29274
|
+
"мені",
|
|
28080
29275
|
"ми",
|
|
29276
|
+
"між",
|
|
29277
|
+
"мій",
|
|
29278
|
+
"мною",
|
|
29279
|
+
"мов",
|
|
29280
|
+
"мого",
|
|
29281
|
+
"моєї",
|
|
29282
|
+
"моє",
|
|
29283
|
+
"може",
|
|
29284
|
+
"мої",
|
|
29285
|
+
"моїх",
|
|
29286
|
+
"моя",
|
|
29287
|
+
"на",
|
|
29288
|
+
"над",
|
|
28081
29289
|
"навколо",
|
|
28082
29290
|
"навіть",
|
|
28083
29291
|
"нам",
|
|
29292
|
+
"нами",
|
|
29293
|
+
"нас",
|
|
29294
|
+
"наче",
|
|
29295
|
+
"наш",
|
|
29296
|
+
"не",
|
|
29297
|
+
"нє",
|
|
29298
|
+
"неї",
|
|
29299
|
+
"нема",
|
|
29300
|
+
"немов",
|
|
29301
|
+
"неначе",
|
|
29302
|
+
"нею",
|
|
29303
|
+
"ним",
|
|
29304
|
+
"ними",
|
|
29305
|
+
"них",
|
|
29306
|
+
"ні",
|
|
29307
|
+
"ніби",
|
|
29308
|
+
"ніщо",
|
|
29309
|
+
"нього",
|
|
29310
|
+
"о",
|
|
29311
|
+
"ось",
|
|
28084
29312
|
"от",
|
|
28085
29313
|
"отже",
|
|
28086
29314
|
"отож",
|
|
29315
|
+
"під",
|
|
29316
|
+
"по",
|
|
28087
29317
|
"поза",
|
|
28088
29318
|
"про",
|
|
28089
29319
|
"під",
|
|
29320
|
+
"сам",
|
|
29321
|
+
"сама",
|
|
29322
|
+
"свій",
|
|
29323
|
+
"свої",
|
|
29324
|
+
"своя",
|
|
29325
|
+
"свою",
|
|
29326
|
+
"себе",
|
|
29327
|
+
"собі",
|
|
28090
29328
|
"та",
|
|
29329
|
+
"там",
|
|
28091
29330
|
"так",
|
|
29331
|
+
"така",
|
|
28092
29332
|
"такий",
|
|
28093
29333
|
"також",
|
|
29334
|
+
"твій",
|
|
29335
|
+
"твого",
|
|
29336
|
+
"твоєї",
|
|
29337
|
+
"твої",
|
|
29338
|
+
"твоя",
|
|
28094
29339
|
"те",
|
|
29340
|
+
"тебе",
|
|
28095
29341
|
"ти",
|
|
29342
|
+
"ті",
|
|
29343
|
+
"тільки",
|
|
29344
|
+
"то",
|
|
29345
|
+
"тобі",
|
|
29346
|
+
"тобою",
|
|
28096
29347
|
"тобто",
|
|
29348
|
+
"тоді",
|
|
28097
29349
|
"тож",
|
|
29350
|
+
"той",
|
|
28098
29351
|
"тощо",
|
|
29352
|
+
"тут",
|
|
29353
|
+
"у",
|
|
29354
|
+
"хіба",
|
|
29355
|
+
"хоч",
|
|
28099
29356
|
"хоча",
|
|
28100
29357
|
"це",
|
|
28101
29358
|
"цей",
|
|
29359
|
+
"ці",
|
|
29360
|
+
"ця",
|
|
28102
29361
|
"чи",
|
|
28103
29362
|
"чого",
|
|
29363
|
+
"ще",
|
|
28104
29364
|
"що",
|
|
29365
|
+
"щоб",
|
|
29366
|
+
"щось",
|
|
29367
|
+
"я",
|
|
28105
29368
|
"як",
|
|
29369
|
+
"яка",
|
|
28106
29370
|
"який",
|
|
28107
|
-
"якої"
|
|
28108
|
-
"є",
|
|
28109
|
-
"із",
|
|
28110
|
-
"інших",
|
|
28111
|
-
"їх",
|
|
28112
|
-
"її"
|
|
29371
|
+
"якої"
|
|
28113
29372
|
];
|
|
28114
29373
|
const urd = [
|
|
28115
29374
|
"آئی",
|
|
@@ -29105,9 +30364,22 @@ function popupWindow(url, title, window2, w, h) {
|
|
|
29105
30364
|
}
|
|
29106
30365
|
const TINA_LOGIN_EVENT = "tinaCloudLogin";
|
|
29107
30366
|
const AUTH_TOKEN_KEY = "tinacms-auth";
|
|
29108
|
-
const authenticate = (clientId, frontendUrl) => {
|
|
30367
|
+
const authenticate = (clientId, frontendUrl, oauth2) => {
|
|
29109
30368
|
return new Promise((resolve) => {
|
|
29110
|
-
|
|
30369
|
+
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
30370
|
+
if (oauth2) {
|
|
30371
|
+
const redirectUri = encodeURIComponent(`${origin}/admin/auth/callback`);
|
|
30372
|
+
const codeChallenge = "jksdfjdsklf";
|
|
30373
|
+
window.location.href = `${frontendUrl}/oauth-signin?redirect_uri=${redirectUri}&code_challenge=${codeChallenge}&client_id=${clientId}`;
|
|
30374
|
+
return;
|
|
30375
|
+
}
|
|
30376
|
+
const authTab = popupWindow(
|
|
30377
|
+
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
30378
|
+
"_blank",
|
|
30379
|
+
window,
|
|
30380
|
+
1e3,
|
|
30381
|
+
700
|
|
30382
|
+
);
|
|
29111
30383
|
window.addEventListener("message", function(e) {
|
|
29112
30384
|
if (e.data.source === TINA_LOGIN_EVENT) {
|
|
29113
30385
|
if (authTab) {
|
|
@@ -29120,14 +30392,6 @@ const authenticate = (clientId, frontendUrl) => {
|
|
|
29120
30392
|
});
|
|
29121
30393
|
}
|
|
29122
30394
|
});
|
|
29123
|
-
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
29124
|
-
authTab = popupWindow(
|
|
29125
|
-
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
29126
|
-
"_blank",
|
|
29127
|
-
window,
|
|
29128
|
-
1e3,
|
|
29129
|
-
700
|
|
29130
|
-
);
|
|
29131
30395
|
});
|
|
29132
30396
|
};
|
|
29133
30397
|
const DefaultSessionProvider = ({
|
|
@@ -29189,6 +30453,7 @@ class TinaCloudAuthProvider extends AbstractAuthProvider {
|
|
|
29189
30453
|
this.frontendUrl = frontendUrl;
|
|
29190
30454
|
this.clientId = clientId;
|
|
29191
30455
|
this.identityApiUrl = identityApiUrl;
|
|
30456
|
+
this.oauth2 = options.oauth2 || false;
|
|
29192
30457
|
switch (tokenStorage) {
|
|
29193
30458
|
case "LOCAL_STORAGE":
|
|
29194
30459
|
this.getToken = async function() {
|
|
@@ -29234,7 +30499,11 @@ class TinaCloudAuthProvider extends AbstractAuthProvider {
|
|
|
29234
30499
|
}
|
|
29235
30500
|
}
|
|
29236
30501
|
async authenticate() {
|
|
29237
|
-
const token = await authenticate(
|
|
30502
|
+
const token = await authenticate(
|
|
30503
|
+
this.clientId,
|
|
30504
|
+
this.frontendUrl,
|
|
30505
|
+
this.oauth2
|
|
30506
|
+
);
|
|
29238
30507
|
this.setToken(token);
|
|
29239
30508
|
return token;
|
|
29240
30509
|
}
|
|
@@ -29345,7 +30614,7 @@ const IndexStatusResponse = z.object({
|
|
|
29345
30614
|
});
|
|
29346
30615
|
class Client {
|
|
29347
30616
|
constructor({ tokenStorage = "MEMORY", ...options }) {
|
|
29348
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
30617
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
29349
30618
|
this.events = new EventBus();
|
|
29350
30619
|
this.protectedBranches = [];
|
|
29351
30620
|
this.usingEditorialWorkflow = false;
|
|
@@ -29426,7 +30695,8 @@ mutation addPendingDocumentMutation(
|
|
|
29426
30695
|
identityApiUrl: this.identityApiUrl,
|
|
29427
30696
|
getTokenFn: options.getTokenFn,
|
|
29428
30697
|
tokenStorage,
|
|
29429
|
-
frontendUrl: this.frontendUrl
|
|
30698
|
+
frontendUrl: this.frontendUrl,
|
|
30699
|
+
oauth2: (_w = (_v = options.schema) == null ? void 0 : _v.config) == null ? void 0 : _w.oauth2
|
|
29430
30700
|
});
|
|
29431
30701
|
}
|
|
29432
30702
|
get isLocalMode() {
|
|
@@ -29438,6 +30708,7 @@ mutation addPendingDocumentMutation(
|
|
|
29438
30708
|
setBranch(branchName) {
|
|
29439
30709
|
var _a, _b, _c, _d;
|
|
29440
30710
|
const encodedBranch = encodeURIComponent(branchName);
|
|
30711
|
+
document.cookie = `x-branch=${encodedBranch}; path=/; max-age=3600`;
|
|
29441
30712
|
this.branch = encodedBranch;
|
|
29442
30713
|
this.assetsApiUrl = ((_a = this.options.tinaioConfig) == null ? void 0 : _a.assetsApiUrlOverride) || "https://assets.tinajs.io";
|
|
29443
30714
|
this.frontendUrl = ((_b = this.options.tinaioConfig) == null ? void 0 : _b.frontendUrlOverride) || "https://app.tina.io";
|
|
@@ -29480,7 +30751,7 @@ mutation addPendingDocumentMutation(
|
|
|
29480
30751
|
branch: ${this.branch}.`;
|
|
29481
30752
|
if (this.branch !== "main") {
|
|
29482
30753
|
errorMessage = `${errorMessage}
|
|
29483
|
-
Note: This error can occur if the branch does not exist on GitHub or on
|
|
30754
|
+
Note: This error can occur if the branch does not exist on GitHub or on TinaCloud`;
|
|
29484
30755
|
}
|
|
29485
30756
|
}
|
|
29486
30757
|
throw new Error(errorMessage);
|
|
@@ -29616,7 +30887,7 @@ mutation addPendingDocumentMutation(
|
|
|
29616
30887
|
unknownCount++;
|
|
29617
30888
|
if (unknownCount > 5) {
|
|
29618
30889
|
throw new Error(
|
|
29619
|
-
"AsyncPoller: status unknown for too long, please check indexing progress the
|
|
30890
|
+
"AsyncPoller: status unknown for too long, please check indexing progress the TinaCloud dashboard"
|
|
29620
30891
|
);
|
|
29621
30892
|
}
|
|
29622
30893
|
}
|
|
@@ -29833,56 +31104,6 @@ const AsyncButton = ({ name, primary, action }) => {
|
|
|
29833
31104
|
!submitting && name
|
|
29834
31105
|
);
|
|
29835
31106
|
};
|
|
29836
|
-
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
29837
|
-
const useTinaAuthRedirect = () => {
|
|
29838
|
-
useEffect(() => {
|
|
29839
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
29840
|
-
const config = {
|
|
29841
|
-
code: urlParams.get("code") || "",
|
|
29842
|
-
scope: urlParams.get("scope") || "email",
|
|
29843
|
-
state: urlParams.get("state")
|
|
29844
|
-
};
|
|
29845
|
-
if (!config.code) {
|
|
29846
|
-
return;
|
|
29847
|
-
}
|
|
29848
|
-
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
29849
|
-
}, []);
|
|
29850
|
-
};
|
|
29851
|
-
const createClient = ({
|
|
29852
|
-
clientId,
|
|
29853
|
-
isLocalClient = true,
|
|
29854
|
-
branch,
|
|
29855
|
-
tinaioConfig,
|
|
29856
|
-
schema,
|
|
29857
|
-
apiUrl,
|
|
29858
|
-
tinaGraphQLVersion
|
|
29859
|
-
}) => {
|
|
29860
|
-
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
29861
|
-
clientId: clientId || "",
|
|
29862
|
-
branch: branch || "main",
|
|
29863
|
-
tokenStorage: "LOCAL_STORAGE",
|
|
29864
|
-
tinaioConfig,
|
|
29865
|
-
schema,
|
|
29866
|
-
tinaGraphQLVersion
|
|
29867
|
-
});
|
|
29868
|
-
};
|
|
29869
|
-
function assertShape(value, yupSchema, errorMessage) {
|
|
29870
|
-
const shape = yupSchema(yup);
|
|
29871
|
-
try {
|
|
29872
|
-
shape.validateSync(value);
|
|
29873
|
-
} catch (e) {
|
|
29874
|
-
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
29875
|
-
throw new Error(message);
|
|
29876
|
-
}
|
|
29877
|
-
}
|
|
29878
|
-
function safeAssertShape(value, yupSchema) {
|
|
29879
|
-
try {
|
|
29880
|
-
assertShape(value, yupSchema);
|
|
29881
|
-
return true;
|
|
29882
|
-
} catch (e) {
|
|
29883
|
-
return false;
|
|
29884
|
-
}
|
|
29885
|
-
}
|
|
29886
31107
|
class TinaAdminApi {
|
|
29887
31108
|
constructor(cms) {
|
|
29888
31109
|
var _a, _b, _c, _d;
|
|
@@ -30229,6 +31450,56 @@ class TinaAdminApi {
|
|
|
30229
31450
|
);
|
|
30230
31451
|
}
|
|
30231
31452
|
}
|
|
31453
|
+
const createClient = ({
|
|
31454
|
+
clientId,
|
|
31455
|
+
isLocalClient = true,
|
|
31456
|
+
branch,
|
|
31457
|
+
tinaioConfig,
|
|
31458
|
+
schema,
|
|
31459
|
+
apiUrl,
|
|
31460
|
+
tinaGraphQLVersion
|
|
31461
|
+
}) => {
|
|
31462
|
+
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
31463
|
+
clientId: clientId || "",
|
|
31464
|
+
branch: branch || "main",
|
|
31465
|
+
tokenStorage: "LOCAL_STORAGE",
|
|
31466
|
+
tinaioConfig,
|
|
31467
|
+
schema,
|
|
31468
|
+
tinaGraphQLVersion
|
|
31469
|
+
});
|
|
31470
|
+
};
|
|
31471
|
+
function assertShape(value, yupSchema, errorMessage) {
|
|
31472
|
+
const shape = yupSchema(yup);
|
|
31473
|
+
try {
|
|
31474
|
+
shape.validateSync(value);
|
|
31475
|
+
} catch (e) {
|
|
31476
|
+
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
31477
|
+
throw new Error(message);
|
|
31478
|
+
}
|
|
31479
|
+
}
|
|
31480
|
+
function safeAssertShape(value, yupSchema) {
|
|
31481
|
+
try {
|
|
31482
|
+
assertShape(value, yupSchema);
|
|
31483
|
+
return true;
|
|
31484
|
+
} catch (e) {
|
|
31485
|
+
return false;
|
|
31486
|
+
}
|
|
31487
|
+
}
|
|
31488
|
+
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
31489
|
+
const useTinaAuthRedirect = () => {
|
|
31490
|
+
useEffect(() => {
|
|
31491
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
31492
|
+
const config = {
|
|
31493
|
+
code: urlParams.get("code") || "",
|
|
31494
|
+
scope: urlParams.get("scope") || "email",
|
|
31495
|
+
state: urlParams.get("state")
|
|
31496
|
+
};
|
|
31497
|
+
if (!config.code) {
|
|
31498
|
+
return;
|
|
31499
|
+
}
|
|
31500
|
+
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
31501
|
+
}, []);
|
|
31502
|
+
};
|
|
30232
31503
|
function sleep(ms) {
|
|
30233
31504
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
30234
31505
|
}
|
|
@@ -30327,7 +31598,7 @@ const AuthWallInner = ({
|
|
|
30327
31598
|
});
|
|
30328
31599
|
}
|
|
30329
31600
|
};
|
|
30330
|
-
let modalTitle = "
|
|
31601
|
+
let modalTitle = "TinaCloud";
|
|
30331
31602
|
if (activeModal === "authenticate" && loginStrategy === "Redirect" && !isTinaCloud) {
|
|
30332
31603
|
modalTitle = "Enter into edit mode";
|
|
30333
31604
|
} else if (activeModal === "authenticate" && loginStrategy === "UsernamePassword") {
|
|
@@ -30343,7 +31614,7 @@ const AuthWallInner = ({
|
|
|
30343
31614
|
ModalBuilder,
|
|
30344
31615
|
{
|
|
30345
31616
|
title: modalTitle,
|
|
30346
|
-
message: isTinaCloud ? "Your site uses
|
|
31617
|
+
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.",
|
|
30347
31618
|
close,
|
|
30348
31619
|
actions: [
|
|
30349
31620
|
...otherModalActions,
|
|
@@ -30565,6 +31836,9 @@ const TinaCloudProvider = (props) => {
|
|
|
30565
31836
|
cms.flags.set("branch-switcher", true);
|
|
30566
31837
|
client.usingEditorialWorkflow = true;
|
|
30567
31838
|
client.protectedBranches = project.protectedBranches;
|
|
31839
|
+
if (!project.metadata[currentBranch]) {
|
|
31840
|
+
setCurrentBranch(project.defaultBranch || "main");
|
|
31841
|
+
}
|
|
30568
31842
|
}
|
|
30569
31843
|
});
|
|
30570
31844
|
};
|
|
@@ -30577,7 +31851,7 @@ const TinaCloudProvider = (props) => {
|
|
|
30577
31851
|
}
|
|
30578
31852
|
});
|
|
30579
31853
|
return unsubscribe;
|
|
30580
|
-
}, [isTinaCloud, cms]);
|
|
31854
|
+
}, [currentBranch, isTinaCloud, cms]);
|
|
30581
31855
|
return /* @__PURE__ */ React__default.createElement(SessionProvider, { basePath: "/api/tina/auth" }, /* @__PURE__ */ React__default.createElement(
|
|
30582
31856
|
BranchDataProvider,
|
|
30583
31857
|
{
|
|
@@ -31063,6 +32337,14 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31063
32337
|
}
|
|
31064
32338
|
return client.request(query, { variables });
|
|
31065
32339
|
};
|
|
32340
|
+
const GetCMS = ({ children }) => {
|
|
32341
|
+
try {
|
|
32342
|
+
const cms = useCMS$1();
|
|
32343
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(cms));
|
|
32344
|
+
} catch (e) {
|
|
32345
|
+
return null;
|
|
32346
|
+
}
|
|
32347
|
+
};
|
|
31066
32348
|
const Layout = ({ children }) => {
|
|
31067
32349
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
31068
32350
|
"div",
|
|
@@ -31274,14 +32556,118 @@ const SidebarCloudLink = ({ config }) => {
|
|
|
31274
32556
|
}
|
|
31275
32557
|
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));
|
|
31276
32558
|
};
|
|
31277
|
-
const
|
|
31278
|
-
|
|
31279
|
-
|
|
31280
|
-
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
|
|
31284
|
-
|
|
32559
|
+
const LoadingPage = () => /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
32560
|
+
"div",
|
|
32561
|
+
{
|
|
32562
|
+
style: {
|
|
32563
|
+
position: "absolute",
|
|
32564
|
+
top: 0,
|
|
32565
|
+
left: 0,
|
|
32566
|
+
width: "100%",
|
|
32567
|
+
height: "100%",
|
|
32568
|
+
zIndex: 200,
|
|
32569
|
+
opacity: "0.8",
|
|
32570
|
+
display: "flex",
|
|
32571
|
+
alignItems: "start",
|
|
32572
|
+
justifyContent: "center",
|
|
32573
|
+
padding: "120px 40px 40px 40px"
|
|
32574
|
+
}
|
|
32575
|
+
},
|
|
32576
|
+
/* @__PURE__ */ React__default.createElement(
|
|
32577
|
+
"div",
|
|
32578
|
+
{
|
|
32579
|
+
style: {
|
|
32580
|
+
background: "#FFF",
|
|
32581
|
+
border: "1px solid #EDECF3",
|
|
32582
|
+
boxShadow: "0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
32583
|
+
borderRadius: "8px",
|
|
32584
|
+
padding: "32px 24px",
|
|
32585
|
+
width: "460px",
|
|
32586
|
+
maxWidth: "90%",
|
|
32587
|
+
display: "flex",
|
|
32588
|
+
alignItems: "center",
|
|
32589
|
+
justifyContent: "center",
|
|
32590
|
+
flexDirection: "column"
|
|
32591
|
+
}
|
|
32592
|
+
},
|
|
32593
|
+
/* @__PURE__ */ React__default.createElement(
|
|
32594
|
+
"svg",
|
|
32595
|
+
{
|
|
32596
|
+
style: {
|
|
32597
|
+
width: "64px",
|
|
32598
|
+
color: "#2296fe",
|
|
32599
|
+
marginTop: "-8px",
|
|
32600
|
+
marginBottom: "16px"
|
|
32601
|
+
},
|
|
32602
|
+
version: "1.1",
|
|
32603
|
+
id: "L5",
|
|
32604
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32605
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
32606
|
+
x: "0px",
|
|
32607
|
+
y: "0px",
|
|
32608
|
+
viewBox: "0 0 100 64",
|
|
32609
|
+
enableBackground: "new 0 0 0 0",
|
|
32610
|
+
xmlSpace: "preserve"
|
|
32611
|
+
},
|
|
32612
|
+
/* @__PURE__ */ React__default.createElement("circle", { fill: "currentColor", stroke: "none", cx: 6, cy: 32, r: 6 }, /* @__PURE__ */ React__default.createElement(
|
|
32613
|
+
"animateTransform",
|
|
32614
|
+
{
|
|
32615
|
+
attributeName: "transform",
|
|
32616
|
+
dur: "1s",
|
|
32617
|
+
type: "translate",
|
|
32618
|
+
values: "0 15 ; 0 -15; 0 15",
|
|
32619
|
+
calcMode: "spline",
|
|
32620
|
+
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
32621
|
+
repeatCount: "indefinite",
|
|
32622
|
+
begin: "0.1"
|
|
32623
|
+
}
|
|
32624
|
+
)),
|
|
32625
|
+
/* @__PURE__ */ React__default.createElement("circle", { fill: "currentColor", stroke: "none", cx: 30, cy: 32, r: 6 }, /* @__PURE__ */ React__default.createElement(
|
|
32626
|
+
"animateTransform",
|
|
32627
|
+
{
|
|
32628
|
+
attributeName: "transform",
|
|
32629
|
+
dur: "1s",
|
|
32630
|
+
type: "translate",
|
|
32631
|
+
values: "0 15 ; 0 -10; 0 15",
|
|
32632
|
+
calcMode: "spline",
|
|
32633
|
+
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
32634
|
+
repeatCount: "indefinite",
|
|
32635
|
+
begin: "0.2"
|
|
32636
|
+
}
|
|
32637
|
+
)),
|
|
32638
|
+
/* @__PURE__ */ React__default.createElement("circle", { fill: "currentColor", stroke: "none", cx: 54, cy: 32, r: 6 }, /* @__PURE__ */ React__default.createElement(
|
|
32639
|
+
"animateTransform",
|
|
32640
|
+
{
|
|
32641
|
+
attributeName: "transform",
|
|
32642
|
+
dur: "1s",
|
|
32643
|
+
type: "translate",
|
|
32644
|
+
values: "0 15 ; 0 -5; 0 15",
|
|
32645
|
+
calcMode: "spline",
|
|
32646
|
+
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
32647
|
+
repeatCount: "indefinite",
|
|
32648
|
+
begin: "0.3"
|
|
32649
|
+
}
|
|
32650
|
+
))
|
|
32651
|
+
),
|
|
32652
|
+
/* @__PURE__ */ React__default.createElement(
|
|
32653
|
+
"p",
|
|
32654
|
+
{
|
|
32655
|
+
style: {
|
|
32656
|
+
fontSize: "16px",
|
|
32657
|
+
color: "#716c7f",
|
|
32658
|
+
textAlign: "center",
|
|
32659
|
+
lineHeight: "1.3",
|
|
32660
|
+
fontFamily: "'Inter', sans-serif",
|
|
32661
|
+
fontWeight: "normal"
|
|
32662
|
+
}
|
|
32663
|
+
},
|
|
32664
|
+
"Please wait, Tina is loading data..."
|
|
32665
|
+
)
|
|
32666
|
+
)
|
|
32667
|
+
));
|
|
32668
|
+
function RiHome2Line(props) {
|
|
32669
|
+
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);
|
|
32670
|
+
}
|
|
31285
32671
|
const PageWrapper = ({ children }) => {
|
|
31286
32672
|
var _a, _b;
|
|
31287
32673
|
const cms = useCMS$1();
|
|
@@ -31306,321 +32692,6 @@ const PageHeader = ({
|
|
|
31306
32692
|
};
|
|
31307
32693
|
const PageBody = ({ children }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
31308
32694
|
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));
|
|
31309
|
-
const DashboardPage = () => {
|
|
31310
|
-
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
31311
|
-
var _a, _b;
|
|
31312
|
-
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.")));
|
|
31313
|
-
});
|
|
31314
|
-
};
|
|
31315
|
-
function RiHome2Line(props) {
|
|
31316
|
-
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);
|
|
31317
|
-
}
|
|
31318
|
-
const LoadingPage = () => /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
31319
|
-
"div",
|
|
31320
|
-
{
|
|
31321
|
-
style: {
|
|
31322
|
-
position: "absolute",
|
|
31323
|
-
top: 0,
|
|
31324
|
-
left: 0,
|
|
31325
|
-
width: "100%",
|
|
31326
|
-
height: "100%",
|
|
31327
|
-
zIndex: 200,
|
|
31328
|
-
opacity: "0.8",
|
|
31329
|
-
display: "flex",
|
|
31330
|
-
alignItems: "start",
|
|
31331
|
-
justifyContent: "center",
|
|
31332
|
-
padding: "120px 40px 40px 40px"
|
|
31333
|
-
}
|
|
31334
|
-
},
|
|
31335
|
-
/* @__PURE__ */ React__default.createElement(
|
|
31336
|
-
"div",
|
|
31337
|
-
{
|
|
31338
|
-
style: {
|
|
31339
|
-
background: "#FFF",
|
|
31340
|
-
border: "1px solid #EDECF3",
|
|
31341
|
-
boxShadow: "0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
31342
|
-
borderRadius: "8px",
|
|
31343
|
-
padding: "32px 24px",
|
|
31344
|
-
width: "460px",
|
|
31345
|
-
maxWidth: "90%",
|
|
31346
|
-
display: "flex",
|
|
31347
|
-
alignItems: "center",
|
|
31348
|
-
justifyContent: "center",
|
|
31349
|
-
flexDirection: "column"
|
|
31350
|
-
}
|
|
31351
|
-
},
|
|
31352
|
-
/* @__PURE__ */ React__default.createElement(
|
|
31353
|
-
"svg",
|
|
31354
|
-
{
|
|
31355
|
-
style: {
|
|
31356
|
-
width: "64px",
|
|
31357
|
-
color: "#2296fe",
|
|
31358
|
-
marginTop: "-8px",
|
|
31359
|
-
marginBottom: "16px"
|
|
31360
|
-
},
|
|
31361
|
-
version: "1.1",
|
|
31362
|
-
id: "L5",
|
|
31363
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31364
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
31365
|
-
x: "0px",
|
|
31366
|
-
y: "0px",
|
|
31367
|
-
viewBox: "0 0 100 64",
|
|
31368
|
-
enableBackground: "new 0 0 0 0",
|
|
31369
|
-
xmlSpace: "preserve"
|
|
31370
|
-
},
|
|
31371
|
-
/* @__PURE__ */ React__default.createElement("circle", { fill: "currentColor", stroke: "none", cx: 6, cy: 32, r: 6 }, /* @__PURE__ */ React__default.createElement(
|
|
31372
|
-
"animateTransform",
|
|
31373
|
-
{
|
|
31374
|
-
attributeName: "transform",
|
|
31375
|
-
dur: "1s",
|
|
31376
|
-
type: "translate",
|
|
31377
|
-
values: "0 15 ; 0 -15; 0 15",
|
|
31378
|
-
calcMode: "spline",
|
|
31379
|
-
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
31380
|
-
repeatCount: "indefinite",
|
|
31381
|
-
begin: "0.1"
|
|
31382
|
-
}
|
|
31383
|
-
)),
|
|
31384
|
-
/* @__PURE__ */ React__default.createElement("circle", { fill: "currentColor", stroke: "none", cx: 30, cy: 32, r: 6 }, /* @__PURE__ */ React__default.createElement(
|
|
31385
|
-
"animateTransform",
|
|
31386
|
-
{
|
|
31387
|
-
attributeName: "transform",
|
|
31388
|
-
dur: "1s",
|
|
31389
|
-
type: "translate",
|
|
31390
|
-
values: "0 15 ; 0 -10; 0 15",
|
|
31391
|
-
calcMode: "spline",
|
|
31392
|
-
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
31393
|
-
repeatCount: "indefinite",
|
|
31394
|
-
begin: "0.2"
|
|
31395
|
-
}
|
|
31396
|
-
)),
|
|
31397
|
-
/* @__PURE__ */ React__default.createElement("circle", { fill: "currentColor", stroke: "none", cx: 54, cy: 32, r: 6 }, /* @__PURE__ */ React__default.createElement(
|
|
31398
|
-
"animateTransform",
|
|
31399
|
-
{
|
|
31400
|
-
attributeName: "transform",
|
|
31401
|
-
dur: "1s",
|
|
31402
|
-
type: "translate",
|
|
31403
|
-
values: "0 15 ; 0 -5; 0 15",
|
|
31404
|
-
calcMode: "spline",
|
|
31405
|
-
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
31406
|
-
repeatCount: "indefinite",
|
|
31407
|
-
begin: "0.3"
|
|
31408
|
-
}
|
|
31409
|
-
))
|
|
31410
|
-
),
|
|
31411
|
-
/* @__PURE__ */ React__default.createElement(
|
|
31412
|
-
"p",
|
|
31413
|
-
{
|
|
31414
|
-
style: {
|
|
31415
|
-
fontSize: "16px",
|
|
31416
|
-
color: "#716c7f",
|
|
31417
|
-
textAlign: "center",
|
|
31418
|
-
lineHeight: "1.3",
|
|
31419
|
-
fontFamily: "'Inter', sans-serif",
|
|
31420
|
-
fontWeight: "normal"
|
|
31421
|
-
}
|
|
31422
|
-
},
|
|
31423
|
-
"Please wait, Tina is loading data..."
|
|
31424
|
-
)
|
|
31425
|
-
)
|
|
31426
|
-
));
|
|
31427
|
-
const FullscreenError = ({
|
|
31428
|
-
title = "Error",
|
|
31429
|
-
errorMessage = "It looks like something went wrong."
|
|
31430
|
-
}) => {
|
|
31431
|
-
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"));
|
|
31432
|
-
};
|
|
31433
|
-
const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
|
|
31434
|
-
const api = new TinaAdminApi(cms);
|
|
31435
|
-
const schema = cms.api.tina.schema;
|
|
31436
|
-
const collectionExtra = schema.getCollection(collectionName);
|
|
31437
|
-
const [collection, setCollection] = useState(void 0);
|
|
31438
|
-
const [loading, setLoading] = useState(true);
|
|
31439
|
-
const [error, setError] = useState(void 0);
|
|
31440
|
-
const [resetState, setResetSate] = useState(0);
|
|
31441
|
-
useEffect(() => {
|
|
31442
|
-
let cancelled = false;
|
|
31443
|
-
const fetchCollection = async () => {
|
|
31444
|
-
var _a;
|
|
31445
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31446
|
-
const { name, order } = JSON.parse(sortKey || "{}");
|
|
31447
|
-
const validSortKey = ((_a = collectionExtra.fields) == null ? void 0 : _a.map((x) => x.name).includes(name)) ? name : void 0;
|
|
31448
|
-
try {
|
|
31449
|
-
const collection2 = await api.fetchCollection(
|
|
31450
|
-
collectionName,
|
|
31451
|
-
includeDocuments,
|
|
31452
|
-
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
31453
|
-
after,
|
|
31454
|
-
validSortKey,
|
|
31455
|
-
order,
|
|
31456
|
-
filterArgs
|
|
31457
|
-
);
|
|
31458
|
-
setCollection(collection2);
|
|
31459
|
-
} catch (error2) {
|
|
31460
|
-
cms.alerts.error(
|
|
31461
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31462
|
-
);
|
|
31463
|
-
console.error(error2);
|
|
31464
|
-
setCollection(void 0);
|
|
31465
|
-
setError(error2);
|
|
31466
|
-
}
|
|
31467
|
-
setLoading(false);
|
|
31468
|
-
}
|
|
31469
|
-
};
|
|
31470
|
-
if (cancelled)
|
|
31471
|
-
return;
|
|
31472
|
-
setLoading(true);
|
|
31473
|
-
fetchCollection();
|
|
31474
|
-
return () => {
|
|
31475
|
-
cancelled = true;
|
|
31476
|
-
};
|
|
31477
|
-
}, [
|
|
31478
|
-
cms,
|
|
31479
|
-
collectionName,
|
|
31480
|
-
folder.loading,
|
|
31481
|
-
folder.fullyQualifiedName,
|
|
31482
|
-
resetState,
|
|
31483
|
-
after,
|
|
31484
|
-
sortKey
|
|
31485
|
-
]);
|
|
31486
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31487
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
31488
|
-
};
|
|
31489
|
-
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
31490
|
-
const api = new TinaAdminApi(cms);
|
|
31491
|
-
const schema = cms.api.tina.schema;
|
|
31492
|
-
const collectionExtra = schema.getCollection(collectionName);
|
|
31493
|
-
const [collection, setCollection] = useState(void 0);
|
|
31494
|
-
const [loading, setLoading] = useState(true);
|
|
31495
|
-
const [error, setError] = useState(void 0);
|
|
31496
|
-
const [resetState, setResetSate] = useState(0);
|
|
31497
|
-
useEffect(() => {
|
|
31498
|
-
let cancelled = false;
|
|
31499
|
-
const searchCollection = async () => {
|
|
31500
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31501
|
-
try {
|
|
31502
|
-
const response = await cms.api.search.query(
|
|
31503
|
-
`${search} AND _collection:${collectionName}`,
|
|
31504
|
-
{
|
|
31505
|
-
limit: 15,
|
|
31506
|
-
cursor: after
|
|
31507
|
-
}
|
|
31508
|
-
);
|
|
31509
|
-
const docs = await Promise.allSettled(
|
|
31510
|
-
response.results.map((result) => {
|
|
31511
|
-
const [collection2, relativePath2] = result._id.split(":");
|
|
31512
|
-
return api.fetchDocument(collection2, relativePath2, false);
|
|
31513
|
-
})
|
|
31514
|
-
);
|
|
31515
|
-
const edges = docs.filter((p) => {
|
|
31516
|
-
var _a;
|
|
31517
|
-
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
31518
|
-
}).map((result) => ({ node: result.value.document }));
|
|
31519
|
-
const c = await api.fetchCollection(collectionName, false, "");
|
|
31520
|
-
setCollection({
|
|
31521
|
-
format: collection.format,
|
|
31522
|
-
label: collection.label,
|
|
31523
|
-
name: collectionName,
|
|
31524
|
-
templates: collection.templates,
|
|
31525
|
-
documents: {
|
|
31526
|
-
pageInfo: {
|
|
31527
|
-
hasNextPage: !!response.nextCursor,
|
|
31528
|
-
hasPreviousPage: !!response.prevCursor,
|
|
31529
|
-
startCursor: "",
|
|
31530
|
-
endCursor: response.nextCursor || ""
|
|
31531
|
-
},
|
|
31532
|
-
edges
|
|
31533
|
-
}
|
|
31534
|
-
});
|
|
31535
|
-
} catch (error2) {
|
|
31536
|
-
cms.alerts.error(
|
|
31537
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31538
|
-
);
|
|
31539
|
-
console.error(error2);
|
|
31540
|
-
setCollection(void 0);
|
|
31541
|
-
setError(error2);
|
|
31542
|
-
}
|
|
31543
|
-
setLoading(false);
|
|
31544
|
-
}
|
|
31545
|
-
};
|
|
31546
|
-
if (cancelled)
|
|
31547
|
-
return;
|
|
31548
|
-
setLoading(true);
|
|
31549
|
-
searchCollection();
|
|
31550
|
-
return () => {
|
|
31551
|
-
cancelled = true;
|
|
31552
|
-
};
|
|
31553
|
-
}, [
|
|
31554
|
-
cms,
|
|
31555
|
-
collectionName,
|
|
31556
|
-
folder.loading,
|
|
31557
|
-
folder.fullyQualifiedName,
|
|
31558
|
-
resetState,
|
|
31559
|
-
after,
|
|
31560
|
-
search
|
|
31561
|
-
]);
|
|
31562
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31563
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
31564
|
-
};
|
|
31565
|
-
const GetCollection = ({
|
|
31566
|
-
cms,
|
|
31567
|
-
collectionName,
|
|
31568
|
-
folder,
|
|
31569
|
-
includeDocuments = true,
|
|
31570
|
-
startCursor,
|
|
31571
|
-
sortKey,
|
|
31572
|
-
children,
|
|
31573
|
-
filterArgs,
|
|
31574
|
-
search
|
|
31575
|
-
}) => {
|
|
31576
|
-
const navigate = useNavigate();
|
|
31577
|
-
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? useSearchCollection(
|
|
31578
|
-
cms,
|
|
31579
|
-
collectionName,
|
|
31580
|
-
includeDocuments,
|
|
31581
|
-
folder,
|
|
31582
|
-
startCursor || "",
|
|
31583
|
-
search
|
|
31584
|
-
) : useGetCollection(
|
|
31585
|
-
cms,
|
|
31586
|
-
collectionName,
|
|
31587
|
-
includeDocuments,
|
|
31588
|
-
folder,
|
|
31589
|
-
startCursor || "",
|
|
31590
|
-
sortKey,
|
|
31591
|
-
filterArgs
|
|
31592
|
-
) || {};
|
|
31593
|
-
useEffect(() => {
|
|
31594
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
31595
|
-
if (loading)
|
|
31596
|
-
return;
|
|
31597
|
-
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
31598
|
-
collection.name
|
|
31599
|
-
);
|
|
31600
|
-
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
31601
|
-
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
31602
|
-
const collectionResponse = collection;
|
|
31603
|
-
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
31604
|
-
((_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
|
|
31605
|
-
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
31606
|
-
const doc = collectionResponse.documents.edges[0].node;
|
|
31607
|
-
handleNavigate(
|
|
31608
|
-
navigate,
|
|
31609
|
-
cms,
|
|
31610
|
-
collectionResponse,
|
|
31611
|
-
collectionDefinition,
|
|
31612
|
-
doc
|
|
31613
|
-
);
|
|
31614
|
-
}
|
|
31615
|
-
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
31616
|
-
if (error) {
|
|
31617
|
-
return /* @__PURE__ */ React__default.createElement(FullscreenError, null);
|
|
31618
|
-
}
|
|
31619
|
-
if (loading) {
|
|
31620
|
-
return /* @__PURE__ */ React__default.createElement(LoadingPage, null);
|
|
31621
|
-
}
|
|
31622
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
31623
|
-
};
|
|
31624
32695
|
const folderRegex = /^.*\/~\/*(.*)$/;
|
|
31625
32696
|
const parentFolder = (folder) => {
|
|
31626
32697
|
return {
|
|
@@ -31740,6 +32811,7 @@ const CollectionListPage = () => {
|
|
|
31740
32811
|
const [vars, setVars] = React__default.useState({
|
|
31741
32812
|
collection: collectionName,
|
|
31742
32813
|
relativePath: "",
|
|
32814
|
+
relativePathWithoutExtension: "",
|
|
31743
32815
|
newRelativePath: "",
|
|
31744
32816
|
filterField: "",
|
|
31745
32817
|
folderName: "",
|
|
@@ -31781,6 +32853,7 @@ const CollectionListPage = () => {
|
|
|
31781
32853
|
...old,
|
|
31782
32854
|
collection: collectionName,
|
|
31783
32855
|
relativePath: "",
|
|
32856
|
+
relativePathWithoutExtension: "",
|
|
31784
32857
|
newRelativePath: "",
|
|
31785
32858
|
filterField: "",
|
|
31786
32859
|
startsWith: "",
|
|
@@ -31806,6 +32879,7 @@ const CollectionListPage = () => {
|
|
|
31806
32879
|
collectionName === vars.collection ? vars : {
|
|
31807
32880
|
collection: collectionName,
|
|
31808
32881
|
relativePath: "",
|
|
32882
|
+
relativePathWithoutExtension: "",
|
|
31809
32883
|
newRelativePath: "",
|
|
31810
32884
|
filterField: "",
|
|
31811
32885
|
startsWith: "",
|
|
@@ -31893,7 +32967,9 @@ const CollectionListPage = () => {
|
|
|
31893
32967
|
safeSubmit: async () => {
|
|
31894
32968
|
try {
|
|
31895
32969
|
await admin.deleteDocument(vars);
|
|
31896
|
-
cms.alerts.info(
|
|
32970
|
+
cms.alerts.info(
|
|
32971
|
+
"Document was successfully deleted"
|
|
32972
|
+
);
|
|
31897
32973
|
reFetchCollection();
|
|
31898
32974
|
} catch (error) {
|
|
31899
32975
|
cms.alerts.warn(
|
|
@@ -31907,7 +32983,7 @@ const CollectionListPage = () => {
|
|
|
31907
32983
|
), renameModalOpen && /* @__PURE__ */ React__default.createElement(
|
|
31908
32984
|
RenameModal,
|
|
31909
32985
|
{
|
|
31910
|
-
filename: vars.
|
|
32986
|
+
filename: vars.relativePathWithoutExtension,
|
|
31911
32987
|
newRelativePath: vars.newRelativePath,
|
|
31912
32988
|
setNewRelativePath: (newRelativePath) => {
|
|
31913
32989
|
setVars((vars2) => {
|
|
@@ -31922,7 +32998,9 @@ const CollectionListPage = () => {
|
|
|
31922
32998
|
relativePath: vars.relativePath,
|
|
31923
32999
|
newRelativePath
|
|
31924
33000
|
});
|
|
31925
|
-
cms.alerts.info(
|
|
33001
|
+
cms.alerts.info(
|
|
33002
|
+
"Document was successfully renamed"
|
|
33003
|
+
);
|
|
31926
33004
|
reFetchCollection();
|
|
31927
33005
|
} catch (error) {
|
|
31928
33006
|
if (error.message.indexOf("has references")) {
|
|
@@ -32022,7 +33100,9 @@ const CollectionListPage = () => {
|
|
|
32022
33100
|
name: "sort",
|
|
32023
33101
|
value: sortKey,
|
|
32024
33102
|
onChange: (e) => {
|
|
32025
|
-
const val = JSON.parse(
|
|
33103
|
+
const val = JSON.parse(
|
|
33104
|
+
e.target.value
|
|
33105
|
+
);
|
|
32026
33106
|
setEndCursor("");
|
|
32027
33107
|
setPrevCursors([]);
|
|
32028
33108
|
window == null ? void 0 : window.localStorage.setItem(
|
|
@@ -32228,6 +33308,9 @@ const CollectionListPage = () => {
|
|
|
32228
33308
|
setVars((old) => ({
|
|
32229
33309
|
...old,
|
|
32230
33310
|
collection: collectionName,
|
|
33311
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33312
|
+
"/"
|
|
33313
|
+
),
|
|
32231
33314
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32232
33315
|
"/"
|
|
32233
33316
|
) + document2.node._sys.extension,
|
|
@@ -32250,6 +33333,9 @@ const CollectionListPage = () => {
|
|
|
32250
33333
|
setVars((old) => ({
|
|
32251
33334
|
...old,
|
|
32252
33335
|
collection: collectionName,
|
|
33336
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33337
|
+
"/"
|
|
33338
|
+
),
|
|
32253
33339
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32254
33340
|
"/"
|
|
32255
33341
|
) + document2.node._sys.extension,
|
|
@@ -32462,7 +33548,7 @@ const RenameModal = ({
|
|
|
32462
33548
|
newRelativePath,
|
|
32463
33549
|
setNewRelativePath
|
|
32464
33550
|
}) => {
|
|
32465
|
-
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), "?
|
|
33551
|
+
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(
|
|
32466
33552
|
BaseTextField,
|
|
32467
33553
|
{
|
|
32468
33554
|
placeholder: "Enter a new name for the document's file",
|
|
@@ -32477,11 +33563,237 @@ const RenameModal = ({
|
|
|
32477
33563
|
onClick: async () => {
|
|
32478
33564
|
await renameFunc();
|
|
32479
33565
|
close2();
|
|
32480
|
-
}
|
|
33566
|
+
},
|
|
33567
|
+
disabled: !newRelativePath || newRelativePath === filename
|
|
32481
33568
|
},
|
|
32482
33569
|
"Rename"
|
|
32483
33570
|
))));
|
|
32484
33571
|
};
|
|
33572
|
+
const FullscreenError = ({
|
|
33573
|
+
title = "Error",
|
|
33574
|
+
errorMessage = "It looks like something went wrong."
|
|
33575
|
+
}) => {
|
|
33576
|
+
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"));
|
|
33577
|
+
};
|
|
33578
|
+
const isValidSortKey = (sortKey, collection) => {
|
|
33579
|
+
if (collection.fields) {
|
|
33580
|
+
const sortKeys = collection.fields.map((x) => x.name);
|
|
33581
|
+
return sortKeys.includes(sortKey);
|
|
33582
|
+
} else if (collection.templates) {
|
|
33583
|
+
const collectionMap = {};
|
|
33584
|
+
const conflictedFields = /* @__PURE__ */ new Set();
|
|
33585
|
+
for (const template of collection.templates) {
|
|
33586
|
+
for (const field of template.fields) {
|
|
33587
|
+
if (collectionMap[field.name]) {
|
|
33588
|
+
if (collectionMap[field.name].type !== field.type) {
|
|
33589
|
+
conflictedFields.add(field.name);
|
|
33590
|
+
}
|
|
33591
|
+
} else {
|
|
33592
|
+
collectionMap[field.name] = field;
|
|
33593
|
+
}
|
|
33594
|
+
}
|
|
33595
|
+
}
|
|
33596
|
+
for (const key in conflictedFields) {
|
|
33597
|
+
delete collectionMap[key];
|
|
33598
|
+
}
|
|
33599
|
+
for (const key in collectionMap) {
|
|
33600
|
+
if (key === sortKey) {
|
|
33601
|
+
return true;
|
|
33602
|
+
}
|
|
33603
|
+
}
|
|
33604
|
+
return false;
|
|
33605
|
+
}
|
|
33606
|
+
};
|
|
33607
|
+
const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
|
|
33608
|
+
const api = new TinaAdminApi(cms);
|
|
33609
|
+
const schema = cms.api.tina.schema;
|
|
33610
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33611
|
+
const [collection, setCollection] = useState(void 0);
|
|
33612
|
+
const [loading, setLoading] = useState(true);
|
|
33613
|
+
const [error, setError] = useState(void 0);
|
|
33614
|
+
const [resetState, setResetSate] = useState(0);
|
|
33615
|
+
useEffect(() => {
|
|
33616
|
+
let cancelled = false;
|
|
33617
|
+
const fetchCollection = async () => {
|
|
33618
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33619
|
+
const { name, order } = JSON.parse(sortKey || "{}");
|
|
33620
|
+
const validSortKey = isValidSortKey(name, collectionExtra) ? name : void 0;
|
|
33621
|
+
try {
|
|
33622
|
+
const collection2 = await api.fetchCollection(
|
|
33623
|
+
collectionName,
|
|
33624
|
+
includeDocuments,
|
|
33625
|
+
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
33626
|
+
after,
|
|
33627
|
+
validSortKey,
|
|
33628
|
+
order,
|
|
33629
|
+
filterArgs
|
|
33630
|
+
);
|
|
33631
|
+
setCollection(collection2);
|
|
33632
|
+
} catch (error2) {
|
|
33633
|
+
cms.alerts.error(
|
|
33634
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33635
|
+
);
|
|
33636
|
+
console.error(error2);
|
|
33637
|
+
setCollection(void 0);
|
|
33638
|
+
setError(error2);
|
|
33639
|
+
}
|
|
33640
|
+
setLoading(false);
|
|
33641
|
+
}
|
|
33642
|
+
};
|
|
33643
|
+
if (cancelled)
|
|
33644
|
+
return;
|
|
33645
|
+
setLoading(true);
|
|
33646
|
+
fetchCollection();
|
|
33647
|
+
return () => {
|
|
33648
|
+
cancelled = true;
|
|
33649
|
+
};
|
|
33650
|
+
}, [
|
|
33651
|
+
cms,
|
|
33652
|
+
collectionName,
|
|
33653
|
+
folder.loading,
|
|
33654
|
+
folder.fullyQualifiedName,
|
|
33655
|
+
resetState,
|
|
33656
|
+
after,
|
|
33657
|
+
sortKey
|
|
33658
|
+
]);
|
|
33659
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33660
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33661
|
+
};
|
|
33662
|
+
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
33663
|
+
const api = new TinaAdminApi(cms);
|
|
33664
|
+
const schema = cms.api.tina.schema;
|
|
33665
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33666
|
+
const [collection, setCollection] = useState(void 0);
|
|
33667
|
+
const [loading, setLoading] = useState(true);
|
|
33668
|
+
const [error, setError] = useState(void 0);
|
|
33669
|
+
const [resetState, setResetSate] = useState(0);
|
|
33670
|
+
useEffect(() => {
|
|
33671
|
+
let cancelled = false;
|
|
33672
|
+
const searchCollection = async () => {
|
|
33673
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33674
|
+
try {
|
|
33675
|
+
const response = await cms.api.search.query(
|
|
33676
|
+
`${search} AND _collection:${collectionName}`,
|
|
33677
|
+
{
|
|
33678
|
+
limit: 15,
|
|
33679
|
+
cursor: after
|
|
33680
|
+
}
|
|
33681
|
+
);
|
|
33682
|
+
const docs = await Promise.allSettled(
|
|
33683
|
+
response.results.map((result) => {
|
|
33684
|
+
const [collection2, relativePath2] = result._id.split(":");
|
|
33685
|
+
return api.fetchDocument(collection2, relativePath2, false);
|
|
33686
|
+
})
|
|
33687
|
+
);
|
|
33688
|
+
const edges = docs.filter((p) => {
|
|
33689
|
+
var _a;
|
|
33690
|
+
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
33691
|
+
}).map((result) => ({ node: result.value.document }));
|
|
33692
|
+
const c = await api.fetchCollection(collectionName, false, "");
|
|
33693
|
+
setCollection({
|
|
33694
|
+
format: collection.format,
|
|
33695
|
+
label: collection.label,
|
|
33696
|
+
name: collectionName,
|
|
33697
|
+
templates: collection.templates,
|
|
33698
|
+
documents: {
|
|
33699
|
+
pageInfo: {
|
|
33700
|
+
hasNextPage: !!response.nextCursor,
|
|
33701
|
+
hasPreviousPage: !!response.prevCursor,
|
|
33702
|
+
startCursor: "",
|
|
33703
|
+
endCursor: response.nextCursor || ""
|
|
33704
|
+
},
|
|
33705
|
+
edges
|
|
33706
|
+
}
|
|
33707
|
+
});
|
|
33708
|
+
} catch (error2) {
|
|
33709
|
+
cms.alerts.error(
|
|
33710
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33711
|
+
);
|
|
33712
|
+
console.error(error2);
|
|
33713
|
+
setCollection(void 0);
|
|
33714
|
+
setError(error2);
|
|
33715
|
+
}
|
|
33716
|
+
setLoading(false);
|
|
33717
|
+
}
|
|
33718
|
+
};
|
|
33719
|
+
if (cancelled)
|
|
33720
|
+
return;
|
|
33721
|
+
setLoading(true);
|
|
33722
|
+
searchCollection();
|
|
33723
|
+
return () => {
|
|
33724
|
+
cancelled = true;
|
|
33725
|
+
};
|
|
33726
|
+
}, [
|
|
33727
|
+
cms,
|
|
33728
|
+
collectionName,
|
|
33729
|
+
folder.loading,
|
|
33730
|
+
folder.fullyQualifiedName,
|
|
33731
|
+
resetState,
|
|
33732
|
+
after,
|
|
33733
|
+
search
|
|
33734
|
+
]);
|
|
33735
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33736
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33737
|
+
};
|
|
33738
|
+
const GetCollection = ({
|
|
33739
|
+
cms,
|
|
33740
|
+
collectionName,
|
|
33741
|
+
folder,
|
|
33742
|
+
includeDocuments = true,
|
|
33743
|
+
startCursor,
|
|
33744
|
+
sortKey,
|
|
33745
|
+
children,
|
|
33746
|
+
filterArgs,
|
|
33747
|
+
search
|
|
33748
|
+
}) => {
|
|
33749
|
+
const navigate = useNavigate();
|
|
33750
|
+
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? useSearchCollection(
|
|
33751
|
+
cms,
|
|
33752
|
+
collectionName,
|
|
33753
|
+
includeDocuments,
|
|
33754
|
+
folder,
|
|
33755
|
+
startCursor || "",
|
|
33756
|
+
search
|
|
33757
|
+
) : useGetCollection(
|
|
33758
|
+
cms,
|
|
33759
|
+
collectionName,
|
|
33760
|
+
includeDocuments,
|
|
33761
|
+
folder,
|
|
33762
|
+
startCursor || "",
|
|
33763
|
+
sortKey,
|
|
33764
|
+
filterArgs
|
|
33765
|
+
) || {};
|
|
33766
|
+
useEffect(() => {
|
|
33767
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
33768
|
+
if (loading)
|
|
33769
|
+
return;
|
|
33770
|
+
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
33771
|
+
collection.name
|
|
33772
|
+
);
|
|
33773
|
+
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
33774
|
+
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
33775
|
+
const collectionResponse = collection;
|
|
33776
|
+
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
33777
|
+
((_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
|
|
33778
|
+
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
33779
|
+
const doc = collectionResponse.documents.edges[0].node;
|
|
33780
|
+
handleNavigate(
|
|
33781
|
+
navigate,
|
|
33782
|
+
cms,
|
|
33783
|
+
collectionResponse,
|
|
33784
|
+
collectionDefinition,
|
|
33785
|
+
doc
|
|
33786
|
+
);
|
|
33787
|
+
}
|
|
33788
|
+
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
33789
|
+
if (error) {
|
|
33790
|
+
return /* @__PURE__ */ React__default.createElement(FullscreenError, null);
|
|
33791
|
+
}
|
|
33792
|
+
if (loading) {
|
|
33793
|
+
return /* @__PURE__ */ React__default.createElement(LoadingPage, null);
|
|
33794
|
+
}
|
|
33795
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
33796
|
+
};
|
|
32485
33797
|
const ErrorDialog = (props) => {
|
|
32486
33798
|
return /* @__PURE__ */ React__default.createElement(
|
|
32487
33799
|
"div",
|
|
@@ -32804,7 +34116,10 @@ const useGetDocument = (cms, collectionName, relativePath2) => {
|
|
|
32804
34116
|
const fetchDocument = async () => {
|
|
32805
34117
|
if (api.isAuthenticated()) {
|
|
32806
34118
|
try {
|
|
32807
|
-
const response = await api.fetchDocument(
|
|
34119
|
+
const response = await api.fetchDocument(
|
|
34120
|
+
collectionName,
|
|
34121
|
+
relativePath2
|
|
34122
|
+
);
|
|
32808
34123
|
setDocument(response.document);
|
|
32809
34124
|
} catch (error2) {
|
|
32810
34125
|
cms.alerts.error(
|
|
@@ -33022,6 +34337,12 @@ const RenderForm = ({
|
|
|
33022
34337
|
), /* @__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 }))
|
|
33023
34338
|
), activeForm && /* @__PURE__ */ React__default.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine }));
|
|
33024
34339
|
};
|
|
34340
|
+
const DashboardPage = () => {
|
|
34341
|
+
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
34342
|
+
var _a, _b;
|
|
34343
|
+
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.")));
|
|
34344
|
+
});
|
|
34345
|
+
};
|
|
33025
34346
|
const ScreenPage = () => {
|
|
33026
34347
|
const { screenName } = useParams();
|
|
33027
34348
|
return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
|
|
@@ -33104,7 +34425,7 @@ const IndexingPage = () => {
|
|
|
33104
34425
|
} catch {
|
|
33105
34426
|
cms.alerts.error("Branch indexing failed.");
|
|
33106
34427
|
setErrorMessage(
|
|
33107
|
-
'Branch indexing failed, please check the
|
|
34428
|
+
'Branch indexing failed, please check the TinaCloud dashboard for more information. To try again chick "re-index" on the branch in the dashboard.'
|
|
33108
34429
|
);
|
|
33109
34430
|
setState("error");
|
|
33110
34431
|
}
|
|
@@ -33148,15 +34469,24 @@ const IndexingPage = () => {
|
|
|
33148
34469
|
}
|
|
33149
34470
|
}
|
|
33150
34471
|
if (state === "creatingPR") {
|
|
33151
|
-
|
|
33152
|
-
|
|
33153
|
-
|
|
33154
|
-
|
|
33155
|
-
|
|
33156
|
-
|
|
33157
|
-
|
|
33158
|
-
|
|
33159
|
-
|
|
34472
|
+
try {
|
|
34473
|
+
const foo = await tinaApi.createPullRequest({
|
|
34474
|
+
baseBranch,
|
|
34475
|
+
branch,
|
|
34476
|
+
title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
|
|
34477
|
+
});
|
|
34478
|
+
console.log("PR created", foo);
|
|
34479
|
+
cms.alerts.success("Pull request created.");
|
|
34480
|
+
localStorage.setItem("tina.createBranchState", "done");
|
|
34481
|
+
setState("done");
|
|
34482
|
+
} catch (e) {
|
|
34483
|
+
console.error(e);
|
|
34484
|
+
cms.alerts.error("Failed to create PR");
|
|
34485
|
+
setErrorMessage(
|
|
34486
|
+
"Failed to create PR, please try again. If the problem persists please contact support."
|
|
34487
|
+
);
|
|
34488
|
+
setState("error");
|
|
34489
|
+
}
|
|
33160
34490
|
}
|
|
33161
34491
|
if (state === "done") {
|
|
33162
34492
|
window.location.href = back;
|
|
@@ -33263,7 +34593,7 @@ const CheckSchema = ({
|
|
|
33263
34593
|
);
|
|
33264
34594
|
}
|
|
33265
34595
|
}).catch((e) => {
|
|
33266
|
-
if (e.message.includes("has not been indexed by
|
|
34596
|
+
if (e.message.includes("has not been indexed by TinaCloud")) {
|
|
33267
34597
|
setSchemaMissingError(true);
|
|
33268
34598
|
} else {
|
|
33269
34599
|
cms.alerts.error(`Unexpected error checking schema: ${e}`);
|