@antscorp/antsomi-ui 1.2.0 → 1.2.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.
Files changed (85) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/index.js +1 -1
  3. package/dist/types/components/common/ConfigProvider/ConfigProvider.d.ts +4 -1
  4. package/dist/types/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +1 -1
  5. package/dist/types/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +1 -1
  6. package/dist/types/components/molecules/index.d.ts +1 -1
  7. package/dist/types/locales/i18n.d.ts +73 -0
  8. package/dist/types/locales/translations.d.ts +37 -0
  9. package/dist/types/types/index.d.ts +1 -0
  10. package/package.json +1 -1
  11. package/dist/json/6c296f4f68b6157dbae376b802e8cb69.json +0 -8
  12. package/dist/json/92f420e6aec822089f8cf33e83aa1e0c.json +0 -8
  13. package/dist/types/jest-setup.d.ts +0 -1
  14. package/dist/types/src/components/atoms/Button/Button.d.ts +0 -1
  15. package/dist/types/src/components/atoms/Button/Button.stories.d.ts +0 -32
  16. package/dist/types/src/components/atoms/Button/index.d.ts +0 -10
  17. package/dist/types/src/components/atoms/Button/test.d.ts +0 -3
  18. package/dist/types/src/components/atoms/Divider/Divider.d.ts +0 -1
  19. package/dist/types/src/components/atoms/Divider/Divider.stories.d.ts +0 -8
  20. package/dist/types/src/components/atoms/Divider/index.d.ts +0 -1
  21. package/dist/types/src/components/atoms/Input/Input.d.ts +0 -7
  22. package/dist/types/src/components/atoms/Input/Input.stories.d.ts +0 -19
  23. package/dist/types/src/components/atoms/Input/index.d.ts +0 -1
  24. package/dist/types/src/components/atoms/InputNumber/InputNumber.d.ts +0 -7
  25. package/dist/types/src/components/atoms/InputNumber/index.d.ts +0 -1
  26. package/dist/types/src/components/atoms/Radio/Radio.d.ts +0 -1
  27. package/dist/types/src/components/atoms/Radio/index.d.ts +0 -1
  28. package/dist/types/src/components/atoms/Space/Space.d.ts +0 -1
  29. package/dist/types/src/components/atoms/Space/index.d.ts +0 -1
  30. package/dist/types/src/components/atoms/Tag/Tag.d.ts +0 -1
  31. package/dist/types/src/components/atoms/Tag/index.d.ts +0 -1
  32. package/dist/types/src/components/atoms/Tooltip/Tooltip.d.ts +0 -1
  33. package/dist/types/src/components/atoms/Tooltip/index.d.ts +0 -1
  34. package/dist/types/src/components/atoms/Typography/Text.d.ts +0 -1
  35. package/dist/types/src/components/atoms/Typography/index.d.ts +0 -1
  36. package/dist/types/src/components/atoms/index.d.ts +0 -9
  37. package/dist/types/src/components/common/ConfigProvider/ConfigProvider.d.ts +0 -7
  38. package/dist/types/src/components/common/ConfigProvider/GlobalStyle.d.ts +0 -5
  39. package/dist/types/src/components/common/ConfigProvider/index.d.ts +0 -1
  40. package/dist/types/src/components/common/index.d.ts +0 -1
  41. package/dist/types/src/components/icons/EventIcon.d.ts +0 -3
  42. package/dist/types/src/components/icons/index.d.ts +0 -1
  43. package/dist/types/src/components/index.d.ts +0 -3
  44. package/dist/types/src/components/molecules/Alert/Alert.d.ts +0 -1
  45. package/dist/types/src/components/molecules/Alert/index.d.ts +0 -1
  46. package/dist/types/src/components/molecules/Cascader/Cascader.d.ts +0 -1
  47. package/dist/types/src/components/molecules/Cascader/index.d.ts +0 -1
  48. package/dist/types/src/components/molecules/CustomComponent/CustomComponent.d.ts +0 -2
  49. package/dist/types/src/components/molecules/CustomComponent/index.d.ts +0 -1
  50. package/dist/types/src/components/molecules/DatePicker/DatePicker.d.ts +0 -8
  51. package/dist/types/src/components/molecules/DatePicker/DatePicker.stories.d.ts +0 -4
  52. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +0 -24
  53. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.stories.d.ts +0 -5
  54. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +0 -53
  55. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/index.d.ts +0 -3
  56. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +0 -6
  57. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +0 -11
  58. package/dist/types/src/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +0 -15
  59. package/dist/types/src/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +0 -9
  60. package/dist/types/src/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.stories.d.ts +0 -7
  61. package/dist/types/src/components/molecules/DatePicker/components/AdvancedRangePicker/constants.d.ts +0 -4
  62. package/dist/types/src/components/molecules/DatePicker/components/AdvancedRangePicker/index.d.ts +0 -2
  63. package/dist/types/src/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +0 -14
  64. package/dist/types/src/components/molecules/DatePicker/index.d.ts +0 -3
  65. package/dist/types/src/components/molecules/Dropdown/Dropdown.d.ts +0 -1
  66. package/dist/types/src/components/molecules/Dropdown/index.d.ts +0 -1
  67. package/dist/types/src/components/molecules/Modal/Modal.d.ts +0 -1
  68. package/dist/types/src/components/molecules/Modal/index.d.ts +0 -1
  69. package/dist/types/src/components/molecules/Select/Select.d.ts +0 -15
  70. package/dist/types/src/components/molecules/Select/Select.stories.d.ts +0 -28
  71. package/dist/types/src/components/molecules/Select/Test.d.ts +0 -3
  72. package/dist/types/src/components/molecules/Select/index.d.ts +0 -2
  73. package/dist/types/src/components/molecules/Select/styled.d.ts +0 -4
  74. package/dist/types/src/components/molecules/index.d.ts +0 -8
  75. package/dist/types/src/constants.d.ts +0 -12
  76. package/dist/types/src/hooks/index.d.ts +0 -2
  77. package/dist/types/src/index.d.ts +0 -2
  78. package/dist/types/src/locales/i18n.d.ts +0 -23
  79. package/dist/types/src/locales/translations.d.ts +0 -14
  80. package/dist/types/src/test.d.ts +0 -3
  81. package/dist/types/src/types/index.d.ts +0 -5
  82. package/dist/types/src/utils/common.d.ts +0 -8
  83. package/dist/types/src/utils/handleError.d.ts +0 -2
  84. /package/dist/types/{src/components → components}/atoms/Button/__tests__/Button.test.d.ts +0 -0
  85. /package/dist/types/{src/locales → locales}/types.d.ts +0 -0
