injast-core 1.0.78
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/LICENSE +15 -0
- package/README.md +127 -0
- package/dist/components/index.js +3187 -0
- package/dist/constants/index.js +138 -0
- package/dist/context/index.js +308 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Black.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Bold.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-DemiBold.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-ExtraBlack.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-ExtraBold.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Heavy.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Light.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Medium.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Regular.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-Thin.woff +0 -0
- package/dist/fonts/IranYekan/Woff/IRANYekanXFaNum-UltraLight.woff +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Black.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Bold.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-DemiBold.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-ExtraBlack.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-ExtraBold.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Heavy.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Light.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Medium.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Regular.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-Thin.woff2 +0 -0
- package/dist/fonts/IranYekan/Woff2/IRANYekanXFaNum-UltraLight.woff2 +0 -0
- package/dist/fonts/fonts.css +245 -0
- package/dist/hooks/index.js +107 -0
- package/dist/index.js +3831 -0
- package/dist/libs/index.js +142 -0
- package/dist/providers/index.js +305 -0
- package/dist/types/components/Accordion.d.ts +4 -0
- package/dist/types/components/AccordionDetails.d.ts +4 -0
- package/dist/types/components/AccordionSummary.d.ts +4 -0
- package/dist/types/components/Autocomplete.d.ts +3 -0
- package/dist/types/components/Box.d.ts +4 -0
- package/dist/types/components/Button.d.ts +9 -0
- package/dist/types/components/CardNumberInput.d.ts +13 -0
- package/dist/types/components/Checkbox.d.ts +11 -0
- package/dist/types/components/CircularProgress.d.ts +4 -0
- package/dist/types/components/Container.d.ts +4 -0
- package/dist/types/components/CounterBoxInput.d.ts +23 -0
- package/dist/types/components/DataGrid.d.ts +57 -0
- package/dist/types/components/Dialog.d.ts +4 -0
- package/dist/types/components/Divider.d.ts +4 -0
- package/dist/types/components/Drawer.d.ts +9 -0
- package/dist/types/components/Fab.d.ts +4 -0
- package/dist/types/components/FormControl.d.ts +4 -0
- package/dist/types/components/FormControlLabel.d.ts +4 -0
- package/dist/types/components/Grid.d.ts +4 -0
- package/dist/types/components/IconButton.d.ts +4 -0
- package/dist/types/components/Image.d.ts +12 -0
- package/dist/types/components/InputLabel.d.ts +4 -0
- package/dist/types/components/InputPhoneNumber.d.ts +15 -0
- package/dist/types/components/IosHiddenOtpInput.d.ts +6 -0
- package/dist/types/components/List.d.ts +4 -0
- package/dist/types/components/ListItem.d.ts +4 -0
- package/dist/types/components/Loading.d.ts +7 -0
- package/dist/types/components/LoadingModal.d.ts +6 -0
- package/dist/types/components/MenuItem.d.ts +4 -0
- package/dist/types/components/MobileDatePicker.d.ts +19 -0
- package/dist/types/components/Modal.d.ts +9 -0
- package/dist/types/components/MultiSelect.d.ts +14 -0
- package/dist/types/components/NumberInput.d.ts +19 -0
- package/dist/types/components/OtpInput.d.ts +16 -0
- package/dist/types/components/Pagination.d.ts +4 -0
- package/dist/types/components/ProgressBar.d.ts +10 -0
- package/dist/types/components/Radio.d.ts +4 -0
- package/dist/types/components/RadioGroup.d.ts +4 -0
- package/dist/types/components/Select.d.ts +4 -0
- package/dist/types/components/Skeleton.d.ts +4 -0
- package/dist/types/components/Slider.d.ts +4 -0
- package/dist/types/components/Step.d.ts +4 -0
- package/dist/types/components/StepConnector.d.ts +4 -0
- package/dist/types/components/StepContent.d.ts +4 -0
- package/dist/types/components/StepLabel.d.ts +4 -0
- package/dist/types/components/Stepper.d.ts +4 -0
- package/dist/types/components/SvgIcon.d.ts +8 -0
- package/dist/types/components/Tab.d.ts +12 -0
- package/dist/types/components/TextField.d.ts +9 -0
- package/dist/types/components/Toast.d.ts +20 -0
- package/dist/types/components/Toggle.d.ts +10 -0
- package/dist/types/components/Typography.d.ts +8 -0
- package/dist/types/components/WheelDatePicker.d.ts +37 -0
- package/dist/types/components/index.d.ts +53 -0
- package/dist/types/constants/colors.d.ts +2 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants/stepConnectorClasses.d.ts +2 -0
- package/dist/types/constants/typography.d.ts +82 -0
- package/dist/types/context/MessageHandler.d.ts +15 -0
- package/dist/types/context/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +8 -0
- package/dist/types/hooks/useErrorHandler.d.ts +10 -0
- package/dist/types/hooks/useMessage.d.ts +2 -0
- package/dist/types/hooks/useWebOtpListener.d.ts +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +19 -0
- package/dist/types/libs/create-api-request.d.ts +10 -0
- package/dist/types/libs/create-logger.d.ts +9 -0
- package/dist/types/libs/create-sentry-instrument.d.ts +9 -0
- package/dist/types/libs/index.d.ts +10 -0
- package/dist/types/providers/SPAThemeProvider.d.ts +11 -0
- package/dist/types/providers/ThemeProvider.d.ts +9 -0
- package/dist/types/providers/index.d.ts +2 -0
- package/dist/types/stories/persian.d.ts +81 -0
- package/dist/types/types/axios.d.ts +8 -0
- package/dist/types/types/color.d.ts +38 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/types/types/material-react-table-types.d.ts +2 -0
- package/dist/types/types/mui-types.d.ts +2 -0
- package/dist/types/types/services.d.ts +26 -0
- package/dist/types/types/typography.d.ts +62 -0
- package/dist/types/types/window.d.ts +135 -0
- package/dist/types/utils/checkUser.d.ts +1 -0
- package/dist/types/utils/convertRialToToman.d.ts +7 -0
- package/dist/types/utils/createQueryParams.d.ts +3 -0
- package/dist/types/utils/dateHelpers.d.ts +19 -0
- package/dist/types/utils/delay.d.ts +1 -0
- package/dist/types/utils/formatPersianNumber.d.ts +1 -0
- package/dist/types/utils/getClaims.d.ts +11 -0
- package/dist/types/utils/index.d.ts +17 -0
- package/dist/types/utils/injastStyled.d.ts +2 -0
- package/dist/types/utils/postToParent.d.ts +2 -0
- package/dist/types/utils/toLatinDigit.d.ts +1 -0
- package/dist/utils/index.js +256 -0
- package/package.json +159 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Persian (Farsi) copy for Storybook component stories.
|
|
3
|
+
*/
|
|
4
|
+
export declare const persian: {
|
|
5
|
+
readonly submit: "ثبت";
|
|
6
|
+
readonly cancel: "انصراف";
|
|
7
|
+
readonly confirm: "تأیید";
|
|
8
|
+
readonly delete: "حذف";
|
|
9
|
+
readonly edit: "ویرایش";
|
|
10
|
+
readonly save: "ذخیره";
|
|
11
|
+
readonly close: "بستن";
|
|
12
|
+
readonly open: "باز کردن";
|
|
13
|
+
readonly next: "بعدی";
|
|
14
|
+
readonly back: "برگشت";
|
|
15
|
+
readonly placeholder: "متن خود را وارد کنید";
|
|
16
|
+
readonly name: "نام";
|
|
17
|
+
readonly namePlaceholder: "نام خود را وارد کنید";
|
|
18
|
+
readonly email: "ایمیل";
|
|
19
|
+
readonly emailPlaceholder: "example@email.com";
|
|
20
|
+
readonly phone: "شماره تماس";
|
|
21
|
+
readonly selectDate: "انتخاب تاریخ";
|
|
22
|
+
readonly search: "جستجو";
|
|
23
|
+
readonly searchPlaceholder: "جستجو کنید...";
|
|
24
|
+
readonly loading: "در حال بارگذاری...";
|
|
25
|
+
readonly noResults: "نتیجهای یافت نشد";
|
|
26
|
+
readonly optional: "اختیاری";
|
|
27
|
+
readonly required: "الزامی";
|
|
28
|
+
readonly button: "دکمه";
|
|
29
|
+
readonly textField: "فیلد متنی";
|
|
30
|
+
readonly typography: "تایپوگرافی";
|
|
31
|
+
readonly accordion: "آکاردئون";
|
|
32
|
+
readonly modal: "مودال";
|
|
33
|
+
readonly checkbox: "چکباکس";
|
|
34
|
+
readonly radio: "رادیو";
|
|
35
|
+
readonly select: "انتخابگر";
|
|
36
|
+
readonly slider: "اسلایدر";
|
|
37
|
+
readonly progressBar: "نوار پیشرفت";
|
|
38
|
+
readonly skeleton: "اسکلتون";
|
|
39
|
+
readonly toast: "اعلان";
|
|
40
|
+
readonly toggle: "سوییچ";
|
|
41
|
+
readonly divider: "جداکننده";
|
|
42
|
+
readonly list: "لیست";
|
|
43
|
+
readonly listItem: "آیتم لیست";
|
|
44
|
+
readonly stepper: "مرحلهنما";
|
|
45
|
+
readonly step: "مرحله";
|
|
46
|
+
readonly tab: "تب";
|
|
47
|
+
readonly drawer: "کشو";
|
|
48
|
+
readonly dialog: "دیالوگ";
|
|
49
|
+
readonly fab: "دکمه شناور";
|
|
50
|
+
readonly iconButton: "دکمه آیکون";
|
|
51
|
+
readonly container: "کانتینر";
|
|
52
|
+
readonly box: "جعبه";
|
|
53
|
+
readonly grid: "گرید";
|
|
54
|
+
readonly image: "تصویر";
|
|
55
|
+
readonly pagination: "صفحهبندی";
|
|
56
|
+
readonly autocomplete: "خودکامل";
|
|
57
|
+
readonly formControl: "کنترل فرم";
|
|
58
|
+
readonly inputLabel: "برچسب ورودی";
|
|
59
|
+
readonly formControlLabel: "برچسب کنترل فرم";
|
|
60
|
+
readonly radioGroup: "گروه رادیو";
|
|
61
|
+
readonly menuItem: "آیتم منو";
|
|
62
|
+
readonly stepLabel: "برچسب مرحله";
|
|
63
|
+
readonly stepContent: "محتوای مرحله";
|
|
64
|
+
readonly stepConnector: "اتصالدهنده مرحله";
|
|
65
|
+
readonly accordionSummary: "خلاصه آکاردئون";
|
|
66
|
+
readonly accordionDetails: "جزئیات آکاردئون";
|
|
67
|
+
readonly loadingModal: "مودال بارگذاری";
|
|
68
|
+
readonly numberInput: "ورودی عدد";
|
|
69
|
+
readonly counterBoxInput: "ورودی شمارنده";
|
|
70
|
+
readonly cardNumberInput: "ورودی شماره کارت";
|
|
71
|
+
readonly otpInput: "ورودی کد یکبار مصرف";
|
|
72
|
+
readonly mobileDatePicker: "انتخابگر تاریخ موبایل";
|
|
73
|
+
readonly circularProgress: "پیشرفت دایرهای";
|
|
74
|
+
readonly svgIcon: "آیکون";
|
|
75
|
+
readonly components: "اجزا";
|
|
76
|
+
readonly defaultStory: "پیشفرض";
|
|
77
|
+
readonly variants: "حالتها";
|
|
78
|
+
readonly sizes: "اندازهها";
|
|
79
|
+
readonly disabled: "غیرفعال";
|
|
80
|
+
readonly withLoading: "با بارگذاری";
|
|
81
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface ColorShades {
|
|
2
|
+
50?: string;
|
|
3
|
+
100?: string;
|
|
4
|
+
200?: string;
|
|
5
|
+
300?: string;
|
|
6
|
+
400?: string;
|
|
7
|
+
500?: string;
|
|
8
|
+
600?: string;
|
|
9
|
+
700?: string;
|
|
10
|
+
800?: string;
|
|
11
|
+
900?: string;
|
|
12
|
+
transparent?: string;
|
|
13
|
+
main: string;
|
|
14
|
+
light: string;
|
|
15
|
+
dark: string;
|
|
16
|
+
contrastText?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AppColors {
|
|
19
|
+
primary: ColorShades;
|
|
20
|
+
secondary: ColorShades;
|
|
21
|
+
}
|
|
22
|
+
export interface DefaultColors {
|
|
23
|
+
neutral: ColorShades;
|
|
24
|
+
success: ColorShades;
|
|
25
|
+
danger: ColorShades;
|
|
26
|
+
warning: ColorShades;
|
|
27
|
+
info: ColorShades;
|
|
28
|
+
yellow: ColorShades;
|
|
29
|
+
red: ColorShades;
|
|
30
|
+
indigo: ColorShades;
|
|
31
|
+
cyan: ColorShades;
|
|
32
|
+
pink: ColorShades;
|
|
33
|
+
orange: ColorShades;
|
|
34
|
+
magenta: ColorShades;
|
|
35
|
+
blue: ColorShades;
|
|
36
|
+
teal: ColorShades;
|
|
37
|
+
}
|
|
38
|
+
export type CorePalette = AppColors & DefaultColors;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { DropdownOption, LiteralUnion, MRT_ActionMenuItemProps, MRT_AggregationFn, MRT_AggregationOption, MRT_BottomToolbarProps, MRT_Cell, MRT_Column, MRT_ColumnActionMenuProps, MRT_ColumnDef, MRT_ColumnFilterFnsState, MRT_ColumnFiltersState, MRT_ColumnHelper, MRT_ColumnOrderState, MRT_ColumnPinningButtonsProps, MRT_ColumnPinningState, MRT_ColumnSizingInfoState, MRT_ColumnSizingState, MRT_ColumnVirtualizer, MRT_CopyButtonProps, MRT_DefinedColumnDef, MRT_DefinedTableOptions, MRT_DensityState, MRT_DisplayColumnDef, MRT_DisplayColumnIds, MRT_EditActionButtonsProps, MRT_EditCellTextFieldProps, MRT_EditRowModalProps, MRT_ExpandAllButtonProps, MRT_ExpandButtonProps, MRT_ExpandedState, MRT_FilterCheckboxProps, MRT_FilterFn, MRT_FilterOption, MRT_FilterOptionMenuProps, MRT_FilterRangeFieldsProps, MRT_FilterRangeSliderProps, MRT_FilterTextFieldProps, MRT_GlobalFilterTextFieldProps, MRT_GrabHandleButtonProps, MRT_GroupColumnDef, MRT_GroupingState, MRT_Header, MRT_HeaderGroup, MRT_Icons, MRT_InternalFilterOption, MRT_LinearProgressBarProps, MRT_Localization, MRT_PaginationState, MRT_Row, MRT_RowActionMenuProps, MRT_RowData, MRT_RowModel, MRT_RowPinButtonProps, MRT_RowSelectionState, MRT_RowVirtualizer, MRT_SelectCheckboxProps, MRT_ShowHideColumnsButtonProps, MRT_ShowHideColumnsMenuItemsProps, MRT_ShowHideColumnsMenuProps, MRT_SortingFn, MRT_SortingOption, MRT_SortingState, MRT_StatefulTableOptions, MRT_TableBodyCellProps, MRT_TableBodyCellValueProps, MRT_TableBodyProps, MRT_TableBodyRowGrabHandleProps, MRT_TableBodyRowPinButtonProps, MRT_TableBodyRowProps, MRT_TableContainerProps, MRT_TableDetailPanelProps, MRT_TableFooterCellProps, MRT_TableFooterProps, MRT_TableFooterRowProps, MRT_TableHeadCellColumnActionsButtonProps, MRT_TableHeadCellFilterContainerProps, MRT_TableHeadCellFilterLabelProps, MRT_TableHeadCellGrabHandleProps, MRT_TableHeadCellProps, MRT_TableHeadCellResizeHandleProps, MRT_TableHeadCellSortLabelProps, MRT_TableHeadProps, MRT_TableHeadRowProps, MRT_TableInstance, MRT_TableLoadingOverlayProps, MRT_TableOptions, MRT_TablePaginationProps, MRT_TablePaperProps, MRT_TableProps, MRT_TableState, MRT_Theme, MRT_ToggleDensePaddingButtonProps, MRT_ToggleFiltersButtonProps, MRT_ToggleFullScreenButtonProps, MRT_ToggleGlobalFilterButtonProps, MRT_ToggleRowActionMenuButtonProps, MRT_ToolbarAlertBannerProps, MRT_ToolbarDropZoneProps, MRT_ToolbarInternalButtonsProps, MRT_TopToolbarProps, MRT_Updater, MRT_VirtualItem, MRT_VirtualizerOptions, MRT_VisibilityState, MaterialReactTableProps, Prettify, Xor } from "material-react-table";
|
|
2
|
+
export type { DropdownOption, LiteralUnion, MRT_ActionMenuItemProps, MRT_AggregationFn, MRT_AggregationOption, MRT_BottomToolbarProps, MRT_Cell, MRT_Column, MRT_ColumnActionMenuProps, MRT_ColumnDef, MRT_ColumnFilterFnsState, MRT_ColumnFiltersState, MRT_ColumnHelper, MRT_ColumnOrderState, MRT_ColumnPinningButtonsProps, MRT_ColumnPinningState, MRT_ColumnSizingInfoState, MRT_ColumnSizingState, MRT_ColumnVirtualizer, MRT_CopyButtonProps, MRT_DefinedColumnDef, MRT_DefinedTableOptions, MRT_DensityState, MRT_DisplayColumnDef, MRT_DisplayColumnIds, MRT_EditActionButtonsProps, MRT_EditCellTextFieldProps, MRT_EditRowModalProps, MRT_ExpandAllButtonProps, MRT_ExpandButtonProps, MRT_ExpandedState, MRT_FilterCheckboxProps, MRT_FilterFn, MRT_FilterOption, MRT_FilterOptionMenuProps, MRT_FilterRangeFieldsProps, MRT_FilterRangeSliderProps, MRT_FilterTextFieldProps, MRT_GlobalFilterTextFieldProps, MRT_GrabHandleButtonProps, MRT_GroupColumnDef, MRT_GroupingState, MRT_Header, MRT_HeaderGroup, MRT_Icons, MRT_InternalFilterOption, MRT_LinearProgressBarProps, MRT_Localization, MRT_PaginationState, MRT_Row, MRT_RowActionMenuProps, MRT_RowData, MRT_RowModel, MRT_RowPinButtonProps, MRT_RowSelectionState, MRT_RowVirtualizer, MRT_SelectCheckboxProps, MRT_ShowHideColumnsButtonProps, MRT_ShowHideColumnsMenuItemsProps, MRT_ShowHideColumnsMenuProps, MRT_SortingFn, MRT_SortingOption, MRT_SortingState, MRT_StatefulTableOptions, MRT_TableBodyCellProps, MRT_TableBodyCellValueProps, MRT_TableBodyProps, MRT_TableBodyRowGrabHandleProps, MRT_TableBodyRowPinButtonProps, MRT_TableBodyRowProps, MRT_TableContainerProps, MRT_TableDetailPanelProps, MRT_TableFooterCellProps, MRT_TableFooterProps, MRT_TableFooterRowProps, MRT_TableHeadCellColumnActionsButtonProps, MRT_TableHeadCellFilterContainerProps, MRT_TableHeadCellFilterLabelProps, MRT_TableHeadCellGrabHandleProps, MRT_TableHeadCellProps, MRT_TableHeadCellResizeHandleProps, MRT_TableHeadCellSortLabelProps, MRT_TableHeadProps, MRT_TableHeadRowProps, MRT_TableInstance, MRT_TableLoadingOverlayProps, MRT_TableOptions, MRT_TablePaginationProps, MRT_TablePaperProps, MRT_TableProps, MRT_TableState, MRT_Theme, MRT_ToggleDensePaddingButtonProps, MRT_ToggleFiltersButtonProps, MRT_ToggleFullScreenButtonProps, MRT_ToggleGlobalFilterButtonProps, MRT_ToggleRowActionMenuButtonProps, MRT_ToolbarAlertBannerProps, MRT_ToolbarDropZoneProps, MRT_ToolbarInternalButtonsProps, MRT_TopToolbarProps, MRT_Updater, MRT_VirtualItem, MRT_VirtualizerOptions, MRT_VisibilityState, MaterialReactTableProps, Prettify, Xor, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type QueryParamsObj = {
|
|
2
|
+
[key: string]: string | number | undefined;
|
|
3
|
+
};
|
|
4
|
+
export type ApiResponse<T> = {
|
|
5
|
+
meta: {
|
|
6
|
+
success: boolean;
|
|
7
|
+
pagination: {
|
|
8
|
+
current_page: number;
|
|
9
|
+
total_items: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
data: T;
|
|
13
|
+
};
|
|
14
|
+
export type ErrorFields = {
|
|
15
|
+
field: string;
|
|
16
|
+
message: string;
|
|
17
|
+
}[];
|
|
18
|
+
export type ErrorData = {
|
|
19
|
+
meta: {
|
|
20
|
+
success: boolean;
|
|
21
|
+
error_fields: ErrorFields;
|
|
22
|
+
error_code: string;
|
|
23
|
+
};
|
|
24
|
+
message: string;
|
|
25
|
+
error_status: number;
|
|
26
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import "@mui/material/styles";
|
|
2
|
+
declare module "@mui/material/styles" {
|
|
3
|
+
interface TypographyVariants {
|
|
4
|
+
display1: React.CSSProperties;
|
|
5
|
+
display2: React.CSSProperties;
|
|
6
|
+
display3: React.CSSProperties;
|
|
7
|
+
title1: React.CSSProperties;
|
|
8
|
+
title2: React.CSSProperties;
|
|
9
|
+
title3: React.CSSProperties;
|
|
10
|
+
title4: React.CSSProperties;
|
|
11
|
+
input1: React.CSSProperties;
|
|
12
|
+
input2: React.CSSProperties;
|
|
13
|
+
input3: React.CSSProperties;
|
|
14
|
+
button1: React.CSSProperties;
|
|
15
|
+
button2: React.CSSProperties;
|
|
16
|
+
button3: React.CSSProperties;
|
|
17
|
+
body1: React.CSSProperties;
|
|
18
|
+
body2: React.CSSProperties;
|
|
19
|
+
label1: React.CSSProperties;
|
|
20
|
+
label2: React.CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
interface TypographyVariantsOptions {
|
|
23
|
+
display1: React.CSSProperties;
|
|
24
|
+
display2: React.CSSProperties;
|
|
25
|
+
display3: React.CSSProperties;
|
|
26
|
+
title1: React.CSSProperties;
|
|
27
|
+
title2: React.CSSProperties;
|
|
28
|
+
title3: React.CSSProperties;
|
|
29
|
+
title4: React.CSSProperties;
|
|
30
|
+
input1: React.CSSProperties;
|
|
31
|
+
input2: React.CSSProperties;
|
|
32
|
+
input3: React.CSSProperties;
|
|
33
|
+
button1: React.CSSProperties;
|
|
34
|
+
button2: React.CSSProperties;
|
|
35
|
+
button3: React.CSSProperties;
|
|
36
|
+
body1: React.CSSProperties;
|
|
37
|
+
body2: React.CSSProperties;
|
|
38
|
+
label1: React.CSSProperties;
|
|
39
|
+
label2: React.CSSProperties;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
declare module "@mui/material/Typography" {
|
|
43
|
+
interface TypographyPropsVariantOverrides {
|
|
44
|
+
display1: true;
|
|
45
|
+
display2: true;
|
|
46
|
+
display3: true;
|
|
47
|
+
title1: true;
|
|
48
|
+
title2: true;
|
|
49
|
+
title3: true;
|
|
50
|
+
title4: true;
|
|
51
|
+
input1: true;
|
|
52
|
+
input2: true;
|
|
53
|
+
input3: true;
|
|
54
|
+
button1: true;
|
|
55
|
+
button2: true;
|
|
56
|
+
button3: true;
|
|
57
|
+
body1: true;
|
|
58
|
+
body2: true;
|
|
59
|
+
label1: true;
|
|
60
|
+
label2: true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export interface DeviceInfo {
|
|
2
|
+
deviceModel?: string;
|
|
3
|
+
manufacture?: string;
|
|
4
|
+
osName?: string;
|
|
5
|
+
osVersion?: string;
|
|
6
|
+
displaySize?: string;
|
|
7
|
+
deviceId?: string;
|
|
8
|
+
appVersion?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare enum Permissions {
|
|
11
|
+
Camera = 2000,
|
|
12
|
+
Contact = 2010,
|
|
13
|
+
Audio = 2020,
|
|
14
|
+
Location = 2030
|
|
15
|
+
}
|
|
16
|
+
export type AndroidPageName = "apg" | "payment-method" | "cash-in" | "cash-out" | "ul" | "events" | "profile";
|
|
17
|
+
export type PermissionsArray = Permissions[];
|
|
18
|
+
declare global {
|
|
19
|
+
interface OTPCredential extends Credential {
|
|
20
|
+
code: string;
|
|
21
|
+
}
|
|
22
|
+
interface OTPCredentialRequestOptions {
|
|
23
|
+
transport: string[];
|
|
24
|
+
}
|
|
25
|
+
interface CredentialsContainer {
|
|
26
|
+
get(options: CredentialRequestOptions & {
|
|
27
|
+
otp: OTPCredentialRequestOptions;
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
}): Promise<OTPCredential | null>;
|
|
30
|
+
}
|
|
31
|
+
interface Window {
|
|
32
|
+
injast_web_app: {
|
|
33
|
+
setToken?: (t: string) => void;
|
|
34
|
+
setSessionId?: (sessionId: string) => void;
|
|
35
|
+
setRefreshToken?: (rt: string) => void;
|
|
36
|
+
setRecordingPermissions?: (hasPermission: boolean) => void;
|
|
37
|
+
onFileSelected?: (base64String: string, fileName?: string) => void;
|
|
38
|
+
setDeviceInfo?: (deviceInfo: DeviceInfo) => void;
|
|
39
|
+
setPermissions?: (permissions: PermissionsArray) => void;
|
|
40
|
+
};
|
|
41
|
+
injast_android_app: {
|
|
42
|
+
authenticate: () => string;
|
|
43
|
+
getFakeData: () => string;
|
|
44
|
+
closeWebView: () => void;
|
|
45
|
+
getSessionId: () => string;
|
|
46
|
+
navigateTo: (pageName: AndroidPageName, params?: string) => void;
|
|
47
|
+
redirect: (url: string) => void;
|
|
48
|
+
getRecordingPermissions: () => boolean;
|
|
49
|
+
chooseFile: () => void;
|
|
50
|
+
logout: () => void;
|
|
51
|
+
postToken: (body: string) => void;
|
|
52
|
+
getRefreshToken: () => string;
|
|
53
|
+
emailSupport: (email: string) => void;
|
|
54
|
+
callSupport: (phoneNumber: string) => void;
|
|
55
|
+
whatsappSupport: (phoneNumber: string) => void;
|
|
56
|
+
shareContent: (content: string) => void;
|
|
57
|
+
downloadPdf?: (url: string, fileName: string) => void;
|
|
58
|
+
saveSessionId: (sessionId: string) => void;
|
|
59
|
+
};
|
|
60
|
+
webkit: {
|
|
61
|
+
messageHandlers: {
|
|
62
|
+
closeWebView: {
|
|
63
|
+
postMessage: (emptyString: string) => void;
|
|
64
|
+
};
|
|
65
|
+
getToken: {
|
|
66
|
+
postMessage: (emptyString: string) => void;
|
|
67
|
+
};
|
|
68
|
+
getSessionId: {
|
|
69
|
+
postMessage: (emptyString: string) => void;
|
|
70
|
+
};
|
|
71
|
+
getRefreshToken: {
|
|
72
|
+
postMessage: (emptyString: string) => void;
|
|
73
|
+
};
|
|
74
|
+
getDeviceInfo: {
|
|
75
|
+
postMessage: (emptyString: string) => void;
|
|
76
|
+
};
|
|
77
|
+
getPermissions: {
|
|
78
|
+
postMessage: (emptyString: string) => void;
|
|
79
|
+
};
|
|
80
|
+
logout: {
|
|
81
|
+
postMessage: (emptyString: string) => void;
|
|
82
|
+
};
|
|
83
|
+
navigateTo: {
|
|
84
|
+
postMessage: (pageName: AndroidPageName, params: string) => void;
|
|
85
|
+
};
|
|
86
|
+
getRecordingPermissions: {
|
|
87
|
+
postMessage: (emptyString: string) => void;
|
|
88
|
+
};
|
|
89
|
+
chooseFile: {
|
|
90
|
+
postMessage: (emptyString: string) => void;
|
|
91
|
+
};
|
|
92
|
+
consoleLog: {
|
|
93
|
+
postMessage: (message: string) => void;
|
|
94
|
+
};
|
|
95
|
+
emailSupport: {
|
|
96
|
+
postMessage: (email: string) => void;
|
|
97
|
+
};
|
|
98
|
+
callSupport: {
|
|
99
|
+
postMessage: (phoneNumber: string) => void;
|
|
100
|
+
};
|
|
101
|
+
whatsappSupport: {
|
|
102
|
+
postMessage: (phoneNumber: string) => void;
|
|
103
|
+
};
|
|
104
|
+
shareContent: {
|
|
105
|
+
postMessage: (content: string) => void;
|
|
106
|
+
};
|
|
107
|
+
saveSessionId: {
|
|
108
|
+
postMessage: (sessionId: string) => void;
|
|
109
|
+
};
|
|
110
|
+
postToken: {
|
|
111
|
+
postMessage: (body: string) => void;
|
|
112
|
+
};
|
|
113
|
+
downloadPdf?: {
|
|
114
|
+
postMessage: (payload: {
|
|
115
|
+
url: string;
|
|
116
|
+
fileName: string;
|
|
117
|
+
}) => void;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export type IframeMessages = {
|
|
124
|
+
type: "CLOSE_IFRAME";
|
|
125
|
+
payload?: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "LOG_MESSAGE";
|
|
128
|
+
payload: string;
|
|
129
|
+
} | {
|
|
130
|
+
type: "NAVIGATE_TO";
|
|
131
|
+
payload: {
|
|
132
|
+
url: string;
|
|
133
|
+
params?: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkUser(): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts an amount in Rial to Toman without mutating the input state.
|
|
3
|
+
* @param {number|string} input - The amount in Rial (can be a number or string).
|
|
4
|
+
* @returns {number} - The converted amount in Toman.
|
|
5
|
+
*/
|
|
6
|
+
declare function convertRialToToman(input: string | number): number;
|
|
7
|
+
export default convertRialToToman;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function gregorianToJalali(dateString: string): string;
|
|
2
|
+
export declare function jalaliToGregorian(dateString: string): string;
|
|
3
|
+
export declare const shortDateFormat: (timestamp: number | string) => string;
|
|
4
|
+
export declare const longDateFormat: (timestamp: number, separator?: string) => string;
|
|
5
|
+
export declare const longFormatInWords: (timestamp: number | string, options?: {
|
|
6
|
+
dayInWord: boolean;
|
|
7
|
+
monthInWord: boolean;
|
|
8
|
+
yearInWord: boolean;
|
|
9
|
+
showTime: boolean;
|
|
10
|
+
showSeconds: boolean;
|
|
11
|
+
separator: string;
|
|
12
|
+
}) => string;
|
|
13
|
+
export declare function getPersianYMD(date: Date): {
|
|
14
|
+
year: number;
|
|
15
|
+
month: number;
|
|
16
|
+
day: number;
|
|
17
|
+
};
|
|
18
|
+
/** Convert Jalali (y, m, d) to JS Date (UTC). Exported for building min/max date from year. */
|
|
19
|
+
export declare function jalaliToDateUTC(jy: number, jm: number, jd: number): Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function delay(ms: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatPersianNumber(num: string | number): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { styled } from "./injastStyled";
|
|
2
|
+
export { default as delay } from "./delay";
|
|
3
|
+
export { shortDateFormat } from "./dateHelpers";
|
|
4
|
+
export { longDateFormat } from "./dateHelpers";
|
|
5
|
+
export { longFormatInWords } from "./dateHelpers";
|
|
6
|
+
export { gregorianToJalali } from "./dateHelpers";
|
|
7
|
+
export { jalaliToGregorian } from "./dateHelpers";
|
|
8
|
+
export { createQueryParams } from "./createQueryParams";
|
|
9
|
+
export { default as convertRialToToman } from "./convertRialToToman";
|
|
10
|
+
export { getClaims } from "./getClaims";
|
|
11
|
+
export { checkUser } from "./checkUser";
|
|
12
|
+
export { faIR as coreFaIR } from "@mui/material/locale";
|
|
13
|
+
export { formatPersianNumber } from "./formatPersianNumber";
|
|
14
|
+
export { toLatinDigits } from "./toLatinDigit";
|
|
15
|
+
export { postToParent } from "./postToParent";
|
|
16
|
+
export { jalaliToDateUTC } from "./dateHelpers";
|
|
17
|
+
export { getPersianYMD } from "./dateHelpers";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toLatinDigits: (input: string | number) => string;
|