@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
@@ -55,7 +55,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
57
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
58
- // @ts-nocheck
59
58
  import { forwardRef, useState, useEffect, useRef, useMemo, useImperativeHandle } from "react";
60
59
  import { DataTable, } from "primereact/datatable";
61
60
  import { Column } from "primereact/column";
@@ -66,7 +65,6 @@ import { Dialog } from "primereact/dialog";
66
65
  import { createSolidEntityApi } from "../../../redux/api/solidEntityApi";
67
66
  import { useGetSolidViewLayoutQuery } from "../../../redux/api/solidViewApi";
68
67
  import { SolidListViewColumn } from "./SolidListViewColumn";
69
- // import { SolidListViewOptions } from "../common/SolidListviewOptions";
70
68
  import { SolidCreateButton } from "../common/SolidCreateButton";
71
69
  import { SolidGlobalSearchElement } from "../common/SolidGlobalSearchElement";
72
70
  import { useLazyCheckIfPermissionExistsQuery } from "../../../redux/api/userApi";
@@ -82,7 +80,6 @@ import { Divider } from "primereact/divider";
82
80
  import CompactImage from '../../../resources/images/layout/images/compact.png';
83
81
  import CozyImage from '../../../resources/images/layout/images/cozy.png';
84
82
  import ComfortableImage from '../../../resources/images/layout/images/comfortable.png';
85
- import { capitalize } from "lodash";
86
83
  import Lightbox from "yet-another-react-lightbox";
87
84
  import Counter from "yet-another-react-lightbox/plugins/counter";
88
85
  import Download from "yet-another-react-lightbox/plugins/download";
