@compill/admin 1.0.98 → 1.0.99
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 +20 -17
- package/index.esm.js +20 -17
- package/package.json +1 -1
- package/src/lib/json/types/TableView.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -2320,23 +2320,26 @@ function TableRowActionsView({
|
|
|
2320
2320
|
alignItems: "stretch",
|
|
2321
2321
|
placeContent: "end",
|
|
2322
2322
|
h: "full",
|
|
2323
|
-
children: (_a = react.runIfFn(rowActions, item)) === null || _a === void 0 ? void 0 : _a.map((action, index) =>
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2323
|
+
children: (_a = react.runIfFn(rowActions, item)) === null || _a === void 0 ? void 0 : _a.map((action, index) => {
|
|
2324
|
+
var _a;
|
|
2325
|
+
return jsxRuntime.jsxs(React.Fragment, {
|
|
2326
|
+
children: [action.type === "publish" && jsxRuntime.jsx(TableRowPublishPostButton$1, {
|
|
2327
|
+
id: item.id,
|
|
2328
|
+
api: (_a = action.api) !== null && _a !== void 0 ? _a : api,
|
|
2329
|
+
status: item.status,
|
|
2330
|
+
invalidateQueryKey: queryKey
|
|
2331
|
+
}), action.type == "custom" && jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2332
|
+
children: action.component(item, queryKey, action.icon, action.label)
|
|
2333
|
+
}), !["publish", "custom"].includes(action.type) && jsxRuntime.jsx(ActionButton, {
|
|
2334
|
+
onClick: () => onAction(action, item),
|
|
2335
|
+
scheme: schemes$1[action.type],
|
|
2336
|
+
children: jsxRuntime.jsx(ui.Icon, {
|
|
2337
|
+
path: icons[action.type],
|
|
2338
|
+
size: "sm"
|
|
2339
|
+
})
|
|
2340
|
+
})]
|
|
2341
|
+
}, index);
|
|
2342
|
+
})
|
|
2340
2343
|
});
|
|
2341
2344
|
}
|
|
2342
2345
|
function ActionButton(_a) {
|
package/index.esm.js
CHANGED
|
@@ -2318,23 +2318,26 @@ function TableRowActionsView({
|
|
|
2318
2318
|
alignItems: "stretch",
|
|
2319
2319
|
placeContent: "end",
|
|
2320
2320
|
h: "full",
|
|
2321
|
-
children: (_a = runIfFn(rowActions, item)) === null || _a === void 0 ? void 0 : _a.map((action, index) =>
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2321
|
+
children: (_a = runIfFn(rowActions, item)) === null || _a === void 0 ? void 0 : _a.map((action, index) => {
|
|
2322
|
+
var _a;
|
|
2323
|
+
return jsxs(React.Fragment, {
|
|
2324
|
+
children: [action.type === "publish" && jsx(TableRowPublishPostButton$1, {
|
|
2325
|
+
id: item.id,
|
|
2326
|
+
api: (_a = action.api) !== null && _a !== void 0 ? _a : api,
|
|
2327
|
+
status: item.status,
|
|
2328
|
+
invalidateQueryKey: queryKey
|
|
2329
|
+
}), action.type == "custom" && jsx(Fragment, {
|
|
2330
|
+
children: action.component(item, queryKey, action.icon, action.label)
|
|
2331
|
+
}), !["publish", "custom"].includes(action.type) && jsx(ActionButton, {
|
|
2332
|
+
onClick: () => onAction(action, item),
|
|
2333
|
+
scheme: schemes$1[action.type],
|
|
2334
|
+
children: jsx(Icon, {
|
|
2335
|
+
path: icons[action.type],
|
|
2336
|
+
size: "sm"
|
|
2337
|
+
})
|
|
2338
|
+
})]
|
|
2339
|
+
}, index);
|
|
2340
|
+
})
|
|
2338
2341
|
});
|
|
2339
2342
|
}
|
|
2340
2343
|
function ActionButton(_a) {
|
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ export type TableRowAction = {
|
|
|
58
58
|
msg?: (itemLabel: string) => (string | React.ReactNode);
|
|
59
59
|
} | {
|
|
60
60
|
type: "publish";
|
|
61
|
+
api?: API<any>;
|
|
61
62
|
} | {
|
|
62
63
|
type: "custom";
|
|
63
64
|
component: (item: any, queryKey: string[], icon?: string, label?: string) => React.ReactNode;
|