@uxf/cms 11.1.0 → 11.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/cms",
3
- "version": "11.1.0",
3
+ "version": "11.1.1",
4
4
  "description": "UXF Cms",
5
5
  "author": "UXFans <dev@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/cms#readme",
@@ -31,11 +31,11 @@
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.0",
34
+ "@uxf/data-grid": "11.1.1",
35
35
  "@uxf/form": "11.1.0",
36
36
  "@uxf/router": "10.0.0",
37
37
  "@uxf/ui": "11.1.0",
38
- "@uxf/wysiwyg": "11.1.0",
38
+ "@uxf/wysiwyg": "11.1.1",
39
39
  "axios": "1.5.1",
40
40
  "axios-hooks": "5.0.0",
41
41
  "es6-error": "4.1.1",
@@ -58,6 +58,7 @@ const GridPageComponent = (props) => {
58
58
  const { state, actions } = (0, use_data_grid_control_1.useDataGridControl)({
59
59
  schema: props.gridSchema,
60
60
  initialState: query.filter ? (0, router_1.queryParamToString)(query.filter) : undefined,
61
+ initialUserConfig: props.initialUserConfig,
61
62
  });
62
63
  const universalLoader = (0, react_1.useCallback)((gridName, request, encodedRequest) => {
63
64
  var _a, _b;
@@ -130,7 +131,7 @@ const GridPageComponent = (props) => {
130
131
  GridPageComponent.displayName = "GridPageComponent";
131
132
  const GridPage = (config) => {
132
133
  const Component = (props) => {
133
- return (react_1.default.createElement(GridPageComponent, { ...props, AddIcon: config.AddIcon, customActions: config.customActions, getEditUrl: config.getEditUrl, getOpenUrl: config.getOpenUrl, loader: config.loader, onAdd: config.onAdd, onAddTitle: config.onAddTitle, onEdit: config.onEdit, onOpen: config.onOpen, onRemove: config.onRemove, rowHeight: config.rowHeight, selectable: config.selectable, title: config.title, ui: config.ui }));
134
+ return (react_1.default.createElement(GridPageComponent, { ...props, AddIcon: config.AddIcon, customActions: config.customActions, getEditUrl: config.getEditUrl, getOpenUrl: config.getOpenUrl, loader: config.loader, onAdd: config.onAdd, onAddTitle: config.onAddTitle, onEdit: config.onEdit, onOpen: config.onOpen, onRemove: config.onRemove, rowHeight: config.rowHeight, selectable: config.selectable, title: config.title, ui: config.ui, initialUserConfig: config.initialUserConfig }));
134
135
  };
135
136
  Component.getInitialProps = async (ctx) => {
136
137
  const entityAlias = typeof config.entityAlias === "function" ? config.entityAlias(ctx) : config.entityAlias;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
- import { DataGridProps, Loader, Schema } from "@uxf/data-grid";
2
+ import { Nullish } from "@uxf/core/types";
3
+ import { DataGridProps, DataGridUserConfig, Loader, Schema } from "@uxf/data-grid";
3
4
  import { NextPageContext } from "next";
4
5
  import { ParsedUrlQuery } from "querystring";
5
6
  import { FC, ReactElement } from "react";
@@ -29,6 +30,7 @@ export type GridPageComponentProps = {
29
30
  onAddTitle?: string;
30
31
  selectable?: boolean;
31
32
  customActions?: DataGridProps<any, any>["customActions"];
33
+ initialUserConfig?: DataGridUserConfig | Nullish;
32
34
  };
33
35
  export type EntityAliasExtractor = (ctx: NextPageContext) => string;
34
36
  type UIComponents = {
@@ -55,5 +57,6 @@ export type GridPageConfig<T extends object = any> = {
55
57
  onAddTitle?: string;
56
58
  selectable?: boolean;
57
59
  customActions?: DataGridProps<any, any>["customActions"];
60
+ initialUserConfig?: DataGridUserConfig | Nullish;
58
61
  };
59
62
  export {};