datastake-daf 0.6.137 → 0.6.139

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.
@@ -12401,25 +12401,26 @@ function Loading(_ref) {
12401
12401
  const {
12402
12402
  Paragraph
12403
12403
  } = antd.Typography;
12404
- const useHeader = ({
12405
- title = '',
12406
- tooltip = '',
12407
- supportText = '',
12408
- tags = [],
12409
- actionButtons: _actionButtons = [],
12410
- titleTooltip,
12411
- className,
12412
- addedHeader = null,
12413
- addedHeaderFirst,
12414
- extraButtons: _extraButtons = [],
12415
- onDownload,
12416
- downloadDisabled,
12417
- goBackTo,
12418
- loading,
12419
- renderExtraComponents,
12420
- app = '',
12421
- isViewMode = false
12422
- }) => {
12404
+ const useHeader = _ref => {
12405
+ let {
12406
+ title = '',
12407
+ tooltip = '',
12408
+ supportText = '',
12409
+ tags = [],
12410
+ actionButtons: _actionButtons = [],
12411
+ titleTooltip,
12412
+ className,
12413
+ addedHeader = null,
12414
+ addedHeaderFirst,
12415
+ extraButtons: _extraButtons = [],
12416
+ onDownload,
12417
+ downloadDisabled,
12418
+ goBackTo,
12419
+ loading,
12420
+ renderExtraComponents,
12421
+ app = '',
12422
+ isViewMode = false
12423
+ } = _ref;
12423
12424
  const downloadButtonAction = app && app === 'sbg' && isViewMode ? null : {
12424
12425
  onClick: onDownload,
12425
12426
  disabled: downloadDisabled,
@@ -12445,9 +12446,9 @@ const useHeader = ({
12445
12446
  const buttonCont = React.useRef();
12446
12447
  const [mainContWidth, setMainContWidth] = React.useState(600);
12447
12448
  const [buttonContWidth, setButtonContWidth] = React.useState(0);
12448
- const hasSupportText = !!supportText?.length;
12449
- const hasTags = !!tags?.length;
12450
- const hasButtons = !!(actionButtons?.length || extraButtons?.length);
12449
+ const hasSupportText = !!(supportText !== null && supportText !== void 0 && supportText.length);
12450
+ const hasTags = !!(tags !== null && tags !== void 0 && tags.length);
12451
+ const hasButtons = !!(actionButtons !== null && actionButtons !== void 0 && actionButtons.length || extraButtons !== null && extraButtons !== void 0 && extraButtons.length);
12451
12452
  React.useEffect(() => {
12452
12453
  const mainContObserver = new ResizeObserver(entries => {
12453
12454
  const _mainEntry = entries[0];
@@ -16392,7 +16393,7 @@ const renderTooltipJsx = ({
16392
16393
  const MINE_SITE = "mineSite";
16393
16394
  const VILLAGE = "village";
16394
16395
  const EXPORTER = "exporter";
16395
- const PROCESSOR = "processor";
16396
+ const PROCESSOR = "mineralProcessor";
16396
16397
  const DEPOT = "depot";
16397
16398
  const MAX_EXTRA_SMALL_ZOOM_THRESHOLD = 2;
16398
16399
  const MAX_SMALL_ZOOM_THRESHOLD = 3;
@@ -16660,7 +16661,7 @@ const StakeholderMarker = dt.div`
16660
16661
  }
16661
16662
  }
16662
16663
 
16663
- &.processor {
16664
+ &.mineralProcessor {
16664
16665
  background-color: var(--purple-50);
16665
16666
  box-shadow: 0 12px 8px rgba(0, 0, 0, 0.15);
16666
16667
  &:hover {
@@ -20203,7 +20204,7 @@ function SDGWidget(_ref) {
20203
20204
  })
20204
20205
  }));
20205
20206
  }
20206
- const SDGContainer = dt.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(60px, 1fr));\n\tgap: 8px;\n\n\t.sdg-item {\n\t\theight: 60px;\n\t\twidth: 60px;\n\t\tborder-radius: 8px;\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t}\n\n\t.sdg-item-content {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\theight: 100%;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t}\n"])));
20207
+ const SDGContainer = dt.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(90px, 1fr));\n\tgap: 8px;\n\n\t.sdg-item {\n\t\theight: 90px;\n\t\twidth: 90px;\n\t\tborder-radius: 8px;\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t}\n\n\t.sdg-item-content {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\theight: 100%;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t}\n"])));
20207
20208
 
20208
20209
  var Style$w = dt.div`
20209
20210
  border: 1px solid var(--base-gray-40);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.137",
3
+ "version": "0.6.139",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -62,7 +62,7 @@ export const StakeholderMarker = styled.div`
62
62
  }
63
63
  }
64
64
 
65
- &.processor {
65
+ &.mineralProcessor {
66
66
  background-color: var(--purple-50);
67
67
  box-shadow: 0 12px 8px rgba(0, 0, 0, 0.15);
68
68
  &:hover {
@@ -3,7 +3,7 @@ import * as L from "leaflet";
3
3
  const MINE_SITE = "mineSite";
4
4
  const VILLAGE = "village";
5
5
  const EXPORTER = "exporter";
6
- const PROCESSOR = "processor";
6
+ const PROCESSOR = "mineralProcessor";
7
7
  const DEPOT = "depot";
8
8
 
9
9
  const MAX_EXTRA_SMALL_ZOOM_THRESHOLD = 2;
@@ -11,7 +11,7 @@ export const storyConfig = {
11
11
  stakeholders: [
12
12
  {
13
13
  datastakeId: "STK00000001",
14
- type: "processor",
14
+ type: "mineralProcessor",
15
15
  name: "STK00000001",
16
16
  links: ["STK00000009"],
17
17
  subTitle: "Sub Title 1",
@@ -31,7 +31,7 @@ export const storyConfig = {
31
31
  },
32
32
  {
33
33
  datastakeId: "STK00000004",
34
- type: "processor",
34
+ type: "mineralProcessor",
35
35
  name: "STK00000004",
36
36
  subTitle: "Sub Title 2",
37
37
  },
@@ -43,7 +43,7 @@ export const storyConfig = {
43
43
  },
44
44
  {
45
45
  datastakeId: "STK00000006",
46
- type: "processor",
46
+ type: "mineralProcessor",
47
47
  name: "STK00000006",
48
48
  subTitle: "Sub Title 3",
49
49
  },
@@ -55,7 +55,7 @@ export const storyConfig = {
55
55
  },
56
56
  {
57
57
  datastakeId: "STK00000008",
58
- type: "processor",
58
+ type: "mineralProcessor",
59
59
  name: "STK00000008",
60
60
  subTitle: "Sub Title 4",
61
61
  },
@@ -67,7 +67,7 @@ export const storyConfig = {
67
67
  },
68
68
  {
69
69
  datastakeId: "STK00000010",
70
- type: "processor",
70
+ type: "mineralProcessor",
71
71
  name: "STK00000010",
72
72
  subTitle: "Sub Title 5",
73
73
  },
@@ -91,7 +91,7 @@ export const storyConfig = {
91
91
  stakeholders: [
92
92
  {
93
93
  datastakeId: "STK00000012",
94
- type: "processor",
94
+ type: "mineralProcessor",
95
95
  name: "STK00000012",
96
96
  subTitle: "Sub Title 1",
97
97
  links: [
@@ -134,13 +134,13 @@ export const storyConfig = {
134
134
  },
135
135
  {
136
136
  datastakeId: "STK00000018",
137
- type: "processor",
137
+ type: "mineralProcessor",
138
138
  name: "STK00000018",
139
139
  subTitle: "Sub Title 1",
140
140
  },
141
141
  {
142
142
  datastakeId: "STK00000019",
143
- type: "processor",
143
+ type: "mineralProcessor",
144
144
  name: "STK00000019",
145
145
  subTitle: "Sub Title 1",
146
146
  },
@@ -153,7 +153,7 @@ export const storyConfig = {
153
153
  "STK00000015",
154
154
  ],
155
155
  datastakeId: "STK00000020",
156
- type: "processor",
156
+ type: "mineralProcessor",
157
157
  name: "STK00000020",
158
158
  subTitle: "Sub Title 1",
159
159
  },
@@ -176,7 +176,7 @@ export const storyConfig = {
176
176
  },
177
177
  {
178
178
  datastakeId: "STK00000024",
179
- type: "processor",
179
+ type: "mineralProcessor",
180
180
  name: "STK00000024",
181
181
  subTitle: "Sub Title 1",
182
182
  links: ["STK00000016"],
@@ -194,7 +194,7 @@ export const storyConfig = {
194
194
  stakeholders: [
195
195
  {
196
196
  datastakeId: "STK00000017",
197
- type: "processor",
197
+ type: "mineralProcessor",
198
198
  name: "STK00000017",
199
199
  subTitle: "Sub Title 1",
200
200
  },
@@ -208,7 +208,7 @@ export const storyConfig = {
208
208
  value: 33,
209
209
  },
210
210
  {
211
- label: "Processor",
211
+ label: "mineralProcessor",
212
212
  value: 33,
213
213
  },
214
214
  ];
@@ -32,12 +32,12 @@ export default function SDGWidget({
32
32
 
33
33
  const SDGContainer = styled.div`
34
34
  display: grid;
35
- grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
35
+ grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
36
36
  gap: 8px;
37
37
 
38
38
  .sdg-item {
39
- height: 60px;
40
- width: 60px;
39
+ height: 90px;
40
+ width: 90px;
41
41
  border-radius: 8px;
42
42
  background-size: cover;
43
43
  background-position: center;