awing-library 2.1.2-dev.6 → 2.1.2-dev.61

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 (69) hide show
  1. package/dist/esm/AWING/DataGrid/interface.d.ts +1 -1
  2. package/dist/esm/AWING/DatePicker/types.d.ts +4 -2
  3. package/dist/esm/AWING/DateRangePicker/Container.d.ts +1 -1
  4. package/dist/esm/AWING/DropDownTreeSelect/components/TreeViewSearch.d.ts +10 -0
  5. package/dist/esm/AWING/DropDownTreeSelect/components/utils.d.ts +1 -0
  6. package/dist/esm/AWING/DropDownTreeSelect/index.d.ts +10 -0
  7. package/dist/esm/AWING/DropDownTreeSelect/type.d.ts +5 -0
  8. package/dist/esm/AWING/DropDownTreeSelect/utils.d.ts +16 -0
  9. package/dist/esm/AWING/PageManagement/interface.d.ts +1 -1
  10. package/dist/esm/AWING/TableEditable/interface.d.ts +5 -1
  11. package/dist/esm/Commons/Components/ClassicBaseDrawer.d.ts +1 -1
  12. package/dist/esm/Commons/Components/ClassicDrawer.d.ts +6 -3
  13. package/dist/esm/Commons/Components/Drawer.d.ts +9 -1
  14. package/dist/esm/Features/NOTIFICATION/FilterNotification/Constants.d.ts +6 -0
  15. package/dist/esm/Features/NOTIFICATION/FilterNotification/Container.d.ts +2 -0
  16. package/dist/esm/Features/NOTIFICATION/FilterNotification/CreateOrEdit.d.ts +2 -0
  17. package/dist/esm/Features/NOTIFICATION/FilterNotification/Services.d.ts +35 -0
  18. package/dist/esm/Features/NOTIFICATION/FilterNotification/context.d.ts +11 -0
  19. package/dist/esm/Features/NOTIFICATION/FilterNotification/index.d.ts +8 -0
  20. package/dist/esm/Features/NOTIFICATION/FilterNotification/types.d.ts +49 -0
  21. package/dist/esm/Features/NOTIFICATION/FilterNotification/utils.d.ts +7 -0
  22. package/dist/esm/Features/NOTIFICATION/NotificationConfig/Services.d.ts +5 -2
  23. package/dist/esm/Features/NOTIFICATION/NotificationConfig/types.d.ts +1 -0
  24. package/dist/esm/Features/NOTIFICATION/ObjectFilter/Services.d.ts +5 -5
  25. package/dist/esm/Features/NOTIFICATION/ObjectFilter/context.d.ts +0 -2
  26. package/dist/esm/Features/NOTIFICATION/ObjectFilter/index.d.ts +0 -1
  27. package/dist/esm/Features/NOTIFICATION/ObjectFilter/types.d.ts +1 -2
  28. package/dist/esm/Features/NOTIFICATION/ObjectFilter/utils.d.ts +1 -1
  29. package/dist/esm/Features/NOTIFICATION/SubscriptionConfig/Services.d.ts +5 -2
  30. package/dist/esm/Features/NOTIFICATION/SubscriptionConfig/types.d.ts +9 -8
  31. package/dist/esm/Features/NOTIFICATION/Template/Services.d.ts +11 -4
  32. package/dist/esm/Features/NOTIFICATION/Template/context.d.ts +0 -3
  33. package/dist/esm/Features/NOTIFICATION/Template/hooks/useCreateOrEdit.d.ts +5 -5
  34. package/dist/esm/Features/NOTIFICATION/Template/index.d.ts +1 -3
  35. package/dist/esm/Features/NOTIFICATION/Template/types.d.ts +5 -5
  36. package/dist/esm/Features/NOTIFICATION/components/TestingTool/types.d.ts +2 -0
  37. package/dist/esm/Features/NOTIFICATION/components/TestingTool/utils.d.ts +1 -0
  38. package/dist/esm/Features/NOTIFICATION/index.d.ts +1 -0
  39. package/dist/esm/Features/NOTIFICATION/types.d.ts +14 -0
  40. package/dist/esm/Features/SYSTEM/Directory/Services.d.ts +3 -2
  41. package/dist/esm/Features/SYSTEM/Directory/index.d.ts +1 -1
  42. package/dist/esm/Features/SYSTEM/Group/Services.d.ts +8 -6
  43. package/dist/esm/Features/SYSTEM/Group/types.d.ts +1 -0
  44. package/dist/esm/Features/SYSTEM/Role/Services.d.ts +8 -9
  45. package/dist/esm/Features/SYSTEM/Role/types.d.ts +1 -0
  46. package/dist/esm/Features/SYSTEM/RoleTag/Services.d.ts +8 -9
  47. package/dist/esm/Features/SYSTEM/RoleTag/types.d.ts +1 -0
  48. package/dist/esm/Features/SYSTEM/Schema/Atoms.d.ts +18 -3
  49. package/dist/esm/Features/SYSTEM/Schema/Services.d.ts +5 -8
  50. package/dist/esm/Features/SYSTEM/Schema/types.d.ts +1 -0
  51. package/dist/esm/Features/SYSTEM/Sharing/Types.d.ts +9 -5
  52. package/dist/esm/Features/SYSTEM/User/Services.d.ts +5 -2
  53. package/dist/esm/Features/SYSTEM/User/types.d.ts +1 -0
  54. package/dist/esm/Features/SYSTEM/Workflow/CreateOrEdit.d.ts +1 -1
  55. package/dist/esm/Features/SYSTEM/Workflow/container.d.ts +4 -2
  56. package/dist/esm/Features/SYSTEM/Workflow/index.d.ts +5 -3
  57. package/dist/esm/Features/SYSTEM/Workflow/types.d.ts +1 -0
  58. package/dist/esm/Features/types.d.ts +18 -0
  59. package/dist/esm/Helpers/index.d.ts +1 -0
  60. package/dist/esm/Helpers/number.d.ts +2 -1
  61. package/dist/esm/Helpers/query.d.ts +161 -0
  62. package/dist/esm/index.js +5556 -5001
  63. package/dist/esm/translate/resources/en/translation.json +7 -5
  64. package/dist/esm/translate/resources/id/translation.json +7 -5
  65. package/dist/esm/translate/resources/ja/translation.json +7 -5
  66. package/dist/esm/translate/resources/th/translation.json +7 -5
  67. package/dist/esm/translate/resources/vi/translation.json +10 -6
  68. package/dist/index.d.ts +297 -126
  69. 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
  }
