@react-pakistan/util-functions 1.25.63 → 1.25.64

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.
@@ -59,10 +59,11 @@ export declare const GenericDrawer: FC<GenericDrawerProps>;
59
59
  interface GenericModulePageProps {
60
60
  config: ComponentConfig;
61
61
  context: any;
62
- tableBodyCols: TableBodyCol[];
63
62
  headerActions?: HeaderAction[];
64
- rowActions?: RowAction[];
65
63
  iconMap?: Record<string, any>;
64
+ overrideConfig?: ComponentConfig;
65
+ rowActions?: RowAction[];
66
+ tableBodyCols: TableBodyCol[];
66
67
  }
67
68
  export declare const createGenericModulePage: (config: ComponentConfig) => React.FC<GenericModulePageProps>;
68
69
  export {};
@@ -6,6 +6,17 @@
6
6
  */
7
7
  'use client';
8
8
  "use strict";
9
+ var __assign = (this && this.__assign) || function () {
10
+ __assign = Object.assign || function(t) {
11
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
12
+ s = arguments[i];
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
14
+ t[p] = s[p];
15
+ }
16
+ return t;
17
+ };
18
+ return __assign.apply(this, arguments);
19
+ };
9
20
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
21
  if (k2 === undefined) k2 = k;
11
22
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -108,9 +119,9 @@ var GenericDrawer = function (_a) {
108
119
  exports.GenericDrawer = GenericDrawer;
109
120
  var createGenericModulePage = function (config) {
110
121
  var GenericModulePage = function (_a) {
111
- var context = _a.context, tableBodyCols = _a.tableBodyCols, headerActions = _a.headerActions, rowActions = _a.rowActions, iconMap = _a.iconMap;
122
+ var context = _a.context, headerActions = _a.headerActions, iconMap = _a.iconMap, overrideConfig = _a.overrideConfig, rowActions = _a.rowActions, tableBodyCols = _a.tableBodyCols;
112
123
  return (react_1.default.createElement("div", { className: "space-y-6" },
113
- react_1.default.createElement(exports.GenericTable, { config: config, context: context, tableBodyCols: tableBodyCols, headerActions: headerActions, rowActions: rowActions, iconMap: iconMap }),
124
+ react_1.default.createElement(exports.GenericTable, { config: __assign(__assign({}, config), overrideConfig), context: context, tableBodyCols: tableBodyCols, headerActions: headerActions, rowActions: rowActions, iconMap: iconMap }),
114
125
  react_1.default.createElement(exports.GenericDrawer, { config: config, context: context, filterContent: config.filterContent, formContent: config.formContent, moreActionsContent: config.moreActionsContent, viewContent: config.viewContent }),
115
126
  react_1.default.createElement(sonner_1.Toaster, null)));
116
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.25.63",
3
+ "version": "1.25.64",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {