@solidxai/core-ui 0.1.4-beta.0 → 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 (61) hide show
  1. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  2. package/dist/components/core/common/SolidGlobalSearchElement.js +6 -5
  3. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  4. package/dist/components/core/common/SolidGlobalSearchElement.tsx +21 -17
  5. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.d.ts.map +1 -1
  6. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js +15 -30
  7. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js.map +1 -1
  8. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +46 -36
  9. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +40 -0
  10. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  11. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +315 -160
  12. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  13. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +459 -249
  14. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
  15. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +46 -95
  16. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
  17. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +57 -113
  18. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.d.ts +15 -5
  19. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.d.ts.map +1 -1
  20. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.js +203 -67
  21. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.js.map +1 -1
  22. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +147 -67
  23. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  24. package/dist/components/core/kanban/SolidKanbanView.js +8 -7
  25. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  26. package/dist/components/core/kanban/SolidKanbanView.tsx +3 -2
  27. package/dist/components/core/list/SolidListView.d.ts +8 -5
  28. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  29. package/dist/components/core/list/SolidListView.js +70 -59
  30. package/dist/components/core/list/SolidListView.js.map +1 -1
  31. package/dist/components/core/list/SolidListView.tsx +51 -57
  32. package/dist/components/core/list/SolidListViewConfigure.d.ts +7 -0
  33. package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
  34. package/dist/components/core/list/SolidListViewConfigure.js +6 -5
  35. package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
  36. package/dist/components/core/list/SolidListViewConfigure.tsx +21 -12
  37. package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
  38. package/dist/components/core/list/columns/SolidShortTextColumn.js +1 -37
  39. package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
  40. package/dist/components/core/list/columns/SolidShortTextColumn.tsx +0 -41
  41. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
  42. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +9 -5
  43. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
  44. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +14 -3
  45. package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
  46. package/dist/components/core/tree/SolidTreeView.js +23 -14
  47. package/dist/components/core/tree/SolidTreeView.js.map +1 -1
  48. package/dist/components/core/tree/SolidTreeView.tsx +50 -16
  49. package/dist/helpers/registry.js +3 -1
  50. package/dist/helpers/registry.js.map +1 -1
  51. package/dist/helpers/registry.ts +4 -1
  52. package/dist/resources/globals.css +14 -0
  53. package/dist/routes/pages/admin/core/ListPage.js +1 -1
  54. package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
  55. package/dist/routes/pages/admin/core/ListPage.tsx +1 -1
  56. package/dist/routes/pages/admin/core/ModuleHomePage.d.ts.map +1 -1
  57. package/dist/routes/pages/admin/core/ModuleHomePage.js +4 -15
  58. package/dist/routes/pages/admin/core/ModuleHomePage.js.map +1 -1
  59. package/dist/routes/pages/admin/core/ModuleHomePage.tsx +4 -3
  60. package/dist/types/solid-core.d.ts +1 -1
  61. 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,44 +16,55 @@ 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);
38
- }
39
- };
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);
40
55
 
41
- const populateFormikWithRelatedEntities = async () => {
56
+ await updateSolidEntity({ id: parentId, data: formData }).unwrap();
57
+ };
42
58
 
43
- /**
44
- * Example:
45
- * permissions filtered by roles.id = current role id
46
- */
59
+ // ─── Shared ──────────────────────────────────────────────────────────────────
47
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 () => {
48
66
  const relationFieldName =
49
- fieldContext.fieldMetadata?.relationCoModelFieldName ??
50
- fieldContext.modelName;
67
+ fieldContext.fieldMetadata?.relationCoModelFieldName ?? fieldContext.modelName;
51
68
 
52
69
  const parentId = fieldContext.data?.id ?? -1;
53
70
 
@@ -55,61 +72,124 @@ export const useRelationEntityHandler = ({ fieldContext, formik, autoCompleteLim
55
72
  offset: 0,
56
73
  limit: autoCompleteLimit,
57
74
  filters: {
58
- $and: [
59
- {
60
- [relationFieldName]: {
61
- id: { $eq: parentId },
62
- },
63
- },
64
- ],
75
+ $and: [{ [relationFieldName]: { id: { $eq: parentId } } }],
65
76
  },
66
77
  };
67
78
 
68
- const qsString = qs.stringify(queryData, {
69
- encodeValuesOnly: true,
70
- });
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}`);
103
+ }
104
+ };
71
105
 
72
- const response = await triggerGetSolidEntities(qsString);
73
- const data = response.data;
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
+ };
74
118
 
75
- if (!data) return;
119
+ // ─── Autocomplete-specific ───────────────────────────────────────────────────
76
120
 
77
- const mappedItems = data.records.map((item: any) => ({
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) => ({
78
130
  label: item[fieldMetadata?.relationModel?.userKeyField?.name],
79
- value: item.id,
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"],
80
151
  original: item,
81
152
  }));
82
153
 
83
- /**
84
- * IMPORTANT:
85
- * 1. Set checkbox options
86
- * 2. Set formik selected values (checked state)
87
- */
88
- formik.setFieldValue(fieldLayoutInfo.attrs.name, mappedItems);
154
+ setAllOptions(mapped);
89
155
  };
90
156
 
91
- const addNewRelation = (values: any) => {
92
- const currentData = formik.values[fieldLayoutInfo.attrs.name] || [];
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) => {
93
164
  const jsonValues = Object.fromEntries(values.entries());
94
- const newItem = {
165
+ const newItem: RelationItem = {
95
166
  label: jsonValues[fieldMetadata?.relationModel?.userKeyField?.name],
96
167
  value: "new",
97
168
  original: jsonValues,
98
169
  };
99
170
 
100
- formik.setFieldValue(fieldLayoutInfo.attrs.name, [...currentData, newItem]);
171
+ await linkItem(newItem);
101
172
 
102
- // Optionally add to autocomplete list
103
- setAutoCompleteItems((prev: any) => {
104
- const exists = prev.some((item: any) => item.label === newItem.label);
105
- return exists ? prev : [...prev, newItem];
106
- });
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
+ );
107
177
  };
108
178
 
109
179
  return {
110
- autoCompleteItems,
111
- fetchRelationEntities,
112
- populateFormikWithRelatedEntities,
113
- 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,
114
194
  };
115
- };
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"}
@@ -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");
@@ -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
  }