@appcorp/stellar-solutions-modules 0.1.53 → 0.1.55
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/global-modules/bank/bank.js +4 -8
- package/global-modules/bank/context.js +15 -14
- package/global-modules/bank/drawer.js +2 -2
- package/global-modules/bank/form.js +2 -2
- package/global-modules/bank/types.d.ts +1 -1
- package/global-modules/branch/branch.js +3 -7
- package/global-modules/branch/constants.d.ts +0 -11
- package/global-modules/branch/constants.js +1 -15
- package/global-modules/branch/context.js +16 -15
- package/global-modules/branch/drawer.js +2 -2
- package/global-modules/branch/form.js +2 -2
- package/global-modules/branch/types.d.ts +1 -1
- package/global-modules/payment-mode/context.js +16 -15
- package/global-modules/payment-mode/drawer.js +2 -2
- package/global-modules/payment-mode/form.js +2 -2
- package/global-modules/payment-mode/payment-mode.js +16 -20
- package/global-modules/payment-mode/types.d.ts +1 -1
- package/global-modules/preferences/context.js +14 -13
- package/global-modules/preferences/currency.js +2 -2
- package/global-modules/tax/context.js +16 -15
- package/global-modules/tax/drawer.js +2 -2
- package/global-modules/tax/form.js +2 -2
- package/global-modules/tax/tax.js +4 -8
- package/global-modules/tax/types.d.ts +1 -1
- package/index.d.ts +0 -30
- package/index.js +0 -46
- package/lib/toast-utils.d.ts +0 -44
- package/lib/toast-utils.js +240 -212
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +5 -12
- package/package.json +6 -7
- package/components/theme-provider.d.ts +0 -9
- package/components/theme-provider.js +0 -122
- package/components/theme-switcher.d.ts +0 -4
- package/components/theme-switcher.js +0 -60
- package/components/ui/badge.d.ts +0 -9
- package/components/ui/badge.js +0 -82
- package/components/ui/button.d.ts +0 -10
- package/components/ui/button.js +0 -91
- package/components/ui/card.d.ts +0 -9
- package/components/ui/card.js +0 -94
- package/components/ui/carousel.d.ts +0 -19
- package/components/ui/carousel.js +0 -168
- package/components/ui/checkbox.d.ts +0 -9
- package/components/ui/checkbox.js +0 -87
- package/components/ui/combobox.d.ts +0 -70
- package/components/ui/combobox.js +0 -315
- package/components/ui/command.d.ts +0 -18
- package/components/ui/command.js +0 -115
- package/components/ui/dialog.d.ts +0 -15
- package/components/ui/dialog.js +0 -118
- package/components/ui/drawer.d.ts +0 -13
- package/components/ui/drawer.js +0 -115
- package/components/ui/dropdown-menu.d.ts +0 -25
- package/components/ui/dropdown-menu.js +0 -148
- package/components/ui/enhanced-dropzone.d.ts +0 -21
- package/components/ui/enhanced-dropzone.js +0 -187
- package/components/ui/enhanced-table-footer-action.d.ts +0 -34
- package/components/ui/enhanced-table-footer-action.js +0 -117
- package/components/ui/enhanced-table-footer-page.d.ts +0 -32
- package/components/ui/enhanced-table-footer-page.js +0 -140
- package/components/ui/enhanced-table-footer-pagination.d.ts +0 -36
- package/components/ui/enhanced-table-footer-pagination.js +0 -122
- package/components/ui/enhanced-table-header-action.d.ts +0 -7
- package/components/ui/enhanced-table-header-action.js +0 -21
- package/components/ui/enhanced-table-header-search.d.ts +0 -12
- package/components/ui/enhanced-table-header-search.js +0 -17
- package/components/ui/enhanced-table.d.ts +0 -75
- package/components/ui/enhanced-table.js +0 -196
- package/components/ui/form.d.ts +0 -24
- package/components/ui/form.js +0 -125
- package/components/ui/input.d.ts +0 -8
- package/components/ui/input.js +0 -86
- package/components/ui/label.d.ts +0 -7
- package/components/ui/label.js +0 -68
- package/components/ui/popover.d.ts +0 -7
- package/components/ui/popover.js +0 -82
- package/components/ui/select.d.ts +0 -15
- package/components/ui/select.js +0 -127
- package/components/ui/separator.d.ts +0 -4
- package/components/ui/separator.js +0 -66
- package/components/ui/shadcn-io/color-picker/index.d.ts +0 -43
- package/components/ui/shadcn-io/color-picker/index.js +0 -304
- package/components/ui/shadcn-io/dropzone/index.d.ts +0 -19
- package/components/ui/shadcn-io/dropzone/index.js +0 -131
- package/components/ui/sonner.d.ts +0 -4
- package/components/ui/sonner.js +0 -54
- package/components/ui/switch.d.ts +0 -9
- package/components/ui/switch.js +0 -89
- package/components/ui/table.d.ts +0 -10
- package/components/ui/table.js +0 -101
- package/components/ui/textarea.d.ts +0 -8
- package/components/ui/textarea.js +0 -86
|
@@ -56,7 +56,8 @@ var reducer_1 = require("./reducer");
|
|
|
56
56
|
var generate_toast_1 = require("@appcorp/app-corp-vista/utils/generate-toast");
|
|
57
57
|
var usePreferenceState = function () {
|
|
58
58
|
var _a = (0, react_1.useReducer)(reducer_1.preferenceReducer, reducer_1.initialPreferenceState), state = _a[0], dispatch = _a[1];
|
|
59
|
-
var t = (0, next_intl_1.useTranslations)("
|
|
59
|
+
var t = (0, next_intl_1.useTranslations)("preferences");
|
|
60
|
+
var tCommon = (0, next_intl_1.useTranslations)("common");
|
|
60
61
|
// const { products } = useProductStateContext();
|
|
61
62
|
// const { companies } = useCompanyStateContext();
|
|
62
63
|
// const debouncedQuery = useDebounce(state.searchQuery, 800);
|
|
@@ -66,7 +67,7 @@ var usePreferenceState = function () {
|
|
|
66
67
|
if (error) {
|
|
67
68
|
(0, generate_toast_1.generateToast)({
|
|
68
69
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
69
|
-
description:
|
|
70
|
+
description: tCommon("messagesNetworkError"),
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
if (data === null || data === void 0 ? void 0 : data.items) {
|
|
@@ -94,13 +95,13 @@ var usePreferenceState = function () {
|
|
|
94
95
|
var data = _a.data, error = _a.error;
|
|
95
96
|
if (error) {
|
|
96
97
|
(0, generate_toast_1.generateToast)({
|
|
97
|
-
description:
|
|
98
|
+
description: tCommon("messagesNetworkError"),
|
|
98
99
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
if (data) {
|
|
102
103
|
(0, generate_toast_1.generateToast)({
|
|
103
|
-
description: t("
|
|
104
|
+
description: t("messagesPreferenceUpdated"),
|
|
104
105
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.SUCCESS,
|
|
105
106
|
});
|
|
106
107
|
dispatch({
|
|
@@ -123,7 +124,7 @@ var usePreferenceState = function () {
|
|
|
123
124
|
var data = _a.data, error = _a.error;
|
|
124
125
|
if (error) {
|
|
125
126
|
(0, generate_toast_1.generateToast)({
|
|
126
|
-
description:
|
|
127
|
+
description: tCommon("messagesNetworkError"),
|
|
127
128
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
128
129
|
});
|
|
129
130
|
}
|
|
@@ -145,13 +146,13 @@ var usePreferenceState = function () {
|
|
|
145
146
|
var data = _a.data, error = _a.error;
|
|
146
147
|
if (error) {
|
|
147
148
|
(0, generate_toast_1.generateToast)({
|
|
148
|
-
description:
|
|
149
|
+
description: tCommon("messagesNetworkError"),
|
|
149
150
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
150
151
|
});
|
|
151
152
|
}
|
|
152
153
|
if (data) {
|
|
153
154
|
(0, generate_toast_1.generateToast)({
|
|
154
|
-
description: t("
|
|
155
|
+
description: t("messagesPreferenceDeleted"),
|
|
155
156
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.SUCCESS,
|
|
156
157
|
});
|
|
157
158
|
dispatch({
|
|
@@ -187,7 +188,7 @@ var usePreferenceState = function () {
|
|
|
187
188
|
if (error) {
|
|
188
189
|
(0, generate_toast_1.generateToast)({
|
|
189
190
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
190
|
-
description:
|
|
191
|
+
description: tCommon("messagesNetworkError"),
|
|
191
192
|
});
|
|
192
193
|
}
|
|
193
194
|
if (data === null || data === void 0 ? void 0 : data.items) {
|
|
@@ -213,13 +214,13 @@ var usePreferenceState = function () {
|
|
|
213
214
|
var data = _a.data, error = _a.error;
|
|
214
215
|
if (error) {
|
|
215
216
|
(0, generate_toast_1.generateToast)({
|
|
216
|
-
description:
|
|
217
|
+
description: tCommon("messagesNetworkError"),
|
|
217
218
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
221
|
if (data) {
|
|
221
222
|
(0, generate_toast_1.generateToast)({
|
|
222
|
-
description: t("
|
|
223
|
+
description: t("messagesPreferenceUpdated"),
|
|
223
224
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.SUCCESS,
|
|
224
225
|
});
|
|
225
226
|
dispatch({
|
|
@@ -239,7 +240,7 @@ var usePreferenceState = function () {
|
|
|
239
240
|
var data = _a.data, error = _a.error;
|
|
240
241
|
if (error) {
|
|
241
242
|
(0, generate_toast_1.generateToast)({
|
|
242
|
-
description:
|
|
243
|
+
description: tCommon("messagesNetworkError"),
|
|
243
244
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
244
245
|
});
|
|
245
246
|
}
|
|
@@ -261,13 +262,13 @@ var usePreferenceState = function () {
|
|
|
261
262
|
var data = _a.data, error = _a.error;
|
|
262
263
|
if (error) {
|
|
263
264
|
(0, generate_toast_1.generateToast)({
|
|
264
|
-
description:
|
|
265
|
+
description: tCommon("messagesNetworkError"),
|
|
265
266
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.ERROR,
|
|
266
267
|
});
|
|
267
268
|
}
|
|
268
269
|
if (data) {
|
|
269
270
|
(0, generate_toast_1.generateToast)({
|
|
270
|
-
description: t("
|
|
271
|
+
description: t("messagesPreferenceDeleted"),
|
|
271
272
|
variant: vista_notification_type_1.VISTA_NOTIFICATION_V1_VARIANT.SUCCESS,
|
|
272
273
|
});
|
|
273
274
|
dispatch({
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Currency = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var util_functions_1 = require("@react-pakistan/util-functions");
|
|
9
|
-
var checkbox_1 = require("
|
|
10
|
-
var button_1 = require("
|
|
9
|
+
var checkbox_1 = require("@appcorp/shadcn/components/checkbox");
|
|
10
|
+
var button_1 = require("@appcorp/shadcn/components/button");
|
|
11
11
|
var context_1 = require("./context");
|
|
12
12
|
var outline_1 = require("@heroicons/react/24/outline");
|
|
13
13
|
var Currency = function () {
|
|
@@ -85,7 +85,7 @@ var actions_1 = require("./actions");
|
|
|
85
85
|
var constants_1 = require("./constants");
|
|
86
86
|
var reducer_1 = require("./reducer");
|
|
87
87
|
var types_1 = require("./types");
|
|
88
|
-
var toast_utils_1 = require("
|
|
88
|
+
var toast_utils_1 = require("@appcorp/shadcn/lib/toast-utils");
|
|
89
89
|
var validate_1 = require("./validate");
|
|
90
90
|
var context_1 = require("../preferences/context");
|
|
91
91
|
// ============================================================================
|
|
@@ -98,7 +98,8 @@ var useTaxState = function () {
|
|
|
98
98
|
var _a = (0, react_1.useReducer)(reducer_1.taxReducer, reducer_1.initialTaxState), state = _a[0], dispatch = _a[1];
|
|
99
99
|
var preferences = (0, context_1.usePreferenceStateContext)().preferences;
|
|
100
100
|
var theme = (0, next_themes_1.useTheme)().theme;
|
|
101
|
-
var t = (0, next_intl_1.useTranslations)("
|
|
101
|
+
var t = (0, next_intl_1.useTranslations)("tax");
|
|
102
|
+
var tCommon = (0, next_intl_1.useTranslations)("common");
|
|
102
103
|
// ---------------------------------------------------------------------------
|
|
103
104
|
// DEBOUNCED VALUES
|
|
104
105
|
// ---------------------------------------------------------------------------
|
|
@@ -147,7 +148,7 @@ var useTaxState = function () {
|
|
|
147
148
|
var listCallback = (0, react_1.useCallback)(function (_a) {
|
|
148
149
|
var data = _a.data, error = _a.error;
|
|
149
150
|
if (error) {
|
|
150
|
-
showErrorToast(
|
|
151
|
+
showErrorToast(tCommon("messagesNetworkError"));
|
|
151
152
|
}
|
|
152
153
|
if (data === null || data === void 0 ? void 0 : data.items) {
|
|
153
154
|
dispatch({
|
|
@@ -159,14 +160,14 @@ var useTaxState = function () {
|
|
|
159
160
|
payload: { count: data === null || data === void 0 ? void 0 : data.count },
|
|
160
161
|
});
|
|
161
162
|
}
|
|
162
|
-
}, [showErrorToast,
|
|
163
|
+
}, [showErrorToast, tCommon]);
|
|
163
164
|
var updateCallback = (0, react_1.useCallback)(function (_a) {
|
|
164
165
|
var data = _a.data, error = _a.error;
|
|
165
166
|
if (error) {
|
|
166
|
-
showErrorToast(
|
|
167
|
+
showErrorToast(tCommon("messagesNetworkError"));
|
|
167
168
|
}
|
|
168
169
|
if (data) {
|
|
169
|
-
showSuccessToast(t("
|
|
170
|
+
showSuccessToast(t("messagesTaxUpdated"));
|
|
170
171
|
dispatch({
|
|
171
172
|
type: actions_1.TAX_ACTION_TYPES.RESET_FORM,
|
|
172
173
|
});
|
|
@@ -178,11 +179,11 @@ var useTaxState = function () {
|
|
|
178
179
|
payload: { drawer: null },
|
|
179
180
|
});
|
|
180
181
|
}
|
|
181
|
-
}, [showErrorToast, showSuccessToast, t]);
|
|
182
|
+
}, [showErrorToast, showSuccessToast, t, tCommon]);
|
|
182
183
|
var byIdCallback = (0, react_1.useCallback)(function (_a) {
|
|
183
184
|
var data = _a.data, error = _a.error;
|
|
184
185
|
if (error) {
|
|
185
|
-
showErrorToast(
|
|
186
|
+
showErrorToast(tCommon("messagesNetworkError"));
|
|
186
187
|
}
|
|
187
188
|
if (data) {
|
|
188
189
|
dispatch({
|
|
@@ -194,19 +195,19 @@ var useTaxState = function () {
|
|
|
194
195
|
payload: { drawer: types_1.TAX_DRAWER.FORM_DRAWER },
|
|
195
196
|
});
|
|
196
197
|
}
|
|
197
|
-
}, [showErrorToast,
|
|
198
|
+
}, [showErrorToast, tCommon]);
|
|
198
199
|
var deleteCallback = (0, react_1.useCallback)(function (_a) {
|
|
199
200
|
var data = _a.data, error = _a.error;
|
|
200
201
|
if (error) {
|
|
201
|
-
showErrorToast(
|
|
202
|
+
showErrorToast(tCommon("messagesNetworkError"));
|
|
202
203
|
}
|
|
203
204
|
if (data) {
|
|
204
|
-
showSuccessToast(t("
|
|
205
|
+
showSuccessToast(t("messagesTaxDeleted"));
|
|
205
206
|
dispatch({
|
|
206
207
|
type: actions_1.TAX_ACTION_TYPES.RESET_FORM,
|
|
207
208
|
});
|
|
208
209
|
}
|
|
209
|
-
}, [showErrorToast, showSuccessToast, t]);
|
|
210
|
+
}, [showErrorToast, showSuccessToast, t, tCommon]);
|
|
210
211
|
// ---------------------------------------------------------------------------
|
|
211
212
|
// MODULE ENTITY HOOK
|
|
212
213
|
// ---------------------------------------------------------------------------
|
|
@@ -334,7 +335,7 @@ var useTaxState = function () {
|
|
|
334
335
|
{
|
|
335
336
|
enabled: true,
|
|
336
337
|
handleOnClick: handleCreate,
|
|
337
|
-
label: "
|
|
338
|
+
label: t("actionsButtonAddItem"),
|
|
338
339
|
order: 1,
|
|
339
340
|
},
|
|
340
341
|
];
|
|
@@ -352,13 +353,13 @@ var useTaxState = function () {
|
|
|
352
353
|
{
|
|
353
354
|
enabled: true,
|
|
354
355
|
handleAction: handleEdit,
|
|
355
|
-
label: "
|
|
356
|
+
label: t("actionsButtonEdit"),
|
|
356
357
|
order: 1,
|
|
357
358
|
},
|
|
358
359
|
{
|
|
359
360
|
enabled: true,
|
|
360
361
|
handleAction: handleDelete,
|
|
361
|
-
label: "
|
|
362
|
+
label: t("actionsButtonDelete"),
|
|
362
363
|
order: 2,
|
|
363
364
|
},
|
|
364
365
|
];
|
|
@@ -26,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.TaxDrawer = void 0;
|
|
27
27
|
var react_1 = __importDefault(require("react"));
|
|
28
28
|
var lucide_react_1 = require("lucide-react");
|
|
29
|
-
var button_1 = require("
|
|
30
|
-
var drawer_1 = require("
|
|
29
|
+
var button_1 = require("@appcorp/shadcn/components/button");
|
|
30
|
+
var drawer_1 = require("@appcorp/shadcn/components/drawer");
|
|
31
31
|
var context_1 = require("./context");
|
|
32
32
|
var form_1 = require("./form");
|
|
33
33
|
// ============================================================================
|
|
@@ -20,8 +20,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
exports.TaxForm = void 0;
|
|
21
21
|
var react_1 = __importDefault(require("react"));
|
|
22
22
|
var next_intl_1 = require("next-intl");
|
|
23
|
-
var input_1 = require("
|
|
24
|
-
var switch_1 = require("
|
|
23
|
+
var input_1 = require("@appcorp/shadcn/components/input");
|
|
24
|
+
var switch_1 = require("@appcorp/shadcn/components/switch");
|
|
25
25
|
var context_1 = require("./context");
|
|
26
26
|
// ============================================================================
|
|
27
27
|
// COMPONENT
|
|
@@ -9,9 +9,8 @@ var react_1 = __importDefault(require("react"));
|
|
|
9
9
|
var next_intl_1 = require("next-intl");
|
|
10
10
|
var util_functions_1 = require("@react-pakistan/util-functions");
|
|
11
11
|
var use_rtl_1 = require("../../hooks/use-rtl");
|
|
12
|
-
var enhanced_table_1 = require("
|
|
13
|
-
var sonner_1 = require("
|
|
14
|
-
var theme_switcher_1 = require("../../components/theme-switcher");
|
|
12
|
+
var enhanced_table_1 = require("@appcorp/shadcn/components/enhanced-table");
|
|
13
|
+
var sonner_1 = require("@appcorp/shadcn/components/sonner");
|
|
15
14
|
var constants_1 = require("./constants");
|
|
16
15
|
var context_1 = require("./context");
|
|
17
16
|
var drawer_1 = require("./drawer");
|
|
@@ -34,7 +33,7 @@ var drawer_1 = require("./drawer");
|
|
|
34
33
|
*/
|
|
35
34
|
var Tax = function () {
|
|
36
35
|
var _a = (0, context_1.useTaxStateContext)(), count = _a.count, currentPage = _a.currentPage, handleNextClick = _a.handleNextClick, handlePageLimit = _a.handlePageLimit, handlePreviousClick = _a.handlePreviousClick, headerActions = _a.headerActions, listLoading = _a.listLoading, pageLimit = _a.pageLimit, rowActions = _a.rowActions, searchQuery = _a.searchQuery, taxes = _a.taxes, searchOnChange = _a.searchOnChange;
|
|
37
|
-
var t = (0, next_intl_1.useTranslations)("
|
|
36
|
+
var t = (0, next_intl_1.useTranslations)("tax");
|
|
38
37
|
var isRTL = (0, use_rtl_1.useRTL)();
|
|
39
38
|
// ============================================================================
|
|
40
39
|
// TRANSLATION MAPPING
|
|
@@ -117,10 +116,7 @@ var Tax = function () {
|
|
|
117
116
|
// RENDER
|
|
118
117
|
// ============================================================================
|
|
119
118
|
return (react_1.default.createElement("div", { className: "space-y-4 ".concat(isRTL ? "rtl" : "ltr"), dir: isRTL ? "rtl" : "ltr" },
|
|
120
|
-
react_1.default.createElement(
|
|
121
|
-
react_1.default.createElement("div", null),
|
|
122
|
-
react_1.default.createElement(theme_switcher_1.ThemeSwitcher, null)),
|
|
123
|
-
react_1.default.createElement(enhanced_table_1.EnhancedTable, { currentPage: Number(currentPage), handleNextOnClick: handleNextClick, handleOnSelect: handlePageLimit, handlePreviousOnClick: handlePreviousClick, handleSearchInput: searchOnChange, headerActions: headerActions, isNextDisabled: (0, util_functions_1.isNextButtonDisabled)(currentPage, totalPages), isPreviousDisabled: (0, util_functions_1.isPreviousButtonDisabled)(currentPage), listOptions: (0, util_functions_1.getAvailablePageLimits)(count), loading: listLoading, nodeSelectKey: "pageLimit", pageLimit: pageLimit, rowActions: rowActions, searchDisabled: false, searchEnabled: true, searchId: "tax-search", searchPlaceholder: t("tableHeaderSearchPlaceholder"), searchValue: searchQuery, tableBodyCols: constants_1.tableBodyCols, tableBodyRows: taxes, tableDescription: t("tableDescription"), tableHeadItems: tableHeadItems, tableHeading: t("tableTitle"), totalPages: Number(totalPages) }),
|
|
119
|
+
react_1.default.createElement(enhanced_table_1.EnhancedTable, { currentPage: Number(currentPage), handleNextOnClick: handleNextClick, handleOnSelect: handlePageLimit, handlePreviousOnClick: handlePreviousClick, handleSearchInput: searchOnChange, headerActions: headerActions, isNextDisabled: (0, util_functions_1.isNextButtonDisabled)(currentPage, totalPages), isPreviousDisabled: (0, util_functions_1.isPreviousButtonDisabled)(currentPage), listOptions: (0, util_functions_1.getAvailablePageLimits)(count), loading: listLoading, nodeSelectKey: "pageLimit", pageLimit: pageLimit, rowActions: rowActions, searchDisabled: false, searchEnabled: true, searchId: "tax-search", searchPlaceholder: t("tableSearchPlaceholder"), searchValue: searchQuery, tableBodyCols: constants_1.tableBodyCols, tableBodyRows: taxes, tableDescription: t("tableDescription"), tableHeadItems: tableHeadItems, tableHeading: t("tableTitle"), totalPages: Number(totalPages) }),
|
|
124
120
|
react_1.default.createElement(drawer_1.TaxDrawer, { translationMap: translationMap, isRTL: isRTL }),
|
|
125
121
|
react_1.default.createElement(sonner_1.Toaster, null)));
|
|
126
122
|
};
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* - Types: PascalCase following interface conventions
|
|
24
24
|
*/
|
|
25
25
|
import { Dispatch } from "react";
|
|
26
|
-
import { RowAction, HeaderAction } from "
|
|
26
|
+
import { RowAction, HeaderAction } from "@appcorp/shadcn/components/enhanced-table";
|
|
27
27
|
import { TaxActions } from "./actions";
|
|
28
28
|
/**
|
|
29
29
|
* Tax Context Interface
|
package/index.d.ts
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export * from "./components/theme-provider";
|
|
2
|
-
export * from "./components/theme-switcher";
|
|
3
|
-
export * from "./components/ui/badge";
|
|
4
|
-
export * from "./components/ui/button";
|
|
5
|
-
export * from "./components/ui/card";
|
|
6
|
-
export * from "./components/ui/carousel";
|
|
7
|
-
export * from "./components/ui/checkbox";
|
|
8
|
-
export * from "./components/ui/combobox";
|
|
9
|
-
export * from "./components/ui/command";
|
|
10
|
-
export * from "./components/ui/dialog";
|
|
11
|
-
export * from "./components/ui/drawer";
|
|
12
|
-
export * from "./components/ui/dropdown-menu";
|
|
13
|
-
export * from "./components/ui/enhanced-dropzone";
|
|
14
|
-
export * from "./components/ui/enhanced-table-footer-action";
|
|
15
|
-
export * from "./components/ui/enhanced-table-footer-page";
|
|
16
|
-
export * from "./components/ui/enhanced-table-footer-pagination";
|
|
17
|
-
export * from "./components/ui/enhanced-table-header-action";
|
|
18
|
-
export * from "./components/ui/enhanced-table-header-search";
|
|
19
|
-
export * from "./components/ui/enhanced-table";
|
|
20
|
-
export * from "./components/ui/form";
|
|
21
|
-
export * from "./components/ui/input";
|
|
22
|
-
export * from "./components/ui/label";
|
|
23
|
-
export * from "./components/ui/popover";
|
|
24
|
-
export * from "./components/ui/select";
|
|
25
|
-
export * from "./components/ui/separator";
|
|
26
|
-
export * from "./components/ui/shadcn-io/color-picker";
|
|
27
|
-
export * from "./components/ui/shadcn-io/dropzone";
|
|
28
|
-
export * from "./components/ui/sonner";
|
|
29
|
-
export * from "./components/ui/switch";
|
|
30
|
-
export * from "./components/ui/textarea";
|
package/index.js
CHANGED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./components/theme-provider"), exports);
|
|
18
|
-
__exportStar(require("./components/theme-switcher"), exports);
|
|
19
|
-
__exportStar(require("./components/ui/badge"), exports);
|
|
20
|
-
__exportStar(require("./components/ui/button"), exports);
|
|
21
|
-
__exportStar(require("./components/ui/card"), exports);
|
|
22
|
-
__exportStar(require("./components/ui/carousel"), exports);
|
|
23
|
-
__exportStar(require("./components/ui/checkbox"), exports);
|
|
24
|
-
__exportStar(require("./components/ui/combobox"), exports);
|
|
25
|
-
__exportStar(require("./components/ui/command"), exports);
|
|
26
|
-
__exportStar(require("./components/ui/dialog"), exports);
|
|
27
|
-
__exportStar(require("./components/ui/drawer"), exports);
|
|
28
|
-
__exportStar(require("./components/ui/dropdown-menu"), exports);
|
|
29
|
-
__exportStar(require("./components/ui/enhanced-dropzone"), exports);
|
|
30
|
-
__exportStar(require("./components/ui/enhanced-table-footer-action"), exports);
|
|
31
|
-
__exportStar(require("./components/ui/enhanced-table-footer-page"), exports);
|
|
32
|
-
__exportStar(require("./components/ui/enhanced-table-footer-pagination"), exports);
|
|
33
|
-
__exportStar(require("./components/ui/enhanced-table-header-action"), exports);
|
|
34
|
-
__exportStar(require("./components/ui/enhanced-table-header-search"), exports);
|
|
35
|
-
__exportStar(require("./components/ui/enhanced-table"), exports);
|
|
36
|
-
__exportStar(require("./components/ui/form"), exports);
|
|
37
|
-
__exportStar(require("./components/ui/input"), exports);
|
|
38
|
-
__exportStar(require("./components/ui/label"), exports);
|
|
39
|
-
__exportStar(require("./components/ui/popover"), exports);
|
|
40
|
-
__exportStar(require("./components/ui/select"), exports);
|
|
41
|
-
__exportStar(require("./components/ui/separator"), exports);
|
|
42
|
-
__exportStar(require("./components/ui/shadcn-io/color-picker"), exports);
|
|
43
|
-
__exportStar(require("./components/ui/shadcn-io/dropzone"), exports);
|
|
44
|
-
__exportStar(require("./components/ui/sonner"), exports);
|
|
45
|
-
__exportStar(require("./components/ui/switch"), exports);
|
|
46
|
-
__exportStar(require("./components/ui/textarea"), exports);
|
package/lib/toast-utils.d.ts
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared Toast Utilities
|
|
3
|
-
*
|
|
4
|
-
* Theme-aware toast notification system using Sonner with comprehensive
|
|
5
|
-
* styling, icons, and theme integration for consistent user experience
|
|
6
|
-
* across all modules.
|
|
7
|
-
*
|
|
8
|
-
* Features:
|
|
9
|
-
* - Theme-aware styling (light/dark/system)
|
|
10
|
-
* - Lucide React icons for each toast type
|
|
11
|
-
* - Consistent styling with shadcn/ui components
|
|
12
|
-
* - TypeScript support with proper interfaces
|
|
13
|
-
* - Convenience functions for common use cases
|
|
14
|
-
*/
|
|
15
|
-
export declare enum TOAST_VARIANT {
|
|
16
|
-
ERROR = "error",
|
|
17
|
-
INFO = "info",
|
|
18
|
-
SUCCESS = "success",
|
|
19
|
-
WARNING = "warning"
|
|
20
|
-
}
|
|
21
|
-
interface ToastConfig {
|
|
22
|
-
action?: {
|
|
23
|
-
label: string;
|
|
24
|
-
onClick: () => void;
|
|
25
|
-
};
|
|
26
|
-
description: string;
|
|
27
|
-
duration?: number;
|
|
28
|
-
theme?: "light" | "dark" | "system";
|
|
29
|
-
title?: string;
|
|
30
|
-
variant: TOAST_VARIANT;
|
|
31
|
-
}
|
|
32
|
-
export declare const generateToast: ({ variant, title, description, duration, action, }: ToastConfig) => string | number;
|
|
33
|
-
export declare const generateThemeToast: ({ variant, title, description, duration, action, theme, }: ToastConfig & {
|
|
34
|
-
theme?: "light" | "dark" | "system";
|
|
35
|
-
}) => string | number;
|
|
36
|
-
export declare const showSuccessToast: (description: string, title?: string) => void;
|
|
37
|
-
export declare const showErrorToast: (description: string, title?: string) => void;
|
|
38
|
-
export declare const showWarningToast: (description: string, title?: string) => void;
|
|
39
|
-
export declare const showInfoToast: (description: string, title?: string) => void;
|
|
40
|
-
export declare const showThemeSuccessToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
|
|
41
|
-
export declare const showThemeErrorToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
|
|
42
|
-
export declare const showThemeWarningToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
|
|
43
|
-
export declare const showThemeInfoToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
|
|
44
|
-
export {};
|