@@ -1,7 +1,10 @@
1
1
  import { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-provider';
2
2
  import React, { ReactNode } from 'react';
3
- interface ConfigProviderProps extends AntdConfigProviderProps {
3
+ import { TLocale } from 'src/types';
4
+ import 'src/locales/i18n';
5
+ interface ConfigProviderProps extends Omit<AntdConfigProviderProps, 'locale'> {
4
6
  children?: ReactNode;
7
+ locale?: TLocale;
5
8
  }
6
9
  declare const ConfigProvider: React.FC<ConfigProviderProps>;
7
10
  export default ConfigProvider;
@@ -11,5 +11,5 @@
11
11
  * @param {number} [value=0] - Value to be added or subtracted.
12
12
  * @param {string} [dateFormat=DEFAULT_DATE_FORMAT] - Format in which to return the new date.
13
13
  * @returns {string} The new date in the specified format.
14
- */
14
+ */
15
15
  export declare const calculationDateAdvanced: (dateTypeKey?: string, calculationTypeKey?: string, calculationDateKey?: any, value?: number, dateFormat?: string) => any;
@@ -4,6 +4,6 @@ export interface AdvancedRangePickerProps {
4
4
  timeRange: TTimeRange;
5
5
  errorMessage?: string;
6
6
  showLabel?: boolean;
7
- onChange?: ({ timeRange, mode, }: TOnChangePayload) => void;
7
+ onChange?: ({ timeRange, mode }: TOnChangePayload) => void;
8
8
  }
9
9
  export declare const AdvancedRangePicker: React.FC<AdvancedRangePickerProps>;
@@ -5,4 +5,4 @@ export { Modal } from './Modal';
5
5
  export { Select } from './Select';
6
6
  export { CustomComponent } from './CustomComponent';
7
7
  export { DatePicker } from './DatePicker';
8
- export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange } from './DatePicker';
8
+ export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
@@ -0,0 +1,73 @@
1
+ export declare const translationsJson: {
2
+ en: {
3
+ translation: {
4
+ global: {
5
+ minus: string;
6
+ plus: string;
7
+ };
8
+ button: {};
9
+ datePicker: {
10
+ startDate: string;
11
+ endDate: string;
12
+ dateTypes: {
13
+ today: string;
14
+ firstDayOfWeekMonSun: string;
15
+ firstDayOfWeekSunSat: string;
16
+ firstDayOfMonth: string;
17
+ firstDayOfQuarter: string;
18
+ firstDayOfYear: string;
19
+ lastDayOfWeekMonSun: string;
20
+ lastDayOfWeekSunSat: string;
21
+ lastDayOfMonth: string;
22
+ lastDayOfQuarter: string;
23
+ lastDayOfYear: string;
24
+ fixed: string;
25
+ };
26
+ seconds: string;
27
+ minutes: string;
28
+ hours: string;
29
+ days: string;
30
+ weeks: string;
31
+ months: string;
32
+ quarters: string;
33
+ years: string;
34
+ };
35
+ };
36
+ };
37
+ vi: {
38
+ translation: {
39
+ global: {
40
+ minus: string;
41
+ plus: string;
42
+ };
43
+ button: {};
44
+ datePicker: {
45
+ startDate: string;
46
+ endDate: string;
47
+ dateTypes: {
48
+ today: string;
49
+ firstDayOfWeekMonSun: string;
50
+ firstDayOfWeekSunSat: string;
51
+ firstDayOfMonth: string;
52
+ firstDayOfQuarter: string;
53
+ firstDayOfYear: string;
54
+ lastDayOfWeekMonSun: string;
55
+ lastDayOfWeekSunSat: string;
56
+ lastDayOfMonth: string;
57
+ lastDayOfQuarter: string;
58
+ lastDayOfYear: string;
59
+ fixed: string;
60
+ };
61
+ seconds: string;
62
+ minutes: string;
63
+ hours: string;
64
+ days: string;
65
+ weeks: string;
66
+ months: string;
67
+ quarters: string;
68
+ years: string;
69
+ };
70
+ };
71
+ };
72
+ };
73
+ export declare const i18n: Promise<import("i18next").TFunction<"translation", undefined, "translation">>;
@@ -0,0 +1,37 @@
1
+ import { ConvertedToObjectType, TranslationJsonType } from './types';
2
+ export declare const translations: ConvertedToObjectType<TranslationJsonType>;
3
+ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: ConvertedToObjectType<{
4
+ global: {
5
+ minus: string;
6
+ plus: string;
7
+ };
8
+ button: {};
9
+ datePicker: {
10
+ startDate: string;
11
+ endDate: string;
12
+ dateTypes: {
13
+ today: string;
14
+ firstDayOfWeekMonSun: string;
15
+ firstDayOfWeekSunSat: string;
16
+ firstDayOfMonth: string;
17
+ firstDayOfQuarter: string;
18
+ firstDayOfYear: string;
19
+ lastDayOfWeekMonSun: string;
20
+ lastDayOfWeekSunSat: string;
21
+ lastDayOfMonth: string;
22
+ lastDayOfQuarter: string;
23
+ lastDayOfYear: string;
24
+ fixed: string;
25
+ };
26
+ seconds: string;
27
+ minutes: string;
28
+ hours: string;
29
+ days: string;
30
+ weeks: string;
31
+ months: string;
32
+ quarters: string;
33
+ years: string;
34
+ };
35
+ }>, current?: string) => void;
36
+ export declare const t: (id: string, ...rest: any[]) => [string, ...any[]];
37
+ export declare const getTranslateMessage: (id: string, defaultMessage?: string, value?: Record<string, unknown>) => string;
@@ -3,3 +3,4 @@ export type THandleErrorPayload = {
3
3
  name: string;
4
4
  args: Record<string, any>;
5
5
  };
