tinacms 0.0.0-ecea7ac-20241011043815 → 0.0.0-ed3db71-20250205054832
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/types.d.ts +3 -0
- package/dist/cache/node-cache.d.ts +1 -0
- package/dist/client.js +90 -61
- package/dist/client.mjs +49 -35
- package/dist/index.d.ts +1 -1
- package/dist/index.js +275 -304
- package/dist/index.mjs +287 -316
- package/dist/node-cache-5e8db9f0.mjs +63 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/package.json +28 -28
- package/dist/__vite-browser-external-d06ac358.mjs +0 -4
- package/dist/node-cache-7fa2452c.mjs +0 -43
package/dist/index.js
CHANGED
|
@@ -774,6 +774,22 @@ var __publicField = (obj, key, value) => {
|
|
|
774
774
|
);
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
+
function wrapFieldWithNoHeader(Field) {
|
|
778
|
+
return (props) => {
|
|
779
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
780
|
+
FieldMeta,
|
|
781
|
+
{
|
|
782
|
+
name: props.input.name,
|
|
783
|
+
label: false,
|
|
784
|
+
description: "",
|
|
785
|
+
error: props.meta.error,
|
|
786
|
+
index: props.index,
|
|
787
|
+
tinaForm: props.tinaForm
|
|
788
|
+
},
|
|
789
|
+
/* @__PURE__ */ React__namespace.createElement(Field, { ...props })
|
|
790
|
+
);
|
|
791
|
+
};
|
|
792
|
+
}
|
|
777
793
|
function wrapFieldWithError(Field) {
|
|
778
794
|
return (props) => {
|
|
779
795
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -846,6 +862,16 @@ var __publicField = (obj, key, value) => {
|
|
|
846
862
|
className,
|
|
847
863
|
...props
|
|
848
864
|
}) => {
|
|
865
|
+
if (typeof children === "string") {
|
|
866
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
867
|
+
"span",
|
|
868
|
+
{
|
|
869
|
+
className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0 ${className}`,
|
|
870
|
+
...props,
|
|
871
|
+
dangerouslySetInnerHTML: { __html: children }
|
|
872
|
+
}
|
|
873
|
+
);
|
|
874
|
+
}
|
|
849
875
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
850
876
|
"span",
|
|
851
877
|
{
|
|
@@ -1321,7 +1347,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1321
1347
|
React.useEffect(() => {
|
|
1322
1348
|
if (mermaidRef.current) {
|
|
1323
1349
|
mermaid.initialize({ startOnLoad: true });
|
|
1324
|
-
mermaid.
|
|
1350
|
+
mermaid.init();
|
|
1325
1351
|
}
|
|
1326
1352
|
}, [config]);
|
|
1327
1353
|
return /* @__PURE__ */ React.createElement("div", { contentEditable: false, className: "border-border border-b" }, /* @__PURE__ */ React.createElement("div", { ref: mermaidRef }, /* @__PURE__ */ React.createElement("pre", { className: "mermaid not-tina-prose" }, config)));
|
|
@@ -1348,7 +1374,7 @@ flowchart TD
|
|
|
1348
1374
|
--> id2(modify me to see changes!)
|
|
1349
1375
|
id2
|
|
1350
1376
|
--> id3(Click the top button to preview the changes)
|
|
1351
|
-
--> id4(Learn about mermaid diagrams
|
|
1377
|
+
--> id4(Learn about mermaid diagrams - mermaid.js.org)`;
|
|
1352
1378
|
const MermaidElement = cn$1.withRef(
|
|
1353
1379
|
({ children, nodeProps, element, ...props }, ref) => {
|
|
1354
1380
|
const [mermaidConfig, setMermaidConfig] = React.useState(
|
|
@@ -1364,7 +1390,7 @@ flowchart TD
|
|
|
1364
1390
|
children: [{ type: "text", text: "" }]
|
|
1365
1391
|
};
|
|
1366
1392
|
React.useEffect(() => {
|
|
1367
|
-
if (mermaid.parse(mermaidConfig
|
|
1393
|
+
if (mermaid.parse(mermaidConfig)) {
|
|
1368
1394
|
setMermaidError(null);
|
|
1369
1395
|
}
|
|
1370
1396
|
}, [mermaidConfig]);
|
|
@@ -3676,7 +3702,7 @@ flowchart TD
|
|
|
3676
3702
|
};
|
|
3677
3703
|
const sizeClasses = {
|
|
3678
3704
|
small: `text-xs h-8 px-3`,
|
|
3679
|
-
medium: `text-sm h-10 px-
|
|
3705
|
+
medium: `text-sm h-10 px-8`,
|
|
3680
3706
|
custom: ``
|
|
3681
3707
|
};
|
|
3682
3708
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -3804,7 +3830,7 @@ flowchart TD
|
|
|
3804
3830
|
function _objectWithoutProperties(source, excluded) {
|
|
3805
3831
|
if (source == null)
|
|
3806
3832
|
return {};
|
|
3807
|
-
var target = _objectWithoutPropertiesLoose
|
|
3833
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
3808
3834
|
var key, i;
|
|
3809
3835
|
if (Object.getOwnPropertySymbols) {
|
|
3810
3836
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -3819,7 +3845,7 @@ flowchart TD
|
|
|
3819
3845
|
}
|
|
3820
3846
|
return target;
|
|
3821
3847
|
}
|
|
3822
|
-
function _objectWithoutPropertiesLoose
|
|
3848
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
3823
3849
|
if (source == null)
|
|
3824
3850
|
return {};
|
|
3825
3851
|
var target = {};
|
|
@@ -4909,7 +4935,28 @@ flowchart TD
|
|
|
4909
4935
|
onChange,
|
|
4910
4936
|
value,
|
|
4911
4937
|
step
|
|
4912
|
-
}) => /* @__PURE__ */ React__namespace.createElement(
|
|
4938
|
+
}) => /* @__PURE__ */ React__namespace.createElement(
|
|
4939
|
+
Input,
|
|
4940
|
+
{
|
|
4941
|
+
type: "number",
|
|
4942
|
+
step,
|
|
4943
|
+
value,
|
|
4944
|
+
onChange: (event) => {
|
|
4945
|
+
const inputValue = event.target.value;
|
|
4946
|
+
const newValue = inputValue === "" ? void 0 : inputValue;
|
|
4947
|
+
if (onChange) {
|
|
4948
|
+
const syntheticEvent = {
|
|
4949
|
+
...event,
|
|
4950
|
+
target: {
|
|
4951
|
+
...event.target,
|
|
4952
|
+
value: newValue
|
|
4953
|
+
}
|
|
4954
|
+
};
|
|
4955
|
+
onChange(syntheticEvent);
|
|
4956
|
+
}
|
|
4957
|
+
}
|
|
4958
|
+
}
|
|
4959
|
+
);
|
|
4913
4960
|
function useCMS() {
|
|
4914
4961
|
return useCMS$1();
|
|
4915
4962
|
}
|
|
@@ -5710,10 +5757,11 @@ flowchart TD
|
|
|
5710
5757
|
return /* @__PURE__ */ React.createElement(
|
|
5711
5758
|
"button",
|
|
5712
5759
|
{
|
|
5713
|
-
|
|
5760
|
+
type: "button",
|
|
5761
|
+
className: `w-8 px-1 py-2.5 flex items-center justify-center text-gray-200 hover:opacity-100 opacity-30 hover:bg-gray-50 ${disabled && "pointer-events-none opacity-30 cursor-not-allowed"}`,
|
|
5714
5762
|
onClick
|
|
5715
5763
|
},
|
|
5716
|
-
/* @__PURE__ */ React.createElement(TrashIcon, { className: "fill-current transition-colors ease-out
|
|
5764
|
+
/* @__PURE__ */ React.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
|
|
5717
5765
|
);
|
|
5718
5766
|
};
|
|
5719
5767
|
const DragHandle = ({ isDragging }) => {
|
|
@@ -5791,27 +5839,35 @@ flowchart TD
|
|
|
5791
5839
|
))))
|
|
5792
5840
|
))));
|
|
5793
5841
|
};
|
|
5794
|
-
const Group =
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5842
|
+
const Group = wrapFieldWithNoHeader(
|
|
5843
|
+
({ tinaForm, field }) => {
|
|
5844
|
+
const cms = useCMS$1();
|
|
5845
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
|
|
5846
|
+
Header,
|
|
5847
|
+
{
|
|
5848
|
+
onClick: () => {
|
|
5849
|
+
const state = tinaForm.finalForm.getState();
|
|
5850
|
+
if (state.invalid === true) {
|
|
5851
|
+
cms.alerts.error("Cannot navigate away from an invalid form.");
|
|
5852
|
+
return;
|
|
5853
|
+
}
|
|
5854
|
+
cms.dispatch({
|
|
5855
|
+
type: "forms:set-active-field-name",
|
|
5856
|
+
value: { formId: tinaForm.id, fieldName: field.name }
|
|
5857
|
+
});
|
|
5805
5858
|
}
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5859
|
+
},
|
|
5860
|
+
field.label || field.name,
|
|
5861
|
+
field.description && /* @__PURE__ */ React__namespace.createElement(
|
|
5862
|
+
"span",
|
|
5863
|
+
{
|
|
5864
|
+
className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0`,
|
|
5865
|
+
dangerouslySetInnerHTML: { __html: field.description }
|
|
5866
|
+
}
|
|
5867
|
+
)
|
|
5868
|
+
));
|
|
5869
|
+
}
|
|
5870
|
+
);
|
|
5815
5871
|
const Header = ({ onClick, children }) => {
|
|
5816
5872
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: "pt-1 mb-5" }, /* @__PURE__ */ React__namespace.createElement(
|
|
5817
5873
|
"button",
|
|
@@ -7153,244 +7209,65 @@ flowchart TD
|
|
|
7153
7209
|
str = "0" + str;
|
|
7154
7210
|
return str;
|
|
7155
7211
|
}
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
}
|
|
7168
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
7169
|
-
if (source == null)
|
|
7170
|
-
return {};
|
|
7171
|
-
var target = {};
|
|
7172
|
-
var sourceKeys = Object.keys(source);
|
|
7173
|
-
var key, i;
|
|
7174
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
7175
|
-
key = sourceKeys[i];
|
|
7176
|
-
if (excluded.indexOf(key) >= 0)
|
|
7177
|
-
continue;
|
|
7178
|
-
target[key] = source[key];
|
|
7179
|
-
}
|
|
7180
|
-
return target;
|
|
7181
|
-
}
|
|
7182
|
-
function _assertThisInitialized(self2) {
|
|
7183
|
-
if (self2 === void 0) {
|
|
7184
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7185
|
-
}
|
|
7186
|
-
return self2;
|
|
7187
|
-
}
|
|
7188
|
-
function isNodeFound(current, componentNode, ignoreClass) {
|
|
7189
|
-
if (current === componentNode) {
|
|
7190
|
-
return true;
|
|
7212
|
+
var useClickAway$1 = {};
|
|
7213
|
+
var util = {};
|
|
7214
|
+
Object.defineProperty(util, "__esModule", { value: true });
|
|
7215
|
+
util.isNavigator = util.isBrowser = util.off = util.on = util.noop = void 0;
|
|
7216
|
+
var noop = function() {
|
|
7217
|
+
};
|
|
7218
|
+
util.noop = noop;
|
|
7219
|
+
function on(obj) {
|
|
7220
|
+
var args = [];
|
|
7221
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
7222
|
+
args[_i - 1] = arguments[_i];
|
|
7191
7223
|
}
|
|
7192
|
-
if (
|
|
7193
|
-
|
|
7224
|
+
if (obj && obj.addEventListener) {
|
|
7225
|
+
obj.addEventListener.apply(obj, args);
|
|
7194
7226
|
}
|
|
7195
|
-
return current.classList.contains(ignoreClass);
|
|
7196
7227
|
}
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7228
|
+
util.on = on;
|
|
7229
|
+
function off(obj) {
|
|
7230
|
+
var args = [];
|
|
7231
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
7232
|
+
args[_i - 1] = arguments[_i];
|
|
7200
7233
|
}
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
return true;
|
|
7204
|
-
}
|
|
7205
|
-
current = current.parentNode || current.host;
|
|
7206
|
-
}
|
|
7207
|
-
return current;
|
|
7208
|
-
}
|
|
7209
|
-
function clickedScrollbar(evt) {
|
|
7210
|
-
return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;
|
|
7211
|
-
}
|
|
7212
|
-
var testPassiveEventSupport = function testPassiveEventSupport2() {
|
|
7213
|
-
if (typeof window === "undefined" || typeof window.addEventListener !== "function") {
|
|
7214
|
-
return;
|
|
7215
|
-
}
|
|
7216
|
-
var passive = false;
|
|
7217
|
-
var options = Object.defineProperty({}, "passive", {
|
|
7218
|
-
get: function get2() {
|
|
7219
|
-
passive = true;
|
|
7220
|
-
}
|
|
7221
|
-
});
|
|
7222
|
-
var noop = function noop2() {
|
|
7223
|
-
};
|
|
7224
|
-
window.addEventListener("testPassiveEventSupport", noop, options);
|
|
7225
|
-
window.removeEventListener("testPassiveEventSupport", noop, options);
|
|
7226
|
-
return passive;
|
|
7227
|
-
};
|
|
7228
|
-
function autoInc(seed) {
|
|
7229
|
-
if (seed === void 0) {
|
|
7230
|
-
seed = 0;
|
|
7234
|
+
if (obj && obj.removeEventListener) {
|
|
7235
|
+
obj.removeEventListener.apply(obj, args);
|
|
7231
7236
|
}
|
|
7232
|
-
return function() {
|
|
7233
|
-
return ++seed;
|
|
7234
|
-
};
|
|
7235
7237
|
}
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
var
|
|
7241
|
-
var
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
function onClickOutside(props) {
|
|
7256
|
-
var _this;
|
|
7257
|
-
_this = _Component.call(this, props) || this;
|
|
7258
|
-
_this.__outsideClickHandler = function(event) {
|
|
7259
|
-
if (typeof _this.__clickOutsideHandlerProp === "function") {
|
|
7260
|
-
_this.__clickOutsideHandlerProp(event);
|
|
7261
|
-
return;
|
|
7262
|
-
}
|
|
7263
|
-
var instance = _this.getInstance();
|
|
7264
|
-
if (typeof instance.props.handleClickOutside === "function") {
|
|
7265
|
-
instance.props.handleClickOutside(event);
|
|
7266
|
-
return;
|
|
7267
|
-
}
|
|
7268
|
-
if (typeof instance.handleClickOutside === "function") {
|
|
7269
|
-
instance.handleClickOutside(event);
|
|
7270
|
-
return;
|
|
7271
|
-
}
|
|
7272
|
-
throw new Error("WrappedComponent: " + componentName + " lacks a handleClickOutside(event) function for processing outside click events.");
|
|
7273
|
-
};
|
|
7274
|
-
_this.__getComponentNode = function() {
|
|
7275
|
-
var instance = _this.getInstance();
|
|
7276
|
-
if (config && typeof config.setClickOutsideRef === "function") {
|
|
7277
|
-
return config.setClickOutsideRef()(instance);
|
|
7278
|
-
}
|
|
7279
|
-
if (typeof instance.setClickOutsideRef === "function") {
|
|
7280
|
-
return instance.setClickOutsideRef();
|
|
7281
|
-
}
|
|
7282
|
-
return reactDom.findDOMNode(instance);
|
|
7283
|
-
};
|
|
7284
|
-
_this.enableOnClickOutside = function() {
|
|
7285
|
-
if (typeof document === "undefined" || enabledInstances[_this._uid]) {
|
|
7286
|
-
return;
|
|
7287
|
-
}
|
|
7288
|
-
if (typeof passiveEventSupport === "undefined") {
|
|
7289
|
-
passiveEventSupport = testPassiveEventSupport();
|
|
7290
|
-
}
|
|
7291
|
-
enabledInstances[_this._uid] = true;
|
|
7292
|
-
var events = _this.props.eventTypes;
|
|
7293
|
-
if (!events.forEach) {
|
|
7294
|
-
events = [events];
|
|
7295
|
-
}
|
|
7296
|
-
handlersMap[_this._uid] = function(event) {
|
|
7297
|
-
if (_this.componentNode === null)
|
|
7298
|
-
return;
|
|
7299
|
-
if (_this.initTimeStamp > event.timeStamp)
|
|
7300
|
-
return;
|
|
7301
|
-
if (_this.props.preventDefault) {
|
|
7302
|
-
event.preventDefault();
|
|
7303
|
-
}
|
|
7304
|
-
if (_this.props.stopPropagation) {
|
|
7305
|
-
event.stopPropagation();
|
|
7306
|
-
}
|
|
7307
|
-
if (_this.props.excludeScrollbar && clickedScrollbar(event))
|
|
7308
|
-
return;
|
|
7309
|
-
var current = event.composed && event.composedPath && event.composedPath().shift() || event.target;
|
|
7310
|
-
if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {
|
|
7311
|
-
return;
|
|
7312
|
-
}
|
|
7313
|
-
_this.__outsideClickHandler(event);
|
|
7314
|
-
};
|
|
7315
|
-
events.forEach(function(eventName) {
|
|
7316
|
-
document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_assertThisInitialized(_this), eventName));
|
|
7317
|
-
});
|
|
7318
|
-
};
|
|
7319
|
-
_this.disableOnClickOutside = function() {
|
|
7320
|
-
delete enabledInstances[_this._uid];
|
|
7321
|
-
var fn = handlersMap[_this._uid];
|
|
7322
|
-
if (fn && typeof document !== "undefined") {
|
|
7323
|
-
var events = _this.props.eventTypes;
|
|
7324
|
-
if (!events.forEach) {
|
|
7325
|
-
events = [events];
|
|
7326
|
-
}
|
|
7327
|
-
events.forEach(function(eventName) {
|
|
7328
|
-
return document.removeEventListener(eventName, fn, getEventHandlerOptions(_assertThisInitialized(_this), eventName));
|
|
7329
|
-
});
|
|
7330
|
-
delete handlersMap[_this._uid];
|
|
7331
|
-
}
|
|
7332
|
-
};
|
|
7333
|
-
_this.getRef = function(ref) {
|
|
7334
|
-
return _this.instanceRef = ref;
|
|
7335
|
-
};
|
|
7336
|
-
_this._uid = uid();
|
|
7337
|
-
_this.initTimeStamp = performance.now();
|
|
7338
|
-
return _this;
|
|
7339
|
-
}
|
|
7340
|
-
var _proto = onClickOutside.prototype;
|
|
7341
|
-
_proto.getInstance = function getInstance() {
|
|
7342
|
-
if (WrappedComponent.prototype && !WrappedComponent.prototype.isReactComponent) {
|
|
7343
|
-
return this;
|
|
7344
|
-
}
|
|
7345
|
-
var ref = this.instanceRef;
|
|
7346
|
-
return ref.getInstance ? ref.getInstance() : ref;
|
|
7238
|
+
util.off = off;
|
|
7239
|
+
util.isBrowser = typeof window !== "undefined";
|
|
7240
|
+
util.isNavigator = typeof navigator !== "undefined";
|
|
7241
|
+
Object.defineProperty(useClickAway$1, "__esModule", { value: true });
|
|
7242
|
+
var react_1 = React;
|
|
7243
|
+
var util_1 = util;
|
|
7244
|
+
var defaultEvents = ["mousedown", "touchstart"];
|
|
7245
|
+
var useClickAway = function(ref, onClickAway, events) {
|
|
7246
|
+
if (events === void 0) {
|
|
7247
|
+
events = defaultEvents;
|
|
7248
|
+
}
|
|
7249
|
+
var savedCallback = react_1.useRef(onClickAway);
|
|
7250
|
+
react_1.useEffect(function() {
|
|
7251
|
+
savedCallback.current = onClickAway;
|
|
7252
|
+
}, [onClickAway]);
|
|
7253
|
+
react_1.useEffect(function() {
|
|
7254
|
+
var handler = function(event) {
|
|
7255
|
+
var el = ref.current;
|
|
7256
|
+
el && !el.contains(event.target) && savedCallback.current(event);
|
|
7347
7257
|
};
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
throw new Error("WrappedComponent: " + componentName + " lacks a function for processing outside click events specified by the handleClickOutside config option.");
|
|
7357
|
-
}
|
|
7358
|
-
}
|
|
7359
|
-
this.componentNode = this.__getComponentNode();
|
|
7360
|
-
if (this.props.disableOnClickOutside)
|
|
7361
|
-
return;
|
|
7362
|
-
this.enableOnClickOutside();
|
|
7363
|
-
};
|
|
7364
|
-
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
7365
|
-
this.componentNode = this.__getComponentNode();
|
|
7366
|
-
};
|
|
7367
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
7368
|
-
this.disableOnClickOutside();
|
|
7369
|
-
};
|
|
7370
|
-
_proto.render = function render() {
|
|
7371
|
-
var _this$props = this.props;
|
|
7372
|
-
_this$props.excludeScrollbar;
|
|
7373
|
-
var props = _objectWithoutPropertiesLoose(_this$props, ["excludeScrollbar"]);
|
|
7374
|
-
if (WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) {
|
|
7375
|
-
props.ref = this.getRef;
|
|
7376
|
-
} else {
|
|
7377
|
-
props.wrappedRef = this.getRef;
|
|
7258
|
+
for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
|
|
7259
|
+
var eventName = events_1[_i];
|
|
7260
|
+
util_1.on(document, eventName, handler);
|
|
7261
|
+
}
|
|
7262
|
+
return function() {
|
|
7263
|
+
for (var _i2 = 0, events_2 = events; _i2 < events_2.length; _i2++) {
|
|
7264
|
+
var eventName2 = events_2[_i2];
|
|
7265
|
+
util_1.off(document, eventName2, handler);
|
|
7378
7266
|
}
|
|
7379
|
-
props.disableOnClickOutside = this.disableOnClickOutside;
|
|
7380
|
-
props.enableOnClickOutside = this.enableOnClickOutside;
|
|
7381
|
-
return React.createElement(WrappedComponent, props);
|
|
7382
7267
|
};
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
excludeScrollbar: config && config.excludeScrollbar || false,
|
|
7387
|
-
outsideClickIgnoreClass: IGNORE_CLASS_NAME,
|
|
7388
|
-
preventDefault: false,
|
|
7389
|
-
stopPropagation: false
|
|
7390
|
-
}, _class.getClass = function() {
|
|
7391
|
-
return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;
|
|
7392
|
-
}, _temp;
|
|
7393
|
-
}
|
|
7268
|
+
}, [events, ref]);
|
|
7269
|
+
};
|
|
7270
|
+
var _default = useClickAway$1.default = useClickAway;
|
|
7394
7271
|
const viewModes = {
|
|
7395
7272
|
YEARS: "years",
|
|
7396
7273
|
MONTHS: "months",
|
|
@@ -7919,22 +7796,13 @@ flowchart TD
|
|
|
7919
7796
|
}
|
|
7920
7797
|
con[method]("***react-datetime:" + message);
|
|
7921
7798
|
}
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
}
|
|
7927
|
-
|
|
7928
|
-
return /* @__PURE__ */ React.createElement("div", { className: this.props.className, ref: this.container }, this.props.children);
|
|
7929
|
-
}
|
|
7930
|
-
handleClickOutside(e) {
|
|
7931
|
-
this.props.onClickOut(e);
|
|
7932
|
-
}
|
|
7933
|
-
setClickOutsideRef() {
|
|
7934
|
-
return this.container.current;
|
|
7935
|
-
}
|
|
7799
|
+
function ClickableWrapper({ className, onClickOut, children }) {
|
|
7800
|
+
const containerRef = React.useRef(null);
|
|
7801
|
+
_default(containerRef, (event) => {
|
|
7802
|
+
onClickOut(event);
|
|
7803
|
+
});
|
|
7804
|
+
return /* @__PURE__ */ React.createElement("div", { className, ref: containerRef }, children);
|
|
7936
7805
|
}
|
|
7937
|
-
const ClickableWrapper = onClickOutsideHOC(ClickOutBase);
|
|
7938
7806
|
const DEFAULT_DATE_DISPLAY_FORMAT = "MMM DD, YYYY";
|
|
7939
7807
|
const DEFAULT_TIME_DISPLAY_FORMAT = "h:mm A";
|
|
7940
7808
|
const format$1 = (val, _name, field) => {
|
|
@@ -7977,7 +7845,10 @@ flowchart TD
|
|
|
7977
7845
|
ReactDateTimeWithStyles,
|
|
7978
7846
|
{
|
|
7979
7847
|
value: input.value,
|
|
7980
|
-
onChange:
|
|
7848
|
+
onChange: (value) => {
|
|
7849
|
+
const newValue = value === "" ? void 0 : value;
|
|
7850
|
+
input.onChange(newValue);
|
|
7851
|
+
},
|
|
7981
7852
|
dateFormat: dateFormat || DEFAULT_DATE_DISPLAY_FORMAT,
|
|
7982
7853
|
timeFormat: timeFormat || false,
|
|
7983
7854
|
inputProps: { className: textFieldClasses },
|
|
@@ -9429,6 +9300,20 @@ flowchart TD
|
|
|
9429
9300
|
}
|
|
9430
9301
|
}
|
|
9431
9302
|
}
|
|
9303
|
+
const encodeUrlIfNeeded = (url) => {
|
|
9304
|
+
if (url) {
|
|
9305
|
+
try {
|
|
9306
|
+
const parsed = new URL(url);
|
|
9307
|
+
parsed.pathname = parsed.pathname.split("/").filter((part) => part !== "").map(encodeURIComponent).join("/");
|
|
9308
|
+
return parsed.toString();
|
|
9309
|
+
} catch (e) {
|
|
9310
|
+
console.error("Failed to parse URL:", e);
|
|
9311
|
+
return url;
|
|
9312
|
+
}
|
|
9313
|
+
} else {
|
|
9314
|
+
return url;
|
|
9315
|
+
}
|
|
9316
|
+
};
|
|
9432
9317
|
let MediaManager$1 = class MediaManager {
|
|
9433
9318
|
constructor(store, events) {
|
|
9434
9319
|
this.store = store;
|
|
@@ -9501,6 +9386,20 @@ flowchart TD
|
|
|
9501
9386
|
try {
|
|
9502
9387
|
this.events.dispatch({ type: "media:list:start", ...options });
|
|
9503
9388
|
const media = await this.store.list(options);
|
|
9389
|
+
media.items = media.items.map((item) => {
|
|
9390
|
+
if (item.type === "dir") {
|
|
9391
|
+
return item;
|
|
9392
|
+
}
|
|
9393
|
+
if (item.thumbnails) {
|
|
9394
|
+
for (const [size, src] of Object.entries(item.thumbnails)) {
|
|
9395
|
+
item.thumbnails[size] = encodeUrlIfNeeded(src);
|
|
9396
|
+
}
|
|
9397
|
+
}
|
|
9398
|
+
return {
|
|
9399
|
+
...item,
|
|
9400
|
+
src: encodeUrlIfNeeded(item.src)
|
|
9401
|
+
};
|
|
9402
|
+
});
|
|
9504
9403
|
this.events.dispatch({ type: "media:list:success", ...options, media });
|
|
9505
9404
|
return media;
|
|
9506
9405
|
} catch (error) {
|
|
@@ -10308,7 +10207,7 @@ flowchart TD
|
|
|
10308
10207
|
"Event Log"
|
|
10309
10208
|
));
|
|
10310
10209
|
};
|
|
10311
|
-
const version = "2.2
|
|
10210
|
+
const version = "2.6.2";
|
|
10312
10211
|
const Nav = ({
|
|
10313
10212
|
isLocalMode,
|
|
10314
10213
|
className = "",
|
|
@@ -12839,15 +12738,14 @@ flowchart TD
|
|
|
12839
12738
|
fields: fieldGroup.fields
|
|
12840
12739
|
}
|
|
12841
12740
|
) : /* @__PURE__ */ React__namespace.createElement(NoFieldsPlaceholder, null)
|
|
12842
|
-
)), !hideFooter && /* @__PURE__ */ React__namespace.createElement("div", { className: "relative flex-none w-full h-16 px-
|
|
12741
|
+
)), !hideFooter && /* @__PURE__ */ React__namespace.createElement("div", { className: "relative flex-none w-full h-16 px-12 bg-white border-t border-gray-100 flex items-center justify-end" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1 w-full justify-end gap-2 flex items-center max-w-form" }, tinaForm.reset && /* @__PURE__ */ React__namespace.createElement(
|
|
12843
12742
|
ResetForm,
|
|
12844
12743
|
{
|
|
12845
12744
|
pristine,
|
|
12846
12745
|
reset: async () => {
|
|
12847
12746
|
finalForm2.reset();
|
|
12848
12747
|
await tinaForm.reset();
|
|
12849
|
-
}
|
|
12850
|
-
style: { flexGrow: 1 }
|
|
12748
|
+
}
|
|
12851
12749
|
},
|
|
12852
12750
|
tinaForm.buttons.reset
|
|
12853
12751
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -12856,8 +12754,7 @@ flowchart TD
|
|
|
12856
12754
|
onClick: safeHandleSubmit,
|
|
12857
12755
|
disabled: !canSubmit,
|
|
12858
12756
|
busy: submitting,
|
|
12859
|
-
variant: "primary"
|
|
12860
|
-
style: { flexGrow: 3 }
|
|
12757
|
+
variant: "primary"
|
|
12861
12758
|
},
|
|
12862
12759
|
submitting && /* @__PURE__ */ React__namespace.createElement(LoadingDots, null),
|
|
12863
12760
|
!submitting && tinaForm.buttons.save
|
|
@@ -13827,6 +13724,7 @@ flowchart TD
|
|
|
13827
13724
|
"Unordered List",
|
|
13828
13725
|
"Ordered List",
|
|
13829
13726
|
"Quote",
|
|
13727
|
+
"Mermaid",
|
|
13830
13728
|
"Heading 1",
|
|
13831
13729
|
"Heading 2",
|
|
13832
13730
|
"Heading 3",
|
|
@@ -14426,6 +14324,7 @@ flowchart TD
|
|
|
14426
14324
|
ToolbarButton,
|
|
14427
14325
|
{
|
|
14428
14326
|
showArrow: false,
|
|
14327
|
+
"data-testid": "rich-text-editor-overflow-menu-button",
|
|
14429
14328
|
className: "lg:min-w-[130px]",
|
|
14430
14329
|
isDropdown: true,
|
|
14431
14330
|
pressed: openState.open,
|
|
@@ -14479,7 +14378,17 @@ flowchart TD
|
|
|
14479
14378
|
};
|
|
14480
14379
|
const RawMarkdownToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
|
|
14481
14380
|
const { props } = useRawMarkdownToolbarButton();
|
|
14482
|
-
return /* @__PURE__ */ React.createElement(
|
|
14381
|
+
return /* @__PURE__ */ React.createElement(
|
|
14382
|
+
ToolbarButton,
|
|
14383
|
+
{
|
|
14384
|
+
ref,
|
|
14385
|
+
tooltip: "Link",
|
|
14386
|
+
...rest,
|
|
14387
|
+
...props,
|
|
14388
|
+
"data-testid": "markdown-button"
|
|
14389
|
+
},
|
|
14390
|
+
/* @__PURE__ */ React.createElement(Icons.raw, null)
|
|
14391
|
+
);
|
|
14483
14392
|
});
|
|
14484
14393
|
function TableDropdownMenu(props) {
|
|
14485
14394
|
const tableSelected = plateCommon.useEditorSelector(
|
|
@@ -14618,7 +14527,7 @@ flowchart TD
|
|
|
14618
14527
|
key: template.name,
|
|
14619
14528
|
onMouseDown: (e) => {
|
|
14620
14529
|
e.preventDefault();
|
|
14621
|
-
|
|
14530
|
+
setOpen(false);
|
|
14622
14531
|
insertMDX(editor, template);
|
|
14623
14532
|
},
|
|
14624
14533
|
className: ""
|
|
@@ -14704,7 +14613,12 @@ flowchart TD
|
|
|
14704
14613
|
const [itemsShown, setItemsShown] = React.useState(11);
|
|
14705
14614
|
const { overrides, templates } = useToolbarContext();
|
|
14706
14615
|
const showEmbedButton = templates.length > 0;
|
|
14707
|
-
let items2 =
|
|
14616
|
+
let items2 = [];
|
|
14617
|
+
if (Array.isArray(overrides)) {
|
|
14618
|
+
items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14619
|
+
} else {
|
|
14620
|
+
items2 = (overrides == null ? void 0 : overrides.toolbar) === void 0 ? Object.values(toolbarItems) : overrides.toolbar.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14621
|
+
}
|
|
14708
14622
|
if (!showEmbedButton) {
|
|
14709
14623
|
items2 = items2.filter((item) => item.label !== toolbarItems.embed.label);
|
|
14710
14624
|
}
|
|
@@ -15032,6 +14946,9 @@ flowchart TD
|
|
|
15032
14946
|
if (typeof string !== "string") {
|
|
15033
14947
|
return false;
|
|
15034
14948
|
}
|
|
14949
|
+
if (string.startsWith("#")) {
|
|
14950
|
+
return true;
|
|
14951
|
+
}
|
|
15035
14952
|
const generalMatch = string.match(protocolAndDomainRE);
|
|
15036
14953
|
const emailLinkMatch = string.match(emailLintRE);
|
|
15037
14954
|
const localUrlMatch = string.match(localUrlRE);
|
|
@@ -15053,12 +14970,12 @@ flowchart TD
|
|
|
15053
14970
|
}
|
|
15054
14971
|
return localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol);
|
|
15055
14972
|
};
|
|
15056
|
-
const RichEditor = (
|
|
14973
|
+
const RichEditor = ({ input, tinaForm, field }) => {
|
|
15057
14974
|
var _a;
|
|
15058
14975
|
const initialValue = React.useMemo(
|
|
15059
14976
|
() => {
|
|
15060
14977
|
var _a2, _b;
|
|
15061
|
-
return ((_b = (_a2 =
|
|
14978
|
+
return ((_b = (_a2 = input.value) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) ? input.value.children.map(helpers.normalize) : [{ type: "p", children: [{ type: "text", text: "" }] }];
|
|
15062
14979
|
},
|
|
15063
14980
|
[]
|
|
15064
14981
|
);
|
|
@@ -15086,7 +15003,7 @@ flowchart TD
|
|
|
15086
15003
|
),
|
|
15087
15004
|
[]
|
|
15088
15005
|
);
|
|
15089
|
-
const tempId = [
|
|
15006
|
+
const tempId = [tinaForm.id, input.name].join(".");
|
|
15090
15007
|
const id = React.useMemo(() => uuid() + tempId, [tempId]);
|
|
15091
15008
|
const ref = React.useRef(null);
|
|
15092
15009
|
React.useEffect(() => {
|
|
@@ -15096,13 +15013,13 @@ flowchart TD
|
|
|
15096
15013
|
const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
|
|
15097
15014
|
'[role="textbox"]'
|
|
15098
15015
|
);
|
|
15099
|
-
if (
|
|
15016
|
+
if (field.experimental_focusIntent && plateElement) {
|
|
15100
15017
|
if (plateElement)
|
|
15101
15018
|
plateElement.focus();
|
|
15102
15019
|
}
|
|
15103
15020
|
}, 100);
|
|
15104
15021
|
}
|
|
15105
|
-
}, [
|
|
15022
|
+
}, [field.experimental_focusIntent, ref]);
|
|
15106
15023
|
return /* @__PURE__ */ React.createElement("div", { ref }, /* @__PURE__ */ React.createElement(
|
|
15107
15024
|
plateCommon.Plate,
|
|
15108
15025
|
{
|
|
@@ -15110,7 +15027,7 @@ flowchart TD
|
|
|
15110
15027
|
initialValue,
|
|
15111
15028
|
plugins: plugins$2,
|
|
15112
15029
|
onChange: (value) => {
|
|
15113
|
-
|
|
15030
|
+
input.onChange({
|
|
15114
15031
|
type: "root",
|
|
15115
15032
|
children: value
|
|
15116
15033
|
});
|
|
@@ -15119,12 +15036,12 @@ flowchart TD
|
|
|
15119
15036
|
/* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(
|
|
15120
15037
|
ToolbarProvider,
|
|
15121
15038
|
{
|
|
15122
|
-
tinaForm
|
|
15123
|
-
templates:
|
|
15124
|
-
overrides: (
|
|
15039
|
+
tinaForm,
|
|
15040
|
+
templates: field.templates,
|
|
15041
|
+
overrides: (field == null ? void 0 : field.toolbarOverride) ? field.toolbarOverride : field.overrides
|
|
15125
15042
|
},
|
|
15126
15043
|
/* @__PURE__ */ React.createElement(FixedToolbar, null, /* @__PURE__ */ React.createElement(FixedToolbarButtons, null)),
|
|
15127
|
-
/* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null))
|
|
15044
|
+
((_a = field == null ? void 0 : field.overrides) == null ? void 0 : _a.showFloatingToolbar) !== false ? /* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null)) : null
|
|
15128
15045
|
), /* @__PURE__ */ React.createElement(Editor, null))
|
|
15129
15046
|
));
|
|
15130
15047
|
};
|
|
@@ -30078,6 +29995,7 @@ mutation addPendingDocumentMutation(
|
|
|
30078
29995
|
relativePath
|
|
30079
29996
|
filename
|
|
30080
29997
|
extension
|
|
29998
|
+
hasReferences
|
|
30081
29999
|
}
|
|
30082
30000
|
}
|
|
30083
30001
|
}
|
|
@@ -30169,6 +30087,9 @@ mutation addPendingDocumentMutation(
|
|
|
30169
30087
|
document(collection:$collection, relativePath:$relativePath) {
|
|
30170
30088
|
... on Document {
|
|
30171
30089
|
_values
|
|
30090
|
+
_sys {
|
|
30091
|
+
hasReferences
|
|
30092
|
+
}
|
|
30172
30093
|
}
|
|
30173
30094
|
}
|
|
30174
30095
|
}`;
|
|
@@ -31895,6 +31816,23 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31895
31816
|
DeleteModal,
|
|
31896
31817
|
{
|
|
31897
31818
|
filename: vars.relativePath,
|
|
31819
|
+
checkRefsFunc: async () => {
|
|
31820
|
+
var _a2, _b2;
|
|
31821
|
+
try {
|
|
31822
|
+
const doc = await admin.fetchDocument(
|
|
31823
|
+
collection.name,
|
|
31824
|
+
vars.relativePath,
|
|
31825
|
+
true
|
|
31826
|
+
);
|
|
31827
|
+
return (_b2 = (_a2 = doc == null ? void 0 : doc.document) == null ? void 0 : _a2._sys) == null ? void 0 : _b2.hasReferences;
|
|
31828
|
+
} catch (error) {
|
|
31829
|
+
cms.alerts.error(
|
|
31830
|
+
"Document was not found, ask a developer for help or check the console for an error message"
|
|
31831
|
+
);
|
|
31832
|
+
console.error(error);
|
|
31833
|
+
throw error;
|
|
31834
|
+
}
|
|
31835
|
+
},
|
|
31898
31836
|
deleteFunc: async () => {
|
|
31899
31837
|
try {
|
|
31900
31838
|
await admin.deleteDocument(vars);
|
|
@@ -31903,6 +31841,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31903
31841
|
);
|
|
31904
31842
|
reFetchCollection();
|
|
31905
31843
|
} catch (error) {
|
|
31844
|
+
if (error.message.indexOf("has references")) {
|
|
31845
|
+
cms.alerts.error(
|
|
31846
|
+
error.message.split("\n ").filter(Boolean)[1]
|
|
31847
|
+
);
|
|
31848
|
+
return;
|
|
31849
|
+
}
|
|
31906
31850
|
cms.alerts.warn(
|
|
31907
31851
|
"Document was not deleted, ask a developer for help or check the console for an error message"
|
|
31908
31852
|
);
|
|
@@ -31954,6 +31898,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
31954
31898
|
cms.alerts.info("Document was successfully renamed");
|
|
31955
31899
|
reFetchCollection();
|
|
31956
31900
|
} catch (error) {
|
|
31901
|
+
if (error.message.indexOf("has references")) {
|
|
31902
|
+
cms.alerts.error(
|
|
31903
|
+
error.message.split("\n ").filter(Boolean)[1]
|
|
31904
|
+
);
|
|
31905
|
+
return;
|
|
31906
|
+
}
|
|
31957
31907
|
cms.alerts.warn(
|
|
31958
31908
|
"Document was not renamed, ask a developer for help or check the console for an error message"
|
|
31959
31909
|
);
|
|
@@ -32427,8 +32377,19 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
32427
32377
|
const NoDocumentsPlaceholder = () => {
|
|
32428
32378
|
return /* @__PURE__ */ React.createElement("div", { className: "text-center px-5 py-3 flex flex-col items-center justify-center shadow border border-gray-100 bg-gray-50 border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React.createElement("p", { className: "text-base italic font-medium text-gray-300" }, "No documents found."));
|
|
32429
32379
|
};
|
|
32430
|
-
const DeleteModal = ({
|
|
32431
|
-
|
|
32380
|
+
const DeleteModal = ({
|
|
32381
|
+
close: close2,
|
|
32382
|
+
deleteFunc,
|
|
32383
|
+
checkRefsFunc,
|
|
32384
|
+
filename
|
|
32385
|
+
}) => {
|
|
32386
|
+
const [hasRefs, setHasRefs] = React.useState();
|
|
32387
|
+
React.useEffect(() => {
|
|
32388
|
+
checkRefsFunc().then((result) => {
|
|
32389
|
+
setHasRefs(result);
|
|
32390
|
+
});
|
|
32391
|
+
}, [filename, checkRefsFunc]);
|
|
32392
|
+
return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", null, `Are you sure you want to delete ${filename}?${hasRefs ? " References to this document will also be deleted." : ""}`)), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
|
|
32432
32393
|
Button$1,
|
|
32433
32394
|
{
|
|
32434
32395
|
style: { flexGrow: 3 },
|
|
@@ -33160,15 +33121,24 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33160
33121
|
}
|
|
33161
33122
|
}
|
|
33162
33123
|
if (state === "creatingPR") {
|
|
33163
|
-
|
|
33164
|
-
|
|
33165
|
-
|
|
33166
|
-
|
|
33167
|
-
|
|
33168
|
-
|
|
33169
|
-
|
|
33170
|
-
|
|
33171
|
-
|
|
33124
|
+
try {
|
|
33125
|
+
const foo = await tinaApi.createPullRequest({
|
|
33126
|
+
baseBranch,
|
|
33127
|
+
branch,
|
|
33128
|
+
title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
|
|
33129
|
+
});
|
|
33130
|
+
console.log("PR created", foo);
|
|
33131
|
+
cms.alerts.success("Pull request created.");
|
|
33132
|
+
localStorage.setItem("tina.createBranchState", "done");
|
|
33133
|
+
setState("done");
|
|
33134
|
+
} catch (e) {
|
|
33135
|
+
console.error(e);
|
|
33136
|
+
cms.alerts.error("Failed to create PR");
|
|
33137
|
+
setErrorMessage(
|
|
33138
|
+
"Failed to create PR, please try again. If the problem persists please contact support."
|
|
33139
|
+
);
|
|
33140
|
+
setState("error");
|
|
33141
|
+
}
|
|
33172
33142
|
}
|
|
33173
33143
|
if (state === "done") {
|
|
33174
33144
|
window.location.href = back;
|
|
@@ -33795,6 +33765,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
33795
33765
|
exports2.useScreenPlugin = useScreenPlugin;
|
|
33796
33766
|
exports2.useTinaAuthRedirect = useTinaAuthRedirect;
|
|
33797
33767
|
exports2.wrapFieldWithError = wrapFieldWithError;
|
|
33768
|
+
exports2.wrapFieldWithNoHeader = wrapFieldWithNoHeader;
|
|
33798
33769
|
exports2.wrapFieldsWithMeta = wrapFieldsWithMeta;
|
|
33799
33770
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
33800
33771
|
});
|