datastake-daf 0.6.759 → 0.6.760

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.
Files changed (44) hide show
  1. package/dist/components/index.js +924 -1046
  2. package/dist/constants/index.js +76 -0
  3. package/dist/pages/index.js +133 -311
  4. package/dist/services/index.js +91 -0
  5. package/dist/utils/index.js +388 -0
  6. package/package.json +1 -1
  7. package/rollup.config.js +20 -0
  8. package/src/@daf/core/components/EditForm/storyConfig2.js +866 -25029
  9. package/src/@daf/core/components/Screens/FindInformation/index.js +2 -1
  10. package/src/@daf/core/components/Screens/Users/columns.js +0 -6
  11. package/src/@daf/core/components/Table/NavigationAction/index.jsx +24 -0
  12. package/src/@daf/pages/Dashboards/SupplyChain/index.jsx +2 -2
  13. package/src/@daf/pages/Documents/columns.js +5 -22
  14. package/src/@daf/pages/Documents/index.jsx +2 -3
  15. package/src/@daf/pages/Events/Activities/columns.js +7 -59
  16. package/src/@daf/pages/Events/Activities/index.jsx +2 -3
  17. package/src/@daf/pages/Events/Incidents/columns.js +7 -61
  18. package/src/@daf/pages/Events/Incidents/index.jsx +2 -3
  19. package/src/@daf/pages/Events/columns.js +6 -47
  20. package/src/@daf/pages/Events/helper.js +14 -0
  21. package/src/@daf/pages/Events/index.jsx +2 -3
  22. package/src/@daf/pages/Locations/MineSite/columns.js +7 -12
  23. package/src/@daf/pages/Locations/MineSite/index.jsx +5 -4
  24. package/src/@daf/pages/Locations/columns.js +6 -32
  25. package/src/@daf/pages/Locations/index.jsx +2 -3
  26. package/src/@daf/pages/Partners/index.jsx +11 -0
  27. package/src/@daf/pages/Stakeholders/Operators/columns.js +2 -8
  28. package/src/@daf/pages/Stakeholders/Operators/index.jsx +2 -2
  29. package/src/@daf/pages/Stakeholders/Workers/columns.js +10 -49
  30. package/src/@daf/pages/Stakeholders/Workers/index.jsx +2 -3
  31. package/src/@daf/pages/Stakeholders/columns.js +4 -25
  32. package/src/@daf/pages/Stakeholders/index.jsx +2 -3
  33. package/src/@daf/pages/Summary/Minesite/components/LocationMap/index.js +0 -1
  34. package/src/@daf/pages/Summary/Minesite/index.jsx +2 -0
  35. package/src/@daf/pages/Summary/Operator/index.jsx +3 -1
  36. package/src/@daf/services/PartnerService.js +76 -0
  37. package/src/@daf/utils/tags.js +26 -0
  38. package/src/constants/breadCrumbs.js +22 -0
  39. package/src/constants.js +2 -0
  40. package/src/helpers/breadCrumbs.js +347 -0
  41. package/src/index.js +1 -1
  42. package/src/services.js +2 -1
  43. package/src/utils.js +5 -1
  44. package/dist/style/datastake/mapbox-gl.css +0 -330
@@ -4814,6 +4814,12 @@ const cleanJSON = json => {
4814
4814
  }
4815
4815
  return json;
4816
4816
  };
4817
+ const getLinkValue = (value, linkingObject) => {
4818
+ if (linkingObject && linkingObject?.[value]) {
4819
+ return linkingObject?.[value]?.name;
4820
+ }
4821
+ return null;
4822
+ };
4817
4823
 
