@antscorp/antsomi-ui 1.3.5-beta.704 → 1.3.5-beta.706
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/Image/Image.d.ts +2 -0
- package/es/components/atoms/Image/Image.js +1 -0
- package/es/components/atoms/Image/index.d.ts +1 -0
- package/es/components/atoms/Image/index.js +1 -0
- package/es/components/atoms/index.d.ts +2 -0
- package/es/components/atoms/index.js +1 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +11 -5
- package/es/components/molecules/MatchAnySelect/MatchesAnySelect.js +10 -3
- package/es/components/molecules/MatchAnySelect/styled.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Image } from 'antd';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Image';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Image';
|
|
@@ -30,6 +30,7 @@ export { Rate } from './Rate';
|
|
|
30
30
|
export { SliderV2 } from './SliderV2';
|
|
31
31
|
export { InputDynamic } from './InputDynamic';
|
|
32
32
|
export { ContentEditable } from './ContentEditable';
|
|
33
|
+
export { Image } from './Image';
|
|
33
34
|
export * from './Flex';
|
|
34
35
|
export * from './PreviewTabs';
|
|
35
36
|
export * from './MobileFrame';
|
|
@@ -46,3 +47,4 @@ export * from './Avatar';
|
|
|
46
47
|
export type { SliderProps } from './Slider';
|
|
47
48
|
export type { PaginationProps } from './Pagination';
|
|
48
49
|
export type { InputDynamicProps } from './InputDynamic';
|
|
50
|
+
export type { ImageProps } from './Image';
|
|
@@ -30,6 +30,7 @@ export { Rate } from './Rate';
|
|
|
30
30
|
export { SliderV2 } from './SliderV2';
|
|
31
31
|
export { InputDynamic } from './InputDynamic';
|
|
32
32
|
export { ContentEditable } from './ContentEditable';
|
|
33
|
+
export { Image } from './Image';
|
|
33
34
|
export * from './Flex';
|
|
34
35
|
export * from './PreviewTabs';
|
|
35
36
|
export * from './MobileFrame';
|
|
@@ -25,12 +25,18 @@ import { CALCULATION_DATES, CALCULATION_TYPES, DATE_TYPES, DEFAULT_DATE_FORMAT,
|
|
|
25
25
|
import { globalToken, THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
26
26
|
import { useOutsideClick } from '@antscorp/antsomi-ui/es/hooks/useOutsideClick';
|
|
27
27
|
const isDisabledSpecificTime = (current, info, disabledTime, date) => {
|
|
28
|
-
if (
|
|
28
|
+
if (typeof current !== 'number' || !disabledTime)
|
|
29
29
|
return false;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
switch (info.subType) {
|
|
31
|
+
case 'hour':
|
|
32
|
+
return disabledTime(date).disabledHours().includes(current);
|
|
33
|
+
case 'minute':
|
|
34
|
+
return disabledTime(date).disabledMinutes().includes(current);
|
|
35
|
+
case 'second':
|
|
36
|
+
return disabledTime(date).disabledSeconds().includes(current);
|
|
37
|
+
default:
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
34
40
|
};
|
|
35
41
|
const PATH = '@antscorp/antsomi-ui/es/components/molecules/DatePicker/components/Advanced/DatePickerAdvanced.tsx';
|
|
36
42
|
const { useToken } = theme;
|
|
@@ -194,11 +194,18 @@ export function MatchesAny(props) {
|
|
|
194
194
|
children: serializeTreeData(item.children),
|
|
195
195
|
}));
|
|
196
196
|
});
|
|
197
|
+
// Handle add load more item for serve load more
|
|
197
198
|
let treeData = serializeTreeData(results);
|
|
198
199
|
// Filter the tree data based on the group selected items
|
|
199
200
|
if (groupSelectProps && ((_a = groupSelectProps.selected) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
200
201
|
treeData = treeData.filter(item => { var _a; return (_a = groupSelectProps.selected) === null || _a === void 0 ? void 0 : _a.includes(item.key); });
|
|
201
202
|
}
|
|
203
|
+
treeData = treeData.concat({
|
|
204
|
+
key: 'load-more',
|
|
205
|
+
title: '',
|
|
206
|
+
isLoadMore: true,
|
|
207
|
+
className: 'load-more-node',
|
|
208
|
+
});
|
|
202
209
|
return { treeData, matchedParents };
|
|
203
210
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
204
211
|
}, [items, searchValue, selectedItems, groupSelectProps, onChangeSearch]);
|
|
@@ -244,10 +251,10 @@ export function MatchesAny(props) {
|
|
|
244
251
|
: items === null || items === void 0 ? void 0 : items.map(item => item.key), selectable: false, treeData: treeData, switcherIcon: props => (React.createElement(Icon, { type: "icon-ants-caret-down", style: {
|
|
245
252
|
transform: props.expanded ? 'rotate(0)' : 'rotate(-90deg)',
|
|
246
253
|
transition: 'transform 0.3s ease',
|
|
247
|
-
}, color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw8 })), titleRender: item => renderItemNodeTitle({
|
|
248
|
-
item
|
|
254
|
+
}, color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw8 })), titleRender: (item) => isShowLoadMoreEl && item.isLoadMore ? (React.createElement("div", { ref: loadMoreRef })) : (renderItemNodeTitle({
|
|
255
|
+
item,
|
|
249
256
|
onSelectItem,
|
|
250
|
-
}), height: 396 }),
|
|
257
|
+
})), height: 396 }),
|
|
251
258
|
isShowLoadMoreEl && React.createElement("div", { ref: loadMoreRef }))) : (React.createElement(EmptyData, Object.assign({ icon: listEmptyIcon, showIcon: !!listEmptyIcon, description: listEmptyDescription }, restListEmptyProps)))))));
|
|
252
259
|
};
|
|
253
260
|
const renderSelectedList = () => (React.createElement("div", { className: "matches-any__section" },
|