awing-library 2.1.2-dev.52 → 2.1.2-dev.53

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,10 @@
1
+ import { DropDownTreeSelectValueProps } from '../type';
2
+ type TreeViewSearchProps = {
3
+ data: DropDownTreeSelectValueProps[];
4
+ setListId: (value: string[]) => void;
5
+ inputText?: string;
6
+ groupsList?: string[];
7
+ listId?: string[];
8
+ };
9
+ export declare const TreeViewSearch: ({ inputText, groupsList, data, setListId, listId }: TreeViewSearchProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare const onlyUnique: <T>(array: T[]) => T[];
@@ -0,0 +1,10 @@
1
+ import './index.css';
2
+ import { DropDownTreeSelectValueProps } from './type';
3
+ type DropDownTreeSelectProps = {
4
+ data: DropDownTreeSelectValueProps[];
5
+ listId: string[];
6
+ setListId: (value: string[]) => void;
7
+ disabled?: boolean;
8
+ };
9
+ declare const DropDownTreeSelect: ({ data, listId, setListId, disabled }: DropDownTreeSelectProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default DropDownTreeSelect;
@@ -0,0 +1,5 @@
1
+ export type DropDownTreeSelectValueProps = {
2
+ id: string;
3
+ label: string;
4
+ children?: DropDownTreeSelectValueProps[];
5
+ };
@@ -0,0 +1,16 @@
1
+ import { DropDownTreeSelectValueProps } from './type';
2
+ /**
3
+ * Chuyển đổi dữ liệu phẳng thành cấu trúc cây phân cấp theo kiểu DropDownTreeSelectValueProps
4
+ * @param data Dữ liệu phẳng cần chuyển đổi
5
+ * @param parentIdField Tên trường dùng để xác định ID của node cha, mặc định là "parentObjectId"
6
+ * @param rootValue Giá trị gốc để xác định các node cấp cao nhất, mặc định là 0
7
+ * @returns Mảng các đối tượng DropDownTreeSelectValueProps đã được chuyển đổi
8
+ */
9
+ export declare const convertDataToDropDownTreeSelect: (data: any[], parentIdField?: string, rootValue?: any) => DropDownTreeSelectValueProps[];
10
+ /**
11
+ * Phiên bản đơn giản hơn của hàm chuyển đổi, tạo cây trực tiếp dựa trên cấu trúc level
12
+ * @param data Dữ liệu phẳng cần chuyển đổi
13
+ * @param parentIdField Tên trường dùng để xác định ID của node cha, mặc định là "parentObjectId"
14
+ * @param rootValue Giá trị gốc để xác định các node cấp cao nhất, mặc định là 0
15
+ */
16
+ export declare const convertDataToDropDownTreeSelectSimple: (data: any[], parentIdField?: string, rootValue?: any) => DropDownTreeSelectValueProps[];
package/dist/esm/index.js CHANGED
@@ -182630,7 +182630,7 @@ const CreateOrEdit$5 = () => {
182630
182630
  // State nhận giá trị khi get API
182631
182631
  const [notificationFilter, setNotificationFilter] = useState(defaultObjectFilter);
182632
182632
  const [loadingNotificationFilter, setLoadingNotificationFilter] = useState(false);
182633
- const [fieldEditPermission, setFieldEditPermission] = useState({
182633
+ const [_fieldEditPermission, setFieldEditPermission] = useState({
182634
182634
  configType: false,
182635
182635
  name: false,
182636
182636
  logicalExpression: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.2-dev.52",
3
+ "version": "2.1.2-dev.53",
4
4
  "main": "dist/esm/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/index.d.ts",