@solidxai/core-ui 0.1.3 → 0.1.4-beta.1

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 (150) hide show
  1. package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
  2. package/dist/components/auth/SolidInitialLoginOtp.js +0 -5
  3. package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
  4. package/dist/components/auth/SolidInitialLoginOtp.tsx +0 -5
  5. package/dist/components/auth/SolidLogin.d.ts.map +1 -1
  6. package/dist/components/auth/SolidLogin.js +7 -5
  7. package/dist/components/auth/SolidLogin.js.map +1 -1
  8. package/dist/components/auth/SolidLogin.tsx +10 -8
  9. package/dist/components/common/GeneralSettings.d.ts.map +1 -1
  10. package/dist/components/common/GeneralSettings.js +48 -47
  11. package/dist/components/common/GeneralSettings.js.map +1 -1
  12. package/dist/components/common/GeneralSettings.tsx +41 -10
  13. package/dist/components/core/common/FilterComponent.js.map +1 -1
  14. package/dist/components/core/common/FilterComponent.tsx +1 -1
  15. package/dist/components/core/common/GroupingComponent.d.ts +54 -0
  16. package/dist/components/core/common/GroupingComponent.d.ts.map +1 -0
  17. package/dist/components/core/common/GroupingComponent.js +196 -0
  18. package/dist/components/core/common/GroupingComponent.js.map +1 -0
  19. package/dist/components/core/common/GroupingComponent.tsx +452 -0
  20. package/dist/components/core/common/SolidGlobalSearchElement.d.ts +18 -1
  21. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  22. package/dist/components/core/common/SolidGlobalSearchElement.js +152 -52
  23. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  24. package/dist/components/core/common/SolidGlobalSearchElement.tsx +212 -35
  25. package/dist/components/core/extension/solid-core/modelSequence/modelSequenceFormViewChangeHandler.d.ts +19 -0
  26. package/dist/components/core/extension/solid-core/modelSequence/modelSequenceFormViewChangeHandler.d.ts.map +1 -0
  27. package/dist/components/core/extension/solid-core/modelSequence/modelSequenceFormViewChangeHandler.js +90 -0
  28. package/dist/components/core/extension/solid-core/modelSequence/modelSequenceFormViewChangeHandler.js.map +1 -0
  29. package/dist/components/core/extension/solid-core/modelSequence/modelSequenceFormViewChangeHandler.tsx +59 -0
  30. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.d.ts.map +1 -1
  31. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js +17 -28
  32. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js.map +1 -1
  33. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +71 -56
  34. package/dist/components/core/filter/SolidOneToManyFilterElement.d.ts +2 -0
  35. package/dist/components/core/filter/SolidOneToManyFilterElement.d.ts.map +1 -0
  36. package/dist/components/core/filter/SolidOneToManyFilterElement.js +86 -0
  37. package/dist/components/core/filter/SolidOneToManyFilterElement.js.map +1 -0
  38. package/dist/components/core/filter/SolidOneToManyFilterElement.tsx +62 -0
  39. package/dist/components/core/filter/SolidVarInputsFilterElement.d.ts +1 -0
  40. package/dist/components/core/filter/SolidVarInputsFilterElement.d.ts.map +1 -1
  41. package/dist/components/core/filter/SolidVarInputsFilterElement.js +4 -1
  42. package/dist/components/core/filter/SolidVarInputsFilterElement.js.map +1 -1
  43. package/dist/components/core/filter/SolidVarInputsFilterElement.tsx +10 -0
  44. package/dist/components/core/filter/fields/SolidRelationField.d.ts.map +1 -1
  45. package/dist/components/core/filter/fields/SolidRelationField.js +4 -2
  46. package/dist/components/core/filter/fields/SolidRelationField.js.map +1 -1
  47. package/dist/components/core/filter/fields/SolidRelationField.tsx +4 -2
  48. package/dist/components/core/filter/fields/relations/SolidRelationOneToManyField.d.ts +4 -0
  49. package/dist/components/core/filter/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -0
  50. package/dist/components/core/filter/fields/relations/SolidRelationOneToManyField.js +25 -0
  51. package/dist/components/core/filter/fields/relations/SolidRelationOneToManyField.js.map +1 -0
  52. package/dist/components/core/filter/fields/relations/SolidRelationOneToManyField.tsx +60 -0
  53. package/dist/components/core/form/SolidFormFooter.js +4 -4
  54. package/dist/components/core/form/SolidFormFooter.js.map +1 -1
  55. package/dist/components/core/form/SolidFormFooter.tsx +4 -4
  56. package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
  57. package/dist/components/core/form/fields/SolidBooleanField.js +11 -8
  58. package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
  59. package/dist/components/core/form/fields/SolidBooleanField.tsx +20 -8
  60. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +40 -0
  61. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  62. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +317 -157
  63. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  64. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +463 -243
  65. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
  66. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +46 -95
  67. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
  68. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +57 -113
  69. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.d.ts +15 -4
  70. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.d.ts.map +1 -1
  71. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.js +220 -33
  72. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.js.map +1 -1
  73. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +167 -36
  74. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  75. package/dist/components/core/kanban/SolidKanbanView.js +13 -12
  76. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  77. package/dist/components/core/kanban/SolidKanbanView.tsx +8 -7
  78. package/dist/components/core/list/SolidListView.d.ts +18 -10
  79. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  80. package/dist/components/core/list/SolidListView.js +176 -177
  81. package/dist/components/core/list/SolidListView.js.map +1 -1
  82. package/dist/components/core/list/SolidListView.tsx +130 -143
  83. package/dist/components/core/list/SolidListViewConfigure.d.ts +7 -0
  84. package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
  85. package/dist/components/core/list/SolidListViewConfigure.js +6 -5
  86. package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
  87. package/dist/components/core/list/SolidListViewConfigure.tsx +21 -12
  88. package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
  89. package/dist/components/core/list/columns/SolidShortTextColumn.js +1 -37
  90. package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
  91. package/dist/components/core/list/columns/SolidShortTextColumn.tsx +0 -41
  92. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
  93. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +9 -5
  94. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
  95. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +14 -3
  96. package/dist/components/core/list/listViewRegistry.js.map +1 -1
  97. package/dist/components/core/list/listViewRegistry.ts +1 -2
  98. package/dist/components/core/tree/SolidTreeView.d.ts +38 -0
  99. package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -0
  100. package/dist/components/core/tree/SolidTreeView.js +1179 -0
  101. package/dist/components/core/tree/SolidTreeView.js.map +1 -0
  102. package/dist/components/core/tree/SolidTreeView.tsx +1637 -0
  103. package/dist/components/core/tree/treeViewRegistry.d.ts +7 -0
  104. package/dist/components/core/tree/treeViewRegistry.d.ts.map +1 -0
  105. package/dist/components/core/tree/treeViewRegistry.js +17 -0
  106. package/dist/components/core/tree/treeViewRegistry.js.map +1 -0
  107. package/dist/components/core/tree/treeViewRegistry.ts +23 -0
  108. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  109. package/dist/components/core/users/CreateUser.js +19 -6
  110. package/dist/components/core/users/CreateUser.js.map +1 -1
  111. package/dist/components/core/users/CreateUser.tsx +39 -0
  112. package/dist/helpers/helpers.d.ts +2 -0
  113. package/dist/helpers/helpers.d.ts.map +1 -1
  114. package/dist/helpers/helpers.js +3 -1
  115. package/dist/helpers/helpers.js.map +1 -1
  116. package/dist/helpers/helpers.ts +4 -1
  117. package/dist/helpers/registry.d.ts.map +1 -1
  118. package/dist/helpers/registry.js +5 -1
  119. package/dist/helpers/registry.js.map +1 -1
  120. package/dist/helpers/registry.ts +7 -2
  121. package/dist/index.d.ts +3 -1
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +2 -0
  124. package/dist/index.js.map +1 -1
  125. package/dist/index.ts +6 -1
  126. package/dist/resources/globals.css +32 -4
  127. package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
  128. package/dist/routes/pages/admin/core/ListPage.js +2 -2
  129. package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
  130. package/dist/routes/pages/admin/core/ListPage.tsx +3 -2
  131. package/dist/routes/pages/admin/core/ModuleHomePage.d.ts.map +1 -1
  132. package/dist/routes/pages/admin/core/ModuleHomePage.js +4 -15
  133. package/dist/routes/pages/admin/core/ModuleHomePage.js.map +1 -1
  134. package/dist/routes/pages/admin/core/ModuleHomePage.tsx +4 -3
  135. package/dist/routes/pages/admin/core/TreePage.d.ts +2 -0
  136. package/dist/routes/pages/admin/core/TreePage.d.ts.map +1 -0
  137. package/dist/routes/pages/admin/core/TreePage.js +37 -0
  138. package/dist/routes/pages/admin/core/TreePage.js.map +1 -0
  139. package/dist/routes/pages/admin/core/TreePage.tsx +30 -0
  140. package/dist/routes/solidRoutes.d.ts.map +1 -1
  141. package/dist/routes/solidRoutes.js +2 -0
  142. package/dist/routes/solidRoutes.js.map +1 -1
  143. package/dist/routes/solidRoutes.tsx +3 -1
  144. package/dist/routes/types.d.ts +1 -1
  145. package/dist/routes/types.d.ts.map +1 -1
  146. package/dist/routes/types.js.map +1 -1
  147. package/dist/routes/types.ts +1 -0
  148. package/dist/types/index.d.ts +8 -2
  149. package/dist/types/solid-core.d.ts +40 -0
  150. package/package.json +1 -1
