rez-table-listing-mui 1.2.14 → 1.2.15
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/index.d.ts +8 -110
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/kanban/components/LeadCard.tsx +1 -1
- package/src/kanban/hooks/hooks.ts +2 -2
- package/src/kanban/index.tsx +50 -41
- package/src/kanban/services/service.ts +1 -1
- package/src/kanban/types/types.ts +22 -95
- package/src/listing/components/table-head-dnd-cell.tsx +5 -5
- package/src/listing/components/table-head.tsx +5 -5
- package/src/listing/components/table-settings/components/group-by.tsx +513 -0
- package/src/listing/components/table-settings/components/lane.tsx +512 -0
- package/src/listing/components/table-settings/constants.ts +12 -0
- package/src/listing/components/table-settings/index.tsx +61 -29
- package/src/listing/libs/hooks/useDefaultColumns.tsx +0 -1
- package/src/listing/libs/utils/common.ts +1 -4
- package/src/listing/types/filter-settings.ts +1 -0
- package/src/view/KanbanView.tsx +58 -6
- package/src/view/ListingView.tsx +1 -3
package/src/view/KanbanView.tsx
CHANGED
|
@@ -1,15 +1,67 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
1
2
|
import Kanban from "../kanban";
|
|
2
3
|
import LeadCard from "../kanban/components/LeadCard";
|
|
3
4
|
import { useGetKanbanData } from "../kanban/hooks/hooks";
|
|
5
|
+
import { useCraftTable } from "../listing/libs/hooks/useCraftTable";
|
|
6
|
+
import {
|
|
7
|
+
useEntityTableAPI,
|
|
8
|
+
useGetSettingsDataAPI,
|
|
9
|
+
} from "../listing/libs/hooks/useEntityTableAPI";
|
|
10
|
+
import { ENTITY_TYPE } from "../listing/libs/utils/common";
|
|
11
|
+
import { useCraftTableFilterSettings } from "../listing/libs/hooks/useCraftTableFilterSettings";
|
|
12
|
+
import { QuickFilterSettings } from "../listing/components/table-settings";
|
|
4
13
|
|
|
5
14
|
const KanbanView = () => {
|
|
6
|
-
const {
|
|
15
|
+
const { metaData, isLoading } = useGetKanbanData("LEAD");
|
|
16
|
+
const { getSettingsAPIData } = useGetSettingsDataAPI(ENTITY_TYPE);
|
|
17
|
+
const [selectedTab, setSelectedTab] = useState("All");
|
|
18
|
+
const tableStates = useCraftTable();
|
|
19
|
+
const { tableData } = useEntityTableAPI({
|
|
20
|
+
page: 0,
|
|
21
|
+
size: 50,
|
|
22
|
+
entity_type: ENTITY_TYPE,
|
|
23
|
+
tabs: {
|
|
24
|
+
columnName:
|
|
25
|
+
getSettingsAPIData?.layout_json?.quick_tab?.attribute || "status",
|
|
26
|
+
sortBy: getSettingsAPIData?.layout_json?.quick_tab?.sorting || "ASC",
|
|
27
|
+
value:
|
|
28
|
+
selectedTab.toLowerCase() === "all" ? "" : selectedTab.toLowerCase(),
|
|
29
|
+
},
|
|
30
|
+
quickFilter: tableStates.filters,
|
|
31
|
+
sortby: [
|
|
32
|
+
{
|
|
33
|
+
sortColum: "name",
|
|
34
|
+
sortType: "ASC",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
attributeFilter: [],
|
|
38
|
+
});
|
|
39
|
+
const filterSettingStates = useCraftTableFilterSettings();
|
|
40
|
+
|
|
41
|
+
const { showListViewSettings, setShowListViewSettings, setSettingsData } =
|
|
42
|
+
filterSettingStates;
|
|
43
|
+
|
|
7
44
|
return (
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
45
|
+
<div>
|
|
46
|
+
<Kanban
|
|
47
|
+
metaData={metaData}
|
|
48
|
+
data={tableData?.entity_list}
|
|
49
|
+
isLoading={isLoading}
|
|
50
|
+
KanbanCardComponent={LeadCard}
|
|
51
|
+
showSettings={true}
|
|
52
|
+
onOpenSettings={() => setShowListViewSettings(true)}
|
|
53
|
+
/>
|
|
54
|
+
<QuickFilterSettings
|
|
55
|
+
view="kanban"
|
|
56
|
+
filterSettingStates={filterSettingStates}
|
|
57
|
+
onClose={() => setShowListViewSettings(false)}
|
|
58
|
+
columnsData={metaData || {}}
|
|
59
|
+
columnsDataLoading={isLoading}
|
|
60
|
+
// tabsApiData={settingsTabDropdownData || []}
|
|
61
|
+
// tabsApiDataLoading={settingsTabDropdownPending}
|
|
62
|
+
// onSaveSettingsData={handleSaveSettingsData}
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
13
65
|
);
|
|
14
66
|
};
|
|
15
67
|
|
package/src/view/ListingView.tsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { makeData, Person } from "../listing/libs/utils/make-hierar-data";
|
|
3
2
|
import { useCraftTable } from "../listing/libs/hooks/useCraftTable";
|
|
4
3
|
import { useCraftTableFilterSettings } from "../listing/libs/hooks/useCraftTableFilterSettings";
|
|
5
4
|
import { useDefaultColumns } from "../listing/libs/hooks/useDefaultColumns";
|
|
@@ -18,12 +17,10 @@ import {
|
|
|
18
17
|
useSettingsDropDownAPI,
|
|
19
18
|
useUpdateFilterAPI,
|
|
20
19
|
} from "../listing/libs/hooks/useEntityTableAPI";
|
|
21
|
-
import { useGetKanbanData } from "../kanban/hooks/hooks";
|
|
22
20
|
import { entityTableMetaMaster } from "../listing/libs/utils/apiColumn";
|
|
23
21
|
import { ColumnDef } from "@tanstack/react-table";
|
|
24
22
|
import { FilterMasterStateProps } from "../listing/types/filter";
|
|
25
23
|
import { SettingsDataProps } from "../listing/types/filter-settings";
|
|
26
|
-
import LoginButton from "../listing/components/login";
|
|
27
24
|
import TableWrapper from "../listing/components/index-table";
|
|
28
25
|
import { CraftTableFilter } from "..";
|
|
29
26
|
import { TableTabs } from "../listing/components/tabs";
|
|
@@ -400,6 +397,7 @@ function ListingView() {
|
|
|
400
397
|
/>
|
|
401
398
|
|
|
402
399
|
<QuickFilterSettings
|
|
400
|
+
view="listing"
|
|
403
401
|
filterSettingStates={filterSettingStates}
|
|
404
402
|
onClose={() => setShowListViewSettings(false)}
|
|
405
403
|
columnsData={metaQuery.data || {}}
|