@antscorp/antsomi-ui 1.3.5-beta.402 → 1.3.5-beta.404
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/es/components/atoms/Input/Input.d.ts +3 -0
- package/es/components/atoms/Input/Input.js +4 -1
- package/es/components/atoms/InputNumber/InputNumber.d.ts +1 -0
- package/es/components/atoms/InputNumber/InputNumber.js +21 -0
- package/es/components/atoms/InputNumber/index.d.ts +1 -1
- package/es/components/atoms/InputNumber/index.js +1 -1
- package/es/components/atoms/index.d.ts +1 -1
- package/es/components/atoms/index.js +1 -1
- package/es/components/molecules/AccountSelection/hooks/useAccountSelection.d.ts +1 -1
- package/es/components/molecules/AddDynamicContent/utils.d.ts +4 -4
- package/es/components/molecules/CalendarSelection/actions.d.ts +1 -1
- package/es/components/molecules/CalendarSelection/hooks/useStateContext.d.ts +2 -2
- package/es/components/molecules/CalendarSelection/utils.d.ts +2 -2
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +1 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +4 -2
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +1 -0
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +6 -3
- package/es/components/molecules/DrawerDetail/styled.d.ts +1 -1
- package/es/components/molecules/EditorTab/EditorTab.d.ts +1 -1
- package/es/components/molecules/EditorTab/EditorTab.js +2 -2
- package/es/components/molecules/EmptyData/EmptyData.d.ts +3 -1
- package/es/components/molecules/EmptyData/EmptyData.js +17 -5
- package/es/components/molecules/EmptyData/styled.js +1 -0
- package/es/components/molecules/HeaderV2/HeaderV2.d.ts +2 -2
- package/es/components/molecules/PreviewModal/styled.d.ts +1 -1
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +3 -3
- package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +1 -1
- package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +1 -1
- package/es/components/molecules/Tree/Tree.d.ts +2 -0
- package/es/components/molecules/Tree/Tree.js +1 -0
- package/es/components/molecules/Tree/index.d.ts +1 -0
- package/es/components/molecules/Tree/index.js +1 -0
- package/es/components/molecules/index.d.ts +2 -1
- package/es/components/molecules/index.js +1 -0
- package/es/components/organism/AlgorithmsSetting/styled.d.ts +1 -1
- package/es/components/organism/ContentSources/provider.d.ts +1 -1
- package/es/components/organism/ContentSources/utils.d.ts +5 -5
- package/es/components/organism/DataTable/DataTable.d.ts +4 -1
- package/es/components/organism/DataTable/DataTable.js +23 -11
- package/es/components/organism/DataTable/components/Filter/AddFilterButton.js +27 -22
- package/es/components/organism/DataTable/components/Filter/FilterActionButton.d.ts +5 -0
- package/es/components/organism/DataTable/components/Filter/FilterActionButton.js +124 -0
- package/es/components/organism/DataTable/components/Filter/FilterCondition/index.d.ts +14 -0
- package/es/components/organism/DataTable/components/Filter/FilterCondition/index.js +99 -0
- package/es/components/organism/DataTable/components/Filter/FilterCondition/styled.d.ts +3 -0
- package/es/components/organism/DataTable/components/Filter/FilterCondition/styled.js +42 -0
- package/es/components/organism/DataTable/components/Filter/FilterCondition/utils.d.ts +0 -0
- package/es/components/organism/DataTable/components/Filter/FilterCondition/utils.js +1 -0
- package/es/components/organism/DataTable/components/Filter/FilterConditionList.d.ts +5 -0
- package/es/components/organism/DataTable/components/Filter/FilterConditionList.js +116 -0
- package/es/components/organism/DataTable/components/Filter/FilterItem.d.ts +10 -0
- package/es/components/organism/DataTable/components/Filter/FilterItem.js +36 -0
- package/es/components/organism/DataTable/components/Filter/SaveFilterPopover.d.ts +9 -0
- package/es/components/organism/DataTable/components/Filter/SaveFilterPopover.js +54 -0
- package/es/components/organism/DataTable/components/Filter/SavedFilterAndMetrics.d.ts +4 -2
- package/es/components/organism/DataTable/components/Filter/SavedFilterAndMetrics.js +101 -91
- package/es/components/organism/DataTable/components/Filter/index.js +12 -17
- package/es/components/organism/DataTable/components/Filter/styled.d.ts +2 -1
- package/es/components/organism/DataTable/components/Filter/styled.js +71 -11
- package/es/components/organism/DataTable/components/ModifyColumn/index.d.ts +3 -2
- package/es/components/organism/DataTable/components/ModifyColumn/index.js +136 -16
- package/es/components/organism/DataTable/components/ModifyColumn/styled.d.ts +3 -0
- package/es/components/organism/DataTable/components/ModifyColumn/styled.js +19 -0
- package/es/components/organism/DataTable/components/Pagination/index.d.ts +2 -3
- package/es/components/organism/DataTable/components/Table/ResizableCell.d.ts +1 -0
- package/es/components/organism/DataTable/components/Table/ResizableCell.js +4 -6
- package/es/components/organism/DataTable/components/Table/index.js +30 -8
- package/es/components/organism/DataTable/components/Toolbar/RowSelectedControl.d.ts +5 -0
- package/es/components/organism/DataTable/components/Toolbar/RowSelectedControl.js +30 -0
- package/es/components/organism/DataTable/components/Toolbar/SearchPopover.d.ts +8 -0
- package/es/components/organism/DataTable/components/Toolbar/SearchPopover.js +122 -0
- package/es/components/organism/DataTable/components/Toolbar/ToolbarActionButtons.js +71 -0
- package/es/components/organism/DataTable/components/Toolbar/index.js +20 -8
- package/es/components/organism/DataTable/components/Toolbar/styled.d.ts +6 -1
- package/es/components/organism/DataTable/components/Toolbar/styled.js +38 -2
- package/es/components/organism/DataTable/components/common/ApplyPopupContent/index.d.ts +11 -0
- package/es/components/organism/DataTable/components/common/ApplyPopupContent/index.js +36 -0
- package/es/components/organism/DataTable/components/common/ApplyPopupContent/styled.d.ts +3 -0
- package/es/components/organism/DataTable/components/common/ApplyPopupContent/styled.js +42 -0
- package/es/components/organism/DataTable/components/common/index.d.ts +0 -0
- package/es/components/organism/DataTable/components/common/index.js +1 -0
- package/es/components/organism/DataTable/components/index.d.ts +0 -1
- package/es/components/organism/DataTable/components/index.js +0 -1
- package/es/components/organism/DataTable/constants/common.js +1 -1
- package/es/components/organism/DataTable/constants/filter.d.ts +19 -0
- package/es/components/organism/DataTable/constants/filter.js +37 -0
- package/es/components/organism/DataTable/constants/index.js +8 -6
- package/es/components/organism/DataTable/constants/pagination.js +2 -2
- package/es/components/organism/DataTable/constants/sample.d.ts +149 -3
- package/es/components/organism/DataTable/constants/sample.js +1497 -2
- package/es/components/organism/DataTable/constants/theme.js +2 -1
- package/es/components/organism/DataTable/constants/toolbar.d.ts +2 -2
- package/es/components/organism/DataTable/constants/toolbar.js +1 -0
- package/es/components/organism/DataTable/contexts/DataTableContext.js +1 -1
- package/es/components/organism/DataTable/hooks/index.d.ts +2 -0
- package/es/components/organism/DataTable/hooks/index.js +2 -0
- package/es/components/organism/DataTable/hooks/useAddFilterButton.d.ts +22 -0
- package/es/components/organism/DataTable/hooks/useAddFilterButton.js +56 -0
- package/es/components/organism/DataTable/hooks/useDataTable.d.ts +2 -2
- package/es/components/organism/DataTable/hooks/useDataTable.js +9 -8
- package/es/components/organism/DataTable/hooks/useDataTableListing/constants.d.ts +9 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/constants.js +20 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/index.d.ts +1 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/index.js +1 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/types.d.ts +32 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/types.js +1 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/useDataTableListing.d.ts +11 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/useDataTableListing.js +390 -0
- package/es/components/organism/DataTable/hooks/useDataTableStore.d.ts +28 -0
- package/es/components/organism/DataTable/hooks/useDataTableStore.js +36 -0
- package/es/components/organism/DataTable/index.d.ts +3 -2
- package/es/components/organism/DataTable/index.js +3 -1
- package/es/components/organism/DataTable/providers/AntdTableConfigProvider.d.ts +1 -1
- package/es/components/organism/DataTable/stores/index.js +6 -3
- package/es/components/organism/DataTable/styled/index.d.ts +8 -0
- package/es/components/organism/DataTable/styled/index.js +41 -0
- package/es/components/organism/DataTable/types/filter.d.ts +30 -5
- package/es/components/organism/DataTable/types/index.d.ts +4 -5
- package/es/components/organism/DataTable/types/theme.d.ts +1 -0
- package/es/components/organism/DataTable/types/toolbar.d.ts +52 -15
- package/es/components/organism/DataTable/utils/filter.d.ts +90 -2
- package/es/components/organism/DataTable/utils/filter.js +178 -10
- package/es/components/organism/FilterSetting/components/common/InputSelectMulti/ColumnSuggestion/index.d.ts +1 -1
- package/es/components/organism/LeftMenu/LeftMenu.js +1 -1
- package/es/components/organism/LeftMenu/components/HomeMenu/useHomeMenu.d.ts +1 -1
- package/es/components/organism/LeftMenu/components/common/ChildMenu/index.js +64 -7
- package/es/components/organism/LeftMenu/hooks/useLeftMenu.d.ts +1 -1
- package/es/components/organism/LeftMenu/hooks/useLeftMenu.js +60 -27
- package/es/components/organism/LeftMenu/hooks/usePermission.js +2 -2
- package/es/components/organism/LeftMenu/index.d.ts +2 -1
- package/es/components/organism/LeftMenu/index.js +7 -4
- package/es/components/organism/LeftMenu/styled.d.ts +1 -3
- package/es/components/organism/LeftMenu/styled.js +2 -6
- package/es/components/organism/LeftMenu/utils/index.js +2 -2
- package/es/components/organism/Menu/styled.d.ts +1 -1
- package/es/components/organism/ModifyColumnModal/ModifyColumnModal.d.ts +3 -0
- package/es/components/organism/ModifyColumnModal/ModifyColumnModal.js +238 -0
- package/es/components/organism/ModifyColumnModal/SelectedMetricsList.d.ts +9 -0
- package/es/components/organism/ModifyColumnModal/SelectedMetricsList.js +105 -0
- package/es/components/organism/ModifyColumnModal/index.d.ts +2 -0
- package/es/components/organism/ModifyColumnModal/index.js +1 -0
- package/es/components/organism/ModifyColumnModal/styled.d.ts +8 -0
- package/es/components/organism/ModifyColumnModal/styled.js +151 -0
- package/es/components/organism/ModifyColumnModal/types.d.ts +27 -0
- package/es/components/organism/ModifyColumnModal/types.js +1 -0
- package/es/components/organism/index.d.ts +2 -1
- package/es/components/organism/index.js +2 -1
- package/es/components/template/Layout/Layout.js +4 -4
- package/es/components/template/Layout/components/RecommendationWorkspace/components/MenuMapping/components/OldLeftMenu/index.js +22 -3
- package/es/components/template/Layout/components/RecommendationWorkspace/components/MenuMapping/index.js +10 -3
- package/es/components/template/Layout/components/RecommendationWorkspace/index.js +5 -0
- package/es/components/template/TemplateListing/Loadable.d.ts +1 -1
- package/es/constants/api.d.ts +10 -0
- package/es/constants/api.js +11 -0
- package/es/constants/condition.d.ts +940 -0
- package/es/constants/condition.js +540 -0
- package/es/constants/dataTable.d.ts +12 -0
- package/es/constants/dataTable.js +12 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.js +1 -0
- package/es/constants/queries.d.ts +4 -0
- package/es/constants/queries.js +5 -0
- package/es/constants/theme.js +27 -11
- package/es/constants/variables.d.ts +17 -0
- package/es/constants/variables.js +18 -0
- package/es/hooks/index.d.ts +4 -3
- package/es/hooks/index.js +4 -3
- package/es/hooks/useOutsideClick.d.ts +1 -1
- package/es/hooks/useOutsideClick.js +7 -2
- package/es/hooks/useUpdateEffect.d.ts +3 -0
- package/es/hooks/useUpdateEffect.js +12 -0
- package/es/locales/en/translation.json +42 -2
- package/es/locales/i18n.d.ts +80 -0
- package/es/locales/translations.d.ts +40 -0
- package/es/locales/vi/translation.json +42 -2
- package/es/models/DataTable/ColumnMetric.d.ts +15 -0
- package/es/models/DataTable/ColumnMetric.js +1 -0
- package/es/models/DataTable/DataTableListing.d.ts +14 -0
- package/es/models/DataTable/DataTableListing.js +1 -0
- package/es/models/DataTable/FilterMetric.d.ts +10 -0
- package/es/models/DataTable/FilterMetric.js +1 -0
- package/es/models/DataTable/ModifyColumn.d.ts +9 -0
- package/es/models/DataTable/ModifyColumn.js +1 -0
- package/es/models/DataTable/SavedFilter.d.ts +15 -0
- package/es/models/DataTable/SavedFilter.js +1 -0
- package/es/models/DataTable/index.d.ts +3 -0
- package/es/models/DataTable/index.js +3 -0
- package/es/providers/AppConfigProvider/contexts/index.d.ts +2 -2
- package/es/providers/AppConfigProvider/contexts/index.js +1 -0
- package/es/providers/ConfigProvider/GlobalStyle.js +46 -10
- package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +1 -3
- package/es/queries/DataTable/index.d.ts +84 -0
- package/es/queries/DataTable/index.js +84 -0
- package/es/queries/index.d.ts +1 -0
- package/es/queries/index.js +1 -0
- package/es/services/DataTable/index.d.ts +108 -0
- package/es/services/DataTable/index.js +220 -0
- package/es/styled/common.d.ts +1 -0
- package/es/styled/common.js +24 -0
- package/es/styled/index.d.ts +1 -0
- package/es/styled/index.js +1 -0
- package/es/tests/DataTableTest.js +85 -69
- package/es/types/actionsButton.d.ts +16 -0
- package/es/types/actionsButton.js +1 -0
- package/es/types/api.d.ts +4 -0
- package/es/types/condition.d.ts +6 -0
- package/es/types/condition.js +1 -0
- package/es/types/config.d.ts +1 -1
- package/es/types/index.d.ts +3 -0
- package/es/types/index.js +3 -0
- package/es/types/variables.d.ts +0 -17
- package/es/utils/actionButtons.d.ts +40 -0
- package/es/utils/actionButtons.js +61 -0
- package/es/utils/common.d.ts +31 -1
- package/es/utils/common.js +81 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/es/utils/loadable.d.ts +1 -1
- package/package.json +5 -4
- package/es/components/organism/DataTable/components/ToolbarActionButton/index.js +0 -52
- package/es/components/organism/DataTable/components/ToolbarActionButton/styled.d.ts +0 -5
- package/es/components/organism/DataTable/components/ToolbarActionButton/styled.js +0 -26
- /package/es/components/organism/DataTable/components/{ToolbarActionButton/index.d.ts → Toolbar/ToolbarActionButtons.d.ts} +0 -0
|
@@ -28,5 +28,8 @@ export declare const Input: string & import("styled-components").StyledComponent
|
|
|
28
28
|
Password: React.ForwardRefExoticComponent<import("antd/es/input").PasswordProps & React.RefAttributes<import("antd").InputRef>>;
|
|
29
29
|
}, {}> & {
|
|
30
30
|
DefaultInput: typeof AntdInput;
|
|
31
|
+
CustomSearch: typeof SearchInput;
|
|
31
32
|
};
|
|
33
|
+
declare const SearchInput: React.FC<InputProps>;
|
|
32
34
|
export declare const TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
|
|
35
|
+
export {};
|
|
@@ -16,11 +16,12 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
16
16
|
// Types
|
|
17
17
|
import { Input as AntdInput } from 'antd';
|
|
18
18
|
// Components
|
|
19
|
-
import { RequiredLabel, Text } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
19
|
+
import { Icon, RequiredLabel, Text } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
20
20
|
// Utils
|
|
21
21
|
import { handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
22
22
|
import { getPreventKeyboardAction } from '@antscorp/antsomi-ui/es/utils/web';
|
|
23
23
|
import { StyledInput } from './styled';
|
|
24
|
+
import { globalToken } from '@antscorp/antsomi-ui/es/constants';
|
|
24
25
|
const PATH = '@antscorp/antsomi-ui/es/components/atoms/Input/Input.tsx';
|
|
25
26
|
const OriginInput = props => {
|
|
26
27
|
// Props
|
|
@@ -95,6 +96,8 @@ OriginInput.defaultProps = {
|
|
|
95
96
|
withWrapper: true,
|
|
96
97
|
};
|
|
97
98
|
export const Input = OriginInput;
|
|
99
|
+
const SearchInput = props => (React.createElement(Input, Object.assign({ bordered: false, autoFocus: true, suffix: React.createElement(Icon, { type: "icon-ants-search-2", size: 24, color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw8 }) }, props, { className: `${props.className} antsomi-search-input` })));
|
|
100
|
+
Input.CustomSearch = SearchInput;
|
|
98
101
|
Input.TextArea = StyledInput.TextArea;
|
|
99
102
|
Input.DefaultInput = AntdInput;
|
|
100
103
|
Input.Password = AntdInput.Password;
|
|
@@ -13,8 +13,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import clsx from 'clsx';
|
|
15
15
|
import { InputNumber as AntdInputNumber } from 'antd';
|
|
16
|
+
import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
|
|
16
17
|
// Icons
|
|
17
18
|
import Icon from '@antscorp/icons';
|
|
19
|
+
// Translations
|
|
20
|
+
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
21
|
+
const { t } = i18nInstance;
|
|
18
22
|
export const InputNumber = props => {
|
|
19
23
|
// Props
|
|
20
24
|
const { showHandler, className } = props, restOfProps = __rest(props, ["showHandler", "className"]);
|
|
@@ -25,3 +29,20 @@ export const InputNumber = props => {
|
|
|
25
29
|
InputNumber.defaultProps = {
|
|
26
30
|
showHandler: true,
|
|
27
31
|
};
|
|
32
|
+
export const FormatInputNumber = InputNumber;
|
|
33
|
+
FormatInputNumber.defaultProps = {
|
|
34
|
+
formatter: (value, info) => {
|
|
35
|
+
if (info.userTyping)
|
|
36
|
+
return (value === null || value === void 0 ? void 0 : value.toString()) || '';
|
|
37
|
+
if (!value)
|
|
38
|
+
return '';
|
|
39
|
+
// Split the value into integer and decimal parts
|
|
40
|
+
const parts = value.toString().split('.');
|
|
41
|
+
// Format the integer part with commas
|
|
42
|
+
const integerPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
43
|
+
// Combine the formatted integer part with the decimal part (if any)
|
|
44
|
+
return parts[1] ? `${integerPart}.${parts[1].slice(0, 3)}` : `${integerPart}`;
|
|
45
|
+
},
|
|
46
|
+
placeholder: `${t(translations.format)}: 1,234.560`,
|
|
47
|
+
parser: value => value === null || value === void 0 ? void 0 : value.replace(/,/g, ''),
|
|
48
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InputNumber } from './InputNumber';
|
|
1
|
+
export { InputNumber, FormatInputNumber } from './InputNumber';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InputNumber } from './InputNumber';
|
|
1
|
+
export { InputNumber, FormatInputNumber } from './InputNumber';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Divider } from './Divider';
|
|
2
2
|
export { DividerPure } from './DividerPure';
|
|
3
3
|
export { Input, TextArea } from './Input';
|
|
4
|
-
export { InputNumber } from './InputNumber';
|
|
4
|
+
export { InputNumber, FormatInputNumber } from './InputNumber';
|
|
5
5
|
export { Radio, RadioGroupSub, RadioButton } from './Radio';
|
|
6
6
|
export { Space } from './Space';
|
|
7
7
|
export { Tag } from './Tag';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Divider } from './Divider';
|
|
2
2
|
export { DividerPure } from './DividerPure';
|
|
3
3
|
export { Input, TextArea } from './Input';
|
|
4
|
-
export { InputNumber } from './InputNumber';
|
|
4
|
+
export { InputNumber, FormatInputNumber } from './InputNumber';
|
|
5
5
|
export { Radio, RadioGroupSub, RadioButton } from './Radio';
|
|
6
6
|
export { Space } from './Space';
|
|
7
7
|
export { Tag } from './Tag';
|
|
@@ -28,10 +28,10 @@ export declare const CUSTOM_TYPE: {
|
|
|
28
28
|
};
|
|
29
29
|
export declare const buildOptionAttrArchive: (list: any[], selected: any) => any[];
|
|
30
30
|
export declare const checkStatusAttr: ({ listBO, itemTypeId, listAttribute, field, }: {
|
|
31
|
-
listBO?: any[]
|
|
32
|
-
itemTypeId?: number
|
|
33
|
-
listAttribute?: any[]
|
|
34
|
-
field?: string
|
|
31
|
+
listBO?: any[];
|
|
32
|
+
itemTypeId?: number;
|
|
33
|
+
listAttribute?: any[];
|
|
34
|
+
field?: string;
|
|
35
35
|
}) => {
|
|
36
36
|
errorMessage: string;
|
|
37
37
|
isDisable: boolean;
|
|
@@ -9,7 +9,7 @@ export declare const ACTION_TYPES: {
|
|
|
9
9
|
readonly apply: "apply";
|
|
10
10
|
readonly resetValue: "reset_value";
|
|
11
11
|
};
|
|
12
|
-
export declare const changeRangeType: (rangeType: string, callback?: (
|
|
12
|
+
export declare const changeRangeType: (rangeType: string, callback?: (rangeInfo: RangeInfo) => void) => {
|
|
13
13
|
type: "change_range_type";
|
|
14
14
|
payload: {
|
|
15
15
|
rangeType: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const useCalendarSelectionContext: () => {
|
|
2
|
-
state: import("
|
|
3
|
-
action: import("
|
|
2
|
+
state: import("../types").ReducerState;
|
|
3
|
+
action: import("../types").ActionType;
|
|
4
4
|
};
|
|
@@ -29,7 +29,7 @@ export declare const getDefaultDate: () => {
|
|
|
29
29
|
export declare const getRangeValue: ({ rangeInfo, currentRangeValue, limitNumOfDays, }: {
|
|
30
30
|
rangeInfo: RangeInfo;
|
|
31
31
|
currentRangeValue: RangeValue[];
|
|
32
|
-
limitNumOfDays?: number
|
|
32
|
+
limitNumOfDays?: number;
|
|
33
33
|
}) => RangeValue[];
|
|
34
34
|
export declare const getRangeValueSelctedTitle: (rangeValue: RangeValue[], options?: {
|
|
35
35
|
formatStart?: string;
|
|
@@ -44,7 +44,7 @@ export declare const combineCurrentValue: (state: ReducerState) => {
|
|
|
44
44
|
};
|
|
45
45
|
export declare const genTriggerOut: ({ mode, id, }: {
|
|
46
46
|
mode: ReducerState['triggerOut']['mode'];
|
|
47
|
-
id?: number
|
|
47
|
+
id?: number;
|
|
48
48
|
}) => {
|
|
49
49
|
mode: "auto" | "manual";
|
|
50
50
|
id: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var _a, _b;
|
|
1
2
|
/* eslint-disable react/no-unused-prop-types */
|
|
2
3
|
// Libraries
|
|
3
4
|
import React, { useEffect, useMemo, useCallback, useState } from 'react';
|
|
@@ -29,7 +30,7 @@ const { Text } = Typography;
|
|
|
29
30
|
export const AdvancedPicker = props => {
|
|
30
31
|
var _a, _b;
|
|
31
32
|
// Props
|
|
32
|
-
const { label, inputStyle, dateTypeKeysShow, calculationTypeKeysShow, showCalculationTypeCondition, defaultDateTypeKey, valueType, option: propsOption, operatorKey, type, date: propsDate, format, formatInputDisplay, errorMessage, disableAfterDate, disableBeforeDate, showTime, disabled, timezone, isViewMode, onUpdatedNewDate, onApply, } = props;
|
|
33
|
+
const { label, inputStyle, popupStyle, dateTypeKeysShow, calculationTypeKeysShow, showCalculationTypeCondition, defaultDateTypeKey, valueType, option: propsOption, operatorKey, type, date: propsDate, format, formatInputDisplay, errorMessage, disableAfterDate, disableBeforeDate, showTime, disabled, timezone, isViewMode, onUpdatedNewDate, onApply, } = props;
|
|
33
34
|
// Memo
|
|
34
35
|
const newDateTypes = useMemo(() => {
|
|
35
36
|
if (dateTypeKeysShow && dateTypeKeysShow.length) {
|
|
@@ -386,7 +387,7 @@ export const AdvancedPicker = props => {
|
|
|
386
387
|
!!label && typeof label === 'string' ? (React.createElement(Text, { style: { color: '#666666' } }, label)) : (label),
|
|
387
388
|
option.dateType.value === 'fixed' &&
|
|
388
389
|
!['WEEK', 'DAY_OF_WEEK', 'MONTH_DAY', 'DAY'].includes(valueType) ? (React.createElement(Tooltip, { title: selectedDateTitle },
|
|
389
|
-
React.createElement(DatePicker, { disabled: disabled, open: !disabled && isOpen, allowClear: false, inputReadOnly: true, style: Object.assign({ textOverflow: 'ellipsis' }, inputStyle), status: errorMessage ? 'error' : '', inputRender: () => (React.createElement(DatePickerCustomInput, { readOnly: true, placeholder: "Select Date", value: selectedDateTitle, onClick: () => toggleOpenDropdown() })), value: currDate,
|
|
390
|
+
React.createElement(DatePicker, { disabled: disabled, open: !disabled && isOpen, popupStyle: popupStyle, allowClear: false, inputReadOnly: true, style: Object.assign({ textOverflow: 'ellipsis' }, inputStyle), status: errorMessage ? 'error' : '', inputRender: () => (React.createElement(DatePickerCustomInput, { readOnly: true, placeholder: "Select Date", value: selectedDateTitle, onClick: () => toggleOpenDropdown() })), value: currDate,
|
|
390
391
|
// style={{
|
|
391
392
|
// width: 120,
|
|
392
393
|
// }}
|
|
@@ -433,6 +434,7 @@ export const AdvancedPicker = props => {
|
|
|
433
434
|
AdvancedPicker.defaultProps = {
|
|
434
435
|
label: '',
|
|
435
436
|
type: ADVANCED_PICKER_TYPE.START_DATE.value,
|
|
437
|
+
popupStyle: { borderRadius: (_b = (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.borderRadiusLG) !== null && _b !== void 0 ? _b : 10 },
|
|
436
438
|
operatorKey: 'after',
|
|
437
439
|
dateTypeKeysShow: [],
|
|
438
440
|
date: dayjs().format(DEFAULT_DATE_FORMAT),
|
package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var _a, _b;
|
|
1
2
|
// Libraries
|
|
2
3
|
import dayjs from 'dayjs';
|
|
3
4
|
import React, { useState } from 'react';
|
|
@@ -10,6 +11,7 @@ import { Space } from '../../../../atoms';
|
|
|
10
11
|
import { AdvancedPicker } from '../AdvancedPicker';
|
|
11
12
|
// Constants
|
|
12
13
|
import { ADVANCED_RANGE_PICKER_FORMAT } from './constants';
|
|
14
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
13
15
|
// Utils
|
|
14
16
|
import { handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
15
17
|
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
@@ -20,7 +22,7 @@ const PATH = '@antscorp/antsomi-ui/es/components/molecules/DatePicker/components
|
|
|
20
22
|
export const AdvancedRangePicker = props => {
|
|
21
23
|
const { t } = i18nInstance;
|
|
22
24
|
// Props
|
|
23
|
-
const { className, valueType, useFormatMapping, timeRange, errorMessage, showLabel, startDateConfig, endDateConfig, showTime, showCalculationTypeCondition, disabled, timezone, separator, inputStyle, isViewMode, onChange, } = props;
|
|
25
|
+
const { className, valueType, useFormatMapping, timeRange, errorMessage, showLabel, startDateConfig, endDateConfig, showTime, showCalculationTypeCondition, disabled, timezone, separator, inputStyle, popupStyle, isViewMode, onChange, } = props;
|
|
24
26
|
const [timeRangeState, setTimeRange] = useState(timeRange);
|
|
25
27
|
useDeepCompareEffect(() => {
|
|
26
28
|
if (typeof onChange === 'function') {
|
|
@@ -60,13 +62,13 @@ export const AdvancedRangePicker = props => {
|
|
|
60
62
|
? getFormatDisplayFromValueType('startDate', valueType)
|
|
61
63
|
: ADVANCED_RANGE_PICKER_FORMAT.startDate,
|
|
62
64
|
// format={ADVANCED_RANGE_PICKER_FORMAT.startDate}
|
|
63
|
-
errorMessage: errorMessage, disableAfterDate: timeRange.endDate.date, showTime: showTime, calculationTypeKeysShow: startDateConfig === null || startDateConfig === void 0 ? void 0 : startDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('startDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('startDate', Object.assign({ date }, option), 'user'), inputStyle: inputStyle, isViewMode: isViewMode }),
|
|
65
|
+
errorMessage: errorMessage, disableAfterDate: timeRange.endDate.date, showTime: showTime, calculationTypeKeysShow: startDateConfig === null || startDateConfig === void 0 ? void 0 : startDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('startDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('startDate', Object.assign({ date }, option), 'user'), inputStyle: inputStyle, popupStyle: popupStyle, isViewMode: isViewMode }),
|
|
64
66
|
separator || null,
|
|
65
67
|
React.createElement(AdvancedPicker, { valueType: valueType, disabled: disabled, label: showLabel ? t(translations.datePicker.endDate) || '' : '', date: timeRange.endDate.date, option: omit(timeRange.endDate, 'date'), operatorKey: "between", type: "endDate", format: useFormatMapping
|
|
66
68
|
? getFormatDisplayFromValueType('endDate', valueType)
|
|
67
69
|
: ADVANCED_RANGE_PICKER_FORMAT.endDate,
|
|
68
70
|
// format={ADVANCED_RANGE_PICKER_FORMAT.endDate}
|
|
69
|
-
errorMessage: errorMessage, showTime: showTime, calculationTypeKeysShow: endDateConfig === null || endDateConfig === void 0 ? void 0 : endDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('endDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('endDate', Object.assign({ date }, option), 'user'), inputStyle: inputStyle, isViewMode: isViewMode })));
|
|
71
|
+
errorMessage: errorMessage, showTime: showTime, calculationTypeKeysShow: endDateConfig === null || endDateConfig === void 0 ? void 0 : endDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('endDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('endDate', Object.assign({ date }, option), 'user'), inputStyle: inputStyle, popupStyle: popupStyle, isViewMode: isViewMode })));
|
|
70
72
|
};
|
|
71
73
|
AdvancedRangePicker.defaultProps = {
|
|
72
74
|
timeRange: {
|
|
@@ -85,6 +87,7 @@ AdvancedRangePicker.defaultProps = {
|
|
|
85
87
|
dateType: 'today',
|
|
86
88
|
},
|
|
87
89
|
},
|
|
90
|
+
popupStyle: { borderRadius: (_b = (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.borderRadiusLG) !== null && _b !== void 0 ? _b : 10 },
|
|
88
91
|
errorMessage: '',
|
|
89
92
|
disabled: false,
|
|
90
93
|
showLabel: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DrawerHeaderProps } from './types';
|
|
3
|
-
export declare const StyledDrawer: import("styled-components").StyledComponent<import("react").FC<import("
|
|
3
|
+
export declare const StyledDrawer: import("styled-components").StyledComponent<import("react").FC<import("../Drawer").DrawerProps>, any, {}, never>;
|
|
4
4
|
export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const LeftMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export declare const CloseBtn: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -25,7 +25,7 @@ interface EditorTabProps {
|
|
|
25
25
|
confirmOnRemoveTab?: boolean;
|
|
26
26
|
modalFuncProps?: ModalFuncProps;
|
|
27
27
|
onActiveTab: (id: string) => void;
|
|
28
|
-
onCloseTab
|
|
28
|
+
onCloseTab?: (tab: EditorTabItem, index: number, newTabs: EditorTabItem[]) => void;
|
|
29
29
|
onClickRemoveTab?: (tab: EditorTabItem, index: number, newTabs: EditorTabItem[]) => void;
|
|
30
30
|
onConfirmRemove?: (tab: EditorTabItem) => void;
|
|
31
31
|
onConfigure: (id: string) => void;
|
|
@@ -22,7 +22,7 @@ export const EditorTab = props => {
|
|
|
22
22
|
var _a;
|
|
23
23
|
const { listTab = [], activeId = '', showArrow, showDropdown, editNameOnConfigure,
|
|
24
24
|
// disabledScroll,
|
|
25
|
-
onCloseTab, onClickRemoveTab, onConfirmRemove, onActiveTab, onAddTab, onConfigure, onSaveName, newTabText, showComposeNewQuery, className, leftBlockClassName, tabItemClassName, confirmOnRemoveTab
|
|
25
|
+
onCloseTab, onClickRemoveTab, onConfirmRemove, onActiveTab, onAddTab, onConfigure, onSaveName, newTabText, showComposeNewQuery, className, leftBlockClassName, tabItemClassName, confirmOnRemoveTab, modalFuncProps, } = props;
|
|
26
26
|
const [activeTabId, setActiveTabId] = useState(activeId || ((_a = listTab === null || listTab === void 0 ? void 0 : listTab[0]) === null || _a === void 0 ? void 0 : _a.id));
|
|
27
27
|
const [arrTabs, setArrTabs] = useState(listTab || []);
|
|
28
28
|
const [isEditable, setIsEditable] = useState();
|
|
@@ -115,7 +115,7 @@ export const EditorTab = props => {
|
|
|
115
115
|
handleActiveTab(arrTabs[idx + 1].id);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
onCloseTab(tab, idx, newTabs);
|
|
118
|
+
onCloseTab === null || onCloseTab === void 0 ? void 0 : onCloseTab(tab, idx, newTabs);
|
|
119
119
|
setArrTabs(newTabs);
|
|
120
120
|
});
|
|
121
121
|
const onWheelLeftBlock = useCallback(event => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { FlexProps } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
3
|
+
export interface EmptyDataProps extends Omit<FlexProps, 'children' | 'title'> {
|
|
4
|
+
showIcon?: boolean;
|
|
3
5
|
size?: TUISize;
|
|
4
6
|
icon?: React.ReactNode;
|
|
5
7
|
title?: React.ReactNode;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
// Libraries
|
|
2
13
|
import React from 'react';
|
|
3
14
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
@@ -10,12 +21,13 @@ import { Icon } from '@antscorp/antsomi-ui/es/components';
|
|
|
10
21
|
import { EmptyIcon, EmptyWrapper, ImageWrapper } from './styled';
|
|
11
22
|
const { Text } = Typography;
|
|
12
23
|
export const EmptyData = props => {
|
|
13
|
-
const { size = 'medium', icon = 'icon-ants-media', title, subTitle, description, loading, className, image, imageClassName, imageStyle, children
|
|
14
|
-
return (React.createElement(EmptyWrapper, { className: className },
|
|
24
|
+
const { size = 'medium', icon = 'icon-ants-media', showIcon = true, title, subTitle, description, loading, className, image, imageClassName, imageStyle, children } = props, restOfProps = __rest(props, ["size", "icon", "showIcon", "title", "subTitle", "description", "loading", "className", "image", "imageClassName", "imageStyle", "children"]);
|
|
25
|
+
return (React.createElement(EmptyWrapper, Object.assign({ className: className }, restOfProps),
|
|
15
26
|
React.createElement(Flex, { vertical: true, align: "center", justify: "center", gap: 15 },
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
React.createElement(
|
|
27
|
+
!!showIcon && (React.createElement(React.Fragment, null,
|
|
28
|
+
!image && (React.createElement(EmptyIcon, { className: "animate__animated animate__tada", "$size": size }, isString(icon) ? React.createElement(Icon, { type: icon }) : icon)),
|
|
29
|
+
image && (React.createElement(ImageWrapper, { className: imageClassName, style: imageStyle },
|
|
30
|
+
React.createElement("img", { src: image, alt: "" }))))),
|
|
19
31
|
loading ? (React.createElement(Spin, { indicator: React.createElement(LoadingOutlined, { style: { fontSize: 24 }, spin: true }) })) : (React.createElement(Flex, { gap: 5, align: "center", justify: "center", vertical: true },
|
|
20
32
|
title && React.createElement(Text, { className: "title animate__animated animate__fadeInUp" }, title),
|
|
21
33
|
subTitle && (React.createElement(Text, { className: "subTitle animate__animated animate__fadeInUp" }, subTitle)),
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { AccountSelectionProps } from '../AccountSelection';
|
|
3
3
|
import { AccountSharingProps } from '../../organism';
|
|
4
4
|
import { IHelpProps } from '../../organism/Help/types';
|
|
5
|
-
import {
|
|
5
|
+
import { TEnv } from '@antscorp/antsomi-ui/es/types/config';
|
|
6
6
|
interface Breadcrumb {
|
|
7
7
|
title: string;
|
|
8
8
|
link?: string;
|
|
@@ -31,7 +31,7 @@ export interface HeaderV2Props {
|
|
|
31
31
|
useURLParam?: boolean;
|
|
32
32
|
rightContent?: React.ReactNode;
|
|
33
33
|
config?: {
|
|
34
|
-
env?:
|
|
34
|
+
env?: TEnv;
|
|
35
35
|
language?: string;
|
|
36
36
|
userId?: number;
|
|
37
37
|
portalId?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledModal: import("styled-components").StyledComponent<import("react").FC<import("
|
|
2
|
+
export declare const StyledModal: import("styled-components").StyledComponent<import("react").FC<import("../ModalV2").ModalV2Props>, any, {}, never>;
|
|
3
3
|
export declare const ModalHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
4
4
|
export declare const ModalBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -3,17 +3,17 @@ export declare const useShareAccess: () => {
|
|
|
3
3
|
state: {
|
|
4
4
|
allowEdit: boolean;
|
|
5
5
|
allowView: boolean;
|
|
6
|
-
accessInfo?: import("
|
|
6
|
+
accessInfo?: import("../types").ObjectAccessInfo | undefined;
|
|
7
7
|
accessUserId?: number | undefined;
|
|
8
8
|
accessUserPermission?: {
|
|
9
9
|
view: number;
|
|
10
10
|
edit: number;
|
|
11
11
|
} | undefined;
|
|
12
|
-
excludeUserAccess?: import("
|
|
12
|
+
excludeUserAccess?: import("../types").ExcludeUserAccess | undefined;
|
|
13
13
|
modalTransferOwnership: {
|
|
14
14
|
open: boolean;
|
|
15
15
|
userToOwnerShipId: number;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
dispatch: import("react").Dispatch<import("
|
|
18
|
+
dispatch: import("react").Dispatch<import("../types").ShareAccessAction> | null;
|
|
19
19
|
};
|
|
@@ -66,7 +66,7 @@ export declare const useTemplateSave: (options: TemplateListingOptions) => {
|
|
|
66
66
|
form: import("antd").FormInstance<FormValue>;
|
|
67
67
|
errors: any[] | undefined;
|
|
68
68
|
refetchCategoryList: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<TemplateCategory[], any>>;
|
|
69
|
-
refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("
|
|
69
|
+
refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("../../../../models/ObjectTemplate").ObjectTemplate>>, any>>;
|
|
70
70
|
onLoadMore: () => void;
|
|
71
71
|
onChange: (newValue: Partial<TemplateValueOptions>) => void;
|
|
72
72
|
};
|
|
@@ -234,7 +234,7 @@ export const ThumbnailCard = (props) => {
|
|
|
234
234
|
// Handlers
|
|
235
235
|
const handleRemoveThumbnail = e => {
|
|
236
236
|
e.stopPropagation();
|
|
237
|
-
modal.confirm(Object.assign(Object.assign({ title: 'Remove template', centered: true, icon: React.createElement(Icon, { type: "icon-ants-info", style: { fontSize: 16, lineHeight: '25px' } }), content: (React.createElement("div", null,
|
|
237
|
+
modal.confirm(Object.assign(Object.assign({ title: 'Remove template', centered: true, icon: (React.createElement(Icon, { type: "icon-ants-info", style: { fontSize: 16, lineHeight: '25px', marginRight: 13 } })), content: (React.createElement("div", null,
|
|
238
238
|
React.createElement("p", null, "Are you sure you want to remove the template?"),
|
|
239
239
|
React.createElement("p", null, "This action can not be undone."))), okText: 'Remove', cancelText: 'Cancel', closable: true }, restOfRemoveTemplateModalProps), { onOk: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
240
240
|
if (onOk)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tree } from 'antd';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tree';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tree';
|
|
@@ -55,6 +55,7 @@ export * from './Drawer';
|
|
|
55
55
|
export * from './DrawerDetail';
|
|
56
56
|
export * from './ThumbnailCard';
|
|
57
57
|
export * from './ProcessLoading';
|
|
58
|
+
export * from './Tree';
|
|
58
59
|
export { EditorScript } from './EditorScript';
|
|
59
60
|
export { EditorTab } from './EditorTab';
|
|
60
61
|
export { SelectAccount } from './SelectAccount';
|
|
@@ -65,10 +66,10 @@ export type { TFontSettingProps, TFontSettingEditProps } from './FontSetting';
|
|
|
65
66
|
export type { IResizeGridProps, TCell, TGrid } from './ResizeGrid';
|
|
66
67
|
export type { ModalProps } from './ModalV2';
|
|
67
68
|
export type { TemplateValueOptions } from './TemplateSaveAs';
|
|
69
|
+
export type { ImageResizeHandle } from './ImageEditor';
|
|
68
70
|
export type { SelectProps as SelectV2Props } from './SelectV2';
|
|
69
71
|
export type { InputNumberProps as InputNumberWithLabelProps } from './InputNumber';
|
|
70
72
|
export type { ModalSelectProps } from './ModalSelect';
|
|
71
|
-
export type { ImageResizeHandle } from './ImageEditor';
|
|
72
73
|
export type { EditableNameHandle } from './EditableName';
|
|
73
74
|
export type { AccountListingHandle, AccountSelectionProps } from './AccountSelection';
|
|
74
75
|
export type { VirtualizedMenuProps } from './VirtualizedMenu';
|
|
@@ -55,6 +55,7 @@ export * from './Drawer';
|
|
|
55
55
|
export * from './DrawerDetail';
|
|
56
56
|
export * from './ThumbnailCard';
|
|
57
57
|
export * from './ProcessLoading';
|
|
58
|
+
export * from './Tree';
|
|
58
59
|
export { EditorScript } from './EditorScript';
|
|
59
60
|
export { EditorTab } from './EditorTab';
|
|
60
61
|
export { SelectAccount } from './SelectAccount';
|
|
@@ -10,7 +10,7 @@ export declare const AlgorithmWrapper: import("styled-components").StyledCompone
|
|
|
10
10
|
mode: ContentSourceModeView;
|
|
11
11
|
}, never>;
|
|
12
12
|
export declare const StyledSelect: import("styled-components").StyledComponent<{
|
|
13
|
-
(props: import("
|
|
13
|
+
(props: import("../../molecules").SelectV2Props): import("react").JSX.Element;
|
|
14
14
|
defaultProps: {
|
|
15
15
|
suffixIcon: import("react").JSX.Element;
|
|
16
16
|
filterOption: (input: any, option: any) => boolean;
|
|
@@ -9,7 +9,7 @@ export interface ContentSourceProviderProps {
|
|
|
9
9
|
export declare const ContentSourceProvider: ({ children }: ContentSourceProviderProps) => React.JSX.Element;
|
|
10
10
|
export declare const useContentSourceState: () => ContentSourceState;
|
|
11
11
|
export declare const useContentSourceDispatch: () => React.Dispatch<UpdateGroupAction>;
|
|
12
|
-
export declare const useSelectServiceAuth: () => import("
|
|
12
|
+
export declare const useSelectServiceAuth: () => import("../../..").PayloadInfo;
|
|
13
13
|
export declare const useSelectContentSources: () => import("./types").TContentSourceSettings;
|
|
14
14
|
export declare const useSelectCSGroups: () => import("./types").TContentSourceGroup[];
|
|
15
15
|
export declare const useSelectModeView: () => import("./types").ContentSourceModeView;
|
|
@@ -17,11 +17,11 @@ export declare const isCheckStatusAttr: (listBO: any, itemTypeId: any, listAttri
|
|
|
17
17
|
isDisable: boolean;
|
|
18
18
|
};
|
|
19
19
|
export declare const checkStatusCollection: ({ listBO, itemTypeId, listCollection, field, checkDisable, }: {
|
|
20
|
-
listBO?: any[]
|
|
21
|
-
itemTypeId?: number | null
|
|
22
|
-
listCollection?: any[]
|
|
23
|
-
field?: string
|
|
24
|
-
checkDisable?: boolean
|
|
20
|
+
listBO?: any[];
|
|
21
|
+
itemTypeId?: number | null;
|
|
22
|
+
listCollection?: any[];
|
|
23
|
+
field?: string;
|
|
24
|
+
checkDisable?: boolean;
|
|
25
25
|
}) => {
|
|
26
26
|
errorMessage: string;
|
|
27
27
|
isDisable: boolean;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DataTableProps } from './types';
|
|
3
|
-
export declare function DataTable<TTableDataType>(props: DataTableProps<TTableDataType>): React.JSX.Element
|
|
3
|
+
export declare function DataTable<TTableDataType>(props: DataTableProps<TTableDataType>): React.JSX.Element;
|
|
4
|
+
export declare namespace DataTable {
|
|
5
|
+
var useDataTableStore: typeof import("./hooks/useDataTableStore").useDataTableStore;
|
|
6
|
+
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
/* eslint-disable react/function-component-definition */
|
|
2
13
|
// Libraries
|
|
3
|
-
import React
|
|
14
|
+
import React from 'react';
|
|
4
15
|
// Hooks
|
|
5
16
|
import { useDataTable } from './hooks';
|
|
6
17
|
// Styled
|
|
@@ -11,23 +22,24 @@ import { Table, Pagination, Toolbar } from './components';
|
|
|
11
22
|
import { DataTableProvider } from './providers/DataTableProvider';
|
|
12
23
|
import { AntdTableConfigProvider } from './providers';
|
|
13
24
|
// Store
|
|
14
|
-
import {
|
|
25
|
+
import { useDataTableStore } from './hooks/useDataTableStore';
|
|
15
26
|
function DataTableComponent(props) {
|
|
16
27
|
// Hooks
|
|
17
28
|
const { pagination, setPagination } = useDataTable(props);
|
|
18
29
|
return (React.createElement(DataTableWrapper, null,
|
|
19
30
|
React.createElement(Toolbar, null),
|
|
20
31
|
React.createElement(Table, null),
|
|
21
|
-
React.createElement(Pagination, { id: "data-table-pagination",
|
|
32
|
+
React.createElement(Pagination, Object.assign({ id: "data-table-pagination" }, pagination, { onChange: payload => {
|
|
33
|
+
var _a;
|
|
34
|
+
setPagination(payload);
|
|
35
|
+
(_a = pagination === null || pagination === void 0 ? void 0 : pagination.onChange) === null || _a === void 0 ? void 0 : _a.call(pagination, payload);
|
|
36
|
+
} }))));
|
|
22
37
|
}
|
|
23
38
|
export function DataTable(props) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
storeRef.current = createDataTableStore(props);
|
|
27
|
-
}
|
|
28
|
-
if (!storeRef.current)
|
|
29
|
-
return null;
|
|
39
|
+
const { store } = props, restOfProps = __rest(props, ["store"]);
|
|
40
|
+
const defaultStore = useDataTableStore(restOfProps);
|
|
30
41
|
return (React.createElement(AntdTableConfigProvider, null,
|
|
31
|
-
React.createElement(DataTableProvider, { store:
|
|
32
|
-
React.createElement(DataTableComponent, Object.assign({},
|
|
42
|
+
React.createElement(DataTableProvider, { store: store || defaultStore },
|
|
43
|
+
React.createElement(DataTableComponent, Object.assign({}, restOfProps)))));
|
|
33
44
|
}
|
|
45
|
+
DataTable.useDataTableStore = useDataTableStore;
|