@uxf/cms 11.1.1 → 11.2.3

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/cms",
3
- "version": "11.1.1",
3
+ "version": "11.2.3",
4
4
  "description": "UXF Cms",
5
5
  "author": "UXFans <dev@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/cms#readme",
@@ -31,7 +31,7 @@
31
31
  "@floating-ui/react": "0.26.0",
32
32
  "@redux-devtools/extension": "3.2.5",
33
33
  "@uxf/core": "10.10.1",
34
- "@uxf/data-grid": "11.1.1",
34
+ "@uxf/data-grid": "11.2.3",
35
35
  "@uxf/form": "11.1.0",
36
36
  "@uxf/router": "10.0.0",
37
37
  "@uxf/ui": "11.1.0",
@@ -51,7 +51,7 @@ const dataGridLoader = (gridName, request) => {
51
51
  exports.dataGridLoader = dataGridLoader;
52
52
  const DefaultLayout = (props) => react_1.default.createElement("div", { ...props });
53
53
  const GridPageComponent = (props) => {
54
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
54
+ var _a, _b, _c, _d, _e, _f, _g;
55
55
  // eslint-disable-next-line react/destructuring-assignment
56
56
  const { query, AddIcon = react_1.default.createElement(icon_1.Icon, { name: "plus" }), onAddTitle = "Přidat záznam" } = props;
57
57
  const Layout = (_b = (_a = props.ui) === null || _a === void 0 ? void 0 : _a.Layout) !== null && _b !== void 0 ? _b : DefaultLayout;
@@ -72,7 +72,7 @@ const GridPageComponent = (props) => {
72
72
  const { data, isLoading, error, onReload } = (0, use_data_grid_fetching_1.useDataGridFetching)({
73
73
  loader: (_c = props.loader) !== null && _c !== void 0 ? _c : universalLoader,
74
74
  schema: props.gridSchema,
75
- gridName: (_e = (_d = props.metaSchema) === null || _d === void 0 ? void 0 : _d.entityAlias) !== null && _e !== void 0 ? _e : "",
75
+ gridName: props.entityAlias,
76
76
  state,
77
77
  });
78
78
  const actionsBag = (0, react_1.useMemo)(() => ({
@@ -80,7 +80,7 @@ const GridPageComponent = (props) => {
80
80
  }), [onReload]);
81
81
  const hasOnAdd = props.onAdd && (!props.metaSchema || props.metaSchema.actions.includes("add"));
82
82
  const cActions = [
83
- ...((_f = props.customActions) !== null && _f !== void 0 ? _f : []),
83
+ ...((_d = props.customActions) !== null && _d !== void 0 ? _d : []),
84
84
  hasOnAdd
85
85
  ? {
86
86
  label: (react_1.default.createElement(react_1.default.Fragment, null,
@@ -124,7 +124,7 @@ const GridPageComponent = (props) => {
124
124
  },
125
125
  }
126
126
  : undefined;
127
- return (react_1.default.createElement(Layout, { key: props.entityAlias, title: (_j = (_g = props.title) !== null && _g !== void 0 ? _g : (_h = props.metaSchema) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : "" },
127
+ return (react_1.default.createElement(Layout, { key: props.entityAlias, title: (_g = (_e = props.title) !== null && _e !== void 0 ? _e : (_f = props.metaSchema) === null || _f === void 0 ? void 0 : _f.title) !== null && _g !== void 0 ? _g : "" },
128
128
  react_1.default.createElement("div", { className: "mb-10" },
129
129
  react_1.default.createElement(data_grid_1.DataGrid, { state: state, actions: actions, data: data, isLoading: isLoading, error: error, onReload: onReload, noBorder: true, actionCell: actionCell, schema: props.gridSchema, gridName: props.entityAlias, rowHeight: props.rowHeight, customActions: cActions, onCsvDownload: (r) => window.open(`/api/cms/datagrid/export/${props.entityAlias}?${(0, qs_1.stringify)(r)}`), isRowSelectable: props.selectable }))));
130
130
  };