@comet/admin-generator 8.12.0-canary-20260122080141 → 8.12.0
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.
|
@@ -140,7 +140,7 @@ const getValueOptionsLabelData = (messageId, label) => {
|
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
142
|
function generateGrid({ exportName, baseOutputFilename, targetDirectory, gqlIntrospection, }, config) {
|
|
143
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
143
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
144
144
|
const gqlType = config.gqlType;
|
|
145
145
|
if (!gqlType) {
|
|
146
146
|
throw new Error("gqlType is required in grid config");
|
|
@@ -335,10 +335,10 @@ function generateGrid({ exportName, baseOutputFilename, targetDirectory, gqlIntr
|
|
|
335
335
|
if (!schemaEntity)
|
|
336
336
|
throw new Error("didn't find entity in schema types");
|
|
337
337
|
const actionsColumnConfig = config.columns.find((column) => column.type === "actions");
|
|
338
|
-
const
|
|
338
|
+
const _l = actionsColumnConfig !== null && actionsColumnConfig !== void 0 ? actionsColumnConfig : {}, { component: actionsColumnComponent, type: actionsColumnType, headerName: actionsColumnHeaderName, pinned: actionsColumnPinned = "right", width: actionsColumnWidth = defaultActionsColumnWidth, visible: actionsColumnVisible = undefined,
|
|
339
339
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
340
|
-
queryFields: actionsColumnQueryFields = [] } =
|
|
341
|
-
restActionsColumnConfig = __rest(
|
|
340
|
+
queryFields: actionsColumnQueryFields = [] } = _l, // not needed here, but needs to be removed from restActionsColumnConfig because it's directly used in to generate component props in tsCodeRecordToString
|
|
341
|
+
restActionsColumnConfig = __rest(_l, ["component", "type", "headerName", "pinned", "width", "visible", "queryFields"]);
|
|
342
342
|
if (actionsColumnComponent) {
|
|
343
343
|
if (!(0, runtimeTypeGuards_1.isGeneratorConfigImport)(actionsColumnComponent)) {
|
|
344
344
|
throw new Error("Unsupported actionsColumnComponent, only imports are supported");
|
|
@@ -793,7 +793,8 @@ function generateGrid({ exportName, baseOutputFilename, targetDirectory, gqlIntr
|
|
|
793
793
|
`
|
|
794
794
|
: ""}
|
|
795
795
|
refetchQueries={[${instanceGqlTypePlural}Query]}
|
|
796
|
-
${((_h = config.crudContextMenu) === null || _h === void 0 ? void 0 : _h.
|
|
796
|
+
${((_h = config.crudContextMenu) === null || _h === void 0 ? void 0 : _h.deleteType) ? `deleteType="${config.crudContextMenu.deleteType}"` : ""}
|
|
797
|
+
${((_j = config.crudContextMenu) === null || _j === void 0 ? void 0 : _j.deleteText) ? `messagesMapping={{ delete: <FormattedMessage id="${instanceGqlType}.crudContextMenu.delete" defaultMessage="${config.crudContextMenu.deleteText}" /> }}` : ""}
|
|
797
798
|
/>
|
|
798
799
|
`
|
|
799
800
|
: ""}
|
|
@@ -835,7 +836,7 @@ function generateGrid({ exportName, baseOutputFilename, targetDirectory, gqlIntr
|
|
|
835
836
|
});
|
|
836
837
|
const rowCount = useBufferedRowCount(data?.${gridQuery}.totalCount);
|
|
837
838
|
if (error) throw error;
|
|
838
|
-
const rows = ${!allowRowReordering ? `data?.${gridQuery}.nodes` : generateRowReorderingRows(gridQuery, fieldList, (
|
|
839
|
+
const rows = ${!allowRowReordering ? `data?.${gridQuery}.nodes` : generateRowReorderingRows(gridQuery, fieldList, (_k = config.rowReordering) === null || _k === void 0 ? void 0 : _k.dragPreviewField)} ?? [];
|
|
839
840
|
|
|
840
841
|
${generateGridExportApi(config.excelExport, gqlTypePlural, instanceGqlTypePlural, gridQuery, gqlArgs)}
|
|
841
842
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/admin-generator",
|
|
3
|
-
"version": "8.12.0
|
|
3
|
+
"version": "8.12.0",
|
|
4
4
|
"description": "Comet Admin Generator CLI tool",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/admin/admin-generator",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"rimraf": "^6.1.2",
|
|
47
47
|
"typescript": "5.9.3",
|
|
48
48
|
"vitest": "^4.0.16",
|
|
49
|
-
"@comet/admin": "8.12.0
|
|
50
|
-
"@comet/admin-icons": "8.12.0
|
|
51
|
-
"@comet/cms-admin": "8.12.0
|
|
52
|
-
"@comet/eslint-config": "8.12.0
|
|
49
|
+
"@comet/admin": "8.12.0",
|
|
50
|
+
"@comet/admin-icons": "8.12.0",
|
|
51
|
+
"@comet/cms-admin": "8.12.0",
|
|
52
|
+
"@comet/eslint-config": "8.12.0"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=22.0.0"
|