@solidxai/core-ui 0.1.14-beta.9 → 0.1.14
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.
- package/dist/components/auth/AuthLayout.js +1 -1
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +2 -2
- package/dist/components/common/SettingsComponent.module.css +1 -4
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +6 -7
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidFormStepper.tsx +1 -7
- package/dist/components/common/SolidThemeProvider.d.ts.map +1 -1
- package/dist/components/common/SolidThemeProvider.js +11 -127
- package/dist/components/common/SolidThemeProvider.js.map +1 -1
- package/dist/components/common/SolidThemeProvider.tsx +22 -104
- package/dist/components/core/card/CardGrid.d.ts +1 -1
- package/dist/components/core/card/CardGrid.d.ts.map +1 -1
- package/dist/components/core/card/CardGrid.js +2 -2
- package/dist/components/core/card/CardGrid.js.map +1 -1
- package/dist/components/core/card/CardGrid.tsx +0 -4
- package/dist/components/core/card/CardItem.d.ts +0 -2
- package/dist/components/core/card/CardItem.d.ts.map +1 -1
- package/dist/components/core/card/CardItem.js +3 -4
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +0 -15
- package/dist/components/core/card/SolidCardView.d.ts +1 -28
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +44 -99
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +7 -124
- package/dist/components/core/card/SolidCardViewConfigure.d.ts +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js +6 -15
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +0 -34
- package/dist/components/core/common/PDFViewer.d.ts +5 -9
- package/dist/components/core/common/PDFViewer.d.ts.map +1 -1
- package/dist/components/core/common/PDFViewer.js +102 -10
- package/dist/components/core/common/PDFViewer.js.map +1 -1
- package/dist/components/core/common/PDFViewer.tsx +88 -29
- package/dist/components/core/common/SolidCreateButton.d.ts.map +1 -1
- package/dist/components/core/common/SolidCreateButton.js +2 -2
- package/dist/components/core/common/SolidCreateButton.js.map +1 -1
- package/dist/components/core/common/SolidCreateButton.tsx +2 -22
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +134 -137
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +119 -127
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +21 -21
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.tsx +53 -62
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +2 -5
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +2 -7
- package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +2 -2
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.tsx +1 -3
- package/dist/components/core/kanban/KanbanCard.d.ts +0 -2
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +2 -4
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +1 -14
- package/dist/components/core/kanban/KanbanColumn.d.ts +1 -3
- package/dist/components/core/kanban/KanbanColumn.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.js +2 -2
- package/dist/components/core/kanban/KanbanColumn.js.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.tsx +2 -4
- package/dist/components/core/kanban/SolidKanbanView.d.ts +1 -25
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +50 -89
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +9 -82
- package/dist/components/core/list/PLAN.md +1 -1
- package/dist/components/core/list/SolidListView.d.ts +0 -11
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +3 -8
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +43 -82
- package/dist/components/core/list/SolidListViewConfigure.js +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +1 -1
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +1 -2
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/CreateModel.tsx +0 -2
- package/dist/components/core/model/FieldMetaData.d.ts +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +8 -8
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.tsx +2 -2
- package/dist/components/core/model/FieldMetaDataForm.css +0 -119
- package/dist/components/core/model/FieldMetaDataForm.js +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.tsx +1 -1
- package/dist/components/core/module/ModuleMetadataExplorer.css +0 -64
- package/dist/components/core/module/ModulePackageDialog.css +12 -117
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +3 -6
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +13 -35
- package/dist/components/layout/AdminHeaderActions.d.ts.map +1 -1
- package/dist/components/layout/AdminHeaderActions.js +10 -15
- package/dist/components/layout/AdminHeaderActions.js.map +1 -1
- package/dist/components/layout/AdminHeaderActions.tsx +8 -15
- package/dist/components/layout/AdminTopHeader.d.ts.map +1 -1
- package/dist/components/layout/AdminTopHeader.js +18 -1
- package/dist/components/layout/AdminTopHeader.js.map +1 -1
- package/dist/components/layout/AdminTopHeader.tsx +21 -3
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/index.ts +0 -5
- package/dist/resources/globals.css +0 -15
- package/dist/resources/solid-custom.css +0 -11
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/resources/themes/solid-light-modern/theme.css +3 -4
- package/dist/routes/pages/admin/core/CardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.js +2 -15
- package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.tsx +2 -17
- package/dist/routes/pages/admin/core/DashboardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.js +3 -31
- package/dist/routes/pages/admin/core/DashboardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.tsx +11 -39
- package/dist/routes/pages/admin/core/KanbanPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js +2 -15
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.tsx +2 -17
- package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +13 -5
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +15 -5
- package/dist/types/solid-core.d.ts +0 -8
- package/package.json +1 -1
|
@@ -4,9 +4,7 @@ import { useGetSolidViewLayoutQuery } from "../../../redux/api/solidViewApi";
|
|
|
4
4
|
import { useLazyCheckIfPermissionExistsQuery } from "../../../redux/api/userApi";
|
|
5
5
|
import { DropResult } from "@hello-pangea/dnd";
|
|
6
6
|
import qs from "qs";
|
|
7
|
-
import {
|
|
8
|
-
import { useSession } from "../../../hooks/useSession";
|
|
9
|
-
import { resolveActiveUserId, resolveSavedFilterVariables } from "../../../helpers/resolveActiveUserId";
|
|
7
|
+
import { useEffect, useRef, useState } from "react";
|
|
10
8
|
import { SolidCreateButton } from "../common/SolidCreateButton";
|
|
11
9
|
import { SolidGlobalSearchElement } from "../common/SolidGlobalSearchElement";
|
|
12
10
|
import KanbanBoard from "./KanbanBoard";
|
|
@@ -52,31 +50,6 @@ type SolidKanbanViewParams = {
|
|
|
52
50
|
moduleName: string;
|
|
53
51
|
modelName: string;
|
|
54
52
|
embeded: boolean;
|
|
55
|
-
customFilter?: any;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
type SolidKanbanFilterInput = {
|
|
59
|
-
custom_filter_predicate?: any;
|
|
60
|
-
search_predicate?: any;
|
|
61
|
-
saved_filter_predicate?: any;
|
|
62
|
-
predefined_search_predicate?: any;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export type SolidKanbanViewHandle = {
|
|
66
|
-
refresh: () => void;
|
|
67
|
-
clearFilters: () => void;
|
|
68
|
-
applyFilter: (filter: SolidKanbanFilterInput) => void;
|
|
69
|
-
getSavedFilters: () => any[];
|
|
70
|
-
applySavedFilter: (name: string, variables?: Record<string, any>) => boolean;
|
|
71
|
-
setShowArchived: (value: boolean) => void;
|
|
72
|
-
getState: () => {
|
|
73
|
-
groupByFieldName: string;
|
|
74
|
-
showArchived: boolean;
|
|
75
|
-
filters: any;
|
|
76
|
-
filterPredicates: any;
|
|
77
|
-
kanbanData: any[];
|
|
78
|
-
loading: boolean;
|
|
79
|
-
};
|
|
80
53
|
};
|
|
81
54
|
|
|
82
55
|
type KanbanSwimlaneDefinition = {
|
|
@@ -146,14 +119,12 @@ const mergeKanbanGroupsWithDefinitions = (
|
|
|
146
119
|
};
|
|
147
120
|
|
|
148
121
|
|
|
149
|
-
export const SolidKanbanView =
|
|
150
|
-
const session = useSession();
|
|
151
|
-
const user = session?.data?.user;
|
|
122
|
+
export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
152
123
|
|
|
153
124
|
const visibleNavbar = useSelector((state: any) => state.navbarState?.visibleNavbar);
|
|
154
125
|
const dispatch = useDispatch()
|
|
155
126
|
|
|
156
|
-
const solidGlobalSearchElementRef = useRef
|
|
127
|
+
const solidGlobalSearchElementRef = useRef();
|
|
157
128
|
const router = useRouter();
|
|
158
129
|
const searchParams = useSearchParams();
|
|
159
130
|
// TODO: The initial filter state will be created based on the fields which are present on this kanban view.
|
|
@@ -571,11 +542,7 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
571
542
|
}
|
|
572
543
|
if (queryObject.saved_filter_predicate) {
|
|
573
544
|
// @ts-ignore
|
|
574
|
-
filters.$and.push(
|
|
575
|
-
queryObject.saved_filter_predicate,
|
|
576
|
-
user?.id,
|
|
577
|
-
queryObject.saved_filter_variables || {}
|
|
578
|
-
).value);
|
|
545
|
+
filters.$and.push(queryObject.saved_filter_predicate);
|
|
579
546
|
}
|
|
580
547
|
if (queryObject.predefined_search_predicate) {
|
|
581
548
|
// @ts-ignore
|
|
@@ -1009,8 +976,7 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1009
976
|
}
|
|
1010
977
|
if (filterPredicates.saved_filter_predicate) {
|
|
1011
978
|
// @ts-ignore
|
|
1012
|
-
queryfilter.$and.push(filterPredicates.
|
|
1013
|
-
resolveActiveUserId(filterPredicates.saved_filter_predicate, user?.id));
|
|
979
|
+
queryfilter.$and.push(filterPredicates.saved_filter_predicate);
|
|
1014
980
|
}
|
|
1015
981
|
if (filterPredicates.predefined_search_predicate) {
|
|
1016
982
|
// @ts-ignore
|
|
@@ -1065,8 +1031,6 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1065
1031
|
// @ts-ignore
|
|
1066
1032
|
urlData.saved_filter_predicate = customFilter.saved_filter_predicate || {};
|
|
1067
1033
|
// @ts-ignore
|
|
1068
|
-
urlData.saved_filter_variables = customFilter.saved_filter_variables || {};
|
|
1069
|
-
// @ts-ignore
|
|
1070
1034
|
urlData.predefined_search_predicate = customFilter.predefined_search_predicate || {};
|
|
1071
1035
|
// @ts-ignore
|
|
1072
1036
|
urlData.predefined_search_chip = customFilter.predefined_search_chip || null;
|
|
@@ -1124,39 +1088,6 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1124
1088
|
loadKanbanBoard(filters);
|
|
1125
1089
|
};
|
|
1126
1090
|
|
|
1127
|
-
const cloneKanbanData = () => {
|
|
1128
|
-
if (typeof structuredClone === "function") return structuredClone(kanbanViewData);
|
|
1129
|
-
return JSON.parse(JSON.stringify(kanbanViewData));
|
|
1130
|
-
};
|
|
1131
|
-
|
|
1132
|
-
useImperativeHandle(ref, () => ({
|
|
1133
|
-
refresh: () => {
|
|
1134
|
-
void loadKanbanBoard(filters);
|
|
1135
|
-
},
|
|
1136
|
-
clearFilters: () => {
|
|
1137
|
-
setFilters(params.customFilter || { $and: [] });
|
|
1138
|
-
setFilterPredicates(null);
|
|
1139
|
-
solidGlobalSearchElementRef.current?.clearFilter?.();
|
|
1140
|
-
},
|
|
1141
|
-
applyFilter: (filter) => {
|
|
1142
|
-
void handleApplyCustomFilter(filter);
|
|
1143
|
-
},
|
|
1144
|
-
getSavedFilters: () => solidGlobalSearchElementRef.current?.getSavedFilters?.() ?? [],
|
|
1145
|
-
applySavedFilter: (name, variables) =>
|
|
1146
|
-
solidGlobalSearchElementRef.current?.applySavedFilterByName?.(name, variables) ?? false,
|
|
1147
|
-
setShowArchived: (value) => {
|
|
1148
|
-
setShowArchived(value);
|
|
1149
|
-
},
|
|
1150
|
-
getState: () => ({
|
|
1151
|
-
groupByFieldName,
|
|
1152
|
-
showArchived,
|
|
1153
|
-
filters,
|
|
1154
|
-
filterPredicates,
|
|
1155
|
-
kanbanData: cloneKanbanData(),
|
|
1156
|
-
loading,
|
|
1157
|
-
}),
|
|
1158
|
-
}), [groupByFieldName, showArchived, filters, filterPredicates, kanbanViewData, loading]);
|
|
1159
|
-
|
|
1160
1091
|
const toggleBothSidebars = () => {
|
|
1161
1092
|
if (visibleNavbar) {
|
|
1162
1093
|
dispatch(toggleNavbar()); // close both
|
|
@@ -1182,11 +1113,7 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1182
1113
|
*/}
|
|
1183
1114
|
|
|
1184
1115
|
{/* <p className="m-0 view-title solid-text-wrapper">{kanbanViewTitle}</p> */}
|
|
1185
|
-
<div className="
|
|
1186
|
-
{/* Keep global search mounted for now because kanban bootstrap/filter hydration still flows through this element. */}
|
|
1187
|
-
<SolidGlobalSearchElement viewType="kanban" showSaveFilterPopup={showSaveFilterPopup} setShowSaveFilterPopup={setShowSaveFilterPopup} ref={solidGlobalSearchElementRef} viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} filterPredicates={filterPredicates} ></SolidGlobalSearchElement>
|
|
1188
|
-
</div>
|
|
1189
|
-
<div className={`${showGlobalSearchElement ? "lg:flex" : "hidden"} lg:hidden mt-3 lg:mt-0 w-full lg:min-w-0`}>
|
|
1116
|
+
<div className={`${showGlobalSearchElement ? "flex" : "hidden lg:flex"} mt-3 lg:mt-0 w-full lg:flex lg:min-w-0`}>
|
|
1190
1117
|
{/* Keep global search mounted for now because kanban bootstrap/filter hydration still flows through this element. */}
|
|
1191
1118
|
<SolidGlobalSearchElement viewType="kanban" showSaveFilterPopup={showSaveFilterPopup} setShowSaveFilterPopup={setShowSaveFilterPopup} ref={solidGlobalSearchElementRef} viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} filterPredicates={filterPredicates} ></SolidGlobalSearchElement>
|
|
1192
1119
|
</div>
|
|
@@ -1194,7 +1121,7 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1194
1121
|
|
|
1195
1122
|
<div className="flex items-center solid-header-buttons-wrapper solid-list-toolbar-actions lg:ml-auto">
|
|
1196
1123
|
<SolidHeaderRequestStatus label={headerRequestStatusLabel} />
|
|
1197
|
-
|
|
1124
|
+
<div className="flex lg:hidden">
|
|
1198
1125
|
<SolidButton
|
|
1199
1126
|
type="button"
|
|
1200
1127
|
variant="outline"
|
|
@@ -1265,7 +1192,7 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1265
1192
|
|
|
1266
1193
|
<style>{`.p-datatable .p-datatable-loading-overlay {background-color: rgba(0, 0, 0, 0.0);}`}</style>
|
|
1267
1194
|
{solidKanbanViewMetaData && kanbanViewData &&
|
|
1268
|
-
<KanbanBoard groupByFieldName={groupByFieldName} kanbanViewData={kanbanViewData} maxSwimLanesCount={maxSwimLanesCount} solidKanbanViewMetaData={solidKanbanViewMetaData?.data} setKanbanViewData={setKanbanViewData} handleLoadMore={handleLoadMore} onDragEnd={onDragEnd} handleSwimLanePagination={handleSwimLanePagination} onDelete={actionsAllowed.includes(`${permissionExpression(params.modelName, 'delete')}`) && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs.delete !== false ? openDeleteDialogForRecord : undefined} onRecover={handleRecoverRecord} setLightboxUrls={setLightboxUrls} setOpenLightbox={setOpenLightbox} editButtonUrl={editBaseUrl} recordClickAction={recordClickAction} showArchived={showArchived}
|
|
1195
|
+
<KanbanBoard groupByFieldName={groupByFieldName} kanbanViewData={kanbanViewData} maxSwimLanesCount={maxSwimLanesCount} solidKanbanViewMetaData={solidKanbanViewMetaData?.data} setKanbanViewData={setKanbanViewData} handleLoadMore={handleLoadMore} onDragEnd={onDragEnd} handleSwimLanePagination={handleSwimLanePagination} onDelete={actionsAllowed.includes(`${permissionExpression(params.modelName, 'delete')}`) && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs.delete !== false ? openDeleteDialogForRecord : undefined} onRecover={handleRecoverRecord} setLightboxUrls={setLightboxUrls} setOpenLightbox={setOpenLightbox} editButtonUrl={editBaseUrl} recordClickAction={recordClickAction} showArchived={showArchived}></KanbanBoard>
|
|
1269
1196
|
}
|
|
1270
1197
|
</div>
|
|
1271
1198
|
</div>
|
|
@@ -1315,4 +1242,4 @@ export const SolidKanbanView = forwardRef<SolidKanbanViewHandle, SolidKanbanView
|
|
|
1315
1242
|
</SolidDialog>
|
|
1316
1243
|
</div>
|
|
1317
1244
|
);
|
|
1318
|
-
}
|
|
1245
|
+
};
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
Keep existing predicate/rule state shape and `transformFilterRules(...)` contract unchanged.
|
|
58
58
|
- [ ] Replace remaining Prime icon class usage in filter flow with non-Prime icons.
|
|
59
59
|
- [ ] Audit `SolidFilterFields` and list filter input widgets for hidden Prime event-shape coupling.
|
|
60
|
-
- [ ] Preserve
|
|
60
|
+
- [ ] Preserve saved filter URL behavior (`savedQuery`) and local cache behavior.
|
|
61
61
|
- [ ] Confirm relation filter hydration still works.
|
|
62
62
|
- [ ] Preserve `clearFilter()` and imperative `SolidListViewHandle.applyFilter(...)` behavior unchanged.
|
|
63
63
|
|
|
@@ -38,17 +38,6 @@ export type SolidListViewHandle = {
|
|
|
38
38
|
saved_filter_predicate?: any;
|
|
39
39
|
predefined_search_predicate?: any;
|
|
40
40
|
}) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Returns the saved filters currently available in the list view, including
|
|
43
|
-
* any seeded/system filters supplied by the view.
|
|
44
|
-
*/
|
|
45
|
-
getSavedFilters: () => any[];
|
|
46
|
-
/**
|
|
47
|
-
* Applies the currently available saved filter with the given name using the
|
|
48
|
-
* same selection path as clicking that filter in the search UI.
|
|
49
|
-
* Returns false when no saved filter with that name is available.
|
|
50
|
-
*/
|
|
51
|
-
applySavedFilter: (name: string, variables?: Record<string, any>) => boolean;
|
|
52
41
|
/**
|
|
53
42
|
* Updates pagination state directly.
|
|
54
43
|
* Use this when a caller needs to jump to a specific page window
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidListView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/list/SolidListView.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SolidListView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/list/SolidListView.tsx"],"names":[],"mappings":";AAoEA,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6BAA6B,CAAC,EAAE,GAAG,CAAC;IACpC,8BAA8B,CAAC,EAAE,GAAG,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,iBAAiB,CAAC,EAAE,GAAG,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;OAKG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,EAAE,CAAC,MAAM,EAAE;QACpB,uBAAuB,CAAC,EAAE,GAAG,CAAC;QAC9B,gBAAgB,CAAC,EAAE,GAAG,CAAC;QACvB,sBAAsB,CAAC,EAAE,GAAG,CAAC;QAC7B,2BAA2B,CAAC,EAAE,GAAG,CAAC;KACnC,KAAK,IAAI,CAAC;IACX;;;;OAIG;IACH,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D;;;OAGG;IACH,OAAO,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpE;;;OAGG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,QAAQ,EAAE,MAAM;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;QACtB,OAAO,EAAE,GAAG,CAAC;QACb,gBAAgB,EAAE,GAAG,CAAC;QACtB,QAAQ,EAAE,GAAG,EAAE,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,aAAa,qHAozDxB,CAAC"}
|
|
@@ -54,7 +54,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
54
54
|
}
|
|
55
55
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
56
|
};
|
|
57
|
-
import { jsx as _jsx,
|
|
57
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
58
58
|
import { forwardRef, useState, useEffect, useRef, useMemo, useImperativeHandle } from "react";
|
|
59
59
|
import { SolidDataTable as DataTable, Column } from "./SolidDataTable";
|
|
60
60
|
import qs from "qs";
|
|
@@ -87,7 +87,6 @@ import styles from "./SolidListViewWrapper.module.css";
|
|
|
87
87
|
import { isArchivedListRow } from "./columns/PublishStatusColumnDefaults";
|
|
88
88
|
import { getExtensionFunction } from "../../../helpers/registry";
|
|
89
89
|
import { useSession } from "../../../hooks/useSession";
|
|
90
|
-
import { resolveActiveUserId } from "../../../helpers/resolveActiveUserId";
|
|
91
90
|
import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
92
91
|
import { getSettingsMap, resolveRecordClickAction } from "../../../helpers/settingsPayload";
|
|
93
92
|
import { useGetSolidSettingsQuery } from "../../../redux/api/solidSettingsApi";
|
|
@@ -736,7 +735,6 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
736
735
|
fileterTobeStored.custom_filter_predicate = latestFilterPredicatesRef.current.custom_filter_predicate || null;
|
|
737
736
|
fileterTobeStored.search_predicate = latestFilterPredicatesRef.current.search_predicate || null;
|
|
738
737
|
fileterTobeStored.saved_filter_predicate = latestFilterPredicatesRef.current.saved_filter_predicate || null;
|
|
739
|
-
fileterTobeStored.saved_filter_variables = latestFilterPredicatesRef.current.saved_filter_variables || {};
|
|
740
738
|
fileterTobeStored.saved_filter_id = latestFilterPredicatesRef.current.saved_filter_id || null;
|
|
741
739
|
fileterTobeStored.saved_filter_system_key = latestFilterPredicatesRef.current.saved_filter_system_key || null;
|
|
742
740
|
fileterTobeStored.saved_filter_name = latestFilterPredicatesRef.current.saved_filter_name || null;
|
|
@@ -761,8 +759,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
761
759
|
queryfilter.$and.push(filterPredicates.search_predicate);
|
|
762
760
|
}
|
|
763
761
|
if (filterPredicates.saved_filter_predicate) {
|
|
764
|
-
queryfilter.$and.push(filterPredicates.
|
|
765
|
-
resolveActiveUserId(filterPredicates.saved_filter_predicate, user === null || user === void 0 ? void 0 : user.id));
|
|
762
|
+
queryfilter.$and.push(filterPredicates.saved_filter_predicate);
|
|
766
763
|
}
|
|
767
764
|
if (filterPredicates.predefined_search_predicate) {
|
|
768
765
|
queryfilter.$and.push(filterPredicates.predefined_search_predicate);
|
|
@@ -891,8 +888,6 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
891
888
|
applyFilter: function (filter) {
|
|
892
889
|
handleApplyCustomFilter(filter);
|
|
893
890
|
},
|
|
894
|
-
getSavedFilters: function () { var _a, _b, _c; return (_c = (_b = (_a = solidGlobalSearchElementRef.current) === null || _a === void 0 ? void 0 : _a.getSavedFilters) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : []; },
|
|
895
|
-
applySavedFilter: function (name, variables) { var _a, _b, _c; return (_c = (_b = (_a = solidGlobalSearchElementRef.current) === null || _a === void 0 ? void 0 : _a.applySavedFilterByName) === null || _b === void 0 ? void 0 : _b.call(_a, name, variables)) !== null && _c !== void 0 ? _c : false; },
|
|
896
891
|
setPagination: function (nextFirst, nextRows) {
|
|
897
892
|
setFirst(nextFirst);
|
|
898
893
|
setRows(nextRows);
|
|
@@ -1245,7 +1240,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
1245
1240
|
// }
|
|
1246
1241
|
// };
|
|
1247
1242
|
return (_jsxs("div", { className: "page-parent-wrapper ".concat(isEmbeddedList ? "solid-list-page-wrapper-embedded" : "solid-list-page-wrapper", " flex ").concat(isEmbeddedList ? "min-h-0 overflow-visible" : "h-full min-h-0 overflow-hidden"), children: [_jsx("div", { className: "solid-list-content flex flex-col ".concat(isEmbeddedList ? "min-h-0" : "flex-grow-1", " ").concat(styles.ListContentWrapper), children: _jsxs("div", { className: "solid-list-surface flex flex-col min-h-0 ".concat(isEmbeddedList ? "" : "flex-1"), children: [solidListViewInitialMetaData &&
|
|
1248
|
-
_jsx("div", { className: "page-header solid-list-toolbar flex-col lg:flex-row", children: _jsxs("div", { className: "flex w-full flex-col-reverse lg:flex-row lg:items-center items-end", children: [_jsx("div", { className: "solid-list-toolbar-left flex w-full items-center gap-3 lg:min-w-0 lg:flex-1", children: params.embeded === false && (
|
|
1243
|
+
_jsx("div", { className: "page-header solid-list-toolbar flex-col lg:flex-row", children: _jsxs("div", { className: "flex w-full flex-col-reverse lg:flex-row lg:items-center items-end", children: [_jsx("div", { className: "solid-list-toolbar-left flex w-full items-center gap-3 lg:min-w-0 lg:flex-1", children: params.embeded === false && (_jsx("div", { className: "".concat(showGlobalSearchElement ? "flex" : "hidden lg:flex", " mt-3 lg:mt-0 w-full lg:flex lg:min-w-0"), children: _jsx(SolidGlobalSearchElement, { viewType: "list", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidListViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter, filterPredicates: filterPredicates, definedFilters: definedFilters, onRemoveDefinedFilter: removeDefinedFilter, onApplyDefinedFilter: applyDefinedFilter }, params.modelName) })) }), _jsxs("div", { className: "flex items-center solid-header-buttons-wrapper solid-list-toolbar-actions lg:ml-auto", children: [_jsx(SolidHeaderRequestStatus, { label: headerRequestStatusLabel }), params.embeded === false && (_jsx("div", { className: "flex lg:hidden", children: _jsx(SolidButton, { type: "button", size: "small", variant: "outline", className: "solid-icon-button", onClick: function () { return setShowGlobalSearchElement(!showGlobalSearchElement); }, leftIcon: _jsx(Search, { size: 14 }) }) })), _jsx("div", { className: "solid-header-buttons-wrapper hidden items-center lg:flex", children: (_0 = visibleHeaderButtons === null || visibleHeaderButtons === void 0 ? void 0 : visibleHeaderButtons.filter(function (rb) { return rb.attrs.actionInContextMenu != true; })) === null || _0 === void 0 ? void 0 : _0.map(function (button, index) { return (_jsx(SolidListViewHeaderButton, { button: button, params: params, solidListViewMetaData: solidListViewMetaData, handleCustomButtonClick: handleCustomButtonClick, selectedRecords: selectedRecords, filters: filters }, index)); }) }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'create'))) &&
|
|
1249
1244
|
((_1 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _1 === void 0 ? void 0 : _1.create) !== false &&
|
|
1250
1245
|
params.embeded !== true &&
|
|
1251
1246
|
((_4 = (_3 = (_2 = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _2 === void 0 ? void 0 : _2.solidView) === null || _3 === void 0 ? void 0 : _3.layout) === null || _4 === void 0 ? void 0 : _4.attrs.showDefaultAddButton) !== false && (_jsx(SolidCreateButton, { createButtonUrl: createButtonUrl, createActionQueryParams: createActionQueryParams, solidListViewLayout: solidListViewLayout, responsiveIconOnly: true })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'create'))) &&
|