@antscorp/antsomi-ui 1.3.5-beta.512 → 1.3.5-beta.514
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/molecules/DrawerDetail/DrawerDetail.js +1 -1
- package/es/components/molecules/Tabs/Tabs.js +4 -0
- package/es/components/organism/DataTable/hooks/useDataTableListing/useDataTableListing.js +2 -2
- package/es/components/organism/LeftMenu/utils/index.js +2 -2
- package/es/components/organism/ModifyColumnModal/ModifyColumnModal.js +4 -2
- package/es/components/organism/ModifyColumnModal/styled.js +4 -0
- package/package.json +1 -1
|
@@ -137,7 +137,7 @@ export const DrawerDetail = props => {
|
|
|
137
137
|
React.createElement("div", null,
|
|
138
138
|
showClose && (React.createElement(CloseBtn, { onClick: onClose },
|
|
139
139
|
React.createElement(Icon, { type: "icon-ants-remove-slim", size: 14 }))),
|
|
140
|
-
React.createElement(Flex, { vertical: true, gap: 10, align: "center", justify: "center" }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement(Tooltip, { key: item === null || item === void 0 ? void 0 : item.key, title: item === null || item === void 0 ? void 0 : item.label, mouseEnterDelay: 0.3 },
|
|
140
|
+
React.createElement(Flex, { vertical: true, gap: 10, align: "center", justify: "center" }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement(Tooltip, { key: item === null || item === void 0 ? void 0 : item.key, title: item === null || item === void 0 ? void 0 : item.label, mouseEnterDelay: 0.3, placement: "right" },
|
|
141
141
|
React.createElement(MenuItem, { key: item === null || item === void 0 ? void 0 : item.key, className: (selectedKeys === null || selectedKeys === void 0 ? void 0 : selectedKeys.includes(item.key)) ? 'active' : '', onClick: () => onClick && onClick(item) }, item.icon)))))),
|
|
142
142
|
React.createElement(MenuFooter, null, footer))),
|
|
143
143
|
React.createElement(Content, null,
|
|
@@ -30,7 +30,7 @@ import { Typography, Switch, Flex } from '@antscorp/antsomi-ui/es/components/ato
|
|
|
30
30
|
// Constants
|
|
31
31
|
import { COLUMN_DOMAIN, OPERATORS_CODE, QUERY_KEYS, globalToken, } from '@antscorp/antsomi-ui/es/constants';
|
|
32
32
|
import { MODIFY_COLUMN_DISABLE_EDITABLE, MODIFY_COLUMN_DISABLE_REMOVE, SAVED_FILTER_DEFAULT, TABLE_LISTING_PREFIX, } from './constants';
|
|
33
|
-
import { DEFAULT_CELL_EMPTY, DEFAULT_TOGGLE_WIDTH, SORT_MAP } from '../../constants';
|
|
33
|
+
import { DEFAULT_CELL_EMPTY, DEFAULT_PAGE_SIZE, DEFAULT_TOGGLE_WIDTH, SORT_MAP, } from '../../constants';
|
|
34
34
|
// Hooks
|
|
35
35
|
import { useDeepCompareEffect, useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
|
|
36
36
|
import { useCreateModifyColumn, useDeleteModifyColumn, useDeleteSavedFilter, useGetColumnMetrics, useGetFilterMetricList, useGetInfiniteMatchesAnyList, useGetModifyColumnList, useGetSavedFilterList, useGetSearchListing, useGetTableListing, useSaveFilter, useUpdateFilter, useUpdateModifyColumn, } from '@antscorp/antsomi-ui/es/queries';
|
|
@@ -45,7 +45,7 @@ const initialState = {
|
|
|
45
45
|
selectedFilterId: SAVED_FILTER_DEFAULT[0].id,
|
|
46
46
|
pagination: {
|
|
47
47
|
page: 1,
|
|
48
|
-
pageSize:
|
|
48
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
49
49
|
total: 0,
|
|
50
50
|
},
|
|
51
51
|
table: {
|
|
@@ -53,10 +53,10 @@ export const flattenMenuArray = (menuItems, childKey) => {
|
|
|
53
53
|
export const recursivePermissionMenu = (menuItems, menuPermissions) => {
|
|
54
54
|
var _a, _b;
|
|
55
55
|
const menu = (_b = (_a = menuItems === null || menuItems === void 0 ? void 0 : menuItems.filter(({ permission_code, menu_item_type }) => {
|
|
56
|
-
if (Number(menu_item_type)
|
|
56
|
+
if (Number(menu_item_type) !== MENU_ITEM_TYPE.MENU) {
|
|
57
57
|
return true;
|
|
58
58
|
}
|
|
59
|
-
return !!(menuPermissions === null || menuPermissions === void 0 ? void 0 : menuPermissions.find(({
|
|
59
|
+
return !!(menuPermissions === null || menuPermissions === void 0 ? void 0 : menuPermissions.find(({ menu_code = '' }) => !!permission_code && [menu_code].includes(permission_code)));
|
|
60
60
|
})) === null || _a === void 0 ? void 0 : _a.map(item => (Object.assign(Object.assign({}, item), (isArray(item.children)
|
|
61
61
|
? {
|
|
62
62
|
children: recursivePermissionMenu(sortBy(item.children || [], ['level_position']), menuPermissions),
|
|
@@ -218,12 +218,14 @@ export const ModifyColumnModal = props => {
|
|
|
218
218
|
},
|
|
219
219
|
body: {
|
|
220
220
|
padding: 0,
|
|
221
|
-
height:
|
|
221
|
+
height: '100%',
|
|
222
222
|
},
|
|
223
223
|
footer: {
|
|
224
224
|
marginTop: 0,
|
|
225
225
|
},
|
|
226
|
-
}, centered: true, width:
|
|
226
|
+
}, centered: true, width: "65vw", style: {
|
|
227
|
+
height: '70%',
|
|
228
|
+
}, footer: React.createElement(Flex, { align: "center", justify: "space-between" },
|
|
227
229
|
React.createElement(Flex, null,
|
|
228
230
|
React.createElement(Checkbox, { checked: !!editedColumnSet || state.checkedColumnSet, disabled: !!editedColumnSet, onChange: () => setState(prev => (Object.assign(Object.assign({}, prev), { checkedColumnSet: !prev.checkedColumnSet }))) }, checkedColumnSet || !!editedColumnSet ? (React.createElement(Input, { disabled: !!editedColumnSet, value: editedColumnSet ? editedColumnSet.name : columnSetName, maxLength: 255, showCount: true, onChange: e => setState(prev => (Object.assign(Object.assign({}, prev), { columnSetName: e.target.value }))) })) : (t(translations.modifyColumn.saveColumnSet).toString()))),
|
|
229
231
|
React.createElement(Flex, { align: "center", gap: 10 },
|
|
@@ -8,6 +8,10 @@ import { Scrollbars } from '../../atoms/Scrollbars';
|
|
|
8
8
|
import { globalToken } from '@antscorp/antsomi-ui/es/constants';
|
|
9
9
|
export const StyledModal = styled(ModalV2) `
|
|
10
10
|
.antsomi-modal-content {
|
|
11
|
+
height: 100%;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
|
|
11
15
|
.antsomi-modal-close {
|
|
12
16
|
right: 15px !important;
|
|
13
17
|
top: 14px !important;
|