@antscorp/antsomi-ui 1.3.5-beta.513 → 1.3.5-beta.515

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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './type';
3
+ export declare const TableIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,7 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const TableIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({}, props, { ref: ref, width: width, height: height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }),
6
+ React.createElement("path", { d: "M3 14.0156V9.98438H6.98438V14.0156H3ZM3 18.9844V15H6.98438V18.9844H3ZM3 9V5.01562H6.98438V9H3ZM8.01562 14.0156V9.98438H21V14.0156H8.01562ZM8.01562 18.9844V15H21V18.9844H8.01562ZM8.01562 5.01562H21V9H8.01562V5.01562Z", fill: "currentColor" })));
7
+ });
@@ -0,0 +1,5 @@
1
+ import { IconProps } from '../type';
2
+ export declare const useIcon: (props: IconProps) => {
3
+ width: string | number | undefined;
4
+ height: string | number | undefined;
5
+ };
@@ -0,0 +1,9 @@
1
+ import { useMemo } from 'react';
2
+ export const useIcon = (props) => {
3
+ const { size = 24 } = props;
4
+ const [width, height] = useMemo(() => [size || (props === null || props === void 0 ? void 0 : props.width), size || (props === null || props === void 0 ? void 0 : props.height)], [size, props.width, props.height]);
5
+ return {
6
+ width,
7
+ height,
8
+ };
9
+ };
@@ -55,3 +55,4 @@ export { Web } from './Web';
55
55
  export { LocalMallIcon } from './LocalMallIcon';
56
56
  export { LoadingIcon } from './LoadingIcon';
57
57
  export { DataIcon } from './DataIcon';
58
+ export { TableIcon } from './TableIcon';
@@ -55,3 +55,4 @@ export { Web } from './Web';
55
55
  export { LocalMallIcon } from './LocalMallIcon';
56
56
  export { LoadingIcon } from './LoadingIcon';
57
57
  export { DataIcon } from './DataIcon';
58
+ export { TableIcon } from './TableIcon';
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export interface IconProps extends React.ComponentPropsWithoutRef<'svg'> {
3
+ size?: number;
3
4
  }
@@ -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,
@@ -7,4 +7,8 @@ export const Tabs = styled(AntdTabs) `
7
7
  > .antsomi-tabs-nav {
8
8
  ${({ shadow }) => (shadow ? 'box-shadow: 0px 3px 3px 0px #002E591A;' : '')}
9
9
  }
10
+
11
+ .antsomi-tabs-tab-btn {
12
+ text-shadow: none !important;
13
+ }
10
14
  `;
@@ -81,7 +81,7 @@ export const usePermission = () => {
81
81
  portalId: auth === null || auth === void 0 ? void 0 : auth.portalId,
82
82
  },
83
83
  params: {
84
- objectType: 'DESTINATION',
84
+ objectType: 'CHANNEL_INTERGRATION',
85
85
  languageCode,
86
86
  },
87
87
  },
@@ -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) === MENU_ITEM_TYPE.GROUP_MENU) {
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(({ app_code = '', menu_code = '' }) => !!permission_code && [app_code, menu_code].includes(permission_code)));
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),
@@ -17,6 +17,7 @@ export declare const MENU_PERMISSIONS: {
17
17
  DF_DATA_SOURCE: string;
18
18
  DESTINATION: string;
19
19
  REPORT: string;
20
+ WEB_PERSONALIZE: string;
20
21
  };
21
22
  export declare const KEEP_HASH_PATH_DEV: string[];
22
23
  export declare const DUPLICATE_PERMISSION_MENU_CODES: string[];
@@ -17,6 +17,7 @@ export const MENU_PERMISSIONS = {
17
17
  DF_DATA_SOURCE: 'DF_DATA_SOURCE',
18
18
  DESTINATION: 'DESTINATION',
19
19
  REPORT: 'REPORT',
20
+ WEB_PERSONALIZE: 'WEB_PERSONALIZE',
20
21
  };
21
22
  export const KEEP_HASH_PATH_DEV = ['DF_DATA_SOURCE', 'DATA_SOURCE'];
22
23
  export const DUPLICATE_PERMISSION_MENU_CODES = ['DF_DATA_SOURCE', 'DATA_SOURCE'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.513",
3
+ "version": "1.3.5-beta.515",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",