4818
4824
  const CustomSelect = ({
4819
4825
  value,
@@ -13143,7 +13149,7 @@ function SupplyChain({
13143
13149
  setSelectedPartners,
13144
13150
  informationSources,
13145
13151
  hardcodedData,
13146
- breadCrumbs = []
13152
+ breadcrumbs = []
13147
13153
  }) {
13148
13154
  const sourceOptions = React.useMemo(() => {
13149
13155
  if (!partners?.length) return [];
@@ -13186,7 +13192,7 @@ function SupplyChain({
13186
13192
  defaultSelected: partners?.map(p => p.id) || []
13187
13193
  }, partners?.length)
13188
13194
  }),
13189
- breadcrumbs: breadCrumbs
13195
+ breadcrumbs: breadcrumbs
13190
13196
  }),
13191
13197
  children: [/*#__PURE__*/jsxRuntime.jsx("section", {
13192
13198
  children: /*#__PURE__*/jsxRuntime.jsx(KeyIndicators$1, {
@@ -16220,12 +16226,6 @@ MoreMenu.propTypes = {
16220
16226
  trigger: PropTypes__default["default"].oneOf(["click", "hover", "contextMenu"])
16221
16227
  };
16222
16228
 
16223
- const getLinkValue$4 = (value, linkingObject) => {
16224
- if (linkingObject && linkingObject?.[value]) {
16225
- return linkingObject?.[value]?.name;
16226
- }
16227
- return null;
16228
- };
16229
16229
  const getColumns$9 = ({
16230
16230
  t,
16231
16231
  goTo,
@@ -16314,7 +16314,7 @@ const getColumns$9 = ({
16314
16314
  className: "daf-default-cell"
16315
16315
  });
16316
16316
  }
16317
- const region = getLinkValue$4(all?.location?.administrativeLevel1, all?.location?.linking?.SCL);
16317
+ const region = getLinkValue(all?.location?.administrativeLevel1, all?.location?.linking?.SCL);
16318
16318
  return region ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
16319
16319
  title: region,
16320
16320
  children: region
@@ -16331,7 +16331,7 @@ const getColumns$9 = ({
16331
16331
  className: "daf-default-cell"
16332
16332
  });
16333
16333
  }
16334
- const district = getLinkValue$4(all?.location?.administrativeLevel2, all?.location?.linking?.SCL);
16334
+ const district = getLinkValue(all?.location?.administrativeLevel2, all?.location?.linking?.SCL);
16335
16335
  return district ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
16336
16336
  title: district,
16337
16337
  children: district
@@ -16399,7 +16399,7 @@ const getColumns$9 = ({
16399
16399
  });
16400
16400
  }
16401
16401
  const onClick = () => {
16402
- const link = `/app/view/${subject}/${all.datastakeId}`;
16402
+ let link = `/app/view/${subject}/${all.datastakeId}`;
16403
16403
  if (activeTab === "shared") {
16404
16404
  link += `?sourceId=${all?.authorId?.id}`;
16405
16405
  }
@@ -30211,7 +30211,8 @@ const OperatorsTable = ({
30211
30211
  form = {},
30212
30212
  extendingFilters = {},
30213
30213
  createDefaultValues = {},
30214
- applications = []
30214
+ applications = [],
30215
+ breadcrumbs = []
30215
30216
  }) => {
30216
30217
  const [selectOptions, setSelectOptions] = React.useState();
30217
30218
  const [activeTab, setActiveTab] = React.useState('own');
@@ -30227,7 +30228,6 @@ const OperatorsTable = ({
30227
30228
  data,
30228
30229
  applications
30229
30230
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
30230
- const breadCrumbs = [];
30231
30231
  const {
30232
30232
  paginationQuery,
30233
30233
  searchParams,
@@ -30274,7 +30274,7 @@ const OperatorsTable = ({
30274
30274
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
30275
30275
  t: t,
30276
30276
  title: t("Operators"),
30277
- breadCrumbs: breadCrumbs,
30277
+ breadCrumbs: breadcrumbs,
30278
30278
  location: location,
30279
30279
  loading: loading,
30280
30280
  goTo: goTo,
@@ -30328,12 +30328,34 @@ const OperatorsTable = ({
30328
30328
  });
30329
30329
  };
30330
30330
 
30331
- const getLinkValue$3 = (value, linkingObject) => {
30332
- if (linkingObject && linkingObject?.[value]) {
30333
- return linkingObject?.[value]?.name;
30334
- }
30335
- return null;
30331
+ const NavigationAction = ({
30332
+ onClick,
30333
+ theme
30334
+ }) => {
30335
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
30336
+ style: {
30337
+ display: "flex",
30338
+ justifyContent: "center"
30339
+ },
30340
+ children: /*#__PURE__*/jsxRuntime.jsx("button", {
30341
+ onClick: onClick,
30342
+ style: {
30343
+ cursor: 'pointer',
30344
+ border: 'none',
30345
+ background: 'transparent',
30346
+ padding: 0,
30347
+ display: 'flex',
30348
+ alignItems: 'center'
30349
+ },
30350
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
30351
+ name: "Link",
30352
+ size: 15,
30353
+ color: theme.baseGray70
30354
+ })
30355
+ })
30356
+ });
30336
30357
  };
30358
+
30337
30359
  const getColumns$8 = ({
30338
30360
  t,
30339
30361
  goTo,
@@ -30422,7 +30444,7 @@ const getColumns$8 = ({
30422
30444
  className: "daf-default-cell"
30423
30445
  });
30424
30446
  }
30425
- const province = getLinkValue$3(all?.administrativeLevel1, all?.linking?.SCL);
30447
+ const province = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
30426
30448
  return province ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
30427
30449
  title: province,
30428
30450
  children: province
@@ -30439,7 +30461,7 @@ const getColumns$8 = ({
30439
30461
  className: "daf-default-cell"
30440
30462
  });
30441
30463
  }
30442
- const territory = getLinkValue$3(all?.administrativeLevel2, all?.linking?.SCL);
30464
+ const territory = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
30443
30465
  return territory ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
30444
30466
  title: territory,
30445
30467
  children: territory
@@ -30490,32 +30512,15 @@ const getColumns$8 = ({
30490
30512
  });
30491
30513
  }
30492
30514
  const onClick = () => {
30493
- const link = `/app/view/${subject}/${all.datastakeId}`;
30515
+ let link = `/app/view/${subject}/${all.datastakeId}`;
30494
30516
  if (activeTab === "shared") {
30495
30517
  link += `?sourceId=${all?.authorId?.id}`;
30496
30518
  }
30497
30519
  goTo(getRedirectLink(link));
30498
30520
  };
30499
- const moreMenuItems = [{
30500
- label: t("Details"),
30501
- value: "details",
30502
- onClick: onClick
30503
- }, {
30504
- label: t("Summary"),
30505
- value: "Summary",
30506
- onClick: () => {
30507
- let link = `/app/summary/${subject}/${all.datastakeId}`;
30508
- if (activeTab === "shared") {
30509
- link += `?sourceId=${all?.authorId?.id}`;
30510
- }
30511
- goTo(getRedirectLink(link));
30512
- }
30513
- // disabled: true,
30514
- }];
30515
- return /*#__PURE__*/jsxRuntime.jsx("div", {
30516
- children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
30517
- items: moreMenuItems
30518
- })
30521
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
30522
+ onClick: onClick,
30523
+ theme: theme
30519
30524
  });
30520
30525
  }
30521
30526
  }].filter(column => column.show !== false);
@@ -30698,7 +30703,8 @@ const LocationsTable = ({
30698
30703
  formValue = {},
30699
30704
  form = {},
30700
30705
  applications = [],
30701
- subjectClear = () => {}
30706
+ subjectClear = () => {},
30707
+ breadcrumbs = []
30702
30708
  }) => {
30703
30709
  const [selectOptions, setSelectOptions] = React.useState();
30704
30710
  const [activeTab, setActiveTab] = React.useState("own");
@@ -30714,7 +30720,6 @@ const LocationsTable = ({
30714
30720
  data,
30715
30721
  applications
30716
30722
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
30717
- const breadCrumbs = [];
30718
30723
  const {
30719
30724
  paginationQuery,
30720
30725
  searchParams,
@@ -30757,7 +30762,7 @@ const LocationsTable = ({
30757
30762
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
30758
30763
  t: t,
30759
30764
  title: t("Locations"),
30760
- breadCrumbs: breadCrumbs,
30765
+ breadCrumbs: breadcrumbs,
30761
30766
  location: location,
30762
30767
  loading: loading,
30763
30768
  goTo: goTo,
@@ -30950,32 +30955,15 @@ const getColumns$7 = ({
30950
30955
  });
30951
30956
  }
30952
30957
  const onClick = () => {
30953
- const link = `/app/view/${subject}/${all.datastakeId}`;
30958
+ let link = `/app/view/${subject}/${all.datastakeId}`;
30954
30959
  if (activeTab === "shared") {
30955
30960
  link += `?sourceId=${all?.authorId?.id}`;
30956
30961
  }
30957
30962
  goTo(getRedirectLink(link));
30958
30963
  };
30959
- const moreMenuItems = [{
30960
- label: t("Details"),
30961
- value: "details",
30962
- onClick: onClick
30963
- }, {
30964
- label: t("Summary"),
30965
- value: "Summary",
30966
- onClick: () => {
30967
- let link = `/app/summary/${subject}/${all.datastakeId}`;
30968
- if (activeTab === "shared") {
30969
- link += `?sourceId=${all?.authorId?.id}`;
30970
- }
30971
- goTo(getRedirectLink(link));
30972
- }
30973
- // disabled: true,
30974
- }];
30975
- return /*#__PURE__*/jsxRuntime.jsx("div", {
30976
- children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
30977
- items: moreMenuItems
30978
- })
30964
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
30965
+ onClick: onClick,
30966
+ theme: theme
30979
30967
  });
30980
30968
  }
30981
30969
  }].filter(column => column.show !== false);
@@ -31158,7 +31146,8 @@ const StakeholdersTable = ({
31158
31146
  formValue = {},
31159
31147
  form = {},
31160
31148
  applications = [],
31161
- subjectClear = () => {}
31149
+ subjectClear = () => {},
31150
+ breadcrumbs = []
31162
31151
  }) => {
31163
31152
  const [selectOptions, setSelectOptions] = React.useState();
31164
31153
  const [activeTab, setActiveTab] = React.useState("own");
@@ -31173,7 +31162,6 @@ const StakeholdersTable = ({
31173
31162
  subject: 'stakeholders',
31174
31163
  applications
31175
31164
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, applications]);
31176
- const breadCrumbs = [];
31177
31165
  const {
31178
31166
  paginationQuery,
31179
31167
  searchParams,
@@ -31213,7 +31201,7 @@ const StakeholdersTable = ({
31213
31201
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
31214
31202
  t: t,
31215
31203
  title: t("Stakeholders"),
31216
- breadCrumbs: breadCrumbs,
31204
+ breadCrumbs: breadcrumbs,
31217
31205
  location: location,
31218
31206
  loading: loading,
31219
31207
  goTo: goTo,
@@ -31373,7 +31361,7 @@ MoreTags.propTypes = {
31373
31361
  diff: PropTypes__default["default"].number
31374
31362
  };
31375
31363
 
31376
- const renderEventStatusTag = ({
31364
+ const renderStatusTag = ({
31377
31365
  value,
31378
31366
  t = s => s
31379
31367
  }) => {
@@ -31381,7 +31369,7 @@ const renderEventStatusTag = ({
31381
31369
  switch (value) {
31382
31370
  case "edited":
31383
31371
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
31384
- color: "orange",
31372
+ color: "yellow",
31385
31373
  style: {
31386
31374
  width
31387
31375
  },
@@ -31408,6 +31396,7 @@ const renderEventStatusTag = ({
31408
31396
  });
31409
31397
  }
31410
31398
  };
31399
+
31411
31400
  const getColumns$6 = ({
31412
31401
  t,
31413
31402
  goTo,
@@ -31587,7 +31576,7 @@ const getColumns$6 = ({
31587
31576
  return all?.authorId?.name;
31588
31577
  }
31589
31578
  const _val = all?.published || all?.status === "submitted" ? "submitted" : value;
31590
- return renderEventStatusTag({
31579
+ return renderStatusTag({
31591
31580
  value: _val,
31592
31581
  t
31593
31582
  });
@@ -31621,21 +31610,15 @@ const getColumns$6 = ({
31621
31610
  });
31622
31611
  }
31623
31612
  const onClick = () => {
31624
- const link = `/app/view/${subject}/${all.datastakeId}`;
31613
+ let link = `/app/view/${subject}/${all.datastakeId}`;
31625
31614
  if (activeTab === "shared") {
31626
31615
  link += `?sourceId=${all?.authorId?.id}`;
31627
31616
  }
31628
31617
  goTo(getRedirectLink(link));
31629
31618
  };
31630
- const moreMenuItems = [{
31631
- label: t("Details"),
31632
- value: "details",
31633
- onClick: onClick
31634
- }];
31635
- return /*#__PURE__*/jsxRuntime.jsx("div", {
31636
- children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
31637
- items: moreMenuItems
31638
- })
31619
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
31620
+ onClick: onClick,
31621
+ theme: theme
31639
31622
  });
31640
31623
  }
31641
31624
  }].filter(column => column.show !== false);
@@ -31990,7 +31973,8 @@ const EventsTable = ({
31990
31973
  form = {},
31991
31974
  extendingFilters = {},
31992
31975
  applications = [],
31993
- subjectClear = () => {}
31976
+ subjectClear = () => {},
31977
+ breadcrumbs = []
31994
31978
  }) => {
31995
31979
  const [selectOptions, setSelectOptions] = React.useState();
31996
31980
  const [activeTab, setActiveTab] = React.useState("own");
@@ -32006,7 +31990,6 @@ const EventsTable = ({
32006
31990
  data,
32007
31991
  applications
32008
31992
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
32009
- const breadCrumbs = [];
32010
31993
  const {
32011
31994
  paginationQuery,
32012
31995
  searchParams,
@@ -32057,7 +32040,7 @@ const EventsTable = ({
32057
32040
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
32058
32041
  t: t,
32059
32042
  title: t("events"),
32060
- breadCrumbs: breadCrumbs,
32043
+ breadCrumbs: breadcrumbs,
32061
32044
  location: location,
32062
32045
  loading: loading,
32063
32046
  goTo: goTo,
@@ -32216,28 +32199,15 @@ const getColumns$5 = ({
32216
32199
  });
32217
32200
  }
32218
32201
  const onClick = () => {
32219
- const link = `/app/view/${subject}/${all.datastakeId}`;
32202
+ let link = `/app/view/${subject}/${all.datastakeId}`;
32220
32203
  if (activeTab === "shared") {
32221
32204
  link += `?sourceId=${all?.authorId?.id}`;
32222
32205
  }
32223
32206
  goTo(getRedirectLink(link));
32224
32207
  };
32225
- const moreMenuItems = [{
32226
- label: t("Details"),
32227
- value: "details",
32228
- onClick: onClick
32229
- }, {
32230
- label: t("Remove"),
32231
- value: "remove",
32232
- onClick: () => {
32233
- console.log("remove");
32234
- },
32235
- disabled: true
32236
- }];
32237
- return /*#__PURE__*/jsxRuntime.jsx("div", {
32238
- children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
32239
- items: moreMenuItems
32240
- })
32208
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
32209
+ onClick: onClick,
32210
+ theme: theme
32241
32211
  });
32242
32212
  }
32243
32213
  }].filter(column => column.show !== false);
@@ -32400,7 +32370,8 @@ const DocumentsTable = ({
32400
32370
  formValue = {},
32401
32371
  form = {},
32402
32372
  applications = [],
32403
- subjectClear = () => {}
32373
+ subjectClear = () => {},
32374
+ breadcrumbs = []
32404
32375
  }) => {
32405
32376
  const [selectOptions, setSelectOptions] = React.useState();
32406
32377
  const [activeTab, setActiveTab] = React.useState("own");
@@ -32415,7 +32386,6 @@ const DocumentsTable = ({
32415
32386
  subject: 'documents',
32416
32387
  applications
32417
32388
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, applications]);
32418
- const breadCrumbs = [];
32419
32389
  const {
32420
32390
  paginationQuery,
32421
32391
  searchParams,
@@ -32460,7 +32430,7 @@ const DocumentsTable = ({
32460
32430
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
32461
32431
  t: t,
32462
32432
  title: t("Documents"),
32463
- breadCrumbs: breadCrumbs,
32433
+ breadCrumbs: breadcrumbs,
32464
32434
  location: location,
32465
32435
  loading: loading,
32466
32436
  goTo: goTo,
@@ -32512,41 +32482,6 @@ const DocumentsTable = ({
32512
32482
  });
32513
32483
  };
32514
32484
 
32515
- const renderStatusTag$2 = ({
32516
- value,
32517
- t = s => s
32518
- }) => {
32519
- const width = 87;
32520
- switch (value) {
32521
- case "edited":
32522
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
32523
- color: "yellow",
32524
- style: {
32525
- width
32526
- },
32527
- className: "text-center",
32528
- children: t("Edited")
32529
- });
32530
- case "submitted":
32531
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
32532
- color: "green",
32533
- style: {
32534
- width
32535
- },
32536
- className: "text-center",
32537
- children: t("Submitted")
32538
- });
32539
- default:
32540
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
32541
- color: "blue",
32542
- style: {
32543
- width
32544
- },
32545
- className: "text-center",
32546
- children: t("Private")
32547
- });
32548
- }
32549
- };
32550
32485
  const getColumns$4 = ({
32551
32486
  t,
32552
32487
  goTo,
@@ -32686,7 +32621,7 @@ const getColumns$4 = ({
32686
32621
  });
32687
32622
  }
32688
32623
  const _val = all?.published || all?.status === "submitted" ? "submitted" : val;
32689
- return renderStatusTag$2({
32624
+ return renderStatusTag({
32690
32625
  value: _val,
32691
32626
  t
32692
32627
  });
@@ -32701,28 +32636,16 @@ const getColumns$4 = ({
32701
32636
  className: "daf-default-cell"
32702
32637
  });
32703
32638
  }
32704
- const link = `/app/view/${subject}/${all.datastakeId}`;
32705
- return /*#__PURE__*/jsxRuntime.jsx("div", {
32706
- style: {
32707
- display: "flex",
32708
- justifyContent: "center"
32709
- },
32710
- children: /*#__PURE__*/jsxRuntime.jsx("button", {
32711
- onClick: () => goTo(getRedirectLink(link)),
32712
- style: {
32713
- cursor: 'pointer',
32714
- border: 'none',
32715
- background: 'transparent',
32716
- padding: 0,
32717
- display: 'flex',
32718
- alignItems: 'center'
32719
- },
32720
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
32721
- name: "Link",
32722
- size: 15,
32723
- color: theme.baseGray70
32724
- })
32725
- })
32639
+ const onClick = () => {
32640
+ let link = `/app/view/${subject}/${all.datastakeId}`;
32641
+ if (activeTab === "shared") {
32642
+ link += `?sourceId=${all?.authorId?.id}`;
32643
+ }
32644
+ goTo(getRedirectLink(link));
32645
+ };
32646
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
32647
+ onClick: onClick,
32648
+ theme: theme
32726
32649
  });
32727
32650
  }
32728
32651
  }].filter(column => column.show !== false);
@@ -33067,7 +32990,8 @@ const WorkersTable = ({
33067
32990
  form = {},
33068
32991
  extendingFilters = {},
33069
32992
  createDefaultValues = {},
33070
- applications = []
32993
+ applications = [],
32994
+ breadcrumbs = []
33071
32995
  }) => {
33072
32996
  const [selectOptions, setSelectOptions] = React.useState();
33073
32997
  const [activeTab, setActiveTab] = React.useState('own');
@@ -33083,7 +33007,6 @@ const WorkersTable = ({
33083
33007
  data,
33084
33008
  applications
33085
33009
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
33086
- const breadCrumbs = [];
33087
33010
  const {
33088
33011
  paginationQuery,
33089
33012
  searchParams,
@@ -33130,7 +33053,7 @@ const WorkersTable = ({
33130
33053
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
33131
33054
  t: t,
33132
33055
  title: t("Workers"),
33133
- breadCrumbs: breadCrumbs,
33056
+ breadCrumbs: breadcrumbs,
33134
33057
  location: location,
33135
33058
  loading: loading,
33136
33059
  goTo: goTo,
@@ -33184,55 +33107,15 @@ const WorkersTable = ({
33184
33107
  });
33185
33108
  };
33186
33109
 
33187
- const getLinkValue$2 = (value, linkingObject) => {
33188
- if (linkingObject && linkingObject?.[value]) {
33189
- return linkingObject?.[value]?.name;
33190
- }
33191
- return null;
33192
- };
33193
- const getEventCategoryBySubject$1 = (eventCategoryObject, subject) => {
33110
+ const getEventCategoryBySubject = (eventCategoryObject, subject) => {
33194
33111
  if (!eventCategoryObject || typeof eventCategoryObject !== 'object') {
33195
33112
  return null;
33196
33113
  }
33197
- const subjectSingular = subject.endsWith('ies') ? subject.slice(0, -3) + 'y' : subject;
33114
+ const subjectSingular = subject.endsWith('ies') ? subject.slice(0, -3) + 'y' : subject.endsWith('s') ? subject.slice(0, -1) : subject;
33198
33115
  const key = `typeOfEvent is ${subjectSingular}`;
33199
33116
  return eventCategoryObject[key] || null;
33200
33117
  };
33201
- const renderStatusTag$1 = ({
33202
- value,
33203
- t = s => s
33204
- }) => {
33205
- const width = 87;
33206
- switch (value) {
33207
- case "edited":
33208
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
33209
- color: "yellow",
33210
- style: {
33211
- width
33212
- },
33213
- className: "text-center",
33214
- children: t("Edited")
33215
- });
33216
- case "submitted":
33217
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
33218
- color: "green",
33219
- style: {
33220
- width
33221
- },
33222
- className: "text-center",
33223
- children: t("Submitted")
33224
- });
33225
- default:
33226
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
33227
- color: "blue",
33228
- style: {
33229
- width
33230
- },
33231
- className: "text-center",
33232
- children: t("Private")
33233
- });
33234
- }
33235
- };
33118
+
33236
33119
  const getColumns$3 = ({
33237
33120
  t,
33238
33121
  goTo,
@@ -33323,7 +33206,7 @@ const getColumns$3 = ({
33323
33206
  className: "daf-default-cell"
33324
33207
  });
33325
33208
  }
33326
- const region = getLinkValue$2(all?.location?.administrativeLevel1, all?.location?.linking?.SCL);
33209
+ const region = getLinkValue(all?.location?.administrativeLevel1, all?.location?.linking?.SCL);
33327
33210
  return region ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
33328
33211
  title: region,
33329
33212
  children: region
@@ -33340,7 +33223,7 @@ const getColumns$3 = ({
33340
33223
  className: "daf-default-cell"
33341
33224
  });
33342
33225
  }
33343
- const district = getLinkValue$2(all?.location?.administrativeLevel2, all?.location?.linking?.SCL);
33226
+ const district = getLinkValue(all?.location?.administrativeLevel2, all?.location?.linking?.SCL);
33344
33227
  return district ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
33345
33228
  title: district,
33346
33229
  children: district
@@ -33358,7 +33241,7 @@ const getColumns$3 = ({
33358
33241
  });
33359
33242
  }
33360
33243
  const eventCategory = findOptions(v, data?.options?.eventCategoryOptions);
33361
- const categoryValue = getEventCategoryBySubject$1(eventCategory, subject);
33244
+ const categoryValue = getEventCategoryBySubject(eventCategory, subject);
33362
33245
  console.log({
33363
33246
  categoryValue
33364
33247
  });
@@ -33401,7 +33284,7 @@ const getColumns$3 = ({
33401
33284
  });
33402
33285
  }
33403
33286
  const _val = all?.published || all?.status === "submitted" ? "submitted" : val;
33404
- return renderStatusTag$1({
33287
+ return renderStatusTag({
33405
33288
  value: _val,
33406
33289
  t
33407
33290
  });
@@ -33434,21 +33317,15 @@ const getColumns$3 = ({
33434
33317
  });
33435
33318
  }
33436
33319
  const onClick = () => {
33437
- const link = `/app/view/${subject}/${all.datastakeId}`;
33320
+ let link = `/app/view/${subject}/${all.datastakeId}`;
33438
33321
  if (activeTab === "shared") {
33439
33322
  link += `?sourceId=${all?.authorId?.id}`;
33440
33323
  }
33441
33324
  goTo(getRedirectLink(link));
33442
33325
  };
33443
- const moreMenuItems = [{
33444
- label: t("Details"),
33445
- value: "details",
33446
- onClick: onClick
33447
- }];
33448
- return /*#__PURE__*/jsxRuntime.jsx("div", {
33449
- children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
33450
- items: moreMenuItems
33451
- })
33326
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
33327
+ onClick: onClick,
33328
+ theme: theme
33452
33329
  });
