awing-library 2.1.2-dev.8 → 2.1.2-dev.80

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.
Files changed (78) hide show
  1. package/dist/esm/AWING/DataGrid/interface.d.ts +1 -1
  2. package/dist/esm/AWING/DateRangePicker/Container.d.ts +1 -1
  3. package/dist/esm/AWING/DropDownTreeSelect/components/TreeViewSearch.d.ts +10 -0
  4. package/dist/esm/AWING/DropDownTreeSelect/components/utils.d.ts +1 -0
  5. package/dist/esm/AWING/DropDownTreeSelect/index.d.ts +10 -0
  6. package/dist/esm/AWING/DropDownTreeSelect/type.d.ts +5 -0
  7. package/dist/esm/AWING/DropDownTreeSelect/utils.d.ts +16 -0
  8. package/dist/esm/AWING/PageManagement/interface.d.ts +1 -1
  9. package/dist/esm/AWING/PlaceFilter/interface.d.ts +1 -0
  10. package/dist/esm/AWING/TableEditable/interface.d.ts +5 -1
  11. package/dist/esm/AWING/TableEditableCollapsible/Container.d.ts +2 -0
  12. package/dist/esm/AWING/TableEditableCollapsible/components/TableCellEditable.d.ts +2 -0
  13. package/dist/esm/AWING/TableEditableCollapsible/components/TableEditableBody.d.ts +2 -0
  14. package/dist/esm/AWING/TableEditableCollapsible/components/TableHeader.d.ts +2 -0
  15. package/dist/esm/AWING/TableEditableCollapsible/components/TableRowEditable.d.ts +2 -0
  16. package/dist/esm/AWING/TableEditableCollapsible/components/TopBarActions.d.ts +2 -0
  17. package/dist/esm/AWING/TableEditableCollapsible/index.d.ts +6 -0
  18. package/dist/esm/AWING/TableEditableCollapsible/interface.d.ts +100 -0
  19. package/dist/esm/AWING/index.d.ts +4 -0
  20. package/dist/esm/Commons/Components/ClassicBaseDrawer.d.ts +1 -1
  21. package/dist/esm/Commons/Components/ClassicDrawer.d.ts +6 -3
  22. package/dist/esm/Commons/Components/Drawer.d.ts +9 -1
  23. package/dist/esm/Features/NOTIFICATION/FilterNotification/Constants.d.ts +6 -0
  24. package/dist/esm/Features/NOTIFICATION/FilterNotification/Container.d.ts +2 -0
  25. package/dist/esm/Features/NOTIFICATION/FilterNotification/CreateOrEdit.d.ts +2 -0
  26. package/dist/esm/Features/NOTIFICATION/FilterNotification/Services.d.ts +35 -0
  27. package/dist/esm/Features/NOTIFICATION/FilterNotification/context.d.ts +11 -0
  28. package/dist/esm/Features/NOTIFICATION/FilterNotification/index.d.ts +8 -0
  29. package/dist/esm/Features/NOTIFICATION/FilterNotification/types.d.ts +49 -0
  30. package/dist/esm/Features/NOTIFICATION/FilterNotification/utils.d.ts +7 -0
  31. package/dist/esm/Features/NOTIFICATION/NotificationConfig/Services.d.ts +5 -2
  32. package/dist/esm/Features/NOTIFICATION/NotificationConfig/types.d.ts +1 -0
  33. package/dist/esm/Features/NOTIFICATION/ObjectFilter/Services.d.ts +5 -5
  34. package/dist/esm/Features/NOTIFICATION/ObjectFilter/context.d.ts +0 -2
  35. package/dist/esm/Features/NOTIFICATION/ObjectFilter/index.d.ts +0 -1
  36. package/dist/esm/Features/NOTIFICATION/ObjectFilter/types.d.ts +1 -2
  37. package/dist/esm/Features/NOTIFICATION/ObjectFilter/utils.d.ts +1 -1
  38. package/dist/esm/Features/NOTIFICATION/SubscriptionConfig/Services.d.ts +5 -2
  39. package/dist/esm/Features/NOTIFICATION/SubscriptionConfig/types.d.ts +9 -8
  40. package/dist/esm/Features/NOTIFICATION/Template/Services.d.ts +11 -4
  41. package/dist/esm/Features/NOTIFICATION/Template/context.d.ts +0 -3
  42. package/dist/esm/Features/NOTIFICATION/Template/hooks/useCreateOrEdit.d.ts +5 -5
  43. package/dist/esm/Features/NOTIFICATION/Template/index.d.ts +1 -3
  44. package/dist/esm/Features/NOTIFICATION/Template/types.d.ts +5 -5
  45. package/dist/esm/Features/NOTIFICATION/components/TestingTool/types.d.ts +2 -0
  46. package/dist/esm/Features/NOTIFICATION/components/TestingTool/utils.d.ts +1 -0
  47. package/dist/esm/Features/NOTIFICATION/index.d.ts +1 -0
  48. package/dist/esm/Features/NOTIFICATION/types.d.ts +14 -0
  49. package/dist/esm/Features/SYSTEM/Directory/Services.d.ts +3 -2
  50. package/dist/esm/Features/SYSTEM/Directory/index.d.ts +1 -1
  51. package/dist/esm/Features/SYSTEM/Group/Services.d.ts +8 -6
  52. package/dist/esm/Features/SYSTEM/Group/types.d.ts +1 -0
  53. package/dist/esm/Features/SYSTEM/Role/Services.d.ts +8 -9
  54. package/dist/esm/Features/SYSTEM/Role/types.d.ts +1 -0
  55. package/dist/esm/Features/SYSTEM/RoleTag/Services.d.ts +8 -9
  56. package/dist/esm/Features/SYSTEM/RoleTag/types.d.ts +1 -0
  57. package/dist/esm/Features/SYSTEM/Schema/Atoms.d.ts +18 -3
  58. package/dist/esm/Features/SYSTEM/Schema/Services.d.ts +5 -8
  59. package/dist/esm/Features/SYSTEM/Schema/types.d.ts +1 -0
  60. package/dist/esm/Features/SYSTEM/Sharing/Types.d.ts +9 -5
  61. package/dist/esm/Features/SYSTEM/User/Services.d.ts +5 -2
  62. package/dist/esm/Features/SYSTEM/User/types.d.ts +1 -0
  63. package/dist/esm/Features/SYSTEM/Workflow/CreateOrEdit.d.ts +1 -1
  64. package/dist/esm/Features/SYSTEM/Workflow/container.d.ts +4 -2
  65. package/dist/esm/Features/SYSTEM/Workflow/index.d.ts +5 -3
  66. package/dist/esm/Features/SYSTEM/Workflow/types.d.ts +1 -0
  67. package/dist/esm/Features/types.d.ts +18 -0
  68. package/dist/esm/Helpers/index.d.ts +1 -0
  69. package/dist/esm/Helpers/number.d.ts +2 -1
  70. package/dist/esm/Helpers/query.d.ts +161 -0
  71. package/dist/esm/index.js +2704 -975
  72. package/dist/esm/translate/resources/en/translation.json +8 -5
  73. package/dist/esm/translate/resources/id/translation.json +8 -5
  74. package/dist/esm/translate/resources/ja/translation.json +8 -5
  75. package/dist/esm/translate/resources/th/translation.json +8 -5
  76. package/dist/esm/translate/resources/vi/translation.json +11 -6
  77. package/dist/index.d.ts +382 -124
  78. package/package.json +1 -1
