@appcorp/stellar-solutions-modules 0.1.34 → 0.1.35
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/README.md +128 -19
- package/components/theme-switcher.d.ts +4 -0
- package/components/theme-switcher.js +60 -0
- package/components/ui/badge.d.ts +9 -0
- package/components/ui/badge.js +82 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +91 -0
- package/components/ui/checkbox.d.ts +9 -0
- package/components/ui/checkbox.js +87 -0
- package/components/ui/drawer.d.ts +13 -0
- package/components/ui/drawer.js +115 -0
- package/components/ui/dropdown-menu.d.ts +25 -0
- package/components/ui/dropdown-menu.js +148 -0
- package/components/ui/enhanced-table-footer-action.d.ts +34 -0
- package/components/ui/enhanced-table-footer-action.js +117 -0
- package/components/ui/enhanced-table-footer-page.d.ts +32 -0
- package/components/ui/enhanced-table-footer-page.js +140 -0
- package/components/ui/enhanced-table-footer-pagination.d.ts +38 -0
- package/components/ui/enhanced-table-footer-pagination.js +122 -0
- package/components/ui/enhanced-table-header-action.d.ts +7 -0
- package/components/ui/enhanced-table-header-action.js +21 -0
- package/components/ui/enhanced-table-header-search.d.ts +12 -0
- package/components/ui/enhanced-table-header-search.js +17 -0
- package/components/ui/enhanced-table.d.ts +65 -0
- package/components/ui/enhanced-table.js +87 -0
- package/components/ui/input.d.ts +8 -0
- package/components/ui/input.js +86 -0
- package/components/ui/label.d.ts +7 -0
- package/components/ui/label.js +68 -0
- package/components/ui/popover.d.ts +7 -0
- package/components/ui/popover.js +82 -0
- package/components/ui/select.d.ts +15 -0
- package/components/ui/select.js +127 -0
- package/components/ui/sonner.d.ts +4 -0
- package/components/ui/sonner.js +54 -0
- package/components/ui/switch.d.ts +9 -0
- package/components/ui/switch.js +89 -0
- package/components/ui/table.d.ts +10 -0
- package/components/ui/table.js +101 -0
- package/global-modules/bank/actions.d.ts +200 -0
- package/global-modules/bank/actions.js +124 -0
- package/global-modules/bank/bank.d.ts +2 -0
- package/global-modules/bank/bank.js +87 -0
- package/global-modules/bank/constants.d.ts +45 -0
- package/global-modules/bank/constants.js +98 -0
- package/global-modules/bank/context.d.ts +41 -0
- package/global-modules/bank/context.js +419 -0
- package/global-modules/bank/drawer.d.ts +31 -0
- package/global-modules/bank/drawer.js +114 -0
- package/global-modules/bank/form.d.ts +22 -0
- package/global-modules/bank/form.js +68 -0
- package/global-modules/bank/reducer.d.ts +25 -0
- package/global-modules/bank/reducer.js +161 -0
- package/global-modules/bank/types.d.ts +217 -0
- package/global-modules/bank/types.js +81 -0
- package/global-modules/bank/validate.d.ts +13 -0
- package/global-modules/bank/validate.js +22 -0
- package/global-modules/branch/actions.d.ts +154 -37
- package/global-modules/branch/actions.js +148 -6
- package/global-modules/branch/branch.d.ts +2 -2
- package/global-modules/branch/branch.js +46 -32
- package/global-modules/branch/constants.d.ts +34 -24
- package/global-modules/branch/constants.js +101 -122
- package/global-modules/branch/context.d.ts +33 -2
- package/global-modules/branch/context.js +195 -164
- package/global-modules/branch/drawer.d.ts +26 -3
- package/global-modules/branch/drawer.js +101 -6
- package/global-modules/branch/form.d.ts +15 -1
- package/global-modules/branch/form.js +54 -71
- package/global-modules/branch/reducer.d.ts +23 -2
- package/global-modules/branch/reducer.js +148 -118
- package/global-modules/branch/types.d.ts +196 -69
- package/global-modules/branch/types.js +66 -7
- package/global-modules/branch/validate.d.ts +1 -1
- package/global-modules/branch/validate.js +15 -11
- package/global-modules/payment-mode/actions.d.ts +154 -37
- package/global-modules/payment-mode/actions.js +148 -6
- package/global-modules/payment-mode/constants.d.ts +34 -17
- package/global-modules/payment-mode/constants.js +90 -66
- package/global-modules/payment-mode/context.d.ts +33 -2
- package/global-modules/payment-mode/context.js +185 -163
- package/global-modules/payment-mode/drawer.d.ts +26 -3
- package/global-modules/payment-mode/drawer.js +104 -9
- package/global-modules/payment-mode/form.d.ts +16 -2
- package/global-modules/payment-mode/form.js +45 -74
- package/global-modules/payment-mode/payment-mode.d.ts +25 -2
- package/global-modules/payment-mode/payment-mode.js +90 -23
- package/global-modules/payment-mode/reducer.d.ts +23 -2
- package/global-modules/payment-mode/reducer.js +140 -114
- package/global-modules/payment-mode/types.d.ts +327 -112
- package/global-modules/payment-mode/types.js +162 -11
- package/global-modules/payment-mode/validate.d.ts +1 -1
- package/global-modules/payment-mode/validate.js +7 -5
- package/global-modules/preferences/actions.d.ts +126 -27
- package/global-modules/preferences/actions.js +128 -4
- package/global-modules/preferences/constants.d.ts +46 -31
- package/global-modules/preferences/constants.js +129 -66
- package/global-modules/preferences/context.d.ts +2 -2
- package/global-modules/preferences/context.js +43 -43
- package/global-modules/preferences/currency.js +15 -10
- package/global-modules/preferences/preferences.d.ts +2 -2
- package/global-modules/preferences/preferences.js +3 -5
- package/global-modules/preferences/validate.d.ts +1 -1
- package/global-modules/preferences/validate.js +7 -7
- package/global-modules/tax/actions.d.ts +155 -38
- package/global-modules/tax/actions.js +149 -7
- package/global-modules/tax/constants.d.ts +31 -39
- package/global-modules/tax/constants.js +83 -114
- package/global-modules/tax/context.d.ts +33 -2
- package/global-modules/tax/context.js +146 -132
- package/global-modules/tax/drawer.d.ts +26 -3
- package/global-modules/tax/drawer.js +101 -6
- package/global-modules/tax/form.d.ts +20 -3
- package/global-modules/tax/form.js +101 -74
- package/global-modules/tax/reducer.d.ts +23 -2
- package/global-modules/tax/reducer.js +143 -24
- package/global-modules/tax/tax.d.ts +25 -2
- package/global-modules/tax/tax.js +92 -28
- package/global-modules/tax/types.d.ts +332 -102
- package/global-modules/tax/types.js +179 -11
- package/global-modules/tax/validate.d.ts +1 -1
- package/global-modules/tax/validate.js +9 -8
- package/hooks/use-rtl.d.ts +44 -0
- package/hooks/use-rtl.js +75 -0
- package/lib/themes.d.ts +147 -0
- package/lib/themes.js +150 -0
- package/lib/toast-utils.d.ts +44 -0
- package/lib/toast-utils.js +212 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +12 -0
- package/package.json +21 -4
- package/supabase/supabase.d.ts +80 -1
- package/supabase/supabase.js +281 -6
- package/global-modules/branch/form-elements.d.ts +0 -3
- package/global-modules/branch/form-elements.js +0 -41
- package/global-modules/payment-mode/form-elements.d.ts +0 -3
- package/global-modules/payment-mode/form-elements.js +0 -41
- package/global-modules/preferences/bank.d.ts +0 -2
- package/global-modules/preferences/bank.js +0 -11
- package/global-modules/preferences/branch-drawer.js +0 -36
- package/global-modules/preferences/branch-form-elements.js +0 -30
- package/global-modules/preferences/branch-form.d.ts +0 -0
- package/global-modules/preferences/branch-form.js +0 -33
- package/global-modules/preferences/branch.d.ts +0 -0
- package/global-modules/preferences/branch.js +0 -106
- package/global-modules/preferences/payment-mode-drawer.d.ts +0 -0
- package/global-modules/preferences/payment-mode-drawer.js +0 -36
- package/global-modules/preferences/payment-mode-form-elements.d.ts +0 -0
- package/global-modules/preferences/payment-mode-form-elements.js +0 -30
- package/global-modules/preferences/payment-mode-form.d.ts +0 -0
- package/global-modules/preferences/payment-mode-form.js +0 -33
- package/global-modules/preferences/payment-mode.d.ts +0 -0
- package/global-modules/preferences/payment-mode.js +0 -94
- package/global-modules/tax/form-elements.d.ts +0 -3
- package/global-modules/tax/form-elements.js +0 -41
- /package/{global-modules/preferences/branch-drawer.d.ts → constants.d.ts} +0 -0
- /package/{global-modules/preferences/branch-form-elements.d.ts → constants.js} +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// /* eslint-disable */
|
|
2
|
-
// import React from 'react';
|
|
3
|
-
// import { vistaFormSchema } from '@appcorp/app-corp-vista/utils/form-schema';
|
|
4
|
-
// import { VistaFormElements } from '@appcorp/app-corp-vista/type/vista-form-elements';
|
|
5
|
-
// export const renderPaymentModeFormElements = (
|
|
6
|
-
// elementProps: VistaFormElements,
|
|
7
|
-
// ) => {
|
|
8
|
-
// const elementsArray = Object.entries(vistaFormSchema)
|
|
9
|
-
// .flatMap(([key, config]) => {
|
|
10
|
-
// const Component = config;
|
|
11
|
-
// return (elementProps[key as keyof VistaFormElements] || [])
|
|
12
|
-
// ?.filter((props: any) => props.enabled)
|
|
13
|
-
// ?.map((props: any) => ({
|
|
14
|
-
// Component,
|
|
15
|
-
// key,
|
|
16
|
-
// order: props.order,
|
|
17
|
-
// props,
|
|
18
|
-
// }));
|
|
19
|
-
// })
|
|
20
|
-
// ?.sort((a, b) => a.order - b.order);
|
|
21
|
-
// return (
|
|
22
|
-
// <div className="grid grid-cols-1 gap-4">
|
|
23
|
-
// {elementsArray?.map(({ key, Component, props }, index) => (
|
|
24
|
-
// <div key={`${key}-${index}`}>
|
|
25
|
-
// <Component {...props} />
|
|
26
|
-
// </div>
|
|
27
|
-
// ))}
|
|
28
|
-
// </div>
|
|
29
|
-
// );
|
|
30
|
-
// };
|
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// import React, { FC, useMemo } from 'react';
|
|
2
|
-
// import { VistaTextInputV1Props } from '@appcorp/app-corp-vista/type/vista-text-input-type';
|
|
3
|
-
// import { VISTA_FORM_ELEMENTS } from '@appcorp/app-corp-vista/utils/form-schema';
|
|
4
|
-
// import { VistaFormElements } from '@appcorp/app-corp-vista/type/vista-form-elements';
|
|
5
|
-
// import { usePreferenceStateContext } from './context';
|
|
6
|
-
// import { renderPaymentModeFormElements } from './payment-mode-form-elements';
|
|
7
|
-
// import { VistaComboboxV1Props } from '@appcorp/app-corp-vista/type/vista-combobox-type';
|
|
8
|
-
// interface Props {
|
|
9
|
-
// translationMap: {[key: string]: string};
|
|
10
|
-
// }
|
|
11
|
-
// export const PaymentModeForm: FC<Props> = ({ translationMap }) => {
|
|
12
|
-
// const { paymentModeDynamicFormElements } = usePreferenceStateContext();
|
|
13
|
-
// const updated = useMemo(() => {
|
|
14
|
-
// const elements: VistaFormElements = { ...paymentModeDynamicFormElements };
|
|
15
|
-
// const textInputElements: VistaTextInputV1Props[] | undefined = elements[VISTA_FORM_ELEMENTS.TEXT_INPUT_V1]?.sort((a, b) => a.order - b.order);
|
|
16
|
-
// if (textInputElements) {
|
|
17
|
-
// textInputElements?.forEach(({ label }, i) => {
|
|
18
|
-
// if (translationMap[label as string] === undefined) return label;
|
|
19
|
-
// textInputElements[i].label = translationMap[label as string];
|
|
20
|
-
// });
|
|
21
|
-
// }
|
|
22
|
-
// const comboboxElements: VistaComboboxV1Props[] | undefined = elements[VISTA_FORM_ELEMENTS.COMBOBOX_V1]?.sort((a, b) => a.order - b.order);
|
|
23
|
-
// if (comboboxElements) {
|
|
24
|
-
// comboboxElements?.forEach(({ label }, i) => {
|
|
25
|
-
// if (translationMap[label as string] === undefined) return label;
|
|
26
|
-
// comboboxElements[i].label = translationMap[label];
|
|
27
|
-
// });
|
|
28
|
-
// }
|
|
29
|
-
// return elements;
|
|
30
|
-
// // eslint-disable-next-line
|
|
31
|
-
// }, []);
|
|
32
|
-
// return <>{renderPaymentModeFormElements(updated)}</>;
|
|
33
|
-
// };
|
|
File without changes
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
// import React from "react";
|
|
2
|
-
// import { VistaTableV1 } from "@appcorp/app-corp-vista/organisms/vista-table-v1/vista-table-v1";
|
|
3
|
-
// import { PaymentModeDrawer } from "./payment-mode-drawer";
|
|
4
|
-
// import { VistaToaster } from "@appcorp/app-corp-vista/utils/generate-toast";
|
|
5
|
-
// import { useTranslations } from "next-intl";
|
|
6
|
-
// import { usePreferenceStateContext } from "./context";
|
|
7
|
-
// import {
|
|
8
|
-
// calculatePages,
|
|
9
|
-
// getAvailablePageLimits,
|
|
10
|
-
// isNextButtonDisabled,
|
|
11
|
-
// isPreviousButtonDisabled,
|
|
12
|
-
// } from "@react-pakistan/util-functions";
|
|
13
|
-
// import { paymentModeTableBodyCols } from "./constants";
|
|
14
|
-
// export const PaymentMode = () => {
|
|
15
|
-
// const {
|
|
16
|
-
// paymentModeCount,
|
|
17
|
-
// paymentModePageLimit,
|
|
18
|
-
// paymentModeSearchQuery,
|
|
19
|
-
// paymentModes,
|
|
20
|
-
// paymentModeListLoading,
|
|
21
|
-
// paymentModeHeaderActions,
|
|
22
|
-
// paymentModeRowActions,
|
|
23
|
-
// paymentModeCurrentPage,
|
|
24
|
-
// } = usePreferenceStateContext();
|
|
25
|
-
// const t = useTranslations('paymentModePage');
|
|
26
|
-
// const translationMap = {
|
|
27
|
-
// formLabelName: t('formLabelName'),
|
|
28
|
-
// formLabelCountry: t('formLabelCountry'),
|
|
29
|
-
// formLabelPhone: t('formLabelPhone'),
|
|
30
|
-
// formLabelWebsite: t('formLabelWebsite'),
|
|
31
|
-
// formLabelEmail: t('formLabelEmail'),
|
|
32
|
-
// };
|
|
33
|
-
// const tableHeadItems = [
|
|
34
|
-
// {
|
|
35
|
-
// label: t('tableColumnHeaderId'),
|
|
36
|
-
// width: '5%',
|
|
37
|
-
// },
|
|
38
|
-
// {
|
|
39
|
-
// label: t('tableColumnHeaderLabel'),
|
|
40
|
-
// width: '30%',
|
|
41
|
-
// },
|
|
42
|
-
// {
|
|
43
|
-
// label: t('tableColumnHeaderEnabled'),
|
|
44
|
-
// width: '20%',
|
|
45
|
-
// },
|
|
46
|
-
// {
|
|
47
|
-
// label: t('tableColumnHeaderIsDefault'),
|
|
48
|
-
// width: '20%',
|
|
49
|
-
// },
|
|
50
|
-
// {
|
|
51
|
-
// label: t('tableColumnHeaderActivity'),
|
|
52
|
-
// width: '20%',
|
|
53
|
-
// },
|
|
54
|
-
// {
|
|
55
|
-
// label: t('tableColumnHeaderActions'),
|
|
56
|
-
// width: '5%',
|
|
57
|
-
// },
|
|
58
|
-
// ];
|
|
59
|
-
// const totalPages = calculatePages(paymentModeCount, paymentModePageLimit);
|
|
60
|
-
// return (
|
|
61
|
-
// <>
|
|
62
|
-
// <VistaTableV1
|
|
63
|
-
// currentPage={paymentModeCount}
|
|
64
|
-
// handleNextOnClick={() => void 0}
|
|
65
|
-
// handleOnSelect={() => void 0}
|
|
66
|
-
// handlePreviousOnClick={() => void 0}
|
|
67
|
-
// handleSearchInput={() => void 0}
|
|
68
|
-
// headerActions={paymentModeHeaderActions}
|
|
69
|
-
// isNextDisabled={isNextButtonDisabled(paymentModeCurrentPage, totalPages)}
|
|
70
|
-
// isPreviousDisabled={isPreviousButtonDisabled(paymentModeCurrentPage)}
|
|
71
|
-
// listOptions={getAvailablePageLimits(paymentModeCount)}
|
|
72
|
-
// loading={paymentModeListLoading}
|
|
73
|
-
// nodeSelectKey="paymentModePageLimit"
|
|
74
|
-
// pageLimit={paymentModePageLimit}
|
|
75
|
-
// rowActions={paymentModeRowActions}
|
|
76
|
-
// searchDisabled={false}
|
|
77
|
-
// searchEnabled
|
|
78
|
-
// searchId="payment-mode-search"
|
|
79
|
-
// searchPlaceholder={t('tableHeaderSearchPlaceholder')}
|
|
80
|
-
// searchValue={paymentModeSearchQuery}
|
|
81
|
-
// selectKey1="option"
|
|
82
|
-
// selectedItem={{ option: String(paymentModePageLimit) }}
|
|
83
|
-
// tableBodyCols={paymentModeTableBodyCols}
|
|
84
|
-
// tableBodyRows={paymentModes}
|
|
85
|
-
// tableDescription={t('tableDescription')}
|
|
86
|
-
// tableHeadItems={tableHeadItems}
|
|
87
|
-
// tableHeading={t('tableTitle')}
|
|
88
|
-
// totalPages={totalPages}
|
|
89
|
-
// />
|
|
90
|
-
// <PaymentModeDrawer translationMap={translationMap} />
|
|
91
|
-
// <VistaToaster />
|
|
92
|
-
// </>
|
|
93
|
-
// );
|
|
94
|
-
// };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.renderFormElements = void 0;
|
|
19
|
-
var react_1 = __importDefault(require("react"));
|
|
20
|
-
var form_schema_1 = require("@appcorp/app-corp-vista/utils/form-schema");
|
|
21
|
-
var renderFormElements = function (elementProps) {
|
|
22
|
-
var _a;
|
|
23
|
-
var elementsArray = (_a = Object.entries(form_schema_1.vistaFormSchema)
|
|
24
|
-
.flatMap(function (_a) {
|
|
25
|
-
var _b, _c;
|
|
26
|
-
var key = _a[0], config = _a[1];
|
|
27
|
-
var Component = config;
|
|
28
|
-
return (_c = (_b = (elementProps[key] || [])) === null || _b === void 0 ? void 0 : _b.filter(function (props) { return props.enabled; })) === null || _c === void 0 ? void 0 : _c.map(function (props) { return ({
|
|
29
|
-
Component: Component,
|
|
30
|
-
key: key,
|
|
31
|
-
order: props.order,
|
|
32
|
-
props: props,
|
|
33
|
-
}); });
|
|
34
|
-
})) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) { return a.order - b.order; });
|
|
35
|
-
return (react_1.default.createElement("div", { className: "grid grid-cols-1 gap-4" }, elementsArray === null || elementsArray === void 0 ? void 0 : elementsArray.map(function (_a, index) {
|
|
36
|
-
var key = _a.key, Component = _a.Component, props = _a.props;
|
|
37
|
-
return (react_1.default.createElement("div", { key: "".concat(key, "-").concat(index) },
|
|
38
|
-
react_1.default.createElement(Component, __assign({}, props))));
|
|
39
|
-
})));
|
|
40
|
-
};
|
|
41
|
-
exports.renderFormElements = renderFormElements;
|
|
File without changes
|
|
File without changes
|