@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.
- package/factory/generic-component-factory.js +3 -22
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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);
|