@@ -59,7 +59,7 @@ export interface RowActionDefinition<T> {
59
59
  /**
60
60
  * Hành động thực hiện khi nhấn nút
61
61
  */
62
- action(id: string | number): void;
62
+ action(id: string | number, row?: T): void;
63
63
  isShouldHideActions?: (row: T) => boolean;
64
64
  sx?: SxProps<Theme>;
65
65
  }
@@ -7,7 +7,7 @@ export interface DateRangePickerProps {
7
7
  endDate: Date;
8
8
  };
9
9
  onChange: (dateRange: DateRange) => void;
10
- textFieldProps?: Pick<TextFieldProps, 'size' | 'fullWidth' | 'classes' | 'className' | 'sx'>;
10
+ textFieldProps?: Pick<TextFieldProps, 'size' | 'fullWidth' | 'classes' | 'className' | 'sx' | 'required' | 'error' | 'helperText' | 'disabled'>;
11
11
  options?: OptionsDateRangePickerProps;
12
12
  variant?: 'standard' | 'outlined' | 'filled';
13
13
  }
@@ -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[];
@@ -24,7 +24,7 @@ export interface PageManagementProps<T> extends CombinedProps<T> {
24
24
  loading: boolean;
25
25
  onCreateButtonClick?: () => void;
26
26
  onCreateFolderButtonClick?: () => void;
27
- onDelete?: (id: ReturnType<NonNullable<this['getRowId']>>) => Promise<void>;
27
+ onDelete?: (id: ReturnType<NonNullable<this['getRowId']>>, row?: T) => Promise<void>;
28
28
  showNotificationSuccess?: () => void;
29
29
  confirmDelete?: (f: () => void) => void;
30
30
  customActions?: ReactNode;
@@ -94,6 +94,7 @@ export interface IPlaceQuery {
94
94
  total: number;
95
95
  }>;
96
96
  getPlacesByIds: (placeIds: string[]) => Promise<IPlace[]>;
97
+ isSelectedAll?: boolean;
97
98
  }