33453
33330
  }
33454
33331
  }].filter(column => column.show !== false);
@@ -33802,7 +33679,8 @@ const ActivitiesTable = ({
33802
33679
  form = {},
33803
33680
  extendingFilters = {},
33804
33681
  createDefaultValues = {},
33805
- applications = []
33682
+ applications = [],
33683
+ breadcrumbs = []
33806
33684
  }) => {
33807
33685
  const [selectOptions, setSelectOptions] = React.useState();
33808
33686
  const [activeTab, setActiveTab] = React.useState("own");
@@ -33818,7 +33696,6 @@ const ActivitiesTable = ({
33818
33696
  data,
33819
33697
  applications
33820
33698
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
33821
- const breadCrumbs = [];
33822
33699
  const {
33823
33700
  paginationQuery,
33824
33701
  searchParams,
@@ -33865,7 +33742,7 @@ const ActivitiesTable = ({
33865
33742
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
33866
33743
  t: t,
33867
33744
  title: t("Activities"),
33868
- breadCrumbs: breadCrumbs,
33745
+ breadCrumbs: breadcrumbs,
33869
33746
  location: location,
33870
33747
  loading: loading,
33871
33748
  goTo: goTo,
@@ -33919,55 +33796,6 @@ const ActivitiesTable = ({
33919
33796
  });
33920
33797
  };
33921
33798
 
33922
- const getLinkValue$1 = (value, linkingObject) => {
33923
- if (linkingObject && linkingObject?.[value]) {
33924
- return linkingObject?.[value]?.name;
33925
- }
33926
- return null;
33927
- };
33928
- const getEventCategoryBySubject = (eventCategoryObject, subject) => {
33929
- if (!eventCategoryObject || typeof eventCategoryObject !== 'object') {
33930
- return null;
33931
- }
33932
- const subjectSingular = subject.endsWith('ies') ? subject.slice(0, -3) + 'y' : subject.endsWith('s') ? subject.slice(0, -1) : subject;
33933
- const key = `typeOfEvent is ${subjectSingular}`;
33934
- return eventCategoryObject[key] || null;
33935
- };
33936
- const renderStatusTag = ({
33937
- value,
33938
- t = s => s
33939
- }) => {
33940
- const width = 87;
33941
- switch (value) {
33942
- case "edited":
33943
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
33944
- color: "yellow",
33945
- style: {
33946
- width
33947
- },
33948
- className: "text-center",
33949
- children: t("Edited")
33950
- });
33951
- case "submitted":
33952
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
33953
- color: "green",
33954
- style: {
33955
- width
33956
- },
33957
- className: "text-center",
33958
- children: t("Submitted")
33959
- });
33960
- default:
33961
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
33962
- color: "blue",
33963
- style: {
33964
- width
33965
- },
33966
- className: "text-center",
33967
- children: t("Private")
33968
- });
33969
- }
33970
- };
33971
33799
  const getColumns$2 = ({
33972
33800
  t,
33973
33801
  goTo,
@@ -34058,7 +33886,7 @@ const getColumns$2 = ({
34058
33886
  className: "daf-default-cell"
34059
33887
  });
34060
33888
  }
34061
- const region = getLinkValue$1(all?.location?.administrativeLevel1, all?.location?.linking?.SCL);
33889
+ const region = getLinkValue(all?.location?.administrativeLevel1, all?.location?.linking?.SCL);
34062
33890
  return region ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
34063
33891
  title: region,
34064
33892
  children: region
@@ -34075,7 +33903,7 @@ const getColumns$2 = ({
34075
33903
  className: "daf-default-cell"
34076
33904
  });
34077
33905
  }
