@compill/admin 1.0.76 → 1.0.78
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/index.cjs.js +5 -12
- package/index.esm.js +5 -12
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -127,13 +127,12 @@ function BreadcrumbItem({
|
|
127
127
|
breadcrumb,
|
128
128
|
showSeparator
|
129
129
|
}) {
|
130
|
-
var _a;
|
131
130
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
132
131
|
children: [showSeparator && jsxRuntime.jsx(ui.Icon, {
|
133
132
|
path: mdiCircleSmall,
|
134
133
|
mx: "1"
|
135
134
|
}), jsxRuntime.jsx(Link__default["default"], {
|
136
|
-
href: `/${
|
135
|
+
href: `/${breadcrumb.path || "#"}`,
|
137
136
|
children: jsxRuntime.jsx("span", {
|
138
137
|
// onClick={breadcrumb.path ? handleClick : undefined}
|
139
138
|
hover_textDecoration: breadcrumb.path ? "underline" : undefined,
|
@@ -1218,14 +1217,8 @@ function Internal({
|
|
1218
1217
|
});
|
1219
1218
|
const save = api.useMutate(mutation, {
|
1220
1219
|
processInput,
|
1221
|
-
successMsg: (item, values) => {
|
1222
|
-
|
1223
|
-
return `${(_a = item.title) !== null && _a !== void 0 ? _a : item.name} updated.`;
|
1224
|
-
},
|
1225
|
-
errorMsg: (error, item) => {
|
1226
|
-
var _a;
|
1227
|
-
return `Error updating ${(_a = item.title) !== null && _a !== void 0 ? _a : item.name}: ${error}`;
|
1228
|
-
}
|
1220
|
+
successMsg: (item, values) => `${item.title || item.name} updated.`,
|
1221
|
+
errorMsg: (error, item) => `Error updating ${item.title || item.name}: ${error}`
|
1229
1222
|
});
|
1230
1223
|
let editorMaxW = undefined;
|
1231
1224
|
if (!type || type == "post") editorMaxW = "calc(1280px - 28rem)";else if (type == "section") editorMaxW = "calc(1280px - 22rem)";
|
@@ -2288,7 +2281,7 @@ function ItemDeleteDialog(_a) {
|
|
2288
2281
|
transition: true
|
2289
2282
|
}, props, {
|
2290
2283
|
children: [jsxRuntime.jsx(ui.Modal.Header, {
|
2291
|
-
children: title
|
2284
|
+
children: title || `Delete ${itemLabel}`
|
2292
2285
|
}), jsxRuntime.jsxs(ui.Modal.Body, {
|
2293
2286
|
pb: "6",
|
2294
2287
|
children: [!msg && `Do you really want to delete ${itemLabel}?`, msg && react.runIfFn(msg, itemLabel)]
|
@@ -2307,7 +2300,7 @@ function ItemDeleteDialog(_a) {
|
|
2307
2300
|
scheme: "danger",
|
2308
2301
|
disabled: mutation.isLoading,
|
2309
2302
|
onClick: handleDelete,
|
2310
|
-
children:
|
2303
|
+
children: actionButtonLabel || "Delete"
|
2311
2304
|
})]
|
2312
2305
|
}), mutation.isLoading && jsxRuntime.jsx(components.ModalLoadingOverlay, {})]
|
2313
2306
|
}));
|
package/index.esm.js
CHANGED
@@ -117,13 +117,12 @@ function BreadcrumbItem({
|
|
117
117
|
breadcrumb,
|
118
118
|
showSeparator
|
119
119
|
}) {
|
120
|
-
var _a;
|
121
120
|
return jsxs(Fragment, {
|
122
121
|
children: [showSeparator && jsx(Icon, {
|
123
122
|
path: mdiCircleSmall,
|
124
123
|
mx: "1"
|
125
124
|
}), jsx(Link, {
|
126
|
-
href: `/${
|
125
|
+
href: `/${breadcrumb.path || "#"}`,
|
127
126
|
children: jsx("span", {
|
128
127
|
// onClick={breadcrumb.path ? handleClick : undefined}
|
129
128
|
hover_textDecoration: breadcrumb.path ? "underline" : undefined,
|
@@ -1208,14 +1207,8 @@ function Internal({
|
|
1208
1207
|
});
|
1209
1208
|
const save = useMutate(mutation, {
|
1210
1209
|
processInput,
|
1211
|
-
successMsg: (item, values) => {
|
1212
|
-
|
1213
|
-
return `${(_a = item.title) !== null && _a !== void 0 ? _a : item.name} updated.`;
|
1214
|
-
},
|
1215
|
-
errorMsg: (error, item) => {
|
1216
|
-
var _a;
|
1217
|
-
return `Error updating ${(_a = item.title) !== null && _a !== void 0 ? _a : item.name}: ${error}`;
|
1218
|
-
}
|
1210
|
+
successMsg: (item, values) => `${item.title || item.name} updated.`,
|
1211
|
+
errorMsg: (error, item) => `Error updating ${item.title || item.name}: ${error}`
|
1219
1212
|
});
|
1220
1213
|
let editorMaxW = undefined;
|
1221
1214
|
if (!type || type == "post") editorMaxW = "calc(1280px - 28rem)";else if (type == "section") editorMaxW = "calc(1280px - 22rem)";
|
@@ -2278,7 +2271,7 @@ function ItemDeleteDialog(_a) {
|
|
2278
2271
|
transition: true
|
2279
2272
|
}, props, {
|
2280
2273
|
children: [jsx(Modal.Header, {
|
2281
|
-
children: title
|
2274
|
+
children: title || `Delete ${itemLabel}`
|
2282
2275
|
}), jsxs(Modal.Body, {
|
2283
2276
|
pb: "6",
|
2284
2277
|
children: [!msg && `Do you really want to delete ${itemLabel}?`, msg && runIfFn(msg, itemLabel)]
|
@@ -2297,7 +2290,7 @@ function ItemDeleteDialog(_a) {
|
|
2297
2290
|
scheme: "danger",
|
2298
2291
|
disabled: mutation.isLoading,
|
2299
2292
|
onClick: handleDelete,
|
2300
|
-
children:
|
2293
|
+
children: actionButtonLabel || "Delete"
|
2301
2294
|
})]
|
2302
2295
|
}), mutation.isLoading && jsx(ModalLoadingOverlay, {})]
|
2303
2296
|
}));
|