98
99
  export interface PlaceFilterProps extends IPlaceQuery {
99
100
  filterFields: IFilterField[];
@@ -25,7 +25,7 @@ export interface ColumnDefinition<T extends object> {
25
25
  export type TableEditableProps<T> = {
26
26
  columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
27
27
  items: Array<Partial<T>>;
28
- onChange(newData: Array<Partial<T>>, dataValid: boolean): void;
28
+ onChange(newData: Array<Partial<T>>, dataValid: boolean, fieldName?: keyof T): void;
29
29
  getRowId?(obj: Partial<T>): number;
30
30
  selected?: number[];
31
31
  onSelectedChange?(ids: number[]): void;
@@ -35,6 +35,10 @@ export type TableEditableProps<T> = {
35
35
  spanningRows?: ReactNode[];
36
36
  selectionActions?: SelectionActionDefinition[];
37
37
  mergeRowsBy?: string;
38
+ observation?: {
39
+ objObserve: Array<keyof T>;
40
+ callback: (fieldName?: keyof T, columnValue?: unknown, index?: number) => void;
41
+ }[];
38
42
  };
39
43
  export interface TopBarActionsProps {
40
44
  selected: number[];
@@ -0,0 +1,2 @@
1
+ import type { TableEditableProps } from './interface';
2
+ export default function TableEditable<T>(props: TableEditableProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TableCellEditableProps } from '../interface';
2
+ export default function TableCellEditable<T extends object>(props: TableCellEditableProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { TableEditableBodyProps } from '../interface';
2
+ export default function TableEditableBody<T>(props: TableEditableBodyProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TableHeaderProps } from '../interface';
2
+ export default function TableHeader<T>(props: TableHeaderProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TableRowEditableProps } from '../interface';
2
+ export default function TableRowEditable<T>(props: TableRowEditableProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TopBarActionsProps } from '../interface';
2
+ export default function TopBarActions(props: TopBarActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export { default } from './Container';
2
+ export { default as TableEditableCollapsibleTableHeader } from './components/TableHeader';
3
+ export { default as TableEditableCollapsibleBody } from './components/TableEditableBody';
4
+ export { default as TableEditableCollapsibleCell } from './components/TableCellEditable';
5
+ export { default as TableEditableCollapsibleTopBarActions } from './components/TopBarActions';
6
+ export * from './interface';
@@ -0,0 +1,100 @@
1
+ import { TableCellProps } from '@mui/material/TableCell';
2
+ import { ReactNode } from 'react';
3
+ import type { SelectionActionDefinition } from '../DataGrid/interface';
4
+ import { FieldDefinitionProps } from 'AWING/DataInput/interfaces';
5
+ export type CellDefinition<T extends object> = FieldDefinitionProps<T> & {
6
+ TableCellProps?: TableCellProps;
7
+ isTooltip?: boolean;
8
+ row?: Partial<T>;
9
+ getTitleTooltip?: (value: T[keyof T]) => NonNullable<ReactNode>;
10
+ };
11
+ export interface ColumnDefinition<T extends object> {
12
+ headerName: ReactNode;
13
+ /**
14
+ * Độ rộng của cột
15
+ */
16
+ width?: string | number;
17
+ TableCellProps?: TableCellProps;
18
+ editFieldDefinition?: CellDefinition<T>;
19
+ isRowGroup?: boolean;
20
+ contentGetter?: (obj: T, idx?: number) => ReactNode;
21
+ fieldName?: string;
22
+ isTooltip?: boolean;
23
+ label?: string;
24
+ getTitleTooltip?: (value: T[keyof T]) => NonNullable<ReactNode>;
25
+ }
26
+ export type TableEditableProps<T> = {
27
+ columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
28
+ fieldDefinitions?: Array<ColumnDefinition<Partial<T>>>;
29
+ items: Array<Partial<T>>;
30
+ onChange(newData: Array<Partial<T>>, dataValid: boolean, fieldName?: keyof T): void;
31
+ getRowId?(obj: Partial<T>): number;
32
+ selected?: number[];
33
+ onSelectedChange?(ids: number[]): void;
34
+ hideHeader?: boolean;
35
+ onAddNew?(): void;
36
+ includeDelete?: boolean;
37
+ spanningRows?: ReactNode[];
38
+ selectionActions?: SelectionActionDefinition[];
39
+ mergeRowsBy?: string;
40
+ observation?: {
41
+ objObserve: Array<keyof T>;
42
+ callback: (fieldName?: keyof T, columnValue?: unknown, index?: number) => void;
43
+ }[];
44
+ };
45
+ export interface TopBarActionsProps {
46
+ selected: number[];
47
+ selectionActions?: SelectionActionDefinition[];
48
+ }
49
+ export interface TableHeaderProps<T> {
50
+ selected?: number[];
51
+ onSelectedChange?: (selected: number[]) => void;
52
+ numOfRows: number;
53
+ onSelectAll: () => void;
54
+ includeDelete?: boolean;
55
+ columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
56
+ }
57
+ export interface TableEditableBodyProps<T> {
58
+ items: Array<Partial<T>>;
59
+ getId: (item: Partial<T>) => string | number | undefined;
60
+ selected?: number[];
61
+ onSelectedChange?: (selected: number[]) => void;
62
+ onSelect: (id: number) => void;
63
+ columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
64
+ fieldDefinitions?: Array<ColumnDefinition<Partial<T>>>;
65
+ dataValidation: Partial<{
66
+ [K in keyof T]: boolean;
67
+ }>[];
68
+ includeDelete?: boolean;
69
+ spanningRows?: ReactNode[];
70
+ onChange: (indexes: number[], fieldName: keyof T, newValue: T[keyof T], valid: boolean) => void;
71
+ onDelete: (rowIdx: number) => void;
72
+ mergeRowsBy?: string;
73
+ }
74
+ export interface TableRowEditableProps<T> {
75
+ id: string | number;
76
+ rowIdx: number;
77
+ selected?: number[];
78
+ onSelectedChange?: (selected: number[]) => void;
79
+ onSelect: (id: number) => void;
80
+ columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
81
+ fieldDefinitions?: Array<ColumnDefinition<Partial<T>>>;
82
+ mergeRowsBy?: string;
83
+ convertItems: Partial<T>[];
84
+ row: Partial<T>;
85
+ itemIndex: number;
86
+ includeDelete?: boolean;
87
+ dataValidation: Partial<{
88
+ [K in keyof T]: boolean;
89
+ }>[];
90
+ onChange: (indexes: number[], fieldName: keyof T, newValue: T[keyof T], valid: boolean) => void;
91
+ onDelete: (rowIdx: number) => void;
92
+ }
93
+ export interface TableCellEditableProps<T extends object> {
94
+ cellDefinition: CellDefinition<T>;
95
+ isContainer?: boolean;
96
+ isShowCollapsible?: boolean;
97
+ isCollapsed?: boolean;
98
+ numOfRowSpan?: number;
99
+ onToggleCollapsible?: () => void;
100
+ }
@@ -149,3 +149,7 @@ export { default as Statistics, TYPE_CHART } from './Statistics';
149
149
  export type { CellDefinition, ColumnDefinition, TableCellEditableProps, TableEditableBodyProps, TableEditableProps, TableHeaderProps, TopBarActionsProps, } from './TableEditable';
150
150
  export { default as TableEditable, TableCellEditable, TableEditableBody, TableHeader, TopBarActions, } from './TableEditable';
151
151
  /*****/
152
+ /*****/
153
+ export type { CellDefinition as TableEditableCollapsibleCellDefinition, ColumnDefinition as TableEditableCollapsibleColumnDefinition, TableCellEditableProps as TableEditableCollapsibleTableCellEditableProps, TableEditableBodyProps as TableEditableCollapsibleTableEditableBodyProps, TableEditableProps as TableEditableCollapsibleTableEditableProps, TableHeaderProps as TableEditableCollapsibleTableHeaderProps, TopBarActionsProps as TableEditableCollapsibleTopBarActionsProps, } from './TableEditable';
154
+ export { default as TableEditableCollapsible, TableEditableCollapsibleCell, TableEditableCollapsibleBody, TableEditableCollapsibleTableHeader, TableEditableCollapsibleTopBarActions, } from './TableEditableCollapsible';
155
+ /*****/
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
- import { SxProps, Theme } from '@mui/material';
2
+ import { SxProps, type Theme } from '@mui/material';
3
3
  export interface DrawerBaseProps {
4
4
  title?: ReactNode;
5
5
  disableButtonSubmit?: boolean;
@@ -1,5 +1,8 @@
1
- import { type ModalDrawerProps } from './Drawer';
2
- declare const DrawerWrapper: (props: ModalDrawerProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { type ModalDrawerProps, type DrawerHandle } from './Drawer';
2
+ import React from 'react';
3
+ declare const DrawerWrapper: (props: ModalDrawerProps & {
4
+ ref?: React.Ref<DrawerHandle>;
5
+ }) => import("react/jsx-runtime").JSX.Element;
3
6
  export { CloseAction } from './Drawer';
4
- export { type ModalDrawerProps };
7
+ export { type ModalDrawerProps, type DrawerHandle };
5
8
  export default DrawerWrapper;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { DrawerBaseProps } from './ClassicBaseDrawer';
2
3
  export interface ModalDrawerProps extends Omit<DrawerBaseProps, 'open'> {
3
4
  confirmExit?: boolean;
@@ -6,6 +7,11 @@ export interface ModalDrawerProps extends Omit<DrawerBaseProps, 'open'> {
6
7
  onSubmit?: () => Promise<any> | void;
7
8
  onClose?: () => void;
8
9
  }
10
+ export interface DrawerHandle {
11
+ handleClose: () => void;
12
+ handleSubmit: () => void;
13
+ closeDrawer: (action?: string) => void;
14
+ }
9
15
  export declare const enum CloseAction {
10
16
  Reload = "Reload",
11
17
  Close = "Close",
@@ -18,5 +24,7 @@ export declare const enum CloseAction {
18
24
  * @param{ModalDrawerProps} props
19
25
  * @returns
20
26
  */
21
- export declare const Drawer: (props: ModalDrawerProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const Drawer: (props: ModalDrawerProps & {
28
+ ref?: React.Ref<DrawerHandle>;
29
+ }) => import("react/jsx-runtime").JSX.Element;
22
30
  export default Drawer;
@@ -0,0 +1,6 @@
1
+ import { NotificationFilterInput } from './types';
2
+ export declare const Constants: {
3
+ CREATE_PATH: string;
4
+ EDIT_PATH: string;
5
+ };
6
+ export declare const defaultObjectFilter: NotificationFilterInput;
@@ -0,0 +1,2 @@
1
+ declare const NotificationFilterContainer: () => import("react/jsx-runtime").JSX.Element;
2
+ export default NotificationFilterContainer;
@@ -0,0 +1,2 @@
1
+ declare const CreateOrEdit: () => import("react/jsx-runtime").JSX.Element;
2
+ export default CreateOrEdit;
@@ -0,0 +1,35 @@
1
+ import type { CustomPagingRequestInput } from 'Features/types';
2
+ import type { NotificationFilter, NotificationFilterInput } from './types';
3
+ import { GraphQLQuery } from '../types';
4
+ export type NotificationFilterServices = {
5
+ getNotificationFilters: (p: {
6
+ input: CustomPagingRequestInput;
7
+ }) => Promise<{
8
+ items: NotificationFilter[];
9
+ totalCount: number;
10
+ }>;
11
+ /** Delete */
12
+ deleteNotificationFilter: (p: {
13
+ id: number;
14
+ }) => Promise<void>;
15
+ /** Get by Id */
16
+ getNotificationFilterById: (p: {
17
+ id: number;
18
+ }) => Promise<{
19
+ notificationFilter?: NotificationFilter;
20
+ }>;
21
+ /** Create */
22
+ createNotificationFilter: (p: {
23
+ input: NotificationFilterInput;
24
+ }) => Promise<void>;
25
+ /** Update */
26
+ updateNotificationFilter: (p: {
27
+ input: NotificationFilterInput;
28
+ id: number;
29
+ versionId?: number;
30
+ }) => Promise<void>;
31
+ getGraphQLQueries: (p: CustomPagingRequestInput) => Promise<{
32
+ items: GraphQLQuery[];
33
+ totalCount: number;
34
+ }>;
35
+ };
@@ -0,0 +1,11 @@
1
+ import { NotificationFilterServices } from './Services';
2
+ import { LogicExpressionsStructure } from './types';
3
+ /** ObjectFilter Context */
4
+ export declare const NotificationFilterContext: import("react").Context<{
5
+ services?: NotificationFilterServices;
6
+ logicExpressionsStructure?: LogicExpressionsStructure;
7
+ }>;
8
+ export declare const useGetContext: () => {
9
+ services?: NotificationFilterServices;
10
+ logicExpressionsStructure?: LogicExpressionsStructure;
11
+ };
@@ -0,0 +1,8 @@
1
+ import { NotificationFilterServices } from './Services';
2
+ import { LogicExpressionsStructure } from './types';
3
+ declare const FilterNotification: (props: NotificationFilterServices & {
4
+ logicExpressionsStructure: LogicExpressionsStructure;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export * from './Services';
7
+ export * from './types';
8
+ export default FilterNotification;
@@ -0,0 +1,49 @@
1
+ import type { FunctionStructure, ObjectStructure } from 'AWING/LogicExpression/types';
2
+ import { SortInputType } from 'Features/types';
3
+ import { GraphQLQuery } from '../types';
4
+ export type NotificationConfigDetail = {
5
+ id?: number;
6
+ };
7
+ export type ObjectDefinition = {
8
+ fieldName?: string;
9
+ fieldPath?: string;
10
+ id?: number;
11
+ objectTypeCode?: string;
12
+ };
13
+ export type ObjectDefinitionWithPermission = {
14
+ objectDefinition?: ObjectDefinition;
15
+ permission?: number;
16
+ };
17
+ export type OutputFieldPermission = {
18
+ objectDefinitionWithPermissions?: Array<ObjectDefinitionWithPermission>;
19
+ };
20
+ export type SubscriptionConfigDetail = {
21
+ id?: number;
22
+ };
23
+ export type WorkspaceSharing = {
24
+ id?: number;
25
+ };
26
+ export type NotificationFilter = {
27
+ directoryPath?: string;
28
+ id?: number;
29
+ graphQLQuery?: GraphQLQuery;
30
+ logicalExpression?: string;
31
+ name?: string;
32
+ outputFieldPermission?: OutputFieldPermission;
33
+ versionId?: number;
34
+ };
35
+ export type SortInput = SortInputType<NotificationFilter>;
36
+ export type NotificationFilterInput = {
37
+ graphqlQueryId?: number;
38
+ id?: number;
39
+ logicalExpression?: string;
40
+ name?: string;
41
+ parentDirectoryPath?: string;
42
+ sagaTransactionId?: number;
43
+ };
44
+ export type LogicExpressionsStructure = {
45
+ objectStructures?: {
46
+ [key: string]: ObjectStructure[];
47
+ };
48
+ functionStructures?: FunctionStructure[];
49
+ };
@@ -0,0 +1,7 @@
1
+ import { NotificationFilter } from './types';
2
+ export declare const checkValid: (currentNotificationFilterInput: NotificationFilter) => boolean;
3
+ interface GenericObject {
4
+ [key: string]: string | number | boolean | null | undefined | object;
5
+ }
6
+ export declare const compareObjects: <T extends GenericObject>(original: T, changed: T) => Partial<T>;
7
+ export {};
@@ -1,11 +1,13 @@
1
1
  import { Group } from 'Features/SYSTEM/Group/types';
2
2
  import { User } from 'Features/SYSTEM/User/types';
3
- import { PagingQueryInput } from 'Features/types';
3
+ import { CustomPagingRequestInput } from 'Features/types';
4
4
  import { NotificationTemplates, ObjectFilter } from '../components/ConfigNotification/type';
5
5
  import { NotificationConfig, NotificationConfigDataType, NotificationConfigInput, NotificationConfigType } from './types';
6
6
  export declare const initNotificationConfig: NotificationConfig[];
7
7
  export type NotificationConfigServices = {
8
- getNotificationConfigs: (p?: PagingQueryInput<NotificationConfig>) => Promise<{
8
+ getNotificationConfigs: (p: {
9
+ input: CustomPagingRequestInput;
10
+ }) => Promise<{
9
11
  items: NotificationConfigType[];
10
12
  total: number;
11
13
  }>;
@@ -37,5 +39,6 @@ export type NotificationConfigServices = {
37
39
  updateNotificationConfig: (p: {
38
40
  notificationConfig: NotificationConfigInput;
39
41
  id: number;
42
+ versionId?: number;
40
43
  }) => Promise<void>;
41
44
  };
@@ -79,6 +79,7 @@ export type NotificationConfigType = {
79
79
  status?: boolean;
80
80
  details?: NotificationConfigDetail[];
81
81
  outputFieldPermission?: OutputFieldPermission;
82
+ versionId?: number;
82
83
  };
83
84
  export type ObjectFiltersCollectionSegment = {
84
85
  objectFilters: {
@@ -1,10 +1,9 @@
1
- import type { PagingQueryInput } from 'Features/types';
1
+ import type { CustomPagingRequestInput } from 'Features/types';
2
2
  import type { ObjectFilter, ObjectFilterInput } from './types';
3
3
  export type ObjectFilterServices = {
4
- /** Get Paging ObjectFilter
5
- * @param p - PagingQueryInput<ObjectFilter>
6
- */
7
- getObjectFilters: (p: PagingQueryInput<ObjectFilter>) => Promise<{
4
+ getObjectFilters: (p: {
5
+ input: CustomPagingRequestInput;
6
+ }) => Promise<{
8
7
  items: ObjectFilter[];
9
8
  totalCount: number;
10
9
  }>;
@@ -26,5 +25,6 @@ export type ObjectFilterServices = {
26
25
  updateObjectFilter: (p: {
27
26
  input: ObjectFilterInput;
28
27
  id: number;
28
+ versionId?: number;
29
29
  }) => Promise<void>;
30
30
  };
@@ -5,12 +5,10 @@ import { LogicExpressionsStructure } from './types';
5
5
  export declare const ObjectFilterContext: import("react").Context<{
6
6
  services?: ObjectFilterServices;
7
7
  objectTyeCodes?: EnumTypeConvert[];
8
- objectConfigTypes?: EnumTypeConvert[];
9
8
  logicExpressionsStructure?: LogicExpressionsStructure;
10
9
  }>;
11
10
  export declare const useGetContext: () => {
12
11
  services?: ObjectFilterServices;
13
12
  objectTyeCodes?: EnumTypeConvert[];
14
- objectConfigTypes?: EnumTypeConvert[];
15
13
  logicExpressionsStructure?: LogicExpressionsStructure;
16
14
  };
@@ -3,7 +3,6 @@ import { EnumTypeConvert } from 'Features/types';
3
3
  import { LogicExpressionsStructure } from './types';
4
4
  declare const NotificationFilter: (props: ObjectFilterServices & {
5
5
  objectTyeCodes: EnumTypeConvert[];
6
- objectConfigTypes: EnumTypeConvert[];
7
6
  logicExpressionsStructure: LogicExpressionsStructure;
8
7
  }) => import("react/jsx-runtime").JSX.Element;
9
8
  export * from './types';
@@ -23,7 +23,6 @@ export type WorkspaceSharing = {
23
23
  id?: number;
24
24
  };
25
25
  export type ObjectFilter = {
26
- configType?: string;
27
26
  directoryPath?: string;
28
27
  id?: number;
29
28
  logicalExpression?: string;
@@ -33,10 +32,10 @@ export type ObjectFilter = {
33
32
  notificationConfigDetails?: Array<NotificationConfigDetail>;
34
33
  subscriptionConfigDetails?: Array<SubscriptionConfigDetail>;
35
34
  workspaceSharings?: Array<WorkspaceSharing>;
35
+ versionId?: number;
36
36
  };
37
37
  export type SortInput = SortInputType<ObjectFilter>;
38
38
  export type ObjectFilterInput = {
39
- configType?: string;
40
39
  logicalExpression?: string;
41
40
  name?: string;
42
41
  objectTypeCode?: string;
@@ -4,5 +4,5 @@ interface ObjectFilterInput {
4
4
  [key: string]: string | number | undefined;
5
5
  }
6
6
  export declare const checkValid: (currentObjectFilterInput: ObjectFilter) => boolean;
7
- export declare const getDifferentFieldsValue: (oldObjectFilter: ObjectFilter, newObjectFilter: ObjectFilterInput, objectTyeCodes: EnumTypeConvert[], objectConfigTypes: EnumTypeConvert[]) => ObjectFilterInput;
7
+ export declare const getDifferentFieldsValue: (oldObjectFilter: ObjectFilter, newObjectFilter: ObjectFilterInput, objectTyeCodes: EnumTypeConvert[]) => ObjectFilterInput;
8
8
  export {};
@@ -1,10 +1,12 @@
1
1
  import { Group } from 'Features/SYSTEM/Group/types';
2
2
  import { User } from 'Features/SYSTEM/User/types';
3
- import { PagingQueryInput } from 'Features/types';
3
+ import { CustomPagingRequestInput } from 'Features/types';
4
4
  import { NotificationTemplates, ObjectFilter } from '../components/ConfigNotification/type';
5
5
  import { SubscriptionConfigRequestGqlInput, SubscriptionConfigsType } from './types';
6
6
  export type SubscriptionConfigServices = {
7
- getSubscriptionConfigs: (p?: PagingQueryInput<SubscriptionConfigsType>) => Promise<{
7
+ getSubscriptionConfigs: (p: {
8
+ input: CustomPagingRequestInput;
9
+ }) => Promise<{
8
10
  items: SubscriptionConfigsType[];
9
11
  total: number;
10
12
  }>;
@@ -20,6 +22,7 @@ export type SubscriptionConfigServices = {
20
22
  updateSubscriptionConfig: (p: {
21
23
  input: SubscriptionConfigRequestGqlInput;
22
24
  id: number;
25
+ versionId?: number;
23
26
  }) => Promise<void>;
24
27
  getObjectFilter: () => Promise<{
25
28
  items: ObjectFilter[];
@@ -6,7 +6,7 @@ import { ScheduleType } from './enums';
6
6
  export type SubscriptionConfigSortInput = {
7
7
  id?: SortEnumType;
8
8
  name?: SortEnumType;
9
- objectType?: SortEnumType;
9
+ baseObjectType?: SortEnumType;
10
10
  scheduleExpression?: SortEnumType;
11
11
  scheduleIntervalDaysOfMonth?: SortEnumType;
12
12
  scheduleIntervalDaysOfWeek?: SortEnumType;
@@ -31,7 +31,7 @@ type WorkflowState = {
31
31
  type ObjectDefinition = {
32
32
  fieldName?: string;
33
33
  fieldPath?: string;
34
- objectTypeCode?: string;
34
+ baseObjectTypeCode?: string;
35
35
  };
36
36
  export type ObjectDefinitionWithPermission = {
37
37
  permission?: number;
@@ -56,7 +56,7 @@ type SubscriptionConfigDetail = {
56
56
  export type SubscriptionConfigsType = {
57
57
  id?: number;
58
58
  name?: string;
59
- objectType?: string;
59
+ baseObjectType?: string;
60
60
  scheduleExpression?: string;
61
61
  scheduleIntervalDaysOfMonth?: string;
62
62
  scheduleIntervalDaysOfWeek?: string;
@@ -68,9 +68,10 @@ export type SubscriptionConfigsType = {
68
68
  scheduleType?: ScheduleType;
69
69
  details?: Array<SubscriptionConfigDetail>;
70
70
  outputFieldPermission?: OutputFieldPermission;
71
+ versionId?: number;
71
72
  };
72
73
  export interface Info {
73
- objectType?: string;
74
+ baseObjectType?: string;
74
75
  name?: string;
75
76
  status?: boolean;
76
77
  }
@@ -80,7 +81,7 @@ export interface ISubscriptionConfigAddFilter extends BaseNotificationConfig {
80
81
  notificationConfigDetailPermissions: boolean;
81
82
  }
82
83
  export type fieldEditPermissionType = {
83
- objectType: boolean;
84
+ baseObjectType: boolean;
84
85
  name: boolean;
85
86
  subscriptionConfigDetails: boolean;
86
87
  schedulePermissions: {
@@ -103,7 +104,7 @@ export type TemplatesCollectionSegment = {
103
104
  export type Template = {
104
105
  id: number;
105
106
  name: string;
106
- objectType: string;
107
+ baseObjectType: string;
107
108
  contentType: string;
108
109
  channelType: string;
109
110
  configType: string;
@@ -161,7 +162,7 @@ export type KeyValueSubscriptionConfigDetailRequestGqlInput = {
161
162
  };
162
163
  export type SubscriptionConfigRequestGqlInput = {
163
164
  name?: string;
164
- objectType?: string;
165
+ baseObjectType?: string;
165
166
  scheduleExpression?: string;
166
167
  scheduleIntervalDaysOfMonth?: string;
167
168
  scheduleIntervalDaysOfWeek?: string;
@@ -182,7 +183,7 @@ export type NofiticationTemplate = {
182
183
  contentType?: ContentType;
183
184
  id?: number;
184
185
  name?: string;
185
- objectType?: string;
186
+ baseObjectType?: string;
186
187
  title?: string;
187
188
  };
188
189
  export {};