34078
- const district = getLinkValue$1(all?.location?.administrativeLevel2, all?.location?.linking?.SCL);
33906
+ const district = getLinkValue(all?.location?.administrativeLevel2, all?.location?.linking?.SCL);
34079
33907
  return district ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
34080
33908
  title: district,
34081
33909
  children: district
@@ -34160,21 +33988,15 @@ const getColumns$2 = ({
34160
33988
  });
34161
33989
  }
34162
33990
  const onClick = () => {
34163
- const link = `/app/view/${subject}/${all.datastakeId}`;
33991
+ let link = `/app/view/${subject}/${all.datastakeId}`;
34164
33992
  if (activeTab === "shared") {
34165
33993
  link += `?sourceId=${all?.authorId?.id}`;
34166
33994
  }
34167
33995
  goTo(getRedirectLink(link));
34168
33996
  };
34169
- const moreMenuItems = [{
34170
- label: t("Details"),
34171
- value: "details",
34172
- onClick: onClick
34173
- }];
34174
- return /*#__PURE__*/jsxRuntime.jsx("div", {
34175
- children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
34176
- items: moreMenuItems
34177
- })
33997
+ return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
33998
+ onClick: onClick,
33999
+ theme: theme
34178
34000
  });
34179
34001
  }
34180
34002
  }].filter(column => column.show !== false);
