awing-library 2.1.2-dev.9 → 2.1.2-dev.90

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 (81) 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 +102 -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/Sharing/Utils.d.ts +1 -0
  62. package/dist/esm/Features/SYSTEM/Sharing/index.d.ts +2 -0
  63. package/dist/esm/Features/SYSTEM/User/Services.d.ts +5 -2
  64. package/dist/esm/Features/SYSTEM/User/types.d.ts +1 -0
  65. package/dist/esm/Features/SYSTEM/Workflow/CreateOrEdit.d.ts +1 -1
  66. package/dist/esm/Features/SYSTEM/Workflow/container.d.ts +4 -2
  67. package/dist/esm/Features/SYSTEM/Workflow/index.d.ts +5 -3
  68. package/dist/esm/Features/SYSTEM/Workflow/types.d.ts +1 -0
  69. package/dist/esm/Features/SYSTEM/index.d.ts +1 -1
  70. package/dist/esm/Features/types.d.ts +18 -0
  71. package/dist/esm/Helpers/index.d.ts +1 -0
  72. package/dist/esm/Helpers/number.d.ts +2 -1
  73. package/dist/esm/Helpers/query.d.ts +161 -0
  74. package/dist/esm/index.js +2508 -784
  75. package/dist/esm/translate/resources/en/translation.json +9 -6
  76. package/dist/esm/translate/resources/id/translation.json +9 -6
  77. package/dist/esm/translate/resources/ja/translation.json +8 -5
  78. package/dist/esm/translate/resources/th/translation.json +8 -5
  79. package/dist/esm/translate/resources/vi/translation.json +11 -6
  80. package/dist/index.d.ts +426 -123
  81. package/package.json +1 -1
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Available filter operation types
3
+ */
4
+ export declare enum FilterOperationType {
5
+ EQ = "eq",// Equal
6
+ CONTAINS = "contains",// Contains substring
7
+ STARTSWITH = "startswith",// Starts with
8
+ ENDSWITH = "endswith",// Ends with
9
+ GT = "gt",// Greater than
10
+ GTE = "gte",// Greater than or equal
11
+ LT = "lt",// Less than
12
+ LTE = "lte",// Less than or equal
13
+ IN = "in",// In array
14
+ BETWEEN = "between",// Between two values
15
+ NE = "ne",// Not equal
16
+ NOTCONTAINS = "notcontains",// Does not contain substring
17
+ NOTIN = "notin",// Not in array
18
+ CUSTOM = "custom"
19
+ }
20
+ /**
21
+ * Logical operators for combining filter conditions
22
+ */
23
+ export declare enum LogicalOperatorType {
24
+ AND = "and",
25
+ OR = "or",
26
+ NOT = "not"
27
+ }
28
+ /**
29
+ * Structure for a single filter item
30
+ */
31
+ export interface FilterItem {
32
+ key: string;
33
+ value: any;
34
+ type: FilterOperationType | string;
35
+ isArray?: boolean;
36
+ }
37
+ /**
38
+ * Structure for a filter group that can contain nested conditions
39
+ */
40
+ export interface FilterGroup {
41
+ operator: LogicalOperatorType;
42
+ filters: Array<FilterItem | FilterGroup>;
43
+ }
44
+ /**
45
+ * Filter expression can be either a single item or a group
46
+ */
47
+ export type FilterExpression = FilterItem | FilterGroup;
48
+ /**
49
+ * Converts an array of filter objects to a string condition
50
+ * @param filters - Array of objects with key, value, and type properties
51
+ * @param defaultOperator - Default logical operator to use when combining filters (AND or OR)
52
+ * @returns Object with a 'condition' property containing the string condition and optional 'params' array
53
+ */
54
+ export declare function convertArrayFiltersToCondition(filters: Array<FilterItem>, defaultOperator?: LogicalOperatorType): {
55
+ condition: string;
56
+ params?: string[];
57
+ } | null;
58
+ /**
59
+ * Converts a complex filter expression to a string condition
60
+ * @param filterExpression - Filter expression (can be nested with logical operators)
61
+ * @returns Object with a 'condition' property containing the string condition and optional 'params' array
62
+ */
63
+ export declare function convertFilterExpressionToCondition(filterExpression: FilterExpression): {
64
+ condition: string;
65
+ params?: string[];
66
+ } | null;
67
+ /**
68
+ * Usage examples:
69
+ * * Simple filter with AND:
70
+ * ```typescript
71
+ * const filters: FilterItem[] = [
72
+ * { key: 'name', value: 'John', type: FilterOperationType.CONTAINS },
73
+ * { key: 'age', value: 30, type: FilterOperationType.GTE }
74
+ * ];
75
+ * const result = convertArrayFiltersToCondition(filters); // name.Contains("John") && age>=30
76
+ * ```
77
+ *
78
+ * Simple filter with OR:
79
+ * ```typescript
80
+ * const filters: FilterItem[] = [
81
+ * { key: 'status', value: 'active', type: FilterOperationType.EQ },
82
+ * { key: 'status', value: 'pending', type: FilterOperationType.EQ }
83
+ * ];
84
+ * const result = convertArrayFiltersToCondition(filters, LogicalOperatorType.OR); // status="active" || status="pending"
85
+ * ```
86
+ *
87
+ * Filter with isArray property:
88
+ * ```typescript
89
+ * const filters: FilterItem[] = [
90
+ * { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ, isArray: false },
91
+ * { key: 'name', value: 'Long', type: FilterOperationType.EQ, isArray: true },
92
+ * ];
93
+ * const result = convertArrayFiltersToCondition(filters);
94
+ * // Returns: { condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(name)', params: ["Long"] }
95
+ * ```
96
+ *
97
+ * Filter with isArray and array values:
98
+ * ```typescript
99
+ * const filters: FilterItem[] = [
100
+ * { key: 'id', value: [1, 2, 3], type: FilterOperationType.EQ, isArray: true },
101
+ * { key: 'names', value: ['name1', 'name2', 'name3'], type: FilterOperationType.EQ, isArray: true },
102
+ * ];
103
+ * const result = convertArrayFiltersToCondition(filters);
104
+ * // Returns: { condition: '@0.Contains(id) && @1.Contains(names)', params: ["1,2,3", "name1,name2,name3"] }
105
+ * ```
106
+ *
107
+ * Complex nested filter:
108
+ * ```typescript
109
+ * const complexFilter: FilterGroup = {
110
+ * operator: LogicalOperatorType.AND,
111
+ * filters: [
112
+ * { key: 'name', value: 'John', type: FilterOperationType.CONTAINS },
113
+ * {
114
+ * operator: LogicalOperatorType.OR,
115
+ * filters: [
116
+ * { key: 'age', value: 30, type: FilterOperationType.GTE },
117
+ * { key: 'vip', value: true, type: FilterOperationType.EQ }
118
+ * ]
119
+ * },
120
+ * {
121
+ * operator: LogicalOperatorType.NOT,
122
+ * filters: [
123
+ * { key: 'status', value: 'inactive', type: FilterOperationType.EQ }
124
+ * ]
125
+ * }
126
+ * ]
127
+ * };
128
+ * const result = convertFilterExpressionToCondition(complexFilter);
129
+ * // name.Contains("John") && (age>=30 || vip="true") && !(status="inactive")
130
+ * ```
131
+ *
132
+ * Complex filter with parameterized values:
133
+ * ```typescript
134
+ * const complexFilter: FilterGroup = {
135
+ * operator: LogicalOperatorType.AND,
136
+ * filters: [
137
+ * { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ },
138
+ * { key: 'name', value: 'Long', type: FilterOperationType.EQ, isArray: true }
139
+ * ]
140
+ * };
141
+ * const result = convertFilterExpressionToCondition(complexFilter);
142
+ * // Returns: { condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(name)', params: ["Long"] }
143
+ * ```
144
+ *
145
+ * Complex filter with array values:
146
+ * ```typescript
147
+ * const complexFilter: FilterGroup = {
148
+ * operator: LogicalOperatorType.AND,
149
+ * filters: [
150
+ * { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ },
151
+ * { key: 'id', value: [1, 2], type: FilterOperationType.EQ, isArray: true },
152
+ * { key: 'name', value: ['name1', 'name2'], type: FilterOperationType.EQ, isArray: true }
153
+ * ]
154
+ * };
155
+ * const result = convertFilterExpressionToCondition(complexFilter);
156
+ * // Returns: {
157
+ * // condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(id) && @1.Contains(name)',
158
+ * // params: ["1,2", "name1,name2"]
159
+ * // }
160
+ * ```
161
+ */