@react-pakistan/util-functions 1.25.37 → 1.25.39

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.
@@ -42,6 +42,7 @@ var __importStar = (this && this.__importStar) || (function () {
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.createGenericModulePage = exports.GenericDrawer = exports.GenericTable = exports.DRAWER_TYPES = void 0;
44
44
  var react_1 = __importStar(require("react"));
45
+ var next_intl_1 = require("next-intl");
45
46
  var general_1 = require("../general");
46
47
  var use_rtl_1 = require("../hooks/use-rtl");
47
48
  var enhanced_table_1 = require("@appcorp/shadcn/components/enhanced-table");
@@ -60,18 +61,7 @@ exports.DRAWER_TYPES = {
60
61
  };
61
62
  var GenericTable = function (_a) {
62
63
  var config = _a.config, context = _a.context, tableBodyCols = _a.tableBodyCols, headerActions = _a.headerActions, rowActions = _a.rowActions;
63
- var maybeUseTranslations = (function () {
64
- try {
65
- // Use runtime require so bundlers don't statically include next-intl when unused
66
- // eslint-disable-next-line @typescript-eslint/no-require-imports
67
- return require('next-intl').useTranslations;
68
- }
69
- catch (_a) {
70
- // Fallback: identity translator
71
- return function (_ns) { return function (key) { return key; }; };
72
- }
73
- })();
74
- var t = maybeUseTranslations(config.moduleName);
64
+ var t = (0, next_intl_1.useTranslations)(config.moduleName);
75
65
  var isRTL = (0, use_rtl_1.useRTL)();
76
66
  var tableHeadItems = (0, react_1.useMemo)(function () {
77
67
  return config.tableColumns.map(function (col) { return ({
@@ -91,16 +81,7 @@ exports.GenericTable = GenericTable;
91
81
  var GenericDrawer = function (_a) {
92
82
  var _b, _c, _d, _e, _f, _g;
93
83
  var config = _a.config, context = _a.context, formContent = _a.formContent, viewContent = _a.viewContent, filterContent = _a.filterContent, moreActionsContent = _a.moreActionsContent;
94
- var maybeUseTranslations = (function () {
95
- try {
96
- // eslint-disable-next-line @typescript-eslint/no-require-imports
97
- return require('next-intl').useTranslations;
98
- }
99
- catch (_a) {
100
- return function (_ns) { return function (key) { return key; }; };
101
- }
102
- })();
103
- var t = maybeUseTranslations(config.moduleName);
84
+ var t = (0, next_intl_1.useTranslations)(config.moduleName);
104
85
  var isRTL = (0, use_rtl_1.useRTL)();
105
86
  var closeDrawer = context.closeDrawer || context.handleCloseDrawer;
106
87
  var _h = context.state, disableSaveButton = _h.disableSaveButton, drawer = _h.drawer;
package/index.d.ts CHANGED
@@ -23,7 +23,6 @@ export * from './api/stellar-solutions/quote-invoice';
23
23
  export * from './api/stellar-solutions/tax';
24
24
  export * from './api/stellar-solutions/type';
25
25
  export * from './constants';
26
- export * from './factory';
27
26
  export * from './general';
28
27
  export * from './hooks';
29
28
  export * from './local-storage';
package/index.js CHANGED
@@ -39,7 +39,6 @@ __exportStar(require("./api/stellar-solutions/quote-invoice"), exports);
39
39
  __exportStar(require("./api/stellar-solutions/tax"), exports);
40
40
  __exportStar(require("./api/stellar-solutions/type"), exports);
41
41
  __exportStar(require("./constants"), exports);
42
- __exportStar(require("./factory"), exports);
43
42
  __exportStar(require("./general"), exports);
44
43
  __exportStar(require("./hooks"), exports);
45
44
  __exportStar(require("./local-storage"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.25.37",
3
+ "version": "1.25.39",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {