datastake-daf 0.6.756 → 0.6.757

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.
@@ -20,7 +20,7 @@ function SupplyChain({
20
20
  setSelectedPartners,
21
21
  informationSources,
22
22
  hardcodedData,
23
- breadCrumbs = [],
23
+ breadcrumbs = [],
24
24
  }) {
25
25
 
26
26
  const sourceOptions = useMemo(() => {
@@ -69,7 +69,7 @@ function SupplyChain({
69
69
  />
70
70
  </div>
71
71
  }
72
- breadcrumbs={breadCrumbs}
72
+ breadcrumbs={breadcrumbs}
73
73
  />
74
74
  }
75
75
  >
@@ -34,6 +34,7 @@ const DocumentsTable = ({
34
34
  form = {},
35
35
  applications = [],
36
36
  subjectClear = () => {},
37
+ breadcrumbs = [],
37
38
  }) => {
38
39
  const [selectOptions, setSelectOptions] = useState();
39
40
  const [activeTab, setActiveTab] = useState("own");
@@ -49,8 +50,6 @@ const DocumentsTable = ({
49
50
  applications,
50
51
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, applications]);
51
52
 
52
- const breadCrumbs = [];
53
-
54
53
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
55
54
 
56
55
  useEffect(() => {
@@ -91,7 +90,7 @@ const DocumentsTable = ({
91
90
  <TablePageWithTabs
92
91
  t={t}
93
92
  title={t("Documents")}
94
- breadCrumbs={breadCrumbs}
93
+ breadCrumbs={breadcrumbs}
95
94
  location={location}
96
95
  loading={loading}
97
96
  goTo={goTo}
@@ -35,6 +35,7 @@ const ActivitiesTable = ({
35
35
  extendingFilters = {},
36
36
  createDefaultValues = {},
37
37
  applications = [],
38
+ breadcrumbs = [],
38
39
  }) => {
39
40
  const [selectOptions, setSelectOptions] = useState();
40
41
  const [activeTab, setActiveTab] = useState("own");
@@ -52,8 +53,6 @@ const ActivitiesTable = ({
52
53
  applications,
53
54
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
54
55
 
55
- const breadCrumbs = [];
56
-
57
56
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
58
57
 
59
58
  const filters = useMemo(() => {
@@ -95,7 +94,7 @@ const ActivitiesTable = ({
95
94
  <TablePageWithTabs
96
95
  t={t}
97
96
  title={t("Activities")}
98
- breadCrumbs={breadCrumbs}
97
+ breadCrumbs={breadcrumbs}
99
98
  location={location}
100
99
  loading={loading}
101
100
  goTo={goTo}
@@ -35,6 +35,7 @@ const IncidentsTable = ({
35
35
  extendingFilters = {},
36
36
  createDefaultValues = {},
37
37
  applications = [],
38
+ breadcrumbs = [],
38
39
  }) => {
39
40
  const [selectOptions, setSelectOptions] = useState();
40
41
  const [activeTab, setActiveTab] = useState("own");
@@ -52,8 +53,6 @@ const IncidentsTable = ({
52
53
  applications,
53
54
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
54
55
 
55
- const breadCrumbs = [];
56
-
57
56
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
58
57
 
59
58
  const filters = useMemo(() => {
@@ -95,7 +94,7 @@ const IncidentsTable = ({
95
94
  <TablePageWithTabs
96
95
  t={t}
97
96
  title={t("Incidents")}
98
- breadCrumbs={breadCrumbs}
97
+ breadCrumbs={breadcrumbs}
99
98
  location={location}
100
99
  loading={loading}
101
100
  goTo={goTo}
@@ -35,6 +35,7 @@ const EventsTable = ({
35
35
  extendingFilters = {},
36
36
  applications = [],
37
37
  subjectClear = () => {},
38
+ breadcrumbs = [],
38
39
  }) => {
39
40
  const [selectOptions, setSelectOptions] = useState();
40
41
  const [activeTab, setActiveTab] = useState("own");
@@ -52,8 +53,6 @@ const EventsTable = ({
52
53
  applications,
53
54
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
54
55
 
55
- const breadCrumbs = [];
56
-
57
56
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
58
57
 
59
58
  const filters = useMemo(() => {
@@ -101,7 +100,7 @@ const EventsTable = ({
101
100
  <TablePageWithTabs
102
101
  t={t}
103
102
  title={t("events")}
104
- breadCrumbs={breadCrumbs}
103
+ breadCrumbs={breadcrumbs}
105
104
  location={location}
106
105
  loading={loading}
107
106
  goTo={goTo}
@@ -4,7 +4,9 @@ import { findOptions } from '../../../../helpers/StringHelper.js';
4
4
  import { renderDateFormatted } from '../../../../helpers/Forms.js';
5
5
  import CustomIcon from '../../../core/components/Icon/CustomIcon.jsx';
6
6
  import AvatarGroup from '../../../core/components/AvatarGroup/index.jsx';
7
+ import sourceAvatarConfig from '../../../../helpers/sourceAvatarConfig.js';
7
8
  import MoreMenu from '../../../core/components/Table/MoreMenu/index.jsx';
9
+
8
10
  const getLinkValue = (value, linkingObject) => {
9
11
  if(linkingObject && linkingObject?.[value]) {
10
12
  return linkingObject?.[value]?.name;
@@ -12,7 +14,7 @@ const getLinkValue = (value, linkingObject) => {
12
14
  return null;
13
15
  }
14
16
 
15
- export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data}) => [
17
+ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
16
18
  {
17
19
  dataIndex: 'datastakeId',
18
20
  title: t('ID'),
@@ -129,15 +131,15 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
129
131
 
130
132
  {
131
133
  title: t("Sources"),
132
- dataIndex: 'source',
134
+ dataIndex: 'sources',
133
135
  ellipsis: true,
134
136
  show: activeTab !== "own",
135
137
  render: (v, all) => {
136
138
  if (all.empty) {
137
139
  return <div className="daf-default-cell" />
138
140
  }
139
- const source = findOptions(v, data?.options?.sourceOptions);
140
- return source ? <Tooltip title={source}>{source}</Tooltip> : '-';
141
+ const sources = sourceAvatarConfig(v, user, applications);
142
+ return <AvatarGroup items={sources}></AvatarGroup>;
141
143
  },
142
144
  },
143
145
  {
@@ -149,7 +151,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
149
151
  return <div className="daf-default-cell" />;
150
152
  }
151
153
  const onClick = () => {
152
- const link = `/app/view/${subject}/${all.datastakeId}`;
154
+ let link = `/app/view/${subject}/${all.datastakeId}`;
153
155
  if (activeTab === "shared") {
154
156
  link += `?sourceId=${all?.authorId?.id}`;
155
157
  }
@@ -34,6 +34,8 @@ const ProductionSitesTable = ({
34
34
  form = {},
35
35
  extendingFilters = {},
36
36
  createDefaultValues = {},
37
+ applications = [],
38
+ breadcrumbs = [],
37
39
  }) => {
38
40
  const [selectOptions, setSelectOptions] = useState();
39
41
  const [activeTab, setActiveTab] = useState('own');
@@ -48,9 +50,8 @@ const ProductionSitesTable = ({
48
50
  theme,
49
51
  subject: 'production-sites',
50
52
  data,
51
- }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data]);
52
-
53
- const breadCrumbs = [];
53
+ applications,
54
+ }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
54
55
 
55
56
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
56
57
 
@@ -93,7 +94,7 @@ const ProductionSitesTable = ({
93
94
  <TablePageWithTabs
94
95
  t={t}
95
96
  title={t("production-sites")}
96
- breadCrumbs={breadCrumbs}
97
+ breadCrumbs={breadcrumbs}
97
98
  location={location}
98
99
  loading={loading}
99
100
  goTo={goTo}
@@ -34,6 +34,7 @@ const LocationsTable = ({
34
34
  form = {},
35
35
  applications = [],
36
36
  subjectClear = () => {},
37
+ breadcrumbs = [],
37
38
  }) => {
38
39
  const [selectOptions, setSelectOptions] = useState();
39
40
  const [activeTab, setActiveTab] = useState("own");
@@ -51,8 +52,6 @@ const LocationsTable = ({
51
52
  applications,
52
53
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
53
54
 
54
- const breadCrumbs = [];
55
-
56
55
  const { paginationQuery, searchParams, otherParams } = useGetQueryParams({location});
57
56
 
58
57
  useEffect(() => {
@@ -92,7 +91,7 @@ const LocationsTable = ({
92
91
  <TablePageWithTabs
93
92
  t={t}
94
93
  title={t("Locations")}
95
- breadCrumbs={breadCrumbs}
94
+ breadCrumbs={breadcrumbs}
96
95
  location={location}
97
96
  loading={loading}
98
97
  goTo={goTo}
@@ -35,6 +35,7 @@ const OperatorsTable = ({
35
35
  extendingFilters = {},
36
36
  createDefaultValues = {},
37
37
  applications = [],
38
+ breadcrumbs = [],
38
39
  }) => {
39
40
  const [selectOptions, setSelectOptions] = useState();
40
41
  const [activeTab, setActiveTab] = useState('own');
@@ -52,7 +53,6 @@ const OperatorsTable = ({
52
53
  applications,
53
54
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
54
55
 
55
- const breadCrumbs = [];
56
56
 
57
57
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
58
58
 
@@ -95,7 +95,7 @@ const OperatorsTable = ({
95
95
  <TablePageWithTabs
96
96
  t={t}
97
97
  title={t("Operators")}
98
- breadCrumbs={breadCrumbs}
98
+ breadCrumbs={breadcrumbs}
99
99
  location={location}
100
100
  loading={loading}
101
101
  goTo={goTo}
@@ -35,6 +35,7 @@ const WorkersTable = ({
35
35
  extendingFilters = {},
36
36
  createDefaultValues = {},
37
37
  applications = [],
38
+ breadcrumbs = [],
38
39
  }) => {
39
40
  const [selectOptions, setSelectOptions] = useState();
40
41
  const [activeTab, setActiveTab] = useState('own');
@@ -52,8 +53,6 @@ const WorkersTable = ({
52
53
  applications,
53
54
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
54
55
 
55
- const breadCrumbs = [];
56
-
57
56
  const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
58
57
 
59
58
  const filters = useMemo(() => {
@@ -95,7 +94,7 @@ const WorkersTable = ({
95
94
  <TablePageWithTabs
96
95
  t={t}
97
96
  title={t("Workers")}
98
- breadCrumbs={breadCrumbs}
97
+ breadCrumbs={breadcrumbs}
99
98
  location={location}
100
99
  loading={loading}
101
100
  goTo={goTo}
@@ -35,6 +35,7 @@ const StakeholdersTable = ({
35
35
  form = {},
36
36
  applications = [],
37
37
  subjectClear = () => {},
38
+ breadcrumbs = [],
38
39
  }) => {
39
40
  const [selectOptions, setSelectOptions] = useState();
40
41
  const [activeTab, setActiveTab] = useState("own");
@@ -50,8 +51,6 @@ const StakeholdersTable = ({
50
51
  applications,
51
52
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, applications]);
52
53
 
53
- const breadCrumbs = [];
54
-
55
54
  const { paginationQuery, searchParams, otherParams } = useGetQueryParams({location});
56
55
 
57
56
  useEffect(() => {
@@ -89,7 +88,7 @@ const StakeholdersTable = ({
89
88
  <TablePageWithTabs
90
89
  t={t}
91
90
  title={t("Stakeholders")}
92
- breadCrumbs={breadCrumbs}
91
+ breadCrumbs={breadcrumbs}
93
92
  location={location}
94
93
  loading={loading}
95
94
  goTo={goTo}
@@ -29,6 +29,7 @@ const MineSummary = ({
29
29
  getRedirectLink = () => {},
30
30
  goBack = () => {},
31
31
  onIdChange = () => {},
32
+ breadcrumbs = [],
32
33
  }) => {
33
34
  const {
34
35
  selectedItem,
@@ -70,6 +71,7 @@ const MineSummary = ({
70
71
  className="with-border-header h-w-btn-header no-px-body"
71
72
  goBackTo={!hasSelect && goBack}
72
73
  loading={loading}
74
+ breadcrumbs={breadcrumbs}
73
75
  addedHeaderFirst
74
76
  actionButtons={[
75
77
  {
@@ -29,7 +29,8 @@ const OperatorSummary = ({
29
29
  goTo = () => {},
30
30
  getRedirectLink = () => {},
31
31
  goBack = () => {},
32
- onIdChange = () => {}
32
+ onIdChange = () => {},
33
+ breadcrumbs = [],
33
34
  }) => {
34
35
  const {
35
36
  selectedItem,
@@ -70,6 +71,7 @@ const OperatorSummary = ({
70
71
  title={hasSelect ? t("Operator Review") : (singleItemData?.name || "") + " " + t("Summary")}
71
72
  className="with-border-header h-w-btn-header no-px-body"
72
73
  goBackTo={!hasSelect && goBack}
74
+ breadcrumbs={breadcrumbs}
73
75
  addedHeaderFirst
74
76
  actionButtons={[
75
77
  {
@@ -0,0 +1,20 @@
1
+ export const defaultBreadCrumbsLabels = {
2
+ events: "Events",
3
+ accounts: "Accounts",
4
+ modules: "Modules",
5
+ settings: "Settings",
6
+ user: "Users",
7
+ analysis: "Analysis",
8
+ 'data-store': "Data Store",
9
+ data: "Data",
10
+ partners: "Partners",
11
+ locations: "Locations",
12
+ 'information-channels': 'Channels',
13
+ 'find-information': 'Query',
14
+ stakeholders: "Stakeholders",
15
+ documents: "Documents",
16
+ mines: "Mines",
17
+ summary: "Summary",
18
+ edit: "Edit",
19
+ details: "Details",
20
+ }
@@ -0,0 +1 @@
1
+ export { defaultBreadCrumbsLabels } from './constants/breadCrumbs.js';