@@ -171,38 +168,41 @@ export var SolidListView = forwardRef(function (params, ref) {
171
168
  var router = useRouter();
172
169
  var searchParams = useSearchParams();
173
170
  var localeName = searchParams.get("locale");
171
+ var _36 = useState(null), solidListViewMetaData = _36[0], setSolidListViewMetaData = _36[1];
172
+ var _37 = useState(null), solidListViewLayout = _37[0], setSolidListViewLayout = _37[1];
173
+ var _38 = useState(false), isDraftPublishWorkflowEnabled = _38[0], setIsDraftPublishWorkflowEnabled = _38[1];
174
174
  // Filter query realted states
175
- var _36 = useState(null), filters = _36[0], setFilters = _36[1];
176
- var _37 = useState(0), totalRecords = _37[0], setTotalRecords = _37[1];
177
- var _38 = useState(0), first = _38[0], setFirst = _38[1];
178
- var _39 = useState(((_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.defaultPageSize) ? (_c = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _c === void 0 ? void 0 : _c.defaultPageSize : 10), rows = _39[0], setRows = _39[1];
179
- var _40 = useState([{ field: "id", order: -1 }]), multiSortMeta = _40[0], setMultiSortMeta = _40[1];
180
- var _41 = useState([]), toPopulate = _41[0], setToPopulate = _41[1];
181
- var _42 = useState([]), toPopulateMedia = _42[0], setToPopulateMedia = _42[1];
182
- var _43 = useState([]), actionsAllowed = _43[0], setActionsAllowed = _43[1];
183
- var _44 = useState(false), isOpenSolidXAiPanel = _44[0], setIsOpenSolidXAiPanel = _44[1];
184
- var _45 = useState(380), chatterWidth = _45[0], setChatterWidth = _45[1];
185
- var _46 = useState(false), isResizing = _46[0], setIsResizing = _46[1];
175
+ var _39 = useState(null), filters = _39[0], setFilters = _39[1];
176
+ var _40 = useState(0), totalRecords = _40[0], setTotalRecords = _40[1];
177
+ var _41 = useState(0), first = _41[0], setFirst = _41[1];
178
+ var _42 = useState(((_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.defaultPageSize) ? (_c = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _c === void 0 ? void 0 : _c.defaultPageSize : 10), rows = _42[0], setRows = _42[1];
179
+ var _43 = useState([{ field: "id", order: -1 }]), multiSortMeta = _43[0], setMultiSortMeta = _43[1];
180
+ var _44 = useState([]), toPopulate = _44[0], setToPopulate = _44[1];
181
+ var _45 = useState([]), toPopulateMedia = _45[0], setToPopulateMedia = _45[1];
182
+ var _46 = useState([]), actionsAllowed = _46[0], setActionsAllowed = _46[1];
183
+ var _47 = useState(false), isOpenSolidXAiPanel = _47[0], setIsOpenSolidXAiPanel = _47[1];
184
+ var _48 = useState(380), chatterWidth = _48[0], setChatterWidth = _48[1];
185
+ var _49 = useState(false), isResizing = _49[0], setIsResizing = _49[1];
186
186
  // All list view state.
187
- var _47 = useState([]), listViewData = _47[0], setListViewData = _47[1];
188
- var _48 = useState([]), selectedRecords = _48[0], setSelectedRecords = _48[1];
189
- var _49 = useState([]), selectedRecoverRecords = _49[0], setSelectedRecoverRecords = _49[1];
190
- var _50 = useState(true), loading = _50[0], setLoading = _50[1];
191
- var _51 = useState(false), isDialogVisible = _51[0], setDialogVisible = _51[1];
192
- var _52 = useState(false), isRecoverDialogVisible = _52[0], setRecoverDialogVisible = _52[1];
193
- var _53 = useState(), createButtonUrl = _53[0], setCreateButtonUrl = _53[1];
194
- var _54 = useState(), editButtonUrl = _54[0], setEditButtonUrl = _54[1];
195
- var _55 = useState({}), createActionQueryParams = _55[0], setCreateActionQueryParams = _55[1];
196
- var _56 = useState({}), editActionQueryParams = _56[0], setEditActionQueryParams = _56[1];
197
- var _57 = useState(false), showArchived = _57[0], setShowArchived = _57[1];
198
- var _58 = useState(false), queryDataLoaded = _58[0], setQueryDataLoaded = _58[1];
199
- var _59 = useState(null), filterPredicates = _59[0], setFilterPredicates = _59[1];
200
- var _60 = useState(false), showSaveFilterPopup = _60[0], setShowSaveFilterPopup = _60[1];
187
+ var _50 = useState([]), listViewData = _50[0], setListViewData = _50[1];
188
+ var _51 = useState([]), selectedRecords = _51[0], setSelectedRecords = _51[1];
189
+ var _52 = useState([]), selectedRecoverRecords = _52[0], setSelectedRecoverRecords = _52[1];
190
+ var _53 = useState(true), loading = _53[0], setLoading = _53[1];
191
+ var _54 = useState(false), isDialogVisible = _54[0], setDialogVisible = _54[1];
192
+ var _55 = useState(false), isRecoverDialogVisible = _55[0], setRecoverDialogVisible = _55[1];
193
+ var _56 = useState(), createButtonUrl = _56[0], setCreateButtonUrl = _56[1];
194
+ var _57 = useState(), editButtonUrl = _57[0], setEditButtonUrl = _57[1];
195
+ var _58 = useState({}), createActionQueryParams = _58[0], setCreateActionQueryParams = _58[1];
196
+ var _59 = useState({}), editActionQueryParams = _59[0], setEditActionQueryParams = _59[1];
197
+ var _60 = useState(false), showArchived = _60[0], setShowArchived = _60[1];
198
+ var _61 = useState(false), queryDataLoaded = _61[0], setQueryDataLoaded = _61[1];
199
+ var _62 = useState(null), filterPredicates = _62[0], setFilterPredicates = _62[1];
200
+ var _63 = useState(false), showSaveFilterPopup = _63[0], setShowSaveFilterPopup = _63[1];
201
201
  var triggerCheckIfPermissionExists = useLazyCheckIfPermissionExistsQuery()[0];
202
202
  var handleCustomButtonClick = useHandleListCustomButtonClick();
203
- var _61 = useState(null), mcpUrl = _61[0], setMcpUrl = _61[1];
203
+ var _64 = useState(null), mcpUrl = _64[0], setMcpUrl = _64[1];
204
204
  var getMcpUrl = useLazyGetMcpUrlQuery()[0];
205
- var _62 = useLazyGetSolidSettingsQuery(), trigger = _62[0], solidSettingsData = _62[1].data;
205
+ var _65 = useLazyGetSolidSettingsQuery(), trigger = _65[0], solidSettingsData = _65[1].data;
206
206
  useEffect(function () {
207
207
  trigger(""); // Fetch settings on mount
208
208
  }, []);
@@ -329,9 +329,6 @@ export var SolidListView = forwardRef(function (params, ref) {
329
329
  }, {
330
330
  encodeValuesOnly: true,
331
331
  });
332
- var _63 = useState(null), solidListViewMetaData = _63[0], setSolidListViewMetaData = _63[1];
333
- var _64 = useState(null), solidListViewLayout = _64[0], setSolidListViewLayout = _64[1];
334
- var _65 = useState(false), isDraftPublishWorkflowEnabled = _65[0], setIsDraftPublishWorkflowEnabled = _65[1];
335
332
  var _66 = useGetSolidViewLayoutQuery(listViewMetaDataQs), solidListViewInitialMetaData = _66.data, solidListViewMetaDataError = _66.error, solidListViewMetaDataIsLoading = _66.isLoading, solidListViewMetaDataIsError = _66.isError, refetch = _66.refetch;
336
333
  var initialFilterMethod = function () {
337
334
  var _a, _b, _c, _d;
@@ -421,7 +418,7 @@ export var SolidListView = forwardRef(function (params, ref) {
421
418
  }, [solidListViewInitialMetaData]);
422
419
  // set layout and actions for create and edit buttons and view modes
423
420
  useEffect(function () {
424
- var _a, _b, _c, _d;
421
+ var _a, _b, _c, _d, _e;
425
422
  if (solidListViewLayout) {
426
423
  var listLayoutAttrs = solidListViewLayout.attrs;
427
424
  var createActionUrl = (listLayoutAttrs === null || listLayoutAttrs === void 0 ? void 0 : listLayoutAttrs.createAction) && ((_a = listLayoutAttrs === null || listLayoutAttrs === void 0 ? void 0 : listLayoutAttrs.createAction) === null || _a === void 0 ? void 0 : _a.type) === "custom" ? (_b = listLayoutAttrs === null || listLayoutAttrs === void 0 ? void 0 : listLayoutAttrs.createAction) === null || _b === void 0 ? void 0 : _b.customComponent : "form/new";
@@ -440,8 +437,8 @@ export var SolidListView = forwardRef(function (params, ref) {
440
437
  actionContext: listLayoutAttrs.editAction.context,
441
438
  });
442
439
  }
443
- var viewModes_1 = (listLayoutAttrs === null || listLayoutAttrs === void 0 ? void 0 : listLayoutAttrs.allowedViews) && (listLayoutAttrs === null || listLayoutAttrs === void 0 ? void 0 : listLayoutAttrs.allowedViews.length) > 0 && (listLayoutAttrs === null || listLayoutAttrs === void 0 ? void 0 : listLayoutAttrs.allowedViews.map(function (view) { return { label: capitalize(view), value: view }; }));
444
- setViewModes(viewModes_1);
440
+ // const viewModes = listLayoutAttrs?.allowedViews && listLayoutAttrs?.allowedViews.length > 0 && listLayoutAttrs?.allowedViews.map((view: any) => { return { label: capitalize(view), value: view }; });
441
+ setViewModes((_e = solidListViewInitialMetaData === null || solidListViewInitialMetaData === void 0 ? void 0 : solidListViewInitialMetaData.data) === null || _e === void 0 ? void 0 : _e.viewModes);
445
442
  if (createActionUrl) {
446
443
  setCreateButtonUrl(createActionUrl);
447
444
  }
@@ -805,7 +802,7 @@ export var SolidListView = forwardRef(function (params, ref) {
805
802
  $and: []
806
803
  };
807
804
  setFilters(params.customFilter || { $and: [] });
808
- solidGlobalSearchElementRef.current.clearFilter();
805
+ solidGlobalSearchElementRef === null || solidGlobalSearchElementRef === void 0 ? void 0 : solidGlobalSearchElementRef.current.clearFilter();
809
806
  };
810
807
  var cloneListData = function () {
811
808
  if (typeof structuredClone === "function") {
@@ -870,7 +867,7 @@ export var SolidListView = forwardRef(function (params, ref) {
870
867
  }, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "3", height: "10", viewBox: "0 0 4 16", fill: "none", children: _jsx("path", { d: "M4 14C4 14.55 3.80417 15.0208 3.4125 15.4125C3.02083 15.8042 2.55 16 2 16C1.45 16 0.979167 15.8042 0.5875 15.4125C0.195833 15.0208 0 14.55 0 14C0 13.45 0.195833 12.9792 0.5875 12.5875C0.979167 12.1958 1.45 12 2 12C2.55 12 3.02083 12.1958 3.4125 12.5875C3.80417 12.9792 4 13.45 4 14ZM4 8C4 8.55 3.80417 9.02083 3.4125 9.4125C3.02083 9.80417 2.55 10 2 10C1.45 10 0.979167 9.80417 0.5875 9.4125C0.195833 9.02083 0 8.55 0 8C0 7.45 0.195833 6.97917 0.5875 6.5875C0.979167 6.19583 1.45 6 2 6C2.55 6 3.02083 6.19583 3.4125 6.5875C3.80417 6.97917 4 7.45 4 8ZM4 2C4 2.55 3.80417 3.02083 3.4125 3.4125C3.02083 3.80417 2.55 4 2 4C1.45 4 0.979167 3.80417 0.5875 3.4125C0.195833 3.02083 0 2.55 0 2C0 1.45 0.195833 0.979166 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0C2.55 0 3.02083 0.195833 3.4125 0.5875C3.80417 0.979166 4 1.45 4 2Z", fill: "#666666" }) }) }) })
871
868
  // <a onClick={() => {
872
869
  // if (params.embeded == true) {
873
- // params.handlePopUpOpen(solidViewData.id);
870
+ // params.handleAddClickForEmbeddedView(solidViewData.id);
874
871
  // } else {
875
872
  // router.push(`${editButtonUrl}/${solidViewData.id}`)
876
873
  // }
@@ -1084,21 +1081,30 @@ export var SolidListView = forwardRef(function (params, ref) {
1084
1081
  response = _g.sent();
1085
1082
  if (((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.statusCode) === 200) {
1086
1083
  setDeleteEntity(false);
1087
- (_b = toast.current) === null || _b === void 0 ? void 0 : _b.show(__assign({ severity: "success", summary: ERROR_MESSAGES.DELETED, detail: ERROR_MESSAGES.ENTITY_DELETE }, (severity === "error"
1088
- ? { sticky: true } // stays until user closes
1089
- : { life: 3000 })));
1084
+ (_b = toast.current) === null || _b === void 0 ? void 0 : _b.show({
1085
+ severity: "success",
1086
+ summary: ERROR_MESSAGES.DELETED,
1087
+ detail: ERROR_MESSAGES.ENTITY_DELETE,
1088
+ life: 3000,
1089
+ });
1090
1090
  }
1091
1091
  else {
1092
- (_c = toast.current) === null || _c === void 0 ? void 0 : _c.show(__assign({ severity: "error", summary: ERROR_MESSAGES.DELETE_FAIELD, detail: (_e = (_d = response === null || response === void 0 ? void 0 : response.error) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error }, (severity === "error"
1093
- ? { sticky: true } // stays until user closes
1094
- : { life: 3000 })));
1092
+ (_c = toast.current) === null || _c === void 0 ? void 0 : _c.show({
1093
+ severity: "error",
1094
+ summary: ERROR_MESSAGES.DELETE_FAIELD,
1095
+ detail: (_e = (_d = response === null || response === void 0 ? void 0 : response.error) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error,
1096
+ sticky: true, // stays until user closes
1097
+ });
1095
1098
  }
1096
1099
  return [3 /*break*/, 3];
1097
1100
  case 2:
1098
1101
  error_2 = _g.sent();
1099
- (_f = toast.current) === null || _f === void 0 ? void 0 : _f.show(__assign({ severity: "error", summary: ERROR_MESSAGES.DELETE_FAIELD, detail: ERROR_MESSAGES.SOMETHING_WRONG }, (severity === "error"
1100
- ? { sticky: true } // stays until user closes
1101
- : { life: 3000 })));
1102
+ (_f = toast.current) === null || _f === void 0 ? void 0 : _f.show({
1103
+ severity: "error",
1104
+ summary: ERROR_MESSAGES.DELETE_FAIELD,
1105
+ detail: ERROR_MESSAGES.SOMETHING_WRONG,
1106
+ sticky: true, // stays until user closes
1107
+ });
1102
1108
  return [3 /*break*/, 3];
1103
1109
  case 3: return [2 /*return*/];
1104
1110
  }
@@ -1156,7 +1162,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1156
1162
  ((_2 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _2 === void 0 ? void 0 : _2.create) !== false &&
1157
1163
  params.embeded == true &&
1158
1164
  params.inlineCreate == true &&
1159
- searchParams.get("viewMode") !== "view" && (_jsx(Button, { type: "button", icon: ((_3 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _3 === void 0 ? void 0 : _3.addButtonIcon) ? (_4 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _4 === void 0 ? void 0 : _4.addButtonIcon : "pi pi-plus", label: ((_5 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _5 === void 0 ? void 0 : _5.addButtonTitle) ? (_6 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _6 === void 0 ? void 0 : _6.addButtonTitle : "Add", className: "".concat((_7 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _7 === void 0 ? void 0 : _7.addButtonClassName), size: "small", onClick: function () { return params.handlePopUpOpen("new"); } })), params.embeded !== true && (_jsx(Button, { type: "button", size: "small", icon: "pi pi-refresh", severity: "secondary", className: "solid-icon-button ", outlined: true, onClick: function () {
1165
+ searchParams.get("viewMode") !== "view" && (_jsx(Button, { type: "button", icon: ((_3 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _3 === void 0 ? void 0 : _3.addButtonIcon) ? (_4 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _4 === void 0 ? void 0 : _4.addButtonIcon : "pi pi-plus", label: ((_5 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _5 === void 0 ? void 0 : _5.addButtonTitle) ? (_6 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _6 === void 0 ? void 0 : _6.addButtonTitle : "Add", className: "".concat((_7 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _7 === void 0 ? void 0 : _7.addButtonClassName), size: "small", onClick: function () { return params.handleAddClickForEmbeddedView("new"); } })), params.embeded !== true && (_jsx(Button, { type: "button", size: "small", icon: "pi pi-refresh", severity: "secondary", className: "solid-icon-button ", outlined: true, onClick: function () {
1160
1166
  setQueryString();
1161
1167
  } })), showArchived && (_jsx(Button, { type: "button", icon: "pi pi-refresh", label: "Recover", size: "small", severity: "secondary", className: "hidden lg:flex solid-icon-button ", onClick: function () { return setRecoverDialogVisible(true); } })), params.embeded === false &&
1162
1168
  ((_8 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _8 === void 0 ? void 0 : _8.configureView) !== false && (_jsx(SolidListViewConfigure, { listViewMetaData: solidListViewMetaData, solidListViewLayout: solidListViewLayout, setShowArchived: setShowArchived, showArchived: showArchived, viewData: solidListViewMetaData, sizeOptions: sizeOptions, setSize: setSize, size: size, viewModes: viewModes, params: params, actionsAllowed: actionsAllowed, selectedRecords: selectedRecords, setDialogVisible: setDialogVisible, setShowSaveFilterPopup: setShowSaveFilterPopup, filters: filters, handleFetchUpdatedRecords: handleFetchUpdatedRecords, setRecoverDialogVisible: setRecoverDialogVisible }))] })] }), ((_9 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _9 === void 0 ? void 0 : _9.enableGlobalSearch) === true && showGlobalSearchElement &&
@@ -1172,7 +1178,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1172
1178
  // loading={loading || isLoading}
1173
1179
  // loadingIcon="pi pi-spinner"
1174
1180
  selection: params.embeded === true
1175
- ? null
1181
+ ? []
1176
1182
  : __spreadArray(__spreadArray([], selectedRecords, true), selectedRecoverRecords, true), onSelectionChange: params.embeded === true ? undefined : onSelectionChange, selectionMode: params.embeded === true ? null : "checkbox", removableSort: (_15 = (_14 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _14 === void 0 ? void 0 : _14.removableSort) !== null && _15 !== void 0 ? _15 : true, sortMode: (_17 = (_16 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _16 === void 0 ? void 0 : _16.sortMode) !== null && _17 !== void 0 ? _17 : "multiple", filterIcon: _jsx(FilterIcon, {}), tableClassName: "solid-data-table", paginatorClassName: "solid-paginator", paginatorTemplate: "RowsPerPageDropdown CurrentPageReport PrevPageLink NextPageLink", currentPageReportTemplate: "{first} - {last} of {totalRecords}", onRowClick: function (e) {
1177
1183
  var _a, _b;
1178
1184
  var rowData = e.data;
@@ -1184,7 +1190,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1184
1190
  if (!(hasFindPermission || hasUpdatePermission))
1185
1191
  return;
1186
1192
  if (params.embeded === true) {
1187
- params.handlePopUpOpen(rowData === null || rowData === void 0 ? void 0 : rowData.id);
1193
+ params.handleEditClickForEmbeddedView(rowData === null || rowData === void 0 ? void 0 : rowData.id);
1188
1194
  }
1189
1195
  else {
1190
1196
  if (typeof window !== "undefined") {
@@ -1235,7 +1241,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1235
1241
  var shouldHideEditOrDeleteButton = isDraftPublishWorkflowEnabled && (rowData === null || rowData === void 0 ? void 0 : rowData.publishedAt);
1236
1242
  return (_jsx(_Fragment, { children: !shouldHideEditOrDeleteButton && (_jsx(Button, { text: true, type: "button", severity: "secondary", className: "", label: "", size: "small", iconPos: "left", icon: "pi pi-pencil", onClick: function () {
1237
1243
  if (params.embeded == true) {
1238
- params.handlePopUpOpen(rowData === null || rowData === void 0 ? void 0 : rowData.id);
1244
+ params.handleEditClickForEmbeddedView(rowData === null || rowData === void 0 ? void 0 : rowData.id);
1239
1245
  }
1240
1246
  else {
1241
1247
  if (typeof window !== "undefined") {
@@ -1250,12 +1256,17 @@ export var SolidListView = forwardRef(function (params, ref) {
1250
1256
  } })) }));
1251
1257
  } })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) &&
1252
1258
  ((_22 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _22 === void 0 ? void 0 : _22.delete) !== false &&
1253
- ((_23 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _23 === void 0 ? void 0 : _23.showRowDeleteInContextMenu) ===
1254
- false && (_jsx(Column, { header: "Delete", body: function (rowData) {
1259
+ ((_23 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _23 === void 0 ? void 0 : _23.showRowDeleteInContextMenu) !==
1260
+ true && (_jsx(Column, { header: "Delete", body: function (rowData) {
1255
1261
  var shouldHideEditOrDeleteButton = isDraftPublishWorkflowEnabled && (rowData === null || rowData === void 0 ? void 0 : rowData.publishedAt);
1256
- return (_jsx(_Fragment, { children: !shouldHideEditOrDeleteButton && (_jsx(Button, { text: true, type: "button", className: "", size: "small", iconPos: "left", severity: "danger", icon: "pi pi-trash", onClick: function () {
1257
- setSelectedSolidViewData(rowData);
1258
- setDeleteEntity(true);
1262
+ return (_jsx(_Fragment, { children: (!shouldHideEditOrDeleteButton || params.embeded) && (_jsx(Button, { text: true, type: "button", className: "", size: "small", iconPos: "left", severity: "danger", icon: "pi pi-trash", onClick: function () {
1263
+ if ((params === null || params === void 0 ? void 0 : params.embededFieldRelationType) === "many-to-many") {
1264
+ params === null || params === void 0 ? void 0 : params.handleDeleteClick(rowData.id);
1265
+ }
1266
+ else {
1267
+ setSelectedSolidViewData(rowData);
1268
+ setDeleteEntity(true);
1269
+ }
1259
1270
  } })) }));
1260
1271
  } })), hasAnyContextMenuActions && (_jsx(Column, { frozen: true, alignFrozen: "right", body: function (rowData) {
1261
1272
  var _a, _b, _c;
@@ -1266,7 +1277,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1266
1277
  false && (_jsxs(_Fragment, { children: [detailsBodyTemplate(rowData), _jsx(OverlayPanel, { ref: op, className: "solid-custom-overlay", style: { top: 10, minWidth: 120 }, children: _jsxs("div", { className: "flex flex-column gap-1 p-1", children: [hasEditInContextMenu && (_jsx(Button, { type: "button", className: "w-full text-left gap-1", label: "Edit", size: "small", iconPos: "left", icon: "pi pi-pencil", onClick: function () {
1267
1278
  var _a, _b;
1268
1279
  if (params.embeded == true) {
1269
- params.handlePopUpOpen((_a = selectedDataRef.current) === null || _a === void 0 ? void 0 : _a.id);
1280
+ params.handleEditClickForEmbeddedView((_a = selectedDataRef.current) === null || _a === void 0 ? void 0 : _a.id);
1270
1281
  }
1271
1282
  else {
1272
1283
  try {
@@ -1276,7 +1287,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1276
1287
  catch (e) { }
1277
1288
  router.push("".concat(editBaseUrl, "/").concat((_b = selectedDataRef.current) === null || _b === void 0 ? void 0 : _b.id, "?viewMode=edit&").concat(new URLSearchParams(editActionQueryParams).toString()));
1278
1289
  }
1279
- } })), hasDeleteInContextMenu && (_jsx(Button, { text: true, type: "button", className: "w-full text-left gap-1", label: "Delete", size: "small", iconPos: "left", severity: "danger", icon: "pi pi-trash", onClick: function () { return setDeleteEntity(true); } })), hasCustomContextMenuButtons && ((_c = (_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.rowButtons) === null || _c === void 0 ? void 0 : _c.filter(function (rb) {
1290
+ } })), hasDeleteInContextMenu && params.embeded !== true && (_jsx(Button, { text: true, type: "button", className: "w-full text-left gap-1", label: "Delete", size: "small", iconPos: "left", severity: "danger", icon: "pi pi-trash", onClick: function () { return setDeleteEntity(true); } })), hasCustomContextMenuButtons && ((_c = (_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.rowButtons) === null || _c === void 0 ? void 0 : _c.filter(function (rb) {
1280
1291
  var _a, _b;
1281
1292
  return ((_a = rb === null || rb === void 0 ? void 0 : rb.attrs) === null || _a === void 0 ? void 0 : _a.actionInContextMenu) === true &&
1282
1293
  ((_b = rb === null || rb === void 0 ? void 0 : rb.attrs) === null || _b === void 0 ? void 0 : _b.visible) !== false;
@@ -1298,7 +1309,7 @@ export var SolidListView = forwardRef(function (params, ref) {
1298
1309
  zIndex: 9,
1299
1310
  }, onMouseDown: function () { return setIsResizing(true); } })), isOpenSolidXAiPanel && (_jsx(Button, { icon: "pi pi-angle-double-right", size: "small", text: true, className: "chatter-collapse-btn", style: { width: 30, height: 30, aspectRatio: "1/1" }, onClick: handleCloseSolidXAIPanel })), isOpenSolidXAiPanel === false ? (_jsxs("div", { className: "flex flex-column gap-2 justify-content-center p-2", children: [_jsx("div", { className: "chatter-collapsed-content", onClick: handleOpenSolidXAIPanel, children: _jsxs("div", { className: "flex gap-2", children: [" ", _jsx(SolidXAIIcon, {}), " SolidX AI", " "] }) }), _jsx(Button, { icon: "pi pi-chevron-left", size: "small", className: "px-0", style: { width: 30 }, onClick: handleOpenSolidXAIPanel })] })) : (_jsx(SolidAiMainWrapper, { mcpUrl: mcpUrl }))] })), _jsxs(Dialog, { visible: isDialogVisible, header: "Confirm Delete", onHide: function () { return setDialogVisible(false); }, headerClassName: "py-2", contentClassName: "px-0 pb-0",
1300
1311
  // style={{ width: '20vw' }}
1301
- breakpoints: { '1199px': '30rem', '550px': '85vw' }, children: [_jsx(Divider, { className: "m-0" }), _jsxs("div", { className: "p-4", children: [_jsx("p", { className: "m-0 solid-primary-title", style: { fontSize: 16 }, children: "Are you sure you want to delete the selected records?" }), _jsxs("div", { className: "flex align-items-center gap-2 mt-3", children: [_jsx(Button, { label: "Delete", severity: "danger", size: "small", onClick: handleDeleteEntity, autoFocus: true, onClick: deleteBulk }), _jsx(Button, { label: "Cancel", size: "small", onClick: onDeleteClose, outlined: true, className: 'bg-primary-reverse' })] })] })] }), _jsx(Dialog, { visible: isRecoverDialogVisible, header: "Confirm Recover", 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", severity: "danger", autoFocus: true, onClick: recoverAll }), _jsx(Button, { label: "No", icon: "pi pi-times", onClick: function () { return setRecoverDialogVisible(false); } })] })); }, onHide: function () { return setRecoverDialogVisible(false); }, children: _jsx("p", { children: "Are you sure you want to recover all records?" }) }), listViewRowActionData && (_jsx(Dialog, { visible: listViewRowActionPopupState, modal: true, onHide: closeListViewRowActionPopup, children: _jsx(ListViewRowActionPopup, { context: listViewRowActionData }) })), _jsxs(Dialog, { header: "Delete ".concat(((_26 = (_25 = (_24 = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _24 === void 0 ? void 0 : _24.solidView) === null || _25 === void 0 ? void 0 : _25.model) === null || _26 === void 0 ? void 0 : _26.displayName)
1312
+ breakpoints: { '1199px': '30rem', '550px': '85vw' }, children: [_jsx(Divider, { className: "m-0" }), _jsxs("div", { className: "p-4", children: [_jsx("p", { className: "m-0 solid-primary-title", style: { fontSize: 16 }, children: "Are you sure you want to delete the selected records?" }), _jsxs("div", { className: "flex align-items-center gap-2 mt-3", children: [_jsx(Button, { label: "Delete", severity: "danger", size: "small", autoFocus: true, onClick: deleteBulk }), _jsx(Button, { label: "Cancel", size: "small", onClick: onDeleteClose, outlined: true, className: 'bg-primary-reverse' })] })] })] }), _jsx(Dialog, { visible: isRecoverDialogVisible, header: "Confirm Recover", 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", severity: "danger", autoFocus: true, onClick: recoverAll }), _jsx(Button, { label: "No", icon: "pi pi-times", onClick: function () { return setRecoverDialogVisible(false); } })] })); }, onHide: function () { return setRecoverDialogVisible(false); }, children: _jsx("p", { children: "Are you sure you want to recover all records?" }) }), listViewRowActionData && (_jsx(Dialog, { visible: listViewRowActionPopupState, modal: true, onHide: closeListViewRowActionPopup, children: _jsx(ListViewRowActionPopup, { context: listViewRowActionData }) })), _jsxs(Dialog, { header: "Delete ".concat(((_26 = (_25 = (_24 = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _24 === void 0 ? void 0 : _24.solidView) === null || _25 === void 0 ? void 0 : _25.model) === null || _26 === void 0 ? void 0 : _26.displayName)
1302
1313
  ? (_29 = (_28 = (_27 = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _27 === void 0 ? void 0 : _27.solidView) === null || _28 === void 0 ? void 0 : _28.model) === null || _29 === void 0 ? void 0 : _29.displayName
1303
1314
  : params === null || params === void 0 ? void 0 : params.modelName), headerClassName: "py-2", contentClassName: "px-0 pb-0", visible: deleteEntity, style: { width: "20vw" }, onHide: function () {
1304
1315
  if (!deleteEntity)