@@ -34528,7 +34350,8 @@ const IncidentsTable = ({
34528
34350
  form = {},
34529
34351
  extendingFilters = {},
34530
34352
  createDefaultValues = {},
34531
- applications = []
34353
+ applications = [],
34354
+ breadcrumbs = []
34532
34355
  }) => {
34533
34356
  const [selectOptions, setSelectOptions] = React.useState();
34534
34357
  const [activeTab, setActiveTab] = React.useState("own");
@@ -34544,7 +34367,6 @@ const IncidentsTable = ({
34544
34367
  data,
34545
34368
  applications
34546
34369
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
34547
- const breadCrumbs = [];
34548
34370
  const {
34549
34371
  paginationQuery,
34550
34372
  searchParams,
@@ -34591,7 +34413,7 @@ const IncidentsTable = ({
34591
34413
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
34592
34414
  t: t,
34593
34415
  title: t("Incidents"),
34594
- breadCrumbs: breadCrumbs,
34416
+ breadCrumbs: breadcrumbs,
34595
34417
  location: location,
34596
34418
  loading: loading,
34597
34419
  goTo: goTo,
@@ -34645,12 +34467,6 @@ const IncidentsTable = ({
34645
34467
  });
34646
34468
  };
34647
34469
 
34648
- const getLinkValue = (value, linkingObject) => {
34649
- if (linkingObject && linkingObject?.[value]) {
34650
- return linkingObject?.[value]?.name;
34651
- }
34652
- return null;
34653
- };
34654
34470
  const getColumns$1 = ({
34655
34471
  t,
34656
34472
  goTo,
@@ -34660,7 +34476,8 @@ const getColumns$1 = ({
34660
34476
  getRedirectLink,
34661
34477
  theme,
34662
34478
  subject,
34663
- data
34479
+ data,
34480
+ applications
34664
34481
  }) => [{
34665
34482
  dataIndex: 'datastakeId',
34666
34483
  title: t('ID'),
@@ -34798,7 +34615,7 @@ const getColumns$1 = ({
34798
34615
  }
34799
34616
  }, {
34800
34617
  title: t("Sources"),
34801
- dataIndex: 'source',
34618
+ dataIndex: 'sources',
34802
34619
  ellipsis: true,
34803
34620
  show: activeTab !== "own",
34804
34621
  render: (v, all) => {
@@ -34807,11 +34624,10 @@ const getColumns$1 = ({
34807
34624
  className: "daf-default-cell"
34808
34625
  });
34809
34626
  }
34810
- const source = findOptions(v, data?.options?.sourceOptions);
34811
- return source ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
34812
- title: source,
34813
- children: source
34814
- }) : '-';
34627
+ const sources = sourceAvatarConfig(v, user, applications);
34628
+ return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
34629
+ items: sources
34630
+ });
34815
34631
  }
34816
34632
  }, {
34817
34633
  id: 'actions',
@@ -34824,7 +34640,7 @@ const getColumns$1 = ({
34824
34640
  });
34825
34641
  }
34826
34642
  const onClick = () => {
34827
- const link = `/app/view/${subject}/${all.datastakeId}`;
34643
+ let link = `/app/view/${subject}/${all.datastakeId}`;
34828
34644
  if (activeTab === "shared") {
34829
34645
  link += `?sourceId=${all?.authorId?.id}`;
34830
34646
  }
@@ -35194,7 +35010,9 @@ const ProductionSitesTable = ({
35194
35010
  formValue = {},
35195
35011
  form = {},
35196
35012
  extendingFilters = {},
35197
- createDefaultValues = {}
35013
+ createDefaultValues = {},
35014
+ applications = [],
35015
+ breadcrumbs = []
35198
35016
  }) => {
35199
35017
  const [selectOptions, setSelectOptions] = React.useState();
35200
35018
  const [activeTab, setActiveTab] = React.useState('own');
@@ -35207,9 +35025,9 @@ const ProductionSitesTable = ({
35207
35025
  getRedirectLink,
35208
35026
  theme,
35209
35027
  subject: 'production-sites',
35210
- data
35211
- }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data]);
35212
- const breadCrumbs = [];
35028
+ data,
35029
+ applications
35030
+ }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
35213
35031
  const {
35214
35032
  paginationQuery,
35215
35033
  searchParams,
@@ -35256,7 +35074,7 @@ const ProductionSitesTable = ({
35256
35074
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
35257
35075
  t: t,
35258
35076
  title: t("production-sites"),
35259
- breadCrumbs: breadCrumbs,
35077
+ breadCrumbs: breadcrumbs,
35260
35078
  location: location,
35261
35079
  loading: loading,
35262
35080
  goTo: goTo,
@@ -37772,7 +37590,8 @@ const OperatorSummary = ({
37772
37590
  goTo = () => {},
37773
37591
  getRedirectLink = () => {},
37774
37592
  goBack = () => {},
37775
- onIdChange = () => {}
37593
+ onIdChange = () => {},
37594
+ breadcrumbs = []
37776
37595
  }) => {
37777
37596
  const {
37778
37597
  selectedItem,
@@ -37810,6 +37629,7 @@ const OperatorSummary = ({
37810
37629
  title: hasSelect ? t("Operator Review") : (singleItemData?.name || "") + " " + t("Summary"),
37811
37630
  className: "with-border-header h-w-btn-header no-px-body",
37812
37631
  goBackTo: !hasSelect && goBack,
37632
+ breadcrumbs: breadcrumbs,
37813
37633
  addedHeaderFirst: true,
37814
37634
  actionButtons: [{
37815
37635
  tooltip: t("Details"),
@@ -42630,7 +42450,8 @@ const MineSummary = ({
42630
42450
  goTo = () => {},
42631
42451
  getRedirectLink = () => {},
42632
42452
  goBack = () => {},
42633
- onIdChange = () => {}
42453
+ onIdChange = () => {},
42454
+ breadcrumbs = []
42634
42455
  }) => {
42635
42456
  const {
42636
42457
  selectedItem,
@@ -42669,6 +42490,7 @@ const MineSummary = ({
42669
42490
  className: "with-border-header h-w-btn-header no-px-body",
42670
42491
  goBackTo: !hasSelect && goBack,
42671
42492
  loading: loading,
42493
+ breadcrumbs: breadcrumbs,
42672
42494
  addedHeaderFirst: true,
42673
42495
  actionButtons: [{
42674
42496
  tooltip: t("Details"),