@@ -2,7 +2,13 @@ import { useState } from "react";
2
2
  import qs from "qs";
3
3
  import { createSolidEntityApi } from "../../../../../../../redux/api/solidEntityApi";
4
4
 
5
- export const useRelationEntityHandler = ({ fieldContext, formik, autoCompleteLimit = 1000 }: any) => {
5
+ export type RelationItem = {
6
+ label: string;
7
+ value: any;
8
+ original?: any;
9
+ };
10
+
11
+ export const useRelationEntityHandler = ({ fieldContext, autoCompleteLimit = 1000 }: any) => {
6
12
  const fieldMetadata = fieldContext.fieldMetadata;
7
13
  const fieldLayoutInfo = fieldContext.field;
8
14
 
@@ -10,55 +16,180 @@ export const useRelationEntityHandler = ({ fieldContext, formik, autoCompleteLim
10
16
  const { useLazyGetSolidEntitiesQuery } = entityApi;
11
17
  const [triggerGetSolidEntities] = useLazyGetSolidEntitiesQuery();
12
18
 
13
- const [autoCompleteItems, setAutoCompleteItems] = useState([]);
19
+ const parentEntityApi = createSolidEntityApi(fieldContext.modelName);
20
+ const { usePatchUpdateSolidEntityMutation, useUpdateSolidEntityMutation } = parentEntityApi;
21
+ const [updateSolidEntity] = usePatchUpdateSolidEntityMutation();
14
22
 
15
- const fetchRelationEntities = async (autocompleteQs = "", limit = autoCompleteLimit) => {
16
- // const queryData = {
17
- // offset: 0,
18
- // limit: limit,
19
- // filters: {
20
- // [fieldMetadata?.relationModel?.userKeyField?.name]: {
21
- // '$containsi': query
22
- // }
23
- // }
24
- // };
23
+ /**
24
+ * AUTOCOMPLETE & CHECKBOX:
25
+ * The currently linked items — drives what chips are shown in the autocomplete
26
+ * and which checkboxes are checked.
27
+ */
28
+ const [currentValues, setCurrentValues] = useState<RelationItem[]>([]);
25
29
 
26
- // const autocompleteQs = qs.stringify(queryData, { encodeValuesOnly: true });
30
+ /**
31
+ * CHECKBOX ONLY:
32
+ * All possible options to render as checkboxes.
33
+ * For autocomplete this is not needed — options are fetched on user search input.
34
+ */
35
+ const [allOptions, setAllOptions] = useState<RelationItem[]>([]);
27
36
 
28
- const response = await triggerGetSolidEntities(autocompleteQs);
29
- const data = response.data;
30
-
31
- if (data) {
32
- const mappedItems = data.records.map((item: any) => ({
33
- label: item[fieldMetadata?.relationModel?.userKeyField?.name],
34
- value: item['id'],
35
- original: item
36
- }));
37
- setAutoCompleteItems(mappedItems);
37
+ /**
38
+ * AUTOCOMPLETE ONLY:
39
+ * The live suggestion list shown in the dropdown while the user is typing.
40
+ * Populated by `fetchSuggestions` on each keystroke.
41
+ */
42
+ const [suggestions, setSuggestions] = useState<RelationItem[]>([]);
43
+
44
+ // ─── Internal ────────────────────────────────────────────────────────────────
45
+
46
+ const sendLinkCommand = async (item: RelationItem, command: "link" | "unlink") => {
47
+ const parentId = fieldContext.data?.id;
48
+ const fieldName = fieldLayoutInfo.attrs.name;
49
+
50
+ if (!parentId || parentId === "new") return;
51
+
52
+ const formData = new FormData();
53
+ formData.append(`${fieldName}Ids[0]`, item.value);
54
+ formData.append(`${fieldName}Command`, command);
55
+
56
+ await updateSolidEntity({ id: parentId, data: formData }).unwrap();
57
+ };
58
+
59
+ // ─── Shared ──────────────────────────────────────────────────────────────────
60
+
61
+ /**
62
+ * Fetch currently linked items and populate `currentValues`.
63
+ * Call on mount for both autocomplete and checkbox widgets.
64
+ */
65
+ const fetchCurrentValues = async () => {
66
+ const relationFieldName =
67
+ fieldContext.fieldMetadata?.relationCoModelFieldName ?? fieldContext.modelName;
68
+
69
+ const parentId = fieldContext.data?.id ?? -1;
70
+
71
+ const queryData = {
72
+ offset: 0,
73
+ limit: autoCompleteLimit,
74
+ filters: {
75
+ $and: [{ [relationFieldName]: { id: { $eq: parentId } } }],
76
+ },
77
+ };
78
+
79
+ const response = await triggerGetSolidEntities(qs.stringify(queryData, { encodeValuesOnly: true }));
80
+ if (!response.data) return;
81
+
82
+ const mapped: RelationItem[] = response.data.records.map((item: any) => ({
83
+ label: item[fieldMetadata?.relationModel?.userKeyField?.name],
84
+ value: item.id,
85
+ original: item,
86
+ }));
87
+
88
+ setCurrentValues(mapped);
89
+ };
90
+
91
+ /**
92
+ * Link an item: fire the API call, and on success update `currentValues`.
93
+ * Used by both autocomplete (onSelect) and checkbox (onChange when unchecked).
94
+ */
95
+ const linkItem = async (item: RelationItem) => {
96
+ try {
97
+ await sendLinkCommand(item, "link");
98
+ setCurrentValues((prev) =>
99
+ prev.some((s) => s.value === item.value) ? prev : [...prev, item]
100
+ );
101
+ } catch (error: any) {
102
+ console.error(error?.data?.message || error?.message || `Failed to link ${fieldMetadata.displayName}`);
38
103
  }
39
104
  };
40
105
 
41
- const addNewRelation = (values: any) => {
42
- const currentData = formik.values[fieldLayoutInfo.attrs.name] || [];
106
+ /**
107
+ * Unlink an item: fire the API call, and on success update `currentValues`.
108
+ * Used by both autocomplete (onUnselect) and checkbox (onChange when checked).
109
+ */
110
+ const unlinkItem = async (item: RelationItem) => {
111
+ try {
112
+ await sendLinkCommand(item, "unlink");
113
+ setCurrentValues((prev) => prev.filter((s) => s.value !== item.value));
114
+ } catch (error: any) {
115
+ console.error(error?.data?.message || error?.message || `Failed to unlink ${fieldMetadata.displayName}`);
116
+ }
117
+ };
118
+
119
+ // ─── Autocomplete-specific ───────────────────────────────────────────────────
120
+
121
+ /**
122
+ * Fetch suggestions for the autocomplete dropdown based on the user's search query.
123
+ * Call this inside `completeMethod` of the AutoComplete component.
124
+ */
125
+ const fetchSuggestions = async (autocompleteQs = "") => {
126
+ const response = await triggerGetSolidEntities(autocompleteQs);
127
+ if (!response.data) return;
128
+
129
+ const mapped: RelationItem[] = response.data.records.map((item: any) => ({
130
+ label: item[fieldMetadata?.relationModel?.userKeyField?.name],
131
+ value: item["id"],
132
+ original: item,
133
+ }));
134
+
135
+ setSuggestions(mapped);
136
+ };
137
+
138
+ // ─── Checkbox-specific ───────────────────────────────────────────────────────
139
+
140
+ /**
141
+ * Fetch all possible options for the checkbox list.
142
+ * Call this on mount for the checkbox widget.
143
+ */
144
+ const fetchAllOptions = async (autocompleteQs = "") => {
145
+ const response = await triggerGetSolidEntities(autocompleteQs);
146
+ if (!response.data) return;
147
+
148
+ const mapped: RelationItem[] = response.data.records.map((item: any) => ({
149
+ label: item[fieldMetadata?.relationModel?.userKeyField?.name],
150
+ value: item["id"],
151
+ original: item,
152
+ }));
153
+
154
+ setAllOptions(mapped);
155
+ };
156
+
157
+ // ─── Inline create ───────────────────────────────────────────────────────────
158
+
159
+ /**
160
+ * Handle an inline-created entity: link it and add to both `currentValues`
161
+ * and `allOptions` (so it shows up in the checkbox list immediately).
162
+ */
163
+ const addNewRelation = async (values: any) => {
43
164
  const jsonValues = Object.fromEntries(values.entries());
44
- const newItem = {
165
+ const newItem: RelationItem = {
45
166
  label: jsonValues[fieldMetadata?.relationModel?.userKeyField?.name],
46
167
  value: "new",
47
168
  original: jsonValues,
48
169
  };
49
170
 
50
- formik.setFieldValue(fieldLayoutInfo.attrs.name, [...currentData, newItem]);
171
+ await linkItem(newItem);
51
172
 
52
- // Optionally add to autocomplete list
53
- setAutoCompleteItems((prev: any) => {
54
- const exists = prev.some((item: any) => item.label === newItem.label);
55
- return exists ? prev : [...prev, newItem];
56
- });
173
+ // Also add to allOptions so checkbox widget shows the new item
174
+ setAllOptions((prev) =>
175
+ prev.some((s) => s.value === newItem.value) ? prev : [...prev, newItem]
176
+ );
57
177
  };
58
178
 
59
179
  return {
60
- autoCompleteItems,
61
- fetchRelationEntities,
62
- addNewRelation
180
+ // State
181
+ currentValues,
182
+ allOptions,
183
+ suggestions,
184
+ // Shared
185
+ fetchCurrentValues,
186
+ linkItem,
187
+ unlinkItem,
188
+ // Autocomplete-specific
189
+ fetchSuggestions,
190
+ // Checkbox-specific
191
+ fetchAllOptions,
192
+ // Inline create
193
+ addNewRelation,
63
194
  };
64
- };
195
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"SolidKanbanView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/kanban/SolidKanbanView.tsx"],"names":[],"mappings":"AAoBA,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AAaxD,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,eAAO,MAAM,eAAe,WAAY,qBAAqB,4CAizB5D,CAAC"}
1
+ {"version":3,"file":"SolidKanbanView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/kanban/SolidKanbanView.tsx"],"names":[],"mappings":"AAoBA,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AAaxD,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,eAAO,MAAM,eAAe,WAAY,qBAAqB,4CAkzB5D,CAAC"}
@@ -80,7 +80,7 @@ import { useRouter } from "../../../hooks/useRouter";
80
80
  import { SolidKanbanViewConfigure } from "./SolidKanbanViewConfigure";
81
81
  import { KanbanUserViewLayout } from "./KanbanUserViewLayout";
82
82
  import { useDispatch, useSelector } from "react-redux";
83
- import { queryObjectToQueryString, queryStringToQueryObject } from "../list/SolidListView";
83
+ import { setFilterObjectToLocalStorage, getFilterObjectFromLocalStorage } from "../list/SolidListView";
84
84
  import { Toast } from "primereact/toast";
85
85
  import { ERROR_MESSAGES } from "../../../constants/error-messages";
86
86
  import { showNavbar, toggleNavbar } from "../../../redux/features/navbarSlice";
@@ -222,13 +222,14 @@ export var SolidKanbanView = function (params) {
222
222
  };
223
223
  // Initial Filter data
224
224
  useEffect(function () {
225
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
225
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
226
226
  if (solidKanbanViewMetaData) {
227
227
  setKanbanViewMetaData(solidKanbanViewMetaData);
228
- var viewModes_1 = ((_d = (_c = (_b = (_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.allowedViews) && ((_h = (_g = (_f = (_e = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _e === void 0 ? void 0 : _e.solidView) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.attrs) === null || _h === void 0 ? void 0 : _h.allowedViews.length) > 0 && ((_m = (_l = (_k = (_j = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _j === void 0 ? void 0 : _j.solidView) === null || _k === void 0 ? void 0 : _k.layout) === null || _l === void 0 ? void 0 : _l.attrs) === null || _m === void 0 ? void 0 : _m.allowedViews.map(function (view) { return { label: capitalize(view), value: view }; }));
229
- setViewModes(viewModes_1);
230
- if (((_r = (_q = (_p = (_o = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _o === void 0 ? void 0 : _o.solidView) === null || _p === void 0 ? void 0 : _p.layout) === null || _q === void 0 ? void 0 : _q.attrs) === null || _r === void 0 ? void 0 : _r.grouped) !== false) {
231
- setGroupByFieldName((_v = (_u = (_t = (_s = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _s === void 0 ? void 0 : _s.solidView) === null || _t === void 0 ? void 0 : _t.layout) === null || _u === void 0 ? void 0 : _u.attrs) === null || _v === void 0 ? void 0 : _v.groupBy);
228
+ // const viewModes = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.length > 0 && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.map((view: any) => { return { label: capitalize(view), value: view } });
229
+ setViewModes((_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _a === void 0 ? void 0 : _a.viewModes);
230
+ // setViewModes(viewModes);
231
+ if (((_e = (_d = (_c = (_b = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _b === void 0 ? void 0 : _b.solidView) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.attrs) === null || _e === void 0 ? void 0 : _e.grouped) !== false) {
232
+ setGroupByFieldName((_j = (_h = (_g = (_f = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _f === void 0 ? void 0 : _f.solidView) === null || _g === void 0 ? void 0 : _g.layout) === null || _h === void 0 ? void 0 : _h.attrs) === null || _j === void 0 ? void 0 : _j.groupBy);
232
233
  }
233
234
  else {
234
235
  setGroupByFieldName("deletedTracker");
@@ -320,7 +321,7 @@ export var SolidKanbanView = function (params) {
320
321
  if (solidKanbanViewMetaData) {
321
322
  var swimlanesCount = ((_c = (_b = (_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data.solidView) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.attrs) === null || _c === void 0 ? void 0 : _c.swimlanesCount) || 5;
322
323
  if (groupByFieldName) {
323
- var queryObject = queryStringToQueryObject();
324
+ var queryObject = getFilterObjectFromLocalStorage();
324
325
  var queryString = "";
325
326
  if (queryObject) {
326
327
  var filters_1 = {
@@ -676,7 +677,7 @@ export var SolidKanbanView = function (params) {
676
677
  // @ts-ignore
677
678
  urlData.search_predicate = customFilter.search_predicate || {};
678
679
  // @ts-ignore
679
- queryObjectToQueryString(urlData);
680
+ setFilterObjectToLocalStorage(urlData);
680
681
  }
681
682
  return [4 /*yield*/, triggerGetSolidEntities(queryString)];
682
683
  case 1:
@@ -699,8 +700,8 @@ export var SolidKanbanView = function (params) {
699
700
  if (solidKanbanViewMetaData) {
700
701
  var createActionUrl = ((_d = (_c = (_b = (_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.createAction) && ((_j = (_h = (_g = (_f = (_e = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _e === void 0 ? void 0 : _e.solidView) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.attrs) === null || _h === void 0 ? void 0 : _h.createAction) === null || _j === void 0 ? void 0 : _j.type) === "custom" ? (_p = (_o = (_m = (_l = (_k = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _k === void 0 ? void 0 : _k.solidView) === null || _l === void 0 ? void 0 : _l.layout) === null || _m === void 0 ? void 0 : _m.attrs) === null || _o === void 0 ? void 0 : _o.createAction) === null || _p === void 0 ? void 0 : _p.customComponent : "form/new";
701
702
  var editActionUrl = ((_t = (_s = (_r = (_q = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _q === void 0 ? void 0 : _q.solidView) === null || _r === void 0 ? void 0 : _r.layout) === null || _s === void 0 ? void 0 : _s.attrs) === null || _t === void 0 ? void 0 : _t.editAction) && ((_y = (_x = (_w = (_v = (_u = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _u === void 0 ? void 0 : _u.solidView) === null || _v === void 0 ? void 0 : _v.layout) === null || _w === void 0 ? void 0 : _w.attrs) === null || _x === void 0 ? void 0 : _x.editAction) === null || _y === void 0 ? void 0 : _y.type) === "custom" ? (_3 = (_2 = (_1 = (_0 = (_z = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _z === void 0 ? void 0 : _z.solidView) === null || _0 === void 0 ? void 0 : _0.layout) === null || _1 === void 0 ? void 0 : _1.attrs) === null || _2 === void 0 ? void 0 : _2.editAction) === null || _3 === void 0 ? void 0 : _3.customComponent : "form";
702
- var viewModes_2 = ((_7 = (_6 = (_5 = (_4 = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _4 === void 0 ? void 0 : _4.solidView) === null || _5 === void 0 ? void 0 : _5.layout) === null || _6 === void 0 ? void 0 : _6.attrs) === null || _7 === void 0 ? void 0 : _7.allowedViews) && ((_11 = (_10 = (_9 = (_8 = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _8 === void 0 ? void 0 : _8.solidView) === null || _9 === void 0 ? void 0 : _9.layout) === null || _10 === void 0 ? void 0 : _10.attrs) === null || _11 === void 0 ? void 0 : _11.allowedViews.length) > 0 && ((_15 = (_14 = (_13 = (_12 = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _12 === void 0 ? void 0 : _12.solidView) === null || _13 === void 0 ? void 0 : _13.layout) === null || _14 === void 0 ? void 0 : _14.attrs) === null || _15 === void 0 ? void 0 : _15.allowedViews.map(function (view) { return { label: capitalize(view), value: view }; }));
703
- setViewModes(viewModes_2);
703
+ var viewModes_1 = ((_7 = (_6 = (_5 = (_4 = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _4 === void 0 ? void 0 : _4.solidView) === null || _5 === void 0 ? void 0 : _5.layout) === null || _6 === void 0 ? void 0 : _6.attrs) === null || _7 === void 0 ? void 0 : _7.allowedViews) && ((_11 = (_10 = (_9 = (_8 = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _8 === void 0 ? void 0 : _8.solidView) === null || _9 === void 0 ? void 0 : _9.layout) === null || _10 === void 0 ? void 0 : _10.attrs) === null || _11 === void 0 ? void 0 : _11.allowedViews.length) > 0 && ((_15 = (_14 = (_13 = (_12 = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _12 === void 0 ? void 0 : _12.solidView) === null || _13 === void 0 ? void 0 : _13.layout) === null || _14 === void 0 ? void 0 : _14.attrs) === null || _15 === void 0 ? void 0 : _15.allowedViews.map(function (view) { return { label: capitalize(view), value: view }; }));
704
+ setViewModes(viewModes_1);
704
705
  if (createActionUrl) {
705
706
  setCreateButtonUrl(createActionUrl);
706
707
  }
@@ -721,11 +722,11 @@ export var SolidKanbanView = function (params) {
721
722
  return (_jsxs("div", { className: "page-parent-wrapper", children: [_jsx(Toast, { ref: toast }), _jsxs("div", { className: "page-header flex-column lg:flex-row", children: [_jsxs("div", { className: "flex justify-content-between w-full ", children: [_jsxs("div", { className: "flex align-items-center solid-header-buttons-wrapper", children: [params.embeded !== true &&
722
723
  _jsx("div", { className: "apps-icon block md:hidden cursor-pointer", onClick: toggleBothSidebars, children: _jsx("i", { className: "pi pi-th-large" }) }), _jsx("p", { className: "m-0 view-title solid-text-wrapper", children: kanbanViewTitle }), ((_e = (_d = (_c = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _c === void 0 ? void 0 : _c.solidView) === null || _d === void 0 ? void 0 : _d.layout) === null || _e === void 0 ? void 0 : _e.attrs.enableGlobalSearch) === true &&
723
724
  // <SolidGlobalSearchElement viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
724
- _jsx("div", { className: "hidden lg:flex", children: _jsx(SolidGlobalSearchElement, { showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) })] }), _jsxs("div", { className: "flex align-items-center solid-header-buttons-wrapper", children: [((_h = (_g = (_f = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _f === void 0 ? void 0 : _f.solidView) === null || _g === void 0 ? void 0 : _g.layout) === null || _h === void 0 ? void 0 : _h.attrs.enableGlobalSearch) === true &&
725
+ _jsx("div", { className: "hidden lg:flex", children: _jsx(SolidGlobalSearchElement, { viewType: "kanban", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) })] }), _jsxs("div", { className: "flex align-items-center solid-header-buttons-wrapper", children: [((_h = (_g = (_f = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _f === void 0 ? void 0 : _f.solidView) === null || _g === void 0 ? void 0 : _g.layout) === null || _h === void 0 ? void 0 : _h.attrs.enableGlobalSearch) === true &&
725
726
  _jsx("div", { className: "flex lg:hidden", children: _jsx(Button, { type: "button", size: "small", icon: "pi pi-search", severity: "secondary", outlined: true, className: "solid-icon-button", onClick: function () { return setShowGlobalSearchElement(!showGlobalSearchElement); } }) }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'create'))) && ((_l = (_k = (_j = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _j === void 0 ? void 0 : _j.solidView) === null || _k === void 0 ? void 0 : _k.layout) === null || _l === void 0 ? void 0 : _l.attrs.create) !== false &&
726
727
  _jsx(SolidCreateButton, { createButtonUrl: createButtonUrl, createActionQueryParams: createActionQueryParams, responsiveIconOnly: true }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) && ((_p = (_o = (_m = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _m === void 0 ? void 0 : _m.solidView) === null || _o === void 0 ? void 0 : _o.layout) === null || _p === void 0 ? void 0 : _p.attrs.delete) !== false && selectedRecords.length > 0 && _jsx(Button, { type: "button", label: "Delete", size: "small", onClick: function () { return setDialogVisible(true); }, className: "small-button ", severity: "danger" }), _jsx(Button, { type: "button", size: "small", icon: "pi pi-refresh", severity: "secondary", className: "solid-icon-button", outlined: true, onClick: function () {
727
728
  window.location.reload();
728
- } }), _jsx(SolidKanbanViewConfigure, { solidKanbanViewMetaData: solidKanbanViewMetaData, actionsAllowed: actionsAllowed, viewModes: viewModes, setLayoutDialogVisible: setLayoutDialogVisible, setShowSaveFilterPopup: setShowSaveFilterPopup })] })] }), ((_s = (_r = (_q = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _q === void 0 ? void 0 : _q.solidView) === null || _r === void 0 ? void 0 : _r.layout) === null || _s === void 0 ? void 0 : _s.attrs.enableGlobalSearch) === true && showGlobalSearchElement && (_jsx("div", { className: "flex lg:hidden", children: _jsx(SolidGlobalSearchElement, { showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) }))] }), _jsx("style", { children: ".p-datatable .p-datatable-loading-overlay {background-color: rgba(0, 0, 0, 0.0);}" }), solidKanbanViewMetaData && kanbanViewData &&
729
+ } }), _jsx(SolidKanbanViewConfigure, { solidKanbanViewMetaData: solidKanbanViewMetaData, actionsAllowed: actionsAllowed, viewModes: viewModes, setLayoutDialogVisible: setLayoutDialogVisible, setShowSaveFilterPopup: setShowSaveFilterPopup })] })] }), ((_s = (_r = (_q = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _q === void 0 ? void 0 : _q.solidView) === null || _r === void 0 ? void 0 : _r.layout) === null || _s === void 0 ? void 0 : _s.attrs.enableGlobalSearch) === true && showGlobalSearchElement && (_jsx("div", { className: "flex lg:hidden", children: _jsx(SolidGlobalSearchElement, { viewType: "kanban", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) }))] }), _jsx("style", { children: ".p-datatable .p-datatable-loading-overlay {background-color: rgba(0, 0, 0, 0.0);}" }), solidKanbanViewMetaData && kanbanViewData &&
729
730
  _jsx(KanbanBoard, { groupByFieldName: groupByFieldName, groupedView: groupedView, kanbanViewData: kanbanViewData, maxSwimLanesCount: maxSwimLanesCount, solidKanbanViewMetaData: solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data, setKanbanViewData: setKanbanViewData, handleLoadMore: handleLoadMore, onDragEnd: onDragEnd, handleSwimLanePagination: handleSwimLanePagination, setLightboxUrls: setLightboxUrls, setOpenLightbox: setOpenLightbox, editButtonUrl: editBaseUrl }), _jsx(Dialog, { visible: isDialogVisible, header: "Confirm Delete", modal: true, className: "solid-confirm-dialog", footer: function () { return (_jsxs("div", { className: "flex justify-content-center", children: [_jsx(Button, { label: "Yes", icon: "pi pi-check", className: 'small-button', severity: "danger", autoFocus: true, onClick: deleteBulk }), _jsx(Button, { label: "No", icon: "pi pi-times", className: 'small-button', onClick: onDeleteClose })] })); }, onHide: function () { return setDialogVisible(false); }, children: _jsx("p", { children: "Are you sure you want to delete the selected records?" }) }), openLightbox &&
730
731
  _jsx(Lightbox, { open: openLightbox, plugins: [Counter, Download], close: function () { return setOpenLightbox(false); },
731
732
  // @ts-ignore