@dadehkav/ui 0.0.1
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 +123 -0
- package/dist/App.d.ts +2 -0
- package/dist/components/Buttons/ClearableSubmitButton/index.d.ts +14 -0
- package/dist/components/Buttons/CollapseButton/index.d.ts +4 -0
- package/dist/components/Buttons/ConfirmButton/index.d.ts +11 -0
- package/dist/components/Buttons/SimpleButton/index.d.ts +17 -0
- package/dist/components/Buttons/StepperSubmitButton/index.d.ts +12 -0
- package/dist/components/Buttons/SubmitButton/index.d.ts +7 -0
- package/dist/components/Buttons/XButton/index.d.ts +8 -0
- package/dist/components/Card/index.d.ts +14 -0
- package/dist/components/Divider/LinearDivider/index.d.ts +11 -0
- package/dist/components/Divider/SectionDivider/index.d.ts +12 -0
- package/dist/components/FilePreview/index.d.ts +8 -0
- package/dist/components/Form/Checkbox/index.d.ts +9 -0
- package/dist/components/Form/DatePicker/index.d.ts +21 -0
- package/dist/components/Form/DropZone/index.d.ts +17 -0
- package/dist/components/Form/FieldArray/index.d.ts +19 -0
- package/dist/components/Form/FieldLabel/index.d.ts +11 -0
- package/dist/components/Form/FormField/index.d.ts +19 -0
- package/dist/components/Form/Formik/index.d.ts +14 -0
- package/dist/components/Form/SelectOption/BasicSelectOption/index.d.ts +23 -0
- package/dist/components/Form/SelectOption/MultiSelectOption/index.d.ts +26 -0
- package/dist/components/Form/TextArea/index.d.ts +22 -0
- package/dist/components/Form/TextInput/index.d.ts +28 -0
- package/dist/components/Form/Toggle/index.d.ts +5 -0
- package/dist/components/Icons/Components/ArrowLeft/index.d.ts +4 -0
- package/dist/components/Icons/Components/ArrowRight.tsx/index.d.ts +4 -0
- package/dist/components/Icons/Components/ChevronLeft/index.d.ts +4 -0
- package/dist/components/Icons/Components/ChevronRight/index.d.ts +4 -0
- package/dist/components/Icons/Components/Info/index.d.ts +4 -0
- package/dist/components/Icons/Components/Search/index.d.ts +4 -0
- package/dist/components/Icons/Components/X/index.d.ts +4 -0
- package/dist/components/Icons/index.d.ts +10 -0
- package/dist/components/InfoPopover/index.d.ts +9 -0
- package/dist/components/Layout/Grid/index.d.ts +14 -0
- package/dist/components/ListGridDetails/AdvanceListGridDetails/index.d.ts +12 -0
- package/dist/components/ListGridDetails/SimpleListGridDetails/index.d.ts +11 -0
- package/dist/components/Loading/DotLoader/index.d.ts +9 -0
- package/dist/components/Loading/Loader/index.d.ts +13 -0
- package/dist/components/Modal/index.d.ts +24 -0
- package/dist/components/NotFoundData/index.d.ts +12 -0
- package/dist/components/OverlayLoading/index.d.ts +8 -0
- package/dist/components/SimpleToggle/index.d.ts +17 -0
- package/dist/components/SweetAlert/index.d.ts +14 -0
- package/dist/components/Table/MergeTable/index.d.ts +28 -0
- package/dist/components/Table/SplitHeader/index.d.ts +19 -0
- package/dist/components/Table/Table/index.d.ts +23 -0
- package/dist/components/Timeline/index.d.ts +17 -0
- package/dist/components/ToggleWithContent/index.d.ts +15 -0
- package/dist/core/enums/Icon.enum.d.ts +9 -0
- package/dist/core/types/enum.model.d.ts +4 -0
- package/dist/core/types/icon.model.d.ts +6 -0
- package/dist/core/types/option.model.d.ts +4 -0
- package/dist/core/types/react-strap.model.d.ts +2 -0
- package/dist/core/types/table.model.d.ts +6 -0
- package/dist/core/utils/append-form-data.d.ts +10 -0
- package/dist/core/utils/calculate-sum-key-of-array.d.ts +12 -0
- package/dist/core/utils/convert-digits.d.ts +2 -0
- package/dist/core/utils/convert.d.ts +7 -0
- package/dist/core/utils/create-cell.d.ts +4 -0
- package/dist/core/utils/date-helper.d.ts +22 -0
- package/dist/core/utils/duplicate.d.ts +11 -0
- package/dist/core/utils/english-to-persian-number.d.ts +1 -0
- package/dist/core/utils/enum.d.ts +1 -0
- package/dist/core/utils/file.d.ts +4 -0
- package/dist/core/utils/filter-object.d.ts +3 -0
- package/dist/core/utils/find-by-key.d.ts +1 -0
- package/dist/core/utils/format-value.d.ts +2 -0
- package/dist/core/utils/generate-id.d.ts +4 -0
- package/dist/core/utils/generate-year-options.d.ts +2 -0
- package/dist/core/utils/get-file-postfix.d.ts +1 -0
- package/dist/core/utils/get-icon-component.d.ts +3 -0
- package/dist/core/utils/get-numeric-enum-values.d.ts +1 -0
- package/dist/core/utils/get-values-from-array.d.ts +18 -0
- package/dist/core/utils/join-with-separator.d.ts +1 -0
- package/dist/core/utils/lazy-with-retry.d.ts +7 -0
- package/dist/core/utils/money.d.ts +10 -0
- package/dist/core/utils/option.d.ts +19 -0
- package/dist/core/utils/regex.d.ts +13 -0
- package/dist/core/utils/scroll.d.ts +6 -0
- package/dist/core/utils/serve-file.d.ts +4 -0
- package/dist/core/utils/shift-map-indexes.d.ts +1 -0
- package/dist/core/utils/show-toast.d.ts +17 -0
- package/dist/core/utils/string-shorter.d.ts +1 -0
- package/dist/core/utils/to-query-string.d.ts +1 -0
- package/dist/core/utils/touch-all-fields-with-errors.d.ts +1 -0
- package/dist/core/utils/update-or-add-list.d.ts +3 -0
- package/dist/core/utils/url.d.ts +4 -0
- package/dist/core/utils/useSafeFormikContext.d.ts +6 -0
- package/dist/core/utils/validation.d.ts +3 -0
- package/dist/index.cjs +390 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.es.js +39281 -0
- package/dist/main.d.ts +0 -0
- package/dist/ui.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
dismissible?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const NotFoundData: FC<IProps>;
|
|
12
|
+
export { NotFoundData };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeEvent, FC } from 'react';
|
|
2
|
+
type Size = "sm" | "lg";
|
|
3
|
+
export interface ISimpleToggleProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
size?: Size;
|
|
7
|
+
labelText?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
novalidate?: boolean;
|
|
11
|
+
value: boolean;
|
|
12
|
+
defaultChecked?: boolean;
|
|
13
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
direction?: "ltr" | "rtl";
|
|
15
|
+
}
|
|
16
|
+
declare const SimpleToggle: FC<ISimpleToggleProps>;
|
|
17
|
+
export { SimpleToggle };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SweetAlertIcon } from 'sweetalert2';
|
|
3
|
+
export interface ISweetAlertProps {
|
|
4
|
+
title: string;
|
|
5
|
+
show: boolean;
|
|
6
|
+
icon?: SweetAlertIcon;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onCancel: () => void;
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const SweetAlert: ({ title, show, icon, onConfirm, onClose, onCancel, loading, content, }: ISweetAlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { SweetAlert };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
export type TProps<TData extends Record<string, any>, TMeta extends object = {}> = {
|
|
4
|
+
data: TData[];
|
|
5
|
+
columns: ColumnDef<TData, any>[];
|
|
6
|
+
mergeKeys?: (keyof TData)[];
|
|
7
|
+
meta?: TMeta;
|
|
8
|
+
showRowNumber?: boolean;
|
|
9
|
+
mergeRowNumberBy?: keyof TData;
|
|
10
|
+
mergeVirtualColumns?: {
|
|
11
|
+
[columnId: string]: (row: TData, rowIndex: number) => string | number;
|
|
12
|
+
};
|
|
13
|
+
primaryMergeKey?: keyof TData;
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
pageCount?: number;
|
|
16
|
+
initialPage?: number;
|
|
17
|
+
onPageChange?: (page: number) => void;
|
|
18
|
+
enableRowSelection?: boolean;
|
|
19
|
+
rowKey?: keyof TData;
|
|
20
|
+
defaultSelectedRows?: TData[];
|
|
21
|
+
onSelectionChange?: (rows: TData[]) => void;
|
|
22
|
+
isRowSelectionDisabled?: (row: TData) => boolean;
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
getRowStyle?: (row: TData) => CSSProperties;
|
|
25
|
+
getRowClassName?: (row: TData) => string;
|
|
26
|
+
hasGroupedColumn?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare function MergeTable<TData extends Record<string, any>, TMeta extends object = {}>(props: TProps<TData, TMeta>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface IProps {
|
|
4
|
+
title: string;
|
|
5
|
+
subLabels: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const SplitHeader: FC<IProps>;
|
|
8
|
+
export declare function createGroupedColumn<T extends object>(config: {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
subColumns: {
|
|
12
|
+
key: keyof T;
|
|
13
|
+
header?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
accessorFn?: (row: T) => any;
|
|
16
|
+
size?: number;
|
|
17
|
+
}[];
|
|
18
|
+
}): ColumnDef<T>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
type TProps<TData, TMeta extends object = {}> = {
|
|
4
|
+
data: TData[];
|
|
5
|
+
columns: ColumnDef<TData, any>[];
|
|
6
|
+
meta?: TMeta;
|
|
7
|
+
showRowNumber?: boolean;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
pageCount?: number;
|
|
10
|
+
initialPage?: number;
|
|
11
|
+
onPageChange?: (page: number) => void;
|
|
12
|
+
enableRowSelection?: boolean;
|
|
13
|
+
rowKey?: keyof TData;
|
|
14
|
+
defaultSelectedRows?: TData[];
|
|
15
|
+
onSelectionChange?: (rows: TData[]) => void;
|
|
16
|
+
isRowSelectionDisabled?: (row: TData) => boolean;
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
getRowStyle?: (row: TData) => CSSProperties;
|
|
19
|
+
getRowClassName?: (row: TData) => string;
|
|
20
|
+
hasGroupedColumn?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function Table<TData, TMeta extends object = {}>(props: TProps<TData, TMeta>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementType, FC, ReactNode } from 'react';
|
|
2
|
+
type TTimelineItem = {
|
|
3
|
+
tag?: ElementType;
|
|
4
|
+
title: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
meta?: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
customContent?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
interface IProps {
|
|
12
|
+
data: TTimelineItem[];
|
|
13
|
+
className?: string;
|
|
14
|
+
tag?: ElementType;
|
|
15
|
+
}
|
|
16
|
+
declare const Timeline: FC<IProps>;
|
|
17
|
+
export { Timeline };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, JSX } from 'react';
|
|
2
|
+
import { ISimpleToggleProps } from '../SimpleToggle';
|
|
3
|
+
interface BaseProps extends ISimpleToggleProps {
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
noForm?: boolean;
|
|
6
|
+
}
|
|
7
|
+
type TProps = (Omit<BaseProps, "onChange"> & {
|
|
8
|
+
noForm?: false;
|
|
9
|
+
onChange?: ISimpleToggleProps["onChange"];
|
|
10
|
+
}) | (Omit<BaseProps, "onChange"> & {
|
|
11
|
+
noForm: true;
|
|
12
|
+
onChange: ISimpleToggleProps["onChange"];
|
|
13
|
+
});
|
|
14
|
+
declare const ToggleWithContent: FC<TProps>;
|
|
15
|
+
export { ToggleWithContent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility to append key-value pairs to FormData
|
|
3
|
+
* - Supports arrays of File
|
|
4
|
+
* - Supports primitive values (string, number, boolean)
|
|
5
|
+
* - Supports single File
|
|
6
|
+
*/
|
|
7
|
+
type Primitive = string | number | boolean;
|
|
8
|
+
type FormDataValue = Primitive | File | Primitive[] | File[];
|
|
9
|
+
export declare function appendFormData<T extends Record<string, FormDataValue>>(data: T): FormData;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* جمع زدن مقادیر یک کلید مشخص در آرایهای از آبجکتها
|
|
3
|
+
*
|
|
4
|
+
* @param arr - آرایهای از آبجکتها
|
|
5
|
+
* @param key - کلیدی که باید مقادیر آن جمع شود
|
|
6
|
+
* @returns مجموع مقادیر عددی کلید مشخص
|
|
7
|
+
*
|
|
8
|
+
* مثال:
|
|
9
|
+
* const data = [{value: 10}, {value: 20}, {value: 5}];
|
|
10
|
+
* calculateSumByKey(data, "value"); // خروجی: 35
|
|
11
|
+
*/
|
|
12
|
+
export declare const calculateSumByKey: <T extends Record<string, any>>(arr: T[], key: keyof T) => number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const convertToToman: (rial: number) => string;
|
|
2
|
+
export declare const toNumber: (value: unknown) => number;
|
|
3
|
+
export declare const toSelectField: (value?: number, label?: string) => {
|
|
4
|
+
value: number;
|
|
5
|
+
label: string;
|
|
6
|
+
} | null;
|
|
7
|
+
export declare const ShamsiToIsoString: (shamsi: string) => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as jalaali } from 'jalaali-js';
|
|
2
|
+
export interface IDateOBJ {
|
|
3
|
+
day: number;
|
|
4
|
+
year: number;
|
|
5
|
+
month: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IDateOBJString {
|
|
8
|
+
day: string;
|
|
9
|
+
year: string;
|
|
10
|
+
month: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ConvertUtcToDate: (utc: string) => IDateOBJ;
|
|
13
|
+
export declare const getCustomDate: (utc: string) => string;
|
|
14
|
+
export declare const getCurrentJalaliDate: () => IDateOBJ;
|
|
15
|
+
export declare const toJalali: (date: Date) => jalaali.JalaaliDateObject;
|
|
16
|
+
export declare const ConvertObjToStringDate: (date: IDateOBJ) => string;
|
|
17
|
+
export declare const ConvertStringDateToObj: (date: string, hasMaxDate?: boolean) => IDateOBJ | null | undefined;
|
|
18
|
+
export declare const CheckMaximumDate: (date: string, nullable?: boolean, hasNoMax?: boolean) => boolean;
|
|
19
|
+
export declare const ReplaceWrongDate: (date: string, hasMaxDate?: boolean, minDate?: IDateOBJ) => string;
|
|
20
|
+
export declare const CheckGreaterDate: (date1: string, date2: string) => boolean;
|
|
21
|
+
export declare const GetLastYears: (number: number) => number[];
|
|
22
|
+
export declare const formatPersianDate: (jalaliStr: string) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* حذف آیتمهای تکراری از آرایه براساس یک کلید مشخص.
|
|
3
|
+
* اگر چند آبجکت مقدار یکسانی برای کلید مورد نظر داشته باشند،
|
|
4
|
+
* فقط اولین occurrence در آرایه نهایی نگه داشته میشود.
|
|
5
|
+
*
|
|
6
|
+
* @param array - آرایهای از آبجکتها
|
|
7
|
+
* @param key - کلیدی که یکتایی براساس آن بررسی میشود
|
|
8
|
+
* @returns آرایهای جدید بدون آیتمهای تکراری
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeDuplicates(array: any[], key: any): any;
|
|
11
|
+
export declare const findDuplicates: (arry: any[]) => any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertEnglishDigitsToPersian: (numb: string, comma?: ",") => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mapEnumToDescription: <TEnum extends string | number, TMap extends Record<TEnum, Record<string, string>>, TKey extends keyof TMap[TEnum] = "description">(item: TEnum, mapObject: TMap, key?: TKey) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findByKey<T, K extends keyof T>(data: T[], key: K, value: T[K]): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFilePostfix(fileName: string): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getNumericEnumValues(enumObj: any): number[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* گرفتن مقادیر یک کلید مشخص از آرایهای از آبجکتها
|
|
3
|
+
*
|
|
4
|
+
* @param arr - آرایهای از آبجکتها
|
|
5
|
+
* @param key - کلیدی که میخواهیم مقادیرش را استخراج کنیم
|
|
6
|
+
* @returns آرایهای شامل مقادیر کلید مشخص
|
|
7
|
+
*
|
|
8
|
+
* مثال:
|
|
9
|
+
* const data = [{id: 1, name: 'A'}, {id: 2, name: 'B'}];
|
|
10
|
+
* pluck(data, 'name'); // خروجی: ['A', 'B']
|
|
11
|
+
*/
|
|
12
|
+
export declare const pluck: <T extends Record<string, any>, K extends keyof T>(arr: T[], key: K) => T[K][];
|
|
13
|
+
/**
|
|
14
|
+
* گرفتن مقدار یک مسیر تو در تو در آبجکت
|
|
15
|
+
* - پشتیبانی از اندیس آرایه با [index]
|
|
16
|
+
* - مقدار پیشفرض قابل تنظیم
|
|
17
|
+
*/
|
|
18
|
+
export declare const getNestedValue: <T = any>(obj: Record<string, any>, path: string, defaultValue?: T | null) => T | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const joinWithSeparator: (data: any[], char?: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
interface LazyWithRetryOptions {
|
|
3
|
+
retries?: number;
|
|
4
|
+
delay?: number;
|
|
5
|
+
}
|
|
6
|
+
declare const lazyWithRetry: <T extends ComponentType<any>>(importFn: () => Promise<any>, exportName?: string, options?: LazyWithRetryOptions) => import('react').LazyExoticComponent<T>;
|
|
7
|
+
export default lazyWithRetry;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* فرمت کردن عدد به شکل هزارگان با کاما
|
|
3
|
+
* مثال: 1234567.89 -> "1,234,567.89"
|
|
4
|
+
*/
|
|
5
|
+
export declare function currencyMask(value: number | string): string;
|
|
6
|
+
/**
|
|
7
|
+
* حذف فرمت هزارگان (کاما) از عدد
|
|
8
|
+
* مثال: "1,234,567.89" -> "1234567.89"
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeCurrencyMask(value: number | string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TOption } from '../types/option.model';
|
|
2
|
+
export type FullOption<T = {}> = {
|
|
3
|
+
label: string;
|
|
4
|
+
options: Array<TOption & T>;
|
|
5
|
+
};
|
|
6
|
+
export declare const FullOptionCreator: <T extends Record<string, any>>(options: T[], valueId: keyof T, labelId: keyof T) => FullOption<T>[];
|
|
7
|
+
export declare const fullOption: (id: any, options: any) => any;
|
|
8
|
+
export declare const simpleOption: (id: any, options: any) => any;
|
|
9
|
+
export declare const multiFullOption: (ids: any, options: any) => any;
|
|
10
|
+
export declare const multiSimpleOption: (ids: any, options: any) => any;
|
|
11
|
+
export declare const toOption: <T extends Record<string, any>, KId extends keyof T = "id", KLabel extends keyof T = "title">(entity?: T, idKey?: KId, labelKey?: KLabel) => TOption | null;
|
|
12
|
+
export declare function removeOptionalNullishFields<T extends object, K extends keyof T>(obj: T, requiredKeys: K[]): T;
|
|
13
|
+
export declare function getOptionValue<T extends string | number | boolean>(option: {
|
|
14
|
+
value?: T;
|
|
15
|
+
} | null | undefined, defaultValue: T): T;
|
|
16
|
+
/**
|
|
17
|
+
* حذف آیتمها از FullOption بر اساس آرایه id
|
|
18
|
+
*/
|
|
19
|
+
export declare const removeFullOption: (idArray: Array<string | number>, options: FullOption[]) => FullOption[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const isLimitedNumberRegex: (minLength: number, maxLength: number) => RegExp;
|
|
2
|
+
export declare const isLimitedNumberNullableRegex: (minLength: number, maxLength: number) => RegExp;
|
|
3
|
+
export declare const isNumberRegex: () => RegExp;
|
|
4
|
+
export declare const isNumberPointRegex: () => RegExp;
|
|
5
|
+
export declare const isPersian: () => RegExp;
|
|
6
|
+
export declare const isPersianAndNumber: () => RegExp;
|
|
7
|
+
export declare const isPersianNullable: () => RegExp;
|
|
8
|
+
export declare const isHomePhone: () => RegExp;
|
|
9
|
+
export declare const isHomePhoneNullable: () => RegExp;
|
|
10
|
+
export declare const isFax: () => RegExp;
|
|
11
|
+
export declare const isDecimalNumberRegex: () => RegExp;
|
|
12
|
+
export declare const isAtLeastMinimum: (value: any, minLimit: number) => boolean;
|
|
13
|
+
export declare const isLimitedNumberRegexWithValue: (value: any, minLimit: number, maxLimit: number) => boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const ScrollTo: (id: string, offset?: number) => void;
|
|
3
|
+
export declare const scrollToTop: () => void;
|
|
4
|
+
export declare const scrollToBottom: () => void;
|
|
5
|
+
export declare const scrollToMap: () => void;
|
|
6
|
+
export declare const scrollToRef: (ref: RefObject<HTMLElement>, offset?: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const shiftMapIndexes: <T extends Record<number, any>>(map: T, removedIndex: number) => T;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum ToastTypes {
|
|
2
|
+
warning = "warning",
|
|
3
|
+
info = "info",
|
|
4
|
+
success = "success",
|
|
5
|
+
error = "error"
|
|
6
|
+
}
|
|
7
|
+
export type ToastPosition = "top-center" | "top-right" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left" | undefined;
|
|
8
|
+
interface ShowToastOptions {
|
|
9
|
+
position?: ToastPosition;
|
|
10
|
+
toastId?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const showToast: (messages: string[], type: ToastTypes, options?: ShowToastOptions) => void;
|
|
13
|
+
export declare const SuccessToast: (messages?: string[]) => void;
|
|
14
|
+
export declare const ErrorToast: (messages?: string[]) => void;
|
|
15
|
+
export declare const WarningToast: (messages?: string[]) => void;
|
|
16
|
+
export declare const InfoToast: (messages?: string[]) => void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stringShorter: (text: string, size: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toQueryString(params: Record<string, any>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const touchAllFieldsWithErrors: (errors: Record<string, any>, setTouched: (touched: Record<string, boolean>, shouldValidate?: boolean) => void, handleBlur: (e: any) => void) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const isSameUrl: (url1: string, url2: string) => boolean;
|
|
2
|
+
export declare const isValidNumericParam: (paramName: string, params: Record<string, any>) => boolean;
|
|
3
|
+
export declare const isUrlIncludes: (url1: string, url2: string) => boolean;
|
|
4
|
+
export declare const isSameString: (first: string, second: string) => boolean;
|