@@ -1,4 +1,6 @@
1
1
  import { DatePickerProps as DatePickerPropsBase } from '@mui/x-date-pickers/DatePicker';
2
- export interface DatePickerProps extends DatePickerPropsBase {
3
- label?: string;
2
+ import { Dayjs } from 'dayjs';
3
+ export interface DatePickerProps extends Omit<DatePickerPropsBase, 'value' | 'onChange'> {
4
+ value?: Dayjs | null;
5
+ onChange?: (value: Dayjs | null) => void;
4
6
  }
@@ -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;
@@ -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[];
@@ -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 {};
@@ -1,10 +1,13 @@
1
- import type { PagingQueryInput } from 'Features/types';
1
+ import type { CustomPagingRequestInput, PagingQueryInput } from 'Features/types';
2
2
  import type { Template, TemplateInput, TemplateGenerationInput, ObjectDefinition } from './types';
3
+ import { GraphQLQuery } from '../types';
3
4
  export type TemplateServices = {
4
5
  /** Get Roles
5
6
  * @param p - PagingQueryInput<Role> - Không truyền param sẽ lấy tất cả Role
6
7
  */
7
- getTemplates: (p?: PagingQueryInput<Template>) => Promise<{
8
+ getTemplates: (p: {
9
+ input: CustomPagingRequestInput;
10
+ }) => Promise<{
8
11
  items: Template[];
9
12
  totalCount: number;
10
13
  }>;
@@ -20,8 +23,7 @@ export type TemplateServices = {
20
23
  id: number;
21
24
  }) => Promise<Template>;
22
25
  getObjectDefinitions: (p?: PagingQueryInput<ObjectDefinition>) => Promise<{
23
- items: ObjectDefinition[];
24
- totalCount: number;
26
+ data: ObjectDefinition[];
25
27
  }>;
26
28
  createTemplate: (p: {
27
29
  input: TemplateInput;
@@ -29,5 +31,10 @@ export type TemplateServices = {
29
31
  updateTemplate: (p: {
30
32
  input: TemplateInput;
31
33
  id: number;
34
+ versionId?: number;
32
35
  }) => Promise<void>;
36
+ getGraphQLQueries: (p: CustomPagingRequestInput) => Promise<{
37
+ items: GraphQLQuery[];
38
+ totalCount: number;
39
+ }>;
33
40
  };
@@ -1,14 +1,11 @@
1
1
  import { TemplateServices } from './Services';
2
- import { ObjectTypeCode } from 'Features/types';
3
2
  import { type ObjectDefinition } from './types';
4
3
  /** Role Context */
5
4
  export declare const TemplateContext: import("react").Context<{
6
5
  services?: TemplateServices;
7
- objectTypeCodes?: ObjectTypeCode[];
8
6
  objectDefinitions?: ObjectDefinition[];
9
7
  }>;
10
8
  export declare const useGetContext: () => {
11
9
  services?: TemplateServices;
12
- objectTypeCodes?: ObjectTypeCode[];
13
10
  objectDefinitions?: ObjectDefinition[];
14
11
  };
@@ -1,10 +1,10 @@
1
- import { Dispatch, SetStateAction, RefObject } from 'react';
2
- import { FormMode } from '../../enums';
3
- import { TestingDataInput } from 'Features/NOTIFICATION/components/TestingTool';
4
1
  import { FieldDefinitionProps } from 'AWING/DataInput';
2
+ import { TestingDataInput } from 'Features/NOTIFICATION/components/TestingTool';
3
+ import { GraphQLQuery } from 'Features/NOTIFICATION/types';
5
4
  import { DataObject } from 'Features/types';
5
+ import { Dispatch, RefObject, SetStateAction } from 'react';
6
+ import { FormMode } from '../../enums';
6
7
  import { FieldPermissions, Template, TemplateInput } from '../types';
7
- import { ObjectTypeCode } from 'Features/types';
8
8
  export declare const DEFAULT_FIELD_PERMISSIONS: FieldPermissions;
9
9
  /**
10
10
  * Hook lấy thông tin mode và id param của component khi render
@@ -48,4 +48,4 @@ export declare const useTemplatePermissions: (mode: FormMode, template: Template
48
48
  /**
49
49
  * Hook lấy thông tin các field của template
50
50
  */
51
- export declare const useTemplateFields: (mode: FormMode, templateInput: Partial<TemplateInput> | undefined, fieldPermissions: DataObject, templateData?: Template, objectTypeCodes?: ObjectTypeCode[]) => FieldDefinitionProps<TemplateInput>[];
51
+ export declare const useTemplateFields: (mode: FormMode, templateInput: Partial<TemplateInput> | undefined, fieldPermissions: DataObject, templateData?: Template, graphqlQueries?: GraphQLQuery[]) => FieldDefinitionProps<TemplateInput>[];
@@ -1,10 +1,8 @@
1
1
  import { TemplateServices } from './Services';
2
- import { ObjectTypeCode } from 'Features/types';
3
2
  export type TemplateProps = {
4
3
  services: TemplateServices;
5
- objectTypeCodes: ObjectTypeCode[];
6
4
  };
7
5
  declare function Template(props: TemplateProps): import("react/jsx-runtime").JSX.Element;
8
6
  export default Template;
9
- export * from './types';
10
7
  export * from './Services';
8
+ export * from './types';
@@ -1,4 +1,5 @@
1
1
  import { SortInputType } from 'Features/types';
2
+ import { GraphQLQuery } from '../types';
2
3
  export type FieldPermissions = {
3
4
  objectType: boolean;
4
5
  configType: boolean;
@@ -44,13 +45,12 @@ export type Template = {
44
45
  contentType?: string;
45
46
  id?: number;
46
47
  name?: string;
47
- notificationConfigDetails?: Array<NotificationConfigDetail>;
48
- objectType?: string;
48
+ graphQLQuery?: GraphQLQuery;
49
+ graphqlQueryId?: number;
49
50
  outputFieldPermission?: OutputFieldPermission;
50
- schema?: Schema;
51
- schemaId?: number;
52
51
  subscriptionConfigDetails?: Array<SubscriptionConfigDetail>;
53
52
  title?: string;
53
+ versionId?: number;
54
54
  };
55
55
  export type SortInput = SortInputType<Template>;
56
56
  export type ConvertObjectDefinition = ObjectDefinition & {
@@ -65,7 +65,7 @@ export type TemplateInput = {
65
65
  content?: string;
66
66
  contentType?: string;
67
67
  name?: string;
68
- objectType?: string;
68
+ graphqlQueryId?: number;
69
69
  schemaId?: number;
70
70
  title?: string;
71
71
  };
@@ -1,3 +1,4 @@
1
+ import { NotificationFilterInput } from 'Features/NOTIFICATION/FilterNotification';
1
2
  import { ObjectFilterInput } from 'Features/NOTIFICATION/ObjectFilter';
2
3
  export type ProcessedData = {
3
4
  moduleTitle: string;
@@ -52,6 +53,7 @@ export type TestingDataInput = TestingInput & {
52
53
  objectId?: number;
53
54
  objectFilter?: ObjectFilterInput;
54
55
  notificationTemplate?: NotificationTemplateInput;
56
+ notificationFilter?: NotificationFilterInput;
55
57
  };
56
58
  export type FullEditorConfig = {
57
59
  position: 0 | 1;
@@ -13,5 +13,6 @@ export declare const computedTestingData: (testingData: TestingDataInput, isObje
13
13
  objectId?: number;
14
14
  objectFilter?: import("../../ObjectFilter").ObjectFilterInput;
15
15
  notificationTemplate?: import("./types").NotificationTemplateInput;
16
+ notificationFilter?: import("../../FilterNotification").NotificationFilterInput;
16
17
  };
17
18
  export declare const getMessageTitle: (isObjectFilter?: boolean, isNotificationTemplate?: boolean, isNotificationConfig?: boolean) => string;
@@ -1,4 +1,5 @@
1
1
  export { default as NotificationConfig } from './NotificationConfig';
2
2
  export { default as NotificationObjectFilter } from './ObjectFilter';
3
+ export { default as FilterNotification } from './FilterNotification';
3
4
  export { default as SubscriptionConfig } from './SubscriptionConfig';
4
5
  export { default as TemplateConfig } from './Template';