tinacms 0.0.0-942e18f-20250102010803 → 0.0.0-95a293c-20250401070633
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/admin/api.d.ts +1 -0
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client.js +71 -41
- package/dist/client.mjs +48 -30
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.js +2421 -1068
- package/dist/index.mjs +2429 -1076
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/{node-cache-4c336858.mjs → node-cache-5e8db9f0.mjs} +23 -10
- package/dist/react.d.ts +1 -0
- package/dist/react.js +13 -1
- package/dist/react.mjs +13 -1
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/tina-state.d.ts +4 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/package.json +35 -34
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/cn"), require("@udecode/plate"), require("@udecode/plate-common"), require("@udecode/plate-slash-command"), require("slate-react"), require("@udecode/plate-code-block"), require("@monaco-editor/react"), require("@headlessui/react"), require("class-variance-authority"), require("lucide-react"), require("mermaid"), require("@udecode/plate-heading"), require("@ariakit/react"), require("@udecode/plate-combobox"), require("@udecode/plate-table"), require("@udecode/plate-resizable"), require("@radix-ui/react-popover"), require("@radix-ui/react-slot"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-separator"), require("final-form-arrays"), require("final-form-set-field-data"), require("final-form"), require("react-final-form"), require("prop-types"), require("react-beautiful-dnd"), require("react-color"), require("color-string"), require("react-dropzone"), require("clsx"), require("tailwind-merge"), require("cmdk"), require("is-hotkey"), require("slate"), require("lodash.get"), require("moment"), require("date-fns"), require("@udecode/plate-link"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-tooltip"), require("@udecode/plate-paragraph"), require("@udecode/plate-block-quote"), require("@udecode/plate-floating"), require("
|
|
3
|
-
})(this, function(exports2, zod, React, reactDom, cn$1, plate, plateCommon, plateSlashCommand, slateReact, plateCodeBlock, MonacoEditor, react, classVarianceAuthority, lucideReact, mermaid, plateHeading, react$1, plateCombobox, plateTable, plateResizable, PopoverPrimitive, reactSlot, DropdownMenuPrimitive, SeparatorPrimitive, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, pkg$1, pkg, dropzone, clsx, tailwindMerge, cmdk, isHotkey, slate, get, moment, dateFns, plateLink, ToolbarPrimitive, TooltipPrimitive, plateParagraph, plateBlockQuote, plateFloating,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/cn"), require("@udecode/plate"), require("@udecode/plate-common"), require("@udecode/plate-slash-command"), require("slate-react"), require("@udecode/plate-code-block"), require("@monaco-editor/react"), require("@headlessui/react"), require("class-variance-authority"), require("lucide-react"), require("mermaid"), require("@udecode/plate-heading"), require("@ariakit/react"), require("@udecode/plate-combobox"), require("@udecode/plate-table"), require("@udecode/plate-resizable"), require("@radix-ui/react-popover"), require("@radix-ui/react-slot"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-separator"), require("final-form-arrays"), require("final-form-set-field-data"), require("final-form"), require("react-final-form"), require("prop-types"), require("react-beautiful-dnd"), require("react-color"), require("color-string"), require("react-dropzone"), require("clsx"), require("tailwind-merge"), require("cmdk"), require("is-hotkey"), require("slate"), require("@react-hook/window-size"), require("lodash.get"), require("moment"), require("date-fns"), require("@udecode/plate-link"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-tooltip"), require("@udecode/plate-paragraph"), require("@udecode/plate-block-quote"), require("@udecode/plate-floating"), require("graphql"), require("@tinacms/schema-tools"), require("graphql-tag"), require("@graphql-inspector/core"), require("yup"), require("react-router-dom"), require("@tinacms/mdx")) : typeof define === "function" && define.amd ? define(["exports", "zod", "react", "react-dom", "@udecode/cn", "@udecode/plate", "@udecode/plate-common", "@udecode/plate-slash-command", "slate-react", "@udecode/plate-code-block", "@monaco-editor/react", "@headlessui/react", "class-variance-authority", "lucide-react", "mermaid", "@udecode/plate-heading", "@ariakit/react", "@udecode/plate-combobox", "@udecode/plate-table", "@udecode/plate-resizable", "@radix-ui/react-popover", "@radix-ui/react-slot", "@radix-ui/react-dropdown-menu", "@radix-ui/react-separator", "final-form-arrays", "final-form-set-field-data", "final-form", "react-final-form", "prop-types", "react-beautiful-dnd", "react-color", "color-string", "react-dropzone", "clsx", "tailwind-merge", "cmdk", "is-hotkey", "slate", "@react-hook/window-size", "lodash.get", "moment", "date-fns", "@udecode/plate-link", "@radix-ui/react-toolbar", "@radix-ui/react-tooltip", "@udecode/plate-paragraph", "@udecode/plate-block-quote", "@udecode/plate-floating", "graphql", "@tinacms/schema-tools", "graphql-tag", "@graphql-inspector/core", "yup", "react-router-dom", "@tinacms/mdx"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP));
|
|
3
|
+
})(this, function(exports2, zod, React, reactDom, cn$1, plate, plateCommon, plateSlashCommand, slateReact, plateCodeBlock, MonacoEditor, react, classVarianceAuthority, lucideReact, mermaid, plateHeading, react$1, plateCombobox, plateTable, plateResizable, PopoverPrimitive, reactSlot, DropdownMenuPrimitive, SeparatorPrimitive, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, pkg$1, pkg, dropzone, clsx, tailwindMerge, cmdk, isHotkey, slate, windowSize, get, moment, dateFns, plateLink, ToolbarPrimitive, TooltipPrimitive, plateParagraph, plateBlockQuote, plateFloating, graphql, schemaTools, gql, core, yup, reactRouterDom, mdx) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -2943,7 +2943,7 @@ flowchart TD
|
|
|
2943
2943
|
),
|
|
2944
2944
|
[plate.MARK_CODE]: CodeLeaf,
|
|
2945
2945
|
[plate.MARK_UNDERLINE]: cn$1.withProps(plateCommon.PlateLeaf, { as: "u" }),
|
|
2946
|
-
[plate.MARK_STRIKETHROUGH]:
|
|
2946
|
+
[plate.MARK_STRIKETHROUGH]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React.createElement("s", { ...props.attributes, ...props }),
|
|
2947
2947
|
[plate.MARK_ITALIC]: cn$1.withProps(plateCommon.PlateLeaf, { as: "em" }),
|
|
2948
2948
|
[plate.MARK_BOLD]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React.createElement("strong", { ...props.attributes, ...props }),
|
|
2949
2949
|
[plate.ELEMENT_HR]: ({
|
|
@@ -4403,36 +4403,6 @@ flowchart TD
|
|
|
4403
4403
|
function MdOutlinePerson(props) {
|
|
4404
4404
|
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);
|
|
4405
4405
|
}
|
|
4406
|
-
const BranchContext = React__namespace.createContext({
|
|
4407
|
-
currentBranch: null,
|
|
4408
|
-
setCurrentBranch: (branch) => {
|
|
4409
|
-
console.warn("BranchContext not initialized");
|
|
4410
|
-
}
|
|
4411
|
-
});
|
|
4412
|
-
const BranchDataProvider = ({
|
|
4413
|
-
currentBranch,
|
|
4414
|
-
setCurrentBranch,
|
|
4415
|
-
children
|
|
4416
|
-
}) => {
|
|
4417
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
4418
|
-
BranchContext.Provider,
|
|
4419
|
-
{
|
|
4420
|
-
value: {
|
|
4421
|
-
currentBranch,
|
|
4422
|
-
setCurrentBranch
|
|
4423
|
-
}
|
|
4424
|
-
},
|
|
4425
|
-
children
|
|
4426
|
-
);
|
|
4427
|
-
};
|
|
4428
|
-
const useBranchData = () => {
|
|
4429
|
-
const branchData = React__namespace.useContext(BranchContext);
|
|
4430
|
-
const { dispatch } = useEvent("branch:change");
|
|
4431
|
-
React__namespace.useEffect(() => {
|
|
4432
|
-
dispatch({ branchName: branchData.currentBranch });
|
|
4433
|
-
}, [branchData.currentBranch]);
|
|
4434
|
-
return branchData;
|
|
4435
|
-
};
|
|
4436
4406
|
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";
|
|
4437
4407
|
const disabledClasses$1 = "opacity-50 pointer-events-none cursor-not-allowed";
|
|
4438
4408
|
const BaseTextField = React__namespace.forwardRef(({ className, disabled, ...rest }, ref) => {
|
|
@@ -5197,7 +5167,7 @@ flowchart TD
|
|
|
5197
5167
|
side: "bottom",
|
|
5198
5168
|
className: cn(
|
|
5199
5169
|
"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",
|
|
5200
|
-
"max-h-[30vh] max-w-[
|
|
5170
|
+
"max-h-[30vh] max-w-[30vw] overflow-y-auto",
|
|
5201
5171
|
className
|
|
5202
5172
|
),
|
|
5203
5173
|
...props
|
|
@@ -5289,11 +5259,7 @@ flowchart TD
|
|
|
5289
5259
|
const node = nodes.find((node2) => node2.id === value);
|
|
5290
5260
|
return node ? node._internalSys.filename : null;
|
|
5291
5261
|
};
|
|
5292
|
-
const
|
|
5293
|
-
cms,
|
|
5294
|
-
input,
|
|
5295
|
-
field
|
|
5296
|
-
}) => {
|
|
5262
|
+
const Combobox = ({ cms, input, field }) => {
|
|
5297
5263
|
const [open2, setOpen] = React__namespace.useState(false);
|
|
5298
5264
|
const [value, setValue] = React__namespace.useState(input.value);
|
|
5299
5265
|
const [displayText, setDisplayText] = React__namespace.useState(null);
|
|
@@ -5309,7 +5275,9 @@ flowchart TD
|
|
|
5309
5275
|
}, [value, input, optionSets]);
|
|
5310
5276
|
React__namespace.useEffect(() => {
|
|
5311
5277
|
if (field.experimental___filter && optionSets.length > 0) {
|
|
5312
|
-
setFilteredOptionsList(
|
|
5278
|
+
setFilteredOptionsList(
|
|
5279
|
+
field.experimental___filter(optionSets, void 0)
|
|
5280
|
+
);
|
|
5313
5281
|
} else {
|
|
5314
5282
|
setFilteredOptionsList(optionSets);
|
|
5315
5283
|
}
|
|
@@ -5317,17 +5285,17 @@ flowchart TD
|
|
|
5317
5285
|
if (loading === true) {
|
|
5318
5286
|
return /* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
|
|
5319
5287
|
}
|
|
5320
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
5288
|
+
return /* @__PURE__ */ React__namespace.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React__namespace.createElement(
|
|
5321
5289
|
Button,
|
|
5322
5290
|
{
|
|
5323
5291
|
variant: "outline",
|
|
5324
5292
|
role: "combobox",
|
|
5325
5293
|
"aria-expanded": open2,
|
|
5326
|
-
className: "w-
|
|
5294
|
+
className: "w-full justify-between"
|
|
5327
5295
|
},
|
|
5328
5296
|
/* @__PURE__ */ React__namespace.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
|
|
5329
5297
|
open2 ? /* @__PURE__ */ React__namespace.createElement(IoMdArrowDropup, { size: 20 }) : /* @__PURE__ */ React__namespace.createElement(IoMdArrowDropdown, { size: 20 })
|
|
5330
|
-
)), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative" }, /* @__PURE__ */ React__namespace.createElement(
|
|
5298
|
+
)), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React__namespace.createElement(
|
|
5331
5299
|
Command,
|
|
5332
5300
|
{
|
|
5333
5301
|
shouldFilter: !field.experimental___filter,
|
|
@@ -5351,32 +5319,25 @@ flowchart TD
|
|
|
5351
5319
|
}
|
|
5352
5320
|
),
|
|
5353
5321
|
/* @__PURE__ */ React__namespace.createElement(CommandEmpty, null, "No reference found"),
|
|
5354
|
-
/* @__PURE__ */ React__namespace.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React__namespace.createElement(
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
field,
|
|
5369
|
-
_values,
|
|
5370
|
-
node,
|
|
5371
|
-
onSelect: (currentValue) => {
|
|
5372
|
-
setValue(currentValue);
|
|
5373
|
-
setOpen(false);
|
|
5374
|
-
}
|
|
5322
|
+
/* @__PURE__ */ React__namespace.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React__namespace.createElement(CommandGroup, { key: `${collection}-group`, heading: collection }, /* @__PURE__ */ React__namespace.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
|
|
5323
|
+
const { id, _values } = node;
|
|
5324
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
5325
|
+
OptionComponent,
|
|
5326
|
+
{
|
|
5327
|
+
id,
|
|
5328
|
+
key: id,
|
|
5329
|
+
value,
|
|
5330
|
+
field,
|
|
5331
|
+
_values,
|
|
5332
|
+
node,
|
|
5333
|
+
onSelect: (currentValue) => {
|
|
5334
|
+
setValue(currentValue);
|
|
5335
|
+
setOpen(false);
|
|
5375
5336
|
}
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
))))
|
|
5379
|
-
)))
|
|
5337
|
+
}
|
|
5338
|
+
);
|
|
5339
|
+
}))))))
|
|
5340
|
+
)));
|
|
5380
5341
|
};
|
|
5381
5342
|
const useGetNode = (cms, id) => {
|
|
5382
5343
|
const [document2, setDocument] = React__namespace.useState(
|
|
@@ -5449,7 +5410,7 @@ flowchart TD
|
|
|
5449
5410
|
};
|
|
5450
5411
|
const Reference = ({ input, field }) => {
|
|
5451
5412
|
const cms = useCMS();
|
|
5452
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
5413
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group" }, /* @__PURE__ */ React__namespace.createElement(Combobox, { cms, input, field })), /* @__PURE__ */ React__namespace.createElement(ReferenceLink, { cms, input }));
|
|
5453
5414
|
};
|
|
5454
5415
|
const ButtonToggle = ({
|
|
5455
5416
|
input,
|
|
@@ -5686,7 +5647,9 @@ flowchart TD
|
|
|
5686
5647
|
onClick: () => {
|
|
5687
5648
|
const state = tinaForm.finalForm.getState();
|
|
5688
5649
|
if (state.invalid === true) {
|
|
5689
|
-
cms.alerts.error(
|
|
5650
|
+
cms.alerts.error(
|
|
5651
|
+
"Cannot navigate away from an invalid form."
|
|
5652
|
+
);
|
|
5690
5653
|
return;
|
|
5691
5654
|
}
|
|
5692
5655
|
cms.dispatch({
|
|
@@ -6270,7 +6233,9 @@ flowchart TD
|
|
|
6270
6233
|
onClick: () => {
|
|
6271
6234
|
const state = tinaForm.finalForm.getState();
|
|
6272
6235
|
if (state.invalid === true) {
|
|
6273
|
-
cms.alerts.error(
|
|
6236
|
+
cms.alerts.error(
|
|
6237
|
+
"Cannot navigate away from an invalid form."
|
|
6238
|
+
);
|
|
6274
6239
|
return;
|
|
6275
6240
|
}
|
|
6276
6241
|
cms.dispatch({
|
|
@@ -6752,28 +6717,28 @@ flowchart TD
|
|
|
6752
6717
|
}
|
|
6753
6718
|
renderDayHeaders() {
|
|
6754
6719
|
const locale = this.props.viewDate.localeData();
|
|
6755
|
-
|
|
6720
|
+
const dayItems = getDaysOfWeek(locale).map((day, index) => /* @__PURE__ */ React.createElement("th", { key: day + index, className: "dow" }, day));
|
|
6756
6721
|
return /* @__PURE__ */ React.createElement("tr", null, dayItems);
|
|
6757
6722
|
}
|
|
6758
6723
|
renderDays() {
|
|
6759
6724
|
const date = this.props.viewDate;
|
|
6760
6725
|
const startOfMonth = date.clone().startOf("month");
|
|
6761
6726
|
const endOfMonth = date.clone().endOf("month");
|
|
6762
|
-
|
|
6763
|
-
|
|
6727
|
+
const rows = [[], [], [], [], [], []];
|
|
6728
|
+
const startDate = date.clone().subtract(1, "months");
|
|
6764
6729
|
startDate.date(startDate.daysInMonth()).startOf("week");
|
|
6765
|
-
|
|
6730
|
+
const endDate = startDate.clone().add(42, "d");
|
|
6766
6731
|
let i = 0;
|
|
6767
6732
|
while (startDate.isBefore(endDate)) {
|
|
6768
|
-
|
|
6733
|
+
const row = getRow$2(rows, i++);
|
|
6769
6734
|
row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
|
|
6770
6735
|
startDate.add(1, "d");
|
|
6771
6736
|
}
|
|
6772
6737
|
return rows.map((r, i2) => /* @__PURE__ */ React.createElement("tr", { key: `${endDate.month()}_${i2}` }, r));
|
|
6773
6738
|
}
|
|
6774
6739
|
renderDay(date, startOfMonth, endOfMonth) {
|
|
6775
|
-
|
|
6776
|
-
|
|
6740
|
+
const selectedDate = this.props.selectedDate;
|
|
6741
|
+
const dayProps = {
|
|
6777
6742
|
key: date.format("M_D"),
|
|
6778
6743
|
"data-value": date.date(),
|
|
6779
6744
|
"data-month": date.month(),
|
|
@@ -6827,7 +6792,7 @@ flowchart TD
|
|
|
6827
6792
|
}
|
|
6828
6793
|
function getDaysOfWeek(locale) {
|
|
6829
6794
|
const first = locale.firstDayOfWeek();
|
|
6830
|
-
|
|
6795
|
+
const dow = [];
|
|
6831
6796
|
let i = 0;
|
|
6832
6797
|
locale._weekdaysMin.forEach(function(day) {
|
|
6833
6798
|
dow[(7 + i++ - first) % 7] = day;
|
|
@@ -6845,7 +6810,7 @@ flowchart TD
|
|
|
6845
6810
|
return /* @__PURE__ */ React.createElement("div", { className: "rdtMonths" }, /* @__PURE__ */ React.createElement("table", null, /* @__PURE__ */ React.createElement("thead", null, this.renderNavigation())), /* @__PURE__ */ React.createElement("table", null, /* @__PURE__ */ React.createElement("tbody", null, this.renderMonths())));
|
|
6846
6811
|
}
|
|
6847
6812
|
renderNavigation() {
|
|
6848
|
-
|
|
6813
|
+
const year = this.props.viewDate.year();
|
|
6849
6814
|
return /* @__PURE__ */ React.createElement(
|
|
6850
6815
|
ViewNavigation,
|
|
6851
6816
|
{
|
|
@@ -6858,9 +6823,9 @@ flowchart TD
|
|
|
6858
6823
|
);
|
|
6859
6824
|
}
|
|
6860
6825
|
renderMonths() {
|
|
6861
|
-
|
|
6826
|
+
const rows = [[], [], []];
|
|
6862
6827
|
for (let month = 0; month < 12; month++) {
|
|
6863
|
-
|
|
6828
|
+
const row = getRow$1(rows, month);
|
|
6864
6829
|
row.push(this.renderMonth(month));
|
|
6865
6830
|
}
|
|
6866
6831
|
return rows.map((months, i) => /* @__PURE__ */ React.createElement("tr", { key: i }, months));
|
|
@@ -6877,7 +6842,7 @@ flowchart TD
|
|
|
6877
6842
|
if (selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month) {
|
|
6878
6843
|
className += " rdtActive";
|
|
6879
6844
|
}
|
|
6880
|
-
|
|
6845
|
+
const props = { key: month, className, "data-value": month, onClick };
|
|
6881
6846
|
if (this.props.renderMonth) {
|
|
6882
6847
|
return this.props.renderMonth(
|
|
6883
6848
|
props,
|
|
@@ -6889,11 +6854,11 @@ flowchart TD
|
|
|
6889
6854
|
return /* @__PURE__ */ React.createElement("td", { ...props }, this.getMonthText(month));
|
|
6890
6855
|
}
|
|
6891
6856
|
isDisabledMonth(month) {
|
|
6892
|
-
|
|
6857
|
+
const isValidDate = this.props.isValidDate;
|
|
6893
6858
|
if (!isValidDate) {
|
|
6894
6859
|
return false;
|
|
6895
6860
|
}
|
|
6896
|
-
|
|
6861
|
+
const date = this.props.viewDate.clone().set({ month });
|
|
6897
6862
|
let day = date.endOf("month").date() + 1;
|
|
6898
6863
|
while (day-- > 1) {
|
|
6899
6864
|
if (isValidDate(date.date(day))) {
|
|
@@ -6945,9 +6910,9 @@ flowchart TD
|
|
|
6945
6910
|
}
|
|
6946
6911
|
renderYears() {
|
|
6947
6912
|
const viewYear = this.getViewYear();
|
|
6948
|
-
|
|
6913
|
+
const rows = [[], [], []];
|
|
6949
6914
|
for (let year = viewYear - 1; year < viewYear + 11; year++) {
|
|
6950
|
-
|
|
6915
|
+
const row = getRow(rows, year - viewYear);
|
|
6951
6916
|
row.push(this.renderYear(year));
|
|
6952
6917
|
}
|
|
6953
6918
|
return rows.map((years, i) => /* @__PURE__ */ React.createElement("tr", { key: i }, years));
|
|
@@ -6964,7 +6929,7 @@ flowchart TD
|
|
|
6964
6929
|
if (selectedYear === year) {
|
|
6965
6930
|
className += " rdtActive";
|
|
6966
6931
|
}
|
|
6967
|
-
|
|
6932
|
+
const props = { key: year, className, "data-value": year, onClick };
|
|
6968
6933
|
return this.props.renderYear(
|
|
6969
6934
|
props,
|
|
6970
6935
|
year,
|
|
@@ -6978,15 +6943,15 @@ flowchart TD
|
|
|
6978
6943
|
return this.props.selectedDate && this.props.selectedDate.year();
|
|
6979
6944
|
}
|
|
6980
6945
|
isDisabledYear(year) {
|
|
6981
|
-
|
|
6946
|
+
const cache = this.disabledYearsCache;
|
|
6982
6947
|
if (cache[year] !== void 0) {
|
|
6983
6948
|
return cache[year];
|
|
6984
6949
|
}
|
|
6985
|
-
|
|
6950
|
+
const isValidDate = this.props.isValidDate;
|
|
6986
6951
|
if (!isValidDate) {
|
|
6987
6952
|
return false;
|
|
6988
6953
|
}
|
|
6989
|
-
|
|
6954
|
+
const date = this.props.viewDate.clone().set({ year });
|
|
6990
6955
|
let day = date.endOf("year").dayOfYear() + 1;
|
|
6991
6956
|
while (day-- > 1) {
|
|
6992
6957
|
if (isValidDate(date.dayOfYear(day))) {
|
|
@@ -7033,7 +6998,7 @@ flowchart TD
|
|
|
7033
6998
|
}
|
|
7034
6999
|
};
|
|
7035
7000
|
function createConstraints(overrideTimeConstraints) {
|
|
7036
|
-
|
|
7001
|
+
const constraints = {};
|
|
7037
7002
|
Object.keys(timeConstraints).forEach((type) => {
|
|
7038
7003
|
constraints[type] = {
|
|
7039
7004
|
...timeConstraints[type],
|
|
@@ -7049,7 +7014,7 @@ flowchart TD
|
|
|
7049
7014
|
this.state = this.getTimeParts(props.selectedDate || props.viewDate);
|
|
7050
7015
|
}
|
|
7051
7016
|
render() {
|
|
7052
|
-
|
|
7017
|
+
const items2 = [];
|
|
7053
7018
|
const timeParts = this.state;
|
|
7054
7019
|
this.getCounters().forEach((c, i) => {
|
|
7055
7020
|
if (i && c !== "ampm") {
|
|
@@ -7111,8 +7076,8 @@ flowchart TD
|
|
|
7111
7076
|
}
|
|
7112
7077
|
if (type === "ampm")
|
|
7113
7078
|
return this.toggleDayPart();
|
|
7114
|
-
|
|
7115
|
-
|
|
7079
|
+
const update = {};
|
|
7080
|
+
const body = document.body;
|
|
7116
7081
|
update[type] = this[action](type);
|
|
7117
7082
|
this.setState(update);
|
|
7118
7083
|
this.timer = setTimeout(() => {
|
|
@@ -7155,8 +7120,8 @@ flowchart TD
|
|
|
7155
7120
|
return pad(type, value);
|
|
7156
7121
|
}
|
|
7157
7122
|
getCounters() {
|
|
7158
|
-
|
|
7159
|
-
|
|
7123
|
+
const counters = [];
|
|
7124
|
+
const format2 = this.props.timeFormat;
|
|
7160
7125
|
if (format2.toLowerCase().indexOf("h") !== -1) {
|
|
7161
7126
|
counters.push("hours");
|
|
7162
7127
|
if (format2.indexOf("m") !== -1) {
|
|
@@ -7288,7 +7253,7 @@ flowchart TD
|
|
|
7288
7253
|
__publicField(this, "_renderCalendar", () => {
|
|
7289
7254
|
const props = this.props;
|
|
7290
7255
|
const state = this.state;
|
|
7291
|
-
|
|
7256
|
+
const viewProps = {
|
|
7292
7257
|
viewDate: state.viewDate.clone(),
|
|
7293
7258
|
selectedDate: this.getSelectedDate(),
|
|
7294
7259
|
isValidDate: props.isValidDate,
|
|
@@ -7331,10 +7296,10 @@ flowchart TD
|
|
|
7331
7296
|
__publicField(this, "viewToMethod", { days: "date", months: "month", years: "year" });
|
|
7332
7297
|
__publicField(this, "nextView", { days: "time", months: "days", years: "months" });
|
|
7333
7298
|
__publicField(this, "_updateDate", (e) => {
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7299
|
+
const state = this.state;
|
|
7300
|
+
const currentView = state.currentView;
|
|
7301
|
+
const updateOnView = this.getUpdateOn(this.getFormat("date"));
|
|
7302
|
+
const viewDate = this.state.viewDate.clone();
|
|
7338
7303
|
viewDate[this.viewToMethod[currentView]](
|
|
7339
7304
|
parseInt(e.target.getAttribute("data-value"), 10)
|
|
7340
7305
|
);
|
|
@@ -7342,7 +7307,7 @@ flowchart TD
|
|
|
7342
7307
|
viewDate.month(parseInt(e.target.getAttribute("data-month"), 10));
|
|
7343
7308
|
viewDate.year(parseInt(e.target.getAttribute("data-year"), 10));
|
|
7344
7309
|
}
|
|
7345
|
-
|
|
7310
|
+
const update = { viewDate };
|
|
7346
7311
|
if (currentView === updateOnView) {
|
|
7347
7312
|
update.selectedDate = viewDate.clone();
|
|
7348
7313
|
update.inputValue = viewDate.format(this.getFormat("datetime"));
|
|
@@ -7356,7 +7321,7 @@ flowchart TD
|
|
|
7356
7321
|
this.setState(update);
|
|
7357
7322
|
});
|
|
7358
7323
|
__publicField(this, "_viewNavigate", (modifier, unit) => {
|
|
7359
|
-
|
|
7324
|
+
const viewDate = this.state.viewDate.clone();
|
|
7360
7325
|
viewDate.add(modifier, unit);
|
|
7361
7326
|
if (modifier > 0) {
|
|
7362
7327
|
this.props.onNavigateForward(modifier, unit);
|
|
@@ -7366,7 +7331,7 @@ flowchart TD
|
|
|
7366
7331
|
this.setState({ viewDate });
|
|
7367
7332
|
});
|
|
7368
7333
|
__publicField(this, "_setTime", (type, value) => {
|
|
7369
|
-
|
|
7334
|
+
const date = (this.getSelectedDate() || this.state.viewDate).clone();
|
|
7370
7335
|
date[type](value);
|
|
7371
7336
|
if (!this.props.value) {
|
|
7372
7337
|
this.setState({
|
|
@@ -7390,7 +7355,7 @@ flowchart TD
|
|
|
7390
7355
|
});
|
|
7391
7356
|
});
|
|
7392
7357
|
__publicField(this, "_handleClickOutside", () => {
|
|
7393
|
-
|
|
7358
|
+
const props = this.props;
|
|
7394
7359
|
if (props.input && this.state.open && props.open === void 0 && props.closeOnClickOutside) {
|
|
7395
7360
|
this._closeCalendar();
|
|
7396
7361
|
}
|
|
@@ -7405,7 +7370,7 @@ flowchart TD
|
|
|
7405
7370
|
return;
|
|
7406
7371
|
const value = e.target ? e.target.value : e;
|
|
7407
7372
|
const localMoment = this.localMoment(value, this.getFormat("datetime"));
|
|
7408
|
-
|
|
7373
|
+
const update = { inputValue: value };
|
|
7409
7374
|
if (localMoment.isValid()) {
|
|
7410
7375
|
update.selectedDate = localMoment;
|
|
7411
7376
|
update.viewDate = localMoment.clone().startOf("month");
|
|
@@ -7469,9 +7434,9 @@ flowchart TD
|
|
|
7469
7434
|
return this.props.renderView(this.state.currentView, this._renderCalendar);
|
|
7470
7435
|
}
|
|
7471
7436
|
getInitialState() {
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7437
|
+
const props = this.props;
|
|
7438
|
+
const inputFormat = this.getFormat("datetime");
|
|
7439
|
+
const selectedDate = this.parseDate(
|
|
7475
7440
|
props.value || props.initialValue,
|
|
7476
7441
|
inputFormat
|
|
7477
7442
|
);
|
|
@@ -7502,7 +7467,7 @@ flowchart TD
|
|
|
7502
7467
|
return this.getInitialDate();
|
|
7503
7468
|
}
|
|
7504
7469
|
getInitialDate() {
|
|
7505
|
-
|
|
7470
|
+
const m = this.localMoment();
|
|
7506
7471
|
m.hour(0).minute(0).second(0).millisecond(0);
|
|
7507
7472
|
return m;
|
|
7508
7473
|
}
|
|
@@ -7522,8 +7487,8 @@ flowchart TD
|
|
|
7522
7487
|
}
|
|
7523
7488
|
getClassName() {
|
|
7524
7489
|
let cn2 = "rdt";
|
|
7525
|
-
|
|
7526
|
-
|
|
7490
|
+
const props = this.props;
|
|
7491
|
+
const propCn = props.className;
|
|
7527
7492
|
if (Array.isArray(propCn)) {
|
|
7528
7493
|
cn2 += " " + propCn.join(" ");
|
|
7529
7494
|
} else if (propCn) {
|
|
@@ -7556,14 +7521,14 @@ flowchart TD
|
|
|
7556
7521
|
return viewModes.DAYS;
|
|
7557
7522
|
}
|
|
7558
7523
|
getLocaleData() {
|
|
7559
|
-
|
|
7524
|
+
const p = this.props;
|
|
7560
7525
|
return this.localMoment(
|
|
7561
7526
|
p.value || p.defaultValue || /* @__PURE__ */ new Date()
|
|
7562
7527
|
).localeData();
|
|
7563
7528
|
}
|
|
7564
7529
|
getDateFormat() {
|
|
7565
7530
|
const locale = this.getLocaleData();
|
|
7566
|
-
|
|
7531
|
+
const format2 = this.props.dateFormat;
|
|
7567
7532
|
if (format2 === true)
|
|
7568
7533
|
return locale.longDateFormat("L");
|
|
7569
7534
|
if (format2)
|
|
@@ -7572,7 +7537,7 @@ flowchart TD
|
|
|
7572
7537
|
}
|
|
7573
7538
|
getTimeFormat() {
|
|
7574
7539
|
const locale = this.getLocaleData();
|
|
7575
|
-
|
|
7540
|
+
const format2 = this.props.timeFormat;
|
|
7576
7541
|
if (format2 === true) {
|
|
7577
7542
|
return locale.longDateFormat("LT");
|
|
7578
7543
|
}
|
|
@@ -7584,12 +7549,12 @@ flowchart TD
|
|
|
7584
7549
|
} else if (type === "time") {
|
|
7585
7550
|
return this.getTimeFormat();
|
|
7586
7551
|
}
|
|
7587
|
-
|
|
7588
|
-
|
|
7552
|
+
const dateFormat = this.getDateFormat();
|
|
7553
|
+
const timeFormat = this.getTimeFormat();
|
|
7589
7554
|
return dateFormat && timeFormat ? dateFormat + " " + timeFormat : dateFormat || timeFormat;
|
|
7590
7555
|
}
|
|
7591
7556
|
updateTime(op, amount, type, toSelected) {
|
|
7592
|
-
|
|
7557
|
+
const update = {};
|
|
7593
7558
|
const date = toSelected ? "selectedDate" : "viewDate";
|
|
7594
7559
|
update[date] = this.state[date].clone()[op](amount, type);
|
|
7595
7560
|
this.setState(update);
|
|
@@ -7622,7 +7587,7 @@ flowchart TD
|
|
|
7622
7587
|
if (prevProps === this.props)
|
|
7623
7588
|
return;
|
|
7624
7589
|
let needsUpdate = false;
|
|
7625
|
-
|
|
7590
|
+
const thisProps = this.props;
|
|
7626
7591
|
["locale", "utc", "displayZone", "dateFormat", "timeFormat"].forEach(
|
|
7627
7592
|
function(p) {
|
|
7628
7593
|
prevProps[p] !== thisProps[p] && (needsUpdate = true);
|
|
@@ -7638,8 +7603,8 @@ flowchart TD
|
|
|
7638
7603
|
}
|
|
7639
7604
|
regenerateDates() {
|
|
7640
7605
|
const props = this.props;
|
|
7641
|
-
|
|
7642
|
-
|
|
7606
|
+
const viewDate = this.state.viewDate.clone();
|
|
7607
|
+
const selectedDate = this.state.selectedDate && this.state.selectedDate.clone();
|
|
7643
7608
|
if (props.locale) {
|
|
7644
7609
|
viewDate.locale(props.locale);
|
|
7645
7610
|
selectedDate && selectedDate.locale(props.locale);
|
|
@@ -7654,7 +7619,7 @@ flowchart TD
|
|
|
7654
7619
|
viewDate.locale();
|
|
7655
7620
|
selectedDate && selectedDate.locale();
|
|
7656
7621
|
}
|
|
7657
|
-
|
|
7622
|
+
const update = { viewDate, selectedDate };
|
|
7658
7623
|
if (selectedDate && selectedDate.isValid()) {
|
|
7659
7624
|
update.inputValue = selectedDate.format(this.getFormat("datetime"));
|
|
7660
7625
|
}
|
|
@@ -7663,7 +7628,7 @@ flowchart TD
|
|
|
7663
7628
|
getSelectedDate() {
|
|
7664
7629
|
if (this.props.value === void 0)
|
|
7665
7630
|
return this.state.selectedDate;
|
|
7666
|
-
|
|
7631
|
+
const selectedDate = this.parseDate(
|
|
7667
7632
|
this.props.value,
|
|
7668
7633
|
this.getFormat("datetime")
|
|
7669
7634
|
);
|
|
@@ -7682,7 +7647,7 @@ flowchart TD
|
|
|
7682
7647
|
return "";
|
|
7683
7648
|
}
|
|
7684
7649
|
getInputValue() {
|
|
7685
|
-
|
|
7650
|
+
const selectedDate = this.getSelectedDate();
|
|
7686
7651
|
return selectedDate ? selectedDate.format(this.getFormat("datetime")) : this.state.inputValue;
|
|
7687
7652
|
}
|
|
7688
7653
|
/**
|
|
@@ -7692,7 +7657,7 @@ flowchart TD
|
|
|
7692
7657
|
* @public
|
|
7693
7658
|
*/
|
|
7694
7659
|
setViewDate(date) {
|
|
7695
|
-
|
|
7660
|
+
const logError = function() {
|
|
7696
7661
|
return log("Invalid date passed to the `setViewDate` method: " + date);
|
|
7697
7662
|
};
|
|
7698
7663
|
if (!date)
|
|
@@ -7788,7 +7753,7 @@ flowchart TD
|
|
|
7788
7753
|
// Make moment accessible through the Datetime class
|
|
7789
7754
|
__publicField(Datetime, "moment", moment);
|
|
7790
7755
|
function log(message, method) {
|
|
7791
|
-
|
|
7756
|
+
const con = typeof window !== "undefined" && window.console;
|
|
7792
7757
|
if (!con)
|
|
7793
7758
|
return;
|
|
7794
7759
|
if (!method) {
|
|
@@ -8041,9 +8006,6 @@ flowchart TD
|
|
|
8041
8006
|
},
|
|
8042
8007
|
parse: parse$2
|
|
8043
8008
|
};
|
|
8044
|
-
function GrCircleQuestion(props) {
|
|
8045
|
-
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);
|
|
8046
|
-
}
|
|
8047
8009
|
function AiFillWarning(props) {
|
|
8048
8010
|
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);
|
|
8049
8011
|
}
|
|
@@ -8062,6 +8024,39 @@ flowchart TD
|
|
|
8062
8024
|
function FaUnlock(props) {
|
|
8063
8025
|
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);
|
|
8064
8026
|
}
|
|
8027
|
+
function GrCircleQuestion(props) {
|
|
8028
|
+
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);
|
|
8029
|
+
}
|
|
8030
|
+
const BranchContext = React__namespace.createContext({
|
|
8031
|
+
currentBranch: null,
|
|
8032
|
+
setCurrentBranch: (branch) => {
|
|
8033
|
+
console.warn("BranchContext not initialized");
|
|
8034
|
+
}
|
|
8035
|
+
});
|
|
8036
|
+
const BranchDataProvider = ({
|
|
8037
|
+
currentBranch,
|
|
8038
|
+
setCurrentBranch,
|
|
8039
|
+
children
|
|
8040
|
+
}) => {
|
|
8041
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
8042
|
+
BranchContext.Provider,
|
|
8043
|
+
{
|
|
8044
|
+
value: {
|
|
8045
|
+
currentBranch,
|
|
8046
|
+
setCurrentBranch
|
|
8047
|
+
}
|
|
8048
|
+
},
|
|
8049
|
+
children
|
|
8050
|
+
);
|
|
8051
|
+
};
|
|
8052
|
+
const useBranchData = () => {
|
|
8053
|
+
const branchData = React__namespace.useContext(BranchContext);
|
|
8054
|
+
const { dispatch } = useEvent("branch:change");
|
|
8055
|
+
React__namespace.useEffect(() => {
|
|
8056
|
+
dispatch({ branchName: branchData.currentBranch });
|
|
8057
|
+
}, [branchData.currentBranch]);
|
|
8058
|
+
return branchData;
|
|
8059
|
+
};
|
|
8065
8060
|
function formatBranchName$1(str) {
|
|
8066
8061
|
const pattern = /[^/\w-]+/g;
|
|
8067
8062
|
const formattedStr = str.replace(pattern, "");
|
|
@@ -8160,7 +8155,7 @@ flowchart TD
|
|
|
8160
8155
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8161
8156
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8162
8157
|
},
|
|
8163
|
-
"Learn more about moving to production with
|
|
8158
|
+
"Learn more about moving to production with TinaCloud."
|
|
8164
8159
|
)), /* @__PURE__ */ React__namespace.createElement("p", null, /* @__PURE__ */ React__namespace.createElement(
|
|
8165
8160
|
Button$1,
|
|
8166
8161
|
{
|
|
@@ -8396,7 +8391,7 @@ flowchart TD
|
|
|
8396
8391
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8397
8392
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8398
8393
|
},
|
|
8399
|
-
"Learn more about moving to production with
|
|
8394
|
+
"Learn more about moving to production with TinaCloud."
|
|
8400
8395
|
)), /* @__PURE__ */ React__namespace.createElement("p", null, /* @__PURE__ */ React__namespace.createElement(
|
|
8401
8396
|
Button$1,
|
|
8402
8397
|
{
|
|
@@ -8611,7 +8606,10 @@ flowchart TD
|
|
|
8611
8606
|
label: "View in GitHub",
|
|
8612
8607
|
Icon: /* @__PURE__ */ React__namespace.createElement(BiLinkExternal, { className: "w-5 h-auto text-blue-500 opacity-70" }),
|
|
8613
8608
|
onMouseDown: () => {
|
|
8614
|
-
window.open(
|
|
8609
|
+
window.open(
|
|
8610
|
+
branch.githubPullRequestUrl,
|
|
8611
|
+
"_blank"
|
|
8612
|
+
);
|
|
8615
8613
|
}
|
|
8616
8614
|
},
|
|
8617
8615
|
typeof previewFunction === "function" && ((_b2 = previewFunction({ branch: branch.name })) == null ? void 0 : _b2.url) && {
|
|
@@ -8917,7 +8915,9 @@ flowchart TD
|
|
|
8917
8915
|
} else {
|
|
8918
8916
|
events = event;
|
|
8919
8917
|
}
|
|
8920
|
-
const newListeners = events.map(
|
|
8918
|
+
const newListeners = events.map(
|
|
8919
|
+
(event2) => new Listener(event2, callback)
|
|
8920
|
+
);
|
|
8921
8921
|
newListeners.forEach((newListener) => this.listeners.add(newListener));
|
|
8922
8922
|
return () => {
|
|
8923
8923
|
newListeners.forEach((listener) => this.listeners.delete(listener));
|
|
@@ -9273,9 +9273,7 @@ flowchart TD
|
|
|
9273
9273
|
const deleteStartTime = Date.now();
|
|
9274
9274
|
while (true) {
|
|
9275
9275
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
9276
|
-
const { error, message } = await this.api.getRequestStatus(
|
|
9277
|
-
requestId
|
|
9278
|
-
);
|
|
9276
|
+
const { error, message } = await this.api.getRequestStatus(requestId);
|
|
9279
9277
|
if (error !== void 0) {
|
|
9280
9278
|
if (error) {
|
|
9281
9279
|
throw new Error(message);
|
|
@@ -9300,6 +9298,17 @@ flowchart TD
|
|
|
9300
9298
|
}
|
|
9301
9299
|
}
|
|
9302
9300
|
}
|
|
9301
|
+
const encodeUrlIfNeeded = (url) => {
|
|
9302
|
+
if (url) {
|
|
9303
|
+
try {
|
|
9304
|
+
return new URL(url).toString();
|
|
9305
|
+
} catch (e) {
|
|
9306
|
+
return url;
|
|
9307
|
+
}
|
|
9308
|
+
} else {
|
|
9309
|
+
return url;
|
|
9310
|
+
}
|
|
9311
|
+
};
|
|
9303
9312
|
let MediaManager$1 = class MediaManager {
|
|
9304
9313
|
constructor(store, events) {
|
|
9305
9314
|
this.store = store;
|
|
@@ -9372,6 +9381,20 @@ flowchart TD
|
|
|
9372
9381
|
try {
|
|
9373
9382
|
this.events.dispatch({ type: "media:list:start", ...options });
|
|
9374
9383
|
const media = await this.store.list(options);
|
|
9384
|
+
media.items = media.items.map((item) => {
|
|
9385
|
+
if (item.type === "dir") {
|
|
9386
|
+
return item;
|
|
9387
|
+
}
|
|
9388
|
+
if (item.thumbnails) {
|
|
9389
|
+
for (const [size, src] of Object.entries(item.thumbnails)) {
|
|
9390
|
+
item.thumbnails[size] = encodeUrlIfNeeded(src);
|
|
9391
|
+
}
|
|
9392
|
+
}
|
|
9393
|
+
return {
|
|
9394
|
+
...item,
|
|
9395
|
+
src: encodeUrlIfNeeded(item.src)
|
|
9396
|
+
};
|
|
9397
|
+
});
|
|
9375
9398
|
this.events.dispatch({ type: "media:list:success", ...options, media });
|
|
9376
9399
|
return media;
|
|
9377
9400
|
} catch (error) {
|
|
@@ -9400,7 +9423,7 @@ flowchart TD
|
|
|
9400
9423
|
});
|
|
9401
9424
|
new MediaListError({
|
|
9402
9425
|
title: "An Error Occurred",
|
|
9403
|
-
message: "Something went wrong accessing your media from
|
|
9426
|
+
message: "Something went wrong accessing your media from TinaCloud.",
|
|
9404
9427
|
docsLink: ""
|
|
9405
9428
|
// TODO
|
|
9406
9429
|
});
|
|
@@ -9585,7 +9608,7 @@ flowchart TD
|
|
|
9585
9608
|
return this.add("error", message, timeout);
|
|
9586
9609
|
}
|
|
9587
9610
|
};
|
|
9588
|
-
const
|
|
9611
|
+
const SidebarLoadingPlaceholder = () => /* @__PURE__ */ React__namespace.createElement(
|
|
9589
9612
|
"div",
|
|
9590
9613
|
{
|
|
9591
9614
|
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
@@ -9598,25 +9621,8 @@ flowchart TD
|
|
|
9598
9621
|
animationDuration: "150ms"
|
|
9599
9622
|
}
|
|
9600
9623
|
},
|
|
9601
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
9602
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
9603
|
-
/* @__PURE__ */ React__namespace.createElement("p", { className: "block" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9604
|
-
Button$1,
|
|
9605
|
-
{
|
|
9606
|
-
href: "https://tina.io/docs/tinacms-context/",
|
|
9607
|
-
target: "_blank",
|
|
9608
|
-
as: "a"
|
|
9609
|
-
},
|
|
9610
|
-
/* @__PURE__ */ React__namespace.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
9611
|
-
" Contextual Editing"
|
|
9612
|
-
))
|
|
9613
|
-
);
|
|
9614
|
-
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React__namespace.createElement(
|
|
9615
|
-
"span",
|
|
9616
|
-
{
|
|
9617
|
-
className: `text-[24px] leading-none inline-block ${className}`,
|
|
9618
|
-
...props
|
|
9619
|
-
}
|
|
9624
|
+
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pb-5" }, "Please wait while TinaCMS", /* @__PURE__ */ React__namespace.createElement("br", null), "loads your content"),
|
|
9625
|
+
/* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" })
|
|
9620
9626
|
);
|
|
9621
9627
|
class SidebarState {
|
|
9622
9628
|
constructor(events, options = {}) {
|
|
@@ -9631,7 +9637,7 @@ flowchart TD
|
|
|
9631
9637
|
};
|
|
9632
9638
|
this.position = options.position || "displace";
|
|
9633
9639
|
this.renderNav = options.renderNav || true;
|
|
9634
|
-
this.
|
|
9640
|
+
this.loadingPlaceholder = options.placeholder || SidebarLoadingPlaceholder;
|
|
9635
9641
|
if ((_a = options.buttons) == null ? void 0 : _a.save) {
|
|
9636
9642
|
this.buttons.save = options.buttons.save;
|
|
9637
9643
|
}
|
|
@@ -9705,238 +9711,6 @@ flowchart TD
|
|
|
9705
9711
|
children
|
|
9706
9712
|
)));
|
|
9707
9713
|
};
|
|
9708
|
-
const Item = ({
|
|
9709
|
-
item,
|
|
9710
|
-
depth,
|
|
9711
|
-
setActiveFormId
|
|
9712
|
-
}) => {
|
|
9713
|
-
const cms = useCMS();
|
|
9714
|
-
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
9715
|
-
const form = React__namespace.useMemo(
|
|
9716
|
-
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
9717
|
-
[item.formId]
|
|
9718
|
-
);
|
|
9719
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9720
|
-
"button",
|
|
9721
|
-
{
|
|
9722
|
-
type: "button",
|
|
9723
|
-
key: item.path,
|
|
9724
|
-
onClick: () => setActiveFormId(item.formId),
|
|
9725
|
-
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`
|
|
9726
|
-
},
|
|
9727
|
-
/* @__PURE__ */ React__namespace.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
9728
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1 flex flex-col gap-0.5 items-start" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "group-hover:text-blue-500 font-sans text-xs font-semibold text-gray-700 whitespace-normal" }, form.tinaForm.label), /* @__PURE__ */ React__namespace.createElement("div", { className: "group-hover:text-blue-500 text-base truncate leading-tight text-gray-600" }, form.tinaForm.id))
|
|
9729
|
-
);
|
|
9730
|
-
};
|
|
9731
|
-
const FormListItem = ({
|
|
9732
|
-
item,
|
|
9733
|
-
depth,
|
|
9734
|
-
setActiveFormId
|
|
9735
|
-
}) => {
|
|
9736
|
-
var _a;
|
|
9737
|
-
return /* @__PURE__ */ React__namespace.createElement("div", { className: "divide-y divide-gray-200" }, /* @__PURE__ */ React__namespace.createElement(Item, { setActiveFormId, item, depth }), item.subItems && /* @__PURE__ */ React__namespace.createElement("ul", { className: "divide-y divide-gray-200" }, (_a = item.subItems) == null ? void 0 : _a.map((subItem) => {
|
|
9738
|
-
if (subItem.type === "document") {
|
|
9739
|
-
return /* @__PURE__ */ React__namespace.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React__namespace.createElement(
|
|
9740
|
-
Item,
|
|
9741
|
-
{
|
|
9742
|
-
setActiveFormId,
|
|
9743
|
-
depth: depth + 1,
|
|
9744
|
-
item: subItem
|
|
9745
|
-
}
|
|
9746
|
-
));
|
|
9747
|
-
}
|
|
9748
|
-
})));
|
|
9749
|
-
};
|
|
9750
|
-
const FormLists = (props) => {
|
|
9751
|
-
const cms = useCMS();
|
|
9752
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9753
|
-
react.Transition,
|
|
9754
|
-
{
|
|
9755
|
-
appear: true,
|
|
9756
|
-
show: true,
|
|
9757
|
-
as: "div",
|
|
9758
|
-
enter: "transition-all ease-out duration-150",
|
|
9759
|
-
enterFrom: "opacity-0 -translate-x-1/2",
|
|
9760
|
-
enterTo: "opacity-100",
|
|
9761
|
-
leave: "transition-all ease-out duration-150",
|
|
9762
|
-
leaveFrom: "opacity-100",
|
|
9763
|
-
leaveTo: "opacity-0 -translate-x-1/2"
|
|
9764
|
-
},
|
|
9765
|
-
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React__namespace.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9766
|
-
FormList,
|
|
9767
|
-
{
|
|
9768
|
-
isEditing: props.isEditing,
|
|
9769
|
-
setActiveFormId: (id) => {
|
|
9770
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
9771
|
-
},
|
|
9772
|
-
formList
|
|
9773
|
-
}
|
|
9774
|
-
)))
|
|
9775
|
-
);
|
|
9776
|
-
};
|
|
9777
|
-
const FormList = (props) => {
|
|
9778
|
-
const cms = useCMS();
|
|
9779
|
-
const listItems = React__namespace.useMemo(() => {
|
|
9780
|
-
var _a;
|
|
9781
|
-
const orderedListItems = [];
|
|
9782
|
-
const globalItems = [];
|
|
9783
|
-
const topItems = [];
|
|
9784
|
-
props.formList.items.forEach((item) => {
|
|
9785
|
-
if (item.type === "document") {
|
|
9786
|
-
const form = cms.state.forms.find(
|
|
9787
|
-
({ tinaForm }) => tinaForm.id === item.formId
|
|
9788
|
-
);
|
|
9789
|
-
if (form.tinaForm.global) {
|
|
9790
|
-
globalItems.push(item);
|
|
9791
|
-
} else {
|
|
9792
|
-
orderedListItems.push(item);
|
|
9793
|
-
}
|
|
9794
|
-
} else {
|
|
9795
|
-
orderedListItems.push(item);
|
|
9796
|
-
}
|
|
9797
|
-
});
|
|
9798
|
-
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
9799
|
-
topItems.push({ type: "list", label: "Documents" });
|
|
9800
|
-
}
|
|
9801
|
-
let extra = [];
|
|
9802
|
-
if (globalItems.length) {
|
|
9803
|
-
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
9804
|
-
}
|
|
9805
|
-
return [...topItems, ...orderedListItems, ...extra];
|
|
9806
|
-
}, [JSON.stringify(props.formList.items)]);
|
|
9807
|
-
return /* @__PURE__ */ React__namespace.createElement("ul", null, /* @__PURE__ */ React__namespace.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
9808
|
-
if (item.type === "list") {
|
|
9809
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9810
|
-
"div",
|
|
9811
|
-
{
|
|
9812
|
-
key: item.label,
|
|
9813
|
-
className: `relative group text-left w-full bg-white shadow-sm
|
|
9814
|
-
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"}`
|
|
9815
|
-
},
|
|
9816
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
9817
|
-
"span",
|
|
9818
|
-
{
|
|
9819
|
-
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
9820
|
-
},
|
|
9821
|
-
item.label
|
|
9822
|
-
)
|
|
9823
|
-
);
|
|
9824
|
-
}
|
|
9825
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9826
|
-
FormListItem,
|
|
9827
|
-
{
|
|
9828
|
-
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
9829
|
-
key: item.formId,
|
|
9830
|
-
item,
|
|
9831
|
-
depth: 0
|
|
9832
|
-
}
|
|
9833
|
-
);
|
|
9834
|
-
})));
|
|
9835
|
-
};
|
|
9836
|
-
const FormsView = ({
|
|
9837
|
-
children
|
|
9838
|
-
}) => {
|
|
9839
|
-
const cms = useCMS$1();
|
|
9840
|
-
const { setFormIsPristine } = React__namespace.useContext(SidebarContext);
|
|
9841
|
-
const isMultiform = cms.state.forms.length > 1;
|
|
9842
|
-
const activeForm = cms.state.forms.find(
|
|
9843
|
-
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
9844
|
-
);
|
|
9845
|
-
const isEditing = !!activeForm;
|
|
9846
|
-
if (!cms.state.formLists.length) {
|
|
9847
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, " ", children, " ");
|
|
9848
|
-
}
|
|
9849
|
-
if (isMultiform && !activeForm) {
|
|
9850
|
-
return /* @__PURE__ */ React__namespace.createElement(FormLists, { isEditing });
|
|
9851
|
-
}
|
|
9852
|
-
const formMetas = cms.plugins.all("form:meta");
|
|
9853
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, activeForm && /* @__PURE__ */ React__namespace.createElement(FormWrapper$1, { isEditing, isMultiform }, isMultiform && /* @__PURE__ */ React__namespace.createElement(MultiformFormHeader, { activeForm }), !isMultiform && /* @__PURE__ */ React__namespace.createElement(FormHeader, { activeForm }), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, { key: meta.name }, /* @__PURE__ */ React__namespace.createElement(meta.Component, null))), /* @__PURE__ */ React__namespace.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine })));
|
|
9854
|
-
};
|
|
9855
|
-
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
9856
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9857
|
-
"div",
|
|
9858
|
-
{
|
|
9859
|
-
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
9860
|
-
style: isEditing ? {
|
|
9861
|
-
transform: "none",
|
|
9862
|
-
animationName: "fly-in-left",
|
|
9863
|
-
animationDuration: "150ms",
|
|
9864
|
-
animationDelay: "0",
|
|
9865
|
-
animationIterationCount: 1,
|
|
9866
|
-
animationTimingFunction: "ease-out"
|
|
9867
|
-
} : {
|
|
9868
|
-
transform: "translate3d(100%, 0, 0)"
|
|
9869
|
-
}
|
|
9870
|
-
},
|
|
9871
|
-
children
|
|
9872
|
-
);
|
|
9873
|
-
};
|
|
9874
|
-
const MultiformFormHeader = ({
|
|
9875
|
-
activeForm
|
|
9876
|
-
}) => {
|
|
9877
|
-
const cms = useCMS$1();
|
|
9878
|
-
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
9879
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9880
|
-
"div",
|
|
9881
|
-
{
|
|
9882
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9883
|
-
},
|
|
9884
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9885
|
-
"button",
|
|
9886
|
-
{
|
|
9887
|
-
type: "button",
|
|
9888
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9889
|
-
onClick: () => {
|
|
9890
|
-
const state = activeForm.tinaForm.finalForm.getState();
|
|
9891
|
-
if (state.invalid === true) {
|
|
9892
|
-
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
9893
|
-
} else {
|
|
9894
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
9895
|
-
}
|
|
9896
|
-
}
|
|
9897
|
-
},
|
|
9898
|
-
/* @__PURE__ */ React__namespace.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9899
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
9900
|
-
"button",
|
|
9901
|
-
{
|
|
9902
|
-
type: "button",
|
|
9903
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9904
|
-
onClick: () => {
|
|
9905
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9906
|
-
cms.state.activeFormId
|
|
9907
|
-
).name;
|
|
9908
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9909
|
-
}
|
|
9910
|
-
},
|
|
9911
|
-
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9912
|
-
), /* @__PURE__ */ React__namespace.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, activeForm.tinaForm.label || activeForm.tinaForm.id), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
|
|
9913
|
-
);
|
|
9914
|
-
};
|
|
9915
|
-
const FormHeader = ({ activeForm }) => {
|
|
9916
|
-
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
9917
|
-
const cms = useCMS$1();
|
|
9918
|
-
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
9919
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9920
|
-
"div",
|
|
9921
|
-
{
|
|
9922
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9923
|
-
},
|
|
9924
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9925
|
-
"button",
|
|
9926
|
-
{
|
|
9927
|
-
type: "button",
|
|
9928
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9929
|
-
onClick: () => {
|
|
9930
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9931
|
-
cms.state.activeFormId
|
|
9932
|
-
).name;
|
|
9933
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9934
|
-
}
|
|
9935
|
-
},
|
|
9936
|
-
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9937
|
-
), shortFormLabel && /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
|
|
9938
|
-
);
|
|
9939
|
-
};
|
|
9940
9714
|
function ImFilesEmpty(props) {
|
|
9941
9715
|
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);
|
|
9942
9716
|
}
|
|
@@ -10179,7 +9953,7 @@ flowchart TD
|
|
|
10179
9953
|
"Event Log"
|
|
10180
9954
|
));
|
|
10181
9955
|
};
|
|
10182
|
-
const version = "2.
|
|
9956
|
+
const version = "2.7.4";
|
|
10183
9957
|
const Nav = ({
|
|
10184
9958
|
isLocalMode,
|
|
10185
9959
|
className = "",
|
|
@@ -10421,6 +10195,293 @@ flowchart TD
|
|
|
10421
10195
|
/* @__PURE__ */ React__namespace.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" })
|
|
10422
10196
|
);
|
|
10423
10197
|
};
|
|
10198
|
+
const Item = ({
|
|
10199
|
+
item,
|
|
10200
|
+
depth,
|
|
10201
|
+
setActiveFormId
|
|
10202
|
+
}) => {
|
|
10203
|
+
const cms = useCMS();
|
|
10204
|
+
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
10205
|
+
const form = React__namespace.useMemo(
|
|
10206
|
+
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
10207
|
+
[item.formId]
|
|
10208
|
+
);
|
|
10209
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10210
|
+
"button",
|
|
10211
|
+
{
|
|
10212
|
+
type: "button",
|
|
10213
|
+
key: item.path,
|
|
10214
|
+
onClick: () => setActiveFormId(item.formId),
|
|
10215
|
+
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`
|
|
10216
|
+
},
|
|
10217
|
+
/* @__PURE__ */ React__namespace.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
10218
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1 flex flex-col gap-0.5 items-start" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "group-hover:text-blue-500 font-sans text-xs font-semibold text-gray-700 whitespace-normal" }, form.tinaForm.label), /* @__PURE__ */ React__namespace.createElement("div", { className: "group-hover:text-blue-500 text-base truncate leading-tight text-gray-600" }, form.tinaForm.id))
|
|
10219
|
+
);
|
|
10220
|
+
};
|
|
10221
|
+
const FormListItem = ({
|
|
10222
|
+
item,
|
|
10223
|
+
depth,
|
|
10224
|
+
setActiveFormId
|
|
10225
|
+
}) => {
|
|
10226
|
+
var _a;
|
|
10227
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: "divide-y divide-gray-200" }, /* @__PURE__ */ React__namespace.createElement(Item, { setActiveFormId, item, depth }), item.subItems && /* @__PURE__ */ React__namespace.createElement("ul", { className: "divide-y divide-gray-200" }, (_a = item.subItems) == null ? void 0 : _a.map((subItem) => {
|
|
10228
|
+
if (subItem.type === "document") {
|
|
10229
|
+
return /* @__PURE__ */ React__namespace.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React__namespace.createElement(
|
|
10230
|
+
Item,
|
|
10231
|
+
{
|
|
10232
|
+
setActiveFormId,
|
|
10233
|
+
depth: depth + 1,
|
|
10234
|
+
item: subItem
|
|
10235
|
+
}
|
|
10236
|
+
));
|
|
10237
|
+
}
|
|
10238
|
+
})));
|
|
10239
|
+
};
|
|
10240
|
+
const FormLists = (props) => {
|
|
10241
|
+
const cms = useCMS();
|
|
10242
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10243
|
+
react.Transition,
|
|
10244
|
+
{
|
|
10245
|
+
appear: true,
|
|
10246
|
+
show: true,
|
|
10247
|
+
as: "div",
|
|
10248
|
+
enter: "transition-all ease-out duration-150",
|
|
10249
|
+
enterFrom: "opacity-0 -translate-x-1/2",
|
|
10250
|
+
enterTo: "opacity-100",
|
|
10251
|
+
leave: "transition-all ease-out duration-150",
|
|
10252
|
+
leaveFrom: "opacity-100",
|
|
10253
|
+
leaveTo: "opacity-0 -translate-x-1/2"
|
|
10254
|
+
},
|
|
10255
|
+
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React__namespace.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10256
|
+
FormList,
|
|
10257
|
+
{
|
|
10258
|
+
isEditing: props.isEditing,
|
|
10259
|
+
setActiveFormId: (id) => {
|
|
10260
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
10261
|
+
},
|
|
10262
|
+
formList
|
|
10263
|
+
}
|
|
10264
|
+
)))
|
|
10265
|
+
);
|
|
10266
|
+
};
|
|
10267
|
+
const FormList = (props) => {
|
|
10268
|
+
const cms = useCMS();
|
|
10269
|
+
const listItems = React__namespace.useMemo(() => {
|
|
10270
|
+
var _a;
|
|
10271
|
+
const orderedListItems = [];
|
|
10272
|
+
const globalItems = [];
|
|
10273
|
+
const topItems = [];
|
|
10274
|
+
props.formList.items.forEach((item) => {
|
|
10275
|
+
if (item.type === "document") {
|
|
10276
|
+
const form = cms.state.forms.find(
|
|
10277
|
+
({ tinaForm }) => tinaForm.id === item.formId
|
|
10278
|
+
);
|
|
10279
|
+
if (form.tinaForm.global) {
|
|
10280
|
+
globalItems.push(item);
|
|
10281
|
+
} else {
|
|
10282
|
+
orderedListItems.push(item);
|
|
10283
|
+
}
|
|
10284
|
+
} else {
|
|
10285
|
+
orderedListItems.push(item);
|
|
10286
|
+
}
|
|
10287
|
+
});
|
|
10288
|
+
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
10289
|
+
topItems.push({ type: "list", label: "Documents" });
|
|
10290
|
+
}
|
|
10291
|
+
let extra = [];
|
|
10292
|
+
if (globalItems.length) {
|
|
10293
|
+
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
10294
|
+
}
|
|
10295
|
+
return [...topItems, ...orderedListItems, ...extra];
|
|
10296
|
+
}, [JSON.stringify(props.formList.items)]);
|
|
10297
|
+
return /* @__PURE__ */ React__namespace.createElement("ul", null, /* @__PURE__ */ React__namespace.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
10298
|
+
if (item.type === "list") {
|
|
10299
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10300
|
+
"div",
|
|
10301
|
+
{
|
|
10302
|
+
key: item.label,
|
|
10303
|
+
className: `relative group text-left w-full bg-white shadow-sm
|
|
10304
|
+
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"}`
|
|
10305
|
+
},
|
|
10306
|
+
/* @__PURE__ */ React__namespace.createElement(
|
|
10307
|
+
"span",
|
|
10308
|
+
{
|
|
10309
|
+
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
10310
|
+
},
|
|
10311
|
+
item.label
|
|
10312
|
+
)
|
|
10313
|
+
);
|
|
10314
|
+
}
|
|
10315
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10316
|
+
FormListItem,
|
|
10317
|
+
{
|
|
10318
|
+
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
10319
|
+
key: item.formId,
|
|
10320
|
+
item,
|
|
10321
|
+
depth: 0
|
|
10322
|
+
}
|
|
10323
|
+
);
|
|
10324
|
+
})));
|
|
10325
|
+
};
|
|
10326
|
+
const SidebarNoFormsPlaceholder = () => /* @__PURE__ */ React__namespace.createElement(
|
|
10327
|
+
"div",
|
|
10328
|
+
{
|
|
10329
|
+
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
10330
|
+
style: {
|
|
10331
|
+
animationName: "fade-in",
|
|
10332
|
+
animationDelay: "300ms",
|
|
10333
|
+
animationTimingFunction: "ease-out",
|
|
10334
|
+
animationIterationCount: 1,
|
|
10335
|
+
animationFillMode: "both",
|
|
10336
|
+
animationDuration: "150ms"
|
|
10337
|
+
}
|
|
10338
|
+
},
|
|
10339
|
+
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pb-5" }, "Looks like there's ", /* @__PURE__ */ React__namespace.createElement("br", null), "nothing to edit on ", /* @__PURE__ */ React__namespace.createElement("br", null), "this page."),
|
|
10340
|
+
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pt-5" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10341
|
+
Button$1,
|
|
10342
|
+
{
|
|
10343
|
+
href: "https://tina.io/docs/contextual-editing/overview",
|
|
10344
|
+
target: "_blank",
|
|
10345
|
+
as: "a"
|
|
10346
|
+
},
|
|
10347
|
+
/* @__PURE__ */ React__namespace.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
10348
|
+
" Contextual Editing Docs"
|
|
10349
|
+
))
|
|
10350
|
+
);
|
|
10351
|
+
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React__namespace.createElement(
|
|
10352
|
+
"span",
|
|
10353
|
+
{
|
|
10354
|
+
className: `text-[24px] leading-none inline-block ${className}`,
|
|
10355
|
+
...props
|
|
10356
|
+
}
|
|
10357
|
+
);
|
|
10358
|
+
const minimumTimeToShowLoadingIndicator = 1e3;
|
|
10359
|
+
const FormsView = ({ loadingPlaceholder } = {}) => {
|
|
10360
|
+
const cms = useCMS$1();
|
|
10361
|
+
const { setFormIsPristine } = React__namespace.useContext(SidebarContext);
|
|
10362
|
+
const [isShowingLoading, setIsShowingLoading] = React__namespace.useState(true);
|
|
10363
|
+
const [initialLoadComplete, setInitialLoadComplete] = React__namespace.useState(false);
|
|
10364
|
+
React__namespace.useEffect(() => {
|
|
10365
|
+
if (cms.state.isLoadingContent) {
|
|
10366
|
+
setIsShowingLoading(true);
|
|
10367
|
+
const timer = setTimeout(() => {
|
|
10368
|
+
if (!cms.state.isLoadingContent) {
|
|
10369
|
+
setIsShowingLoading(false);
|
|
10370
|
+
setInitialLoadComplete(true);
|
|
10371
|
+
}
|
|
10372
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10373
|
+
return () => clearTimeout(timer);
|
|
10374
|
+
} else {
|
|
10375
|
+
const timer = setTimeout(() => {
|
|
10376
|
+
setIsShowingLoading(false);
|
|
10377
|
+
setInitialLoadComplete(true);
|
|
10378
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10379
|
+
return () => clearTimeout(timer);
|
|
10380
|
+
}
|
|
10381
|
+
}, [cms.state.isLoadingContent]);
|
|
10382
|
+
if (isShowingLoading || !initialLoadComplete) {
|
|
10383
|
+
const LoadingPlaceholder = loadingPlaceholder || SidebarLoadingPlaceholder;
|
|
10384
|
+
return /* @__PURE__ */ React__namespace.createElement(LoadingPlaceholder, null);
|
|
10385
|
+
}
|
|
10386
|
+
if (!cms.state.formLists.length) {
|
|
10387
|
+
return /* @__PURE__ */ React__namespace.createElement(SidebarNoFormsPlaceholder, null);
|
|
10388
|
+
}
|
|
10389
|
+
const isMultiform = cms.state.forms.length > 1;
|
|
10390
|
+
const activeForm = cms.state.forms.find(
|
|
10391
|
+
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
10392
|
+
);
|
|
10393
|
+
const isEditing = !!activeForm;
|
|
10394
|
+
if (isMultiform && !activeForm) {
|
|
10395
|
+
return /* @__PURE__ */ React__namespace.createElement(FormLists, { isEditing });
|
|
10396
|
+
}
|
|
10397
|
+
const formMetas = cms.plugins.all("form:meta");
|
|
10398
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, activeForm && /* @__PURE__ */ React__namespace.createElement(FormWrapper$1, { isEditing, isMultiform }, isMultiform && /* @__PURE__ */ React__namespace.createElement(MultiformFormHeader, { activeForm }), !isMultiform && /* @__PURE__ */ React__namespace.createElement(FormHeader, { activeForm }), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, { key: meta.name }, /* @__PURE__ */ React__namespace.createElement(meta.Component, null))), /* @__PURE__ */ React__namespace.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine })));
|
|
10399
|
+
};
|
|
10400
|
+
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
10401
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10402
|
+
"div",
|
|
10403
|
+
{
|
|
10404
|
+
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
10405
|
+
style: isEditing ? {
|
|
10406
|
+
transform: "none",
|
|
10407
|
+
animationName: "fly-in-left",
|
|
10408
|
+
animationDuration: "150ms",
|
|
10409
|
+
animationDelay: "0",
|
|
10410
|
+
animationIterationCount: 1,
|
|
10411
|
+
animationTimingFunction: "ease-out"
|
|
10412
|
+
} : {
|
|
10413
|
+
transform: "translate3d(100%, 0, 0)"
|
|
10414
|
+
}
|
|
10415
|
+
},
|
|
10416
|
+
children
|
|
10417
|
+
);
|
|
10418
|
+
};
|
|
10419
|
+
const MultiformFormHeader = ({
|
|
10420
|
+
activeForm
|
|
10421
|
+
}) => {
|
|
10422
|
+
const cms = useCMS$1();
|
|
10423
|
+
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
10424
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10425
|
+
"div",
|
|
10426
|
+
{
|
|
10427
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10428
|
+
},
|
|
10429
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10430
|
+
"button",
|
|
10431
|
+
{
|
|
10432
|
+
type: "button",
|
|
10433
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10434
|
+
onClick: () => {
|
|
10435
|
+
const state = activeForm.tinaForm.finalForm.getState();
|
|
10436
|
+
if (state.invalid === true) {
|
|
10437
|
+
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
10438
|
+
} else {
|
|
10439
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
10440
|
+
}
|
|
10441
|
+
}
|
|
10442
|
+
},
|
|
10443
|
+
/* @__PURE__ */ React__namespace.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10444
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
10445
|
+
"button",
|
|
10446
|
+
{
|
|
10447
|
+
type: "button",
|
|
10448
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10449
|
+
onClick: () => {
|
|
10450
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10451
|
+
cms.state.activeFormId
|
|
10452
|
+
).name;
|
|
10453
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10454
|
+
}
|
|
10455
|
+
},
|
|
10456
|
+
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10457
|
+
), /* @__PURE__ */ React__namespace.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, activeForm.tinaForm.label || activeForm.tinaForm.id), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
|
|
10458
|
+
);
|
|
10459
|
+
};
|
|
10460
|
+
const FormHeader = ({ activeForm }) => {
|
|
10461
|
+
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
10462
|
+
const cms = useCMS$1();
|
|
10463
|
+
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
10464
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10465
|
+
"div",
|
|
10466
|
+
{
|
|
10467
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10468
|
+
},
|
|
10469
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10470
|
+
"button",
|
|
10471
|
+
{
|
|
10472
|
+
type: "button",
|
|
10473
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10474
|
+
onClick: () => {
|
|
10475
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10476
|
+
cms.state.activeFormId
|
|
10477
|
+
).name;
|
|
10478
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10479
|
+
}
|
|
10480
|
+
},
|
|
10481
|
+
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10482
|
+
), shortFormLabel && /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
|
|
10483
|
+
);
|
|
10484
|
+
};
|
|
10424
10485
|
const SidebarContext = React__namespace.createContext(null);
|
|
10425
10486
|
const minPreviewWidth = 440;
|
|
10426
10487
|
const minSidebarWidth = 360;
|
|
@@ -10639,7 +10700,7 @@ flowchart TD
|
|
|
10639
10700
|
isLocalMode: (_d = (_c = cms.api) == null ? void 0 : _c.tina) == null ? void 0 : _d.isLocalMode,
|
|
10640
10701
|
branchingEnabled
|
|
10641
10702
|
}
|
|
10642
|
-
), /* @__PURE__ */ React__namespace.createElement(FormsView,
|
|
10703
|
+
), /* @__PURE__ */ React__namespace.createElement(FormsView, { loadingPlaceholder: sidebar.loadingPlaceholder }), activeScreen && /* @__PURE__ */ React__namespace.createElement(
|
|
10643
10704
|
ScreenPluginModal,
|
|
10644
10705
|
{
|
|
10645
10706
|
screen: activeScreen,
|
|
@@ -10815,7 +10876,7 @@ flowchart TD
|
|
|
10815
10876
|
className: "h-5 w-auto -mx-1 text-blue-500",
|
|
10816
10877
|
stroke: "currentColor",
|
|
10817
10878
|
fill: "currentColor",
|
|
10818
|
-
|
|
10879
|
+
strokeWidth: "0",
|
|
10819
10880
|
viewBox: "0 0 24 24",
|
|
10820
10881
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10821
10882
|
},
|
|
@@ -10955,6 +11016,93 @@ flowchart TD
|
|
|
10955
11016
|
);
|
|
10956
11017
|
};
|
|
10957
11018
|
}
|
|
11019
|
+
function dirname(path) {
|
|
11020
|
+
var _a, _b;
|
|
11021
|
+
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11022
|
+
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11023
|
+
}
|
|
11024
|
+
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
11025
|
+
"button",
|
|
11026
|
+
{
|
|
11027
|
+
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11028
|
+
...props
|
|
11029
|
+
}
|
|
11030
|
+
);
|
|
11031
|
+
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11032
|
+
directory = directory.replace(/^\/|\/$/g, "");
|
|
11033
|
+
let prevDir = dirname(directory) || "";
|
|
11034
|
+
if (prevDir === ".") {
|
|
11035
|
+
prevDir = "";
|
|
11036
|
+
}
|
|
11037
|
+
return /* @__PURE__ */ React.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React.createElement(
|
|
11038
|
+
IconButton,
|
|
11039
|
+
{
|
|
11040
|
+
variant: "ghost",
|
|
11041
|
+
className: "mr-2",
|
|
11042
|
+
onClick: () => setDirectory(prevDir)
|
|
11043
|
+
},
|
|
11044
|
+
/* @__PURE__ */ React.createElement(
|
|
11045
|
+
LeftArrowIcon,
|
|
11046
|
+
{
|
|
11047
|
+
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11048
|
+
}
|
|
11049
|
+
)
|
|
11050
|
+
), /* @__PURE__ */ React.createElement(
|
|
11051
|
+
BreadcrumbButton,
|
|
11052
|
+
{
|
|
11053
|
+
onClick: () => setDirectory(""),
|
|
11054
|
+
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11055
|
+
},
|
|
11056
|
+
"Media"
|
|
11057
|
+
), directory && directory.split("/").map((part, index, parts) => {
|
|
11058
|
+
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11059
|
+
return /* @__PURE__ */ React.createElement(
|
|
11060
|
+
BreadcrumbButton,
|
|
11061
|
+
{
|
|
11062
|
+
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11063
|
+
key: currentDir,
|
|
11064
|
+
onClick: () => {
|
|
11065
|
+
setDirectory(currentDir);
|
|
11066
|
+
}
|
|
11067
|
+
},
|
|
11068
|
+
part
|
|
11069
|
+
);
|
|
11070
|
+
}));
|
|
11071
|
+
}
|
|
11072
|
+
const CopyField = ({ label, description, value }) => {
|
|
11073
|
+
const [copied, setCopied] = React.useState(false);
|
|
11074
|
+
const [fadeOut, setFadeOut] = React.useState(false);
|
|
11075
|
+
return /* @__PURE__ */ React.createElement("div", { className: "w-full" }, label && /* @__PURE__ */ React.createElement("label", { className: "w-full mb-1 block flex-1 text-sm font-bold leading-5 text-gray-700" }, label), /* @__PURE__ */ React.createElement(
|
|
11076
|
+
"span",
|
|
11077
|
+
{
|
|
11078
|
+
onClick: () => {
|
|
11079
|
+
if (copied === true)
|
|
11080
|
+
return;
|
|
11081
|
+
setCopied(true);
|
|
11082
|
+
setTimeout(() => {
|
|
11083
|
+
setFadeOut(true);
|
|
11084
|
+
}, 2500);
|
|
11085
|
+
setTimeout(() => {
|
|
11086
|
+
setCopied(false);
|
|
11087
|
+
setFadeOut(false);
|
|
11088
|
+
}, 3e3);
|
|
11089
|
+
navigator.clipboard.writeText(value);
|
|
11090
|
+
},
|
|
11091
|
+
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` : ``}`
|
|
11092
|
+
},
|
|
11093
|
+
/* @__PURE__ */ React.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11094
|
+
" ",
|
|
11095
|
+
value,
|
|
11096
|
+
" ",
|
|
11097
|
+
copied && /* @__PURE__ */ React.createElement(
|
|
11098
|
+
"span",
|
|
11099
|
+
{
|
|
11100
|
+
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`
|
|
11101
|
+
},
|
|
11102
|
+
/* @__PURE__ */ React.createElement("span", null, "Copied to clipboard!")
|
|
11103
|
+
)
|
|
11104
|
+
), description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11105
|
+
};
|
|
10958
11106
|
function ListMediaItem({ item, onClick, active }) {
|
|
10959
11107
|
let FileIcon = BiFile;
|
|
10960
11108
|
if (item.type === "dir") {
|
|
@@ -11030,59 +11178,6 @@ flowchart TD
|
|
|
11030
11178
|
)
|
|
11031
11179
|
);
|
|
11032
11180
|
}
|
|
11033
|
-
function dirname(path) {
|
|
11034
|
-
var _a, _b;
|
|
11035
|
-
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11036
|
-
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11037
|
-
}
|
|
11038
|
-
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
11039
|
-
"button",
|
|
11040
|
-
{
|
|
11041
|
-
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11042
|
-
...props
|
|
11043
|
-
}
|
|
11044
|
-
);
|
|
11045
|
-
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11046
|
-
directory = directory.replace(/^\/|\/$/g, "");
|
|
11047
|
-
let prevDir = dirname(directory) || "";
|
|
11048
|
-
if (prevDir === ".") {
|
|
11049
|
-
prevDir = "";
|
|
11050
|
-
}
|
|
11051
|
-
return /* @__PURE__ */ React.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React.createElement(
|
|
11052
|
-
IconButton,
|
|
11053
|
-
{
|
|
11054
|
-
variant: "ghost",
|
|
11055
|
-
className: "mr-2",
|
|
11056
|
-
onClick: () => setDirectory(prevDir)
|
|
11057
|
-
},
|
|
11058
|
-
/* @__PURE__ */ React.createElement(
|
|
11059
|
-
LeftArrowIcon,
|
|
11060
|
-
{
|
|
11061
|
-
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11062
|
-
}
|
|
11063
|
-
)
|
|
11064
|
-
), /* @__PURE__ */ React.createElement(
|
|
11065
|
-
BreadcrumbButton,
|
|
11066
|
-
{
|
|
11067
|
-
onClick: () => setDirectory(""),
|
|
11068
|
-
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11069
|
-
},
|
|
11070
|
-
"Media"
|
|
11071
|
-
), directory && directory.split("/").map((part, index, parts) => {
|
|
11072
|
-
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11073
|
-
return /* @__PURE__ */ React.createElement(
|
|
11074
|
-
BreadcrumbButton,
|
|
11075
|
-
{
|
|
11076
|
-
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11077
|
-
key: currentDir,
|
|
11078
|
-
onClick: () => {
|
|
11079
|
-
setDirectory(currentDir);
|
|
11080
|
-
}
|
|
11081
|
-
},
|
|
11082
|
-
part
|
|
11083
|
-
);
|
|
11084
|
-
}));
|
|
11085
|
-
}
|
|
11086
11181
|
const DeleteModal$1 = ({
|
|
11087
11182
|
close: close2,
|
|
11088
11183
|
deleteFunc,
|
|
@@ -11136,40 +11231,6 @@ flowchart TD
|
|
|
11136
11231
|
"Create New Folder"
|
|
11137
11232
|
))));
|
|
11138
11233
|
};
|
|
11139
|
-
const CopyField = ({ label, description, value }) => {
|
|
11140
|
-
const [copied, setCopied] = React.useState(false);
|
|
11141
|
-
const [fadeOut, setFadeOut] = React.useState(false);
|
|
11142
|
-
return /* @__PURE__ */ React.createElement("div", { className: "w-full" }, label && /* @__PURE__ */ React.createElement("label", { className: "w-full mb-1 block flex-1 text-sm font-bold leading-5 text-gray-700" }, label), /* @__PURE__ */ React.createElement(
|
|
11143
|
-
"span",
|
|
11144
|
-
{
|
|
11145
|
-
onClick: () => {
|
|
11146
|
-
if (copied === true)
|
|
11147
|
-
return;
|
|
11148
|
-
setCopied(true);
|
|
11149
|
-
setTimeout(() => {
|
|
11150
|
-
setFadeOut(true);
|
|
11151
|
-
}, 2500);
|
|
11152
|
-
setTimeout(() => {
|
|
11153
|
-
setCopied(false);
|
|
11154
|
-
setFadeOut(false);
|
|
11155
|
-
}, 3e3);
|
|
11156
|
-
navigator.clipboard.writeText(value);
|
|
11157
|
-
},
|
|
11158
|
-
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` : ``}`
|
|
11159
|
-
},
|
|
11160
|
-
/* @__PURE__ */ React.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11161
|
-
" ",
|
|
11162
|
-
value,
|
|
11163
|
-
" ",
|
|
11164
|
-
copied && /* @__PURE__ */ React.createElement(
|
|
11165
|
-
"span",
|
|
11166
|
-
{
|
|
11167
|
-
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`
|
|
11168
|
-
},
|
|
11169
|
-
/* @__PURE__ */ React.createElement("span", null, "Copied to clipboard!")
|
|
11170
|
-
)
|
|
11171
|
-
), description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11172
|
-
};
|
|
11173
11234
|
const { useDropzone } = dropzone__namespace;
|
|
11174
11235
|
const join = function(...parts) {
|
|
11175
11236
|
const [first, last, slash] = [0, parts.length - 1, "/"];
|
|
@@ -11405,7 +11466,10 @@ flowchart TD
|
|
|
11405
11466
|
const observer = new IntersectionObserver((entries) => {
|
|
11406
11467
|
const target = entries[0];
|
|
11407
11468
|
if (target.isIntersecting && list.nextOffset) {
|
|
11408
|
-
setOffsetHistory((offsetHistory2) => [
|
|
11469
|
+
setOffsetHistory((offsetHistory2) => [
|
|
11470
|
+
...offsetHistory2,
|
|
11471
|
+
list.nextOffset
|
|
11472
|
+
]);
|
|
11409
11473
|
}
|
|
11410
11474
|
});
|
|
11411
11475
|
if (loaderRef.current) {
|
|
@@ -11668,7 +11732,7 @@ flowchart TD
|
|
|
11668
11732
|
target: "_blank",
|
|
11669
11733
|
href: `${cms.api.tina.appDashboardLink}/media`
|
|
11670
11734
|
},
|
|
11671
|
-
"Sync Your Media In
|
|
11735
|
+
"Sync Your Media In TinaCloud.",
|
|
11672
11736
|
/* @__PURE__ */ React.createElement(BiLinkExternal, { className: `w-5 h-auto flex-shrink-0` })
|
|
11673
11737
|
)
|
|
11674
11738
|
)))) : /* @__PURE__ */ React.createElement(SyncStatusContext.Provider, { value: { syncStatus } }, children);
|
|
@@ -12000,6 +12064,7 @@ flowchart TD
|
|
|
12000
12064
|
forms: [],
|
|
12001
12065
|
formLists: [],
|
|
12002
12066
|
editingMode: "basic",
|
|
12067
|
+
isLoadingContent: false,
|
|
12003
12068
|
quickEditSupported: false,
|
|
12004
12069
|
sidebarDisplayState: ((_a = cms == null ? void 0 : cms.sidebar) == null ? void 0 : _a.defaultState) || "open"
|
|
12005
12070
|
};
|
|
@@ -12059,7 +12124,12 @@ flowchart TD
|
|
|
12059
12124
|
}
|
|
12060
12125
|
});
|
|
12061
12126
|
}
|
|
12062
|
-
return {
|
|
12127
|
+
return {
|
|
12128
|
+
...state,
|
|
12129
|
+
activeFormId,
|
|
12130
|
+
formLists: nextFormLists,
|
|
12131
|
+
isLoadingContent: false
|
|
12132
|
+
};
|
|
12063
12133
|
}
|
|
12064
12134
|
case "form-lists:remove": {
|
|
12065
12135
|
const nextFormLists = state.formLists.filter(
|
|
@@ -12128,6 +12198,9 @@ flowchart TD
|
|
|
12128
12198
|
}
|
|
12129
12199
|
return { ...state, sidebarDisplayState: action.value };
|
|
12130
12200
|
}
|
|
12201
|
+
case "sidebar:set-loading-state": {
|
|
12202
|
+
return { ...state, isLoadingContent: action.value };
|
|
12203
|
+
}
|
|
12131
12204
|
default:
|
|
12132
12205
|
throw new Error(`Unhandled action ${action.type}`);
|
|
12133
12206
|
}
|
|
@@ -12369,7 +12442,9 @@ flowchart TD
|
|
|
12369
12442
|
if (activeEle) {
|
|
12370
12443
|
setDisplay(true);
|
|
12371
12444
|
setPosition(activeEle.getBoundingClientRect());
|
|
12372
|
-
const iframe = document.getElementById(
|
|
12445
|
+
const iframe = document.getElementById(
|
|
12446
|
+
"tina-iframe"
|
|
12447
|
+
);
|
|
12373
12448
|
if (iframe) {
|
|
12374
12449
|
setIframePosition(iframe.getBoundingClientRect());
|
|
12375
12450
|
}
|
|
@@ -12811,7 +12886,6 @@ flowchart TD
|
|
|
12811
12886
|
}) => {
|
|
12812
12887
|
const cms = useCMS$1();
|
|
12813
12888
|
const tinaApi = cms.api.tina;
|
|
12814
|
-
tinaApi.branch;
|
|
12815
12889
|
const [disabled, setDisabled] = React__namespace.useState(false);
|
|
12816
12890
|
const [newBranchName, setNewBranchName] = React__namespace.useState("");
|
|
12817
12891
|
const [error, setError] = React__namespace.useState("");
|
|
@@ -12837,10 +12911,10 @@ flowchart TD
|
|
|
12837
12911
|
const newUrl = window.location.href.replace(hash, newHash);
|
|
12838
12912
|
window.location.href = newUrl;
|
|
12839
12913
|
};
|
|
12840
|
-
return /* @__PURE__ */ React__namespace.createElement(Modal, null, /* @__PURE__ */ React__namespace.createElement(PopupModal, null, /* @__PURE__ */ React__namespace.createElement(ModalHeader, { close: close2 }, /* @__PURE__ */ React__namespace.createElement(BiGitBranch, { className: "w-6 h-auto mr-1 text-blue-500 opacity-70" }), " ", "Create Branch"), /* @__PURE__ */ React__namespace.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__namespace.createElement("p", { className: "text-
|
|
12914
|
+
return /* @__PURE__ */ React__namespace.createElement(Modal, null, /* @__PURE__ */ React__namespace.createElement(PopupModal, null, /* @__PURE__ */ React__namespace.createElement(ModalHeader, { close: close2 }, /* @__PURE__ */ React__namespace.createElement(BiGitBranch, { className: "w-6 h-auto mr-1 text-blue-500 opacity-70" }), " ", "Create Branch"), /* @__PURE__ */ React__namespace.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "This content is protected 🚧"), /* @__PURE__ */ React__namespace.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__namespace.createElement(
|
|
12841
12915
|
PrefixedTextField,
|
|
12842
12916
|
{
|
|
12843
|
-
placeholder: "
|
|
12917
|
+
placeholder: "e.g. {{PAGE-NAME}}-updates",
|
|
12844
12918
|
value: newBranchName,
|
|
12845
12919
|
onChange: (e) => {
|
|
12846
12920
|
setError("");
|
|
@@ -12987,7 +13061,9 @@ flowchart TD
|
|
|
12987
13061
|
const { fieldName } = useTemplates();
|
|
12988
13062
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
12989
13063
|
useHotkey("enter", () => {
|
|
12990
|
-
plateCommon.insertNodes(editor, [
|
|
13064
|
+
plateCommon.insertNodes(editor, [
|
|
13065
|
+
{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13066
|
+
]);
|
|
12991
13067
|
});
|
|
12992
13068
|
return /* @__PURE__ */ React.createElement("span", { ...attributes, className: "" }, children, element.url ? /* @__PURE__ */ React.createElement(
|
|
12993
13069
|
"div",
|
|
@@ -13130,7 +13206,9 @@ flowchart TD
|
|
|
13130
13206
|
const { templates, fieldName } = useTemplates();
|
|
13131
13207
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13132
13208
|
useHotkey("enter", () => {
|
|
13133
|
-
plateCommon.insertNodes(editor, [
|
|
13209
|
+
plateCommon.insertNodes(editor, [
|
|
13210
|
+
{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13211
|
+
]);
|
|
13134
13212
|
});
|
|
13135
13213
|
useHotkey("space", () => {
|
|
13136
13214
|
plateCommon.insertNodes(editor, [{ text: " " }], {
|
|
@@ -13186,7 +13264,9 @@ flowchart TD
|
|
|
13186
13264
|
const { templates, fieldName } = useTemplates();
|
|
13187
13265
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13188
13266
|
useHotkey("enter", () => {
|
|
13189
|
-
plateCommon.insertNodes(editor, [
|
|
13267
|
+
plateCommon.insertNodes(editor, [
|
|
13268
|
+
{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13269
|
+
]);
|
|
13190
13270
|
});
|
|
13191
13271
|
const activeTemplate = templates.find(
|
|
13192
13272
|
(template) => template.name === element.name
|
|
@@ -13532,6 +13612,11 @@ flowchart TD
|
|
|
13532
13612
|
mode: "mark",
|
|
13533
13613
|
type: plate.MARK_CODE,
|
|
13534
13614
|
match: "`"
|
|
13615
|
+
},
|
|
13616
|
+
{
|
|
13617
|
+
mode: "mark",
|
|
13618
|
+
type: plate.MARK_STRIKETHROUGH,
|
|
13619
|
+
match: ["~~", "~"]
|
|
13535
13620
|
}
|
|
13536
13621
|
];
|
|
13537
13622
|
const autoformatRules = [
|
|
@@ -13673,16 +13758,14 @@ flowchart TD
|
|
|
13673
13758
|
})
|
|
13674
13759
|
];
|
|
13675
13760
|
const plugins = [
|
|
13761
|
+
plate.createBasicMarksPlugin(),
|
|
13676
13762
|
plate.createHeadingPlugin(),
|
|
13677
13763
|
plate.createParagraphPlugin(),
|
|
13678
13764
|
createCodeBlockPlugin(),
|
|
13679
13765
|
createHTMLBlockPlugin(),
|
|
13680
13766
|
createHTMLInlinePlugin(),
|
|
13681
13767
|
plate.createBlockquotePlugin(),
|
|
13682
|
-
plate.createBoldPlugin(),
|
|
13683
|
-
plate.createItalicPlugin(),
|
|
13684
13768
|
plate.createUnderlinePlugin(),
|
|
13685
|
-
plate.createCodePlugin(),
|
|
13686
13769
|
plate.createListPlugin(),
|
|
13687
13770
|
plate.createIndentListPlugin(),
|
|
13688
13771
|
plate.createHorizontalRulePlugin(),
|
|
@@ -14042,7 +14125,9 @@ flowchart TD
|
|
|
14042
14125
|
const CONTAINER_MD_BREAKPOINT = 448;
|
|
14043
14126
|
const FLOAT_BUTTON_WIDTH = 25;
|
|
14044
14127
|
const HEADING_LABEL = "Headings";
|
|
14045
|
-
const ToolbarContext = React.createContext(
|
|
14128
|
+
const ToolbarContext = React.createContext(
|
|
14129
|
+
void 0
|
|
14130
|
+
);
|
|
14046
14131
|
const ToolbarProvider = ({
|
|
14047
14132
|
tinaForm,
|
|
14048
14133
|
templates,
|
|
@@ -14192,7 +14277,7 @@ flowchart TD
|
|
|
14192
14277
|
const CodeBlockToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14193
14278
|
const state = useCodeBlockToolbarButtonState();
|
|
14194
14279
|
const { props } = useCodeBlockToolbarButton(state);
|
|
14195
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "
|
|
14280
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Code Block", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.codeBlock, null));
|
|
14196
14281
|
});
|
|
14197
14282
|
const useImageToolbarButtonState = () => {
|
|
14198
14283
|
const editor = plateCommon.useEditorState();
|
|
@@ -14224,36 +14309,54 @@ flowchart TD
|
|
|
14224
14309
|
const ImageToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14225
14310
|
const state = useImageToolbarButtonState();
|
|
14226
14311
|
const { props } = useImageToolbarButton(state);
|
|
14227
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "
|
|
14228
|
-
});
|
|
14229
|
-
const IndentListToolbarButton = cn$1.withRef(({ nodeType = plate.ELEMENT_UL }, ref) => {
|
|
14230
|
-
const editor = plateCommon.useEditorState();
|
|
14231
|
-
const state = plate.useListToolbarButtonState({ nodeType });
|
|
14232
|
-
const { props } = plate.useListToolbarButton(state);
|
|
14233
|
-
return /* @__PURE__ */ React.createElement(
|
|
14234
|
-
ToolbarButton,
|
|
14235
|
-
{
|
|
14236
|
-
ref,
|
|
14237
|
-
tooltip: nodeType === plate.ELEMENT_UL ? "Bulleted List" : "Numbered List",
|
|
14238
|
-
...props,
|
|
14239
|
-
onClick: (e) => {
|
|
14240
|
-
e.preventDefault();
|
|
14241
|
-
e.stopPropagation();
|
|
14242
|
-
plate.toggleList(editor, { type: nodeType });
|
|
14243
|
-
}
|
|
14244
|
-
},
|
|
14245
|
-
nodeType === plate.ELEMENT_UL ? /* @__PURE__ */ React.createElement(Icons.ul, null) : /* @__PURE__ */ React.createElement(Icons.ol, null)
|
|
14246
|
-
);
|
|
14312
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Image", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.image, null));
|
|
14247
14313
|
});
|
|
14314
|
+
const UnorderedListToolbarButton = cn$1.withRef(
|
|
14315
|
+
(props, ref) => {
|
|
14316
|
+
const editor = plateCommon.useEditorState();
|
|
14317
|
+
const state = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_UL });
|
|
14318
|
+
const { props: buttonProps } = plate.useListToolbarButton(state);
|
|
14319
|
+
return /* @__PURE__ */ React.createElement(
|
|
14320
|
+
ToolbarButton,
|
|
14321
|
+
{
|
|
14322
|
+
ref,
|
|
14323
|
+
tooltip: "Bulleted List",
|
|
14324
|
+
...buttonProps,
|
|
14325
|
+
onClick: (e) => {
|
|
14326
|
+
e.preventDefault();
|
|
14327
|
+
e.stopPropagation();
|
|
14328
|
+
plate.toggleList(editor, { type: plate.ELEMENT_UL });
|
|
14329
|
+
}
|
|
14330
|
+
},
|
|
14331
|
+
/* @__PURE__ */ React.createElement(Icons.ul, null)
|
|
14332
|
+
);
|
|
14333
|
+
}
|
|
14334
|
+
);
|
|
14335
|
+
const OrderedListToolbarButton = cn$1.withRef(
|
|
14336
|
+
(props, ref) => {
|
|
14337
|
+
const editor = plateCommon.useEditorState();
|
|
14338
|
+
const state = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_OL });
|
|
14339
|
+
const { props: buttonProps } = plate.useListToolbarButton(state);
|
|
14340
|
+
return /* @__PURE__ */ React.createElement(
|
|
14341
|
+
ToolbarButton,
|
|
14342
|
+
{
|
|
14343
|
+
ref,
|
|
14344
|
+
tooltip: "Numbered List",
|
|
14345
|
+
...buttonProps,
|
|
14346
|
+
onClick: (e) => {
|
|
14347
|
+
e.preventDefault();
|
|
14348
|
+
e.stopPropagation();
|
|
14349
|
+
plate.toggleList(editor, { type: plate.ELEMENT_OL });
|
|
14350
|
+
}
|
|
14351
|
+
},
|
|
14352
|
+
/* @__PURE__ */ React.createElement(Icons.ol, null)
|
|
14353
|
+
);
|
|
14354
|
+
}
|
|
14355
|
+
);
|
|
14248
14356
|
const LinkToolbarButton = cn$1.withRef((rest, ref) => {
|
|
14249
14357
|
const state = plateLink.useLinkToolbarButtonState();
|
|
14250
14358
|
const { props } = plateLink.useLinkToolbarButton(state);
|
|
14251
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link"
|
|
14252
|
-
});
|
|
14253
|
-
const MarkToolbarButton = cn$1.withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14254
|
-
const state = plateCommon.useMarkToolbarButtonState({ clear, nodeType });
|
|
14255
|
-
const { props } = plateCommon.useMarkToolbarButton(state);
|
|
14256
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14359
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest, tooltip: "Link" }, /* @__PURE__ */ React.createElement(Icons.link, null));
|
|
14257
14360
|
});
|
|
14258
14361
|
const useMermaidToolbarButtonState = () => {
|
|
14259
14362
|
const editor = plateCommon.useEditorState();
|
|
@@ -14334,7 +14437,7 @@ flowchart TD
|
|
|
14334
14437
|
const QuoteToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14335
14438
|
const state = useBlockQuoteToolbarButtonState();
|
|
14336
14439
|
const { props } = useBlockQuoteToolbarButton(state);
|
|
14337
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "
|
|
14440
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Quote (⌘+⇧+.)", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.quote, null));
|
|
14338
14441
|
});
|
|
14339
14442
|
const useRawMarkdownToolbarButton = () => {
|
|
14340
14443
|
const { setRawMode } = useEditorContext();
|
|
@@ -14354,7 +14457,7 @@ flowchart TD
|
|
|
14354
14457
|
ToolbarButton,
|
|
14355
14458
|
{
|
|
14356
14459
|
ref,
|
|
14357
|
-
tooltip: "
|
|
14460
|
+
tooltip: "Raw Markdown",
|
|
14358
14461
|
...rest,
|
|
14359
14462
|
...props,
|
|
14360
14463
|
"data-testid": "markdown-button"
|
|
@@ -14499,7 +14602,7 @@ flowchart TD
|
|
|
14499
14602
|
key: template.name,
|
|
14500
14603
|
onMouseDown: (e) => {
|
|
14501
14604
|
e.preventDefault();
|
|
14502
|
-
|
|
14605
|
+
setOpen(false);
|
|
14503
14606
|
insertMDX(editor, template);
|
|
14504
14607
|
},
|
|
14505
14608
|
className: ""
|
|
@@ -14507,6 +14610,15 @@ flowchart TD
|
|
|
14507
14610
|
template.label || template.name
|
|
14508
14611
|
))));
|
|
14509
14612
|
};
|
|
14613
|
+
const MarkToolbarButton = cn$1.withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14614
|
+
const state = plateCommon.useMarkToolbarButtonState({ clear, nodeType });
|
|
14615
|
+
const { props } = plateCommon.useMarkToolbarButton(state);
|
|
14616
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14617
|
+
});
|
|
14618
|
+
const BoldToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: plate.MARK_BOLD }, /* @__PURE__ */ React.createElement(Icons.bold, null));
|
|
14619
|
+
const StrikethroughToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Strikethrough", nodeType: plate.MARK_STRIKETHROUGH }, /* @__PURE__ */ React.createElement(Icons.strikethrough, null));
|
|
14620
|
+
const ItalicToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: plate.MARK_ITALIC }, /* @__PURE__ */ React.createElement(Icons.italic, null));
|
|
14621
|
+
const CodeToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: plate.MARK_CODE }, /* @__PURE__ */ React.createElement(Icons.code, null));
|
|
14510
14622
|
const toolbarItems = {
|
|
14511
14623
|
heading: {
|
|
14512
14624
|
label: HEADING_LABEL,
|
|
@@ -14527,32 +14639,37 @@ flowchart TD
|
|
|
14527
14639
|
quote: {
|
|
14528
14640
|
label: "Quote",
|
|
14529
14641
|
width: () => STANDARD_ICON_WIDTH,
|
|
14530
|
-
Component: /* @__PURE__ */ React.createElement(QuoteToolbarButton,
|
|
14642
|
+
Component: /* @__PURE__ */ React.createElement(QuoteToolbarButton, null)
|
|
14531
14643
|
},
|
|
14532
14644
|
ul: {
|
|
14533
14645
|
label: "Unordered List",
|
|
14534
14646
|
width: () => STANDARD_ICON_WIDTH,
|
|
14535
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14647
|
+
Component: /* @__PURE__ */ React.createElement(UnorderedListToolbarButton, null)
|
|
14536
14648
|
},
|
|
14537
14649
|
ol: {
|
|
14538
14650
|
label: "Ordered List",
|
|
14539
14651
|
width: () => STANDARD_ICON_WIDTH,
|
|
14540
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14652
|
+
Component: /* @__PURE__ */ React.createElement(OrderedListToolbarButton, null)
|
|
14541
14653
|
},
|
|
14542
14654
|
bold: {
|
|
14543
14655
|
label: "Bold",
|
|
14544
14656
|
width: () => STANDARD_ICON_WIDTH,
|
|
14545
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14657
|
+
Component: /* @__PURE__ */ React.createElement(BoldToolbarButton, null)
|
|
14658
|
+
},
|
|
14659
|
+
strikethrough: {
|
|
14660
|
+
label: "Strikethrough",
|
|
14661
|
+
width: () => STANDARD_ICON_WIDTH,
|
|
14662
|
+
Component: /* @__PURE__ */ React.createElement(StrikethroughToolbarButton, null)
|
|
14546
14663
|
},
|
|
14547
14664
|
italic: {
|
|
14548
14665
|
label: "Italic",
|
|
14549
14666
|
width: () => STANDARD_ICON_WIDTH,
|
|
14550
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14667
|
+
Component: /* @__PURE__ */ React.createElement(ItalicToolbarButton, null)
|
|
14551
14668
|
},
|
|
14552
14669
|
code: {
|
|
14553
14670
|
label: "Code",
|
|
14554
14671
|
width: () => STANDARD_ICON_WIDTH,
|
|
14555
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14672
|
+
Component: /* @__PURE__ */ React.createElement(CodeToolbarButton, null)
|
|
14556
14673
|
},
|
|
14557
14674
|
codeBlock: {
|
|
14558
14675
|
label: "Code Block",
|
|
@@ -14585,7 +14702,12 @@ flowchart TD
|
|
|
14585
14702
|
const [itemsShown, setItemsShown] = React.useState(11);
|
|
14586
14703
|
const { overrides, templates } = useToolbarContext();
|
|
14587
14704
|
const showEmbedButton = templates.length > 0;
|
|
14588
|
-
let items2 =
|
|
14705
|
+
let items2 = [];
|
|
14706
|
+
if (Array.isArray(overrides)) {
|
|
14707
|
+
items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14708
|
+
} else {
|
|
14709
|
+
items2 = (overrides == null ? void 0 : overrides.toolbar) === void 0 ? Object.values(toolbarItems) : overrides.toolbar.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14710
|
+
}
|
|
14589
14711
|
if (!showEmbedButton) {
|
|
14590
14712
|
items2 = items2.filter((item) => item.label !== toolbarItems.embed.label);
|
|
14591
14713
|
}
|
|
@@ -14913,6 +15035,9 @@ flowchart TD
|
|
|
14913
15035
|
if (typeof string !== "string") {
|
|
14914
15036
|
return false;
|
|
14915
15037
|
}
|
|
15038
|
+
if (string.startsWith("#")) {
|
|
15039
|
+
return true;
|
|
15040
|
+
}
|
|
14916
15041
|
const generalMatch = string.match(protocolAndDomainRE);
|
|
14917
15042
|
const emailLinkMatch = string.match(emailLintRE);
|
|
14918
15043
|
const localUrlMatch = string.match(localUrlRE);
|
|
@@ -14934,12 +15059,12 @@ flowchart TD
|
|
|
14934
15059
|
}
|
|
14935
15060
|
return localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol);
|
|
14936
15061
|
};
|
|
14937
|
-
const RichEditor = (
|
|
15062
|
+
const RichEditor = ({ input, tinaForm, field }) => {
|
|
14938
15063
|
var _a;
|
|
14939
15064
|
const initialValue = React.useMemo(
|
|
14940
15065
|
() => {
|
|
14941
15066
|
var _a2, _b;
|
|
14942
|
-
return ((_b = (_a2 =
|
|
15067
|
+
return ((_b = (_a2 = input.value) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) ? input.value.children.map(helpers.normalize) : [{ type: "p", children: [{ type: "text", text: "" }] }];
|
|
14943
15068
|
},
|
|
14944
15069
|
[]
|
|
14945
15070
|
);
|
|
@@ -14967,7 +15092,7 @@ flowchart TD
|
|
|
14967
15092
|
),
|
|
14968
15093
|
[]
|
|
14969
15094
|
);
|
|
14970
|
-
const tempId = [
|
|
15095
|
+
const tempId = [tinaForm.id, input.name].join(".");
|
|
14971
15096
|
const id = React.useMemo(() => uuid() + tempId, [tempId]);
|
|
14972
15097
|
const ref = React.useRef(null);
|
|
14973
15098
|
React.useEffect(() => {
|
|
@@ -14977,13 +15102,13 @@ flowchart TD
|
|
|
14977
15102
|
const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
|
|
14978
15103
|
'[role="textbox"]'
|
|
14979
15104
|
);
|
|
14980
|
-
if (
|
|
15105
|
+
if (field.experimental_focusIntent && plateElement) {
|
|
14981
15106
|
if (plateElement)
|
|
14982
15107
|
plateElement.focus();
|
|
14983
15108
|
}
|
|
14984
15109
|
}, 100);
|
|
14985
15110
|
}
|
|
14986
|
-
}, [
|
|
15111
|
+
}, [field.experimental_focusIntent, ref]);
|
|
14987
15112
|
return /* @__PURE__ */ React.createElement("div", { ref }, /* @__PURE__ */ React.createElement(
|
|
14988
15113
|
plateCommon.Plate,
|
|
14989
15114
|
{
|
|
@@ -14991,7 +15116,7 @@ flowchart TD
|
|
|
14991
15116
|
initialValue,
|
|
14992
15117
|
plugins: plugins$2,
|
|
14993
15118
|
onChange: (value) => {
|
|
14994
|
-
|
|
15119
|
+
input.onChange({
|
|
14995
15120
|
type: "root",
|
|
14996
15121
|
children: value
|
|
14997
15122
|
});
|
|
@@ -15000,12 +15125,12 @@ flowchart TD
|
|
|
15000
15125
|
/* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(
|
|
15001
15126
|
ToolbarProvider,
|
|
15002
15127
|
{
|
|
15003
|
-
tinaForm
|
|
15004
|
-
templates:
|
|
15005
|
-
overrides: (
|
|
15128
|
+
tinaForm,
|
|
15129
|
+
templates: field.templates,
|
|
15130
|
+
overrides: (field == null ? void 0 : field.toolbarOverride) ? field.toolbarOverride : field.overrides
|
|
15006
15131
|
},
|
|
15007
15132
|
/* @__PURE__ */ React.createElement(FixedToolbar, null, /* @__PURE__ */ React.createElement(FixedToolbarButtons, null)),
|
|
15008
|
-
/* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null))
|
|
15133
|
+
((_a = field == null ? void 0 : field.overrides) == null ? void 0 : _a.showFloatingToolbar) !== false ? /* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null)) : null
|
|
15009
15134
|
), /* @__PURE__ */ React.createElement(Editor, null))
|
|
15010
15135
|
));
|
|
15011
15136
|
};
|
|
@@ -16193,132 +16318,1209 @@ flowchart TD
|
|
|
16193
16318
|
"হয়"
|
|
16194
16319
|
];
|
|
16195
16320
|
const bre = [
|
|
16321
|
+
"'blam",
|
|
16322
|
+
"'d",
|
|
16323
|
+
"'m",
|
|
16324
|
+
"'r",
|
|
16325
|
+
"'ta",
|
|
16326
|
+
"'vat",
|
|
16327
|
+
"'z",
|
|
16328
|
+
"'zo",
|
|
16196
16329
|
"a",
|
|
16197
|
-
"
|
|
16198
|
-
"
|
|
16199
|
-
"
|
|
16200
|
-
"
|
|
16201
|
-
"
|
|
16202
|
-
"
|
|
16203
|
-
"
|
|
16204
|
-
"
|
|
16205
|
-
"
|
|
16206
|
-
"
|
|
16207
|
-
"
|
|
16208
|
-
"
|
|
16209
|
-
"
|
|
16210
|
-
"
|
|
16211
|
-
"
|
|
16212
|
-
"
|
|
16213
|
-
"
|
|
16214
|
-
"
|
|
16215
|
-
"
|
|
16216
|
-
"
|
|
16217
|
-
"
|
|
16330
|
+
"a:",
|
|
16331
|
+
"aba",
|
|
16332
|
+
"abalamour",
|
|
16333
|
+
"abaoe",
|
|
16334
|
+
"ac'hane",
|
|
16335
|
+
"ac'hanoc'h",
|
|
16336
|
+
"ac'hanomp",
|
|
16337
|
+
"ac'hanon",
|
|
16338
|
+
"ac'hanout",
|
|
16339
|
+
"adal",
|
|
16340
|
+
"adalek",
|
|
16341
|
+
"adarre",
|
|
16342
|
+
"ae",
|
|
16343
|
+
"aec'h",
|
|
16344
|
+
"aed",
|
|
16345
|
+
"aemp",
|
|
16346
|
+
"aen",
|
|
16347
|
+
"aent",
|
|
16348
|
+
"aes",
|
|
16349
|
+
"afe",
|
|
16350
|
+
"afec'h",
|
|
16351
|
+
"afed",
|
|
16352
|
+
"afemp",
|
|
16353
|
+
"afen",
|
|
16354
|
+
"afent",
|
|
16355
|
+
"afes",
|
|
16356
|
+
"ag",
|
|
16357
|
+
"ah",
|
|
16358
|
+
"aimp",
|
|
16359
|
+
"aint",
|
|
16360
|
+
"aio",
|
|
16361
|
+
"aiou",
|
|
16362
|
+
"aje",
|
|
16363
|
+
"ajec'h",
|
|
16364
|
+
"ajed",
|
|
16365
|
+
"ajemp",
|
|
16366
|
+
"ajen",
|
|
16367
|
+
"ajent",
|
|
16368
|
+
"ajes",
|
|
16369
|
+
"al",
|
|
16370
|
+
"alato",
|
|
16371
|
+
"alies",
|
|
16372
|
+
"aliesañ",
|
|
16373
|
+
"alkent",
|
|
16374
|
+
"all",
|
|
16375
|
+
"allas",
|
|
16376
|
+
"allo",
|
|
16377
|
+
"allô",
|
|
16378
|
+
"am",
|
|
16379
|
+
"amañ",
|
|
16380
|
+
"amzer",
|
|
16381
|
+
"an",
|
|
16382
|
+
"anezhañ",
|
|
16383
|
+
"anezhe",
|
|
16384
|
+
"anezhi",
|
|
16385
|
+
"anezho",
|
|
16386
|
+
"anvet",
|
|
16387
|
+
"aon",
|
|
16388
|
+
"aotren",
|
|
16389
|
+
"ar",
|
|
16390
|
+
"arall",
|
|
16391
|
+
"araok",
|
|
16392
|
+
"araoki",
|
|
16393
|
+
"araozañ",
|
|
16394
|
+
"araozo",
|
|
16395
|
+
"araozoc'h",
|
|
16396
|
+
"araozomp",
|
|
16397
|
+
"araozon",
|
|
16398
|
+
"araozor",
|
|
16399
|
+
"araozout",
|
|
16400
|
+
"arbenn",
|
|
16401
|
+
"arre",
|
|
16402
|
+
"atalek",
|
|
16403
|
+
"atav",
|
|
16404
|
+
"az",
|
|
16405
|
+
"azalek",
|
|
16406
|
+
"azirazañ",
|
|
16407
|
+
"azirazi",
|
|
16408
|
+
"azirazo",
|
|
16409
|
+
"azirazoc'h",
|
|
16410
|
+
"azirazomp",
|
|
16411
|
+
"azirazon",
|
|
16412
|
+
"azirazor",
|
|
16413
|
+
"azirazout",
|
|
16414
|
+
"b:",
|
|
16415
|
+
"ba",
|
|
16416
|
+
"ba'l",
|
|
16417
|
+
"ba'n",
|
|
16418
|
+
"ba'r",
|
|
16419
|
+
"bad",
|
|
16420
|
+
"bah",
|
|
16421
|
+
"bal",
|
|
16422
|
+
"ban",
|
|
16423
|
+
"bar",
|
|
16424
|
+
"bastañ",
|
|
16425
|
+
"befe",
|
|
16426
|
+
"bell",
|
|
16427
|
+
"benaos",
|
|
16428
|
+
"benn",
|
|
16429
|
+
"bennag",
|
|
16430
|
+
"bennak",
|
|
16431
|
+
"bennozh",
|
|
16432
|
+
"bep",
|
|
16433
|
+
"bepred",
|
|
16434
|
+
"berr",
|
|
16435
|
+
"berzh",
|
|
16436
|
+
"bet",
|
|
16437
|
+
"betek",
|
|
16438
|
+
"betra",
|
|
16439
|
+
"bev",
|
|
16440
|
+
"bevet",
|
|
16441
|
+
"bez",
|
|
16442
|
+
"bezañ",
|
|
16443
|
+
"beze",
|
|
16444
|
+
"bezent",
|
|
16445
|
+
"bezet",
|
|
16446
|
+
"bezh",
|
|
16447
|
+
"bezit",
|
|
16448
|
+
"bezomp",
|
|
16449
|
+
"bihan",
|
|
16450
|
+
"bije",
|
|
16451
|
+
"biou",
|
|
16452
|
+
"biskoazh",
|
|
16453
|
+
"blam",
|
|
16454
|
+
"bo",
|
|
16455
|
+
"boa",
|
|
16456
|
+
"bominapl",
|
|
16457
|
+
"boudoudom",
|
|
16458
|
+
"bouez",
|
|
16459
|
+
"boull",
|
|
16460
|
+
"boum",
|
|
16461
|
+
"bout",
|
|
16462
|
+
"bras",
|
|
16463
|
+
"brasañ",
|
|
16464
|
+
"brav",
|
|
16465
|
+
"bravo",
|
|
16466
|
+
"bremañ",
|
|
16467
|
+
"bres",
|
|
16468
|
+
"brokenn",
|
|
16469
|
+
"bronn",
|
|
16470
|
+
"brrr",
|
|
16471
|
+
"brutal",
|
|
16472
|
+
"buhezek",
|
|
16473
|
+
"c'h:",
|
|
16474
|
+
"c'haout",
|
|
16475
|
+
"c'he",
|
|
16476
|
+
"c'hem",
|
|
16477
|
+
"c'herz",
|
|
16478
|
+
"c'heñver",
|
|
16479
|
+
"c'hichen",
|
|
16480
|
+
"c'hiz",
|
|
16481
|
+
"c'hoazh",
|
|
16482
|
+
"c'horre",
|
|
16483
|
+
"c'houde",
|
|
16484
|
+
"c'houst",
|
|
16485
|
+
"c'hreiz",
|
|
16486
|
+
"c'hwec'h",
|
|
16487
|
+
"c'hwec'hvet",
|
|
16488
|
+
"c'hwezek",
|
|
16489
|
+
"c'hwi",
|
|
16490
|
+
"ch:",
|
|
16491
|
+
"chaous",
|
|
16492
|
+
"chik",
|
|
16493
|
+
"chit",
|
|
16494
|
+
"chom",
|
|
16495
|
+
"chut",
|
|
16496
|
+
"d'",
|
|
16497
|
+
"d'al",
|
|
16498
|
+
"d'an",
|
|
16499
|
+
"d'ar",
|
|
16500
|
+
"d'az",
|
|
16501
|
+
"d'e",
|
|
16502
|
+
"d'he",
|
|
16503
|
+
"d'ho",
|
|
16504
|
+
"d'hol",
|
|
16505
|
+
"d'hon",
|
|
16506
|
+
"d'hor",
|
|
16507
|
+
"d'o",
|
|
16508
|
+
"d'ober",
|
|
16509
|
+
"d'ul",
|
|
16510
|
+
"d'un",
|
|
16511
|
+
"d'ur",
|
|
16512
|
+
"d:",
|
|
16218
16513
|
"da",
|
|
16219
|
-
"
|
|
16220
|
-
"
|
|
16221
|
-
"
|
|
16222
|
-
"
|
|
16223
|
-
"
|
|
16224
|
-
"
|
|
16225
|
-
"
|
|
16226
|
-
"
|
|
16227
|
-
"
|
|
16228
|
-
"
|
|
16229
|
-
"
|
|
16230
|
-
"
|
|
16231
|
-
"
|
|
16232
|
-
"
|
|
16233
|
-
"
|
|
16514
|
+
"dak",
|
|
16515
|
+
"daka",
|
|
16516
|
+
"dal",
|
|
16517
|
+
"dalbezh",
|
|
16518
|
+
"dalc'hmat",
|
|
16519
|
+
"dalit",
|
|
16520
|
+
"damdost",
|
|
16521
|
+
"damheñvel",
|
|
16522
|
+
"damm",
|
|
16523
|
+
"dan",
|
|
16524
|
+
"danvez",
|
|
16525
|
+
"dao",
|
|
16526
|
+
"daol",
|
|
16527
|
+
"daonet",
|
|
16528
|
+
"daou",
|
|
16529
|
+
"daoust",
|
|
16530
|
+
"daouzek",
|
|
16531
|
+
"daouzekvet",
|
|
16532
|
+
"darn",
|
|
16533
|
+
"dastrewiñ",
|
|
16534
|
+
"dav",
|
|
16535
|
+
"davedoc'h",
|
|
16536
|
+
"davedomp",
|
|
16537
|
+
"davedon",
|
|
16538
|
+
"davedor",
|
|
16539
|
+
"davedout",
|
|
16540
|
+
"davet",
|
|
16541
|
+
"davetañ",
|
|
16542
|
+
"davete",
|
|
16543
|
+
"daveti",
|
|
16544
|
+
"daveto",
|
|
16545
|
+
"defe",
|
|
16546
|
+
"dehou",
|
|
16547
|
+
"dek",
|
|
16548
|
+
"dekvet",
|
|
16549
|
+
"den",
|
|
16550
|
+
"deoc'h",
|
|
16551
|
+
"deomp",
|
|
16552
|
+
"deor",
|
|
16553
|
+
"derc'hel",
|
|
16554
|
+
"deus",
|
|
16555
|
+
"dez",
|
|
16556
|
+
"deze",
|
|
16557
|
+
"dezhañ",
|
|
16558
|
+
"dezhe",
|
|
16559
|
+
"dezhi",
|
|
16560
|
+
"dezho",
|
|
16561
|
+
"di",
|
|
16562
|
+
"diabarzh",
|
|
16563
|
+
"diagent",
|
|
16564
|
+
"diar",
|
|
16565
|
+
"diaraok",
|
|
16566
|
+
"diavaez",
|
|
16567
|
+
"dibaoe",
|
|
16568
|
+
"dibaot",
|
|
16569
|
+
"dibar",
|
|
16570
|
+
"dic'halañ",
|
|
16571
|
+
"didiac'h",
|
|
16572
|
+
"dienn",
|
|
16573
|
+
"difer",
|
|
16574
|
+
"diganeoc'h",
|
|
16575
|
+
"diganeomp",
|
|
16576
|
+
"diganeor",
|
|
16577
|
+
"diganimp",
|
|
16578
|
+
"diganin",
|
|
16579
|
+
"diganit",
|
|
16580
|
+
"digant",
|
|
16581
|
+
"digantañ",
|
|
16582
|
+
"digante",
|
|
16583
|
+
"diganti",
|
|
16584
|
+
"diganto",
|
|
16585
|
+
"digemmesk",
|
|
16586
|
+
"diget",
|
|
16587
|
+
"digor",
|
|
16588
|
+
"digoret",
|
|
16589
|
+
"dija",
|
|
16590
|
+
"dije",
|
|
16591
|
+
"dimp",
|
|
16592
|
+
"din",
|
|
16593
|
+
"dinaou",
|
|
16594
|
+
"dindan",
|
|
16595
|
+
"dindanañ",
|
|
16596
|
+
"dindani",
|
|
16597
|
+
"dindano",
|
|
16598
|
+
"dindanoc'h",
|
|
16599
|
+
"dindanomp",
|
|
16600
|
+
"dindanon",
|
|
16601
|
+
"dindanor",
|
|
16602
|
+
"dindanout",
|
|
16603
|
+
"dioutañ",
|
|
16604
|
+
"dioute",
|
|
16605
|
+
"diouti",
|
|
16606
|
+
"diouto",
|
|
16607
|
+
"diouzh",
|
|
16608
|
+
"diouzhin",
|
|
16609
|
+
"diouzhit",
|
|
16610
|
+
"diouzhoc'h",
|
|
16611
|
+
"diouzhomp",
|
|
16612
|
+
"diouzhor",
|
|
16613
|
+
"dirak",
|
|
16614
|
+
"dirazañ",
|
|
16615
|
+
"dirazi",
|
|
16616
|
+
"dirazo",
|
|
16617
|
+
"dirazoc'h",
|
|
16618
|
+
"dirazomp",
|
|
16619
|
+
"dirazon",
|
|
16620
|
+
"dirazor",
|
|
16621
|
+
"dirazout",
|
|
16622
|
+
"disheñvel",
|
|
16623
|
+
"dispar",
|
|
16624
|
+
"distank",
|
|
16625
|
+
"dister",
|
|
16626
|
+
"disterañ",
|
|
16627
|
+
"disterig",
|
|
16628
|
+
"distro",
|
|
16629
|
+
"dit",
|
|
16630
|
+
"divaez",
|
|
16631
|
+
"diwar",
|
|
16632
|
+
"diwezhat",
|
|
16633
|
+
"diwezhañ",
|
|
16234
16634
|
"do",
|
|
16235
|
-
"
|
|
16236
|
-
"
|
|
16635
|
+
"doa",
|
|
16636
|
+
"doare",
|
|
16637
|
+
"dont",
|
|
16638
|
+
"dost",
|
|
16639
|
+
"doue",
|
|
16640
|
+
"douetus",
|
|
16641
|
+
"douez",
|
|
16642
|
+
"doug",
|
|
16643
|
+
"draou",
|
|
16644
|
+
"draoñ",
|
|
16645
|
+
"dre",
|
|
16646
|
+
"drede",
|
|
16647
|
+
"dreist",
|
|
16648
|
+
"dreistañ",
|
|
16649
|
+
"dreisti",
|
|
16650
|
+
"dreisto",
|
|
16651
|
+
"dreistoc'h",
|
|
16652
|
+
"dreistomp",
|
|
16653
|
+
"dreiston",
|
|
16654
|
+
"dreistor",
|
|
16655
|
+
"dreistout",
|
|
16656
|
+
"drek",
|
|
16657
|
+
"dreñv",
|
|
16658
|
+
"dring",
|
|
16659
|
+
"dro",
|
|
16660
|
+
"du",
|
|
16237
16661
|
"e",
|
|
16238
|
-
"
|
|
16239
|
-
"
|
|
16240
|
-
"
|
|
16241
|
-
"
|
|
16662
|
+
"e:",
|
|
16663
|
+
"eas",
|
|
16664
|
+
"ebet",
|
|
16665
|
+
"ec'h",
|
|
16666
|
+
"edo",
|
|
16667
|
+
"edoc'h",
|
|
16668
|
+
"edod",
|
|
16669
|
+
"edomp",
|
|
16670
|
+
"edon",
|
|
16671
|
+
"edont",
|
|
16672
|
+
"edos",
|
|
16673
|
+
"eer",
|
|
16674
|
+
"eeun",
|
|
16675
|
+
"efed",
|
|
16676
|
+
"egedoc'h",
|
|
16677
|
+
"egedomp",
|
|
16678
|
+
"egedon",
|
|
16679
|
+
"egedor",
|
|
16680
|
+
"egedout",
|
|
16681
|
+
"eget",
|
|
16682
|
+
"egetañ",
|
|
16683
|
+
"egete",
|
|
16684
|
+
"egeti",
|
|
16685
|
+
"egeto",
|
|
16686
|
+
"eh",
|
|
16687
|
+
"eil",
|
|
16688
|
+
"eilvet",
|
|
16689
|
+
"eizh",
|
|
16690
|
+
"eizhvet",
|
|
16691
|
+
"ejoc'h",
|
|
16692
|
+
"ejod",
|
|
16693
|
+
"ejomp",
|
|
16694
|
+
"ejont",
|
|
16695
|
+
"ejout",
|
|
16696
|
+
"el",
|
|
16242
16697
|
"em",
|
|
16243
|
-
"
|
|
16244
|
-
"
|
|
16245
|
-
"
|
|
16246
|
-
"
|
|
16247
|
-
"
|
|
16248
|
-
"
|
|
16249
|
-
"
|
|
16250
|
-
"
|
|
16251
|
-
"
|
|
16252
|
-
"
|
|
16698
|
+
"emaint",
|
|
16699
|
+
"emaoc'h",
|
|
16700
|
+
"emaomp",
|
|
16701
|
+
"emaon",
|
|
16702
|
+
"emaout",
|
|
16703
|
+
"emañ",
|
|
16704
|
+
"eme",
|
|
16705
|
+
"emeur",
|
|
16706
|
+
"emezañ",
|
|
16707
|
+
"emezi",
|
|
16708
|
+
"emezo",
|
|
16709
|
+
"emezoc'h",
|
|
16710
|
+
"emezomp",
|
|
16711
|
+
"emezon",
|
|
16712
|
+
"emezout",
|
|
16713
|
+
"emporzhiañ",
|
|
16714
|
+
"en",
|
|
16715
|
+
"end",
|
|
16716
|
+
"endan",
|
|
16717
|
+
"endra",
|
|
16718
|
+
"enep",
|
|
16719
|
+
"ennañ",
|
|
16720
|
+
"enni",
|
|
16721
|
+
"enno",
|
|
16722
|
+
"ennoc'h",
|
|
16723
|
+
"ennomp",
|
|
16724
|
+
"ennon",
|
|
16725
|
+
"ennor",
|
|
16726
|
+
"ennout",
|
|
16727
|
+
"enta",
|
|
16728
|
+
"eo",
|
|
16729
|
+
"eomp",
|
|
16730
|
+
"eont",
|
|
16731
|
+
"eor",
|
|
16732
|
+
"eot",
|
|
16733
|
+
"er",
|
|
16734
|
+
"erbet",
|
|
16735
|
+
"erfin",
|
|
16736
|
+
"esa",
|
|
16737
|
+
"esae",
|
|
16738
|
+
"espar",
|
|
16739
|
+
"estlamm",
|
|
16740
|
+
"estrañj",
|
|
16741
|
+
"eta",
|
|
16742
|
+
"etre",
|
|
16743
|
+
"etreoc'h",
|
|
16744
|
+
"etrezo",
|
|
16745
|
+
"etrezoc'h",
|
|
16746
|
+
"etrezomp",
|
|
16747
|
+
"etrezor",
|
|
16748
|
+
"euh",
|
|
16749
|
+
"eur",
|
|
16750
|
+
"eus",
|
|
16751
|
+
"evel",
|
|
16752
|
+
"evelato",
|
|
16753
|
+
"eveldoc'h",
|
|
16754
|
+
"eveldomp",
|
|
16755
|
+
"eveldon",
|
|
16756
|
+
"eveldor",
|
|
16757
|
+
"eveldout",
|
|
16758
|
+
"evelkent",
|
|
16759
|
+
"eveltañ",
|
|
16760
|
+
"evelte",
|
|
16761
|
+
"evelti",
|
|
16762
|
+
"evelto",
|
|
16763
|
+
"evidoc'h",
|
|
16764
|
+
"evidomp",
|
|
16765
|
+
"evidon",
|
|
16766
|
+
"evidor",
|
|
16767
|
+
"evidout",
|
|
16768
|
+
"evit",
|
|
16769
|
+
"evitañ",
|
|
16770
|
+
"evite",
|
|
16771
|
+
"eviti",
|
|
16772
|
+
"evito",
|
|
16773
|
+
"ez",
|
|
16774
|
+
"eñ",
|
|
16775
|
+
"f:",
|
|
16776
|
+
"fac'h",
|
|
16777
|
+
"fall",
|
|
16778
|
+
"fed",
|
|
16779
|
+
"feiz",
|
|
16780
|
+
"fenn",
|
|
16781
|
+
"fezh",
|
|
16782
|
+
"fin",
|
|
16783
|
+
"finsalvet",
|
|
16784
|
+
"foei",
|
|
16785
|
+
"fouilhezañ",
|
|
16786
|
+
"g:",
|
|
16787
|
+
"gallout",
|
|
16788
|
+
"ganeoc'h",
|
|
16789
|
+
"ganeomp",
|
|
16790
|
+
"ganin",
|
|
16791
|
+
"ganit",
|
|
16792
|
+
"gant",
|
|
16793
|
+
"gantañ",
|
|
16794
|
+
"ganti",
|
|
16795
|
+
"ganto",
|
|
16796
|
+
"gaout",
|
|
16797
|
+
"gast",
|
|
16798
|
+
"gein",
|
|
16799
|
+
"gellout",
|
|
16800
|
+
"genndost",
|
|
16801
|
+
"gentañ",
|
|
16802
|
+
"ger",
|
|
16803
|
+
"gerz",
|
|
16804
|
+
"get",
|
|
16805
|
+
"geñver",
|
|
16806
|
+
"gichen",
|
|
16807
|
+
"gin",
|
|
16808
|
+
"giz",
|
|
16809
|
+
"glan",
|
|
16810
|
+
"gloev",
|
|
16811
|
+
"goll",
|
|
16812
|
+
"gorre",
|
|
16813
|
+
"goude",
|
|
16814
|
+
"gouez",
|
|
16815
|
+
"gouezit",
|
|
16816
|
+
"gouezomp",
|
|
16817
|
+
"goulz",
|
|
16818
|
+
"gounnar",
|
|
16819
|
+
"gour",
|
|
16820
|
+
"goust",
|
|
16821
|
+
"gouze",
|
|
16822
|
+
"gouzout",
|
|
16823
|
+
"gra",
|
|
16824
|
+
"grak",
|
|
16825
|
+
"grec'h",
|
|
16826
|
+
"greiz",
|
|
16827
|
+
"grenn",
|
|
16828
|
+
"greomp",
|
|
16829
|
+
"grit",
|
|
16830
|
+
"groñs",
|
|
16831
|
+
"gutez",
|
|
16832
|
+
"gwall",
|
|
16833
|
+
"gwashoc'h",
|
|
16834
|
+
"gwazh",
|
|
16835
|
+
"gwech",
|
|
16836
|
+
"gwechall",
|
|
16837
|
+
"gwechoù",
|
|
16838
|
+
"gwell",
|
|
16839
|
+
"gwezh",
|
|
16840
|
+
"gwezhall",
|
|
16841
|
+
"gwezharall",
|
|
16842
|
+
"gwezhoù",
|
|
16843
|
+
"gwig",
|
|
16844
|
+
"gwirionez",
|
|
16845
|
+
"gwitibunan",
|
|
16846
|
+
"gêr",
|
|
16847
|
+
"h:",
|
|
16253
16848
|
"ha",
|
|
16254
|
-
"
|
|
16255
|
-
"
|
|
16256
|
-
"
|
|
16257
|
-
"
|
|
16258
|
-
"
|
|
16259
|
-
"
|
|
16260
|
-
"
|
|
16261
|
-
"
|
|
16262
|
-
"
|
|
16263
|
-
"
|
|
16264
|
-
"
|
|
16849
|
+
"hag",
|
|
16850
|
+
"han",
|
|
16851
|
+
"hanter",
|
|
16852
|
+
"hanterc'hantad",
|
|
16853
|
+
"hanterkantved",
|
|
16854
|
+
"harz",
|
|
16855
|
+
"hañ",
|
|
16856
|
+
"hañval",
|
|
16857
|
+
"he",
|
|
16858
|
+
"hebioù",
|
|
16859
|
+
"hec'h",
|
|
16860
|
+
"hei",
|
|
16861
|
+
"hein",
|
|
16862
|
+
"hem",
|
|
16863
|
+
"hemañ",
|
|
16864
|
+
"hen",
|
|
16865
|
+
"hend",
|
|
16866
|
+
"henhont",
|
|
16867
|
+
"henn",
|
|
16868
|
+
"hennezh",
|
|
16869
|
+
"hent",
|
|
16870
|
+
"hep",
|
|
16871
|
+
"hervez",
|
|
16872
|
+
"hervezañ",
|
|
16873
|
+
"hervezi",
|
|
16874
|
+
"hervezo",
|
|
16875
|
+
"hervezoc'h",
|
|
16876
|
+
"hervezomp",
|
|
16877
|
+
"hervezon",
|
|
16878
|
+
"hervezor",
|
|
16879
|
+
"hervezout",
|
|
16880
|
+
"heul",
|
|
16881
|
+
"heuliañ",
|
|
16882
|
+
"hevelep",
|
|
16883
|
+
"heverk",
|
|
16884
|
+
"heñvel",
|
|
16885
|
+
"heñvelat",
|
|
16886
|
+
"heñvelañ",
|
|
16887
|
+
"heñveliñ",
|
|
16888
|
+
"heñveloc'h",
|
|
16889
|
+
"heñvelout",
|
|
16890
|
+
"hi",
|
|
16891
|
+
"hilh",
|
|
16892
|
+
"hini",
|
|
16893
|
+
"hirie",
|
|
16894
|
+
"hirio",
|
|
16895
|
+
"hiziv",
|
|
16896
|
+
"hiziviken",
|
|
16897
|
+
"ho",
|
|
16898
|
+
"hoaliñ",
|
|
16899
|
+
"hoc'h",
|
|
16900
|
+
"hogen",
|
|
16901
|
+
"hogos",
|
|
16902
|
+
"hogozik",
|
|
16903
|
+
"hol",
|
|
16904
|
+
"holl",
|
|
16905
|
+
"holà",
|
|
16906
|
+
"homañ",
|
|
16907
|
+
"hon",
|
|
16908
|
+
"honhont",
|
|
16909
|
+
"honnezh",
|
|
16910
|
+
"hont",
|
|
16911
|
+
"hop",
|
|
16912
|
+
"hopala",
|
|
16913
|
+
"hor",
|
|
16914
|
+
"hou",
|
|
16915
|
+
"houp",
|
|
16916
|
+
"hudu",
|
|
16917
|
+
"hue",
|
|
16918
|
+
"hui",
|
|
16919
|
+
"hum",
|
|
16920
|
+
"hurrah",
|
|
16921
|
+
"i",
|
|
16922
|
+
"i:",
|
|
16923
|
+
"in",
|
|
16924
|
+
"int",
|
|
16925
|
+
"is",
|
|
16926
|
+
"ispisial",
|
|
16927
|
+
"isurzhiet",
|
|
16928
|
+
"it",
|
|
16929
|
+
"ivez",
|
|
16930
|
+
"izelañ",
|
|
16931
|
+
"j:",
|
|
16932
|
+
"just",
|
|
16933
|
+
"k:",
|
|
16934
|
+
"kae",
|
|
16935
|
+
"kaer",
|
|
16936
|
+
"kalon",
|
|
16937
|
+
"kalz",
|
|
16938
|
+
"kant",
|
|
16939
|
+
"kaout",
|
|
16940
|
+
"kar",
|
|
16941
|
+
"kazi",
|
|
16942
|
+
"keid",
|
|
16943
|
+
"kein",
|
|
16944
|
+
"keit",
|
|
16945
|
+
"kel",
|
|
16946
|
+
"kellies",
|
|
16947
|
+
"keloù",
|
|
16948
|
+
"kement",
|
|
16949
|
+
"ken",
|
|
16950
|
+
"kenkent",
|
|
16951
|
+
"kenkoulz",
|
|
16952
|
+
"kenment",
|
|
16953
|
+
"kent",
|
|
16954
|
+
"kentañ",
|
|
16955
|
+
"kentizh",
|
|
16956
|
+
"kentoc'h",
|
|
16957
|
+
"kentre",
|
|
16958
|
+
"ker",
|
|
16959
|
+
"kerkent",
|
|
16960
|
+
"kerz",
|
|
16961
|
+
"kerzh",
|
|
16962
|
+
"ket",
|
|
16963
|
+
"keta",
|
|
16964
|
+
"keñver",
|
|
16965
|
+
"keñverel",
|
|
16966
|
+
"keñverius",
|
|
16967
|
+
"kichen",
|
|
16968
|
+
"kichenik",
|
|
16969
|
+
"kit",
|
|
16970
|
+
"kiz",
|
|
16971
|
+
"klak",
|
|
16972
|
+
"klek",
|
|
16973
|
+
"klik",
|
|
16974
|
+
"komprenet",
|
|
16975
|
+
"komz",
|
|
16976
|
+
"kont",
|
|
16977
|
+
"korf",
|
|
16978
|
+
"korre",
|
|
16979
|
+
"koulskoude",
|
|
16980
|
+
"koulz",
|
|
16981
|
+
"koust",
|
|
16982
|
+
"krak",
|
|
16983
|
+
"krampouezh",
|
|
16984
|
+
"krec'h",
|
|
16985
|
+
"kreiz",
|
|
16986
|
+
"kuit",
|
|
16987
|
+
"kwir",
|
|
16988
|
+
"l:",
|
|
16989
|
+
"la",
|
|
16990
|
+
"laez",
|
|
16991
|
+
"laoskel",
|
|
16992
|
+
"laouen",
|
|
16993
|
+
"lavar",
|
|
16994
|
+
"lavaret",
|
|
16995
|
+
"lavarout",
|
|
16996
|
+
"lec'h",
|
|
16997
|
+
"lein",
|
|
16998
|
+
"leizh",
|
|
16999
|
+
"lerc'h",
|
|
17000
|
+
"leun",
|
|
17001
|
+
"leuskel",
|
|
17002
|
+
"lew",
|
|
17003
|
+
"lies",
|
|
17004
|
+
"liesañ",
|
|
17005
|
+
"lod",
|
|
17006
|
+
"lusk",
|
|
17007
|
+
"lâr",
|
|
17008
|
+
"lârout",
|
|
17009
|
+
"m:",
|
|
17010
|
+
"ma",
|
|
17011
|
+
"ma'z",
|
|
17012
|
+
"mac'h",
|
|
17013
|
+
"mac'hat",
|
|
17014
|
+
"mac'hañ",
|
|
17015
|
+
"mac'hoc'h",
|
|
17016
|
+
"mad",
|
|
17017
|
+
"maez",
|
|
17018
|
+
"maksimal",
|
|
17019
|
+
"mann",
|
|
17020
|
+
"mar",
|
|
17021
|
+
"mard",
|
|
17022
|
+
"marg",
|
|
17023
|
+
"marzh",
|
|
17024
|
+
"mat",
|
|
17025
|
+
"mañ",
|
|
17026
|
+
"me",
|
|
17027
|
+
"memes",
|
|
17028
|
+
"memestra",
|
|
17029
|
+
"merkapl",
|
|
17030
|
+
"mersi",
|
|
17031
|
+
"mes",
|
|
17032
|
+
"mesk",
|
|
17033
|
+
"met",
|
|
17034
|
+
"meur",
|
|
17035
|
+
"mil",
|
|
17036
|
+
"minimal",
|
|
17037
|
+
"moan",
|
|
17038
|
+
"moaniaat",
|
|
17039
|
+
"mod",
|
|
17040
|
+
"mont",
|
|
17041
|
+
"mout",
|
|
17042
|
+
"mui",
|
|
17043
|
+
"muiañ",
|
|
17044
|
+
"muioc'h",
|
|
17045
|
+
"n",
|
|
17046
|
+
"n'",
|
|
17047
|
+
"n:",
|
|
16265
17048
|
"na",
|
|
16266
|
-
"
|
|
16267
|
-
"
|
|
16268
|
-
"
|
|
16269
|
-
"
|
|
16270
|
-
"
|
|
16271
|
-
"
|
|
17049
|
+
"nag",
|
|
17050
|
+
"naontek",
|
|
17051
|
+
"naturel",
|
|
17052
|
+
"nav",
|
|
17053
|
+
"navet",
|
|
17054
|
+
"ne",
|
|
17055
|
+
"nebeudig",
|
|
17056
|
+
"nebeut",
|
|
17057
|
+
"nebeutañ",
|
|
17058
|
+
"nebeutoc'h",
|
|
17059
|
+
"neketa",
|
|
17060
|
+
"nemedoc'h",
|
|
17061
|
+
"nemedomp",
|
|
17062
|
+
"nemedon",
|
|
17063
|
+
"nemedor",
|
|
17064
|
+
"nemedout",
|
|
17065
|
+
"nemet",
|
|
17066
|
+
"nemetañ",
|
|
17067
|
+
"nemete",
|
|
17068
|
+
"nemeti",
|
|
17069
|
+
"nemeto",
|
|
17070
|
+
"nemeur",
|
|
17071
|
+
"neoac'h",
|
|
17072
|
+
"nepell",
|
|
17073
|
+
"nerzh",
|
|
17074
|
+
"nes",
|
|
17075
|
+
"neseser",
|
|
17076
|
+
"netra",
|
|
17077
|
+
"neubeudoù",
|
|
17078
|
+
"neuhe",
|
|
17079
|
+
"neuze",
|
|
17080
|
+
"nevez",
|
|
17081
|
+
"newazh",
|
|
17082
|
+
"nez",
|
|
17083
|
+
"ni",
|
|
17084
|
+
"nikun",
|
|
17085
|
+
"niverus",
|
|
17086
|
+
"nul",
|
|
16272
17087
|
"o",
|
|
16273
|
-
"
|
|
16274
|
-
"
|
|
16275
|
-
"
|
|
16276
|
-
"
|
|
16277
|
-
"
|
|
16278
|
-
"
|
|
16279
|
-
"
|
|
16280
|
-
"
|
|
16281
|
-
"
|
|
16282
|
-
"
|
|
16283
|
-
"
|
|
16284
|
-
"
|
|
16285
|
-
"
|
|
16286
|
-
"
|
|
16287
|
-
"
|
|
16288
|
-
"
|
|
16289
|
-
"
|
|
16290
|
-
"
|
|
16291
|
-
"
|
|
16292
|
-
"
|
|
16293
|
-
"
|
|
16294
|
-
"
|
|
16295
|
-
"
|
|
16296
|
-
"
|
|
17088
|
+
"o:",
|
|
17089
|
+
"oa",
|
|
17090
|
+
"oac'h",
|
|
17091
|
+
"oad",
|
|
17092
|
+
"oamp",
|
|
17093
|
+
"oan",
|
|
17094
|
+
"oant",
|
|
17095
|
+
"oar",
|
|
17096
|
+
"oas",
|
|
17097
|
+
"ober",
|
|
17098
|
+
"oc'h",
|
|
17099
|
+
"oc'ho",
|
|
17100
|
+
"oc'hola",
|
|
17101
|
+
"oc'hpenn",
|
|
17102
|
+
"oh",
|
|
17103
|
+
"ohe",
|
|
17104
|
+
"ollé",
|
|
17105
|
+
"olole",
|
|
17106
|
+
"olé",
|
|
17107
|
+
"omp",
|
|
17108
|
+
"on",
|
|
17109
|
+
"ordin",
|
|
17110
|
+
"ordinal",
|
|
17111
|
+
"ouejoc'h",
|
|
17112
|
+
"ouejod",
|
|
17113
|
+
"ouejomp",
|
|
17114
|
+
"ouejont",
|
|
17115
|
+
"ouejout",
|
|
17116
|
+
"ouek",
|
|
17117
|
+
"ouezas",
|
|
17118
|
+
"ouezi",
|
|
17119
|
+
"ouezimp",
|
|
17120
|
+
"ouezin",
|
|
17121
|
+
"ouezint",
|
|
17122
|
+
"ouezis",
|
|
17123
|
+
"ouezo",
|
|
17124
|
+
"ouezoc'h",
|
|
17125
|
+
"ouezor",
|
|
17126
|
+
"ouf",
|
|
17127
|
+
"oufe",
|
|
17128
|
+
"oufec'h",
|
|
17129
|
+
"oufed",
|
|
17130
|
+
"oufemp",
|
|
17131
|
+
"oufen",
|
|
17132
|
+
"oufent",
|
|
17133
|
+
"oufes",
|
|
17134
|
+
"ouie",
|
|
17135
|
+
"ouiec'h",
|
|
17136
|
+
"ouied",
|
|
17137
|
+
"ouiemp",
|
|
17138
|
+
"ouien",
|
|
17139
|
+
"ouient",
|
|
17140
|
+
"ouies",
|
|
17141
|
+
"ouije",
|
|
17142
|
+
"ouijec'h",
|
|
17143
|
+
"ouijed",
|
|
17144
|
+
"ouijemp",
|
|
17145
|
+
"ouijen",
|
|
17146
|
+
"ouijent",
|
|
17147
|
+
"ouijes",
|
|
17148
|
+
"out",
|
|
17149
|
+
"outañ",
|
|
17150
|
+
"outi",
|
|
17151
|
+
"outo",
|
|
17152
|
+
"ouzer",
|
|
17153
|
+
"ouzh",
|
|
17154
|
+
"ouzhin",
|
|
17155
|
+
"ouzhit",
|
|
17156
|
+
"ouzhoc'h",
|
|
17157
|
+
"ouzhomp",
|
|
17158
|
+
"ouzhor",
|
|
17159
|
+
"ouzhpenn",
|
|
17160
|
+
"ouzhpennik",
|
|
17161
|
+
"ouzoc'h",
|
|
17162
|
+
"ouzomp",
|
|
17163
|
+
"ouzon",
|
|
17164
|
+
"ouzont",
|
|
17165
|
+
"ouzout",
|
|
17166
|
+
"p'",
|
|
17167
|
+
"p:",
|
|
17168
|
+
"pa",
|
|
17169
|
+
"pad",
|
|
17170
|
+
"padal",
|
|
17171
|
+
"paf",
|
|
17172
|
+
"pan",
|
|
17173
|
+
"panevedeoc'h",
|
|
17174
|
+
"panevedo",
|
|
17175
|
+
"panevedomp",
|
|
17176
|
+
"panevedon",
|
|
17177
|
+
"panevedout",
|
|
17178
|
+
"panevet",
|
|
17179
|
+
"panevetañ",
|
|
17180
|
+
"paneveti",
|
|
17181
|
+
"pas",
|
|
17182
|
+
"paseet",
|
|
17183
|
+
"pe",
|
|
17184
|
+
"peadra",
|
|
17185
|
+
"peder",
|
|
17186
|
+
"pedervet",
|
|
17187
|
+
"pedervetvet",
|
|
17188
|
+
"pefe",
|
|
17189
|
+
"pegeit",
|
|
17190
|
+
"pegement",
|
|
17191
|
+
"pegen",
|
|
17192
|
+
"pegiz",
|
|
17193
|
+
"pegoulz",
|
|
17194
|
+
"pehini",
|
|
17195
|
+
"pelec'h",
|
|
17196
|
+
"pell",
|
|
17197
|
+
"pemod",
|
|
17198
|
+
"pemp",
|
|
17199
|
+
"pempved",
|
|
17200
|
+
"pemzek",
|
|
17201
|
+
"penaos",
|
|
17202
|
+
"penn",
|
|
17203
|
+
"peogwir",
|
|
17204
|
+
"peotramant",
|
|
17205
|
+
"pep",
|
|
17206
|
+
"perak",
|
|
17207
|
+
"perc'hennañ",
|
|
17208
|
+
"pergen",
|
|
17209
|
+
"permetiñ",
|
|
17210
|
+
"peseurt",
|
|
17211
|
+
"pet",
|
|
17212
|
+
"petiaoul",
|
|
17213
|
+
"petoare",
|
|
17214
|
+
"petra",
|
|
17215
|
+
"peur",
|
|
17216
|
+
"peurgetket",
|
|
17217
|
+
"peurheñvel",
|
|
17218
|
+
"peurliesañ",
|
|
17219
|
+
"peurvuiañ",
|
|
17220
|
+
"peus",
|
|
17221
|
+
"peustost",
|
|
17222
|
+
"peuz",
|
|
17223
|
+
"pevar",
|
|
17224
|
+
"pevare",
|
|
17225
|
+
"pevarevet",
|
|
17226
|
+
"pevarzek",
|
|
17227
|
+
"pez",
|
|
17228
|
+
"peze",
|
|
17229
|
+
"pezh",
|
|
17230
|
+
"pff",
|
|
17231
|
+
"pfft",
|
|
17232
|
+
"pfut",
|
|
17233
|
+
"picher",
|
|
17234
|
+
"pif",
|
|
17235
|
+
"pife",
|
|
17236
|
+
"pign",
|
|
17237
|
+
"pije",
|
|
17238
|
+
"pikol",
|
|
17239
|
+
"pitiaoul",
|
|
17240
|
+
"piv",
|
|
17241
|
+
"plaouf",
|
|
17242
|
+
"plok",
|
|
17243
|
+
"plouf",
|
|
17244
|
+
"po",
|
|
17245
|
+
"poa",
|
|
17246
|
+
"poelladus",
|
|
17247
|
+
"pof",
|
|
17248
|
+
"pok",
|
|
17249
|
+
"posupl",
|
|
17250
|
+
"pouah",
|
|
17251
|
+
"pourc'henn",
|
|
17252
|
+
"prest",
|
|
17253
|
+
"prestik",
|
|
17254
|
+
"prim",
|
|
17255
|
+
"prin",
|
|
17256
|
+
"provostapl",
|
|
17257
|
+
"pst",
|
|
17258
|
+
"pu",
|
|
17259
|
+
"pur",
|
|
17260
|
+
"r:",
|
|
17261
|
+
"ra",
|
|
17262
|
+
"rae",
|
|
17263
|
+
"raec'h",
|
|
17264
|
+
"raed",
|
|
17265
|
+
"raemp",
|
|
17266
|
+
"raen",
|
|
17267
|
+
"raent",
|
|
17268
|
+
"raes",
|
|
17269
|
+
"rafe",
|
|
17270
|
+
"rafec'h",
|
|
17271
|
+
"rafed",
|
|
17272
|
+
"rafemp",
|
|
17273
|
+
"rafen",
|
|
17274
|
+
"rafent",
|
|
17275
|
+
"rafes",
|
|
17276
|
+
"rag",
|
|
17277
|
+
"raimp",
|
|
17278
|
+
"raint",
|
|
17279
|
+
"raio",
|
|
17280
|
+
"raje",
|
|
17281
|
+
"rajec'h",
|
|
17282
|
+
"rajed",
|
|
17283
|
+
"rajemp",
|
|
17284
|
+
"rajen",
|
|
17285
|
+
"rajent",
|
|
17286
|
+
"rajes",
|
|
17287
|
+
"rak",
|
|
17288
|
+
"ral",
|
|
17289
|
+
"ran",
|
|
17290
|
+
"rankout",
|
|
17291
|
+
"raok",
|
|
17292
|
+
"razh",
|
|
17293
|
+
"re",
|
|
17294
|
+
"reas",
|
|
17295
|
+
"reer",
|
|
17296
|
+
"regennoù",
|
|
17297
|
+
"reiñ",
|
|
17298
|
+
"rejoc'h",
|
|
17299
|
+
"rejod",
|
|
17300
|
+
"rejomp",
|
|
17301
|
+
"rejont",
|
|
17302
|
+
"rejout",
|
|
17303
|
+
"rener",
|
|
17304
|
+
"rentañ",
|
|
17305
|
+
"reoc'h",
|
|
17306
|
+
"reomp",
|
|
17307
|
+
"reont",
|
|
17308
|
+
"reor",
|
|
17309
|
+
"reot",
|
|
17310
|
+
"resis",
|
|
17311
|
+
"ret",
|
|
17312
|
+
"reve",
|
|
17313
|
+
"rez",
|
|
17314
|
+
"ri",
|
|
17315
|
+
"rik",
|
|
17316
|
+
"rin",
|
|
17317
|
+
"ris",
|
|
17318
|
+
"rit",
|
|
17319
|
+
"rouez",
|
|
17320
|
+
"s:",
|
|
17321
|
+
"sac'h",
|
|
17322
|
+
"sant",
|
|
17323
|
+
"sav",
|
|
17324
|
+
"sañset",
|
|
16297
17325
|
"se",
|
|
16298
|
-
"
|
|
16299
|
-
"
|
|
16300
|
-
"
|
|
16301
|
-
"
|
|
16302
|
-
"
|
|
16303
|
-
"
|
|
16304
|
-
"
|
|
16305
|
-
"
|
|
16306
|
-
"
|
|
17326
|
+
"sed",
|
|
17327
|
+
"seitek",
|
|
17328
|
+
"seizh",
|
|
17329
|
+
"seizhvet",
|
|
17330
|
+
"sell",
|
|
17331
|
+
"sellit",
|
|
17332
|
+
"ser",
|
|
17333
|
+
"setu",
|
|
17334
|
+
"seul",
|
|
17335
|
+
"seurt",
|
|
17336
|
+
"siwazh",
|
|
17337
|
+
"skignañ",
|
|
17338
|
+
"skoaz",
|
|
17339
|
+
"skouer",
|
|
17340
|
+
"sort",
|
|
17341
|
+
"souden",
|
|
17342
|
+
"souvitañ",
|
|
17343
|
+
"soñj",
|
|
17344
|
+
"speriañ",
|
|
17345
|
+
"spririñ",
|
|
17346
|
+
"stad",
|
|
17347
|
+
"stlabezañ",
|
|
17348
|
+
"stop",
|
|
17349
|
+
"stranañ",
|
|
17350
|
+
"strewiñ",
|
|
17351
|
+
"strishaat",
|
|
17352
|
+
"stumm",
|
|
17353
|
+
"sujed",
|
|
17354
|
+
"surtoud",
|
|
17355
|
+
"t:",
|
|
17356
|
+
"ta",
|
|
17357
|
+
"taer",
|
|
17358
|
+
"tailh",
|
|
17359
|
+
"tak",
|
|
16307
17360
|
"tal",
|
|
16308
|
-
"
|
|
16309
|
-
"
|
|
17361
|
+
"talvoudegezh",
|
|
17362
|
+
"tamm",
|
|
17363
|
+
"tanav",
|
|
17364
|
+
"taol",
|
|
17365
|
+
"te",
|
|
17366
|
+
"techet",
|
|
17367
|
+
"teir",
|
|
17368
|
+
"teirvet",
|
|
17369
|
+
"telt",
|
|
17370
|
+
"teltenn",
|
|
16310
17371
|
"teus",
|
|
16311
|
-
"
|
|
16312
|
-
"
|
|
16313
|
-
"
|
|
16314
|
-
"
|
|
16315
|
-
"
|
|
16316
|
-
"
|
|
16317
|
-
"
|
|
16318
|
-
"
|
|
16319
|
-
"
|
|
16320
|
-
"
|
|
16321
|
-
"
|
|
17372
|
+
"teut",
|
|
17373
|
+
"teuteu",
|
|
17374
|
+
"ti",
|
|
17375
|
+
"tik",
|
|
17376
|
+
"toa",
|
|
17377
|
+
"tok",
|
|
17378
|
+
"tost",
|
|
17379
|
+
"tostig",
|
|
17380
|
+
"toud",
|
|
17381
|
+
"touesk",
|
|
17382
|
+
"touez",
|
|
17383
|
+
"toull",
|
|
17384
|
+
"tra",
|
|
17385
|
+
"trantenn",
|
|
17386
|
+
"traoñ",
|
|
17387
|
+
"trawalc'h",
|
|
17388
|
+
"tre",
|
|
17389
|
+
"trede",
|
|
17390
|
+
"tregont",
|
|
17391
|
+
"tremenet",
|
|
17392
|
+
"tri",
|
|
17393
|
+
"trivet",
|
|
17394
|
+
"triwec'h",
|
|
17395
|
+
"trizek",
|
|
17396
|
+
"tro",
|
|
17397
|
+
"trugarez",
|
|
17398
|
+
"trumm",
|
|
17399
|
+
"tsoin",
|
|
17400
|
+
"tsouin",
|
|
17401
|
+
"tu",
|
|
17402
|
+
"tud",
|
|
17403
|
+
"u:",
|
|
17404
|
+
"ugent",
|
|
17405
|
+
"uhel",
|
|
17406
|
+
"uhelañ",
|
|
17407
|
+
"ul",
|
|
17408
|
+
"un",
|
|
17409
|
+
"unan",
|
|
17410
|
+
"unanez",
|
|
17411
|
+
"unanig",
|
|
17412
|
+
"unnek",
|
|
17413
|
+
"unnekvet",
|
|
17414
|
+
"ur",
|
|
17415
|
+
"urzh",
|
|
17416
|
+
"us",
|
|
17417
|
+
"v:",
|
|
17418
|
+
"va",
|
|
17419
|
+
"vale",
|
|
17420
|
+
"van",
|
|
17421
|
+
"vare",
|
|
17422
|
+
"vat",
|
|
17423
|
+
"vefe",
|
|
17424
|
+
"vefec'h",
|
|
17425
|
+
"vefed",
|
|
17426
|
+
"vefemp",
|
|
17427
|
+
"vefen",
|
|
17428
|
+
"vefent",
|
|
17429
|
+
"vefes",
|
|
17430
|
+
"vesk",
|
|
17431
|
+
"vete",
|
|
17432
|
+
"vez",
|
|
17433
|
+
"vezan",
|
|
17434
|
+
"vezañ",
|
|
17435
|
+
"veze",
|
|
17436
|
+
"vezec'h",
|
|
17437
|
+
"vezed",
|
|
17438
|
+
"vezemp",
|
|
17439
|
+
"vezen",
|
|
17440
|
+
"vezent",
|
|
17441
|
+
"vezer",
|
|
17442
|
+
"vezes",
|
|
17443
|
+
"vezez",
|
|
17444
|
+
"vezit",
|
|
17445
|
+
"vezomp",
|
|
17446
|
+
"vezont",
|
|
17447
|
+
"vi",
|
|
17448
|
+
"vihan",
|
|
17449
|
+
"vihanañ",
|
|
17450
|
+
"vije",
|
|
17451
|
+
"vijec'h",
|
|
17452
|
+
"vijed",
|
|
17453
|
+
"vijemp",
|
|
17454
|
+
"vijen",
|
|
17455
|
+
"vijent",
|
|
17456
|
+
"vijes",
|
|
17457
|
+
"viken",
|
|
17458
|
+
"vimp",
|
|
17459
|
+
"vin",
|
|
17460
|
+
"vint",
|
|
17461
|
+
"vior",
|
|
17462
|
+
"viot",
|
|
17463
|
+
"virviken",
|
|
17464
|
+
"viskoazh",
|
|
17465
|
+
"vlan",
|
|
17466
|
+
"vlaou",
|
|
17467
|
+
"vo",
|
|
17468
|
+
"vod",
|
|
17469
|
+
"voe",
|
|
17470
|
+
"voec'h",
|
|
17471
|
+
"voed",
|
|
17472
|
+
"voemp",
|
|
17473
|
+
"voen",
|
|
17474
|
+
"voent",
|
|
17475
|
+
"voes",
|
|
17476
|
+
"vont",
|
|
17477
|
+
"vostapl",
|
|
17478
|
+
"vrac'h",
|
|
17479
|
+
"vrasañ",
|
|
17480
|
+
"vremañ",
|
|
17481
|
+
"w:",
|
|
17482
|
+
"walc'h",
|
|
17483
|
+
"war",
|
|
17484
|
+
"warnañ",
|
|
17485
|
+
"warni",
|
|
17486
|
+
"warno",
|
|
17487
|
+
"warnoc'h",
|
|
17488
|
+
"warnomp",
|
|
17489
|
+
"warnon",
|
|
17490
|
+
"warnor",
|
|
17491
|
+
"warnout",
|
|
17492
|
+
"wazh",
|
|
17493
|
+
"wech",
|
|
17494
|
+
"wechoù",
|
|
17495
|
+
"well",
|
|
17496
|
+
"y:",
|
|
17497
|
+
"you",
|
|
17498
|
+
"youadenn",
|
|
17499
|
+
"youc'hadenn",
|
|
17500
|
+
"youc'hou",
|
|
17501
|
+
"z:",
|
|
17502
|
+
"za",
|
|
17503
|
+
"zan",
|
|
17504
|
+
"zaw",
|
|
17505
|
+
"zeu",
|
|
17506
|
+
"zi",
|
|
17507
|
+
"ziar",
|
|
17508
|
+
"zigarez",
|
|
17509
|
+
"ziget",
|
|
17510
|
+
"zindan",
|
|
17511
|
+
"zioc'h",
|
|
17512
|
+
"ziouzh",
|
|
17513
|
+
"zirak",
|
|
17514
|
+
"zivout",
|
|
17515
|
+
"ziwar",
|
|
17516
|
+
"ziwezhañ",
|
|
17517
|
+
"zo",
|
|
17518
|
+
"zoken",
|
|
17519
|
+
"zokenoc'h",
|
|
17520
|
+
"zouesk",
|
|
17521
|
+
"zouez",
|
|
17522
|
+
"zro",
|
|
17523
|
+
"zu"
|
|
16322
17524
|
];
|
|
16323
17525
|
const bul = [
|
|
16324
17526
|
"а",
|
|
@@ -27974,22 +29176,32 @@ flowchart TD
|
|
|
27974
29176
|
"şöyle"
|
|
27975
29177
|
];
|
|
27976
29178
|
const ukr = [
|
|
29179
|
+
"а",
|
|
29180
|
+
"або",
|
|
27977
29181
|
"авжеж",
|
|
27978
29182
|
"адже",
|
|
29183
|
+
"аж",
|
|
27979
29184
|
"але",
|
|
29185
|
+
"ані",
|
|
27980
29186
|
"б",
|
|
27981
29187
|
"без",
|
|
29188
|
+
"би",
|
|
29189
|
+
"бо",
|
|
27982
29190
|
"був",
|
|
27983
29191
|
"була",
|
|
27984
29192
|
"були",
|
|
27985
29193
|
"було",
|
|
27986
29194
|
"бути",
|
|
27987
29195
|
"більш",
|
|
29196
|
+
"в",
|
|
27988
29197
|
"вам",
|
|
29198
|
+
"вами",
|
|
27989
29199
|
"вас",
|
|
27990
29200
|
"весь",
|
|
29201
|
+
"вже",
|
|
27991
29202
|
"вздовж",
|
|
27992
29203
|
"ви",
|
|
29204
|
+
"від",
|
|
27993
29205
|
"вниз",
|
|
27994
29206
|
"внизу",
|
|
27995
29207
|
"вона",
|
|
@@ -27998,55 +29210,138 @@ flowchart TD
|
|
|
27998
29210
|
"все",
|
|
27999
29211
|
"всередині",
|
|
28000
29212
|
"всіх",
|
|
29213
|
+
"вся",
|
|
28001
29214
|
"від",
|
|
28002
29215
|
"він",
|
|
28003
29216
|
"да",
|
|
28004
29217
|
"давай",
|
|
28005
29218
|
"давати",
|
|
28006
29219
|
"де",
|
|
29220
|
+
"десь",
|
|
28007
29221
|
"дещо",
|
|
28008
29222
|
"для",
|
|
28009
29223
|
"до",
|
|
29224
|
+
"є",
|
|
29225
|
+
"ж",
|
|
29226
|
+
"же",
|
|
28010
29227
|
"з",
|
|
29228
|
+
"за",
|
|
28011
29229
|
"завжди",
|
|
28012
29230
|
"замість",
|
|
29231
|
+
"зі",
|
|
29232
|
+
"і",
|
|
29233
|
+
"із",
|
|
29234
|
+
"інших",
|
|
29235
|
+
"її",
|
|
29236
|
+
"їй",
|
|
29237
|
+
"їм",
|
|
29238
|
+
"їх",
|
|
28013
29239
|
"й",
|
|
29240
|
+
"його",
|
|
29241
|
+
"йому",
|
|
28014
29242
|
"коли",
|
|
28015
29243
|
"ледве",
|
|
29244
|
+
"лиш",
|
|
28016
29245
|
"майже",
|
|
29246
|
+
"мене",
|
|
29247
|
+
"мені",
|
|
28017
29248
|
"ми",
|
|
29249
|
+
"між",
|
|
29250
|
+
"мій",
|
|
29251
|
+
"мною",
|
|
29252
|
+
"мов",
|
|
29253
|
+
"мого",
|
|
29254
|
+
"моєї",
|
|
29255
|
+
"моє",
|
|
29256
|
+
"може",
|
|
29257
|
+
"мої",
|
|
29258
|
+
"моїх",
|
|
29259
|
+
"моя",
|
|
29260
|
+
"на",
|
|
29261
|
+
"над",
|
|
28018
29262
|
"навколо",
|
|
28019
29263
|
"навіть",
|
|
28020
29264
|
"нам",
|
|
29265
|
+
"нами",
|
|
29266
|
+
"нас",
|
|
29267
|
+
"наче",
|
|
29268
|
+
"наш",
|
|
29269
|
+
"не",
|
|
29270
|
+
"нє",
|
|
29271
|
+
"неї",
|
|
29272
|
+
"нема",
|
|
29273
|
+
"немов",
|
|
29274
|
+
"неначе",
|
|
29275
|
+
"нею",
|
|
29276
|
+
"ним",
|
|
29277
|
+
"ними",
|
|
29278
|
+
"них",
|
|
29279
|
+
"ні",
|
|
29280
|
+
"ніби",
|
|
29281
|
+
"ніщо",
|
|
29282
|
+
"нього",
|
|
29283
|
+
"о",
|
|
29284
|
+
"ось",
|
|
28021
29285
|
"от",
|
|
28022
29286
|
"отже",
|
|
28023
29287
|
"отож",
|
|
29288
|
+
"під",
|
|
29289
|
+
"по",
|
|
28024
29290
|
"поза",
|
|
28025
29291
|
"про",
|
|
28026
29292
|
"під",
|
|
29293
|
+
"сам",
|
|
29294
|
+
"сама",
|
|
29295
|
+
"свій",
|
|
29296
|
+
"свої",
|
|
29297
|
+
"своя",
|
|
29298
|
+
"свою",
|
|
29299
|
+
"себе",
|
|
29300
|
+
"собі",
|
|
28027
29301
|
"та",
|
|
29302
|
+
"там",
|
|
28028
29303
|
"так",
|
|
29304
|
+
"така",
|
|
28029
29305
|
"такий",
|
|
28030
29306
|
"також",
|
|
29307
|
+
"твій",
|
|
29308
|
+
"твого",
|
|
29309
|
+
"твоєї",
|
|
29310
|
+
"твої",
|
|
29311
|
+
"твоя",
|
|
28031
29312
|
"те",
|
|
29313
|
+
"тебе",
|
|
28032
29314
|
"ти",
|
|
29315
|
+
"ті",
|
|
29316
|
+
"тільки",
|
|
29317
|
+
"то",
|
|
29318
|
+
"тобі",
|
|
29319
|
+
"тобою",
|
|
28033
29320
|
"тобто",
|
|
29321
|
+
"тоді",
|
|
28034
29322
|
"тож",
|
|
29323
|
+
"той",
|
|
28035
29324
|
"тощо",
|
|
29325
|
+
"тут",
|
|
29326
|
+
"у",
|
|
29327
|
+
"хіба",
|
|
29328
|
+
"хоч",
|
|
28036
29329
|
"хоча",
|
|
28037
29330
|
"це",
|
|
28038
29331
|
"цей",
|
|
29332
|
+
"ці",
|
|
29333
|
+
"ця",
|
|
28039
29334
|
"чи",
|
|
28040
29335
|
"чого",
|
|
29336
|
+
"ще",
|
|
28041
29337
|
"що",
|
|
29338
|
+
"щоб",
|
|
29339
|
+
"щось",
|
|
29340
|
+
"я",
|
|
28042
29341
|
"як",
|
|
29342
|
+
"яка",
|
|
28043
29343
|
"який",
|
|
28044
|
-
"якої"
|
|
28045
|
-
"є",
|
|
28046
|
-
"із",
|
|
28047
|
-
"інших",
|
|
28048
|
-
"їх",
|
|
28049
|
-
"її"
|
|
29344
|
+
"якої"
|
|
28050
29345
|
];
|
|
28051
29346
|
const urd = [
|
|
28052
29347
|
"آئی",
|
|
@@ -29044,7 +30339,14 @@ flowchart TD
|
|
|
29044
30339
|
const AUTH_TOKEN_KEY = "tinacms-auth";
|
|
29045
30340
|
const authenticate = (clientId, frontendUrl) => {
|
|
29046
30341
|
return new Promise((resolve) => {
|
|
29047
|
-
|
|
30342
|
+
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
30343
|
+
const authTab = popupWindow(
|
|
30344
|
+
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
30345
|
+
"_blank",
|
|
30346
|
+
window,
|
|
30347
|
+
1e3,
|
|
30348
|
+
700
|
|
30349
|
+
);
|
|
29048
30350
|
window.addEventListener("message", function(e) {
|
|
29049
30351
|
if (e.data.source === TINA_LOGIN_EVENT) {
|
|
29050
30352
|
if (authTab) {
|
|
@@ -29057,14 +30359,6 @@ flowchart TD
|
|
|
29057
30359
|
});
|
|
29058
30360
|
}
|
|
29059
30361
|
});
|
|
29060
|
-
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
29061
|
-
authTab = popupWindow(
|
|
29062
|
-
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
29063
|
-
"_blank",
|
|
29064
|
-
window,
|
|
29065
|
-
1e3,
|
|
29066
|
-
700
|
|
29067
|
-
);
|
|
29068
30362
|
});
|
|
29069
30363
|
};
|
|
29070
30364
|
const DefaultSessionProvider = ({
|
|
@@ -29417,7 +30711,7 @@ mutation addPendingDocumentMutation(
|
|
|
29417
30711
|
branch: ${this.branch}.`;
|
|
29418
30712
|
if (this.branch !== "main") {
|
|
29419
30713
|
errorMessage = `${errorMessage}
|
|
29420
|
-
Note: This error can occur if the branch does not exist on GitHub or on
|
|
30714
|
+
Note: This error can occur if the branch does not exist on GitHub or on TinaCloud`;
|
|
29421
30715
|
}
|
|
29422
30716
|
}
|
|
29423
30717
|
throw new Error(errorMessage);
|
|
@@ -29553,7 +30847,7 @@ mutation addPendingDocumentMutation(
|
|
|
29553
30847
|
unknownCount++;
|
|
29554
30848
|
if (unknownCount > 5) {
|
|
29555
30849
|
throw new Error(
|
|
29556
|
-
"AsyncPoller: status unknown for too long, please check indexing progress the
|
|
30850
|
+
"AsyncPoller: status unknown for too long, please check indexing progress the TinaCloud dashboard"
|
|
29557
30851
|
);
|
|
29558
30852
|
}
|
|
29559
30853
|
}
|
|
@@ -29770,56 +31064,6 @@ mutation addPendingDocumentMutation(
|
|
|
29770
31064
|
!submitting && name
|
|
29771
31065
|
);
|
|
29772
31066
|
};
|
|
29773
|
-
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
29774
|
-
const useTinaAuthRedirect = () => {
|
|
29775
|
-
React.useEffect(() => {
|
|
29776
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
29777
|
-
const config = {
|
|
29778
|
-
code: urlParams.get("code") || "",
|
|
29779
|
-
scope: urlParams.get("scope") || "email",
|
|
29780
|
-
state: urlParams.get("state")
|
|
29781
|
-
};
|
|
29782
|
-
if (!config.code) {
|
|
29783
|
-
return;
|
|
29784
|
-
}
|
|
29785
|
-
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
29786
|
-
}, []);
|
|
29787
|
-
};
|
|
29788
|
-
const createClient = ({
|
|
29789
|
-
clientId,
|
|
29790
|
-
isLocalClient = true,
|
|
29791
|
-
branch,
|
|
29792
|
-
tinaioConfig,
|
|
29793
|
-
schema,
|
|
29794
|
-
apiUrl,
|
|
29795
|
-
tinaGraphQLVersion
|
|
29796
|
-
}) => {
|
|
29797
|
-
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
29798
|
-
clientId: clientId || "",
|
|
29799
|
-
branch: branch || "main",
|
|
29800
|
-
tokenStorage: "LOCAL_STORAGE",
|
|
29801
|
-
tinaioConfig,
|
|
29802
|
-
schema,
|
|
29803
|
-
tinaGraphQLVersion
|
|
29804
|
-
});
|
|
29805
|
-
};
|
|
29806
|
-
function assertShape(value, yupSchema, errorMessage) {
|
|
29807
|
-
const shape = yupSchema(yup__namespace);
|
|
29808
|
-
try {
|
|
29809
|
-
shape.validateSync(value);
|
|
29810
|
-
} catch (e) {
|
|
29811
|
-
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
29812
|
-
throw new Error(message);
|
|
29813
|
-
}
|
|
29814
|
-
}
|
|
29815
|
-
function safeAssertShape(value, yupSchema) {
|
|
29816
|
-
try {
|
|
29817
|
-
assertShape(value, yupSchema);
|
|
29818
|
-
return true;
|
|
29819
|
-
} catch (e) {
|
|
29820
|
-
return false;
|
|
29821
|
-
}
|
|
29822
|
-
}
|
|
29823
31067
|
class TinaAdminApi {
|
|
29824
31068
|
constructor(cms) {
|
|
29825
31069
|
var _a, _b, _c, _d;
|
|
@@ -30166,6 +31410,56 @@ mutation addPendingDocumentMutation(
|
|
|
30166
31410
|
);
|
|
30167
31411
|
}
|
|
30168
31412
|
}
|
|
31413
|
+
const createClient = ({
|
|
31414
|
+
clientId,
|
|
31415
|
+
isLocalClient = true,
|
|
31416
|
+
branch,
|
|
31417
|
+
tinaioConfig,
|
|
31418
|
+
schema,
|
|
31419
|
+
apiUrl,
|
|
31420
|
+
tinaGraphQLVersion
|
|
31421
|
+
}) => {
|
|
31422
|
+
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
31423
|
+
clientId: clientId || "",
|
|
31424
|
+
branch: branch || "main",
|
|
31425
|
+
tokenStorage: "LOCAL_STORAGE",
|
|
31426
|
+
tinaioConfig,
|
|
31427
|
+
schema,
|
|
31428
|
+
tinaGraphQLVersion
|
|
31429
|
+
});
|
|
31430
|
+
};
|
|
31431
|
+
function assertShape(value, yupSchema, errorMessage) {
|
|
31432
|
+
const shape = yupSchema(yup__namespace);
|
|
31433
|
+
try {
|
|
31434
|
+
shape.validateSync(value);
|
|
31435
|
+
} catch (e) {
|
|
31436
|
+
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
31437
|
+
throw new Error(message);
|
|
31438
|
+
}
|
|
31439
|
+
}
|
|
31440
|
+
function safeAssertShape(value, yupSchema) {
|
|
31441
|
+
try {
|
|
31442
|
+
assertShape(value, yupSchema);
|
|
31443
|
+
return true;
|
|
31444
|
+
} catch (e) {
|
|
31445
|
+
return false;
|
|
31446
|
+
}
|
|
31447
|
+
}
|
|
31448
|
+
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
31449
|
+
const useTinaAuthRedirect = () => {
|
|
31450
|
+
React.useEffect(() => {
|
|
31451
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
31452
|
+
const config = {
|
|
31453
|
+
code: urlParams.get("code") || "",
|
|
31454
|
+
scope: urlParams.get("scope") || "email",
|
|
31455
|
+
state: urlParams.get("state")
|
|
31456
|
+
};
|
|
31457
|
+
if (!config.code) {
|
|
31458
|
+
return;
|
|
31459
|
+
}
|
|
31460
|
+
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
31461
|
+
}, []);
|
|
31462
|
+
};
|
|
30169
31463
|
function sleep(ms) {
|
|
30170
31464
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
30171
31465
|
}
|
|
@@ -30264,7 +31558,7 @@ mutation addPendingDocumentMutation(
|
|
|
30264
31558
|
});
|
|
30265
31559
|
}
|
|
30266
31560
|
};
|
|
30267
|
-
let modalTitle = "
|
|
31561
|
+
let modalTitle = "TinaCloud";
|
|
30268
31562
|
if (activeModal === "authenticate" && loginStrategy === "Redirect" && !isTinaCloud) {
|
|
30269
31563
|
modalTitle = "Enter into edit mode";
|
|
30270
31564
|
} else if (activeModal === "authenticate" && loginStrategy === "UsernamePassword") {
|
|
@@ -30280,7 +31574,7 @@ mutation addPendingDocumentMutation(
|
|
|
30280
31574
|
ModalBuilder,
|
|
30281
31575
|
{
|
|
30282
31576
|
title: modalTitle,
|
|
30283
|
-
message: isTinaCloud ? "Your site uses
|
|
31577
|
+
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.",
|
|
30284
31578
|
close,
|
|
30285
31579
|
actions: [
|
|
30286
31580
|
...otherModalActions,
|
|
@@ -30502,6 +31796,9 @@ mutation addPendingDocumentMutation(
|
|
|
30502
31796
|
cms.flags.set("branch-switcher", true);
|
|
30503
31797
|
client.usingEditorialWorkflow = true;
|
|
30504
31798
|
client.protectedBranches = project.protectedBranches;
|
|
31799
|
+
if (!project.metadata[currentBranch]) {
|
|
31800
|
+
setCurrentBranch(project.defaultBranch || "main");
|
|
31801
|
+
}
|
|
30505
31802
|
}
|
|
30506
31803
|
});
|
|
30507
31804
|
};
|
|
@@ -30514,7 +31811,7 @@ mutation addPendingDocumentMutation(
|
|
|
30514
31811
|
}
|
|
30515
31812
|
});
|
|
30516
31813
|
return unsubscribe;
|
|
30517
|
-
}, [isTinaCloud, cms]);
|
|
31814
|
+
}, [currentBranch, isTinaCloud, cms]);
|
|
30518
31815
|
return /* @__PURE__ */ React.createElement(SessionProvider, { basePath: "/api/tina/auth" }, /* @__PURE__ */ React.createElement(
|
|
30519
31816
|
BranchDataProvider,
|
|
30520
31817
|
{
|
|
@@ -31000,6 +32297,14 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31000
32297
|
}
|
|
31001
32298
|
return client.request(query, { variables });
|
|
31002
32299
|
};
|
|
32300
|
+
const GetCMS = ({ children }) => {
|
|
32301
|
+
try {
|
|
32302
|
+
const cms = useCMS$1();
|
|
32303
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(cms));
|
|
32304
|
+
} catch (e) {
|
|
32305
|
+
return null;
|
|
32306
|
+
}
|
|
32307
|
+
};
|
|
31003
32308
|
const Layout = ({ children }) => {
|
|
31004
32309
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
31005
32310
|
"div",
|
|
@@ -31211,14 +32516,118 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31211
32516
|
}
|
|
31212
32517
|
return /* @__PURE__ */ React.createElement("span", { className: "text-base tracking-wide text-gray-500 hover:text-blue-600 flex items-center opacity-90 hover:opacity-100" }, /* @__PURE__ */ React.createElement(config.Icon, { className: "mr-2 h-6 opacity-80 w-auto" }), /* @__PURE__ */ React.createElement("a", { target: "_blank", href: config.link.href }, config.link.text));
|
|
31213
32518
|
};
|
|
31214
|
-
const
|
|
31215
|
-
|
|
31216
|
-
|
|
31217
|
-
|
|
31218
|
-
|
|
31219
|
-
|
|
31220
|
-
|
|
31221
|
-
|
|
32519
|
+
const LoadingPage = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
32520
|
+
"div",
|
|
32521
|
+
{
|
|
32522
|
+
style: {
|
|
32523
|
+
position: "absolute",
|
|
32524
|
+
top: 0,
|
|
32525
|
+
left: 0,
|
|
32526
|
+
width: "100%",
|
|
32527
|
+
height: "100%",
|
|
32528
|
+
zIndex: 200,
|
|
32529
|
+
opacity: "0.8",
|
|
32530
|
+
display: "flex",
|
|
32531
|
+
alignItems: "start",
|
|
32532
|
+
justifyContent: "center",
|
|
32533
|
+
padding: "120px 40px 40px 40px"
|
|
32534
|
+
}
|
|
32535
|
+
},
|
|
32536
|
+
/* @__PURE__ */ React.createElement(
|
|
32537
|
+
"div",
|
|
32538
|
+
{
|
|
32539
|
+
style: {
|
|
32540
|
+
background: "#FFF",
|
|
32541
|
+
border: "1px solid #EDECF3",
|
|
32542
|
+
boxShadow: "0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
32543
|
+
borderRadius: "8px",
|
|
32544
|
+
padding: "32px 24px",
|
|
32545
|
+
width: "460px",
|
|
32546
|
+
maxWidth: "90%",
|
|
32547
|
+
display: "flex",
|
|
32548
|
+
alignItems: "center",
|
|
32549
|
+
justifyContent: "center",
|
|
32550
|
+
flexDirection: "column"
|
|
32551
|
+
}
|
|
32552
|
+
},
|
|
32553
|
+
/* @__PURE__ */ React.createElement(
|
|
32554
|
+
"svg",
|
|
32555
|
+
{
|
|
32556
|
+
style: {
|
|
32557
|
+
width: "64px",
|
|
32558
|
+
color: "#2296fe",
|
|
32559
|
+
marginTop: "-8px",
|
|
32560
|
+
marginBottom: "16px"
|
|
32561
|
+
},
|
|
32562
|
+
version: "1.1",
|
|
32563
|
+
id: "L5",
|
|
32564
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32565
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
32566
|
+
x: "0px",
|
|
32567
|
+
y: "0px",
|
|
32568
|
+
viewBox: "0 0 100 64",
|
|
32569
|
+
enableBackground: "new 0 0 0 0",
|
|
32570
|
+
xmlSpace: "preserve"
|
|
32571
|
+
},
|
|
32572
|
+
/* @__PURE__ */ React.createElement("circle", { fill: "currentColor", stroke: "none", cx: 6, cy: 32, r: 6 }, /* @__PURE__ */ React.createElement(
|
|
32573
|
+
"animateTransform",
|
|
32574
|
+
{
|
|
32575
|
+
attributeName: "transform",
|
|
32576
|
+
dur: "1s",
|
|
32577
|
+
type: "translate",
|
|
32578
|
+
values: "0 15 ; 0 -15; 0 15",
|
|
32579
|
+
calcMode: "spline",
|
|
32580
|
+
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
32581
|
+
repeatCount: "indefinite",
|
|
32582
|
+
begin: "0.1"
|
|
32583
|
+
}
|
|
32584
|
+
)),
|
|
32585
|
+
/* @__PURE__ */ React.createElement("circle", { fill: "currentColor", stroke: "none", cx: 30, cy: 32, r: 6 }, /* @__PURE__ */ React.createElement(
|
|
32586
|
+
"animateTransform",
|
|
32587
|
+
{
|
|
32588
|
+
attributeName: "transform",
|
|
32589
|
+
dur: "1s",
|
|
32590
|
+
type: "translate",
|
|
32591
|
+
values: "0 15 ; 0 -10; 0 15",
|
|
32592
|
+
calcMode: "spline",
|
|
32593
|
+
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
32594
|
+
repeatCount: "indefinite",
|
|
32595
|
+
begin: "0.2"
|
|
32596
|
+
}
|
|
32597
|
+
)),
|
|
32598
|
+
/* @__PURE__ */ React.createElement("circle", { fill: "currentColor", stroke: "none", cx: 54, cy: 32, r: 6 }, /* @__PURE__ */ React.createElement(
|
|
32599
|
+
"animateTransform",
|
|
32600
|
+
{
|
|
32601
|
+
attributeName: "transform",
|
|
32602
|
+
dur: "1s",
|
|
32603
|
+
type: "translate",
|
|
32604
|
+
values: "0 15 ; 0 -5; 0 15",
|
|
32605
|
+
calcMode: "spline",
|
|
32606
|
+
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
32607
|
+
repeatCount: "indefinite",
|
|
32608
|
+
begin: "0.3"
|
|
32609
|
+
}
|
|
32610
|
+
))
|
|
32611
|
+
),
|
|
32612
|
+
/* @__PURE__ */ React.createElement(
|
|
32613
|
+
"p",
|
|
32614
|
+
{
|
|
32615
|
+
style: {
|
|
32616
|
+
fontSize: "16px",
|
|
32617
|
+
color: "#716c7f",
|
|
32618
|
+
textAlign: "center",
|
|
32619
|
+
lineHeight: "1.3",
|
|
32620
|
+
fontFamily: "'Inter', sans-serif",
|
|
32621
|
+
fontWeight: "normal"
|
|
32622
|
+
}
|
|
32623
|
+
},
|
|
32624
|
+
"Please wait, Tina is loading data..."
|
|
32625
|
+
)
|
|
32626
|
+
)
|
|
32627
|
+
));
|
|
32628
|
+
function RiHome2Line(props) {
|
|
32629
|
+
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);
|
|
32630
|
+
}
|
|
31222
32631
|
const PageWrapper = ({ children }) => {
|
|
31223
32632
|
var _a, _b;
|
|
31224
32633
|
const cms = useCMS$1();
|
|
@@ -31243,321 +32652,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31243
32652
|
};
|
|
31244
32653
|
const PageBody = ({ children }) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
31245
32654
|
const PageBodyNarrow = ({ children }) => /* @__PURE__ */ React.createElement("div", { className: "py-10 px-6 xl:px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
|
|
31246
|
-
const DashboardPage = () => {
|
|
31247
|
-
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
31248
|
-
var _a, _b;
|
|
31249
|
-
return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PageHeader, { isLocalMode: (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode }, /* @__PURE__ */ React.createElement("h3", { className: "text-2xl font-sans text-gray-700" }, "Welcome to Tina!")), /* @__PURE__ */ React.createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
|
|
31250
|
-
});
|
|
31251
|
-
};
|
|
31252
|
-
function RiHome2Line(props) {
|
|
31253
|
-
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);
|
|
31254
|
-
}
|
|
31255
|
-
const LoadingPage = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
31256
|
-
"div",
|
|
31257
|
-
{
|
|
31258
|
-
style: {
|
|
31259
|
-
position: "absolute",
|
|
31260
|
-
top: 0,
|
|
31261
|
-
left: 0,
|
|
31262
|
-
width: "100%",
|
|
31263
|
-
height: "100%",
|
|
31264
|
-
zIndex: 200,
|
|
31265
|
-
opacity: "0.8",
|
|
31266
|
-
display: "flex",
|
|
31267
|
-
alignItems: "start",
|
|
31268
|
-
justifyContent: "center",
|
|
31269
|
-
padding: "120px 40px 40px 40px"
|
|
31270
|
-
}
|
|
31271
|
-
},
|
|
31272
|
-
/* @__PURE__ */ React.createElement(
|
|
31273
|
-
"div",
|
|
31274
|
-
{
|
|
31275
|
-
style: {
|
|
31276
|
-
background: "#FFF",
|
|
31277
|
-
border: "1px solid #EDECF3",
|
|
31278
|
-
boxShadow: "0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
31279
|
-
borderRadius: "8px",
|
|
31280
|
-
padding: "32px 24px",
|
|
31281
|
-
width: "460px",
|
|
31282
|
-
maxWidth: "90%",
|
|
31283
|
-
display: "flex",
|
|
31284
|
-
alignItems: "center",
|
|
31285
|
-
justifyContent: "center",
|
|
31286
|
-
flexDirection: "column"
|
|
31287
|
-
}
|
|
31288
|
-
},
|
|
31289
|
-
/* @__PURE__ */ React.createElement(
|
|
31290
|
-
"svg",
|
|
31291
|
-
{
|
|
31292
|
-
style: {
|
|
31293
|
-
width: "64px",
|
|
31294
|
-
color: "#2296fe",
|
|
31295
|
-
marginTop: "-8px",
|
|
31296
|
-
marginBottom: "16px"
|
|
31297
|
-
},
|
|
31298
|
-
version: "1.1",
|
|
31299
|
-
id: "L5",
|
|
31300
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31301
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
31302
|
-
x: "0px",
|
|
31303
|
-
y: "0px",
|
|
31304
|
-
viewBox: "0 0 100 64",
|
|
31305
|
-
enableBackground: "new 0 0 0 0",
|
|
31306
|
-
xmlSpace: "preserve"
|
|
31307
|
-
},
|
|
31308
|
-
/* @__PURE__ */ React.createElement("circle", { fill: "currentColor", stroke: "none", cx: 6, cy: 32, r: 6 }, /* @__PURE__ */ React.createElement(
|
|
31309
|
-
"animateTransform",
|
|
31310
|
-
{
|
|
31311
|
-
attributeName: "transform",
|
|
31312
|
-
dur: "1s",
|
|
31313
|
-
type: "translate",
|
|
31314
|
-
values: "0 15 ; 0 -15; 0 15",
|
|
31315
|
-
calcMode: "spline",
|
|
31316
|
-
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
31317
|
-
repeatCount: "indefinite",
|
|
31318
|
-
begin: "0.1"
|
|
31319
|
-
}
|
|
31320
|
-
)),
|
|
31321
|
-
/* @__PURE__ */ React.createElement("circle", { fill: "currentColor", stroke: "none", cx: 30, cy: 32, r: 6 }, /* @__PURE__ */ React.createElement(
|
|
31322
|
-
"animateTransform",
|
|
31323
|
-
{
|
|
31324
|
-
attributeName: "transform",
|
|
31325
|
-
dur: "1s",
|
|
31326
|
-
type: "translate",
|
|
31327
|
-
values: "0 15 ; 0 -10; 0 15",
|
|
31328
|
-
calcMode: "spline",
|
|
31329
|
-
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
31330
|
-
repeatCount: "indefinite",
|
|
31331
|
-
begin: "0.2"
|
|
31332
|
-
}
|
|
31333
|
-
)),
|
|
31334
|
-
/* @__PURE__ */ React.createElement("circle", { fill: "currentColor", stroke: "none", cx: 54, cy: 32, r: 6 }, /* @__PURE__ */ React.createElement(
|
|
31335
|
-
"animateTransform",
|
|
31336
|
-
{
|
|
31337
|
-
attributeName: "transform",
|
|
31338
|
-
dur: "1s",
|
|
31339
|
-
type: "translate",
|
|
31340
|
-
values: "0 15 ; 0 -5; 0 15",
|
|
31341
|
-
calcMode: "spline",
|
|
31342
|
-
keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
|
|
31343
|
-
repeatCount: "indefinite",
|
|
31344
|
-
begin: "0.3"
|
|
31345
|
-
}
|
|
31346
|
-
))
|
|
31347
|
-
),
|
|
31348
|
-
/* @__PURE__ */ React.createElement(
|
|
31349
|
-
"p",
|
|
31350
|
-
{
|
|
31351
|
-
style: {
|
|
31352
|
-
fontSize: "16px",
|
|
31353
|
-
color: "#716c7f",
|
|
31354
|
-
textAlign: "center",
|
|
31355
|
-
lineHeight: "1.3",
|
|
31356
|
-
fontFamily: "'Inter', sans-serif",
|
|
31357
|
-
fontWeight: "normal"
|
|
31358
|
-
}
|
|
31359
|
-
},
|
|
31360
|
-
"Please wait, Tina is loading data..."
|
|
31361
|
-
)
|
|
31362
|
-
)
|
|
31363
|
-
));
|
|
31364
|
-
const FullscreenError = ({
|
|
31365
|
-
title = "Error",
|
|
31366
|
-
errorMessage = "It looks like something went wrong."
|
|
31367
|
-
}) => {
|
|
31368
|
-
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-center items-center h-screen bg-gray-100" }, /* @__PURE__ */ React.createElement("div", { className: "text-red-500 text-4xl mb-6 flex items-center" }, /* @__PURE__ */ React.createElement(BiError, { className: "w-12 h-auto fill-current text-red-400 opacity-70 mr-1" }), " ", title), /* @__PURE__ */ React.createElement("p", { className: "text-gray-700 text-xl mb-8" }, errorMessage), /* @__PURE__ */ React.createElement(Button$1, { variant: "danger", onClick: () => window.location.reload() }, /* @__PURE__ */ React.createElement(BiSync, { className: "w-7 h-auto fill-current opacity-70 mr-1" }), " Reload"));
|
|
31369
|
-
};
|
|
31370
|
-
const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
|
|
31371
|
-
const api = new TinaAdminApi(cms);
|
|
31372
|
-
const schema = cms.api.tina.schema;
|
|
31373
|
-
const collectionExtra = schema.getCollection(collectionName);
|
|
31374
|
-
const [collection, setCollection] = React.useState(void 0);
|
|
31375
|
-
const [loading, setLoading] = React.useState(true);
|
|
31376
|
-
const [error, setError] = React.useState(void 0);
|
|
31377
|
-
const [resetState, setResetSate] = React.useState(0);
|
|
31378
|
-
React.useEffect(() => {
|
|
31379
|
-
let cancelled = false;
|
|
31380
|
-
const fetchCollection = async () => {
|
|
31381
|
-
var _a;
|
|
31382
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31383
|
-
const { name, order } = JSON.parse(sortKey || "{}");
|
|
31384
|
-
const validSortKey = ((_a = collectionExtra.fields) == null ? void 0 : _a.map((x) => x.name).includes(name)) ? name : void 0;
|
|
31385
|
-
try {
|
|
31386
|
-
const collection2 = await api.fetchCollection(
|
|
31387
|
-
collectionName,
|
|
31388
|
-
includeDocuments,
|
|
31389
|
-
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
31390
|
-
after,
|
|
31391
|
-
validSortKey,
|
|
31392
|
-
order,
|
|
31393
|
-
filterArgs
|
|
31394
|
-
);
|
|
31395
|
-
setCollection(collection2);
|
|
31396
|
-
} catch (error2) {
|
|
31397
|
-
cms.alerts.error(
|
|
31398
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31399
|
-
);
|
|
31400
|
-
console.error(error2);
|
|
31401
|
-
setCollection(void 0);
|
|
31402
|
-
setError(error2);
|
|
31403
|
-
}
|
|
31404
|
-
setLoading(false);
|
|
31405
|
-
}
|
|
31406
|
-
};
|
|
31407
|
-
if (cancelled)
|
|
31408
|
-
return;
|
|
31409
|
-
setLoading(true);
|
|
31410
|
-
fetchCollection();
|
|
31411
|
-
return () => {
|
|
31412
|
-
cancelled = true;
|
|
31413
|
-
};
|
|
31414
|
-
}, [
|
|
31415
|
-
cms,
|
|
31416
|
-
collectionName,
|
|
31417
|
-
folder.loading,
|
|
31418
|
-
folder.fullyQualifiedName,
|
|
31419
|
-
resetState,
|
|
31420
|
-
after,
|
|
31421
|
-
sortKey
|
|
31422
|
-
]);
|
|
31423
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31424
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
31425
|
-
};
|
|
31426
|
-
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
31427
|
-
const api = new TinaAdminApi(cms);
|
|
31428
|
-
const schema = cms.api.tina.schema;
|
|
31429
|
-
const collectionExtra = schema.getCollection(collectionName);
|
|
31430
|
-
const [collection, setCollection] = React.useState(void 0);
|
|
31431
|
-
const [loading, setLoading] = React.useState(true);
|
|
31432
|
-
const [error, setError] = React.useState(void 0);
|
|
31433
|
-
const [resetState, setResetSate] = React.useState(0);
|
|
31434
|
-
React.useEffect(() => {
|
|
31435
|
-
let cancelled = false;
|
|
31436
|
-
const searchCollection = async () => {
|
|
31437
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31438
|
-
try {
|
|
31439
|
-
const response = await cms.api.search.query(
|
|
31440
|
-
`${search} AND _collection:${collectionName}`,
|
|
31441
|
-
{
|
|
31442
|
-
limit: 15,
|
|
31443
|
-
cursor: after
|
|
31444
|
-
}
|
|
31445
|
-
);
|
|
31446
|
-
const docs = await Promise.allSettled(
|
|
31447
|
-
response.results.map((result) => {
|
|
31448
|
-
const [collection2, relativePath2] = result._id.split(":");
|
|
31449
|
-
return api.fetchDocument(collection2, relativePath2, false);
|
|
31450
|
-
})
|
|
31451
|
-
);
|
|
31452
|
-
const edges = docs.filter((p) => {
|
|
31453
|
-
var _a;
|
|
31454
|
-
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
31455
|
-
}).map((result) => ({ node: result.value.document }));
|
|
31456
|
-
const c = await api.fetchCollection(collectionName, false, "");
|
|
31457
|
-
setCollection({
|
|
31458
|
-
format: collection.format,
|
|
31459
|
-
label: collection.label,
|
|
31460
|
-
name: collectionName,
|
|
31461
|
-
templates: collection.templates,
|
|
31462
|
-
documents: {
|
|
31463
|
-
pageInfo: {
|
|
31464
|
-
hasNextPage: !!response.nextCursor,
|
|
31465
|
-
hasPreviousPage: !!response.prevCursor,
|
|
31466
|
-
startCursor: "",
|
|
31467
|
-
endCursor: response.nextCursor || ""
|
|
31468
|
-
},
|
|
31469
|
-
edges
|
|
31470
|
-
}
|
|
31471
|
-
});
|
|
31472
|
-
} catch (error2) {
|
|
31473
|
-
cms.alerts.error(
|
|
31474
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31475
|
-
);
|
|
31476
|
-
console.error(error2);
|
|
31477
|
-
setCollection(void 0);
|
|
31478
|
-
setError(error2);
|
|
31479
|
-
}
|
|
31480
|
-
setLoading(false);
|
|
31481
|
-
}
|
|
31482
|
-
};
|
|
31483
|
-
if (cancelled)
|
|
31484
|
-
return;
|
|
31485
|
-
setLoading(true);
|
|
31486
|
-
searchCollection();
|
|
31487
|
-
return () => {
|
|
31488
|
-
cancelled = true;
|
|
31489
|
-
};
|
|
31490
|
-
}, [
|
|
31491
|
-
cms,
|
|
31492
|
-
collectionName,
|
|
31493
|
-
folder.loading,
|
|
31494
|
-
folder.fullyQualifiedName,
|
|
31495
|
-
resetState,
|
|
31496
|
-
after,
|
|
31497
|
-
search
|
|
31498
|
-
]);
|
|
31499
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31500
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
31501
|
-
};
|
|
31502
|
-
const GetCollection = ({
|
|
31503
|
-
cms,
|
|
31504
|
-
collectionName,
|
|
31505
|
-
folder,
|
|
31506
|
-
includeDocuments = true,
|
|
31507
|
-
startCursor,
|
|
31508
|
-
sortKey,
|
|
31509
|
-
children,
|
|
31510
|
-
filterArgs,
|
|
31511
|
-
search
|
|
31512
|
-
}) => {
|
|
31513
|
-
const navigate = reactRouterDom.useNavigate();
|
|
31514
|
-
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? useSearchCollection(
|
|
31515
|
-
cms,
|
|
31516
|
-
collectionName,
|
|
31517
|
-
includeDocuments,
|
|
31518
|
-
folder,
|
|
31519
|
-
startCursor || "",
|
|
31520
|
-
search
|
|
31521
|
-
) : useGetCollection(
|
|
31522
|
-
cms,
|
|
31523
|
-
collectionName,
|
|
31524
|
-
includeDocuments,
|
|
31525
|
-
folder,
|
|
31526
|
-
startCursor || "",
|
|
31527
|
-
sortKey,
|
|
31528
|
-
filterArgs
|
|
31529
|
-
) || {};
|
|
31530
|
-
React.useEffect(() => {
|
|
31531
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
31532
|
-
if (loading)
|
|
31533
|
-
return;
|
|
31534
|
-
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
31535
|
-
collection.name
|
|
31536
|
-
);
|
|
31537
|
-
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
31538
|
-
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
31539
|
-
const collectionResponse = collection;
|
|
31540
|
-
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
31541
|
-
((_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
|
|
31542
|
-
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
31543
|
-
const doc = collectionResponse.documents.edges[0].node;
|
|
31544
|
-
handleNavigate(
|
|
31545
|
-
navigate,
|
|
31546
|
-
cms,
|
|
31547
|
-
collectionResponse,
|
|
31548
|
-
collectionDefinition,
|
|
31549
|
-
doc
|
|
31550
|
-
);
|
|
31551
|
-
}
|
|
31552
|
-
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
31553
|
-
if (error) {
|
|
31554
|
-
return /* @__PURE__ */ React.createElement(FullscreenError, null);
|
|
31555
|
-
}
|
|
31556
|
-
if (loading) {
|
|
31557
|
-
return /* @__PURE__ */ React.createElement(LoadingPage, null);
|
|
31558
|
-
}
|
|
31559
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
31560
|
-
};
|
|
31561
32655
|
const folderRegex = /^.*\/~\/*(.*)$/;
|
|
31562
32656
|
const parentFolder = (folder) => {
|
|
31563
32657
|
return {
|
|
@@ -31677,6 +32771,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31677
32771
|
const [vars, setVars] = React.useState({
|
|
31678
32772
|
collection: collectionName,
|
|
31679
32773
|
relativePath: "",
|
|
32774
|
+
relativePathWithoutExtension: "",
|
|
31680
32775
|
newRelativePath: "",
|
|
31681
32776
|
filterField: "",
|
|
31682
32777
|
folderName: "",
|
|
@@ -31718,6 +32813,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31718
32813
|
...old,
|
|
31719
32814
|
collection: collectionName,
|
|
31720
32815
|
relativePath: "",
|
|
32816
|
+
relativePathWithoutExtension: "",
|
|
31721
32817
|
newRelativePath: "",
|
|
31722
32818
|
filterField: "",
|
|
31723
32819
|
startsWith: "",
|
|
@@ -31743,6 +32839,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31743
32839
|
collectionName === vars.collection ? vars : {
|
|
31744
32840
|
collection: collectionName,
|
|
31745
32841
|
relativePath: "",
|
|
32842
|
+
relativePathWithoutExtension: "",
|
|
31746
32843
|
newRelativePath: "",
|
|
31747
32844
|
filterField: "",
|
|
31748
32845
|
startsWith: "",
|
|
@@ -31830,7 +32927,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31830
32927
|
safeSubmit: async () => {
|
|
31831
32928
|
try {
|
|
31832
32929
|
await admin.deleteDocument(vars);
|
|
31833
|
-
cms.alerts.info(
|
|
32930
|
+
cms.alerts.info(
|
|
32931
|
+
"Document was successfully deleted"
|
|
32932
|
+
);
|
|
31834
32933
|
reFetchCollection();
|
|
31835
32934
|
} catch (error) {
|
|
31836
32935
|
cms.alerts.warn(
|
|
@@ -31844,7 +32943,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31844
32943
|
), renameModalOpen && /* @__PURE__ */ React.createElement(
|
|
31845
32944
|
RenameModal,
|
|
31846
32945
|
{
|
|
31847
|
-
filename: vars.
|
|
32946
|
+
filename: vars.relativePathWithoutExtension,
|
|
31848
32947
|
newRelativePath: vars.newRelativePath,
|
|
31849
32948
|
setNewRelativePath: (newRelativePath) => {
|
|
31850
32949
|
setVars((vars2) => {
|
|
@@ -31859,7 +32958,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31859
32958
|
relativePath: vars.relativePath,
|
|
31860
32959
|
newRelativePath
|
|
31861
32960
|
});
|
|
31862
|
-
cms.alerts.info(
|
|
32961
|
+
cms.alerts.info(
|
|
32962
|
+
"Document was successfully renamed"
|
|
32963
|
+
);
|
|
31863
32964
|
reFetchCollection();
|
|
31864
32965
|
} catch (error) {
|
|
31865
32966
|
if (error.message.indexOf("has references")) {
|
|
@@ -31959,7 +33060,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31959
33060
|
name: "sort",
|
|
31960
33061
|
value: sortKey,
|
|
31961
33062
|
onChange: (e) => {
|
|
31962
|
-
const val = JSON.parse(
|
|
33063
|
+
const val = JSON.parse(
|
|
33064
|
+
e.target.value
|
|
33065
|
+
);
|
|
31963
33066
|
setEndCursor("");
|
|
31964
33067
|
setPrevCursors([]);
|
|
31965
33068
|
window == null ? void 0 : window.localStorage.setItem(
|
|
@@ -32165,6 +33268,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32165
33268
|
setVars((old) => ({
|
|
32166
33269
|
...old,
|
|
32167
33270
|
collection: collectionName,
|
|
33271
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33272
|
+
"/"
|
|
33273
|
+
),
|
|
32168
33274
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32169
33275
|
"/"
|
|
32170
33276
|
) + document2.node._sys.extension,
|
|
@@ -32187,6 +33293,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32187
33293
|
setVars((old) => ({
|
|
32188
33294
|
...old,
|
|
32189
33295
|
collection: collectionName,
|
|
33296
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33297
|
+
"/"
|
|
33298
|
+
),
|
|
32190
33299
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32191
33300
|
"/"
|
|
32192
33301
|
) + document2.node._sys.extension,
|
|
@@ -32399,7 +33508,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32399
33508
|
newRelativePath,
|
|
32400
33509
|
setNewRelativePath
|
|
32401
33510
|
}) => {
|
|
32402
|
-
return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React.createElement("strong", null, filename), "?
|
|
33511
|
+
return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React.createElement("strong", null, filename), "?"), /* @__PURE__ */ React.createElement(
|
|
32403
33512
|
BaseTextField,
|
|
32404
33513
|
{
|
|
32405
33514
|
placeholder: "Enter a new name for the document's file",
|
|
@@ -32414,11 +33523,237 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32414
33523
|
onClick: async () => {
|
|
32415
33524
|
await renameFunc();
|
|
32416
33525
|
close2();
|
|
32417
|
-
}
|
|
33526
|
+
},
|
|
33527
|
+
disabled: !newRelativePath || newRelativePath === filename
|
|
32418
33528
|
},
|
|
32419
33529
|
"Rename"
|
|
32420
33530
|
))));
|
|
32421
33531
|
};
|
|
33532
|
+
const FullscreenError = ({
|
|
33533
|
+
title = "Error",
|
|
33534
|
+
errorMessage = "It looks like something went wrong."
|
|
33535
|
+
}) => {
|
|
33536
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-center items-center h-screen bg-gray-100" }, /* @__PURE__ */ React.createElement("div", { className: "text-red-500 text-4xl mb-6 flex items-center" }, /* @__PURE__ */ React.createElement(BiError, { className: "w-12 h-auto fill-current text-red-400 opacity-70 mr-1" }), " ", title), /* @__PURE__ */ React.createElement("p", { className: "text-gray-700 text-xl mb-8" }, errorMessage), /* @__PURE__ */ React.createElement(Button$1, { variant: "danger", onClick: () => window.location.reload() }, /* @__PURE__ */ React.createElement(BiSync, { className: "w-7 h-auto fill-current opacity-70 mr-1" }), " Reload"));
|
|
33537
|
+
};
|
|
33538
|
+
const isValidSortKey = (sortKey, collection) => {
|
|
33539
|
+
if (collection.fields) {
|
|
33540
|
+
const sortKeys = collection.fields.map((x) => x.name);
|
|
33541
|
+
return sortKeys.includes(sortKey);
|
|
33542
|
+
} else if (collection.templates) {
|
|
33543
|
+
const collectionMap = {};
|
|
33544
|
+
const conflictedFields = /* @__PURE__ */ new Set();
|
|
33545
|
+
for (const template of collection.templates) {
|
|
33546
|
+
for (const field of template.fields) {
|
|
33547
|
+
if (collectionMap[field.name]) {
|
|
33548
|
+
if (collectionMap[field.name].type !== field.type) {
|
|
33549
|
+
conflictedFields.add(field.name);
|
|
33550
|
+
}
|
|
33551
|
+
} else {
|
|
33552
|
+
collectionMap[field.name] = field;
|
|
33553
|
+
}
|
|
33554
|
+
}
|
|
33555
|
+
}
|
|
33556
|
+
for (const key in conflictedFields) {
|
|
33557
|
+
delete collectionMap[key];
|
|
33558
|
+
}
|
|
33559
|
+
for (const key in collectionMap) {
|
|
33560
|
+
if (key === sortKey) {
|
|
33561
|
+
return true;
|
|
33562
|
+
}
|
|
33563
|
+
}
|
|
33564
|
+
return false;
|
|
33565
|
+
}
|
|
33566
|
+
};
|
|
33567
|
+
const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
|
|
33568
|
+
const api = new TinaAdminApi(cms);
|
|
33569
|
+
const schema = cms.api.tina.schema;
|
|
33570
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33571
|
+
const [collection, setCollection] = React.useState(void 0);
|
|
33572
|
+
const [loading, setLoading] = React.useState(true);
|
|
33573
|
+
const [error, setError] = React.useState(void 0);
|
|
33574
|
+
const [resetState, setResetSate] = React.useState(0);
|
|
33575
|
+
React.useEffect(() => {
|
|
33576
|
+
let cancelled = false;
|
|
33577
|
+
const fetchCollection = async () => {
|
|
33578
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33579
|
+
const { name, order } = JSON.parse(sortKey || "{}");
|
|
33580
|
+
const validSortKey = isValidSortKey(name, collectionExtra) ? name : void 0;
|
|
33581
|
+
try {
|
|
33582
|
+
const collection2 = await api.fetchCollection(
|
|
33583
|
+
collectionName,
|
|
33584
|
+
includeDocuments,
|
|
33585
|
+
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
33586
|
+
after,
|
|
33587
|
+
validSortKey,
|
|
33588
|
+
order,
|
|
33589
|
+
filterArgs
|
|
33590
|
+
);
|
|
33591
|
+
setCollection(collection2);
|
|
33592
|
+
} catch (error2) {
|
|
33593
|
+
cms.alerts.error(
|
|
33594
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33595
|
+
);
|
|
33596
|
+
console.error(error2);
|
|
33597
|
+
setCollection(void 0);
|
|
33598
|
+
setError(error2);
|
|
33599
|
+
}
|
|
33600
|
+
setLoading(false);
|
|
33601
|
+
}
|
|
33602
|
+
};
|
|
33603
|
+
if (cancelled)
|
|
33604
|
+
return;
|
|
33605
|
+
setLoading(true);
|
|
33606
|
+
fetchCollection();
|
|
33607
|
+
return () => {
|
|
33608
|
+
cancelled = true;
|
|
33609
|
+
};
|
|
33610
|
+
}, [
|
|
33611
|
+
cms,
|
|
33612
|
+
collectionName,
|
|
33613
|
+
folder.loading,
|
|
33614
|
+
folder.fullyQualifiedName,
|
|
33615
|
+
resetState,
|
|
33616
|
+
after,
|
|
33617
|
+
sortKey
|
|
33618
|
+
]);
|
|
33619
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33620
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33621
|
+
};
|
|
33622
|
+
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
33623
|
+
const api = new TinaAdminApi(cms);
|
|
33624
|
+
const schema = cms.api.tina.schema;
|
|
33625
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33626
|
+
const [collection, setCollection] = React.useState(void 0);
|
|
33627
|
+
const [loading, setLoading] = React.useState(true);
|
|
33628
|
+
const [error, setError] = React.useState(void 0);
|
|
33629
|
+
const [resetState, setResetSate] = React.useState(0);
|
|
33630
|
+
React.useEffect(() => {
|
|
33631
|
+
let cancelled = false;
|
|
33632
|
+
const searchCollection = async () => {
|
|
33633
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33634
|
+
try {
|
|
33635
|
+
const response = await cms.api.search.query(
|
|
33636
|
+
`${search} AND _collection:${collectionName}`,
|
|
33637
|
+
{
|
|
33638
|
+
limit: 15,
|
|
33639
|
+
cursor: after
|
|
33640
|
+
}
|
|
33641
|
+
);
|
|
33642
|
+
const docs = await Promise.allSettled(
|
|
33643
|
+
response.results.map((result) => {
|
|
33644
|
+
const [collection2, relativePath2] = result._id.split(":");
|
|
33645
|
+
return api.fetchDocument(collection2, relativePath2, false);
|
|
33646
|
+
})
|
|
33647
|
+
);
|
|
33648
|
+
const edges = docs.filter((p) => {
|
|
33649
|
+
var _a;
|
|
33650
|
+
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
33651
|
+
}).map((result) => ({ node: result.value.document }));
|
|
33652
|
+
const c = await api.fetchCollection(collectionName, false, "");
|
|
33653
|
+
setCollection({
|
|
33654
|
+
format: collection.format,
|
|
33655
|
+
label: collection.label,
|
|
33656
|
+
name: collectionName,
|
|
33657
|
+
templates: collection.templates,
|
|
33658
|
+
documents: {
|
|
33659
|
+
pageInfo: {
|
|
33660
|
+
hasNextPage: !!response.nextCursor,
|
|
33661
|
+
hasPreviousPage: !!response.prevCursor,
|
|
33662
|
+
startCursor: "",
|
|
33663
|
+
endCursor: response.nextCursor || ""
|
|
33664
|
+
},
|
|
33665
|
+
edges
|
|
33666
|
+
}
|
|
33667
|
+
});
|
|
33668
|
+
} catch (error2) {
|
|
33669
|
+
cms.alerts.error(
|
|
33670
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33671
|
+
);
|
|
33672
|
+
console.error(error2);
|
|
33673
|
+
setCollection(void 0);
|
|
33674
|
+
setError(error2);
|
|
33675
|
+
}
|
|
33676
|
+
setLoading(false);
|
|
33677
|
+
}
|
|
33678
|
+
};
|
|
33679
|
+
if (cancelled)
|
|
33680
|
+
return;
|
|
33681
|
+
setLoading(true);
|
|
33682
|
+
searchCollection();
|
|
33683
|
+
return () => {
|
|
33684
|
+
cancelled = true;
|
|
33685
|
+
};
|
|
33686
|
+
}, [
|
|
33687
|
+
cms,
|
|
33688
|
+
collectionName,
|
|
33689
|
+
folder.loading,
|
|
33690
|
+
folder.fullyQualifiedName,
|
|
33691
|
+
resetState,
|
|
33692
|
+
after,
|
|
33693
|
+
search
|
|
33694
|
+
]);
|
|
33695
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33696
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33697
|
+
};
|
|
33698
|
+
const GetCollection = ({
|
|
33699
|
+
cms,
|
|
33700
|
+
collectionName,
|
|
33701
|
+
folder,
|
|
33702
|
+
includeDocuments = true,
|
|
33703
|
+
startCursor,
|
|
33704
|
+
sortKey,
|
|
33705
|
+
children,
|
|
33706
|
+
filterArgs,
|
|
33707
|
+
search
|
|
33708
|
+
}) => {
|
|
33709
|
+
const navigate = reactRouterDom.useNavigate();
|
|
33710
|
+
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? useSearchCollection(
|
|
33711
|
+
cms,
|
|
33712
|
+
collectionName,
|
|
33713
|
+
includeDocuments,
|
|
33714
|
+
folder,
|
|
33715
|
+
startCursor || "",
|
|
33716
|
+
search
|
|
33717
|
+
) : useGetCollection(
|
|
33718
|
+
cms,
|
|
33719
|
+
collectionName,
|
|
33720
|
+
includeDocuments,
|
|
33721
|
+
folder,
|
|
33722
|
+
startCursor || "",
|
|
33723
|
+
sortKey,
|
|
33724
|
+
filterArgs
|
|
33725
|
+
) || {};
|
|
33726
|
+
React.useEffect(() => {
|
|
33727
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
33728
|
+
if (loading)
|
|
33729
|
+
return;
|
|
33730
|
+
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
33731
|
+
collection.name
|
|
33732
|
+
);
|
|
33733
|
+
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
33734
|
+
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
33735
|
+
const collectionResponse = collection;
|
|
33736
|
+
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
33737
|
+
((_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
|
|
33738
|
+
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
33739
|
+
const doc = collectionResponse.documents.edges[0].node;
|
|
33740
|
+
handleNavigate(
|
|
33741
|
+
navigate,
|
|
33742
|
+
cms,
|
|
33743
|
+
collectionResponse,
|
|
33744
|
+
collectionDefinition,
|
|
33745
|
+
doc
|
|
33746
|
+
);
|
|
33747
|
+
}
|
|
33748
|
+
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
33749
|
+
if (error) {
|
|
33750
|
+
return /* @__PURE__ */ React.createElement(FullscreenError, null);
|
|
33751
|
+
}
|
|
33752
|
+
if (loading) {
|
|
33753
|
+
return /* @__PURE__ */ React.createElement(LoadingPage, null);
|
|
33754
|
+
}
|
|
33755
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
33756
|
+
};
|
|
32422
33757
|
const ErrorDialog = (props) => {
|
|
32423
33758
|
return /* @__PURE__ */ React.createElement(
|
|
32424
33759
|
"div",
|
|
@@ -32741,7 +34076,10 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32741
34076
|
const fetchDocument = async () => {
|
|
32742
34077
|
if (api.isAuthenticated()) {
|
|
32743
34078
|
try {
|
|
32744
|
-
const response = await api.fetchDocument(
|
|
34079
|
+
const response = await api.fetchDocument(
|
|
34080
|
+
collectionName,
|
|
34081
|
+
relativePath2
|
|
34082
|
+
);
|
|
32745
34083
|
setDocument(response.document);
|
|
32746
34084
|
} catch (error2) {
|
|
32747
34085
|
cms.alerts.error(
|
|
@@ -32959,6 +34297,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32959
34297
|
), /* @__PURE__ */ React.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "flex-1 w-full text-sm leading-tight whitespace-nowrap truncate" }, `${filename}.${collection.format}`), /* @__PURE__ */ React.createElement(FormStatus, { pristine: formIsPristine }))
|
|
32960
34298
|
), activeForm && /* @__PURE__ */ React.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine }));
|
|
32961
34299
|
};
|
|
34300
|
+
const DashboardPage = () => {
|
|
34301
|
+
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
34302
|
+
var _a, _b;
|
|
34303
|
+
return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PageHeader, { isLocalMode: (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode }, /* @__PURE__ */ React.createElement("h3", { className: "text-2xl font-sans text-gray-700" }, "Welcome to Tina!")), /* @__PURE__ */ React.createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
|
|
34304
|
+
});
|
|
34305
|
+
};
|
|
32962
34306
|
const ScreenPage = () => {
|
|
32963
34307
|
const { screenName } = reactRouterDom.useParams();
|
|
32964
34308
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
@@ -33041,7 +34385,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33041
34385
|
} catch {
|
|
33042
34386
|
cms.alerts.error("Branch indexing failed.");
|
|
33043
34387
|
setErrorMessage(
|
|
33044
|
-
'Branch indexing failed, please check the
|
|
34388
|
+
'Branch indexing failed, please check the TinaCloud dashboard for more information. To try again chick "re-index" on the branch in the dashboard.'
|
|
33045
34389
|
);
|
|
33046
34390
|
setState("error");
|
|
33047
34391
|
}
|
|
@@ -33085,15 +34429,24 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33085
34429
|
}
|
|
33086
34430
|
}
|
|
33087
34431
|
if (state === "creatingPR") {
|
|
33088
|
-
|
|
33089
|
-
|
|
33090
|
-
|
|
33091
|
-
|
|
33092
|
-
|
|
33093
|
-
|
|
33094
|
-
|
|
33095
|
-
|
|
33096
|
-
|
|
34432
|
+
try {
|
|
34433
|
+
const foo = await tinaApi.createPullRequest({
|
|
34434
|
+
baseBranch,
|
|
34435
|
+
branch,
|
|
34436
|
+
title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
|
|
34437
|
+
});
|
|
34438
|
+
console.log("PR created", foo);
|
|
34439
|
+
cms.alerts.success("Pull request created.");
|
|
34440
|
+
localStorage.setItem("tina.createBranchState", "done");
|
|
34441
|
+
setState("done");
|
|
34442
|
+
} catch (e) {
|
|
34443
|
+
console.error(e);
|
|
34444
|
+
cms.alerts.error("Failed to create PR");
|
|
34445
|
+
setErrorMessage(
|
|
34446
|
+
"Failed to create PR, please try again. If the problem persists please contact support."
|
|
34447
|
+
);
|
|
34448
|
+
setState("error");
|
|
34449
|
+
}
|
|
33097
34450
|
}
|
|
33098
34451
|
if (state === "done") {
|
|
33099
34452
|
window.location.href = back;
|
|
@@ -33200,7 +34553,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33200
34553
|
);
|
|
33201
34554
|
}
|
|
33202
34555
|
}).catch((e) => {
|
|
33203
|
-
if (e.message.includes("has not been indexed by
|
|
34556
|
+
if (e.message.includes("has not been indexed by TinaCloud")) {
|
|
33204
34557
|
setSchemaMissingError(true);
|
|
33205
34558
|
} else {
|
|
33206
34559
|
cms.alerts.error(`Unexpected error checking schema: ${e}`);
|