@solidxai/core-ui 0.1.14-beta.9 → 0.1.15-beta.0
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/common/DropzonePlaceholder.d.ts +2 -1
- package/dist/components/common/DropzonePlaceholder.d.ts.map +1 -1
- package/dist/components/common/DropzonePlaceholder.js +10 -7
- package/dist/components/common/DropzonePlaceholder.js.map +1 -1
- package/dist/components/common/DropzonePlaceholder.tsx +14 -9
- package/dist/components/core/card/CardItem.js +1 -1
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +1 -1
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +2 -2
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +7 -12
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +101 -86
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +161 -98
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +96 -72
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +39 -17
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +3 -2
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +3 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +3 -2
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +3 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +20 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +29 -2
- package/dist/components/core/form/fields/solidFields.module.css +7 -0
- package/dist/components/core/kanban/KanbanCard.js +1 -1
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +7 -1
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +10 -5
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +44 -88
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +19 -93
- package/dist/components/core/list/SolidListViewColumn.d.ts +2 -1
- package/dist/components/core/list/SolidListViewColumn.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.js +2 -2
- package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.tsx +4 -3
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.js +2 -2
- package/dist/components/core/list/columns/SolidRelationColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.tsx +2 -2
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts +2 -2
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +5 -4
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +5 -4
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js +147 -97
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.tsx +123 -31
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +1 -1
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +4 -12
- package/dist/components/layout/AdminHeaderActions.js +1 -1
- package/dist/components/layout/AdminHeaderActions.js.map +1 -1
- package/dist/components/layout/AdminHeaderActions.tsx +1 -1
- package/dist/helpers/getAcceptedFileTypes.d.ts +12 -2
- package/dist/helpers/getAcceptedFileTypes.d.ts.map +1 -1
- package/dist/helpers/getAcceptedFileTypes.js +72 -16
- package/dist/helpers/getAcceptedFileTypes.js.map +1 -1
- package/dist/helpers/getAcceptedFileTypes.tsx +101 -18
- package/dist/helpers/registry.js +2 -1
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.ts +1 -2
- package/dist/resources/globals.css +259 -109
- package/dist/resources/solid-responsive.css +1 -5
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/resources/themes/solid-light-modern/theme.css +3 -4
- package/dist/types/index.d.ts +2 -4
- package/dist/types/solid-core.d.ts +4 -13
- package/package.json +1 -1
|
@@ -148,11 +148,6 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
148
148
|
var _48 = useState(false), showSaveFilterPopup = _48[0], setShowSaveFilterPopup = _48[1];
|
|
149
149
|
var _49 = useState(false), showGlobalSearchElement = _49[0], setShowGlobalSearchElement = _49[1];
|
|
150
150
|
var suppressNextFilterPaginationResetRef = useRef(false);
|
|
151
|
-
// Filters offered by an onBeforeListDataLoad handler (event.definedFilters).
|
|
152
|
-
// Each stays independently removable via the search bar's pill UI rather
|
|
153
|
-
// than being baked directly into the outgoing query filter.
|
|
154
|
-
var _50 = useState([]), definedFilters = _50[0], setDefinedFilters = _50[1];
|
|
155
|
-
var definedFilterOverridesRef = useRef({});
|
|
156
151
|
var triggerCheckIfPermissionExists = useLazyCheckIfPermissionExistsQuery()[0];
|
|
157
152
|
var handleCustomButtonClick = useHandleListCustomButtonClick();
|
|
158
153
|
var visibleHeaderButtons = useMemo(function () {
|
|
@@ -160,7 +155,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
160
155
|
return ((_b = (_a = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _a === void 0 ? void 0 : _a.headerButtons) !== null && _b !== void 0 ? _b : []).filter(function (button) { return isButtonVisibleInCurrentEnv(button === null || button === void 0 ? void 0 : button.attrs); });
|
|
161
156
|
}, [(_g = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _g === void 0 ? void 0 : _g.headerButtons]);
|
|
162
157
|
var editBaseUrl = useMemo(function () { return normalizeSolidListTreeKanbanActionPath(pathname, editButtonUrl || "form"); }, [editButtonUrl, pathname]);
|
|
163
|
-
var
|
|
158
|
+
var recordClickFormMode = useMemo(function () {
|
|
164
159
|
var _a, _b, _c;
|
|
165
160
|
var isSystemModule = ((_c = (_b = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.module) === null || _c === void 0 ? void 0 : _c.isSystem) === true;
|
|
166
161
|
if (isSystemModule) {
|
|
@@ -270,7 +265,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
270
265
|
}, {
|
|
271
266
|
encodeValuesOnly: true,
|
|
272
267
|
});
|
|
273
|
-
var
|
|
268
|
+
var _50 = useGetSolidViewLayoutQuery(listViewMetaDataQs), solidListViewInitialMetaData = _50.data, solidListViewMetaDataError = _50.error, solidListViewMetaDataIsLoading = _50.isLoading, solidListViewMetaDataIsError = _50.isError, refetch = _50.refetch;
|
|
274
269
|
var initialFilterMethod = function () {
|
|
275
270
|
var _a, _b, _c, _d;
|
|
276
271
|
var solidView = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView;
|
|
@@ -393,15 +388,15 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
393
388
|
// { label: 'List ', value: 'list', image: ListImage },
|
|
394
389
|
// { label: 'Kanban', value: 'kanban', image: KanbanImage },
|
|
395
390
|
// ]
|
|
396
|
-
var
|
|
397
|
-
var
|
|
391
|
+
var _51 = useState(sizeOptions[1].value), size = _51[0], setSize = _51[1];
|
|
392
|
+
var _52 = useState([]), viewModes = _52[0], setViewModes = _52[1];
|
|
398
393
|
// Custom Row Action
|
|
399
|
-
var
|
|
400
|
-
var
|
|
394
|
+
var _53 = useState(false), listViewRowActionPopupState = _53[0], setListViewRowActionPopupState = _53[1];
|
|
395
|
+
var _54 = useState(), listViewRowActionData = _54[0], setListRowActionData = _54[1];
|
|
401
396
|
// Get the list view data.
|
|
402
|
-
var
|
|
403
|
-
var
|
|
404
|
-
var
|
|
397
|
+
var _55 = useLazyGetSolidEntitiesQuery(), triggerGetSolidEntities = _55[0], _56 = _55[1], solidEntityListViewData = _56.data, isLoading = _56.isLoading, isListViewFetching = _56.isFetching, error = _56.error;
|
|
398
|
+
var _57 = useLazyRecoverSolidEntityByIdQuery(), triggerRecoverSolidEntitiesById = _57[0], _58 = _57[1], recoverByIdData = _58.data, recoverByIdIsLoading = _58.isLoading, recoverByIdError = _58.error, recoverByIdIsError = _58.isError, recoverByIdIsSuccess = _58.isSuccess;
|
|
399
|
+
var _59 = useRecoverSolidEntityMutation(), triggerRecoverSolidEntities = _59[0], _60 = _59[1], recoverByData = _60.data, recoverByIsLoading = _60.isLoading, recoverError = _60.error, recoverIsError = _60.isError, recoverByIsSuccess = _60.isSuccess;
|
|
405
400
|
// After data is fetched populate the list view state so as to be able to render the data.
|
|
406
401
|
useEffect(function () {
|
|
407
402
|
if (solidEntityListViewData) {
|
|
@@ -433,9 +428,9 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
433
428
|
setLoading(false);
|
|
434
429
|
}
|
|
435
430
|
}, [solidEntityListViewData]);
|
|
436
|
-
var
|
|
431
|
+
var _61 = useDeleteSolidEntityMutation(), deleteSolidSingleEntiry = _61[0], isDeleteSolidSingleEntitySuccess = _61[1].isSuccess;
|
|
437
432
|
// Delete mutation
|
|
438
|
-
var
|
|
433
|
+
var _62 = useDeleteMultipleSolidEntitiesMutation(), deleteManySolidEntities = _62[0], _63 = _62[1], isSolidEntitiesDeleted = _63.isLoading, isDeleteSolidEntitiesSucess = _63.isSuccess, isSolidEntitiesDeleteError = _63.isError, SolidEntitiesDeleteError = _63.error, DeletedSolidEntities = _63.data;
|
|
439
434
|
// Fetch data after toPopulate has been populated...
|
|
440
435
|
useEffect(function () {
|
|
441
436
|
var _a;
|
|
@@ -520,6 +515,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
520
515
|
listData: listViewData,
|
|
521
516
|
totalRecords: totalRecords,
|
|
522
517
|
type: "onListLoad",
|
|
518
|
+
isInitialLoad: !hasFiredInitialOnListLoadRef.current,
|
|
523
519
|
viewMetadata: (_g = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _g === void 0 ? void 0 : _g.solidView,
|
|
524
520
|
listViewLayout: listLayout,
|
|
525
521
|
queryParams: {
|
|
@@ -532,6 +528,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
532
528
|
session: session.data,
|
|
533
529
|
params: params
|
|
534
530
|
};
|
|
531
|
+
hasFiredInitialOnListLoadRef.current = true;
|
|
535
532
|
if (!dynamicHeader) return [3 /*break*/, 3];
|
|
536
533
|
dynamicExtensionFunction = getExtensionFunction(dynamicHeader);
|
|
537
534
|
if (!dynamicExtensionFunction) return [3 /*break*/, 2];
|
|
@@ -565,6 +562,8 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
565
562
|
var latestFilterPredicatesRef = useRef(filterPredicates);
|
|
566
563
|
var latestSortFieldRef = useRef(sortField);
|
|
567
564
|
var latestSortOrderRef = useRef(sortOrder);
|
|
565
|
+
var hasFiredInitialOnBeforeListDataLoadRef = useRef(false);
|
|
566
|
+
var hasFiredInitialOnListLoadRef = useRef(false);
|
|
568
567
|
useEffect(function () {
|
|
569
568
|
latestSortFieldRef.current = sortField;
|
|
570
569
|
}, [sortField]);
|
|
@@ -623,18 +622,17 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
623
622
|
setSelectedRecoverRecords(deletedRecords);
|
|
624
623
|
};
|
|
625
624
|
var setQueryString = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
626
|
-
var solidFieldsMetadata, explicitLocale, queryData, resolvedLocale, currentSortField, currentSortOrder, meta, resolvedField, dynamicHeader, dynamicExtensionFunction, event, updatedListData,
|
|
627
|
-
var _a;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
switch (_m.label) {
|
|
625
|
+
var solidFieldsMetadata, explicitLocale, queryData, resolvedLocale, currentSortField, currentSortOrder, meta, resolvedField, dynamicHeader, dynamicExtensionFunction, isInitialLoad, event, updatedListData, err_1, queryString, fileterTobeStored;
|
|
626
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
627
|
+
return __generator(this, function (_k) {
|
|
628
|
+
switch (_k.label) {
|
|
631
629
|
case 0:
|
|
632
|
-
solidFieldsMetadata = (
|
|
630
|
+
solidFieldsMetadata = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidFieldsMetadata;
|
|
633
631
|
explicitLocale = resolveLocaleFromFilter(latestFiltersRef.current);
|
|
634
632
|
queryData = {
|
|
635
633
|
offset: first,
|
|
636
634
|
limit: rows,
|
|
637
|
-
filters: (
|
|
635
|
+
filters: (_b = latestFiltersRef.current) !== null && _b !== void 0 ? _b : latestFiltersRef.current,
|
|
638
636
|
populate: toPopulate,
|
|
639
637
|
populateMedia: toPopulateMedia,
|
|
640
638
|
};
|
|
@@ -652,7 +650,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
652
650
|
else {
|
|
653
651
|
resolvedField = currentSortField;
|
|
654
652
|
if ((meta === null || meta === void 0 ? void 0 : meta.type) === "relation" && (meta === null || meta === void 0 ? void 0 : meta.relationType) === "many-to-one") {
|
|
655
|
-
resolvedField = "".concat(currentSortField, ".").concat((
|
|
653
|
+
resolvedField = "".concat(currentSortField, ".").concat((_d = (_c = meta === null || meta === void 0 ? void 0 : meta.relationModel) === null || _c === void 0 ? void 0 : _c.userKeyField) === null || _d === void 0 ? void 0 : _d.name);
|
|
656
654
|
}
|
|
657
655
|
queryData.sort = ["".concat(resolvedField, ":").concat(currentSortOrder === 1 ? "asc" : "desc")];
|
|
658
656
|
}
|
|
@@ -663,12 +661,15 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
663
661
|
if (showArchived) {
|
|
664
662
|
queryData.showSoftDeleted = "inclusive";
|
|
665
663
|
}
|
|
666
|
-
dynamicHeader = (
|
|
664
|
+
dynamicHeader = (_g = (_f = (_e = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _e === void 0 ? void 0 : _e.solidView) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.onBeforeListDataLoad;
|
|
667
665
|
dynamicExtensionFunction = null;
|
|
666
|
+
isInitialLoad = !hasFiredInitialOnBeforeListDataLoadRef.current;
|
|
667
|
+
hasFiredInitialOnBeforeListDataLoadRef.current = true;
|
|
668
668
|
event = {
|
|
669
669
|
type: "onBeforeListDataLoad",
|
|
670
|
-
|
|
671
|
-
|
|
670
|
+
isInitialLoad: isInitialLoad,
|
|
671
|
+
fieldsMetadata: (_h = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _h === void 0 ? void 0 : _h.solidFieldsMetadata,
|
|
672
|
+
viewMetadata: (_j = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _j === void 0 ? void 0 : _j.solidView,
|
|
672
673
|
listViewLayout: solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data.solidView.layout,
|
|
673
674
|
filter: structuredClone(queryData),
|
|
674
675
|
queryParams: {
|
|
@@ -681,53 +682,24 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
681
682
|
session: session.data,
|
|
682
683
|
params: params
|
|
683
684
|
};
|
|
684
|
-
if (!dynamicHeader) return [3 /*break*/,
|
|
685
|
+
if (!dynamicHeader) return [3 /*break*/, 4];
|
|
685
686
|
dynamicExtensionFunction = getExtensionFunction(dynamicHeader);
|
|
686
687
|
if (!dynamicExtensionFunction) return [3 /*break*/, 4];
|
|
687
|
-
|
|
688
|
+
_k.label = 1;
|
|
688
689
|
case 1:
|
|
689
|
-
|
|
690
|
+
_k.trys.push([1, 3, , 4]);
|
|
690
691
|
return [4 /*yield*/, dynamicExtensionFunction(event)];
|
|
691
692
|
case 2:
|
|
692
|
-
updatedListData =
|
|
693
|
+
updatedListData = _k.sent();
|
|
693
694
|
if (updatedListData && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.filterApplied) && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.newFilter)) {
|
|
694
695
|
queryData = updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.newFilter;
|
|
695
696
|
}
|
|
696
|
-
nextDefinedFilters = (_l = updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.definedFilters) !== null && _l !== void 0 ? _l : [];
|
|
697
|
-
reconciledDefinedFilters_1 = nextDefinedFilters.map(function (def) {
|
|
698
|
-
var hasOverride = Object.prototype.hasOwnProperty.call(definedFilterOverridesRef.current, def.key);
|
|
699
|
-
var applied = hasOverride ? definedFilterOverridesRef.current[def.key] : def.applied;
|
|
700
|
-
definedFilterOverridesRef.current[def.key] = applied;
|
|
701
|
-
return __assign(__assign({}, def), { applied: applied });
|
|
702
|
-
});
|
|
703
|
-
Object.keys(definedFilterOverridesRef.current).forEach(function (key) {
|
|
704
|
-
if (!reconciledDefinedFilters_1.some(function (def) { return def.key === key; })) {
|
|
705
|
-
delete definedFilterOverridesRef.current[key];
|
|
706
|
-
}
|
|
707
|
-
});
|
|
708
|
-
setDefinedFilters(reconciledDefinedFilters_1);
|
|
709
|
-
activeDefinedFilterPredicates = reconciledDefinedFilters_1
|
|
710
|
-
.filter(function (def) { return def.applied; })
|
|
711
|
-
.map(function (def) { return def.predicate; });
|
|
712
|
-
if (activeDefinedFilterPredicates.length > 0) {
|
|
713
|
-
mergedFilters = queryData.filters ? structuredClone(queryData.filters) : {};
|
|
714
|
-
mergedFilters.$and = Array.isArray(mergedFilters.$and) ? mergedFilters.$and : [];
|
|
715
|
-
(_a = mergedFilters.$and).push.apply(_a, activeDefinedFilterPredicates);
|
|
716
|
-
queryData.filters = mergedFilters;
|
|
717
|
-
}
|
|
718
697
|
return [3 /*break*/, 4];
|
|
719
698
|
case 3:
|
|
720
|
-
err_1 =
|
|
699
|
+
err_1 = _k.sent();
|
|
721
700
|
console.error("Error executing onBeforeListDataLoad extension:", err_1);
|
|
722
701
|
return [3 /*break*/, 4];
|
|
723
|
-
case 4:
|
|
724
|
-
case 5:
|
|
725
|
-
if (Object.keys(definedFilterOverridesRef.current).length > 0) {
|
|
726
|
-
definedFilterOverridesRef.current = {};
|
|
727
|
-
setDefinedFilters([]);
|
|
728
|
-
}
|
|
729
|
-
_m.label = 6;
|
|
730
|
-
case 6:
|
|
702
|
+
case 4:
|
|
731
703
|
queryString = qs.stringify(queryData, { encodeValuesOnly: true });
|
|
732
704
|
if (latestFilterPredicatesRef.current) {
|
|
733
705
|
fileterTobeStored = structuredClone(queryData);
|
|
@@ -840,24 +812,6 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
840
812
|
}
|
|
841
813
|
// Force synchronous state updates
|
|
842
814
|
};
|
|
843
|
-
// Removes a single handler-offered filter pill. The override persists for
|
|
844
|
-
// the rest of this mount (setQueryString reconciliation keeps it applied:false
|
|
845
|
-
// on subsequent fetches) but is not persisted beyond it.
|
|
846
|
-
var removeDefinedFilter = function (key) {
|
|
847
|
-
definedFilterOverridesRef.current[key] = false;
|
|
848
|
-
setDefinedFilters(function (prev) { return prev.map(function (def) { return (def.key === key ? __assign(__assign({}, def), { applied: false }) : def); }); });
|
|
849
|
-
setFirst(0);
|
|
850
|
-
void setQueryString();
|
|
851
|
-
};
|
|
852
|
-
// Applies a handler-offered filter the user picked from the "defined
|
|
853
|
-
// filters" list (one the handler returned with applied:false by default).
|
|
854
|
-
// Mirrors removeDefinedFilter in the other direction.
|
|
855
|
-
var applyDefinedFilter = function (key) {
|
|
856
|
-
definedFilterOverridesRef.current[key] = true;
|
|
857
|
-
setDefinedFilters(function (prev) { return prev.map(function (def) { return (def.key === key ? __assign(__assign({}, def), { applied: true }) : def); }); });
|
|
858
|
-
setFirst(0);
|
|
859
|
-
void setQueryString();
|
|
860
|
-
};
|
|
861
815
|
// clear Filter
|
|
862
816
|
var clearFilter = function () {
|
|
863
817
|
if (solidListViewMetaData) {
|
|
@@ -929,8 +883,8 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
929
883
|
loading,
|
|
930
884
|
listViewData,
|
|
931
885
|
]);
|
|
932
|
-
var
|
|
933
|
-
var
|
|
886
|
+
var _64 = useState(), selectedSolidViewData = _64[0], setSelectedSolidViewData = _64[1];
|
|
887
|
+
var _65 = useState(false), deleteEntity = _65[0], setDeleteEntity = _65[1];
|
|
934
888
|
// Recover functions
|
|
935
889
|
var recoverById = function (id) {
|
|
936
890
|
triggerRecoverSolidEntitiesById(id);
|
|
@@ -1004,8 +958,8 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
1004
958
|
setSelectedRecoverRecords([]);
|
|
1005
959
|
};
|
|
1006
960
|
var entityDisplayName = ((_k = (_j = (_h = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _h === void 0 ? void 0 : _h.solidView) === null || _j === void 0 ? void 0 : _j.model) === null || _k === void 0 ? void 0 : _k.displayName) || (params === null || params === void 0 ? void 0 : params.modelName);
|
|
1007
|
-
var
|
|
1008
|
-
var
|
|
961
|
+
var _66 = useState(false), openLightbox = _66[0], setOpenLightbox = _66[1];
|
|
962
|
+
var _67 = useState([]), lightboxUrls = _67[0], setLightboxUrls = _67[1];
|
|
1009
963
|
// Render columns dynamically based on metadata
|
|
1010
964
|
var renderColumnsDynamically = function (solidListViewMetaData, solidListViewLayout) {
|
|
1011
965
|
var _a;
|
|
@@ -1043,7 +997,8 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
1043
997
|
column: column,
|
|
1044
998
|
setLightboxUrls: setLightboxUrls,
|
|
1045
999
|
setOpenLightbox: setOpenLightbox,
|
|
1046
|
-
embeded: params.embeded
|
|
1000
|
+
embeded: params.embeded,
|
|
1001
|
+
recordClickAction: recordClickFormMode
|
|
1047
1002
|
});
|
|
1048
1003
|
}
|
|
1049
1004
|
else {
|
|
@@ -1057,7 +1012,8 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
1057
1012
|
column: column,
|
|
1058
1013
|
setLightboxUrls: setLightboxUrls,
|
|
1059
1014
|
setOpenLightbox: setOpenLightbox,
|
|
1060
|
-
embeded: params.embeded
|
|
1015
|
+
embeded: params.embeded,
|
|
1016
|
+
recordClickAction: recordClickFormMode
|
|
1061
1017
|
});
|
|
1062
1018
|
}
|
|
1063
1019
|
});
|
|
@@ -1245,7 +1201,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
1245
1201
|
// }
|
|
1246
1202
|
// };
|
|
1247
1203
|
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 && (
|
|
1204
|
+
_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(_Fragment, { children: _jsx("div", { className: "".concat(showGlobalSearchElement ? "flex" : "max-lg:hidden lg:flex", " w-full mt-3 lg:mt-0 lg:min-w-0"), children: _jsx(SolidGlobalSearchElement, { viewType: "list", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidListViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter, filterPredicates: filterPredicates }, 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: "solid-list-search-toggle", 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
1205
|
((_1 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _1 === void 0 ? void 0 : _1.create) !== false &&
|
|
1250
1206
|
params.embeded !== true &&
|
|
1251
1207
|
((_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'))) &&
|
|
@@ -1281,7 +1237,7 @@ export var SolidListView = forwardRef(function (params, ref) {
|
|
|
1281
1237
|
}
|
|
1282
1238
|
else {
|
|
1283
1239
|
storeCurrentModelViewContext();
|
|
1284
|
-
router.push("".concat(editBaseUrl, "/").concat(rowData === null || rowData === void 0 ? void 0 : rowData.id, "?viewMode=").concat(
|
|
1240
|
+
router.push("".concat(editBaseUrl, "/").concat(rowData === null || rowData === void 0 ? void 0 : rowData.id, "?viewMode=").concat(recordClickFormMode, "&").concat(buildEditNavigationQueryString(rowData)));
|
|
1285
1241
|
}
|
|
1286
1242
|
}, children: [params.embeded === true ? null : (_jsx(Column, { selectionMode: "multiple", headerStyle: { width: "3em" } })), solidListViewMetaData && solidListViewLayout && renderColumnsDynamically(solidListViewMetaData, solidListViewLayout), ((_18 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _18 === void 0 ? void 0 : _18.rowButtons) &&
|
|
1287
1243
|
((_19 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _19 === void 0 ? void 0 : _19.rowButtons.filter(function (rb) {
|