6
+ export type TLocale = 'en' | 'vi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -1,8 +0,0 @@
1
- {
2
- "global": {},
3
- "button": {},
4
- "datePicker": {
5
- "startDate": "Start Date",
6
- "enDate": "End Date"
7
- }
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "global": {},
3
- "button": {},
4
- "datePicker": {
5
- "startDate": "Ngày bắt đầu",
6
- "enDate": "Ngày kết thúc"
7
- }
8
- }
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom/extend-expect';
@@ -1 +0,0 @@
1
- export { Button } from 'antd';
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Partial<{
4
- href: string;
5
- target?: string | undefined;
6
- onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
7
- } & import("antd/es/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
8
- htmlType?: "button" | "submit" | "reset" | undefined;
9
- onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
10
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & React.RefAttributes<HTMLElement>> & {
11
- Group: React.FC<import("antd/es/button").ButtonGroupProps>;
12
- }>;
13
- export default _default;
14
- export declare const Default: ComponentStory<React.ForwardRefExoticComponent<Partial<{
15
- href: string;
16
- target?: string | undefined;
17
- onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
18
- } & import("antd/es/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
19
- htmlType?: "button" | "submit" | "reset" | undefined;
20
- onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
21
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & React.RefAttributes<HTMLElement>> & {
22
- Group: React.FC<import("antd/es/button").ButtonGroupProps>;
23
- }>;
24
- export declare const Type: ComponentStory<any>;
25
- export declare const Size: ComponentStory<any>;
26
- export declare const Loading: ComponentStory<any>;
27
- export declare const GhostButton: ComponentStory<any>;
28
- export declare const BlockButton: ComponentStory<any>;
29
- export declare const IconButton: ComponentStory<any>;
30
- export declare const Disabled: ComponentStory<any>;
31
- export declare const MultipleButtons: ComponentStory<any>;
32
- export declare const DangerButtons: ComponentStory<any>;
@@ -1,10 +0,0 @@
1
- export declare const Button: import("react").ForwardRefExoticComponent<Partial<{
2
- href: string;
3
- target?: string | undefined;
4
- onClick?: import("react").MouseEventHandler<HTMLAnchorElement> | undefined;
5
- } & import("antd/es/button/button").BaseButtonProps & Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
6
- htmlType?: "button" | "submit" | "reset" | undefined;
7
- onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
8
- } & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & import("react").RefAttributes<HTMLElement>> & {
9
- Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
10
- };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const TestButton: React.FC;
3
- export default TestButton;
@@ -1 +0,0 @@
1
- export { Divider } from 'antd';
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FC<import("antd").DividerProps>>;
4
- export default _default;
5
- export declare const Default: ComponentStory<React.FC<import("antd").DividerProps>>;
6
- export declare const Horizontal: ComponentStory<any>;
7
- export declare const TextWithoutHeadingStyle: ComponentStory<any>;
8
- export declare const Vertical: ComponentStory<any>;
@@ -1 +0,0 @@
1
- export { Divider } from './Divider';
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Input: import("react").ForwardRefExoticComponent<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef>> & {
3
- Group: import("react").FC<import("antd/es/input").GroupProps>;
4
- Search: import("react").ForwardRefExoticComponent<import("antd/es/input").SearchProps & import("react").RefAttributes<import("antd").InputRef>>;
5
- TextArea: import("react").ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
6
- Password: import("react").ForwardRefExoticComponent<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef>>;
7
- };
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("antd").InputProps & React.RefAttributes<import("rc-input").InputRef>> & {
4
- Group: React.FC<import("antd/es/input").GroupProps>;
5
- Search: React.ForwardRefExoticComponent<import("antd/es/input").SearchProps & React.RefAttributes<import("rc-input").InputRef>>;
6
- TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
7
- Password: React.ForwardRefExoticComponent<import("antd/es/input").PasswordProps & React.RefAttributes<import("rc-input").InputRef>>;
8
- }>;
9
- export default _default;
10
- export declare const Default: ComponentStory<React.ForwardRefExoticComponent<import("antd").InputProps & React.RefAttributes<import("rc-input").InputRef>> & {
11
- Group: React.FC<import("antd/es/input").GroupProps>;
12
- Search: React.ForwardRefExoticComponent<import("antd/es/input").SearchProps & React.RefAttributes<import("rc-input").InputRef>>;
13
- TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
14
- Password: React.ForwardRefExoticComponent<import("antd/es/input").PasswordProps & React.RefAttributes<import("rc-input").InputRef>>;
15
- }>;
16
- export declare const BasicUsage: ComponentStory<any>;
17
- export declare const TextArea: ComponentStory<any>;
18
- export declare const Status: ComponentStory<any>;
19
- export declare const BorderLess: ComponentStory<any>;
@@ -1 +0,0 @@
1
- export { Input } from './Input';
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { InputNumberProps as AntdInputNumberProps } from 'antd';
3
- interface InputNumberProps extends AntdInputNumberProps {
4
- showHandler?: boolean;
5
- }
6
- export declare const InputNumber: React.FC<InputNumberProps>;
7
- export {};
@@ -1 +0,0 @@
1
- export { InputNumber } from './InputNumber';
@@ -1 +0,0 @@
1
- export { Radio } from 'antd';
@@ -1 +0,0 @@
1
- export { Radio } from './Radio';
@@ -1 +0,0 @@
1
- export { Space } from 'antd';
@@ -1 +0,0 @@
1
- export { Space } from './Space';
@@ -1 +0,0 @@
1
- export { Tag } from 'antd';
@@ -1 +0,0 @@
1
- export { Tag } from './Tag';
@@ -1 +0,0 @@
1
- export { Tooltip } from 'antd';
@@ -1 +0,0 @@
1
- export { Tooltip } from './Tooltip';
@@ -1 +0,0 @@
1
- export { Typography } from 'antd';
@@ -1 +0,0 @@
1
- export { Typography } from './Text';
@@ -1,9 +0,0 @@
1
- export { Button } from './Button';
2
- export { Divider } from './Divider';
3
- export { Input } from './Input';
4
- export { InputNumber } from './InputNumber';
5
- export { Radio } from './Radio';
6
- export { Space } from './Space';
7
- export { Tag } from './Tag';
8
- export { Tooltip } from './Tooltip';
9
- export { Typography } from './Typography';
@@ -1,7 +0,0 @@
1
- import { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-provider';
2
- import React, { ReactNode } from 'react';
3
- interface ConfigProviderProps extends AntdConfigProviderProps {
4
- children?: ReactNode;
5
- }
6
- declare const ConfigProvider: React.FC<ConfigProviderProps>;
7
- export default ConfigProvider;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- interface GlobalStyleProps {
3
- }
4
- export declare const GlobalStyle: React.FC<GlobalStyleProps>;
5
- export {};
@@ -1 +0,0 @@
1
- export { default as ConfigProvider } from './ConfigProvider';
@@ -1 +0,0 @@
1
- export { ConfigProvider } from './ConfigProvider';
@@ -1,3 +0,0 @@
1
- export declare const EventIcon: ({ ...props }: {
2
- [x: string]: any;
3
- }) => JSX.Element;
@@ -1 +0,0 @@
1
- export { EventIcon } from './EventIcon';
@@ -1,3 +0,0 @@
1
- export * from './atoms';
2
- export * from './molecules';
3
- export * from './common';
@@ -1 +0,0 @@
1
- export { Alert } from 'antd';
@@ -1 +0,0 @@
1
- export { Alert } from './Alert';
@@ -1 +0,0 @@
1
- export { Cascader } from 'antd';
@@ -1 +0,0 @@
1
- export { Cascader } from './Cascader';
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const CustomComponent: React.FC<any>;
@@ -1 +0,0 @@
1
- export { CustomComponent } from './CustomComponent';
@@ -1,8 +0,0 @@
1
- import { DatePicker as AntdDatePicker } from 'antd';
2
- import { AdvancedPicker } from './components/AdvancedPicker';
3
- import { AdvancedRangePicker } from './components/AdvancedRangePicker';
4
- export type TDatePicker = typeof AntdDatePicker & {
5
- AdvancedPicker: typeof AdvancedPicker;
6
- AdvancedRangePicker: typeof AdvancedRangePicker;
7
- };
8
- export declare const DatePicker: TDatePicker;
@@ -1,4 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- declare const _default: ComponentMeta<import("./DatePicker").TDatePicker>;
3
- export default _default;
4
- export declare const Default: ComponentStory<import("./DatePicker").TDatePicker>;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { TAdvancedType, TOperatorKey, TOption } from './types';
3
- export interface AdvancedPickerProps {
4
- label?: string;
5
- dateTypeKeysShow?: string[];
6
- defaultDateTypeKey?: string;
7
- valueType?: string;
8
- option?: TOption;
9
- operatorKey?: TOperatorKey;
10
- type?: TAdvancedType;
11
- date?: string;
12
- format?: string;
13
- formatInputDisplay?: string;
14
- inputStyle?: React.CSSProperties;
15
- disableAfterDate?: string;
16
- disableBeforeDate?: string;
17
- errorMessage?: string;
18
- onUpdatedNewDate?: (newDate: any) => void;
19
- onApply?: ({ date, option }: {
20
- date: string;
21
- option: TOption;
22
- }) => void;
23
- }
24
- export declare const AdvancedPicker: React.FC<AdvancedPickerProps>;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FC<import("./AdvancedPicker").AdvancedPickerProps>>;
4
- export default _default;
5
- export declare const Default: ComponentStory<React.FC<import("./AdvancedPicker").AdvancedPickerProps>>;
@@ -1,53 +0,0 @@
1
- import { TAdvancedType } from './types';
2
- export declare const DATE_TYPES: {
3
- value: string;
4
- label: string;
5
- }[];
6
- export declare const CALCULATION_TYPES: {
7
- value: string;
8
- label: string;
9
- }[];
10
- export declare const CALCULATION_DATES: {
11
- value: string;
12
- label: string;
13
- }[];
14
- export declare const VALUE_TYPES: {
15
- INPUT_TEXT: string;
16
- INPUT_NUMBER: string;
17
- MATCHES_ANY: string;
18
- YEAR: string;
19
- YEAR_QUARTER: string;
20
- YEAR_MONTH: string;
21
- YEAR_WEEK: string;
22
- YEAR_MONTH_DAY: string;
23
- YEAR_MONTH_DAY_HOUR: string;
24
- YEAR_MONTH_DAY_MINUTE: string;
25
- YEAR_MONTH_DAY_SECOND: string;
26
- QUARTER: string;
27
- MONTH: string;
28
- WEEK: string;
29
- MONTH_DAY: string;
30
- DAY_OF_WEEK: string;
31
- DAY: string;
32
- HOUR: string;
33
- MINUTE: string;
34
- INPUT_TEXT_NO_FIELD: string;
35
- };
36
- export declare const DEFAULT_DATE_FORMAT = "YYYYMMDDHHmmss";
37
- export declare const DEFAULT_TIME_FORMAT = "HH:mm:ss";
38
- export declare const DEFAULT_DATE_DISPLAY_FORMAT = "DD/MM/YYYY HH:mm:ss";
39
- export declare const TIME_PICKER_TYPE: {
40
- DATE_TIME: string;
41
- DATE_HOUR: string;
42
- DATE_HOUR_MINUTE: string;
43
- DATE: string;
44
- };
45
- export declare const YEAR_PICKER_TYPE: {
46
- YEAR: string;
47
- MONTH: string;
48
- QUARTER: string;
49
- };
50
- export declare const ADVANCED_PICKER_TYPE: Record<string, {
51
- value: TAdvancedType;
52
- label: string;
53
- }>;
@@ -1,3 +0,0 @@
1
- export { AdvancedPicker } from './AdvancedPicker';
2
- export type { AdvancedPickerProps } from './AdvancedPicker';
3
- export type { TOption as TAdvancedPickerOption } from './types';
@@ -1,6 +0,0 @@
1
- export declare const DropdownContent: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const DropdownHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const DropdownFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const DatePickerHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const DatePickerCustomInput: import("styled-components").StyledComponent<"input", any, {}, never>;
6
- export declare const DatePickerFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,11 +0,0 @@
1
- export type TOption = {
2
- dateType: TDateType;
3
- calculationType: TCalculationType;
4
- calculationDate: TCalculationDate;
5
- value: number;
6
- };
7
- export type TDateType = 'today' | 'first_day_of_week_mon_sun' | 'first_day_of_week_sun_sat' | 'first_day_of_month' | 'first_day_of_quarter' | 'first_day_of_year' | 'last_day_of_week_mon_sun' | 'last_day_of_week_sun_sat' | 'last_day_of_month' | 'last_day_of_quarter' | 'last_day_of_year' | 'fixed';
8
- export type TCalculationType = 'minus' | 'plus' | '';
9
- export type TCalculationDate = 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years' | '';
10
- export type TOperatorKey = 'after' | 'between' | 'before';
11
- export type TAdvancedType = 'startDate' | 'endDate';
@@ -1,15 +0,0 @@
1
- /**
2
- * Calculates a new date based on the given parameters.
3
- * @param {string} [dateTypeKey='today'] - Key to determine the type of date to be used as the starting point.
4
- * Valid values are: 'today', 'first_day_of_week_mon_sun', 'first_day_of_week_sun_sat',
5
- * 'first_day_of_month', 'first_day_of_quarter', 'first_day_of_year', 'last_day_of_week_mon_sun',
6
- * 'last_day_of_week_sun_sat', 'last_day_of_month', 'last_day_of_quarter', 'last_day_of_year'.
7
- * @param {string} [calculationTypeKey='minus'] - Key to determine whether to add or subtract the specified value.
8
- * Valid values are: 'plus', 'minus'.
9
- * @param {string} [calculationDateKey='days'] - Key to determine the unit of time to be added or subtracted.
10
- * Valid values are: 'days', 'weeks', 'months', 'quarters', 'years'.
11
- * @param {number} [value=0] - Value to be added or subtracted.
12
- * @param {string} [dateFormat=DEFAULT_DATE_FORMAT] - Format in which to return the new date.
13
- * @returns {string} The new date in the specified format.
14
- */
15
- export declare const calculationDateAdvanced: (dateTypeKey?: string, calculationTypeKey?: string, calculationDateKey?: any, value?: number, dateFormat?: string) => any;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { TOnChangePayload, TTimeRange } from './types';
3
- export interface AdvancedRangePickerProps {
4
- timeRange: TTimeRange;
5
- errorMessage?: string;
6
- showLabel?: boolean;
7
- onChange?: ({ timeRange, mode, }: TOnChangePayload) => void;
8
- }
9
- export declare const AdvancedRangePicker: React.FC<AdvancedRangePickerProps>;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- import { AdvancedRangePicker } from './AdvancedRangePicker';
4
- declare const _default: ComponentMeta<React.FC<import("./AdvancedRangePicker").AdvancedRangePickerProps>>;
5
- export default _default;
6
- export declare const Template: ComponentStory<typeof AdvancedRangePicker>;
7
- export declare const Basic: ComponentStory<typeof AdvancedRangePicker>;
@@ -1,4 +0,0 @@
1
- export declare const ADVANCED_RANGE_PICKER_FORMAT: {
2
- startDate: string;
3
- endDate: string;
4
- };
@@ -1,2 +0,0 @@
1
- export { AdvancedRangePicker } from './AdvancedRangePicker';
2
- export type { TTimeRange as TAdvancedRangePickerTimeRange } from './types';
@@ -1,14 +0,0 @@
1
- import { TOption } from '../AdvancedPicker/types';
2
- export type TOnChangeMode = 'system' | 'user';
3
- export type TTimeRange = {
4
- startDate: TOption & {
5
- date: string;
6
- };
7
- endDate: TOption & {
8
- date: string;
9
- };
10
- };
11
- export type TOnChangePayload = {
12
- timeRange: TTimeRange;
13
- mode: 'system' | 'user';
14
- };
@@ -1,3 +0,0 @@
1
- export { DatePicker } from './DatePicker';
2
- export type { AdvancedPickerProps, TAdvancedPickerOption } from './components/AdvancedPicker';
3
- export type { TAdvancedRangePickerTimeRange } from './components/AdvancedRangePicker';
@@ -1 +0,0 @@
1
- export { Dropdown } from 'antd';
@@ -1 +0,0 @@
1
- export { Dropdown } from './Dropdown';
@@ -1 +0,0 @@
1
- export { Modal } from 'antd';
@@ -1 +0,0 @@
1
- export { Modal } from './Modal';