@solidxai/core-ui 0.1.12-beta.6 → 0.1.12-beta.7
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/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 +4 -0
- package/dist/components/core/card/CardItem.d.ts +2 -0
- package/dist/components/core/card/CardItem.d.ts.map +1 -1
- package/dist/components/core/card/CardItem.js +7 -2
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +30 -8
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +87 -21
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +96 -40
- 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 +9 -7
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +14 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +1 -1
- 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 +3 -1
- package/dist/components/core/kanban/KanbanCard.d.ts +2 -0
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +10 -5
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +28 -12
- package/dist/components/core/kanban/KanbanColumn.d.ts +3 -1
- 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 +4 -2
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +154 -25
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +129 -16
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +13 -10
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +18 -3
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +6 -1
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +6 -1
- package/dist/components/core/tree/SolidTreeTable.d.ts +2 -1
- package/dist/components/core/tree/SolidTreeTable.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.js +2 -2
- package/dist/components/core/tree/SolidTreeTable.js.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.tsx +3 -1
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +38 -15
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +48 -23
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +45 -32
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUser.tsx +15 -4
- package/dist/redux/store/defaultStoreConfig.d.ts +5 -5
- package/dist/resources/solid-custom.css +55 -0
- package/dist/resources/solid-responsive.css +4 -4
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/package.json +1 -1
|
@@ -213,7 +213,7 @@ export var SolidKanbanView = function (params) {
|
|
|
213
213
|
}, [params.modelName]);
|
|
214
214
|
// Create the RTK slices for this entity
|
|
215
215
|
var entityApi = createSolidEntityApi(params.modelName);
|
|
216
|
-
var useDeleteMultipleSolidEntitiesMutation = entityApi.useDeleteMultipleSolidEntitiesMutation, useLazyGetSolidEntitiesQuery = entityApi.useLazyGetSolidEntitiesQuery, usePatchUpdateSolidEntityMutation = entityApi.usePatchUpdateSolidEntityMutation;
|
|
216
|
+
var useDeleteMultipleSolidEntitiesMutation = entityApi.useDeleteMultipleSolidEntitiesMutation, useLazyGetSolidEntitiesQuery = entityApi.useLazyGetSolidEntitiesQuery, useLazyRecoverSolidEntityByIdQuery = entityApi.useLazyRecoverSolidEntityByIdQuery, usePatchUpdateSolidEntityMutation = entityApi.usePatchUpdateSolidEntityMutation;
|
|
217
217
|
var menuItemId = searchParams.get("menuItemId");
|
|
218
218
|
var menuItemName = searchParams.get("menuItemName");
|
|
219
219
|
var actionId = searchParams.get("actionId");
|
|
@@ -347,19 +347,20 @@ export var SolidKanbanView = function (params) {
|
|
|
347
347
|
var editBaseUrl = normalizeSolidListTreeKanbanActionPath(pathname, editButtonUrl || "form");
|
|
348
348
|
// Get the kanban view data.
|
|
349
349
|
// const [triggerGetSolidEntitiesForKanban, { data: solidEntityKanbanViewData, isLoading, error }] = useLazyGetSolidKanbanEntitiesQuery();
|
|
350
|
-
var
|
|
350
|
+
var triggerGetSolidEntities = useLazyGetSolidEntitiesQuery()[0];
|
|
351
|
+
var _22 = useLazyRecoverSolidEntityByIdQuery(), triggerRecoverSolidEntityById = _22[0], isRecoveringRecord = _22[1].isLoading;
|
|
351
352
|
// Delete mutation
|
|
352
353
|
var _23 = useDeleteMultipleSolidEntitiesMutation(), deleteManySolidEntities = _23[0], _24 = _23[1], isDeleteSolidEntitiesLoading = _24.isLoading, isDeleteSolidEntitiesSucess = _24.isSuccess;
|
|
353
354
|
var _25 = usePatchUpdateSolidEntityMutation(), patchKanbanView = _25[0], isPatchKanbanViewLoading = _25[1].isLoading;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
setLoading(false);
|
|
355
|
+
var applyArchivedQueryState = function (queryData) {
|
|
356
|
+
if (showArchived) {
|
|
357
|
+
queryData.showSoftDeleted = "inclusive";
|
|
358
|
+
if (queryData.groupFilter) {
|
|
359
|
+
queryData.groupFilter.showSoftDeleted = "inclusive";
|
|
360
|
+
}
|
|
361
361
|
}
|
|
362
|
-
|
|
362
|
+
return queryData;
|
|
363
|
+
};
|
|
363
364
|
useEffect(function () {
|
|
364
365
|
var mergedKanbanGroupData = mergeKanbanGroupsWithDefinitions(rawKanbanGroupRecords, swimlaneDefinitions, recordsInSwimlane);
|
|
365
366
|
setKanbanViewData(mergedKanbanGroupData);
|
|
@@ -481,6 +482,9 @@ export var SolidKanbanView = function (params) {
|
|
|
481
482
|
var queryObject = getFilterObjectFromLocalStorage();
|
|
482
483
|
var queryString = "";
|
|
483
484
|
if (queryObject) {
|
|
485
|
+
setShowArchived(queryObject.showArchived === true ||
|
|
486
|
+
queryObject.showArchived === "true" ||
|
|
487
|
+
queryObject.showSoftDeleted === "inclusive");
|
|
484
488
|
var filters_1 = {
|
|
485
489
|
$and: []
|
|
486
490
|
};
|
|
@@ -521,13 +525,15 @@ export var SolidKanbanView = function (params) {
|
|
|
521
525
|
setToPopulate(toPopulate_1);
|
|
522
526
|
setToPopulateMedia(toPopulateMedia_1);
|
|
523
527
|
setRecordsInSwimlane(recordsInSwimlane_1);
|
|
524
|
-
|
|
528
|
+
setFilters(filters_1);
|
|
525
529
|
setQueryDataLoaded(true);
|
|
526
530
|
queryString = qs.stringify(queryData, {
|
|
527
531
|
encodeValuesOnly: true
|
|
528
532
|
});
|
|
529
533
|
}
|
|
530
534
|
else {
|
|
535
|
+
setShowArchived(false);
|
|
536
|
+
var defaultFilters = { $and: [] };
|
|
531
537
|
var _o = initialFilterMethod(), recordsInSwimlane_2 = _o.recordsInSwimlane, toPopulate_2 = _o.toPopulate, toPopulateMedia_2 = _o.toPopulateMedia;
|
|
532
538
|
var queryData = {
|
|
533
539
|
offset: 0,
|
|
@@ -539,7 +545,7 @@ export var SolidKanbanView = function (params) {
|
|
|
539
545
|
groupFilter: {
|
|
540
546
|
limit: ((_l = (_k = (_j = (_h = kanbanViewMetaData === null || kanbanViewMetaData === void 0 ? void 0 : kanbanViewMetaData.data) === null || _h === void 0 ? void 0 : _h.solidView) === null || _j === void 0 ? void 0 : _j.layout) === null || _k === void 0 ? void 0 : _k.attrs) === null || _l === void 0 ? void 0 : _l.recordsInSwimlane) || 10,
|
|
541
547
|
offset: 0,
|
|
542
|
-
filters:
|
|
548
|
+
filters: defaultFilters,
|
|
543
549
|
populate: toPopulate_2,
|
|
544
550
|
populateMedia: toPopulateMedia_2
|
|
545
551
|
}
|
|
@@ -548,6 +554,7 @@ export var SolidKanbanView = function (params) {
|
|
|
548
554
|
setRecordsInSwimlane(recordsInSwimlane_2);
|
|
549
555
|
setToPopulate(toPopulate_2);
|
|
550
556
|
setToPopulateMedia(toPopulateMedia_2);
|
|
557
|
+
setFilters(defaultFilters);
|
|
551
558
|
// fields=status&groupBy=status&fields=count(status)&populateGroup=true
|
|
552
559
|
queryString = qs.stringify(queryData, {
|
|
553
560
|
encodeValuesOnly: true
|
|
@@ -559,6 +566,83 @@ export var SolidKanbanView = function (params) {
|
|
|
559
566
|
}
|
|
560
567
|
}
|
|
561
568
|
}, [groupByFieldName, isDeleteSolidEntitiesSucess, solidKanbanViewMetaData, swimlaneDefinitions]);
|
|
569
|
+
var loadKanbanBoard = function (nextFilters) {
|
|
570
|
+
if (nextFilters === void 0) { nextFilters = filters; }
|
|
571
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
572
|
+
var swimlanesCount, resolvedSwimlanesCount, queryData, response, error_2;
|
|
573
|
+
var _a, _b, _c, _d, _e, _f;
|
|
574
|
+
return __generator(this, function (_g) {
|
|
575
|
+
switch (_g.label) {
|
|
576
|
+
case 0:
|
|
577
|
+
if (!solidKanbanViewMetaData || !groupByFieldName || !queryDataLoaded)
|
|
578
|
+
return [2 /*return*/];
|
|
579
|
+
setLoading(true);
|
|
580
|
+
_g.label = 1;
|
|
581
|
+
case 1:
|
|
582
|
+
_g.trys.push([1, 3, 4, 5]);
|
|
583
|
+
swimlanesCount = ((_d = (_c = (_b = (_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.swimlanesCount) || 5;
|
|
584
|
+
resolvedSwimlanesCount = swimlaneDefinitions.length > 0 ? swimlaneDefinitions.length : swimlanesCount;
|
|
585
|
+
queryData = applyArchivedQueryState({
|
|
586
|
+
offset: 0,
|
|
587
|
+
limit: resolvedSwimlanesCount,
|
|
588
|
+
groupBy: groupByFieldName,
|
|
589
|
+
populate: toPopulate,
|
|
590
|
+
populateMedia: toPopulateMedia,
|
|
591
|
+
populateGroup: true,
|
|
592
|
+
groupFilter: {
|
|
593
|
+
limit: recordsInSwimlane,
|
|
594
|
+
offset: 0,
|
|
595
|
+
filters: nextFilters,
|
|
596
|
+
populate: toPopulate,
|
|
597
|
+
populateMedia: toPopulateMedia,
|
|
598
|
+
},
|
|
599
|
+
});
|
|
600
|
+
return [4 /*yield*/, triggerGetSolidEntities(qs.stringify(queryData, {
|
|
601
|
+
encodeValuesOnly: true
|
|
602
|
+
})).unwrap()];
|
|
603
|
+
case 2:
|
|
604
|
+
response = _g.sent();
|
|
605
|
+
setServerSwimLaneCount(((_e = response === null || response === void 0 ? void 0 : response.meta) === null || _e === void 0 ? void 0 : _e.totalRecords) || 0);
|
|
606
|
+
setRawKanbanGroupRecords((response === null || response === void 0 ? void 0 : response.groupRecords) || []);
|
|
607
|
+
setSelectedRecords([]);
|
|
608
|
+
return [3 /*break*/, 5];
|
|
609
|
+
case 3:
|
|
610
|
+
error_2 = _g.sent();
|
|
611
|
+
dispatch(showToast({
|
|
612
|
+
severity: "error",
|
|
613
|
+
summary: "Failed to load board",
|
|
614
|
+
detail: ((_f = error_2 === null || error_2 === void 0 ? void 0 : error_2.data) === null || _f === void 0 ? void 0 : _f.message) || (error_2 === null || error_2 === void 0 ? void 0 : error_2.message) || "Unable to load kanban data.",
|
|
615
|
+
life: 4000,
|
|
616
|
+
}));
|
|
617
|
+
setServerSwimLaneCount(0);
|
|
618
|
+
setRawKanbanGroupRecords([]);
|
|
619
|
+
return [3 /*break*/, 5];
|
|
620
|
+
case 4:
|
|
621
|
+
setLoading(false);
|
|
622
|
+
return [7 /*endfinally*/];
|
|
623
|
+
case 5: return [2 /*return*/];
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
};
|
|
628
|
+
useEffect(function () {
|
|
629
|
+
if (!queryDataLoaded || !solidKanbanViewMetaData || !groupByFieldName)
|
|
630
|
+
return;
|
|
631
|
+
void loadKanbanBoard(filters);
|
|
632
|
+
}, [groupByFieldName, queryDataLoaded, recordsInSwimlane, showArchived, solidKanbanViewMetaData, swimlaneDefinitions, toPopulate, toPopulateMedia]);
|
|
633
|
+
useEffect(function () {
|
|
634
|
+
if (!queryDataLoaded)
|
|
635
|
+
return;
|
|
636
|
+
var persistedFilterObject = getFilterObjectFromLocalStorage() || {};
|
|
637
|
+
var nextPersistedFilterObject = __assign(__assign({}, persistedFilterObject), { showArchived: showArchived });
|
|
638
|
+
if (showArchived) {
|
|
639
|
+
nextPersistedFilterObject.showSoftDeleted = "inclusive";
|
|
640
|
+
}
|
|
641
|
+
else {
|
|
642
|
+
delete nextPersistedFilterObject.showSoftDeleted;
|
|
643
|
+
}
|
|
644
|
+
setFilterObjectToLocalStorage(nextPersistedFilterObject);
|
|
645
|
+
}, [queryDataLoaded, showArchived]);
|
|
562
646
|
// clickable link allowing one to open the detail / form view.
|
|
563
647
|
// handle bulk deletion
|
|
564
648
|
var deleteBulk = function () {
|
|
@@ -578,9 +662,46 @@ export var SolidKanbanView = function (params) {
|
|
|
578
662
|
setSelectedRecords(record ? [record] : []);
|
|
579
663
|
setDialogVisible(true);
|
|
580
664
|
};
|
|
665
|
+
var handleRecoverRecord = function (record) { return __awaiter(void 0, void 0, void 0, function () {
|
|
666
|
+
var response, error_3;
|
|
667
|
+
var _a, _b;
|
|
668
|
+
return __generator(this, function (_c) {
|
|
669
|
+
switch (_c.label) {
|
|
670
|
+
case 0:
|
|
671
|
+
if (!(record === null || record === void 0 ? void 0 : record.id))
|
|
672
|
+
return [2 /*return*/];
|
|
673
|
+
_c.label = 1;
|
|
674
|
+
case 1:
|
|
675
|
+
_c.trys.push([1, 4, , 5]);
|
|
676
|
+
return [4 /*yield*/, triggerRecoverSolidEntityById(record.id).unwrap()];
|
|
677
|
+
case 2:
|
|
678
|
+
response = _c.sent();
|
|
679
|
+
dispatch(showToast({
|
|
680
|
+
severity: "success",
|
|
681
|
+
summary: "Success",
|
|
682
|
+
detail: ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.message) || "Record recovered successfully.",
|
|
683
|
+
life: 3000,
|
|
684
|
+
}));
|
|
685
|
+
return [4 /*yield*/, loadKanbanBoard(filters)];
|
|
686
|
+
case 3:
|
|
687
|
+
_c.sent();
|
|
688
|
+
return [3 /*break*/, 5];
|
|
689
|
+
case 4:
|
|
690
|
+
error_3 = _c.sent();
|
|
691
|
+
dispatch(showToast({
|
|
692
|
+
severity: "error",
|
|
693
|
+
summary: "Recover Failed",
|
|
694
|
+
detail: ((_b = error_3 === null || error_3 === void 0 ? void 0 : error_3.data) === null || _b === void 0 ? void 0 : _b.message) || (error_3 === null || error_3 === void 0 ? void 0 : error_3.message) || "Unable to recover the selected record.",
|
|
695
|
+
life: 4000,
|
|
696
|
+
}));
|
|
697
|
+
return [3 /*break*/, 5];
|
|
698
|
+
case 5: return [2 /*return*/];
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}); };
|
|
581
702
|
// Individual Swimlane Load More
|
|
582
703
|
var handleLoadMore = function (groupByField) { return __awaiter(void 0, void 0, void 0, function () {
|
|
583
|
-
var _a, offset, limit, queryData, queryString, data, newRecords, mergeData, updatedData_1,
|
|
704
|
+
var _a, offset, limit, queryData, queryString, data, newRecords, mergeData, updatedData_1, error_4;
|
|
584
705
|
var _b;
|
|
585
706
|
return __generator(this, function (_c) {
|
|
586
707
|
switch (_c.label) {
|
|
@@ -590,7 +711,7 @@ export var SolidKanbanView = function (params) {
|
|
|
590
711
|
_c.label = 1;
|
|
591
712
|
case 1:
|
|
592
713
|
_c.trys.push([1, 3, , 4]);
|
|
593
|
-
queryData = {
|
|
714
|
+
queryData = applyArchivedQueryState({
|
|
594
715
|
offset: offset + limit,
|
|
595
716
|
limit: limit,
|
|
596
717
|
populate: toPopulate,
|
|
@@ -599,7 +720,7 @@ export var SolidKanbanView = function (params) {
|
|
|
599
720
|
filters: __assign((_b = {}, _b[groupByFieldName] = {
|
|
600
721
|
$in: [groupByField],
|
|
601
722
|
}, _b), filters)
|
|
602
|
-
};
|
|
723
|
+
});
|
|
603
724
|
queryString = qs.stringify(queryData, {
|
|
604
725
|
encodeValuesOnly: true
|
|
605
726
|
});
|
|
@@ -639,8 +760,8 @@ export var SolidKanbanView = function (params) {
|
|
|
639
760
|
});
|
|
640
761
|
return [3 /*break*/, 4];
|
|
641
762
|
case 3:
|
|
642
|
-
|
|
643
|
-
console.error(ERROR_MESSAGES.LOAD_MORE_DATA,
|
|
763
|
+
error_4 = _c.sent();
|
|
764
|
+
console.error(ERROR_MESSAGES.LOAD_MORE_DATA, error_4);
|
|
644
765
|
return [3 /*break*/, 4];
|
|
645
766
|
case 4: return [2 /*return*/];
|
|
646
767
|
}
|
|
@@ -649,7 +770,7 @@ export var SolidKanbanView = function (params) {
|
|
|
649
770
|
// Handle drag-and-drop functionality
|
|
650
771
|
// @ts-ignore
|
|
651
772
|
var onDragEnd = function (result) { return __awaiter(void 0, void 0, void 0, function () {
|
|
652
|
-
var source, destination, sourceGroupName, destinationGroupName, sourceGroupIndex, destinationGroupIndex, sourceGroup, destinationGroup, sourceRecords, destinationRecords, movedItem, updatedItem, oldkanbanViewData, formData, kanbanUpdateResponse,
|
|
773
|
+
var source, destination, sourceGroupName, destinationGroupName, sourceGroupIndex, destinationGroupIndex, sourceGroup, destinationGroup, sourceRecords, destinationRecords, movedItem, updatedItem, oldkanbanViewData, formData, kanbanUpdateResponse, error_5;
|
|
653
774
|
var _a;
|
|
654
775
|
var _b;
|
|
655
776
|
return __generator(this, function (_c) {
|
|
@@ -722,10 +843,10 @@ export var SolidKanbanView = function (params) {
|
|
|
722
843
|
}
|
|
723
844
|
return [3 /*break*/, 4];
|
|
724
845
|
case 3:
|
|
725
|
-
|
|
846
|
+
error_5 = _c.sent();
|
|
726
847
|
// 6. Handle 500 or network errors
|
|
727
|
-
console.error(ERROR_MESSAGES.API_ERROR,
|
|
728
|
-
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.SOMETHING_WRONG, detail: ((_b =
|
|
848
|
+
console.error(ERROR_MESSAGES.API_ERROR, error_5);
|
|
849
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.SOMETHING_WRONG, detail: ((_b = error_5 === null || error_5 === void 0 ? void 0 : error_5.data) === null || _b === void 0 ? void 0 : _b.message) || ERROR_MESSAGES.SOMETHING_WRONG }));
|
|
729
850
|
setKanbanViewData(oldkanbanViewData);
|
|
730
851
|
return [3 /*break*/, 4];
|
|
731
852
|
case 4: return [2 /*return*/];
|
|
@@ -759,6 +880,7 @@ export var SolidKanbanView = function (params) {
|
|
|
759
880
|
}
|
|
760
881
|
// sort: [`id:desc`],
|
|
761
882
|
};
|
|
883
|
+
applyArchivedQueryState(queryData);
|
|
762
884
|
queryString = qs.stringify(queryData, {
|
|
763
885
|
encodeValuesOnly: true
|
|
764
886
|
});
|
|
@@ -830,6 +952,7 @@ export var SolidKanbanView = function (params) {
|
|
|
830
952
|
populateMedia: toPopulateMedia
|
|
831
953
|
}
|
|
832
954
|
};
|
|
955
|
+
applyArchivedQueryState(queryData);
|
|
833
956
|
queryString = qs.stringify(queryData, {
|
|
834
957
|
encodeValuesOnly: true
|
|
835
958
|
});
|
|
@@ -846,6 +969,12 @@ export var SolidKanbanView = function (params) {
|
|
|
846
969
|
// @ts-ignore
|
|
847
970
|
urlData.search_predicate = customFilter.search_predicate || {};
|
|
848
971
|
// @ts-ignore
|
|
972
|
+
urlData.showArchived = showArchived;
|
|
973
|
+
if (showArchived) {
|
|
974
|
+
// @ts-ignore
|
|
975
|
+
urlData.showSoftDeleted = "inclusive";
|
|
976
|
+
}
|
|
977
|
+
// @ts-ignore
|
|
849
978
|
setFilterObjectToLocalStorage(urlData);
|
|
850
979
|
}
|
|
851
980
|
return [4 /*yield*/, triggerGetSolidEntities(queryString)];
|
|
@@ -881,7 +1010,7 @@ export var SolidKanbanView = function (params) {
|
|
|
881
1010
|
}, [solidKanbanViewMetaData]);
|
|
882
1011
|
var kanbanViewTitle = (_b = (_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.displayName;
|
|
883
1012
|
var entityDisplayName = ((_e = (_d = (_c = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _c === void 0 ? void 0 : _c.solidView) === null || _d === void 0 ? void 0 : _d.model) === null || _e === void 0 ? void 0 : _e.displayName) || params.modelName;
|
|
884
|
-
var headerRequestStatusLabel = isDeleteSolidEntitiesLoading ? "Deleting..." : isPatchKanbanViewLoading ? "Updating..." : loading || !queryDataLoaded ? "Loading..." : null;
|
|
1013
|
+
var headerRequestStatusLabel = isDeleteSolidEntitiesLoading ? "Deleting..." : isPatchKanbanViewLoading ? "Updating..." : isRecoveringRecord ? "Recovering..." : loading || !queryDataLoaded ? "Loading..." : null;
|
|
885
1014
|
var handleRefreshView = function () {
|
|
886
1015
|
var _a, _b;
|
|
887
1016
|
if (hasStoredFilterPredicates(getFilterObjectFromLocalStorage())) {
|
|
@@ -889,7 +1018,7 @@ export var SolidKanbanView = function (params) {
|
|
|
889
1018
|
(_b = (_a = solidGlobalSearchElementRef.current) === null || _a === void 0 ? void 0 : _a.clearAppliedFilters) === null || _b === void 0 ? void 0 : _b.call(_a, { preserveGrouping: true });
|
|
890
1019
|
return;
|
|
891
1020
|
}
|
|
892
|
-
|
|
1021
|
+
loadKanbanBoard(filters);
|
|
893
1022
|
};
|
|
894
1023
|
var toggleBothSidebars = function () {
|
|
895
1024
|
if (visibleNavbar) {
|
|
@@ -901,8 +1030,8 @@ export var SolidKanbanView = function (params) {
|
|
|
901
1030
|
};
|
|
902
1031
|
console.log("Logging kanban data: ", solidKanbanViewMetaData);
|
|
903
1032
|
return (_jsxs("div", { className: "page-parent-wrapper solid-list-page-wrapper flex h-full min-h-0 overflow-hidden", children: [_jsx("div", { className: "solid-list-content flex flex-col flex-grow-1", children: _jsxs("div", { className: "solid-list-surface solid-kanban-surface flex flex-col flex-1 min-h-0", children: [_jsxs("div", { className: "page-header solid-list-toolbar solid-kanban-toolbar flex-col lg:flex-row", children: [_jsxs("div", { className: "flex justify-between w-full", children: [_jsxs("div", { className: "solid-list-toolbar-left flex w-full items-center gap-3", children: [_jsx("p", { className: "m-0 view-title solid-text-wrapper", children: kanbanViewTitle }), _jsx("div", { className: "hidden lg:flex", children: _jsx(SolidGlobalSearchElement, { viewType: "kanban", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) })] }), _jsxs("div", { className: "flex items-center solid-header-buttons-wrapper solid-list-toolbar-actions", children: [_jsx(SolidHeaderRequestStatus, { label: headerRequestStatusLabel }), _jsx("div", { className: "flex lg:hidden", children: _jsx(SolidButton, { type: "button", variant: "outline", size: "sm", className: "solid-icon-button", onClick: function () { return setShowGlobalSearchElement(!showGlobalSearchElement); }, "aria-label": "Toggle search", leftIcon: _jsx(SolidIcon, { name: "si-search", "aria-hidden": true }) }) }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'create'))) && ((_h = (_g = (_f = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _f === void 0 ? void 0 : _f.solidView) === null || _g === void 0 ? void 0 : _g.layout) === null || _h === void 0 ? void 0 : _h.attrs.create) !== false &&
|
|
904
|
-
_jsx(SolidCreateButton, { createButtonUrl: createButtonUrl, createActionQueryParams: createActionQueryParams, responsiveIconOnly: true }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) && ((_l = (_k = (_j = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _j === void 0 ? void 0 : _j.solidView) === null || _k === void 0 ? void 0 : _k.layout) === null || _l === void 0 ? void 0 : _l.attrs.delete) !== false && selectedRecords.length > 0 && _jsx(SolidButton, { type: "button", variant: "destructive", size: "sm", onClick: function () { return setDialogVisible(true); }, children: "Delete" }), _jsx(SolidButton, { type: "button", variant: "outline", size: "sm", className: "solid-icon-button", onClick: handleRefreshView, "aria-label": "Refresh board", leftIcon: _jsx(SolidIcon, { name: "si-refresh", "aria-hidden": true }) }), _jsx(SolidKanbanViewConfigure, { solidKanbanViewMetaData: solidKanbanViewMetaData, modelName: params.modelName, actionsAllowed: actionsAllowed, viewModes: viewModes, setLayoutDialogVisible: setLayoutDialogVisible, setShowSaveFilterPopup: setShowSaveFilterPopup, filters: filters, handleRefreshView: handleRefreshView })] })] }), showGlobalSearchElement && (_jsx("div", { className: "flex lg:hidden", children: _jsx(SolidGlobalSearchElement, { viewType: "kanban", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) }))] }), _jsx("style", { children: ".p-datatable .p-datatable-loading-overlay {background-color: rgba(0, 0, 0, 0.0);}" }), solidKanbanViewMetaData && kanbanViewData &&
|
|
905
|
-
_jsx(KanbanBoard, { groupByFieldName: groupByFieldName, kanbanViewData: kanbanViewData, maxSwimLanesCount: maxSwimLanesCount, solidKanbanViewMetaData: solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data, setKanbanViewData: setKanbanViewData, handleLoadMore: handleLoadMore, onDragEnd: onDragEnd, handleSwimLanePagination: handleSwimLanePagination, onDelete: actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) && ((_p = (_o = (_m = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _m === void 0 ? void 0 : _m.solidView) === null || _o === void 0 ? void 0 : _o.layout) === null || _p === void 0 ? void 0 : _p.attrs.delete) !== false ? openDeleteDialogForRecord : undefined, setLightboxUrls: setLightboxUrls, setOpenLightbox: setOpenLightbox, editButtonUrl: editBaseUrl })] }) }), _jsx(SolidConfirmDialog, { open: isDialogVisible, onCancel: onDeleteClose, onConfirm: deleteBulk, className: "solid-shadcn-confirm-dialog solid-delete-confirm-dialog", headerClassName: "solid-shadcn-dialog-head", bodyClassName: "solid-shadcn-dialog-body", footerClassName: "solid-shadcn-dialog-actions", separatorClassName: "solid-shadcn-dialog-sep", showSeparator: true, title: "Delete ".concat(entityDisplayName), message: _jsx("p", { className: "solid-shadcn-dialog-text", children: selectedRecords.length === 1
|
|
1033
|
+
_jsx(SolidCreateButton, { createButtonUrl: createButtonUrl, createActionQueryParams: createActionQueryParams, responsiveIconOnly: true }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) && ((_l = (_k = (_j = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _j === void 0 ? void 0 : _j.solidView) === null || _k === void 0 ? void 0 : _k.layout) === null || _l === void 0 ? void 0 : _l.attrs.delete) !== false && selectedRecords.length > 0 && _jsx(SolidButton, { type: "button", variant: "destructive", size: "sm", onClick: function () { return setDialogVisible(true); }, children: "Delete" }), _jsx(SolidButton, { type: "button", variant: "outline", size: "sm", className: "solid-icon-button", onClick: handleRefreshView, "aria-label": "Refresh board", leftIcon: _jsx(SolidIcon, { name: "si-refresh", "aria-hidden": true }) }), _jsx(SolidKanbanViewConfigure, { solidKanbanViewMetaData: solidKanbanViewMetaData, modelName: params.modelName, actionsAllowed: actionsAllowed, viewModes: viewModes, setShowArchived: setShowArchived, showArchived: showArchived, setLayoutDialogVisible: setLayoutDialogVisible, setShowSaveFilterPopup: setShowSaveFilterPopup, filters: filters, handleRefreshView: handleRefreshView })] })] }), showGlobalSearchElement && (_jsx("div", { className: "flex lg:hidden", children: _jsx(SolidGlobalSearchElement, { viewType: "kanban", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidKanbanViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }) }))] }), _jsx("style", { children: ".p-datatable .p-datatable-loading-overlay {background-color: rgba(0, 0, 0, 0.0);}" }), solidKanbanViewMetaData && kanbanViewData &&
|
|
1034
|
+
_jsx(KanbanBoard, { groupByFieldName: groupByFieldName, kanbanViewData: kanbanViewData, maxSwimLanesCount: maxSwimLanesCount, solidKanbanViewMetaData: solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data, setKanbanViewData: setKanbanViewData, handleLoadMore: handleLoadMore, onDragEnd: onDragEnd, handleSwimLanePagination: handleSwimLanePagination, onDelete: actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) && ((_p = (_o = (_m = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _m === void 0 ? void 0 : _m.solidView) === null || _o === void 0 ? void 0 : _o.layout) === null || _p === void 0 ? void 0 : _p.attrs.delete) !== false ? openDeleteDialogForRecord : undefined, onRecover: handleRecoverRecord, setLightboxUrls: setLightboxUrls, setOpenLightbox: setOpenLightbox, editButtonUrl: editBaseUrl, showArchived: showArchived })] }) }), _jsx(SolidConfirmDialog, { open: isDialogVisible, onCancel: onDeleteClose, onConfirm: deleteBulk, className: "solid-shadcn-confirm-dialog solid-delete-confirm-dialog", headerClassName: "solid-shadcn-dialog-head", bodyClassName: "solid-shadcn-dialog-body", footerClassName: "solid-shadcn-dialog-actions", separatorClassName: "solid-shadcn-dialog-sep", showSeparator: true, title: "Delete ".concat(entityDisplayName), message: _jsx("p", { className: "solid-shadcn-dialog-text", children: selectedRecords.length === 1
|
|
906
1035
|
? "Are you sure you want to delete this ".concat(entityDisplayName, " record?")
|
|
907
1036
|
: "Are you sure you want to delete the selected ".concat(entityDisplayName, " records?") }), confirmLabel: "Delete", cancelLabel: "Cancel" }), openLightbox && (_jsx(SolidLightbox, { open: openLightbox, slides: lightboxSlides, onClose: function () { return setOpenLightbox(false); } })), _jsxs(SolidDialog, { open: isLayoutDialogVisible, onOpenChange: setLayoutDialogVisible, className: "solid-kanban-layout-dialog", style: { width: "min(800px, calc(100vw - 32px))" }, children: [_jsxs(SolidDialogHeader, { children: [_jsx(SolidDialogTitle, { children: "Change Kanban Layout" }), _jsx(SolidDialogClose, {})] }), _jsx(SolidDialogSeparator, {}), _jsx(SolidDialogBody, { className: "solid-kanban-layout-dialog-body", children: _jsx(KanbanUserViewLayout, { solidKanbanViewMetaData: solidKanbanViewMetaData, setLayoutDialogVisible: setLayoutDialogVisible }) })] })] }));
|
|
908
1037
|
};
|