tinacms 0.0.0-ed3db71-20250205054832 → 0.0.0-ee8d9a3-20250429131017
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/admin/api.d.ts +1 -0
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client.js +11 -1
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +11 -1
- package/dist/client.mjs.map +1 -0
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.js +2278 -964
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2288 -974
- package/dist/index.mjs.map +1 -0
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/node-cache-5e8db9f0.mjs +1 -0
- package/dist/node-cache-5e8db9f0.mjs.map +1 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +14 -1
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +14 -1
- package/dist/react.mjs.map +1 -0
- package/dist/rich-text/index.js +1 -0
- package/dist/rich-text/index.js.map +1 -0
- package/dist/rich-text/index.mjs +1 -0
- package/dist/rich-text/index.mjs.map +1 -0
- package/dist/rich-text/prism.js +2 -1
- package/dist/rich-text/prism.js.map +1 -0
- package/dist/rich-text/prism.mjs +2 -1
- package/dist/rich-text/prism.mjs.map +1 -0
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/tina-state.d.ts +4 -0
- package/dist/unifiedClient/index.d.ts +1 -1
- package/package.json +35 -35
- 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("
|
|
3
|
-
})(this, function(exports2, zod, React, reactDom, cn$1, plate, plateCommon, plateSlashCommand,
|
|
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("@udecode/plate-code-block"), require("@monaco-editor/react"), require("slate-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", "@udecode/plate-code-block", "@monaco-editor/react", "slate-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, plateCodeBlock, MonacoEditor, slateReact, 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]: ({
|
|
@@ -2954,7 +2954,6 @@ flowchart TD
|
|
|
2954
2954
|
children,
|
|
2955
2955
|
...props
|
|
2956
2956
|
}) => {
|
|
2957
|
-
const selected = slateReact.useSelected();
|
|
2958
2957
|
return /* @__PURE__ */ React.createElement(
|
|
2959
2958
|
"div",
|
|
2960
2959
|
{
|
|
@@ -2965,8 +2964,7 @@ flowchart TD
|
|
|
2965
2964
|
...attributes,
|
|
2966
2965
|
...props
|
|
2967
2966
|
},
|
|
2968
|
-
children
|
|
2969
|
-
selected && /* @__PURE__ */ React.createElement("span", { className: "absolute h-4 -top-2 inset-0 ring-2 ring-blue-100 ring-inset rounded-md z-10 pointer-events-none" })
|
|
2967
|
+
children
|
|
2970
2968
|
);
|
|
2971
2969
|
},
|
|
2972
2970
|
[plate.ELEMENT_TABLE]: TableElement,
|
|
@@ -4403,36 +4401,6 @@ flowchart TD
|
|
|
4403
4401
|
function MdOutlinePerson(props) {
|
|
4404
4402
|
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
4403
|
}
|
|
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
4404
|
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
4405
|
const disabledClasses$1 = "opacity-50 pointer-events-none cursor-not-allowed";
|
|
4438
4406
|
const BaseTextField = React__namespace.forwardRef(({ className, disabled, ...rest }, ref) => {
|
|
@@ -5197,7 +5165,7 @@ flowchart TD
|
|
|
5197
5165
|
side: "bottom",
|
|
5198
5166
|
className: cn(
|
|
5199
5167
|
"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-[
|
|
5168
|
+
"max-h-[30vh] max-w-[30vw] overflow-y-auto",
|
|
5201
5169
|
className
|
|
5202
5170
|
),
|
|
5203
5171
|
...props
|
|
@@ -5289,11 +5257,7 @@ flowchart TD
|
|
|
5289
5257
|
const node = nodes.find((node2) => node2.id === value);
|
|
5290
5258
|
return node ? node._internalSys.filename : null;
|
|
5291
5259
|
};
|
|
5292
|
-
const
|
|
5293
|
-
cms,
|
|
5294
|
-
input,
|
|
5295
|
-
field
|
|
5296
|
-
}) => {
|
|
5260
|
+
const Combobox = ({ cms, input, field }) => {
|
|
5297
5261
|
const [open2, setOpen] = React__namespace.useState(false);
|
|
5298
5262
|
const [value, setValue] = React__namespace.useState(input.value);
|
|
5299
5263
|
const [displayText, setDisplayText] = React__namespace.useState(null);
|
|
@@ -5309,7 +5273,9 @@ flowchart TD
|
|
|
5309
5273
|
}, [value, input, optionSets]);
|
|
5310
5274
|
React__namespace.useEffect(() => {
|
|
5311
5275
|
if (field.experimental___filter && optionSets.length > 0) {
|
|
5312
|
-
setFilteredOptionsList(
|
|
5276
|
+
setFilteredOptionsList(
|
|
5277
|
+
field.experimental___filter(optionSets, void 0)
|
|
5278
|
+
);
|
|
5313
5279
|
} else {
|
|
5314
5280
|
setFilteredOptionsList(optionSets);
|
|
5315
5281
|
}
|
|
@@ -5317,17 +5283,17 @@ flowchart TD
|
|
|
5317
5283
|
if (loading === true) {
|
|
5318
5284
|
return /* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
|
|
5319
5285
|
}
|
|
5320
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
5286
|
+
return /* @__PURE__ */ React__namespace.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React__namespace.createElement(
|
|
5321
5287
|
Button,
|
|
5322
5288
|
{
|
|
5323
5289
|
variant: "outline",
|
|
5324
5290
|
role: "combobox",
|
|
5325
5291
|
"aria-expanded": open2,
|
|
5326
|
-
className: "w-
|
|
5292
|
+
className: "w-full justify-between"
|
|
5327
5293
|
},
|
|
5328
5294
|
/* @__PURE__ */ React__namespace.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
|
|
5329
5295
|
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(
|
|
5296
|
+
)), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React__namespace.createElement(
|
|
5331
5297
|
Command,
|
|
5332
5298
|
{
|
|
5333
5299
|
shouldFilter: !field.experimental___filter,
|
|
@@ -5351,32 +5317,25 @@ flowchart TD
|
|
|
5351
5317
|
}
|
|
5352
5318
|
),
|
|
5353
5319
|
/* @__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
|
-
}
|
|
5320
|
+
/* @__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 }) => {
|
|
5321
|
+
const { id, _values } = node;
|
|
5322
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
5323
|
+
OptionComponent,
|
|
5324
|
+
{
|
|
5325
|
+
id,
|
|
5326
|
+
key: id,
|
|
5327
|
+
value,
|
|
5328
|
+
field,
|
|
5329
|
+
_values,
|
|
5330
|
+
node,
|
|
5331
|
+
onSelect: (currentValue) => {
|
|
5332
|
+
setValue(currentValue);
|
|
5333
|
+
setOpen(false);
|
|
5375
5334
|
}
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
))))
|
|
5379
|
-
)))
|
|
5335
|
+
}
|
|
5336
|
+
);
|
|
5337
|
+
}))))))
|
|
5338
|
+
)));
|
|
5380
5339
|
};
|
|
5381
5340
|
const useGetNode = (cms, id) => {
|
|
5382
5341
|
const [document2, setDocument] = React__namespace.useState(
|
|
@@ -5449,7 +5408,7 @@ flowchart TD
|
|
|
5449
5408
|
};
|
|
5450
5409
|
const Reference = ({ input, field }) => {
|
|
5451
5410
|
const cms = useCMS();
|
|
5452
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
5411
|
+
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
5412
|
};
|
|
5454
5413
|
const ButtonToggle = ({
|
|
5455
5414
|
input,
|
|
@@ -5686,7 +5645,9 @@ flowchart TD
|
|
|
5686
5645
|
onClick: () => {
|
|
5687
5646
|
const state = tinaForm.finalForm.getState();
|
|
5688
5647
|
if (state.invalid === true) {
|
|
5689
|
-
cms.alerts.error(
|
|
5648
|
+
cms.alerts.error(
|
|
5649
|
+
"Cannot navigate away from an invalid form."
|
|
5650
|
+
);
|
|
5690
5651
|
return;
|
|
5691
5652
|
}
|
|
5692
5653
|
cms.dispatch({
|
|
@@ -6270,7 +6231,9 @@ flowchart TD
|
|
|
6270
6231
|
onClick: () => {
|
|
6271
6232
|
const state = tinaForm.finalForm.getState();
|
|
6272
6233
|
if (state.invalid === true) {
|
|
6273
|
-
cms.alerts.error(
|
|
6234
|
+
cms.alerts.error(
|
|
6235
|
+
"Cannot navigate away from an invalid form."
|
|
6236
|
+
);
|
|
6274
6237
|
return;
|
|
6275
6238
|
}
|
|
6276
6239
|
cms.dispatch({
|
|
@@ -6752,28 +6715,28 @@ flowchart TD
|
|
|
6752
6715
|
}
|
|
6753
6716
|
renderDayHeaders() {
|
|
6754
6717
|
const locale = this.props.viewDate.localeData();
|
|
6755
|
-
|
|
6718
|
+
const dayItems = getDaysOfWeek(locale).map((day, index) => /* @__PURE__ */ React.createElement("th", { key: day + index, className: "dow" }, day));
|
|
6756
6719
|
return /* @__PURE__ */ React.createElement("tr", null, dayItems);
|
|
6757
6720
|
}
|
|
6758
6721
|
renderDays() {
|
|
6759
6722
|
const date = this.props.viewDate;
|
|
6760
6723
|
const startOfMonth = date.clone().startOf("month");
|
|
6761
6724
|
const endOfMonth = date.clone().endOf("month");
|
|
6762
|
-
|
|
6763
|
-
|
|
6725
|
+
const rows = [[], [], [], [], [], []];
|
|
6726
|
+
const startDate = date.clone().subtract(1, "months");
|
|
6764
6727
|
startDate.date(startDate.daysInMonth()).startOf("week");
|
|
6765
|
-
|
|
6728
|
+
const endDate = startDate.clone().add(42, "d");
|
|
6766
6729
|
let i = 0;
|
|
6767
6730
|
while (startDate.isBefore(endDate)) {
|
|
6768
|
-
|
|
6731
|
+
const row = getRow$2(rows, i++);
|
|
6769
6732
|
row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
|
|
6770
6733
|
startDate.add(1, "d");
|
|
6771
6734
|
}
|
|
6772
6735
|
return rows.map((r, i2) => /* @__PURE__ */ React.createElement("tr", { key: `${endDate.month()}_${i2}` }, r));
|
|
6773
6736
|
}
|
|
6774
6737
|
renderDay(date, startOfMonth, endOfMonth) {
|
|
6775
|
-
|
|
6776
|
-
|
|
6738
|
+
const selectedDate = this.props.selectedDate;
|
|
6739
|
+
const dayProps = {
|
|
6777
6740
|
key: date.format("M_D"),
|
|
6778
6741
|
"data-value": date.date(),
|
|
6779
6742
|
"data-month": date.month(),
|
|
@@ -6827,7 +6790,7 @@ flowchart TD
|
|
|
6827
6790
|
}
|
|
6828
6791
|
function getDaysOfWeek(locale) {
|
|
6829
6792
|
const first = locale.firstDayOfWeek();
|
|
6830
|
-
|
|
6793
|
+
const dow = [];
|
|
6831
6794
|
let i = 0;
|
|
6832
6795
|
locale._weekdaysMin.forEach(function(day) {
|
|
6833
6796
|
dow[(7 + i++ - first) % 7] = day;
|
|
@@ -6845,7 +6808,7 @@ flowchart TD
|
|
|
6845
6808
|
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
6809
|
}
|
|
6847
6810
|
renderNavigation() {
|
|
6848
|
-
|
|
6811
|
+
const year = this.props.viewDate.year();
|
|
6849
6812
|
return /* @__PURE__ */ React.createElement(
|
|
6850
6813
|
ViewNavigation,
|
|
6851
6814
|
{
|
|
@@ -6858,9 +6821,9 @@ flowchart TD
|
|
|
6858
6821
|
);
|
|
6859
6822
|
}
|
|
6860
6823
|
renderMonths() {
|
|
6861
|
-
|
|
6824
|
+
const rows = [[], [], []];
|
|
6862
6825
|
for (let month = 0; month < 12; month++) {
|
|
6863
|
-
|
|
6826
|
+
const row = getRow$1(rows, month);
|
|
6864
6827
|
row.push(this.renderMonth(month));
|
|
6865
6828
|
}
|
|
6866
6829
|
return rows.map((months, i) => /* @__PURE__ */ React.createElement("tr", { key: i }, months));
|
|
@@ -6877,7 +6840,7 @@ flowchart TD
|
|
|
6877
6840
|
if (selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month) {
|
|
6878
6841
|
className += " rdtActive";
|
|
6879
6842
|
}
|
|
6880
|
-
|
|
6843
|
+
const props = { key: month, className, "data-value": month, onClick };
|
|
6881
6844
|
if (this.props.renderMonth) {
|
|
6882
6845
|
return this.props.renderMonth(
|
|
6883
6846
|
props,
|
|
@@ -6889,11 +6852,11 @@ flowchart TD
|
|
|
6889
6852
|
return /* @__PURE__ */ React.createElement("td", { ...props }, this.getMonthText(month));
|
|
6890
6853
|
}
|
|
6891
6854
|
isDisabledMonth(month) {
|
|
6892
|
-
|
|
6855
|
+
const isValidDate = this.props.isValidDate;
|
|
6893
6856
|
if (!isValidDate) {
|
|
6894
6857
|
return false;
|
|
6895
6858
|
}
|
|
6896
|
-
|
|
6859
|
+
const date = this.props.viewDate.clone().set({ month });
|
|
6897
6860
|
let day = date.endOf("month").date() + 1;
|
|
6898
6861
|
while (day-- > 1) {
|
|
6899
6862
|
if (isValidDate(date.date(day))) {
|
|
@@ -6945,9 +6908,9 @@ flowchart TD
|
|
|
6945
6908
|
}
|
|
6946
6909
|
renderYears() {
|
|
6947
6910
|
const viewYear = this.getViewYear();
|
|
6948
|
-
|
|
6911
|
+
const rows = [[], [], []];
|
|
6949
6912
|
for (let year = viewYear - 1; year < viewYear + 11; year++) {
|
|
6950
|
-
|
|
6913
|
+
const row = getRow(rows, year - viewYear);
|
|
6951
6914
|
row.push(this.renderYear(year));
|
|
6952
6915
|
}
|
|
6953
6916
|
return rows.map((years, i) => /* @__PURE__ */ React.createElement("tr", { key: i }, years));
|
|
@@ -6964,7 +6927,7 @@ flowchart TD
|
|
|
6964
6927
|
if (selectedYear === year) {
|
|
6965
6928
|
className += " rdtActive";
|
|
6966
6929
|
}
|
|
6967
|
-
|
|
6930
|
+
const props = { key: year, className, "data-value": year, onClick };
|
|
6968
6931
|
return this.props.renderYear(
|
|
6969
6932
|
props,
|
|
6970
6933
|
year,
|
|
@@ -6978,15 +6941,15 @@ flowchart TD
|
|
|
6978
6941
|
return this.props.selectedDate && this.props.selectedDate.year();
|
|
6979
6942
|
}
|
|
6980
6943
|
isDisabledYear(year) {
|
|
6981
|
-
|
|
6944
|
+
const cache = this.disabledYearsCache;
|
|
6982
6945
|
if (cache[year] !== void 0) {
|
|
6983
6946
|
return cache[year];
|
|
6984
6947
|
}
|
|
6985
|
-
|
|
6948
|
+
const isValidDate = this.props.isValidDate;
|
|
6986
6949
|
if (!isValidDate) {
|
|
6987
6950
|
return false;
|
|
6988
6951
|
}
|
|
6989
|
-
|
|
6952
|
+
const date = this.props.viewDate.clone().set({ year });
|
|
6990
6953
|
let day = date.endOf("year").dayOfYear() + 1;
|
|
6991
6954
|
while (day-- > 1) {
|
|
6992
6955
|
if (isValidDate(date.dayOfYear(day))) {
|
|
@@ -7033,7 +6996,7 @@ flowchart TD
|
|
|
7033
6996
|
}
|
|
7034
6997
|
};
|
|
7035
6998
|
function createConstraints(overrideTimeConstraints) {
|
|
7036
|
-
|
|
6999
|
+
const constraints = {};
|
|
7037
7000
|
Object.keys(timeConstraints).forEach((type) => {
|
|
7038
7001
|
constraints[type] = {
|
|
7039
7002
|
...timeConstraints[type],
|
|
@@ -7049,7 +7012,7 @@ flowchart TD
|
|
|
7049
7012
|
this.state = this.getTimeParts(props.selectedDate || props.viewDate);
|
|
7050
7013
|
}
|
|
7051
7014
|
render() {
|
|
7052
|
-
|
|
7015
|
+
const items2 = [];
|
|
7053
7016
|
const timeParts = this.state;
|
|
7054
7017
|
this.getCounters().forEach((c, i) => {
|
|
7055
7018
|
if (i && c !== "ampm") {
|
|
@@ -7111,8 +7074,8 @@ flowchart TD
|
|
|
7111
7074
|
}
|
|
7112
7075
|
if (type === "ampm")
|
|
7113
7076
|
return this.toggleDayPart();
|
|
7114
|
-
|
|
7115
|
-
|
|
7077
|
+
const update = {};
|
|
7078
|
+
const body = document.body;
|
|
7116
7079
|
update[type] = this[action](type);
|
|
7117
7080
|
this.setState(update);
|
|
7118
7081
|
this.timer = setTimeout(() => {
|
|
@@ -7155,8 +7118,8 @@ flowchart TD
|
|
|
7155
7118
|
return pad(type, value);
|
|
7156
7119
|
}
|
|
7157
7120
|
getCounters() {
|
|
7158
|
-
|
|
7159
|
-
|
|
7121
|
+
const counters = [];
|
|
7122
|
+
const format2 = this.props.timeFormat;
|
|
7160
7123
|
if (format2.toLowerCase().indexOf("h") !== -1) {
|
|
7161
7124
|
counters.push("hours");
|
|
7162
7125
|
if (format2.indexOf("m") !== -1) {
|
|
@@ -7288,7 +7251,7 @@ flowchart TD
|
|
|
7288
7251
|
__publicField(this, "_renderCalendar", () => {
|
|
7289
7252
|
const props = this.props;
|
|
7290
7253
|
const state = this.state;
|
|
7291
|
-
|
|
7254
|
+
const viewProps = {
|
|
7292
7255
|
viewDate: state.viewDate.clone(),
|
|
7293
7256
|
selectedDate: this.getSelectedDate(),
|
|
7294
7257
|
isValidDate: props.isValidDate,
|
|
@@ -7331,10 +7294,10 @@ flowchart TD
|
|
|
7331
7294
|
__publicField(this, "viewToMethod", { days: "date", months: "month", years: "year" });
|
|
7332
7295
|
__publicField(this, "nextView", { days: "time", months: "days", years: "months" });
|
|
7333
7296
|
__publicField(this, "_updateDate", (e) => {
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7297
|
+
const state = this.state;
|
|
7298
|
+
const currentView = state.currentView;
|
|
7299
|
+
const updateOnView = this.getUpdateOn(this.getFormat("date"));
|
|
7300
|
+
const viewDate = this.state.viewDate.clone();
|
|
7338
7301
|
viewDate[this.viewToMethod[currentView]](
|
|
7339
7302
|
parseInt(e.target.getAttribute("data-value"), 10)
|
|
7340
7303
|
);
|
|
@@ -7342,7 +7305,7 @@ flowchart TD
|
|
|
7342
7305
|
viewDate.month(parseInt(e.target.getAttribute("data-month"), 10));
|
|
7343
7306
|
viewDate.year(parseInt(e.target.getAttribute("data-year"), 10));
|
|
7344
7307
|
}
|
|
7345
|
-
|
|
7308
|
+
const update = { viewDate };
|
|
7346
7309
|
if (currentView === updateOnView) {
|
|
7347
7310
|
update.selectedDate = viewDate.clone();
|
|
7348
7311
|
update.inputValue = viewDate.format(this.getFormat("datetime"));
|
|
@@ -7356,7 +7319,7 @@ flowchart TD
|
|
|
7356
7319
|
this.setState(update);
|
|
7357
7320
|
});
|
|
7358
7321
|
__publicField(this, "_viewNavigate", (modifier, unit) => {
|
|
7359
|
-
|
|
7322
|
+
const viewDate = this.state.viewDate.clone();
|
|
7360
7323
|
viewDate.add(modifier, unit);
|
|
7361
7324
|
if (modifier > 0) {
|
|
7362
7325
|
this.props.onNavigateForward(modifier, unit);
|
|
@@ -7366,7 +7329,7 @@ flowchart TD
|
|
|
7366
7329
|
this.setState({ viewDate });
|
|
7367
7330
|
});
|
|
7368
7331
|
__publicField(this, "_setTime", (type, value) => {
|
|
7369
|
-
|
|
7332
|
+
const date = (this.getSelectedDate() || this.state.viewDate).clone();
|
|
7370
7333
|
date[type](value);
|
|
7371
7334
|
if (!this.props.value) {
|
|
7372
7335
|
this.setState({
|
|
@@ -7390,7 +7353,7 @@ flowchart TD
|
|
|
7390
7353
|
});
|
|
7391
7354
|
});
|
|
7392
7355
|
__publicField(this, "_handleClickOutside", () => {
|
|
7393
|
-
|
|
7356
|
+
const props = this.props;
|
|
7394
7357
|
if (props.input && this.state.open && props.open === void 0 && props.closeOnClickOutside) {
|
|
7395
7358
|
this._closeCalendar();
|
|
7396
7359
|
}
|
|
@@ -7405,7 +7368,7 @@ flowchart TD
|
|
|
7405
7368
|
return;
|
|
7406
7369
|
const value = e.target ? e.target.value : e;
|
|
7407
7370
|
const localMoment = this.localMoment(value, this.getFormat("datetime"));
|
|
7408
|
-
|
|
7371
|
+
const update = { inputValue: value };
|
|
7409
7372
|
if (localMoment.isValid()) {
|
|
7410
7373
|
update.selectedDate = localMoment;
|
|
7411
7374
|
update.viewDate = localMoment.clone().startOf("month");
|
|
@@ -7469,9 +7432,9 @@ flowchart TD
|
|
|
7469
7432
|
return this.props.renderView(this.state.currentView, this._renderCalendar);
|
|
7470
7433
|
}
|
|
7471
7434
|
getInitialState() {
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7435
|
+
const props = this.props;
|
|
7436
|
+
const inputFormat = this.getFormat("datetime");
|
|
7437
|
+
const selectedDate = this.parseDate(
|
|
7475
7438
|
props.value || props.initialValue,
|
|
7476
7439
|
inputFormat
|
|
7477
7440
|
);
|
|
@@ -7502,7 +7465,7 @@ flowchart TD
|
|
|
7502
7465
|
return this.getInitialDate();
|
|
7503
7466
|
}
|
|
7504
7467
|
getInitialDate() {
|
|
7505
|
-
|
|
7468
|
+
const m = this.localMoment();
|
|
7506
7469
|
m.hour(0).minute(0).second(0).millisecond(0);
|
|
7507
7470
|
return m;
|
|
7508
7471
|
}
|
|
@@ -7522,8 +7485,8 @@ flowchart TD
|
|
|
7522
7485
|
}
|
|
7523
7486
|
getClassName() {
|
|
7524
7487
|
let cn2 = "rdt";
|
|
7525
|
-
|
|
7526
|
-
|
|
7488
|
+
const props = this.props;
|
|
7489
|
+
const propCn = props.className;
|
|
7527
7490
|
if (Array.isArray(propCn)) {
|
|
7528
7491
|
cn2 += " " + propCn.join(" ");
|
|
7529
7492
|
} else if (propCn) {
|
|
@@ -7556,14 +7519,14 @@ flowchart TD
|
|
|
7556
7519
|
return viewModes.DAYS;
|
|
7557
7520
|
}
|
|
7558
7521
|
getLocaleData() {
|
|
7559
|
-
|
|
7522
|
+
const p = this.props;
|
|
7560
7523
|
return this.localMoment(
|
|
7561
7524
|
p.value || p.defaultValue || /* @__PURE__ */ new Date()
|
|
7562
7525
|
).localeData();
|
|
7563
7526
|
}
|
|
7564
7527
|
getDateFormat() {
|
|
7565
7528
|
const locale = this.getLocaleData();
|
|
7566
|
-
|
|
7529
|
+
const format2 = this.props.dateFormat;
|
|
7567
7530
|
if (format2 === true)
|
|
7568
7531
|
return locale.longDateFormat("L");
|
|
7569
7532
|
if (format2)
|
|
@@ -7572,7 +7535,7 @@ flowchart TD
|
|
|
7572
7535
|
}
|
|
7573
7536
|
getTimeFormat() {
|
|
7574
7537
|
const locale = this.getLocaleData();
|
|
7575
|
-
|
|
7538
|
+
const format2 = this.props.timeFormat;
|
|
7576
7539
|
if (format2 === true) {
|
|
7577
7540
|
return locale.longDateFormat("LT");
|
|
7578
7541
|
}
|
|
@@ -7584,12 +7547,12 @@ flowchart TD
|
|
|
7584
7547
|
} else if (type === "time") {
|
|
7585
7548
|
return this.getTimeFormat();
|
|
7586
7549
|
}
|
|
7587
|
-
|
|
7588
|
-
|
|
7550
|
+
const dateFormat = this.getDateFormat();
|
|
7551
|
+
const timeFormat = this.getTimeFormat();
|
|
7589
7552
|
return dateFormat && timeFormat ? dateFormat + " " + timeFormat : dateFormat || timeFormat;
|
|
7590
7553
|
}
|
|
7591
7554
|
updateTime(op, amount, type, toSelected) {
|
|
7592
|
-
|
|
7555
|
+
const update = {};
|
|
7593
7556
|
const date = toSelected ? "selectedDate" : "viewDate";
|
|
7594
7557
|
update[date] = this.state[date].clone()[op](amount, type);
|
|
7595
7558
|
this.setState(update);
|
|
@@ -7622,7 +7585,7 @@ flowchart TD
|
|
|
7622
7585
|
if (prevProps === this.props)
|
|
7623
7586
|
return;
|
|
7624
7587
|
let needsUpdate = false;
|
|
7625
|
-
|
|
7588
|
+
const thisProps = this.props;
|
|
7626
7589
|
["locale", "utc", "displayZone", "dateFormat", "timeFormat"].forEach(
|
|
7627
7590
|
function(p) {
|
|
7628
7591
|
prevProps[p] !== thisProps[p] && (needsUpdate = true);
|
|
@@ -7638,8 +7601,8 @@ flowchart TD
|
|
|
7638
7601
|
}
|
|
7639
7602
|
regenerateDates() {
|
|
7640
7603
|
const props = this.props;
|
|
7641
|
-
|
|
7642
|
-
|
|
7604
|
+
const viewDate = this.state.viewDate.clone();
|
|
7605
|
+
const selectedDate = this.state.selectedDate && this.state.selectedDate.clone();
|
|
7643
7606
|
if (props.locale) {
|
|
7644
7607
|
viewDate.locale(props.locale);
|
|
7645
7608
|
selectedDate && selectedDate.locale(props.locale);
|
|
@@ -7654,7 +7617,7 @@ flowchart TD
|
|
|
7654
7617
|
viewDate.locale();
|
|
7655
7618
|
selectedDate && selectedDate.locale();
|
|
7656
7619
|
}
|
|
7657
|
-
|
|
7620
|
+
const update = { viewDate, selectedDate };
|
|
7658
7621
|
if (selectedDate && selectedDate.isValid()) {
|
|
7659
7622
|
update.inputValue = selectedDate.format(this.getFormat("datetime"));
|
|
7660
7623
|
}
|
|
@@ -7663,7 +7626,7 @@ flowchart TD
|
|
|
7663
7626
|
getSelectedDate() {
|
|
7664
7627
|
if (this.props.value === void 0)
|
|
7665
7628
|
return this.state.selectedDate;
|
|
7666
|
-
|
|
7629
|
+
const selectedDate = this.parseDate(
|
|
7667
7630
|
this.props.value,
|
|
7668
7631
|
this.getFormat("datetime")
|
|
7669
7632
|
);
|
|
@@ -7682,7 +7645,7 @@ flowchart TD
|
|
|
7682
7645
|
return "";
|
|
7683
7646
|
}
|
|
7684
7647
|
getInputValue() {
|
|
7685
|
-
|
|
7648
|
+
const selectedDate = this.getSelectedDate();
|
|
7686
7649
|
return selectedDate ? selectedDate.format(this.getFormat("datetime")) : this.state.inputValue;
|
|
7687
7650
|
}
|
|
7688
7651
|
/**
|
|
@@ -7692,7 +7655,7 @@ flowchart TD
|
|
|
7692
7655
|
* @public
|
|
7693
7656
|
*/
|
|
7694
7657
|
setViewDate(date) {
|
|
7695
|
-
|
|
7658
|
+
const logError = function() {
|
|
7696
7659
|
return log("Invalid date passed to the `setViewDate` method: " + date);
|
|
7697
7660
|
};
|
|
7698
7661
|
if (!date)
|
|
@@ -7788,7 +7751,7 @@ flowchart TD
|
|
|
7788
7751
|
// Make moment accessible through the Datetime class
|
|
7789
7752
|
__publicField(Datetime, "moment", moment);
|
|
7790
7753
|
function log(message, method) {
|
|
7791
|
-
|
|
7754
|
+
const con = typeof window !== "undefined" && window.console;
|
|
7792
7755
|
if (!con)
|
|
7793
7756
|
return;
|
|
7794
7757
|
if (!method) {
|
|
@@ -8041,9 +8004,6 @@ flowchart TD
|
|
|
8041
8004
|
},
|
|
8042
8005
|
parse: parse$2
|
|
8043
8006
|
};
|
|
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
8007
|
function AiFillWarning(props) {
|
|
8048
8008
|
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
8009
|
}
|
|
@@ -8062,6 +8022,39 @@ flowchart TD
|
|
|
8062
8022
|
function FaUnlock(props) {
|
|
8063
8023
|
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
8024
|
}
|
|
8025
|
+
function GrCircleQuestion(props) {
|
|
8026
|
+
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);
|
|
8027
|
+
}
|
|
8028
|
+
const BranchContext = React__namespace.createContext({
|
|
8029
|
+
currentBranch: null,
|
|
8030
|
+
setCurrentBranch: (branch) => {
|
|
8031
|
+
console.warn("BranchContext not initialized");
|
|
8032
|
+
}
|
|
8033
|
+
});
|
|
8034
|
+
const BranchDataProvider = ({
|
|
8035
|
+
currentBranch,
|
|
8036
|
+
setCurrentBranch,
|
|
8037
|
+
children
|
|
8038
|
+
}) => {
|
|
8039
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
8040
|
+
BranchContext.Provider,
|
|
8041
|
+
{
|
|
8042
|
+
value: {
|
|
8043
|
+
currentBranch,
|
|
8044
|
+
setCurrentBranch
|
|
8045
|
+
}
|
|
8046
|
+
},
|
|
8047
|
+
children
|
|
8048
|
+
);
|
|
8049
|
+
};
|
|
8050
|
+
const useBranchData = () => {
|
|
8051
|
+
const branchData = React__namespace.useContext(BranchContext);
|
|
8052
|
+
const { dispatch } = useEvent("branch:change");
|
|
8053
|
+
React__namespace.useEffect(() => {
|
|
8054
|
+
dispatch({ branchName: branchData.currentBranch });
|
|
8055
|
+
}, [branchData.currentBranch]);
|
|
8056
|
+
return branchData;
|
|
8057
|
+
};
|
|
8065
8058
|
function formatBranchName$1(str) {
|
|
8066
8059
|
const pattern = /[^/\w-]+/g;
|
|
8067
8060
|
const formattedStr = str.replace(pattern, "");
|
|
@@ -8160,7 +8153,7 @@ flowchart TD
|
|
|
8160
8153
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8161
8154
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8162
8155
|
},
|
|
8163
|
-
"Learn more about moving to production with
|
|
8156
|
+
"Learn more about moving to production with TinaCloud."
|
|
8164
8157
|
)), /* @__PURE__ */ React__namespace.createElement("p", null, /* @__PURE__ */ React__namespace.createElement(
|
|
8165
8158
|
Button$1,
|
|
8166
8159
|
{
|
|
@@ -8396,7 +8389,7 @@ flowchart TD
|
|
|
8396
8389
|
className: "transition-all duration-150 ease-out text-blue-600 hover:text-blue-400 hover:underline no-underline",
|
|
8397
8390
|
href: "https://tina.io/docs/tina-cloud/"
|
|
8398
8391
|
},
|
|
8399
|
-
"Learn more about moving to production with
|
|
8392
|
+
"Learn more about moving to production with TinaCloud."
|
|
8400
8393
|
)), /* @__PURE__ */ React__namespace.createElement("p", null, /* @__PURE__ */ React__namespace.createElement(
|
|
8401
8394
|
Button$1,
|
|
8402
8395
|
{
|
|
@@ -8611,7 +8604,10 @@ flowchart TD
|
|
|
8611
8604
|
label: "View in GitHub",
|
|
8612
8605
|
Icon: /* @__PURE__ */ React__namespace.createElement(BiLinkExternal, { className: "w-5 h-auto text-blue-500 opacity-70" }),
|
|
8613
8606
|
onMouseDown: () => {
|
|
8614
|
-
window.open(
|
|
8607
|
+
window.open(
|
|
8608
|
+
branch.githubPullRequestUrl,
|
|
8609
|
+
"_blank"
|
|
8610
|
+
);
|
|
8615
8611
|
}
|
|
8616
8612
|
},
|
|
8617
8613
|
typeof previewFunction === "function" && ((_b2 = previewFunction({ branch: branch.name })) == null ? void 0 : _b2.url) && {
|
|
@@ -8917,7 +8913,9 @@ flowchart TD
|
|
|
8917
8913
|
} else {
|
|
8918
8914
|
events = event;
|
|
8919
8915
|
}
|
|
8920
|
-
const newListeners = events.map(
|
|
8916
|
+
const newListeners = events.map(
|
|
8917
|
+
(event2) => new Listener(event2, callback)
|
|
8918
|
+
);
|
|
8921
8919
|
newListeners.forEach((newListener) => this.listeners.add(newListener));
|
|
8922
8920
|
return () => {
|
|
8923
8921
|
newListeners.forEach((listener) => this.listeners.delete(listener));
|
|
@@ -9273,9 +9271,7 @@ flowchart TD
|
|
|
9273
9271
|
const deleteStartTime = Date.now();
|
|
9274
9272
|
while (true) {
|
|
9275
9273
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
9276
|
-
const { error, message } = await this.api.getRequestStatus(
|
|
9277
|
-
requestId
|
|
9278
|
-
);
|
|
9274
|
+
const { error, message } = await this.api.getRequestStatus(requestId);
|
|
9279
9275
|
if (error !== void 0) {
|
|
9280
9276
|
if (error) {
|
|
9281
9277
|
throw new Error(message);
|
|
@@ -9303,11 +9299,8 @@ flowchart TD
|
|
|
9303
9299
|
const encodeUrlIfNeeded = (url) => {
|
|
9304
9300
|
if (url) {
|
|
9305
9301
|
try {
|
|
9306
|
-
|
|
9307
|
-
parsed.pathname = parsed.pathname.split("/").filter((part) => part !== "").map(encodeURIComponent).join("/");
|
|
9308
|
-
return parsed.toString();
|
|
9302
|
+
return new URL(url).toString();
|
|
9309
9303
|
} catch (e) {
|
|
9310
|
-
console.error("Failed to parse URL:", e);
|
|
9311
9304
|
return url;
|
|
9312
9305
|
}
|
|
9313
9306
|
} else {
|
|
@@ -9428,7 +9421,7 @@ flowchart TD
|
|
|
9428
9421
|
});
|
|
9429
9422
|
new MediaListError({
|
|
9430
9423
|
title: "An Error Occurred",
|
|
9431
|
-
message: "Something went wrong accessing your media from
|
|
9424
|
+
message: "Something went wrong accessing your media from TinaCloud.",
|
|
9432
9425
|
docsLink: ""
|
|
9433
9426
|
// TODO
|
|
9434
9427
|
});
|
|
@@ -9613,7 +9606,7 @@ flowchart TD
|
|
|
9613
9606
|
return this.add("error", message, timeout);
|
|
9614
9607
|
}
|
|
9615
9608
|
};
|
|
9616
|
-
const
|
|
9609
|
+
const SidebarLoadingPlaceholder = () => /* @__PURE__ */ React__namespace.createElement(
|
|
9617
9610
|
"div",
|
|
9618
9611
|
{
|
|
9619
9612
|
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
@@ -9626,25 +9619,8 @@ flowchart TD
|
|
|
9626
9619
|
animationDuration: "150ms"
|
|
9627
9620
|
}
|
|
9628
9621
|
},
|
|
9629
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
9630
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
9631
|
-
/* @__PURE__ */ React__namespace.createElement("p", { className: "block" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9632
|
-
Button$1,
|
|
9633
|
-
{
|
|
9634
|
-
href: "https://tina.io/docs/tinacms-context/",
|
|
9635
|
-
target: "_blank",
|
|
9636
|
-
as: "a"
|
|
9637
|
-
},
|
|
9638
|
-
/* @__PURE__ */ React__namespace.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
9639
|
-
" Contextual Editing"
|
|
9640
|
-
))
|
|
9641
|
-
);
|
|
9642
|
-
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React__namespace.createElement(
|
|
9643
|
-
"span",
|
|
9644
|
-
{
|
|
9645
|
-
className: `text-[24px] leading-none inline-block ${className}`,
|
|
9646
|
-
...props
|
|
9647
|
-
}
|
|
9622
|
+
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pb-5" }, "Please wait while TinaCMS", /* @__PURE__ */ React__namespace.createElement("br", null), "loads your content"),
|
|
9623
|
+
/* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" })
|
|
9648
9624
|
);
|
|
9649
9625
|
class SidebarState {
|
|
9650
9626
|
constructor(events, options = {}) {
|
|
@@ -9659,7 +9635,7 @@ flowchart TD
|
|
|
9659
9635
|
};
|
|
9660
9636
|
this.position = options.position || "displace";
|
|
9661
9637
|
this.renderNav = options.renderNav || true;
|
|
9662
|
-
this.
|
|
9638
|
+
this.loadingPlaceholder = options.placeholder || SidebarLoadingPlaceholder;
|
|
9663
9639
|
if ((_a = options.buttons) == null ? void 0 : _a.save) {
|
|
9664
9640
|
this.buttons.save = options.buttons.save;
|
|
9665
9641
|
}
|
|
@@ -9733,238 +9709,6 @@ flowchart TD
|
|
|
9733
9709
|
children
|
|
9734
9710
|
)));
|
|
9735
9711
|
};
|
|
9736
|
-
const Item = ({
|
|
9737
|
-
item,
|
|
9738
|
-
depth,
|
|
9739
|
-
setActiveFormId
|
|
9740
|
-
}) => {
|
|
9741
|
-
const cms = useCMS();
|
|
9742
|
-
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
9743
|
-
const form = React__namespace.useMemo(
|
|
9744
|
-
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
9745
|
-
[item.formId]
|
|
9746
|
-
);
|
|
9747
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9748
|
-
"button",
|
|
9749
|
-
{
|
|
9750
|
-
type: "button",
|
|
9751
|
-
key: item.path,
|
|
9752
|
-
onClick: () => setActiveFormId(item.formId),
|
|
9753
|
-
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`
|
|
9754
|
-
},
|
|
9755
|
-
/* @__PURE__ */ React__namespace.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
9756
|
-
/* @__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))
|
|
9757
|
-
);
|
|
9758
|
-
};
|
|
9759
|
-
const FormListItem = ({
|
|
9760
|
-
item,
|
|
9761
|
-
depth,
|
|
9762
|
-
setActiveFormId
|
|
9763
|
-
}) => {
|
|
9764
|
-
var _a;
|
|
9765
|
-
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) => {
|
|
9766
|
-
if (subItem.type === "document") {
|
|
9767
|
-
return /* @__PURE__ */ React__namespace.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React__namespace.createElement(
|
|
9768
|
-
Item,
|
|
9769
|
-
{
|
|
9770
|
-
setActiveFormId,
|
|
9771
|
-
depth: depth + 1,
|
|
9772
|
-
item: subItem
|
|
9773
|
-
}
|
|
9774
|
-
));
|
|
9775
|
-
}
|
|
9776
|
-
})));
|
|
9777
|
-
};
|
|
9778
|
-
const FormLists = (props) => {
|
|
9779
|
-
const cms = useCMS();
|
|
9780
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9781
|
-
react.Transition,
|
|
9782
|
-
{
|
|
9783
|
-
appear: true,
|
|
9784
|
-
show: true,
|
|
9785
|
-
as: "div",
|
|
9786
|
-
enter: "transition-all ease-out duration-150",
|
|
9787
|
-
enterFrom: "opacity-0 -translate-x-1/2",
|
|
9788
|
-
enterTo: "opacity-100",
|
|
9789
|
-
leave: "transition-all ease-out duration-150",
|
|
9790
|
-
leaveFrom: "opacity-100",
|
|
9791
|
-
leaveTo: "opacity-0 -translate-x-1/2"
|
|
9792
|
-
},
|
|
9793
|
-
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React__namespace.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9794
|
-
FormList,
|
|
9795
|
-
{
|
|
9796
|
-
isEditing: props.isEditing,
|
|
9797
|
-
setActiveFormId: (id) => {
|
|
9798
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
9799
|
-
},
|
|
9800
|
-
formList
|
|
9801
|
-
}
|
|
9802
|
-
)))
|
|
9803
|
-
);
|
|
9804
|
-
};
|
|
9805
|
-
const FormList = (props) => {
|
|
9806
|
-
const cms = useCMS();
|
|
9807
|
-
const listItems = React__namespace.useMemo(() => {
|
|
9808
|
-
var _a;
|
|
9809
|
-
const orderedListItems = [];
|
|
9810
|
-
const globalItems = [];
|
|
9811
|
-
const topItems = [];
|
|
9812
|
-
props.formList.items.forEach((item) => {
|
|
9813
|
-
if (item.type === "document") {
|
|
9814
|
-
const form = cms.state.forms.find(
|
|
9815
|
-
({ tinaForm }) => tinaForm.id === item.formId
|
|
9816
|
-
);
|
|
9817
|
-
if (form.tinaForm.global) {
|
|
9818
|
-
globalItems.push(item);
|
|
9819
|
-
} else {
|
|
9820
|
-
orderedListItems.push(item);
|
|
9821
|
-
}
|
|
9822
|
-
} else {
|
|
9823
|
-
orderedListItems.push(item);
|
|
9824
|
-
}
|
|
9825
|
-
});
|
|
9826
|
-
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
9827
|
-
topItems.push({ type: "list", label: "Documents" });
|
|
9828
|
-
}
|
|
9829
|
-
let extra = [];
|
|
9830
|
-
if (globalItems.length) {
|
|
9831
|
-
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
9832
|
-
}
|
|
9833
|
-
return [...topItems, ...orderedListItems, ...extra];
|
|
9834
|
-
}, [JSON.stringify(props.formList.items)]);
|
|
9835
|
-
return /* @__PURE__ */ React__namespace.createElement("ul", null, /* @__PURE__ */ React__namespace.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
9836
|
-
if (item.type === "list") {
|
|
9837
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9838
|
-
"div",
|
|
9839
|
-
{
|
|
9840
|
-
key: item.label,
|
|
9841
|
-
className: `relative group text-left w-full bg-white shadow-sm
|
|
9842
|
-
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"}`
|
|
9843
|
-
},
|
|
9844
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
9845
|
-
"span",
|
|
9846
|
-
{
|
|
9847
|
-
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
9848
|
-
},
|
|
9849
|
-
item.label
|
|
9850
|
-
)
|
|
9851
|
-
);
|
|
9852
|
-
}
|
|
9853
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9854
|
-
FormListItem,
|
|
9855
|
-
{
|
|
9856
|
-
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
9857
|
-
key: item.formId,
|
|
9858
|
-
item,
|
|
9859
|
-
depth: 0
|
|
9860
|
-
}
|
|
9861
|
-
);
|
|
9862
|
-
})));
|
|
9863
|
-
};
|
|
9864
|
-
const FormsView = ({
|
|
9865
|
-
children
|
|
9866
|
-
}) => {
|
|
9867
|
-
const cms = useCMS$1();
|
|
9868
|
-
const { setFormIsPristine } = React__namespace.useContext(SidebarContext);
|
|
9869
|
-
const isMultiform = cms.state.forms.length > 1;
|
|
9870
|
-
const activeForm = cms.state.forms.find(
|
|
9871
|
-
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
9872
|
-
);
|
|
9873
|
-
const isEditing = !!activeForm;
|
|
9874
|
-
if (!cms.state.formLists.length) {
|
|
9875
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, " ", children, " ");
|
|
9876
|
-
}
|
|
9877
|
-
if (isMultiform && !activeForm) {
|
|
9878
|
-
return /* @__PURE__ */ React__namespace.createElement(FormLists, { isEditing });
|
|
9879
|
-
}
|
|
9880
|
-
const formMetas = cms.plugins.all("form:meta");
|
|
9881
|
-
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 })));
|
|
9882
|
-
};
|
|
9883
|
-
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
9884
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9885
|
-
"div",
|
|
9886
|
-
{
|
|
9887
|
-
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
9888
|
-
style: isEditing ? {
|
|
9889
|
-
transform: "none",
|
|
9890
|
-
animationName: "fly-in-left",
|
|
9891
|
-
animationDuration: "150ms",
|
|
9892
|
-
animationDelay: "0",
|
|
9893
|
-
animationIterationCount: 1,
|
|
9894
|
-
animationTimingFunction: "ease-out"
|
|
9895
|
-
} : {
|
|
9896
|
-
transform: "translate3d(100%, 0, 0)"
|
|
9897
|
-
}
|
|
9898
|
-
},
|
|
9899
|
-
children
|
|
9900
|
-
);
|
|
9901
|
-
};
|
|
9902
|
-
const MultiformFormHeader = ({
|
|
9903
|
-
activeForm
|
|
9904
|
-
}) => {
|
|
9905
|
-
const cms = useCMS$1();
|
|
9906
|
-
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
9907
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9908
|
-
"div",
|
|
9909
|
-
{
|
|
9910
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9911
|
-
},
|
|
9912
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9913
|
-
"button",
|
|
9914
|
-
{
|
|
9915
|
-
type: "button",
|
|
9916
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9917
|
-
onClick: () => {
|
|
9918
|
-
const state = activeForm.tinaForm.finalForm.getState();
|
|
9919
|
-
if (state.invalid === true) {
|
|
9920
|
-
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
9921
|
-
} else {
|
|
9922
|
-
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
9923
|
-
}
|
|
9924
|
-
}
|
|
9925
|
-
},
|
|
9926
|
-
/* @__PURE__ */ React__namespace.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9927
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
9928
|
-
"button",
|
|
9929
|
-
{
|
|
9930
|
-
type: "button",
|
|
9931
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9932
|
-
onClick: () => {
|
|
9933
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9934
|
-
cms.state.activeFormId
|
|
9935
|
-
).name;
|
|
9936
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9937
|
-
}
|
|
9938
|
-
},
|
|
9939
|
-
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9940
|
-
), /* @__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 }))
|
|
9941
|
-
);
|
|
9942
|
-
};
|
|
9943
|
-
const FormHeader = ({ activeForm }) => {
|
|
9944
|
-
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
9945
|
-
const cms = useCMS$1();
|
|
9946
|
-
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
9947
|
-
return /* @__PURE__ */ React__namespace.createElement(
|
|
9948
|
-
"div",
|
|
9949
|
-
{
|
|
9950
|
-
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
9951
|
-
},
|
|
9952
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
9953
|
-
"button",
|
|
9954
|
-
{
|
|
9955
|
-
type: "button",
|
|
9956
|
-
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
9957
|
-
onClick: () => {
|
|
9958
|
-
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
9959
|
-
cms.state.activeFormId
|
|
9960
|
-
).name;
|
|
9961
|
-
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
9962
|
-
}
|
|
9963
|
-
},
|
|
9964
|
-
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
9965
|
-
), 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 }))
|
|
9966
|
-
);
|
|
9967
|
-
};
|
|
9968
9712
|
function ImFilesEmpty(props) {
|
|
9969
9713
|
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);
|
|
9970
9714
|
}
|
|
@@ -10207,7 +9951,7 @@ flowchart TD
|
|
|
10207
9951
|
"Event Log"
|
|
10208
9952
|
));
|
|
10209
9953
|
};
|
|
10210
|
-
const version = "2.
|
|
9954
|
+
const version = "2.7.5";
|
|
10211
9955
|
const Nav = ({
|
|
10212
9956
|
isLocalMode,
|
|
10213
9957
|
className = "",
|
|
@@ -10449,6 +10193,293 @@ flowchart TD
|
|
|
10449
10193
|
/* @__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" })
|
|
10450
10194
|
);
|
|
10451
10195
|
};
|
|
10196
|
+
const Item = ({
|
|
10197
|
+
item,
|
|
10198
|
+
depth,
|
|
10199
|
+
setActiveFormId
|
|
10200
|
+
}) => {
|
|
10201
|
+
const cms = useCMS();
|
|
10202
|
+
const depths = ["pl-6", "pl-10", "pl-14"];
|
|
10203
|
+
const form = React__namespace.useMemo(
|
|
10204
|
+
() => cms.state.forms.find(({ tinaForm }) => item.formId === tinaForm.id),
|
|
10205
|
+
[item.formId]
|
|
10206
|
+
);
|
|
10207
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10208
|
+
"button",
|
|
10209
|
+
{
|
|
10210
|
+
type: "button",
|
|
10211
|
+
key: item.path,
|
|
10212
|
+
onClick: () => setActiveFormId(item.formId),
|
|
10213
|
+
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`
|
|
10214
|
+
},
|
|
10215
|
+
/* @__PURE__ */ React__namespace.createElement(BiEdit, { className: "opacity-70 w-5 h-auto text-blue-500 flex-none" }),
|
|
10216
|
+
/* @__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))
|
|
10217
|
+
);
|
|
10218
|
+
};
|
|
10219
|
+
const FormListItem = ({
|
|
10220
|
+
item,
|
|
10221
|
+
depth,
|
|
10222
|
+
setActiveFormId
|
|
10223
|
+
}) => {
|
|
10224
|
+
var _a;
|
|
10225
|
+
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) => {
|
|
10226
|
+
if (subItem.type === "document") {
|
|
10227
|
+
return /* @__PURE__ */ React__namespace.createElement("li", { key: subItem.formId }, /* @__PURE__ */ React__namespace.createElement(
|
|
10228
|
+
Item,
|
|
10229
|
+
{
|
|
10230
|
+
setActiveFormId,
|
|
10231
|
+
depth: depth + 1,
|
|
10232
|
+
item: subItem
|
|
10233
|
+
}
|
|
10234
|
+
));
|
|
10235
|
+
}
|
|
10236
|
+
})));
|
|
10237
|
+
};
|
|
10238
|
+
const FormLists = (props) => {
|
|
10239
|
+
const cms = useCMS();
|
|
10240
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10241
|
+
react.Transition,
|
|
10242
|
+
{
|
|
10243
|
+
appear: true,
|
|
10244
|
+
show: true,
|
|
10245
|
+
as: "div",
|
|
10246
|
+
enter: "transition-all ease-out duration-150",
|
|
10247
|
+
enterFrom: "opacity-0 -translate-x-1/2",
|
|
10248
|
+
enterTo: "opacity-100",
|
|
10249
|
+
leave: "transition-all ease-out duration-150",
|
|
10250
|
+
leaveFrom: "opacity-100",
|
|
10251
|
+
leaveTo: "opacity-0 -translate-x-1/2"
|
|
10252
|
+
},
|
|
10253
|
+
cms.state.formLists.map((formList, index) => /* @__PURE__ */ React__namespace.createElement("div", { key: `${formList.id}-${index}`, className: "pt-16" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10254
|
+
FormList,
|
|
10255
|
+
{
|
|
10256
|
+
isEditing: props.isEditing,
|
|
10257
|
+
setActiveFormId: (id) => {
|
|
10258
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: id });
|
|
10259
|
+
},
|
|
10260
|
+
formList
|
|
10261
|
+
}
|
|
10262
|
+
)))
|
|
10263
|
+
);
|
|
10264
|
+
};
|
|
10265
|
+
const FormList = (props) => {
|
|
10266
|
+
const cms = useCMS();
|
|
10267
|
+
const listItems = React__namespace.useMemo(() => {
|
|
10268
|
+
var _a;
|
|
10269
|
+
const orderedListItems = [];
|
|
10270
|
+
const globalItems = [];
|
|
10271
|
+
const topItems = [];
|
|
10272
|
+
props.formList.items.forEach((item) => {
|
|
10273
|
+
if (item.type === "document") {
|
|
10274
|
+
const form = cms.state.forms.find(
|
|
10275
|
+
({ tinaForm }) => tinaForm.id === item.formId
|
|
10276
|
+
);
|
|
10277
|
+
if (form.tinaForm.global) {
|
|
10278
|
+
globalItems.push(item);
|
|
10279
|
+
} else {
|
|
10280
|
+
orderedListItems.push(item);
|
|
10281
|
+
}
|
|
10282
|
+
} else {
|
|
10283
|
+
orderedListItems.push(item);
|
|
10284
|
+
}
|
|
10285
|
+
});
|
|
10286
|
+
if (((_a = orderedListItems[0]) == null ? void 0 : _a.type) === "document") {
|
|
10287
|
+
topItems.push({ type: "list", label: "Documents" });
|
|
10288
|
+
}
|
|
10289
|
+
let extra = [];
|
|
10290
|
+
if (globalItems.length) {
|
|
10291
|
+
extra = [{ type: "list", label: "Global Documents" }, ...globalItems];
|
|
10292
|
+
}
|
|
10293
|
+
return [...topItems, ...orderedListItems, ...extra];
|
|
10294
|
+
}, [JSON.stringify(props.formList.items)]);
|
|
10295
|
+
return /* @__PURE__ */ React__namespace.createElement("ul", null, /* @__PURE__ */ React__namespace.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
|
|
10296
|
+
if (item.type === "list") {
|
|
10297
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10298
|
+
"div",
|
|
10299
|
+
{
|
|
10300
|
+
key: item.label,
|
|
10301
|
+
className: `relative group text-left w-full bg-white shadow-sm
|
|
10302
|
+
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"}`
|
|
10303
|
+
},
|
|
10304
|
+
/* @__PURE__ */ React__namespace.createElement(
|
|
10305
|
+
"span",
|
|
10306
|
+
{
|
|
10307
|
+
className: "text-sm tracking-wide font-bold text-gray-700 uppercase"
|
|
10308
|
+
},
|
|
10309
|
+
item.label
|
|
10310
|
+
)
|
|
10311
|
+
);
|
|
10312
|
+
}
|
|
10313
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10314
|
+
FormListItem,
|
|
10315
|
+
{
|
|
10316
|
+
setActiveFormId: (id) => props.setActiveFormId(id),
|
|
10317
|
+
key: item.formId,
|
|
10318
|
+
item,
|
|
10319
|
+
depth: 0
|
|
10320
|
+
}
|
|
10321
|
+
);
|
|
10322
|
+
})));
|
|
10323
|
+
};
|
|
10324
|
+
const SidebarNoFormsPlaceholder = () => /* @__PURE__ */ React__namespace.createElement(
|
|
10325
|
+
"div",
|
|
10326
|
+
{
|
|
10327
|
+
className: "relative flex flex-col items-center justify-center text-center p-5 pb-16 w-full h-full overflow-y-auto",
|
|
10328
|
+
style: {
|
|
10329
|
+
animationName: "fade-in",
|
|
10330
|
+
animationDelay: "300ms",
|
|
10331
|
+
animationTimingFunction: "ease-out",
|
|
10332
|
+
animationIterationCount: 1,
|
|
10333
|
+
animationFillMode: "both",
|
|
10334
|
+
animationDuration: "150ms"
|
|
10335
|
+
}
|
|
10336
|
+
},
|
|
10337
|
+
/* @__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."),
|
|
10338
|
+
/* @__PURE__ */ React__namespace.createElement("p", { className: "block pt-5" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10339
|
+
Button$1,
|
|
10340
|
+
{
|
|
10341
|
+
href: "https://tina.io/docs/contextual-editing/overview",
|
|
10342
|
+
target: "_blank",
|
|
10343
|
+
as: "a"
|
|
10344
|
+
},
|
|
10345
|
+
/* @__PURE__ */ React__namespace.createElement(Emoji$1, { className: "mr-1.5" }, "📖"),
|
|
10346
|
+
" Contextual Editing Docs"
|
|
10347
|
+
))
|
|
10348
|
+
);
|
|
10349
|
+
const Emoji$1 = ({ className = "", ...props }) => /* @__PURE__ */ React__namespace.createElement(
|
|
10350
|
+
"span",
|
|
10351
|
+
{
|
|
10352
|
+
className: `text-[24px] leading-none inline-block ${className}`,
|
|
10353
|
+
...props
|
|
10354
|
+
}
|
|
10355
|
+
);
|
|
10356
|
+
const minimumTimeToShowLoadingIndicator = 1e3;
|
|
10357
|
+
const FormsView = ({ loadingPlaceholder } = {}) => {
|
|
10358
|
+
const cms = useCMS$1();
|
|
10359
|
+
const { setFormIsPristine } = React__namespace.useContext(SidebarContext);
|
|
10360
|
+
const [isShowingLoading, setIsShowingLoading] = React__namespace.useState(true);
|
|
10361
|
+
const [initialLoadComplete, setInitialLoadComplete] = React__namespace.useState(false);
|
|
10362
|
+
React__namespace.useEffect(() => {
|
|
10363
|
+
if (cms.state.isLoadingContent) {
|
|
10364
|
+
setIsShowingLoading(true);
|
|
10365
|
+
const timer = setTimeout(() => {
|
|
10366
|
+
if (!cms.state.isLoadingContent) {
|
|
10367
|
+
setIsShowingLoading(false);
|
|
10368
|
+
setInitialLoadComplete(true);
|
|
10369
|
+
}
|
|
10370
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10371
|
+
return () => clearTimeout(timer);
|
|
10372
|
+
} else {
|
|
10373
|
+
const timer = setTimeout(() => {
|
|
10374
|
+
setIsShowingLoading(false);
|
|
10375
|
+
setInitialLoadComplete(true);
|
|
10376
|
+
}, minimumTimeToShowLoadingIndicator);
|
|
10377
|
+
return () => clearTimeout(timer);
|
|
10378
|
+
}
|
|
10379
|
+
}, [cms.state.isLoadingContent]);
|
|
10380
|
+
if (isShowingLoading || !initialLoadComplete) {
|
|
10381
|
+
const LoadingPlaceholder = loadingPlaceholder || SidebarLoadingPlaceholder;
|
|
10382
|
+
return /* @__PURE__ */ React__namespace.createElement(LoadingPlaceholder, null);
|
|
10383
|
+
}
|
|
10384
|
+
if (!cms.state.formLists.length) {
|
|
10385
|
+
return /* @__PURE__ */ React__namespace.createElement(SidebarNoFormsPlaceholder, null);
|
|
10386
|
+
}
|
|
10387
|
+
const isMultiform = cms.state.forms.length > 1;
|
|
10388
|
+
const activeForm = cms.state.forms.find(
|
|
10389
|
+
({ tinaForm }) => tinaForm.id === cms.state.activeFormId
|
|
10390
|
+
);
|
|
10391
|
+
const isEditing = !!activeForm;
|
|
10392
|
+
if (isMultiform && !activeForm) {
|
|
10393
|
+
return /* @__PURE__ */ React__namespace.createElement(FormLists, { isEditing });
|
|
10394
|
+
}
|
|
10395
|
+
const formMetas = cms.plugins.all("form:meta");
|
|
10396
|
+
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 })));
|
|
10397
|
+
};
|
|
10398
|
+
const FormWrapper$1 = ({ isEditing, children }) => {
|
|
10399
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10400
|
+
"div",
|
|
10401
|
+
{
|
|
10402
|
+
className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white",
|
|
10403
|
+
style: isEditing ? {
|
|
10404
|
+
transform: "none",
|
|
10405
|
+
animationName: "fly-in-left",
|
|
10406
|
+
animationDuration: "150ms",
|
|
10407
|
+
animationDelay: "0",
|
|
10408
|
+
animationIterationCount: 1,
|
|
10409
|
+
animationTimingFunction: "ease-out"
|
|
10410
|
+
} : {
|
|
10411
|
+
transform: "translate3d(100%, 0, 0)"
|
|
10412
|
+
}
|
|
10413
|
+
},
|
|
10414
|
+
children
|
|
10415
|
+
);
|
|
10416
|
+
};
|
|
10417
|
+
const MultiformFormHeader = ({
|
|
10418
|
+
activeForm
|
|
10419
|
+
}) => {
|
|
10420
|
+
const cms = useCMS$1();
|
|
10421
|
+
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
10422
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10423
|
+
"div",
|
|
10424
|
+
{
|
|
10425
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10426
|
+
},
|
|
10427
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10428
|
+
"button",
|
|
10429
|
+
{
|
|
10430
|
+
type: "button",
|
|
10431
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10432
|
+
onClick: () => {
|
|
10433
|
+
const state = activeForm.tinaForm.finalForm.getState();
|
|
10434
|
+
if (state.invalid === true) {
|
|
10435
|
+
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
10436
|
+
} else {
|
|
10437
|
+
cms.dispatch({ type: "forms:set-active-form-id", value: null });
|
|
10438
|
+
}
|
|
10439
|
+
}
|
|
10440
|
+
},
|
|
10441
|
+
/* @__PURE__ */ React__namespace.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10442
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
10443
|
+
"button",
|
|
10444
|
+
{
|
|
10445
|
+
type: "button",
|
|
10446
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10447
|
+
onClick: () => {
|
|
10448
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10449
|
+
cms.state.activeFormId
|
|
10450
|
+
).name;
|
|
10451
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10452
|
+
}
|
|
10453
|
+
},
|
|
10454
|
+
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10455
|
+
), /* @__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 }))
|
|
10456
|
+
);
|
|
10457
|
+
};
|
|
10458
|
+
const FormHeader = ({ activeForm }) => {
|
|
10459
|
+
const { formIsPristine } = React__namespace.useContext(SidebarContext);
|
|
10460
|
+
const cms = useCMS$1();
|
|
10461
|
+
const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
|
|
10462
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
10463
|
+
"div",
|
|
10464
|
+
{
|
|
10465
|
+
className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
|
|
10466
|
+
},
|
|
10467
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
|
|
10468
|
+
"button",
|
|
10469
|
+
{
|
|
10470
|
+
type: "button",
|
|
10471
|
+
className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
|
|
10472
|
+
onClick: () => {
|
|
10473
|
+
const collectionName = cms.api.tina.schema.getCollectionByFullPath(
|
|
10474
|
+
cms.state.activeFormId
|
|
10475
|
+
).name;
|
|
10476
|
+
window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
|
|
10477
|
+
}
|
|
10478
|
+
},
|
|
10479
|
+
/* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
|
|
10480
|
+
), 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 }))
|
|
10481
|
+
);
|
|
10482
|
+
};
|
|
10452
10483
|
const SidebarContext = React__namespace.createContext(null);
|
|
10453
10484
|
const minPreviewWidth = 440;
|
|
10454
10485
|
const minSidebarWidth = 360;
|
|
@@ -10667,7 +10698,7 @@ flowchart TD
|
|
|
10667
10698
|
isLocalMode: (_d = (_c = cms.api) == null ? void 0 : _c.tina) == null ? void 0 : _d.isLocalMode,
|
|
10668
10699
|
branchingEnabled
|
|
10669
10700
|
}
|
|
10670
|
-
), /* @__PURE__ */ React__namespace.createElement(FormsView,
|
|
10701
|
+
), /* @__PURE__ */ React__namespace.createElement(FormsView, { loadingPlaceholder: sidebar.loadingPlaceholder }), activeScreen && /* @__PURE__ */ React__namespace.createElement(
|
|
10671
10702
|
ScreenPluginModal,
|
|
10672
10703
|
{
|
|
10673
10704
|
screen: activeScreen,
|
|
@@ -10843,7 +10874,7 @@ flowchart TD
|
|
|
10843
10874
|
className: "h-5 w-auto -mx-1 text-blue-500",
|
|
10844
10875
|
stroke: "currentColor",
|
|
10845
10876
|
fill: "currentColor",
|
|
10846
|
-
|
|
10877
|
+
strokeWidth: "0",
|
|
10847
10878
|
viewBox: "0 0 24 24",
|
|
10848
10879
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10849
10880
|
},
|
|
@@ -10983,6 +11014,93 @@ flowchart TD
|
|
|
10983
11014
|
);
|
|
10984
11015
|
};
|
|
10985
11016
|
}
|
|
11017
|
+
function dirname(path) {
|
|
11018
|
+
var _a, _b;
|
|
11019
|
+
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11020
|
+
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11021
|
+
}
|
|
11022
|
+
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
11023
|
+
"button",
|
|
11024
|
+
{
|
|
11025
|
+
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11026
|
+
...props
|
|
11027
|
+
}
|
|
11028
|
+
);
|
|
11029
|
+
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11030
|
+
directory = directory.replace(/^\/|\/$/g, "");
|
|
11031
|
+
let prevDir = dirname(directory) || "";
|
|
11032
|
+
if (prevDir === ".") {
|
|
11033
|
+
prevDir = "";
|
|
11034
|
+
}
|
|
11035
|
+
return /* @__PURE__ */ React.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React.createElement(
|
|
11036
|
+
IconButton,
|
|
11037
|
+
{
|
|
11038
|
+
variant: "ghost",
|
|
11039
|
+
className: "mr-2",
|
|
11040
|
+
onClick: () => setDirectory(prevDir)
|
|
11041
|
+
},
|
|
11042
|
+
/* @__PURE__ */ React.createElement(
|
|
11043
|
+
LeftArrowIcon,
|
|
11044
|
+
{
|
|
11045
|
+
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11046
|
+
}
|
|
11047
|
+
)
|
|
11048
|
+
), /* @__PURE__ */ React.createElement(
|
|
11049
|
+
BreadcrumbButton,
|
|
11050
|
+
{
|
|
11051
|
+
onClick: () => setDirectory(""),
|
|
11052
|
+
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11053
|
+
},
|
|
11054
|
+
"Media"
|
|
11055
|
+
), directory && directory.split("/").map((part, index, parts) => {
|
|
11056
|
+
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11057
|
+
return /* @__PURE__ */ React.createElement(
|
|
11058
|
+
BreadcrumbButton,
|
|
11059
|
+
{
|
|
11060
|
+
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11061
|
+
key: currentDir,
|
|
11062
|
+
onClick: () => {
|
|
11063
|
+
setDirectory(currentDir);
|
|
11064
|
+
}
|
|
11065
|
+
},
|
|
11066
|
+
part
|
|
11067
|
+
);
|
|
11068
|
+
}));
|
|
11069
|
+
}
|
|
11070
|
+
const CopyField = ({ label, description, value }) => {
|
|
11071
|
+
const [copied, setCopied] = React.useState(false);
|
|
11072
|
+
const [fadeOut, setFadeOut] = React.useState(false);
|
|
11073
|
+
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(
|
|
11074
|
+
"span",
|
|
11075
|
+
{
|
|
11076
|
+
onClick: () => {
|
|
11077
|
+
if (copied === true)
|
|
11078
|
+
return;
|
|
11079
|
+
setCopied(true);
|
|
11080
|
+
setTimeout(() => {
|
|
11081
|
+
setFadeOut(true);
|
|
11082
|
+
}, 2500);
|
|
11083
|
+
setTimeout(() => {
|
|
11084
|
+
setCopied(false);
|
|
11085
|
+
setFadeOut(false);
|
|
11086
|
+
}, 3e3);
|
|
11087
|
+
navigator.clipboard.writeText(value);
|
|
11088
|
+
},
|
|
11089
|
+
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` : ``}`
|
|
11090
|
+
},
|
|
11091
|
+
/* @__PURE__ */ React.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11092
|
+
" ",
|
|
11093
|
+
value,
|
|
11094
|
+
" ",
|
|
11095
|
+
copied && /* @__PURE__ */ React.createElement(
|
|
11096
|
+
"span",
|
|
11097
|
+
{
|
|
11098
|
+
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`
|
|
11099
|
+
},
|
|
11100
|
+
/* @__PURE__ */ React.createElement("span", null, "Copied to clipboard!")
|
|
11101
|
+
)
|
|
11102
|
+
), description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11103
|
+
};
|
|
10986
11104
|
function ListMediaItem({ item, onClick, active }) {
|
|
10987
11105
|
let FileIcon = BiFile;
|
|
10988
11106
|
if (item.type === "dir") {
|
|
@@ -11058,59 +11176,6 @@ flowchart TD
|
|
|
11058
11176
|
)
|
|
11059
11177
|
);
|
|
11060
11178
|
}
|
|
11061
|
-
function dirname(path) {
|
|
11062
|
-
var _a, _b;
|
|
11063
|
-
const pattern = new RegExp("(?<prevDir>.*)/");
|
|
11064
|
-
return (_b = (_a = path.match(pattern)) == null ? void 0 : _a.groups) == null ? void 0 : _b.prevDir;
|
|
11065
|
-
}
|
|
11066
|
-
const BreadcrumbButton = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
|
|
11067
|
-
"button",
|
|
11068
|
-
{
|
|
11069
|
-
className: "capitalize transition-colors duration-150 border-0 bg-transparent hover:text-blue-500 " + className,
|
|
11070
|
-
...props
|
|
11071
|
-
}
|
|
11072
|
-
);
|
|
11073
|
-
function Breadcrumb$1({ directory = "", setDirectory }) {
|
|
11074
|
-
directory = directory.replace(/^\/|\/$/g, "");
|
|
11075
|
-
let prevDir = dirname(directory) || "";
|
|
11076
|
-
if (prevDir === ".") {
|
|
11077
|
-
prevDir = "";
|
|
11078
|
-
}
|
|
11079
|
-
return /* @__PURE__ */ React.createElement("div", { className: "w-full flex items-center text-[16px] text-gray-300" }, directory !== "" && /* @__PURE__ */ React.createElement(
|
|
11080
|
-
IconButton,
|
|
11081
|
-
{
|
|
11082
|
-
variant: "ghost",
|
|
11083
|
-
className: "mr-2",
|
|
11084
|
-
onClick: () => setDirectory(prevDir)
|
|
11085
|
-
},
|
|
11086
|
-
/* @__PURE__ */ React.createElement(
|
|
11087
|
-
LeftArrowIcon,
|
|
11088
|
-
{
|
|
11089
|
-
className: `w-7 h-auto fill-gray-300 hover:fill-gray-900 transition duration-150 ease-out`
|
|
11090
|
-
}
|
|
11091
|
-
)
|
|
11092
|
-
), /* @__PURE__ */ React.createElement(
|
|
11093
|
-
BreadcrumbButton,
|
|
11094
|
-
{
|
|
11095
|
-
onClick: () => setDirectory(""),
|
|
11096
|
-
className: directory === "" ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"
|
|
11097
|
-
},
|
|
11098
|
-
"Media"
|
|
11099
|
-
), directory && directory.split("/").map((part, index, parts) => {
|
|
11100
|
-
const currentDir = parts.slice(0, index + 1).join("/");
|
|
11101
|
-
return /* @__PURE__ */ React.createElement(
|
|
11102
|
-
BreadcrumbButton,
|
|
11103
|
-
{
|
|
11104
|
-
className: "pl-1.5 " + (index + 1 === parts.length ? "text-gray-500 font-bold" : "text-gray-300 font-medium after:pl-1.5 after:content-['/']"),
|
|
11105
|
-
key: currentDir,
|
|
11106
|
-
onClick: () => {
|
|
11107
|
-
setDirectory(currentDir);
|
|
11108
|
-
}
|
|
11109
|
-
},
|
|
11110
|
-
part
|
|
11111
|
-
);
|
|
11112
|
-
}));
|
|
11113
|
-
}
|
|
11114
11179
|
const DeleteModal$1 = ({
|
|
11115
11180
|
close: close2,
|
|
11116
11181
|
deleteFunc,
|
|
@@ -11164,40 +11229,6 @@ flowchart TD
|
|
|
11164
11229
|
"Create New Folder"
|
|
11165
11230
|
))));
|
|
11166
11231
|
};
|
|
11167
|
-
const CopyField = ({ label, description, value }) => {
|
|
11168
|
-
const [copied, setCopied] = React.useState(false);
|
|
11169
|
-
const [fadeOut, setFadeOut] = React.useState(false);
|
|
11170
|
-
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(
|
|
11171
|
-
"span",
|
|
11172
|
-
{
|
|
11173
|
-
onClick: () => {
|
|
11174
|
-
if (copied === true)
|
|
11175
|
-
return;
|
|
11176
|
-
setCopied(true);
|
|
11177
|
-
setTimeout(() => {
|
|
11178
|
-
setFadeOut(true);
|
|
11179
|
-
}, 2500);
|
|
11180
|
-
setTimeout(() => {
|
|
11181
|
-
setCopied(false);
|
|
11182
|
-
setFadeOut(false);
|
|
11183
|
-
}, 3e3);
|
|
11184
|
-
navigator.clipboard.writeText(value);
|
|
11185
|
-
},
|
|
11186
|
-
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` : ``}`
|
|
11187
|
-
},
|
|
11188
|
-
/* @__PURE__ */ React.createElement(BiCopyAlt, { className: "relative text-blue-500 shrink-0 w-5 h-auto mr-1.5 -ml-0.5 z-20" }),
|
|
11189
|
-
" ",
|
|
11190
|
-
value,
|
|
11191
|
-
" ",
|
|
11192
|
-
copied && /* @__PURE__ */ React.createElement(
|
|
11193
|
-
"span",
|
|
11194
|
-
{
|
|
11195
|
-
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`
|
|
11196
|
-
},
|
|
11197
|
-
/* @__PURE__ */ React.createElement("span", null, "Copied to clipboard!")
|
|
11198
|
-
)
|
|
11199
|
-
), description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
11200
|
-
};
|
|
11201
11232
|
const { useDropzone } = dropzone__namespace;
|
|
11202
11233
|
const join = function(...parts) {
|
|
11203
11234
|
const [first, last, slash] = [0, parts.length - 1, "/"];
|
|
@@ -11433,7 +11464,10 @@ flowchart TD
|
|
|
11433
11464
|
const observer = new IntersectionObserver((entries) => {
|
|
11434
11465
|
const target = entries[0];
|
|
11435
11466
|
if (target.isIntersecting && list.nextOffset) {
|
|
11436
|
-
setOffsetHistory((offsetHistory2) => [
|
|
11467
|
+
setOffsetHistory((offsetHistory2) => [
|
|
11468
|
+
...offsetHistory2,
|
|
11469
|
+
list.nextOffset
|
|
11470
|
+
]);
|
|
11437
11471
|
}
|
|
11438
11472
|
});
|
|
11439
11473
|
if (loaderRef.current) {
|
|
@@ -11696,7 +11730,7 @@ flowchart TD
|
|
|
11696
11730
|
target: "_blank",
|
|
11697
11731
|
href: `${cms.api.tina.appDashboardLink}/media`
|
|
11698
11732
|
},
|
|
11699
|
-
"Sync Your Media In
|
|
11733
|
+
"Sync Your Media In TinaCloud.",
|
|
11700
11734
|
/* @__PURE__ */ React.createElement(BiLinkExternal, { className: `w-5 h-auto flex-shrink-0` })
|
|
11701
11735
|
)
|
|
11702
11736
|
)))) : /* @__PURE__ */ React.createElement(SyncStatusContext.Provider, { value: { syncStatus } }, children);
|
|
@@ -12028,6 +12062,7 @@ flowchart TD
|
|
|
12028
12062
|
forms: [],
|
|
12029
12063
|
formLists: [],
|
|
12030
12064
|
editingMode: "basic",
|
|
12065
|
+
isLoadingContent: false,
|
|
12031
12066
|
quickEditSupported: false,
|
|
12032
12067
|
sidebarDisplayState: ((_a = cms == null ? void 0 : cms.sidebar) == null ? void 0 : _a.defaultState) || "open"
|
|
12033
12068
|
};
|
|
@@ -12087,7 +12122,12 @@ flowchart TD
|
|
|
12087
12122
|
}
|
|
12088
12123
|
});
|
|
12089
12124
|
}
|
|
12090
|
-
return {
|
|
12125
|
+
return {
|
|
12126
|
+
...state,
|
|
12127
|
+
activeFormId,
|
|
12128
|
+
formLists: nextFormLists,
|
|
12129
|
+
isLoadingContent: false
|
|
12130
|
+
};
|
|
12091
12131
|
}
|
|
12092
12132
|
case "form-lists:remove": {
|
|
12093
12133
|
const nextFormLists = state.formLists.filter(
|
|
@@ -12156,6 +12196,9 @@ flowchart TD
|
|
|
12156
12196
|
}
|
|
12157
12197
|
return { ...state, sidebarDisplayState: action.value };
|
|
12158
12198
|
}
|
|
12199
|
+
case "sidebar:set-loading-state": {
|
|
12200
|
+
return { ...state, isLoadingContent: action.value };
|
|
12201
|
+
}
|
|
12159
12202
|
default:
|
|
12160
12203
|
throw new Error(`Unhandled action ${action.type}`);
|
|
12161
12204
|
}
|
|
@@ -12397,7 +12440,9 @@ flowchart TD
|
|
|
12397
12440
|
if (activeEle) {
|
|
12398
12441
|
setDisplay(true);
|
|
12399
12442
|
setPosition(activeEle.getBoundingClientRect());
|
|
12400
|
-
const iframe = document.getElementById(
|
|
12443
|
+
const iframe = document.getElementById(
|
|
12444
|
+
"tina-iframe"
|
|
12445
|
+
);
|
|
12401
12446
|
if (iframe) {
|
|
12402
12447
|
setIframePosition(iframe.getBoundingClientRect());
|
|
12403
12448
|
}
|
|
@@ -12839,7 +12884,6 @@ flowchart TD
|
|
|
12839
12884
|
}) => {
|
|
12840
12885
|
const cms = useCMS$1();
|
|
12841
12886
|
const tinaApi = cms.api.tina;
|
|
12842
|
-
tinaApi.branch;
|
|
12843
12887
|
const [disabled, setDisabled] = React__namespace.useState(false);
|
|
12844
12888
|
const [newBranchName, setNewBranchName] = React__namespace.useState("");
|
|
12845
12889
|
const [error, setError] = React__namespace.useState("");
|
|
@@ -12865,10 +12909,10 @@ flowchart TD
|
|
|
12865
12909
|
const newUrl = window.location.href.replace(hash, newHash);
|
|
12866
12910
|
window.location.href = newUrl;
|
|
12867
12911
|
};
|
|
12868
|
-
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-
|
|
12912
|
+
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(
|
|
12869
12913
|
PrefixedTextField,
|
|
12870
12914
|
{
|
|
12871
|
-
placeholder: "
|
|
12915
|
+
placeholder: "e.g. {{PAGE-NAME}}-updates",
|
|
12872
12916
|
value: newBranchName,
|
|
12873
12917
|
onChange: (e) => {
|
|
12874
12918
|
setError("");
|
|
@@ -13015,7 +13059,9 @@ flowchart TD
|
|
|
13015
13059
|
const { fieldName } = useTemplates();
|
|
13016
13060
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13017
13061
|
useHotkey("enter", () => {
|
|
13018
|
-
plateCommon.insertNodes(editor, [
|
|
13062
|
+
plateCommon.insertNodes(editor, [
|
|
13063
|
+
{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13064
|
+
]);
|
|
13019
13065
|
});
|
|
13020
13066
|
return /* @__PURE__ */ React.createElement("span", { ...attributes, className: "" }, children, element.url ? /* @__PURE__ */ React.createElement(
|
|
13021
13067
|
"div",
|
|
@@ -13158,7 +13204,9 @@ flowchart TD
|
|
|
13158
13204
|
const { templates, fieldName } = useTemplates();
|
|
13159
13205
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13160
13206
|
useHotkey("enter", () => {
|
|
13161
|
-
plateCommon.insertNodes(editor, [
|
|
13207
|
+
plateCommon.insertNodes(editor, [
|
|
13208
|
+
{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13209
|
+
]);
|
|
13162
13210
|
});
|
|
13163
13211
|
useHotkey("space", () => {
|
|
13164
13212
|
plateCommon.insertNodes(editor, [{ text: " " }], {
|
|
@@ -13214,7 +13262,9 @@ flowchart TD
|
|
|
13214
13262
|
const { templates, fieldName } = useTemplates();
|
|
13215
13263
|
const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
|
|
13216
13264
|
useHotkey("enter", () => {
|
|
13217
|
-
plateCommon.insertNodes(editor, [
|
|
13265
|
+
plateCommon.insertNodes(editor, [
|
|
13266
|
+
{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
|
|
13267
|
+
]);
|
|
13218
13268
|
});
|
|
13219
13269
|
const activeTemplate = templates.find(
|
|
13220
13270
|
(template) => template.name === element.name
|
|
@@ -13560,6 +13610,11 @@ flowchart TD
|
|
|
13560
13610
|
mode: "mark",
|
|
13561
13611
|
type: plate.MARK_CODE,
|
|
13562
13612
|
match: "`"
|
|
13613
|
+
},
|
|
13614
|
+
{
|
|
13615
|
+
mode: "mark",
|
|
13616
|
+
type: plate.MARK_STRIKETHROUGH,
|
|
13617
|
+
match: ["~~", "~"]
|
|
13563
13618
|
}
|
|
13564
13619
|
];
|
|
13565
13620
|
const autoformatRules = [
|
|
@@ -13701,16 +13756,14 @@ flowchart TD
|
|
|
13701
13756
|
})
|
|
13702
13757
|
];
|
|
13703
13758
|
const plugins = [
|
|
13759
|
+
plate.createBasicMarksPlugin(),
|
|
13704
13760
|
plate.createHeadingPlugin(),
|
|
13705
13761
|
plate.createParagraphPlugin(),
|
|
13706
13762
|
createCodeBlockPlugin(),
|
|
13707
13763
|
createHTMLBlockPlugin(),
|
|
13708
13764
|
createHTMLInlinePlugin(),
|
|
13709
13765
|
plate.createBlockquotePlugin(),
|
|
13710
|
-
plate.createBoldPlugin(),
|
|
13711
|
-
plate.createItalicPlugin(),
|
|
13712
13766
|
plate.createUnderlinePlugin(),
|
|
13713
|
-
plate.createCodePlugin(),
|
|
13714
13767
|
plate.createListPlugin(),
|
|
13715
13768
|
plate.createIndentListPlugin(),
|
|
13716
13769
|
plate.createHorizontalRulePlugin(),
|
|
@@ -14070,7 +14123,9 @@ flowchart TD
|
|
|
14070
14123
|
const CONTAINER_MD_BREAKPOINT = 448;
|
|
14071
14124
|
const FLOAT_BUTTON_WIDTH = 25;
|
|
14072
14125
|
const HEADING_LABEL = "Headings";
|
|
14073
|
-
const ToolbarContext = React.createContext(
|
|
14126
|
+
const ToolbarContext = React.createContext(
|
|
14127
|
+
void 0
|
|
14128
|
+
);
|
|
14074
14129
|
const ToolbarProvider = ({
|
|
14075
14130
|
tinaForm,
|
|
14076
14131
|
templates,
|
|
@@ -14220,7 +14275,7 @@ flowchart TD
|
|
|
14220
14275
|
const CodeBlockToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14221
14276
|
const state = useCodeBlockToolbarButtonState();
|
|
14222
14277
|
const { props } = useCodeBlockToolbarButton(state);
|
|
14223
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "
|
|
14278
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Code Block", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.codeBlock, null));
|
|
14224
14279
|
});
|
|
14225
14280
|
const useImageToolbarButtonState = () => {
|
|
14226
14281
|
const editor = plateCommon.useEditorState();
|
|
@@ -14252,36 +14307,54 @@ flowchart TD
|
|
|
14252
14307
|
const ImageToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14253
14308
|
const state = useImageToolbarButtonState();
|
|
14254
14309
|
const { props } = useImageToolbarButton(state);
|
|
14255
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "
|
|
14256
|
-
});
|
|
14257
|
-
const IndentListToolbarButton = cn$1.withRef(({ nodeType = plate.ELEMENT_UL }, ref) => {
|
|
14258
|
-
const editor = plateCommon.useEditorState();
|
|
14259
|
-
const state = plate.useListToolbarButtonState({ nodeType });
|
|
14260
|
-
const { props } = plate.useListToolbarButton(state);
|
|
14261
|
-
return /* @__PURE__ */ React.createElement(
|
|
14262
|
-
ToolbarButton,
|
|
14263
|
-
{
|
|
14264
|
-
ref,
|
|
14265
|
-
tooltip: nodeType === plate.ELEMENT_UL ? "Bulleted List" : "Numbered List",
|
|
14266
|
-
...props,
|
|
14267
|
-
onClick: (e) => {
|
|
14268
|
-
e.preventDefault();
|
|
14269
|
-
e.stopPropagation();
|
|
14270
|
-
plate.toggleList(editor, { type: nodeType });
|
|
14271
|
-
}
|
|
14272
|
-
},
|
|
14273
|
-
nodeType === plate.ELEMENT_UL ? /* @__PURE__ */ React.createElement(Icons.ul, null) : /* @__PURE__ */ React.createElement(Icons.ol, null)
|
|
14274
|
-
);
|
|
14310
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Image", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.image, null));
|
|
14275
14311
|
});
|
|
14312
|
+
const UnorderedListToolbarButton = cn$1.withRef(
|
|
14313
|
+
(props, ref) => {
|
|
14314
|
+
const editor = plateCommon.useEditorState();
|
|
14315
|
+
const state = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_UL });
|
|
14316
|
+
const { props: buttonProps } = plate.useListToolbarButton(state);
|
|
14317
|
+
return /* @__PURE__ */ React.createElement(
|
|
14318
|
+
ToolbarButton,
|
|
14319
|
+
{
|
|
14320
|
+
ref,
|
|
14321
|
+
tooltip: "Bulleted List",
|
|
14322
|
+
...buttonProps,
|
|
14323
|
+
onClick: (e) => {
|
|
14324
|
+
e.preventDefault();
|
|
14325
|
+
e.stopPropagation();
|
|
14326
|
+
plate.toggleList(editor, { type: plate.ELEMENT_UL });
|
|
14327
|
+
}
|
|
14328
|
+
},
|
|
14329
|
+
/* @__PURE__ */ React.createElement(Icons.ul, null)
|
|
14330
|
+
);
|
|
14331
|
+
}
|
|
14332
|
+
);
|
|
14333
|
+
const OrderedListToolbarButton = cn$1.withRef(
|
|
14334
|
+
(props, ref) => {
|
|
14335
|
+
const editor = plateCommon.useEditorState();
|
|
14336
|
+
const state = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_OL });
|
|
14337
|
+
const { props: buttonProps } = plate.useListToolbarButton(state);
|
|
14338
|
+
return /* @__PURE__ */ React.createElement(
|
|
14339
|
+
ToolbarButton,
|
|
14340
|
+
{
|
|
14341
|
+
ref,
|
|
14342
|
+
tooltip: "Numbered List",
|
|
14343
|
+
...buttonProps,
|
|
14344
|
+
onClick: (e) => {
|
|
14345
|
+
e.preventDefault();
|
|
14346
|
+
e.stopPropagation();
|
|
14347
|
+
plate.toggleList(editor, { type: plate.ELEMENT_OL });
|
|
14348
|
+
}
|
|
14349
|
+
},
|
|
14350
|
+
/* @__PURE__ */ React.createElement(Icons.ol, null)
|
|
14351
|
+
);
|
|
14352
|
+
}
|
|
14353
|
+
);
|
|
14276
14354
|
const LinkToolbarButton = cn$1.withRef((rest, ref) => {
|
|
14277
14355
|
const state = plateLink.useLinkToolbarButtonState();
|
|
14278
14356
|
const { props } = plateLink.useLinkToolbarButton(state);
|
|
14279
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link"
|
|
14280
|
-
});
|
|
14281
|
-
const MarkToolbarButton = cn$1.withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14282
|
-
const state = plateCommon.useMarkToolbarButtonState({ clear, nodeType });
|
|
14283
|
-
const { props } = plateCommon.useMarkToolbarButton(state);
|
|
14284
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14357
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest, tooltip: "Link" }, /* @__PURE__ */ React.createElement(Icons.link, null));
|
|
14285
14358
|
});
|
|
14286
14359
|
const useMermaidToolbarButtonState = () => {
|
|
14287
14360
|
const editor = plateCommon.useEditorState();
|
|
@@ -14362,7 +14435,7 @@ flowchart TD
|
|
|
14362
14435
|
const QuoteToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14363
14436
|
const state = useBlockQuoteToolbarButtonState();
|
|
14364
14437
|
const { props } = useBlockQuoteToolbarButton(state);
|
|
14365
|
-
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "
|
|
14438
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Quote (⌘+⇧+.)", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.quote, null));
|
|
14366
14439
|
});
|
|
14367
14440
|
const useRawMarkdownToolbarButton = () => {
|
|
14368
14441
|
const { setRawMode } = useEditorContext();
|
|
@@ -14382,7 +14455,7 @@ flowchart TD
|
|
|
14382
14455
|
ToolbarButton,
|
|
14383
14456
|
{
|
|
14384
14457
|
ref,
|
|
14385
|
-
tooltip: "
|
|
14458
|
+
tooltip: "Raw Markdown",
|
|
14386
14459
|
...rest,
|
|
14387
14460
|
...props,
|
|
14388
14461
|
"data-testid": "markdown-button"
|
|
@@ -14535,6 +14608,15 @@ flowchart TD
|
|
|
14535
14608
|
template.label || template.name
|
|
14536
14609
|
))));
|
|
14537
14610
|
};
|
|
14611
|
+
const MarkToolbarButton = cn$1.withRef(({ clear, nodeType, ...rest }, ref) => {
|
|
14612
|
+
const state = plateCommon.useMarkToolbarButtonState({ clear, nodeType });
|
|
14613
|
+
const { props } = plateCommon.useMarkToolbarButton(state);
|
|
14614
|
+
return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest });
|
|
14615
|
+
});
|
|
14616
|
+
const BoldToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: plate.MARK_BOLD }, /* @__PURE__ */ React.createElement(Icons.bold, null));
|
|
14617
|
+
const StrikethroughToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Strikethrough", nodeType: plate.MARK_STRIKETHROUGH }, /* @__PURE__ */ React.createElement(Icons.strikethrough, null));
|
|
14618
|
+
const ItalicToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: plate.MARK_ITALIC }, /* @__PURE__ */ React.createElement(Icons.italic, null));
|
|
14619
|
+
const CodeToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: plate.MARK_CODE }, /* @__PURE__ */ React.createElement(Icons.code, null));
|
|
14538
14620
|
const toolbarItems = {
|
|
14539
14621
|
heading: {
|
|
14540
14622
|
label: HEADING_LABEL,
|
|
@@ -14555,32 +14637,37 @@ flowchart TD
|
|
|
14555
14637
|
quote: {
|
|
14556
14638
|
label: "Quote",
|
|
14557
14639
|
width: () => STANDARD_ICON_WIDTH,
|
|
14558
|
-
Component: /* @__PURE__ */ React.createElement(QuoteToolbarButton,
|
|
14640
|
+
Component: /* @__PURE__ */ React.createElement(QuoteToolbarButton, null)
|
|
14559
14641
|
},
|
|
14560
14642
|
ul: {
|
|
14561
14643
|
label: "Unordered List",
|
|
14562
14644
|
width: () => STANDARD_ICON_WIDTH,
|
|
14563
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14645
|
+
Component: /* @__PURE__ */ React.createElement(UnorderedListToolbarButton, null)
|
|
14564
14646
|
},
|
|
14565
14647
|
ol: {
|
|
14566
14648
|
label: "Ordered List",
|
|
14567
14649
|
width: () => STANDARD_ICON_WIDTH,
|
|
14568
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14650
|
+
Component: /* @__PURE__ */ React.createElement(OrderedListToolbarButton, null)
|
|
14569
14651
|
},
|
|
14570
14652
|
bold: {
|
|
14571
14653
|
label: "Bold",
|
|
14572
14654
|
width: () => STANDARD_ICON_WIDTH,
|
|
14573
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14655
|
+
Component: /* @__PURE__ */ React.createElement(BoldToolbarButton, null)
|
|
14656
|
+
},
|
|
14657
|
+
strikethrough: {
|
|
14658
|
+
label: "Strikethrough",
|
|
14659
|
+
width: () => STANDARD_ICON_WIDTH,
|
|
14660
|
+
Component: /* @__PURE__ */ React.createElement(StrikethroughToolbarButton, null)
|
|
14574
14661
|
},
|
|
14575
14662
|
italic: {
|
|
14576
14663
|
label: "Italic",
|
|
14577
14664
|
width: () => STANDARD_ICON_WIDTH,
|
|
14578
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14665
|
+
Component: /* @__PURE__ */ React.createElement(ItalicToolbarButton, null)
|
|
14579
14666
|
},
|
|
14580
14667
|
code: {
|
|
14581
14668
|
label: "Code",
|
|
14582
14669
|
width: () => STANDARD_ICON_WIDTH,
|
|
14583
|
-
Component: /* @__PURE__ */ React.createElement(
|
|
14670
|
+
Component: /* @__PURE__ */ React.createElement(CodeToolbarButton, null)
|
|
14584
14671
|
},
|
|
14585
14672
|
codeBlock: {
|
|
14586
14673
|
label: "Code Block",
|
|
@@ -16229,132 +16316,1209 @@ flowchart TD
|
|
|
16229
16316
|
"হয়"
|
|
16230
16317
|
];
|
|
16231
16318
|
const bre = [
|
|
16319
|
+
"'blam",
|
|
16320
|
+
"'d",
|
|
16321
|
+
"'m",
|
|
16322
|
+
"'r",
|
|
16323
|
+
"'ta",
|
|
16324
|
+
"'vat",
|
|
16325
|
+
"'z",
|
|
16326
|
+
"'zo",
|
|
16232
16327
|
"a",
|
|
16233
|
-
"
|
|
16234
|
-
"
|
|
16235
|
-
"
|
|
16236
|
-
"
|
|
16237
|
-
"
|
|
16238
|
-
"
|
|
16239
|
-
"
|
|
16240
|
-
"
|
|
16241
|
-
"
|
|
16242
|
-
"
|
|
16243
|
-
"
|
|
16244
|
-
"
|
|
16245
|
-
"
|
|
16246
|
-
"
|
|
16247
|
-
"
|
|
16248
|
-
"
|
|
16249
|
-
"
|
|
16250
|
-
"
|
|
16251
|
-
"
|
|
16252
|
-
"
|
|
16253
|
-
"
|
|
16328
|
+
"a:",
|
|
16329
|
+
"aba",
|
|
16330
|
+
"abalamour",
|
|
16331
|
+
"abaoe",
|
|
16332
|
+
"ac'hane",
|
|
16333
|
+
"ac'hanoc'h",
|
|
16334
|
+
"ac'hanomp",
|
|
16335
|
+
"ac'hanon",
|
|
16336
|
+
"ac'hanout",
|
|
16337
|
+
"adal",
|
|
16338
|
+
"adalek",
|
|
16339
|
+
"adarre",
|
|
16340
|
+
"ae",
|
|
16341
|
+
"aec'h",
|
|
16342
|
+
"aed",
|
|
16343
|
+
"aemp",
|
|
16344
|
+
"aen",
|
|
16345
|
+
"aent",
|
|
16346
|
+
"aes",
|
|
16347
|
+
"afe",
|
|
16348
|
+
"afec'h",
|
|
16349
|
+
"afed",
|
|
16350
|
+
"afemp",
|
|
16351
|
+
"afen",
|
|
16352
|
+
"afent",
|
|
16353
|
+
"afes",
|
|
16354
|
+
"ag",
|
|
16355
|
+
"ah",
|
|
16356
|
+
"aimp",
|
|
16357
|
+
"aint",
|
|
16358
|
+
"aio",
|
|
16359
|
+
"aiou",
|
|
16360
|
+
"aje",
|
|
16361
|
+
"ajec'h",
|
|
16362
|
+
"ajed",
|
|
16363
|
+
"ajemp",
|
|
16364
|
+
"ajen",
|
|
16365
|
+
"ajent",
|
|
16366
|
+
"ajes",
|
|
16367
|
+
"al",
|
|
16368
|
+
"alato",
|
|
16369
|
+
"alies",
|
|
16370
|
+
"aliesañ",
|
|
16371
|
+
"alkent",
|
|
16372
|
+
"all",
|
|
16373
|
+
"allas",
|
|
16374
|
+
"allo",
|
|
16375
|
+
"allô",
|
|
16376
|
+
"am",
|
|
16377
|
+
"amañ",
|
|
16378
|
+
"amzer",
|
|
16379
|
+
"an",
|
|
16380
|
+
"anezhañ",
|
|
16381
|
+
"anezhe",
|
|
16382
|
+
"anezhi",
|
|
16383
|
+
"anezho",
|
|
16384
|
+
"anvet",
|
|
16385
|
+
"aon",
|
|
16386
|
+
"aotren",
|
|
16387
|
+
"ar",
|
|
16388
|
+
"arall",
|
|
16389
|
+
"araok",
|
|
16390
|
+
"araoki",
|
|
16391
|
+
"araozañ",
|
|
16392
|
+
"araozo",
|
|
16393
|
+
"araozoc'h",
|
|
16394
|
+
"araozomp",
|
|
16395
|
+
"araozon",
|
|
16396
|
+
"araozor",
|
|
16397
|
+
"araozout",
|
|
16398
|
+
"arbenn",
|
|
16399
|
+
"arre",
|
|
16400
|
+
"atalek",
|
|
16401
|
+
"atav",
|
|
16402
|
+
"az",
|
|
16403
|
+
"azalek",
|
|
16404
|
+
"azirazañ",
|
|
16405
|
+
"azirazi",
|
|
16406
|
+
"azirazo",
|
|
16407
|
+
"azirazoc'h",
|
|
16408
|
+
"azirazomp",
|
|
16409
|
+
"azirazon",
|
|
16410
|
+
"azirazor",
|
|
16411
|
+
"azirazout",
|
|
16412
|
+
"b:",
|
|
16413
|
+
"ba",
|
|
16414
|
+
"ba'l",
|
|
16415
|
+
"ba'n",
|
|
16416
|
+
"ba'r",
|
|
16417
|
+
"bad",
|
|
16418
|
+
"bah",
|
|
16419
|
+
"bal",
|
|
16420
|
+
"ban",
|
|
16421
|
+
"bar",
|
|
16422
|
+
"bastañ",
|
|
16423
|
+
"befe",
|
|
16424
|
+
"bell",
|
|
16425
|
+
"benaos",
|
|
16426
|
+
"benn",
|
|
16427
|
+
"bennag",
|
|
16428
|
+
"bennak",
|
|
16429
|
+
"bennozh",
|
|
16430
|
+
"bep",
|
|
16431
|
+
"bepred",
|
|
16432
|
+
"berr",
|
|
16433
|
+
"berzh",
|
|
16434
|
+
"bet",
|
|
16435
|
+
"betek",
|
|
16436
|
+
"betra",
|
|
16437
|
+
"bev",
|
|
16438
|
+
"bevet",
|
|
16439
|
+
"bez",
|
|
16440
|
+
"bezañ",
|
|
16441
|
+
"beze",
|
|
16442
|
+
"bezent",
|
|
16443
|
+
"bezet",
|
|
16444
|
+
"bezh",
|
|
16445
|
+
"bezit",
|
|
16446
|
+
"bezomp",
|
|
16447
|
+
"bihan",
|
|
16448
|
+
"bije",
|
|
16449
|
+
"biou",
|
|
16450
|
+
"biskoazh",
|
|
16451
|
+
"blam",
|
|
16452
|
+
"bo",
|
|
16453
|
+
"boa",
|
|
16454
|
+
"bominapl",
|
|
16455
|
+
"boudoudom",
|
|
16456
|
+
"bouez",
|
|
16457
|
+
"boull",
|
|
16458
|
+
"boum",
|
|
16459
|
+
"bout",
|
|
16460
|
+
"bras",
|
|
16461
|
+
"brasañ",
|
|
16462
|
+
"brav",
|
|
16463
|
+
"bravo",
|
|
16464
|
+
"bremañ",
|
|
16465
|
+
"bres",
|
|
16466
|
+
"brokenn",
|
|
16467
|
+
"bronn",
|
|
16468
|
+
"brrr",
|
|
16469
|
+
"brutal",
|
|
16470
|
+
"buhezek",
|
|
16471
|
+
"c'h:",
|
|
16472
|
+
"c'haout",
|
|
16473
|
+
"c'he",
|
|
16474
|
+
"c'hem",
|
|
16475
|
+
"c'herz",
|
|
16476
|
+
"c'heñver",
|
|
16477
|
+
"c'hichen",
|
|
16478
|
+
"c'hiz",
|
|
16479
|
+
"c'hoazh",
|
|
16480
|
+
"c'horre",
|
|
16481
|
+
"c'houde",
|
|
16482
|
+
"c'houst",
|
|
16483
|
+
"c'hreiz",
|
|
16484
|
+
"c'hwec'h",
|
|
16485
|
+
"c'hwec'hvet",
|
|
16486
|
+
"c'hwezek",
|
|
16487
|
+
"c'hwi",
|
|
16488
|
+
"ch:",
|
|
16489
|
+
"chaous",
|
|
16490
|
+
"chik",
|
|
16491
|
+
"chit",
|
|
16492
|
+
"chom",
|
|
16493
|
+
"chut",
|
|
16494
|
+
"d'",
|
|
16495
|
+
"d'al",
|
|
16496
|
+
"d'an",
|
|
16497
|
+
"d'ar",
|
|
16498
|
+
"d'az",
|
|
16499
|
+
"d'e",
|
|
16500
|
+
"d'he",
|
|
16501
|
+
"d'ho",
|
|
16502
|
+
"d'hol",
|
|
16503
|
+
"d'hon",
|
|
16504
|
+
"d'hor",
|
|
16505
|
+
"d'o",
|
|
16506
|
+
"d'ober",
|
|
16507
|
+
"d'ul",
|
|
16508
|
+
"d'un",
|
|
16509
|
+
"d'ur",
|
|
16510
|
+
"d:",
|
|
16254
16511
|
"da",
|
|
16255
|
-
"
|
|
16256
|
-
"
|
|
16257
|
-
"
|
|
16258
|
-
"
|
|
16259
|
-
"
|
|
16260
|
-
"
|
|
16261
|
-
"
|
|
16262
|
-
"
|
|
16263
|
-
"
|
|
16264
|
-
"
|
|
16265
|
-
"
|
|
16266
|
-
"
|
|
16267
|
-
"
|
|
16268
|
-
"
|
|
16269
|
-
"
|
|
16512
|
+
"dak",
|
|
16513
|
+
"daka",
|
|
16514
|
+
"dal",
|
|
16515
|
+
"dalbezh",
|
|
16516
|
+
"dalc'hmat",
|
|
16517
|
+
"dalit",
|
|
16518
|
+
"damdost",
|
|
16519
|
+
"damheñvel",
|
|
16520
|
+
"damm",
|
|
16521
|
+
"dan",
|
|
16522
|
+
"danvez",
|
|
16523
|
+
"dao",
|
|
16524
|
+
"daol",
|
|
16525
|
+
"daonet",
|
|
16526
|
+
"daou",
|
|
16527
|
+
"daoust",
|
|
16528
|
+
"daouzek",
|
|
16529
|
+
"daouzekvet",
|
|
16530
|
+
"darn",
|
|
16531
|
+
"dastrewiñ",
|
|
16532
|
+
"dav",
|
|
16533
|
+
"davedoc'h",
|
|
16534
|
+
"davedomp",
|
|
16535
|
+
"davedon",
|
|
16536
|
+
"davedor",
|
|
16537
|
+
"davedout",
|
|
16538
|
+
"davet",
|
|
16539
|
+
"davetañ",
|
|
16540
|
+
"davete",
|
|
16541
|
+
"daveti",
|
|
16542
|
+
"daveto",
|
|
16543
|
+
"defe",
|
|
16544
|
+
"dehou",
|
|
16545
|
+
"dek",
|
|
16546
|
+
"dekvet",
|
|
16547
|
+
"den",
|
|
16548
|
+
"deoc'h",
|
|
16549
|
+
"deomp",
|
|
16550
|
+
"deor",
|
|
16551
|
+
"derc'hel",
|
|
16552
|
+
"deus",
|
|
16553
|
+
"dez",
|
|
16554
|
+
"deze",
|
|
16555
|
+
"dezhañ",
|
|
16556
|
+
"dezhe",
|
|
16557
|
+
"dezhi",
|
|
16558
|
+
"dezho",
|
|
16559
|
+
"di",
|
|
16560
|
+
"diabarzh",
|
|
16561
|
+
"diagent",
|
|
16562
|
+
"diar",
|
|
16563
|
+
"diaraok",
|
|
16564
|
+
"diavaez",
|
|
16565
|
+
"dibaoe",
|
|
16566
|
+
"dibaot",
|
|
16567
|
+
"dibar",
|
|
16568
|
+
"dic'halañ",
|
|
16569
|
+
"didiac'h",
|
|
16570
|
+
"dienn",
|
|
16571
|
+
"difer",
|
|
16572
|
+
"diganeoc'h",
|
|
16573
|
+
"diganeomp",
|
|
16574
|
+
"diganeor",
|
|
16575
|
+
"diganimp",
|
|
16576
|
+
"diganin",
|
|
16577
|
+
"diganit",
|
|
16578
|
+
"digant",
|
|
16579
|
+
"digantañ",
|
|
16580
|
+
"digante",
|
|
16581
|
+
"diganti",
|
|
16582
|
+
"diganto",
|
|
16583
|
+
"digemmesk",
|
|
16584
|
+
"diget",
|
|
16585
|
+
"digor",
|
|
16586
|
+
"digoret",
|
|
16587
|
+
"dija",
|
|
16588
|
+
"dije",
|
|
16589
|
+
"dimp",
|
|
16590
|
+
"din",
|
|
16591
|
+
"dinaou",
|
|
16592
|
+
"dindan",
|
|
16593
|
+
"dindanañ",
|
|
16594
|
+
"dindani",
|
|
16595
|
+
"dindano",
|
|
16596
|
+
"dindanoc'h",
|
|
16597
|
+
"dindanomp",
|
|
16598
|
+
"dindanon",
|
|
16599
|
+
"dindanor",
|
|
16600
|
+
"dindanout",
|
|
16601
|
+
"dioutañ",
|
|
16602
|
+
"dioute",
|
|
16603
|
+
"diouti",
|
|
16604
|
+
"diouto",
|
|
16605
|
+
"diouzh",
|
|
16606
|
+
"diouzhin",
|
|
16607
|
+
"diouzhit",
|
|
16608
|
+
"diouzhoc'h",
|
|
16609
|
+
"diouzhomp",
|
|
16610
|
+
"diouzhor",
|
|
16611
|
+
"dirak",
|
|
16612
|
+
"dirazañ",
|
|
16613
|
+
"dirazi",
|
|
16614
|
+
"dirazo",
|
|
16615
|
+
"dirazoc'h",
|
|
16616
|
+
"dirazomp",
|
|
16617
|
+
"dirazon",
|
|
16618
|
+
"dirazor",
|
|
16619
|
+
"dirazout",
|
|
16620
|
+
"disheñvel",
|
|
16621
|
+
"dispar",
|
|
16622
|
+
"distank",
|
|
16623
|
+
"dister",
|
|
16624
|
+
"disterañ",
|
|
16625
|
+
"disterig",
|
|
16626
|
+
"distro",
|
|
16627
|
+
"dit",
|
|
16628
|
+
"divaez",
|
|
16629
|
+
"diwar",
|
|
16630
|
+
"diwezhat",
|
|
16631
|
+
"diwezhañ",
|
|
16270
16632
|
"do",
|
|
16271
|
-
"
|
|
16272
|
-
"
|
|
16633
|
+
"doa",
|
|
16634
|
+
"doare",
|
|
16635
|
+
"dont",
|
|
16636
|
+
"dost",
|
|
16637
|
+
"doue",
|
|
16638
|
+
"douetus",
|
|
16639
|
+
"douez",
|
|
16640
|
+
"doug",
|
|
16641
|
+
"draou",
|
|
16642
|
+
"draoñ",
|
|
16643
|
+
"dre",
|
|
16644
|
+
"drede",
|
|
16645
|
+
"dreist",
|
|
16646
|
+
"dreistañ",
|
|
16647
|
+
"dreisti",
|
|
16648
|
+
"dreisto",
|
|
16649
|
+
"dreistoc'h",
|
|
16650
|
+
"dreistomp",
|
|
16651
|
+
"dreiston",
|
|
16652
|
+
"dreistor",
|
|
16653
|
+
"dreistout",
|
|
16654
|
+
"drek",
|
|
16655
|
+
"dreñv",
|
|
16656
|
+
"dring",
|
|
16657
|
+
"dro",
|
|
16658
|
+
"du",
|
|
16273
16659
|
"e",
|
|
16274
|
-
"
|
|
16275
|
-
"
|
|
16276
|
-
"
|
|
16277
|
-
"
|
|
16660
|
+
"e:",
|
|
16661
|
+
"eas",
|
|
16662
|
+
"ebet",
|
|
16663
|
+
"ec'h",
|
|
16664
|
+
"edo",
|
|
16665
|
+
"edoc'h",
|
|
16666
|
+
"edod",
|
|
16667
|
+
"edomp",
|
|
16668
|
+
"edon",
|
|
16669
|
+
"edont",
|
|
16670
|
+
"edos",
|
|
16671
|
+
"eer",
|
|
16672
|
+
"eeun",
|
|
16673
|
+
"efed",
|
|
16674
|
+
"egedoc'h",
|
|
16675
|
+
"egedomp",
|
|
16676
|
+
"egedon",
|
|
16677
|
+
"egedor",
|
|
16678
|
+
"egedout",
|
|
16679
|
+
"eget",
|
|
16680
|
+
"egetañ",
|
|
16681
|
+
"egete",
|
|
16682
|
+
"egeti",
|
|
16683
|
+
"egeto",
|
|
16684
|
+
"eh",
|
|
16685
|
+
"eil",
|
|
16686
|
+
"eilvet",
|
|
16687
|
+
"eizh",
|
|
16688
|
+
"eizhvet",
|
|
16689
|
+
"ejoc'h",
|
|
16690
|
+
"ejod",
|
|
16691
|
+
"ejomp",
|
|
16692
|
+
"ejont",
|
|
16693
|
+
"ejout",
|
|
16694
|
+
"el",
|
|
16278
16695
|
"em",
|
|
16279
|
-
"
|
|
16280
|
-
"
|
|
16281
|
-
"
|
|
16282
|
-
"
|
|
16283
|
-
"
|
|
16284
|
-
"
|
|
16285
|
-
"
|
|
16286
|
-
"
|
|
16287
|
-
"
|
|
16288
|
-
"
|
|
16696
|
+
"emaint",
|
|
16697
|
+
"emaoc'h",
|
|
16698
|
+
"emaomp",
|
|
16699
|
+
"emaon",
|
|
16700
|
+
"emaout",
|
|
16701
|
+
"emañ",
|
|
16702
|
+
"eme",
|
|
16703
|
+
"emeur",
|
|
16704
|
+
"emezañ",
|
|
16705
|
+
"emezi",
|
|
16706
|
+
"emezo",
|
|
16707
|
+
"emezoc'h",
|
|
16708
|
+
"emezomp",
|
|
16709
|
+
"emezon",
|
|
16710
|
+
"emezout",
|
|
16711
|
+
"emporzhiañ",
|
|
16712
|
+
"en",
|
|
16713
|
+
"end",
|
|
16714
|
+
"endan",
|
|
16715
|
+
"endra",
|
|
16716
|
+
"enep",
|
|
16717
|
+
"ennañ",
|
|
16718
|
+
"enni",
|
|
16719
|
+
"enno",
|
|
16720
|
+
"ennoc'h",
|
|
16721
|
+
"ennomp",
|
|
16722
|
+
"ennon",
|
|
16723
|
+
"ennor",
|
|
16724
|
+
"ennout",
|
|
16725
|
+
"enta",
|
|
16726
|
+
"eo",
|
|
16727
|
+
"eomp",
|
|
16728
|
+
"eont",
|
|
16729
|
+
"eor",
|
|
16730
|
+
"eot",
|
|
16731
|
+
"er",
|
|
16732
|
+
"erbet",
|
|
16733
|
+
"erfin",
|
|
16734
|
+
"esa",
|
|
16735
|
+
"esae",
|
|
16736
|
+
"espar",
|
|
16737
|
+
"estlamm",
|
|
16738
|
+
"estrañj",
|
|
16739
|
+
"eta",
|
|
16740
|
+
"etre",
|
|
16741
|
+
"etreoc'h",
|
|
16742
|
+
"etrezo",
|
|
16743
|
+
"etrezoc'h",
|
|
16744
|
+
"etrezomp",
|
|
16745
|
+
"etrezor",
|
|
16746
|
+
"euh",
|
|
16747
|
+
"eur",
|
|
16748
|
+
"eus",
|
|
16749
|
+
"evel",
|
|
16750
|
+
"evelato",
|
|
16751
|
+
"eveldoc'h",
|
|
16752
|
+
"eveldomp",
|
|
16753
|
+
"eveldon",
|
|
16754
|
+
"eveldor",
|
|
16755
|
+
"eveldout",
|
|
16756
|
+
"evelkent",
|
|
16757
|
+
"eveltañ",
|
|
16758
|
+
"evelte",
|
|
16759
|
+
"evelti",
|
|
16760
|
+
"evelto",
|
|
16761
|
+
"evidoc'h",
|
|
16762
|
+
"evidomp",
|
|
16763
|
+
"evidon",
|
|
16764
|
+
"evidor",
|
|
16765
|
+
"evidout",
|
|
16766
|
+
"evit",
|
|
16767
|
+
"evitañ",
|
|
16768
|
+
"evite",
|
|
16769
|
+
"eviti",
|
|
16770
|
+
"evito",
|
|
16771
|
+
"ez",
|
|
16772
|
+
"eñ",
|
|
16773
|
+
"f:",
|
|
16774
|
+
"fac'h",
|
|
16775
|
+
"fall",
|
|
16776
|
+
"fed",
|
|
16777
|
+
"feiz",
|
|
16778
|
+
"fenn",
|
|
16779
|
+
"fezh",
|
|
16780
|
+
"fin",
|
|
16781
|
+
"finsalvet",
|
|
16782
|
+
"foei",
|
|
16783
|
+
"fouilhezañ",
|
|
16784
|
+
"g:",
|
|
16785
|
+
"gallout",
|
|
16786
|
+
"ganeoc'h",
|
|
16787
|
+
"ganeomp",
|
|
16788
|
+
"ganin",
|
|
16789
|
+
"ganit",
|
|
16790
|
+
"gant",
|
|
16791
|
+
"gantañ",
|
|
16792
|
+
"ganti",
|
|
16793
|
+
"ganto",
|
|
16794
|
+
"gaout",
|
|
16795
|
+
"gast",
|
|
16796
|
+
"gein",
|
|
16797
|
+
"gellout",
|
|
16798
|
+
"genndost",
|
|
16799
|
+
"gentañ",
|
|
16800
|
+
"ger",
|
|
16801
|
+
"gerz",
|
|
16802
|
+
"get",
|
|
16803
|
+
"geñver",
|
|
16804
|
+
"gichen",
|
|
16805
|
+
"gin",
|
|
16806
|
+
"giz",
|
|
16807
|
+
"glan",
|
|
16808
|
+
"gloev",
|
|
16809
|
+
"goll",
|
|
16810
|
+
"gorre",
|
|
16811
|
+
"goude",
|
|
16812
|
+
"gouez",
|
|
16813
|
+
"gouezit",
|
|
16814
|
+
"gouezomp",
|
|
16815
|
+
"goulz",
|
|
16816
|
+
"gounnar",
|
|
16817
|
+
"gour",
|
|
16818
|
+
"goust",
|
|
16819
|
+
"gouze",
|
|
16820
|
+
"gouzout",
|
|
16821
|
+
"gra",
|
|
16822
|
+
"grak",
|
|
16823
|
+
"grec'h",
|
|
16824
|
+
"greiz",
|
|
16825
|
+
"grenn",
|
|
16826
|
+
"greomp",
|
|
16827
|
+
"grit",
|
|
16828
|
+
"groñs",
|
|
16829
|
+
"gutez",
|
|
16830
|
+
"gwall",
|
|
16831
|
+
"gwashoc'h",
|
|
16832
|
+
"gwazh",
|
|
16833
|
+
"gwech",
|
|
16834
|
+
"gwechall",
|
|
16835
|
+
"gwechoù",
|
|
16836
|
+
"gwell",
|
|
16837
|
+
"gwezh",
|
|
16838
|
+
"gwezhall",
|
|
16839
|
+
"gwezharall",
|
|
16840
|
+
"gwezhoù",
|
|
16841
|
+
"gwig",
|
|
16842
|
+
"gwirionez",
|
|
16843
|
+
"gwitibunan",
|
|
16844
|
+
"gêr",
|
|
16845
|
+
"h:",
|
|
16289
16846
|
"ha",
|
|
16290
|
-
"
|
|
16291
|
-
"
|
|
16292
|
-
"
|
|
16293
|
-
"
|
|
16294
|
-
"
|
|
16295
|
-
"
|
|
16296
|
-
"
|
|
16297
|
-
"
|
|
16298
|
-
"
|
|
16299
|
-
"
|
|
16300
|
-
"
|
|
16847
|
+
"hag",
|
|
16848
|
+
"han",
|
|
16849
|
+
"hanter",
|
|
16850
|
+
"hanterc'hantad",
|
|
16851
|
+
"hanterkantved",
|
|
16852
|
+
"harz",
|
|
16853
|
+
"hañ",
|
|
16854
|
+
"hañval",
|
|
16855
|
+
"he",
|
|
16856
|
+
"hebioù",
|
|
16857
|
+
"hec'h",
|
|
16858
|
+
"hei",
|
|
16859
|
+
"hein",
|
|
16860
|
+
"hem",
|
|
16861
|
+
"hemañ",
|
|
16862
|
+
"hen",
|
|
16863
|
+
"hend",
|
|
16864
|
+
"henhont",
|
|
16865
|
+
"henn",
|
|
16866
|
+
"hennezh",
|
|
16867
|
+
"hent",
|
|
16868
|
+
"hep",
|
|
16869
|
+
"hervez",
|
|
16870
|
+
"hervezañ",
|
|
16871
|
+
"hervezi",
|
|
16872
|
+
"hervezo",
|
|
16873
|
+
"hervezoc'h",
|
|
16874
|
+
"hervezomp",
|
|
16875
|
+
"hervezon",
|
|
16876
|
+
"hervezor",
|
|
16877
|
+
"hervezout",
|
|
16878
|
+
"heul",
|
|
16879
|
+
"heuliañ",
|
|
16880
|
+
"hevelep",
|
|
16881
|
+
"heverk",
|
|
16882
|
+
"heñvel",
|
|
16883
|
+
"heñvelat",
|
|
16884
|
+
"heñvelañ",
|
|
16885
|
+
"heñveliñ",
|
|
16886
|
+
"heñveloc'h",
|
|
16887
|
+
"heñvelout",
|
|
16888
|
+
"hi",
|
|
16889
|
+
"hilh",
|
|
16890
|
+
"hini",
|
|
16891
|
+
"hirie",
|
|
16892
|
+
"hirio",
|
|
16893
|
+
"hiziv",
|
|
16894
|
+
"hiziviken",
|
|
16895
|
+
"ho",
|
|
16896
|
+
"hoaliñ",
|
|
16897
|
+
"hoc'h",
|
|
16898
|
+
"hogen",
|
|
16899
|
+
"hogos",
|
|
16900
|
+
"hogozik",
|
|
16901
|
+
"hol",
|
|
16902
|
+
"holl",
|
|
16903
|
+
"holà",
|
|
16904
|
+
"homañ",
|
|
16905
|
+
"hon",
|
|
16906
|
+
"honhont",
|
|
16907
|
+
"honnezh",
|
|
16908
|
+
"hont",
|
|
16909
|
+
"hop",
|
|
16910
|
+
"hopala",
|
|
16911
|
+
"hor",
|
|
16912
|
+
"hou",
|
|
16913
|
+
"houp",
|
|
16914
|
+
"hudu",
|
|
16915
|
+
"hue",
|
|
16916
|
+
"hui",
|
|
16917
|
+
"hum",
|
|
16918
|
+
"hurrah",
|
|
16919
|
+
"i",
|
|
16920
|
+
"i:",
|
|
16921
|
+
"in",
|
|
16922
|
+
"int",
|
|
16923
|
+
"is",
|
|
16924
|
+
"ispisial",
|
|
16925
|
+
"isurzhiet",
|
|
16926
|
+
"it",
|
|
16927
|
+
"ivez",
|
|
16928
|
+
"izelañ",
|
|
16929
|
+
"j:",
|
|
16930
|
+
"just",
|
|
16931
|
+
"k:",
|
|
16932
|
+
"kae",
|
|
16933
|
+
"kaer",
|
|
16934
|
+
"kalon",
|
|
16935
|
+
"kalz",
|
|
16936
|
+
"kant",
|
|
16937
|
+
"kaout",
|
|
16938
|
+
"kar",
|
|
16939
|
+
"kazi",
|
|
16940
|
+
"keid",
|
|
16941
|
+
"kein",
|
|
16942
|
+
"keit",
|
|
16943
|
+
"kel",
|
|
16944
|
+
"kellies",
|
|
16945
|
+
"keloù",
|
|
16946
|
+
"kement",
|
|
16947
|
+
"ken",
|
|
16948
|
+
"kenkent",
|
|
16949
|
+
"kenkoulz",
|
|
16950
|
+
"kenment",
|
|
16951
|
+
"kent",
|
|
16952
|
+
"kentañ",
|
|
16953
|
+
"kentizh",
|
|
16954
|
+
"kentoc'h",
|
|
16955
|
+
"kentre",
|
|
16956
|
+
"ker",
|
|
16957
|
+
"kerkent",
|
|
16958
|
+
"kerz",
|
|
16959
|
+
"kerzh",
|
|
16960
|
+
"ket",
|
|
16961
|
+
"keta",
|
|
16962
|
+
"keñver",
|
|
16963
|
+
"keñverel",
|
|
16964
|
+
"keñverius",
|
|
16965
|
+
"kichen",
|
|
16966
|
+
"kichenik",
|
|
16967
|
+
"kit",
|
|
16968
|
+
"kiz",
|
|
16969
|
+
"klak",
|
|
16970
|
+
"klek",
|
|
16971
|
+
"klik",
|
|
16972
|
+
"komprenet",
|
|
16973
|
+
"komz",
|
|
16974
|
+
"kont",
|
|
16975
|
+
"korf",
|
|
16976
|
+
"korre",
|
|
16977
|
+
"koulskoude",
|
|
16978
|
+
"koulz",
|
|
16979
|
+
"koust",
|
|
16980
|
+
"krak",
|
|
16981
|
+
"krampouezh",
|
|
16982
|
+
"krec'h",
|
|
16983
|
+
"kreiz",
|
|
16984
|
+
"kuit",
|
|
16985
|
+
"kwir",
|
|
16986
|
+
"l:",
|
|
16987
|
+
"la",
|
|
16988
|
+
"laez",
|
|
16989
|
+
"laoskel",
|
|
16990
|
+
"laouen",
|
|
16991
|
+
"lavar",
|
|
16992
|
+
"lavaret",
|
|
16993
|
+
"lavarout",
|
|
16994
|
+
"lec'h",
|
|
16995
|
+
"lein",
|
|
16996
|
+
"leizh",
|
|
16997
|
+
"lerc'h",
|
|
16998
|
+
"leun",
|
|
16999
|
+
"leuskel",
|
|
17000
|
+
"lew",
|
|
17001
|
+
"lies",
|
|
17002
|
+
"liesañ",
|
|
17003
|
+
"lod",
|
|
17004
|
+
"lusk",
|
|
17005
|
+
"lâr",
|
|
17006
|
+
"lârout",
|
|
17007
|
+
"m:",
|
|
17008
|
+
"ma",
|
|
17009
|
+
"ma'z",
|
|
17010
|
+
"mac'h",
|
|
17011
|
+
"mac'hat",
|
|
17012
|
+
"mac'hañ",
|
|
17013
|
+
"mac'hoc'h",
|
|
17014
|
+
"mad",
|
|
17015
|
+
"maez",
|
|
17016
|
+
"maksimal",
|
|
17017
|
+
"mann",
|
|
17018
|
+
"mar",
|
|
17019
|
+
"mard",
|
|
17020
|
+
"marg",
|
|
17021
|
+
"marzh",
|
|
17022
|
+
"mat",
|
|
17023
|
+
"mañ",
|
|
17024
|
+
"me",
|
|
17025
|
+
"memes",
|
|
17026
|
+
"memestra",
|
|
17027
|
+
"merkapl",
|
|
17028
|
+
"mersi",
|
|
17029
|
+
"mes",
|
|
17030
|
+
"mesk",
|
|
17031
|
+
"met",
|
|
17032
|
+
"meur",
|
|
17033
|
+
"mil",
|
|
17034
|
+
"minimal",
|
|
17035
|
+
"moan",
|
|
17036
|
+
"moaniaat",
|
|
17037
|
+
"mod",
|
|
17038
|
+
"mont",
|
|
17039
|
+
"mout",
|
|
17040
|
+
"mui",
|
|
17041
|
+
"muiañ",
|
|
17042
|
+
"muioc'h",
|
|
17043
|
+
"n",
|
|
17044
|
+
"n'",
|
|
17045
|
+
"n:",
|
|
16301
17046
|
"na",
|
|
16302
|
-
"
|
|
16303
|
-
"
|
|
16304
|
-
"
|
|
16305
|
-
"
|
|
16306
|
-
"
|
|
16307
|
-
"
|
|
17047
|
+
"nag",
|
|
17048
|
+
"naontek",
|
|
17049
|
+
"naturel",
|
|
17050
|
+
"nav",
|
|
17051
|
+
"navet",
|
|
17052
|
+
"ne",
|
|
17053
|
+
"nebeudig",
|
|
17054
|
+
"nebeut",
|
|
17055
|
+
"nebeutañ",
|
|
17056
|
+
"nebeutoc'h",
|
|
17057
|
+
"neketa",
|
|
17058
|
+
"nemedoc'h",
|
|
17059
|
+
"nemedomp",
|
|
17060
|
+
"nemedon",
|
|
17061
|
+
"nemedor",
|
|
17062
|
+
"nemedout",
|
|
17063
|
+
"nemet",
|
|
17064
|
+
"nemetañ",
|
|
17065
|
+
"nemete",
|
|
17066
|
+
"nemeti",
|
|
17067
|
+
"nemeto",
|
|
17068
|
+
"nemeur",
|
|
17069
|
+
"neoac'h",
|
|
17070
|
+
"nepell",
|
|
17071
|
+
"nerzh",
|
|
17072
|
+
"nes",
|
|
17073
|
+
"neseser",
|
|
17074
|
+
"netra",
|
|
17075
|
+
"neubeudoù",
|
|
17076
|
+
"neuhe",
|
|
17077
|
+
"neuze",
|
|
17078
|
+
"nevez",
|
|
17079
|
+
"newazh",
|
|
17080
|
+
"nez",
|
|
17081
|
+
"ni",
|
|
17082
|
+
"nikun",
|
|
17083
|
+
"niverus",
|
|
17084
|
+
"nul",
|
|
16308
17085
|
"o",
|
|
16309
|
-
"
|
|
16310
|
-
"
|
|
16311
|
-
"
|
|
16312
|
-
"
|
|
16313
|
-
"
|
|
16314
|
-
"
|
|
16315
|
-
"
|
|
16316
|
-
"
|
|
16317
|
-
"
|
|
16318
|
-
"
|
|
16319
|
-
"
|
|
16320
|
-
"
|
|
16321
|
-
"
|
|
16322
|
-
"
|
|
16323
|
-
"
|
|
16324
|
-
"
|
|
16325
|
-
"
|
|
16326
|
-
"
|
|
16327
|
-
"
|
|
16328
|
-
"
|
|
16329
|
-
"
|
|
16330
|
-
"
|
|
16331
|
-
"
|
|
16332
|
-
"
|
|
17086
|
+
"o:",
|
|
17087
|
+
"oa",
|
|
17088
|
+
"oac'h",
|
|
17089
|
+
"oad",
|
|
17090
|
+
"oamp",
|
|
17091
|
+
"oan",
|
|
17092
|
+
"oant",
|
|
17093
|
+
"oar",
|
|
17094
|
+
"oas",
|
|
17095
|
+
"ober",
|
|
17096
|
+
"oc'h",
|
|
17097
|
+
"oc'ho",
|
|
17098
|
+
"oc'hola",
|
|
17099
|
+
"oc'hpenn",
|
|
17100
|
+
"oh",
|
|
17101
|
+
"ohe",
|
|
17102
|
+
"ollé",
|
|
17103
|
+
"olole",
|
|
17104
|
+
"olé",
|
|
17105
|
+
"omp",
|
|
17106
|
+
"on",
|
|
17107
|
+
"ordin",
|
|
17108
|
+
"ordinal",
|
|
17109
|
+
"ouejoc'h",
|
|
17110
|
+
"ouejod",
|
|
17111
|
+
"ouejomp",
|
|
17112
|
+
"ouejont",
|
|
17113
|
+
"ouejout",
|
|
17114
|
+
"ouek",
|
|
17115
|
+
"ouezas",
|
|
17116
|
+
"ouezi",
|
|
17117
|
+
"ouezimp",
|
|
17118
|
+
"ouezin",
|
|
17119
|
+
"ouezint",
|
|
17120
|
+
"ouezis",
|
|
17121
|
+
"ouezo",
|
|
17122
|
+
"ouezoc'h",
|
|
17123
|
+
"ouezor",
|
|
17124
|
+
"ouf",
|
|
17125
|
+
"oufe",
|
|
17126
|
+
"oufec'h",
|
|
17127
|
+
"oufed",
|
|
17128
|
+
"oufemp",
|
|
17129
|
+
"oufen",
|
|
17130
|
+
"oufent",
|
|
17131
|
+
"oufes",
|
|
17132
|
+
"ouie",
|
|
17133
|
+
"ouiec'h",
|
|
17134
|
+
"ouied",
|
|
17135
|
+
"ouiemp",
|
|
17136
|
+
"ouien",
|
|
17137
|
+
"ouient",
|
|
17138
|
+
"ouies",
|
|
17139
|
+
"ouije",
|
|
17140
|
+
"ouijec'h",
|
|
17141
|
+
"ouijed",
|
|
17142
|
+
"ouijemp",
|
|
17143
|
+
"ouijen",
|
|
17144
|
+
"ouijent",
|
|
17145
|
+
"ouijes",
|
|
17146
|
+
"out",
|
|
17147
|
+
"outañ",
|
|
17148
|
+
"outi",
|
|
17149
|
+
"outo",
|
|
17150
|
+
"ouzer",
|
|
17151
|
+
"ouzh",
|
|
17152
|
+
"ouzhin",
|
|
17153
|
+
"ouzhit",
|
|
17154
|
+
"ouzhoc'h",
|
|
17155
|
+
"ouzhomp",
|
|
17156
|
+
"ouzhor",
|
|
17157
|
+
"ouzhpenn",
|
|
17158
|
+
"ouzhpennik",
|
|
17159
|
+
"ouzoc'h",
|
|
17160
|
+
"ouzomp",
|
|
17161
|
+
"ouzon",
|
|
17162
|
+
"ouzont",
|
|
17163
|
+
"ouzout",
|
|
17164
|
+
"p'",
|
|
17165
|
+
"p:",
|
|
17166
|
+
"pa",
|
|
17167
|
+
"pad",
|
|
17168
|
+
"padal",
|
|
17169
|
+
"paf",
|
|
17170
|
+
"pan",
|
|
17171
|
+
"panevedeoc'h",
|
|
17172
|
+
"panevedo",
|
|
17173
|
+
"panevedomp",
|
|
17174
|
+
"panevedon",
|
|
17175
|
+
"panevedout",
|
|
17176
|
+
"panevet",
|
|
17177
|
+
"panevetañ",
|
|
17178
|
+
"paneveti",
|
|
17179
|
+
"pas",
|
|
17180
|
+
"paseet",
|
|
17181
|
+
"pe",
|
|
17182
|
+
"peadra",
|
|
17183
|
+
"peder",
|
|
17184
|
+
"pedervet",
|
|
17185
|
+
"pedervetvet",
|
|
17186
|
+
"pefe",
|
|
17187
|
+
"pegeit",
|
|
17188
|
+
"pegement",
|
|
17189
|
+
"pegen",
|
|
17190
|
+
"pegiz",
|
|
17191
|
+
"pegoulz",
|
|
17192
|
+
"pehini",
|
|
17193
|
+
"pelec'h",
|
|
17194
|
+
"pell",
|
|
17195
|
+
"pemod",
|
|
17196
|
+
"pemp",
|
|
17197
|
+
"pempved",
|
|
17198
|
+
"pemzek",
|
|
17199
|
+
"penaos",
|
|
17200
|
+
"penn",
|
|
17201
|
+
"peogwir",
|
|
17202
|
+
"peotramant",
|
|
17203
|
+
"pep",
|
|
17204
|
+
"perak",
|
|
17205
|
+
"perc'hennañ",
|
|
17206
|
+
"pergen",
|
|
17207
|
+
"permetiñ",
|
|
17208
|
+
"peseurt",
|
|
17209
|
+
"pet",
|
|
17210
|
+
"petiaoul",
|
|
17211
|
+
"petoare",
|
|
17212
|
+
"petra",
|
|
17213
|
+
"peur",
|
|
17214
|
+
"peurgetket",
|
|
17215
|
+
"peurheñvel",
|
|
17216
|
+
"peurliesañ",
|
|
17217
|
+
"peurvuiañ",
|
|
17218
|
+
"peus",
|
|
17219
|
+
"peustost",
|
|
17220
|
+
"peuz",
|
|
17221
|
+
"pevar",
|
|
17222
|
+
"pevare",
|
|
17223
|
+
"pevarevet",
|
|
17224
|
+
"pevarzek",
|
|
17225
|
+
"pez",
|
|
17226
|
+
"peze",
|
|
17227
|
+
"pezh",
|
|
17228
|
+
"pff",
|
|
17229
|
+
"pfft",
|
|
17230
|
+
"pfut",
|
|
17231
|
+
"picher",
|
|
17232
|
+
"pif",
|
|
17233
|
+
"pife",
|
|
17234
|
+
"pign",
|
|
17235
|
+
"pije",
|
|
17236
|
+
"pikol",
|
|
17237
|
+
"pitiaoul",
|
|
17238
|
+
"piv",
|
|
17239
|
+
"plaouf",
|
|
17240
|
+
"plok",
|
|
17241
|
+
"plouf",
|
|
17242
|
+
"po",
|
|
17243
|
+
"poa",
|
|
17244
|
+
"poelladus",
|
|
17245
|
+
"pof",
|
|
17246
|
+
"pok",
|
|
17247
|
+
"posupl",
|
|
17248
|
+
"pouah",
|
|
17249
|
+
"pourc'henn",
|
|
17250
|
+
"prest",
|
|
17251
|
+
"prestik",
|
|
17252
|
+
"prim",
|
|
17253
|
+
"prin",
|
|
17254
|
+
"provostapl",
|
|
17255
|
+
"pst",
|
|
17256
|
+
"pu",
|
|
17257
|
+
"pur",
|
|
17258
|
+
"r:",
|
|
17259
|
+
"ra",
|
|
17260
|
+
"rae",
|
|
17261
|
+
"raec'h",
|
|
17262
|
+
"raed",
|
|
17263
|
+
"raemp",
|
|
17264
|
+
"raen",
|
|
17265
|
+
"raent",
|
|
17266
|
+
"raes",
|
|
17267
|
+
"rafe",
|
|
17268
|
+
"rafec'h",
|
|
17269
|
+
"rafed",
|
|
17270
|
+
"rafemp",
|
|
17271
|
+
"rafen",
|
|
17272
|
+
"rafent",
|
|
17273
|
+
"rafes",
|
|
17274
|
+
"rag",
|
|
17275
|
+
"raimp",
|
|
17276
|
+
"raint",
|
|
17277
|
+
"raio",
|
|
17278
|
+
"raje",
|
|
17279
|
+
"rajec'h",
|
|
17280
|
+
"rajed",
|
|
17281
|
+
"rajemp",
|
|
17282
|
+
"rajen",
|
|
17283
|
+
"rajent",
|
|
17284
|
+
"rajes",
|
|
17285
|
+
"rak",
|
|
17286
|
+
"ral",
|
|
17287
|
+
"ran",
|
|
17288
|
+
"rankout",
|
|
17289
|
+
"raok",
|
|
17290
|
+
"razh",
|
|
17291
|
+
"re",
|
|
17292
|
+
"reas",
|
|
17293
|
+
"reer",
|
|
17294
|
+
"regennoù",
|
|
17295
|
+
"reiñ",
|
|
17296
|
+
"rejoc'h",
|
|
17297
|
+
"rejod",
|
|
17298
|
+
"rejomp",
|
|
17299
|
+
"rejont",
|
|
17300
|
+
"rejout",
|
|
17301
|
+
"rener",
|
|
17302
|
+
"rentañ",
|
|
17303
|
+
"reoc'h",
|
|
17304
|
+
"reomp",
|
|
17305
|
+
"reont",
|
|
17306
|
+
"reor",
|
|
17307
|
+
"reot",
|
|
17308
|
+
"resis",
|
|
17309
|
+
"ret",
|
|
17310
|
+
"reve",
|
|
17311
|
+
"rez",
|
|
17312
|
+
"ri",
|
|
17313
|
+
"rik",
|
|
17314
|
+
"rin",
|
|
17315
|
+
"ris",
|
|
17316
|
+
"rit",
|
|
17317
|
+
"rouez",
|
|
17318
|
+
"s:",
|
|
17319
|
+
"sac'h",
|
|
17320
|
+
"sant",
|
|
17321
|
+
"sav",
|
|
17322
|
+
"sañset",
|
|
16333
17323
|
"se",
|
|
16334
|
-
"
|
|
16335
|
-
"
|
|
16336
|
-
"
|
|
16337
|
-
"
|
|
16338
|
-
"
|
|
16339
|
-
"
|
|
16340
|
-
"
|
|
16341
|
-
"
|
|
16342
|
-
"
|
|
17324
|
+
"sed",
|
|
17325
|
+
"seitek",
|
|
17326
|
+
"seizh",
|
|
17327
|
+
"seizhvet",
|
|
17328
|
+
"sell",
|
|
17329
|
+
"sellit",
|
|
17330
|
+
"ser",
|
|
17331
|
+
"setu",
|
|
17332
|
+
"seul",
|
|
17333
|
+
"seurt",
|
|
17334
|
+
"siwazh",
|
|
17335
|
+
"skignañ",
|
|
17336
|
+
"skoaz",
|
|
17337
|
+
"skouer",
|
|
17338
|
+
"sort",
|
|
17339
|
+
"souden",
|
|
17340
|
+
"souvitañ",
|
|
17341
|
+
"soñj",
|
|
17342
|
+
"speriañ",
|
|
17343
|
+
"spririñ",
|
|
17344
|
+
"stad",
|
|
17345
|
+
"stlabezañ",
|
|
17346
|
+
"stop",
|
|
17347
|
+
"stranañ",
|
|
17348
|
+
"strewiñ",
|
|
17349
|
+
"strishaat",
|
|
17350
|
+
"stumm",
|
|
17351
|
+
"sujed",
|
|
17352
|
+
"surtoud",
|
|
17353
|
+
"t:",
|
|
17354
|
+
"ta",
|
|
17355
|
+
"taer",
|
|
17356
|
+
"tailh",
|
|
17357
|
+
"tak",
|
|
16343
17358
|
"tal",
|
|
16344
|
-
"
|
|
16345
|
-
"
|
|
17359
|
+
"talvoudegezh",
|
|
17360
|
+
"tamm",
|
|
17361
|
+
"tanav",
|
|
17362
|
+
"taol",
|
|
17363
|
+
"te",
|
|
17364
|
+
"techet",
|
|
17365
|
+
"teir",
|
|
17366
|
+
"teirvet",
|
|
17367
|
+
"telt",
|
|
17368
|
+
"teltenn",
|
|
16346
17369
|
"teus",
|
|
16347
|
-
"
|
|
16348
|
-
"
|
|
16349
|
-
"
|
|
16350
|
-
"
|
|
16351
|
-
"
|
|
16352
|
-
"
|
|
16353
|
-
"
|
|
16354
|
-
"
|
|
16355
|
-
"
|
|
16356
|
-
"
|
|
16357
|
-
"
|
|
17370
|
+
"teut",
|
|
17371
|
+
"teuteu",
|
|
17372
|
+
"ti",
|
|
17373
|
+
"tik",
|
|
17374
|
+
"toa",
|
|
17375
|
+
"tok",
|
|
17376
|
+
"tost",
|
|
17377
|
+
"tostig",
|
|
17378
|
+
"toud",
|
|
17379
|
+
"touesk",
|
|
17380
|
+
"touez",
|
|
17381
|
+
"toull",
|
|
17382
|
+
"tra",
|
|
17383
|
+
"trantenn",
|
|
17384
|
+
"traoñ",
|
|
17385
|
+
"trawalc'h",
|
|
17386
|
+
"tre",
|
|
17387
|
+
"trede",
|
|
17388
|
+
"tregont",
|
|
17389
|
+
"tremenet",
|
|
17390
|
+
"tri",
|
|
17391
|
+
"trivet",
|
|
17392
|
+
"triwec'h",
|
|
17393
|
+
"trizek",
|
|
17394
|
+
"tro",
|
|
17395
|
+
"trugarez",
|
|
17396
|
+
"trumm",
|
|
17397
|
+
"tsoin",
|
|
17398
|
+
"tsouin",
|
|
17399
|
+
"tu",
|
|
17400
|
+
"tud",
|
|
17401
|
+
"u:",
|
|
17402
|
+
"ugent",
|
|
17403
|
+
"uhel",
|
|
17404
|
+
"uhelañ",
|
|
17405
|
+
"ul",
|
|
17406
|
+
"un",
|
|
17407
|
+
"unan",
|
|
17408
|
+
"unanez",
|
|
17409
|
+
"unanig",
|
|
17410
|
+
"unnek",
|
|
17411
|
+
"unnekvet",
|
|
17412
|
+
"ur",
|
|
17413
|
+
"urzh",
|
|
17414
|
+
"us",
|
|
17415
|
+
"v:",
|
|
17416
|
+
"va",
|
|
17417
|
+
"vale",
|
|
17418
|
+
"van",
|
|
17419
|
+
"vare",
|
|
17420
|
+
"vat",
|
|
17421
|
+
"vefe",
|
|
17422
|
+
"vefec'h",
|
|
17423
|
+
"vefed",
|
|
17424
|
+
"vefemp",
|
|
17425
|
+
"vefen",
|
|
17426
|
+
"vefent",
|
|
17427
|
+
"vefes",
|
|
17428
|
+
"vesk",
|
|
17429
|
+
"vete",
|
|
17430
|
+
"vez",
|
|
17431
|
+
"vezan",
|
|
17432
|
+
"vezañ",
|
|
17433
|
+
"veze",
|
|
17434
|
+
"vezec'h",
|
|
17435
|
+
"vezed",
|
|
17436
|
+
"vezemp",
|
|
17437
|
+
"vezen",
|
|
17438
|
+
"vezent",
|
|
17439
|
+
"vezer",
|
|
17440
|
+
"vezes",
|
|
17441
|
+
"vezez",
|
|
17442
|
+
"vezit",
|
|
17443
|
+
"vezomp",
|
|
17444
|
+
"vezont",
|
|
17445
|
+
"vi",
|
|
17446
|
+
"vihan",
|
|
17447
|
+
"vihanañ",
|
|
17448
|
+
"vije",
|
|
17449
|
+
"vijec'h",
|
|
17450
|
+
"vijed",
|
|
17451
|
+
"vijemp",
|
|
17452
|
+
"vijen",
|
|
17453
|
+
"vijent",
|
|
17454
|
+
"vijes",
|
|
17455
|
+
"viken",
|
|
17456
|
+
"vimp",
|
|
17457
|
+
"vin",
|
|
17458
|
+
"vint",
|
|
17459
|
+
"vior",
|
|
17460
|
+
"viot",
|
|
17461
|
+
"virviken",
|
|
17462
|
+
"viskoazh",
|
|
17463
|
+
"vlan",
|
|
17464
|
+
"vlaou",
|
|
17465
|
+
"vo",
|
|
17466
|
+
"vod",
|
|
17467
|
+
"voe",
|
|
17468
|
+
"voec'h",
|
|
17469
|
+
"voed",
|
|
17470
|
+
"voemp",
|
|
17471
|
+
"voen",
|
|
17472
|
+
"voent",
|
|
17473
|
+
"voes",
|
|
17474
|
+
"vont",
|
|
17475
|
+
"vostapl",
|
|
17476
|
+
"vrac'h",
|
|
17477
|
+
"vrasañ",
|
|
17478
|
+
"vremañ",
|
|
17479
|
+
"w:",
|
|
17480
|
+
"walc'h",
|
|
17481
|
+
"war",
|
|
17482
|
+
"warnañ",
|
|
17483
|
+
"warni",
|
|
17484
|
+
"warno",
|
|
17485
|
+
"warnoc'h",
|
|
17486
|
+
"warnomp",
|
|
17487
|
+
"warnon",
|
|
17488
|
+
"warnor",
|
|
17489
|
+
"warnout",
|
|
17490
|
+
"wazh",
|
|
17491
|
+
"wech",
|
|
17492
|
+
"wechoù",
|
|
17493
|
+
"well",
|
|
17494
|
+
"y:",
|
|
17495
|
+
"you",
|
|
17496
|
+
"youadenn",
|
|
17497
|
+
"youc'hadenn",
|
|
17498
|
+
"youc'hou",
|
|
17499
|
+
"z:",
|
|
17500
|
+
"za",
|
|
17501
|
+
"zan",
|
|
17502
|
+
"zaw",
|
|
17503
|
+
"zeu",
|
|
17504
|
+
"zi",
|
|
17505
|
+
"ziar",
|
|
17506
|
+
"zigarez",
|
|
17507
|
+
"ziget",
|
|
17508
|
+
"zindan",
|
|
17509
|
+
"zioc'h",
|
|
17510
|
+
"ziouzh",
|
|
17511
|
+
"zirak",
|
|
17512
|
+
"zivout",
|
|
17513
|
+
"ziwar",
|
|
17514
|
+
"ziwezhañ",
|
|
17515
|
+
"zo",
|
|
17516
|
+
"zoken",
|
|
17517
|
+
"zokenoc'h",
|
|
17518
|
+
"zouesk",
|
|
17519
|
+
"zouez",
|
|
17520
|
+
"zro",
|
|
17521
|
+
"zu"
|
|
16358
17522
|
];
|
|
16359
17523
|
const bul = [
|
|
16360
17524
|
"а",
|
|
@@ -28010,22 +29174,32 @@ flowchart TD
|
|
|
28010
29174
|
"şöyle"
|
|
28011
29175
|
];
|
|
28012
29176
|
const ukr = [
|
|
29177
|
+
"а",
|
|
29178
|
+
"або",
|
|
28013
29179
|
"авжеж",
|
|
28014
29180
|
"адже",
|
|
29181
|
+
"аж",
|
|
28015
29182
|
"але",
|
|
29183
|
+
"ані",
|
|
28016
29184
|
"б",
|
|
28017
29185
|
"без",
|
|
29186
|
+
"би",
|
|
29187
|
+
"бо",
|
|
28018
29188
|
"був",
|
|
28019
29189
|
"була",
|
|
28020
29190
|
"були",
|
|
28021
29191
|
"було",
|
|
28022
29192
|
"бути",
|
|
28023
29193
|
"більш",
|
|
29194
|
+
"в",
|
|
28024
29195
|
"вам",
|
|
29196
|
+
"вами",
|
|
28025
29197
|
"вас",
|
|
28026
29198
|
"весь",
|
|
29199
|
+
"вже",
|
|
28027
29200
|
"вздовж",
|
|
28028
29201
|
"ви",
|
|
29202
|
+
"від",
|
|
28029
29203
|
"вниз",
|
|
28030
29204
|
"внизу",
|
|
28031
29205
|
"вона",
|
|
@@ -28034,55 +29208,138 @@ flowchart TD
|
|
|
28034
29208
|
"все",
|
|
28035
29209
|
"всередині",
|
|
28036
29210
|
"всіх",
|
|
29211
|
+
"вся",
|
|
28037
29212
|
"від",
|
|
28038
29213
|
"він",
|
|
28039
29214
|
"да",
|
|
28040
29215
|
"давай",
|
|
28041
29216
|
"давати",
|
|
28042
29217
|
"де",
|
|
29218
|
+
"десь",
|
|
28043
29219
|
"дещо",
|
|
28044
29220
|
"для",
|
|
28045
29221
|
"до",
|
|
29222
|
+
"є",
|
|
29223
|
+
"ж",
|
|
29224
|
+
"же",
|
|
28046
29225
|
"з",
|
|
29226
|
+
"за",
|
|
28047
29227
|
"завжди",
|
|
28048
29228
|
"замість",
|
|
29229
|
+
"зі",
|
|
29230
|
+
"і",
|
|
29231
|
+
"із",
|
|
29232
|
+
"інших",
|
|
29233
|
+
"її",
|
|
29234
|
+
"їй",
|
|
29235
|
+
"їм",
|
|
29236
|
+
"їх",
|
|
28049
29237
|
"й",
|
|
29238
|
+
"його",
|
|
29239
|
+
"йому",
|
|
28050
29240
|
"коли",
|
|
28051
29241
|
"ледве",
|
|
29242
|
+
"лиш",
|
|
28052
29243
|
"майже",
|
|
29244
|
+
"мене",
|
|
29245
|
+
"мені",
|
|
28053
29246
|
"ми",
|
|
29247
|
+
"між",
|
|
29248
|
+
"мій",
|
|
29249
|
+
"мною",
|
|
29250
|
+
"мов",
|
|
29251
|
+
"мого",
|
|
29252
|
+
"моєї",
|
|
29253
|
+
"моє",
|
|
29254
|
+
"може",
|
|
29255
|
+
"мої",
|
|
29256
|
+
"моїх",
|
|
29257
|
+
"моя",
|
|
29258
|
+
"на",
|
|
29259
|
+
"над",
|
|
28054
29260
|
"навколо",
|
|
28055
29261
|
"навіть",
|
|
28056
29262
|
"нам",
|
|
29263
|
+
"нами",
|
|
29264
|
+
"нас",
|
|
29265
|
+
"наче",
|
|
29266
|
+
"наш",
|
|
29267
|
+
"не",
|
|
29268
|
+
"нє",
|
|
29269
|
+
"неї",
|
|
29270
|
+
"нема",
|
|
29271
|
+
"немов",
|
|
29272
|
+
"неначе",
|
|
29273
|
+
"нею",
|
|
29274
|
+
"ним",
|
|
29275
|
+
"ними",
|
|
29276
|
+
"них",
|
|
29277
|
+
"ні",
|
|
29278
|
+
"ніби",
|
|
29279
|
+
"ніщо",
|
|
29280
|
+
"нього",
|
|
29281
|
+
"о",
|
|
29282
|
+
"ось",
|
|
28057
29283
|
"от",
|
|
28058
29284
|
"отже",
|
|
28059
29285
|
"отож",
|
|
29286
|
+
"під",
|
|
29287
|
+
"по",
|
|
28060
29288
|
"поза",
|
|
28061
29289
|
"про",
|
|
28062
29290
|
"під",
|
|
29291
|
+
"сам",
|
|
29292
|
+
"сама",
|
|
29293
|
+
"свій",
|
|
29294
|
+
"свої",
|
|
29295
|
+
"своя",
|
|
29296
|
+
"свою",
|
|
29297
|
+
"себе",
|
|
29298
|
+
"собі",
|
|
28063
29299
|
"та",
|
|
29300
|
+
"там",
|
|
28064
29301
|
"так",
|
|
29302
|
+
"така",
|
|
28065
29303
|
"такий",
|
|
28066
29304
|
"також",
|
|
29305
|
+
"твій",
|
|
29306
|
+
"твого",
|
|
29307
|
+
"твоєї",
|
|
29308
|
+
"твої",
|
|
29309
|
+
"твоя",
|
|
28067
29310
|
"те",
|
|
29311
|
+
"тебе",
|
|
28068
29312
|
"ти",
|
|
29313
|
+
"ті",
|
|
29314
|
+
"тільки",
|
|
29315
|
+
"то",
|
|
29316
|
+
"тобі",
|
|
29317
|
+
"тобою",
|
|
28069
29318
|
"тобто",
|
|
29319
|
+
"тоді",
|
|
28070
29320
|
"тож",
|
|
29321
|
+
"той",
|
|
28071
29322
|
"тощо",
|
|
29323
|
+
"тут",
|
|
29324
|
+
"у",
|
|
29325
|
+
"хіба",
|
|
29326
|
+
"хоч",
|
|
28072
29327
|
"хоча",
|
|
28073
29328
|
"це",
|
|
28074
29329
|
"цей",
|
|
29330
|
+
"ці",
|
|
29331
|
+
"ця",
|
|
28075
29332
|
"чи",
|
|
28076
29333
|
"чого",
|
|
29334
|
+
"ще",
|
|
28077
29335
|
"що",
|
|
29336
|
+
"щоб",
|
|
29337
|
+
"щось",
|
|
29338
|
+
"я",
|
|
28078
29339
|
"як",
|
|
29340
|
+
"яка",
|
|
28079
29341
|
"який",
|
|
28080
|
-
"якої"
|
|
28081
|
-
"є",
|
|
28082
|
-
"із",
|
|
28083
|
-
"інших",
|
|
28084
|
-
"їх",
|
|
28085
|
-
"її"
|
|
29342
|
+
"якої"
|
|
28086
29343
|
];
|
|
28087
29344
|
const urd = [
|
|
28088
29345
|
"آئی",
|
|
@@ -29080,7 +30337,14 @@ flowchart TD
|
|
|
29080
30337
|
const AUTH_TOKEN_KEY = "tinacms-auth";
|
|
29081
30338
|
const authenticate = (clientId, frontendUrl) => {
|
|
29082
30339
|
return new Promise((resolve) => {
|
|
29083
|
-
|
|
30340
|
+
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
30341
|
+
const authTab = popupWindow(
|
|
30342
|
+
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
30343
|
+
"_blank",
|
|
30344
|
+
window,
|
|
30345
|
+
1e3,
|
|
30346
|
+
700
|
|
30347
|
+
);
|
|
29084
30348
|
window.addEventListener("message", function(e) {
|
|
29085
30349
|
if (e.data.source === TINA_LOGIN_EVENT) {
|
|
29086
30350
|
if (authTab) {
|
|
@@ -29093,14 +30357,6 @@ flowchart TD
|
|
|
29093
30357
|
});
|
|
29094
30358
|
}
|
|
29095
30359
|
});
|
|
29096
|
-
const origin = `${window.location.protocol}//${window.location.host}`;
|
|
29097
|
-
authTab = popupWindow(
|
|
29098
|
-
`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
|
|
29099
|
-
"_blank",
|
|
29100
|
-
window,
|
|
29101
|
-
1e3,
|
|
29102
|
-
700
|
|
29103
|
-
);
|
|
29104
30360
|
});
|
|
29105
30361
|
};
|
|
29106
30362
|
const DefaultSessionProvider = ({
|
|
@@ -29411,6 +30667,7 @@ mutation addPendingDocumentMutation(
|
|
|
29411
30667
|
setBranch(branchName) {
|
|
29412
30668
|
var _a, _b, _c, _d;
|
|
29413
30669
|
const encodedBranch = encodeURIComponent(branchName);
|
|
30670
|
+
document.cookie = `x-branch=${encodedBranch}; path=/; max-age=3600`;
|
|
29414
30671
|
this.branch = encodedBranch;
|
|
29415
30672
|
this.assetsApiUrl = ((_a = this.options.tinaioConfig) == null ? void 0 : _a.assetsApiUrlOverride) || "https://assets.tinajs.io";
|
|
29416
30673
|
this.frontendUrl = ((_b = this.options.tinaioConfig) == null ? void 0 : _b.frontendUrlOverride) || "https://app.tina.io";
|
|
@@ -29453,7 +30710,7 @@ mutation addPendingDocumentMutation(
|
|
|
29453
30710
|
branch: ${this.branch}.`;
|
|
29454
30711
|
if (this.branch !== "main") {
|
|
29455
30712
|
errorMessage = `${errorMessage}
|
|
29456
|
-
Note: This error can occur if the branch does not exist on GitHub or on
|
|
30713
|
+
Note: This error can occur if the branch does not exist on GitHub or on TinaCloud`;
|
|
29457
30714
|
}
|
|
29458
30715
|
}
|
|
29459
30716
|
throw new Error(errorMessage);
|
|
@@ -29589,7 +30846,7 @@ mutation addPendingDocumentMutation(
|
|
|
29589
30846
|
unknownCount++;
|
|
29590
30847
|
if (unknownCount > 5) {
|
|
29591
30848
|
throw new Error(
|
|
29592
|
-
"AsyncPoller: status unknown for too long, please check indexing progress the
|
|
30849
|
+
"AsyncPoller: status unknown for too long, please check indexing progress the TinaCloud dashboard"
|
|
29593
30850
|
);
|
|
29594
30851
|
}
|
|
29595
30852
|
}
|
|
@@ -29806,56 +31063,6 @@ mutation addPendingDocumentMutation(
|
|
|
29806
31063
|
!submitting && name
|
|
29807
31064
|
);
|
|
29808
31065
|
};
|
|
29809
|
-
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
29810
|
-
const useTinaAuthRedirect = () => {
|
|
29811
|
-
React.useEffect(() => {
|
|
29812
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
29813
|
-
const config = {
|
|
29814
|
-
code: urlParams.get("code") || "",
|
|
29815
|
-
scope: urlParams.get("scope") || "email",
|
|
29816
|
-
state: urlParams.get("state")
|
|
29817
|
-
};
|
|
29818
|
-
if (!config.code) {
|
|
29819
|
-
return;
|
|
29820
|
-
}
|
|
29821
|
-
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
29822
|
-
}, []);
|
|
29823
|
-
};
|
|
29824
|
-
const createClient = ({
|
|
29825
|
-
clientId,
|
|
29826
|
-
isLocalClient = true,
|
|
29827
|
-
branch,
|
|
29828
|
-
tinaioConfig,
|
|
29829
|
-
schema,
|
|
29830
|
-
apiUrl,
|
|
29831
|
-
tinaGraphQLVersion
|
|
29832
|
-
}) => {
|
|
29833
|
-
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
29834
|
-
clientId: clientId || "",
|
|
29835
|
-
branch: branch || "main",
|
|
29836
|
-
tokenStorage: "LOCAL_STORAGE",
|
|
29837
|
-
tinaioConfig,
|
|
29838
|
-
schema,
|
|
29839
|
-
tinaGraphQLVersion
|
|
29840
|
-
});
|
|
29841
|
-
};
|
|
29842
|
-
function assertShape(value, yupSchema, errorMessage) {
|
|
29843
|
-
const shape = yupSchema(yup__namespace);
|
|
29844
|
-
try {
|
|
29845
|
-
shape.validateSync(value);
|
|
29846
|
-
} catch (e) {
|
|
29847
|
-
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
29848
|
-
throw new Error(message);
|
|
29849
|
-
}
|
|
29850
|
-
}
|
|
29851
|
-
function safeAssertShape(value, yupSchema) {
|
|
29852
|
-
try {
|
|
29853
|
-
assertShape(value, yupSchema);
|
|
29854
|
-
return true;
|
|
29855
|
-
} catch (e) {
|
|
29856
|
-
return false;
|
|
29857
|
-
}
|
|
29858
|
-
}
|
|
29859
31066
|
class TinaAdminApi {
|
|
29860
31067
|
constructor(cms) {
|
|
29861
31068
|
var _a, _b, _c, _d;
|
|
@@ -30202,6 +31409,56 @@ mutation addPendingDocumentMutation(
|
|
|
30202
31409
|
);
|
|
30203
31410
|
}
|
|
30204
31411
|
}
|
|
31412
|
+
const createClient = ({
|
|
31413
|
+
clientId,
|
|
31414
|
+
isLocalClient = true,
|
|
31415
|
+
branch,
|
|
31416
|
+
tinaioConfig,
|
|
31417
|
+
schema,
|
|
31418
|
+
apiUrl,
|
|
31419
|
+
tinaGraphQLVersion
|
|
31420
|
+
}) => {
|
|
31421
|
+
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
31422
|
+
clientId: clientId || "",
|
|
31423
|
+
branch: branch || "main",
|
|
31424
|
+
tokenStorage: "LOCAL_STORAGE",
|
|
31425
|
+
tinaioConfig,
|
|
31426
|
+
schema,
|
|
31427
|
+
tinaGraphQLVersion
|
|
31428
|
+
});
|
|
31429
|
+
};
|
|
31430
|
+
function assertShape(value, yupSchema, errorMessage) {
|
|
31431
|
+
const shape = yupSchema(yup__namespace);
|
|
31432
|
+
try {
|
|
31433
|
+
shape.validateSync(value);
|
|
31434
|
+
} catch (e) {
|
|
31435
|
+
const message = errorMessage || `Failed to assertShape - ${e.message}`;
|
|
31436
|
+
throw new Error(message);
|
|
31437
|
+
}
|
|
31438
|
+
}
|
|
31439
|
+
function safeAssertShape(value, yupSchema) {
|
|
31440
|
+
try {
|
|
31441
|
+
assertShape(value, yupSchema);
|
|
31442
|
+
return true;
|
|
31443
|
+
} catch (e) {
|
|
31444
|
+
return false;
|
|
31445
|
+
}
|
|
31446
|
+
}
|
|
31447
|
+
const TINA_AUTH_CONFIG = "tina_auth_config";
|
|
31448
|
+
const useTinaAuthRedirect = () => {
|
|
31449
|
+
React.useEffect(() => {
|
|
31450
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
31451
|
+
const config = {
|
|
31452
|
+
code: urlParams.get("code") || "",
|
|
31453
|
+
scope: urlParams.get("scope") || "email",
|
|
31454
|
+
state: urlParams.get("state")
|
|
31455
|
+
};
|
|
31456
|
+
if (!config.code) {
|
|
31457
|
+
return;
|
|
31458
|
+
}
|
|
31459
|
+
localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
|
|
31460
|
+
}, []);
|
|
31461
|
+
};
|
|
30205
31462
|
function sleep(ms) {
|
|
30206
31463
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
30207
31464
|
}
|
|
@@ -30300,7 +31557,7 @@ mutation addPendingDocumentMutation(
|
|
|
30300
31557
|
});
|
|
30301
31558
|
}
|
|
30302
31559
|
};
|
|
30303
|
-
let modalTitle = "
|
|
31560
|
+
let modalTitle = "TinaCloud";
|
|
30304
31561
|
if (activeModal === "authenticate" && loginStrategy === "Redirect" && !isTinaCloud) {
|
|
30305
31562
|
modalTitle = "Enter into edit mode";
|
|
30306
31563
|
} else if (activeModal === "authenticate" && loginStrategy === "UsernamePassword") {
|
|
@@ -30316,7 +31573,7 @@ mutation addPendingDocumentMutation(
|
|
|
30316
31573
|
ModalBuilder,
|
|
30317
31574
|
{
|
|
30318
31575
|
title: modalTitle,
|
|
30319
|
-
message: isTinaCloud ? "Your site uses
|
|
31576
|
+
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.",
|
|
30320
31577
|
close,
|
|
30321
31578
|
actions: [
|
|
30322
31579
|
...otherModalActions,
|
|
@@ -30538,6 +31795,9 @@ mutation addPendingDocumentMutation(
|
|
|
30538
31795
|
cms.flags.set("branch-switcher", true);
|
|
30539
31796
|
client.usingEditorialWorkflow = true;
|
|
30540
31797
|
client.protectedBranches = project.protectedBranches;
|
|
31798
|
+
if (!project.metadata[currentBranch]) {
|
|
31799
|
+
setCurrentBranch(project.defaultBranch || "main");
|
|
31800
|
+
}
|
|
30541
31801
|
}
|
|
30542
31802
|
});
|
|
30543
31803
|
};
|
|
@@ -30550,7 +31810,7 @@ mutation addPendingDocumentMutation(
|
|
|
30550
31810
|
}
|
|
30551
31811
|
});
|
|
30552
31812
|
return unsubscribe;
|
|
30553
|
-
}, [isTinaCloud, cms]);
|
|
31813
|
+
}, [currentBranch, isTinaCloud, cms]);
|
|
30554
31814
|
return /* @__PURE__ */ React.createElement(SessionProvider, { basePath: "/api/tina/auth" }, /* @__PURE__ */ React.createElement(
|
|
30555
31815
|
BranchDataProvider,
|
|
30556
31816
|
{
|
|
@@ -31036,6 +32296,14 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31036
32296
|
}
|
|
31037
32297
|
return client.request(query, { variables });
|
|
31038
32298
|
};
|
|
32299
|
+
const GetCMS = ({ children }) => {
|
|
32300
|
+
const cms = useCMS$1();
|
|
32301
|
+
try {
|
|
32302
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(cms));
|
|
32303
|
+
} catch (e) {
|
|
32304
|
+
return null;
|
|
32305
|
+
}
|
|
32306
|
+
};
|
|
31039
32307
|
const Layout = ({ children }) => {
|
|
31040
32308
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
31041
32309
|
"div",
|
|
@@ -31247,47 +32515,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31247
32515
|
}
|
|
31248
32516
|
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));
|
|
31249
32517
|
};
|
|
31250
|
-
const GetCMS = ({ children }) => {
|
|
31251
|
-
try {
|
|
31252
|
-
const cms = useCMS$1();
|
|
31253
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(cms));
|
|
31254
|
-
} catch (e) {
|
|
31255
|
-
return null;
|
|
31256
|
-
}
|
|
31257
|
-
};
|
|
31258
|
-
const PageWrapper = ({ children }) => {
|
|
31259
|
-
var _a, _b;
|
|
31260
|
-
const cms = useCMS$1();
|
|
31261
|
-
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
31262
|
-
const [branchingEnabled, setBranchingEnabled] = React.useState(
|
|
31263
|
-
() => cms.flags.get("branch-switcher")
|
|
31264
|
-
);
|
|
31265
|
-
React.useEffect(() => {
|
|
31266
|
-
cms.events.subscribe("flag:set", ({ key, value }) => {
|
|
31267
|
-
if (key === "branch-switcher") {
|
|
31268
|
-
setBranchingEnabled(value);
|
|
31269
|
-
}
|
|
31270
|
-
});
|
|
31271
|
-
}, [cms.events]);
|
|
31272
|
-
return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 shadow-2xl overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, branchingEnabled && !isLocalMode && /* @__PURE__ */ React.createElement(BranchBanner, null), children);
|
|
31273
|
-
};
|
|
31274
|
-
const PageHeader = ({
|
|
31275
|
-
isLocalMode,
|
|
31276
|
-
children
|
|
31277
|
-
}) => {
|
|
31278
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, isLocalMode && /* @__PURE__ */ React.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "pt-16 xl:pt-12 px-6 xl:px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
|
|
31279
|
-
};
|
|
31280
|
-
const PageBody = ({ children }) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
31281
|
-
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));
|
|
31282
|
-
const DashboardPage = () => {
|
|
31283
|
-
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
31284
|
-
var _a, _b;
|
|
31285
|
-
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.")));
|
|
31286
|
-
});
|
|
31287
|
-
};
|
|
31288
|
-
function RiHome2Line(props) {
|
|
31289
|
-
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);
|
|
31290
|
-
}
|
|
31291
32518
|
const LoadingPage = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
31292
32519
|
"div",
|
|
31293
32520
|
{
|
|
@@ -31397,203 +32624,33 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31397
32624
|
)
|
|
31398
32625
|
)
|
|
31399
32626
|
));
|
|
31400
|
-
|
|
31401
|
-
|
|
31402
|
-
|
|
31403
|
-
}) => {
|
|
31404
|
-
|
|
31405
|
-
|
|
31406
|
-
|
|
31407
|
-
const
|
|
31408
|
-
|
|
31409
|
-
|
|
31410
|
-
const [collection, setCollection] = React.useState(void 0);
|
|
31411
|
-
const [loading, setLoading] = React.useState(true);
|
|
31412
|
-
const [error, setError] = React.useState(void 0);
|
|
31413
|
-
const [resetState, setResetSate] = React.useState(0);
|
|
31414
|
-
React.useEffect(() => {
|
|
31415
|
-
let cancelled = false;
|
|
31416
|
-
const fetchCollection = async () => {
|
|
31417
|
-
var _a;
|
|
31418
|
-
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
31419
|
-
const { name, order } = JSON.parse(sortKey || "{}");
|
|
31420
|
-
const validSortKey = ((_a = collectionExtra.fields) == null ? void 0 : _a.map((x) => x.name).includes(name)) ? name : void 0;
|
|
31421
|
-
try {
|
|
31422
|
-
const collection2 = await api.fetchCollection(
|
|
31423
|
-
collectionName,
|
|
31424
|
-
includeDocuments,
|
|
31425
|
-
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
31426
|
-
after,
|
|
31427
|
-
validSortKey,
|
|
31428
|
-
order,
|
|
31429
|
-
filterArgs
|
|
31430
|
-
);
|
|
31431
|
-
setCollection(collection2);
|
|
31432
|
-
} catch (error2) {
|
|
31433
|
-
cms.alerts.error(
|
|
31434
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31435
|
-
);
|
|
31436
|
-
console.error(error2);
|
|
31437
|
-
setCollection(void 0);
|
|
31438
|
-
setError(error2);
|
|
31439
|
-
}
|
|
31440
|
-
setLoading(false);
|
|
31441
|
-
}
|
|
31442
|
-
};
|
|
31443
|
-
if (cancelled)
|
|
31444
|
-
return;
|
|
31445
|
-
setLoading(true);
|
|
31446
|
-
fetchCollection();
|
|
31447
|
-
return () => {
|
|
31448
|
-
cancelled = true;
|
|
31449
|
-
};
|
|
31450
|
-
}, [
|
|
31451
|
-
cms,
|
|
31452
|
-
collectionName,
|
|
31453
|
-
folder.loading,
|
|
31454
|
-
folder.fullyQualifiedName,
|
|
31455
|
-
resetState,
|
|
31456
|
-
after,
|
|
31457
|
-
sortKey
|
|
31458
|
-
]);
|
|
31459
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31460
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
31461
|
-
};
|
|
31462
|
-
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
31463
|
-
const api = new TinaAdminApi(cms);
|
|
31464
|
-
const schema = cms.api.tina.schema;
|
|
31465
|
-
const collectionExtra = schema.getCollection(collectionName);
|
|
31466
|
-
const [collection, setCollection] = React.useState(void 0);
|
|
31467
|
-
const [loading, setLoading] = React.useState(true);
|
|
31468
|
-
const [error, setError] = React.useState(void 0);
|
|
31469
|
-
const [resetState, setResetSate] = React.useState(0);
|
|
32627
|
+
function RiHome2Line(props) {
|
|
32628
|
+
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);
|
|
32629
|
+
}
|
|
32630
|
+
const PageWrapper = ({ children }) => {
|
|
32631
|
+
var _a, _b;
|
|
32632
|
+
const cms = useCMS$1();
|
|
32633
|
+
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
32634
|
+
const [branchingEnabled, setBranchingEnabled] = React.useState(
|
|
32635
|
+
() => cms.flags.get("branch-switcher")
|
|
32636
|
+
);
|
|
31470
32637
|
React.useEffect(() => {
|
|
31471
|
-
|
|
31472
|
-
|
|
31473
|
-
|
|
31474
|
-
try {
|
|
31475
|
-
const response = await cms.api.search.query(
|
|
31476
|
-
`${search} AND _collection:${collectionName}`,
|
|
31477
|
-
{
|
|
31478
|
-
limit: 15,
|
|
31479
|
-
cursor: after
|
|
31480
|
-
}
|
|
31481
|
-
);
|
|
31482
|
-
const docs = await Promise.allSettled(
|
|
31483
|
-
response.results.map((result) => {
|
|
31484
|
-
const [collection2, relativePath2] = result._id.split(":");
|
|
31485
|
-
return api.fetchDocument(collection2, relativePath2, false);
|
|
31486
|
-
})
|
|
31487
|
-
);
|
|
31488
|
-
const edges = docs.filter((p) => {
|
|
31489
|
-
var _a;
|
|
31490
|
-
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
31491
|
-
}).map((result) => ({ node: result.value.document }));
|
|
31492
|
-
const c = await api.fetchCollection(collectionName, false, "");
|
|
31493
|
-
setCollection({
|
|
31494
|
-
format: collection.format,
|
|
31495
|
-
label: collection.label,
|
|
31496
|
-
name: collectionName,
|
|
31497
|
-
templates: collection.templates,
|
|
31498
|
-
documents: {
|
|
31499
|
-
pageInfo: {
|
|
31500
|
-
hasNextPage: !!response.nextCursor,
|
|
31501
|
-
hasPreviousPage: !!response.prevCursor,
|
|
31502
|
-
startCursor: "",
|
|
31503
|
-
endCursor: response.nextCursor || ""
|
|
31504
|
-
},
|
|
31505
|
-
edges
|
|
31506
|
-
}
|
|
31507
|
-
});
|
|
31508
|
-
} catch (error2) {
|
|
31509
|
-
cms.alerts.error(
|
|
31510
|
-
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
31511
|
-
);
|
|
31512
|
-
console.error(error2);
|
|
31513
|
-
setCollection(void 0);
|
|
31514
|
-
setError(error2);
|
|
31515
|
-
}
|
|
31516
|
-
setLoading(false);
|
|
32638
|
+
cms.events.subscribe("flag:set", ({ key, value }) => {
|
|
32639
|
+
if (key === "branch-switcher") {
|
|
32640
|
+
setBranchingEnabled(value);
|
|
31517
32641
|
}
|
|
31518
|
-
};
|
|
31519
|
-
|
|
31520
|
-
|
|
31521
|
-
setLoading(true);
|
|
31522
|
-
searchCollection();
|
|
31523
|
-
return () => {
|
|
31524
|
-
cancelled = true;
|
|
31525
|
-
};
|
|
31526
|
-
}, [
|
|
31527
|
-
cms,
|
|
31528
|
-
collectionName,
|
|
31529
|
-
folder.loading,
|
|
31530
|
-
folder.fullyQualifiedName,
|
|
31531
|
-
resetState,
|
|
31532
|
-
after,
|
|
31533
|
-
search
|
|
31534
|
-
]);
|
|
31535
|
-
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
31536
|
-
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
32642
|
+
});
|
|
32643
|
+
}, [cms.events]);
|
|
32644
|
+
return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 shadow-2xl overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, branchingEnabled && !isLocalMode && /* @__PURE__ */ React.createElement(BranchBanner, null), children);
|
|
31537
32645
|
};
|
|
31538
|
-
const
|
|
31539
|
-
|
|
31540
|
-
|
|
31541
|
-
folder,
|
|
31542
|
-
includeDocuments = true,
|
|
31543
|
-
startCursor,
|
|
31544
|
-
sortKey,
|
|
31545
|
-
children,
|
|
31546
|
-
filterArgs,
|
|
31547
|
-
search
|
|
32646
|
+
const PageHeader = ({
|
|
32647
|
+
isLocalMode,
|
|
32648
|
+
children
|
|
31548
32649
|
}) => {
|
|
31549
|
-
|
|
31550
|
-
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? useSearchCollection(
|
|
31551
|
-
cms,
|
|
31552
|
-
collectionName,
|
|
31553
|
-
includeDocuments,
|
|
31554
|
-
folder,
|
|
31555
|
-
startCursor || "",
|
|
31556
|
-
search
|
|
31557
|
-
) : useGetCollection(
|
|
31558
|
-
cms,
|
|
31559
|
-
collectionName,
|
|
31560
|
-
includeDocuments,
|
|
31561
|
-
folder,
|
|
31562
|
-
startCursor || "",
|
|
31563
|
-
sortKey,
|
|
31564
|
-
filterArgs
|
|
31565
|
-
) || {};
|
|
31566
|
-
React.useEffect(() => {
|
|
31567
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
31568
|
-
if (loading)
|
|
31569
|
-
return;
|
|
31570
|
-
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
31571
|
-
collection.name
|
|
31572
|
-
);
|
|
31573
|
-
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
31574
|
-
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
31575
|
-
const collectionResponse = collection;
|
|
31576
|
-
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
31577
|
-
((_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
|
|
31578
|
-
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
31579
|
-
const doc = collectionResponse.documents.edges[0].node;
|
|
31580
|
-
handleNavigate(
|
|
31581
|
-
navigate,
|
|
31582
|
-
cms,
|
|
31583
|
-
collectionResponse,
|
|
31584
|
-
collectionDefinition,
|
|
31585
|
-
doc
|
|
31586
|
-
);
|
|
31587
|
-
}
|
|
31588
|
-
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
31589
|
-
if (error) {
|
|
31590
|
-
return /* @__PURE__ */ React.createElement(FullscreenError, null);
|
|
31591
|
-
}
|
|
31592
|
-
if (loading) {
|
|
31593
|
-
return /* @__PURE__ */ React.createElement(LoadingPage, null);
|
|
31594
|
-
}
|
|
31595
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
32650
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, isLocalMode && /* @__PURE__ */ React.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "pt-16 xl:pt-12 px-6 xl:px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
|
|
31596
32651
|
};
|
|
32652
|
+
const PageBody = ({ children }) => /* @__PURE__ */ React.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
|
|
32653
|
+
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));
|
|
31597
32654
|
const folderRegex = /^.*\/~\/*(.*)$/;
|
|
31598
32655
|
const parentFolder = (folder) => {
|
|
31599
32656
|
return {
|
|
@@ -31713,6 +32770,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31713
32770
|
const [vars, setVars] = React.useState({
|
|
31714
32771
|
collection: collectionName,
|
|
31715
32772
|
relativePath: "",
|
|
32773
|
+
relativePathWithoutExtension: "",
|
|
31716
32774
|
newRelativePath: "",
|
|
31717
32775
|
filterField: "",
|
|
31718
32776
|
folderName: "",
|
|
@@ -31754,6 +32812,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31754
32812
|
...old,
|
|
31755
32813
|
collection: collectionName,
|
|
31756
32814
|
relativePath: "",
|
|
32815
|
+
relativePathWithoutExtension: "",
|
|
31757
32816
|
newRelativePath: "",
|
|
31758
32817
|
filterField: "",
|
|
31759
32818
|
startsWith: "",
|
|
@@ -31779,6 +32838,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31779
32838
|
collectionName === vars.collection ? vars : {
|
|
31780
32839
|
collection: collectionName,
|
|
31781
32840
|
relativePath: "",
|
|
32841
|
+
relativePathWithoutExtension: "",
|
|
31782
32842
|
newRelativePath: "",
|
|
31783
32843
|
filterField: "",
|
|
31784
32844
|
startsWith: "",
|
|
@@ -31866,7 +32926,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31866
32926
|
safeSubmit: async () => {
|
|
31867
32927
|
try {
|
|
31868
32928
|
await admin.deleteDocument(vars);
|
|
31869
|
-
cms.alerts.info(
|
|
32929
|
+
cms.alerts.info(
|
|
32930
|
+
"Document was successfully deleted"
|
|
32931
|
+
);
|
|
31870
32932
|
reFetchCollection();
|
|
31871
32933
|
} catch (error) {
|
|
31872
32934
|
cms.alerts.warn(
|
|
@@ -31880,7 +32942,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31880
32942
|
), renameModalOpen && /* @__PURE__ */ React.createElement(
|
|
31881
32943
|
RenameModal,
|
|
31882
32944
|
{
|
|
31883
|
-
filename: vars.
|
|
32945
|
+
filename: vars.relativePathWithoutExtension,
|
|
31884
32946
|
newRelativePath: vars.newRelativePath,
|
|
31885
32947
|
setNewRelativePath: (newRelativePath) => {
|
|
31886
32948
|
setVars((vars2) => {
|
|
@@ -31895,7 +32957,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31895
32957
|
relativePath: vars.relativePath,
|
|
31896
32958
|
newRelativePath
|
|
31897
32959
|
});
|
|
31898
|
-
cms.alerts.info(
|
|
32960
|
+
cms.alerts.info(
|
|
32961
|
+
"Document was successfully renamed"
|
|
32962
|
+
);
|
|
31899
32963
|
reFetchCollection();
|
|
31900
32964
|
} catch (error) {
|
|
31901
32965
|
if (error.message.indexOf("has references")) {
|
|
@@ -31995,7 +33059,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31995
33059
|
name: "sort",
|
|
31996
33060
|
value: sortKey,
|
|
31997
33061
|
onChange: (e) => {
|
|
31998
|
-
const val = JSON.parse(
|
|
33062
|
+
const val = JSON.parse(
|
|
33063
|
+
e.target.value
|
|
33064
|
+
);
|
|
31999
33065
|
setEndCursor("");
|
|
32000
33066
|
setPrevCursors([]);
|
|
32001
33067
|
window == null ? void 0 : window.localStorage.setItem(
|
|
@@ -32201,6 +33267,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32201
33267
|
setVars((old) => ({
|
|
32202
33268
|
...old,
|
|
32203
33269
|
collection: collectionName,
|
|
33270
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33271
|
+
"/"
|
|
33272
|
+
),
|
|
32204
33273
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32205
33274
|
"/"
|
|
32206
33275
|
) + document2.node._sys.extension,
|
|
@@ -32223,6 +33292,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32223
33292
|
setVars((old) => ({
|
|
32224
33293
|
...old,
|
|
32225
33294
|
collection: collectionName,
|
|
33295
|
+
relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
|
|
33296
|
+
"/"
|
|
33297
|
+
),
|
|
32226
33298
|
relativePath: document2.node._sys.breadcrumbs.join(
|
|
32227
33299
|
"/"
|
|
32228
33300
|
) + document2.node._sys.extension,
|
|
@@ -32435,7 +33507,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32435
33507
|
newRelativePath,
|
|
32436
33508
|
setNewRelativePath
|
|
32437
33509
|
}) => {
|
|
32438
|
-
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), "?
|
|
33510
|
+
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(
|
|
32439
33511
|
BaseTextField,
|
|
32440
33512
|
{
|
|
32441
33513
|
placeholder: "Enter a new name for the document's file",
|
|
@@ -32450,11 +33522,243 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32450
33522
|
onClick: async () => {
|
|
32451
33523
|
await renameFunc();
|
|
32452
33524
|
close2();
|
|
32453
|
-
}
|
|
33525
|
+
},
|
|
33526
|
+
disabled: !newRelativePath || newRelativePath === filename
|
|
32454
33527
|
},
|
|
32455
33528
|
"Rename"
|
|
32456
33529
|
))));
|
|
32457
33530
|
};
|
|
33531
|
+
const FullscreenError = ({
|
|
33532
|
+
title = "Error",
|
|
33533
|
+
errorMessage = "It looks like something went wrong."
|
|
33534
|
+
}) => {
|
|
33535
|
+
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"));
|
|
33536
|
+
};
|
|
33537
|
+
const isValidSortKey = (sortKey, collection) => {
|
|
33538
|
+
if (collection.fields) {
|
|
33539
|
+
const sortKeys = collection.fields.map((x) => x.name);
|
|
33540
|
+
return sortKeys.includes(sortKey);
|
|
33541
|
+
} else if (collection.templates) {
|
|
33542
|
+
const collectionMap = {};
|
|
33543
|
+
const conflictedFields = /* @__PURE__ */ new Set();
|
|
33544
|
+
for (const template of collection.templates) {
|
|
33545
|
+
for (const field of template.fields) {
|
|
33546
|
+
if (collectionMap[field.name]) {
|
|
33547
|
+
if (collectionMap[field.name].type !== field.type) {
|
|
33548
|
+
conflictedFields.add(field.name);
|
|
33549
|
+
}
|
|
33550
|
+
} else {
|
|
33551
|
+
collectionMap[field.name] = field;
|
|
33552
|
+
}
|
|
33553
|
+
}
|
|
33554
|
+
}
|
|
33555
|
+
for (const key in conflictedFields) {
|
|
33556
|
+
delete collectionMap[key];
|
|
33557
|
+
}
|
|
33558
|
+
for (const key in collectionMap) {
|
|
33559
|
+
if (key === sortKey) {
|
|
33560
|
+
return true;
|
|
33561
|
+
}
|
|
33562
|
+
}
|
|
33563
|
+
return false;
|
|
33564
|
+
}
|
|
33565
|
+
};
|
|
33566
|
+
const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
|
|
33567
|
+
const api = new TinaAdminApi(cms);
|
|
33568
|
+
const schema = cms.api.tina.schema;
|
|
33569
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33570
|
+
const [collection, setCollection] = React.useState(void 0);
|
|
33571
|
+
const [loading, setLoading] = React.useState(true);
|
|
33572
|
+
const [error, setError] = React.useState(void 0);
|
|
33573
|
+
const [resetState, setResetSate] = React.useState(0);
|
|
33574
|
+
React.useEffect(() => {
|
|
33575
|
+
let cancelled = false;
|
|
33576
|
+
const fetchCollection = async () => {
|
|
33577
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33578
|
+
const { name, order } = JSON.parse(sortKey || "{}");
|
|
33579
|
+
const validSortKey = isValidSortKey(name, collectionExtra) ? name : void 0;
|
|
33580
|
+
try {
|
|
33581
|
+
const collection2 = await api.fetchCollection(
|
|
33582
|
+
collectionName,
|
|
33583
|
+
includeDocuments,
|
|
33584
|
+
(filterArgs == null ? void 0 : filterArgs.filterField) ? "" : folder.fullyQualifiedName,
|
|
33585
|
+
after,
|
|
33586
|
+
validSortKey,
|
|
33587
|
+
order,
|
|
33588
|
+
filterArgs
|
|
33589
|
+
);
|
|
33590
|
+
setCollection(collection2);
|
|
33591
|
+
} catch (error2) {
|
|
33592
|
+
cms.alerts.error(
|
|
33593
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33594
|
+
);
|
|
33595
|
+
console.error(error2);
|
|
33596
|
+
setCollection(void 0);
|
|
33597
|
+
setError(error2);
|
|
33598
|
+
}
|
|
33599
|
+
setLoading(false);
|
|
33600
|
+
}
|
|
33601
|
+
};
|
|
33602
|
+
if (cancelled)
|
|
33603
|
+
return;
|
|
33604
|
+
setLoading(true);
|
|
33605
|
+
fetchCollection();
|
|
33606
|
+
return () => {
|
|
33607
|
+
cancelled = true;
|
|
33608
|
+
};
|
|
33609
|
+
}, [
|
|
33610
|
+
cms,
|
|
33611
|
+
collectionName,
|
|
33612
|
+
folder.loading,
|
|
33613
|
+
folder.fullyQualifiedName,
|
|
33614
|
+
resetState,
|
|
33615
|
+
after,
|
|
33616
|
+
sortKey
|
|
33617
|
+
]);
|
|
33618
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33619
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33620
|
+
};
|
|
33621
|
+
const useSearchCollection = (cms, collectionName, includeDocuments = true, folder, after = "", search) => {
|
|
33622
|
+
const api = new TinaAdminApi(cms);
|
|
33623
|
+
const schema = cms.api.tina.schema;
|
|
33624
|
+
const collectionExtra = schema.getCollection(collectionName);
|
|
33625
|
+
const [collection, setCollection] = React.useState(void 0);
|
|
33626
|
+
const [loading, setLoading] = React.useState(true);
|
|
33627
|
+
const [error, setError] = React.useState(void 0);
|
|
33628
|
+
const [resetState, setResetSate] = React.useState(0);
|
|
33629
|
+
React.useEffect(() => {
|
|
33630
|
+
let cancelled = false;
|
|
33631
|
+
const searchCollection = async () => {
|
|
33632
|
+
if (await api.isAuthenticated() && !folder.loading && !cancelled) {
|
|
33633
|
+
try {
|
|
33634
|
+
const response = await cms.api.search.query(
|
|
33635
|
+
`${search} AND _collection:${collectionName}`,
|
|
33636
|
+
{
|
|
33637
|
+
limit: 15,
|
|
33638
|
+
cursor: after
|
|
33639
|
+
}
|
|
33640
|
+
);
|
|
33641
|
+
const docs = await Promise.allSettled(
|
|
33642
|
+
response.results.map((result) => {
|
|
33643
|
+
const [collection2, relativePath2] = result._id.split(":");
|
|
33644
|
+
return api.fetchDocument(collection2, relativePath2, false);
|
|
33645
|
+
})
|
|
33646
|
+
);
|
|
33647
|
+
const edges = docs.filter((p) => {
|
|
33648
|
+
var _a;
|
|
33649
|
+
return p.status === "fulfilled" && !!((_a = p.value) == null ? void 0 : _a.document);
|
|
33650
|
+
}).map((result) => ({ node: result.value.document }));
|
|
33651
|
+
const c = await api.fetchCollection(collectionName, false, "");
|
|
33652
|
+
setCollection({
|
|
33653
|
+
format: collection.format,
|
|
33654
|
+
label: collection.label,
|
|
33655
|
+
name: collectionName,
|
|
33656
|
+
templates: collection.templates,
|
|
33657
|
+
documents: {
|
|
33658
|
+
pageInfo: {
|
|
33659
|
+
hasNextPage: !!response.nextCursor,
|
|
33660
|
+
hasPreviousPage: !!response.prevCursor,
|
|
33661
|
+
startCursor: "",
|
|
33662
|
+
endCursor: response.nextCursor || ""
|
|
33663
|
+
},
|
|
33664
|
+
edges
|
|
33665
|
+
}
|
|
33666
|
+
});
|
|
33667
|
+
} catch (error2) {
|
|
33668
|
+
cms.alerts.error(
|
|
33669
|
+
`[${error2.name}] GetCollection failed: ${error2.message}`
|
|
33670
|
+
);
|
|
33671
|
+
console.error(error2);
|
|
33672
|
+
setCollection(void 0);
|
|
33673
|
+
setError(error2);
|
|
33674
|
+
}
|
|
33675
|
+
setLoading(false);
|
|
33676
|
+
}
|
|
33677
|
+
};
|
|
33678
|
+
if (cancelled)
|
|
33679
|
+
return;
|
|
33680
|
+
setLoading(true);
|
|
33681
|
+
searchCollection();
|
|
33682
|
+
return () => {
|
|
33683
|
+
cancelled = true;
|
|
33684
|
+
};
|
|
33685
|
+
}, [
|
|
33686
|
+
cms,
|
|
33687
|
+
collectionName,
|
|
33688
|
+
folder.loading,
|
|
33689
|
+
folder.fullyQualifiedName,
|
|
33690
|
+
resetState,
|
|
33691
|
+
after,
|
|
33692
|
+
search
|
|
33693
|
+
]);
|
|
33694
|
+
const reFetchCollection = () => setResetSate((x) => x + 1);
|
|
33695
|
+
return { collection, loading, error, reFetchCollection, collectionExtra };
|
|
33696
|
+
};
|
|
33697
|
+
const GetCollection = ({
|
|
33698
|
+
cms,
|
|
33699
|
+
collectionName,
|
|
33700
|
+
folder,
|
|
33701
|
+
includeDocuments = true,
|
|
33702
|
+
startCursor,
|
|
33703
|
+
sortKey,
|
|
33704
|
+
children,
|
|
33705
|
+
filterArgs,
|
|
33706
|
+
search
|
|
33707
|
+
}) => {
|
|
33708
|
+
const navigate = reactRouterDom.useNavigate();
|
|
33709
|
+
const { collection, loading, error, reFetchCollection, collectionExtra } = search ? (
|
|
33710
|
+
// biome-ignore lint/correctness/useHookAtTopLevel: not ready to fix these yet
|
|
33711
|
+
useSearchCollection(
|
|
33712
|
+
cms,
|
|
33713
|
+
collectionName,
|
|
33714
|
+
includeDocuments,
|
|
33715
|
+
folder,
|
|
33716
|
+
startCursor || "",
|
|
33717
|
+
search
|
|
33718
|
+
)
|
|
33719
|
+
) : (
|
|
33720
|
+
// biome-ignore lint/correctness/useHookAtTopLevel: not ready to fix these yet
|
|
33721
|
+
useGetCollection(
|
|
33722
|
+
cms,
|
|
33723
|
+
collectionName,
|
|
33724
|
+
includeDocuments,
|
|
33725
|
+
folder,
|
|
33726
|
+
startCursor || "",
|
|
33727
|
+
sortKey,
|
|
33728
|
+
filterArgs
|
|
33729
|
+
) || {}
|
|
33730
|
+
);
|
|
33731
|
+
React.useEffect(() => {
|
|
33732
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
33733
|
+
if (loading)
|
|
33734
|
+
return;
|
|
33735
|
+
const collectionDefinition = cms.api.tina.schema.getCollection(
|
|
33736
|
+
collection.name
|
|
33737
|
+
);
|
|
33738
|
+
const allowCreate = ((_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) ?? true;
|
|
33739
|
+
const allowDelete = ((_d = (_c = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _c.allowedActions) == null ? void 0 : _d.delete) ?? true;
|
|
33740
|
+
const collectionResponse = collection;
|
|
33741
|
+
if (!allowCreate && !allowDelete && // Check there is only one document
|
|
33742
|
+
((_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
|
|
33743
|
+
((_i = (_h = (_g = collectionResponse.documents) == null ? void 0 : _g.edges[0]) == null ? void 0 : _h.node) == null ? void 0 : _i.__typename) !== "Folder") {
|
|
33744
|
+
const doc = collectionResponse.documents.edges[0].node;
|
|
33745
|
+
handleNavigate(
|
|
33746
|
+
navigate,
|
|
33747
|
+
cms,
|
|
33748
|
+
collectionResponse,
|
|
33749
|
+
collectionDefinition,
|
|
33750
|
+
doc
|
|
33751
|
+
);
|
|
33752
|
+
}
|
|
33753
|
+
}, [(collection == null ? void 0 : collection.name) || "", loading]);
|
|
33754
|
+
if (error) {
|
|
33755
|
+
return /* @__PURE__ */ React.createElement(FullscreenError, null);
|
|
33756
|
+
}
|
|
33757
|
+
if (loading) {
|
|
33758
|
+
return /* @__PURE__ */ React.createElement(LoadingPage, null);
|
|
33759
|
+
}
|
|
33760
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(collection, loading, reFetchCollection, collectionExtra));
|
|
33761
|
+
};
|
|
32458
33762
|
const ErrorDialog = (props) => {
|
|
32459
33763
|
return /* @__PURE__ */ React.createElement(
|
|
32460
33764
|
"div",
|
|
@@ -32777,7 +34081,10 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32777
34081
|
const fetchDocument = async () => {
|
|
32778
34082
|
if (api.isAuthenticated()) {
|
|
32779
34083
|
try {
|
|
32780
|
-
const response = await api.fetchDocument(
|
|
34084
|
+
const response = await api.fetchDocument(
|
|
34085
|
+
collectionName,
|
|
34086
|
+
relativePath2
|
|
34087
|
+
);
|
|
32781
34088
|
setDocument(response.document);
|
|
32782
34089
|
} catch (error2) {
|
|
32783
34090
|
cms.alerts.error(
|
|
@@ -32995,6 +34302,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32995
34302
|
), /* @__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 }))
|
|
32996
34303
|
), activeForm && /* @__PURE__ */ React.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine }));
|
|
32997
34304
|
};
|
|
34305
|
+
const DashboardPage = () => {
|
|
34306
|
+
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
34307
|
+
var _a, _b;
|
|
34308
|
+
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.")));
|
|
34309
|
+
});
|
|
34310
|
+
};
|
|
32998
34311
|
const ScreenPage = () => {
|
|
32999
34312
|
const { screenName } = reactRouterDom.useParams();
|
|
33000
34313
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
@@ -33077,7 +34390,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33077
34390
|
} catch {
|
|
33078
34391
|
cms.alerts.error("Branch indexing failed.");
|
|
33079
34392
|
setErrorMessage(
|
|
33080
|
-
'Branch indexing failed, please check the
|
|
34393
|
+
'Branch indexing failed, please check the TinaCloud dashboard for more information. To try again chick "re-index" on the branch in the dashboard.'
|
|
33081
34394
|
);
|
|
33082
34395
|
setState("error");
|
|
33083
34396
|
}
|
|
@@ -33245,7 +34558,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33245
34558
|
);
|
|
33246
34559
|
}
|
|
33247
34560
|
}).catch((e) => {
|
|
33248
|
-
if (e.message.includes("has not been indexed by
|
|
34561
|
+
if (e.message.includes("has not been indexed by TinaCloud")) {
|
|
33249
34562
|
setSchemaMissingError(true);
|
|
33250
34563
|
} else {
|
|
33251
34564
|
cms.alerts.error(`Unexpected error checking schema: ${e}`);
|
|
@@ -33769,3 +35082,4 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33769
35082
|
exports2.wrapFieldsWithMeta = wrapFieldsWithMeta;
|
|
33770
35083
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
33771
35084
|
});
|
|
35085
|
+
//# sourceMappingURL=index.js.map
|