datastake-daf 0.6.147 → 0.6.148

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.
@@ -15186,6 +15186,7 @@ Loader.propTypes = {
15186
15186
  function Widget(_ref) {
15187
15187
  let {
15188
15188
  title = "",
15189
+ noTitle = false,
15189
15190
  children,
15190
15191
  addedHeader = null,
15191
15192
  tooltip,
@@ -15234,7 +15235,7 @@ function Widget(_ref) {
15234
15235
  className: formatClassname(["daf-widget", "flex-1", className, !!tabsConfig && "with-tabs", isCollapsable && isCollapsed && "collapsed-widget"]),
15235
15236
  children: [loading && fullWidgetLoading && /*#__PURE__*/jsxRuntime.jsx(Loader, {
15236
15237
  background: "white"
15237
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
15238
+ }), !noTitle && /*#__PURE__*/jsxRuntime.jsxs("div", {
15238
15239
  className: "widget-header flex-column",
15239
15240
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
15240
15241
  className: "flex flex-row widget-header-items",
@@ -15291,17 +15292,16 @@ function Widget(_ref) {
15291
15292
  icon: !isExpanded ? /*#__PURE__*/jsxRuntime.jsx(Icons.RightOutlined, {
15292
15293
  style: {
15293
15294
  width: 10,
15294
- paddingTop: '4px'
15295
+ paddingTop: "4px"
15295
15296
  }
15296
- })
15297
- //<PlusOutlined style={{width: 10}} />
15298
- :
15297
+ }) :
15299
15298
  /*#__PURE__*/
15299
+ //<PlusOutlined style={{width: 10}} />
15300
15300
  //<MinusOutlined style={{ width: 10 }} />
15301
15301
  jsxRuntime.jsx(Icons.DownOutlined, {
15302
15302
  style: {
15303
15303
  width: 10,
15304
- paddingTop: '4px'
15304
+ paddingTop: "4px"
15305
15305
  }
15306
15306
  })
15307
15307
  })
@@ -15812,17 +15812,19 @@ function KeyIndicatorsWidget$1(_ref) {
15812
15812
  withTooltip = false,
15813
15813
  title = "Key Indicators",
15814
15814
  noMinWidth = false,
15815
- children
15815
+ children,
15816
+ noTitle = false
15816
15817
  } = _ref;
15817
15818
  const component = /*#__PURE__*/jsxRuntime.jsxs(Widget, {
15818
15819
  loading: loading,
15819
15820
  className: formatClassname(["flex-1 with-border-header", widgetClassName]),
15820
- title: t(title),
15821
+ title: noTitle ? undefined : t(title),
15822
+ noTitle: noTitle,
15821
15823
  children: [children, /*#__PURE__*/jsxRuntime.jsx(Style$E, {
15822
15824
  className: formatClassname(["flex", className]),
15823
15825
  children: config.map((c, i) => /*#__PURE__*/jsxRuntime.jsxs("div", {
15824
15826
  className: "row-item",
15825
- children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
15827
+ children: [/*#__PURE__*/jsxRuntime.jsx(Label$1, {
15826
15828
  label: c.label,
15827
15829
  withTooltip: withTooltip
15828
15830
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -15839,7 +15841,7 @@ function KeyIndicatorsWidget$1(_ref) {
15839
15841
  }
15840
15842
  return component;
15841
15843
  }
15842
- function Label(_ref2) {
15844
+ function Label$1(_ref2) {
15843
15845
  let {
15844
15846
  label,
15845
15847
  withTooltip
@@ -18457,17 +18459,6 @@ const Style$z = dt.div`
18457
18459
  position: relative;
18458
18460
  width: 100%;
18459
18461
  height: 472px;
18460
- min-height: 300px;
18461
-
18462
- @media (max-width: 768px) {
18463
- height: 350px;
18464
- min-height: 250px;
18465
- }
18466
-
18467
- @media (max-width: 480px) {
18468
- height: 300px;
18469
- min-height: 200px;
18470
- }
18471
18462
 
18472
18463
  .filter-cont {
18473
18464
  position: absolute;
@@ -19312,11 +19303,6 @@ const useGlobe = ({
19312
19303
  }
19313
19304
  });
19314
19305
  setMapMarkers(newMarkers);
19315
-
19316
- // Resize the Mapbox GL JS map to ensure proper rendering after data changes
19317
- if (mapRef && mapRef.resize) {
19318
- mapRef.resize();
19319
- }
19320
19306
  }
19321
19307
  }, []);
19322
19308
  const createInstance = React.useCallback(() => {
@@ -19462,47 +19448,6 @@ const useGlobe = ({
19462
19448
  const instance = createInstance();
19463
19449
  if (instance) {
19464
19450
  setMapRef(instance);
19465
-
19466
- // Add comprehensive resize detection for Mapbox GL JS responsiveness
19467
- const handleResize = () => {
19468
- if (instance && instance.resize) {
19469
- // Add a small delay to ensure DOM has updated
19470
- setTimeout(() => {
19471
- instance.resize();
19472
- }, 100);
19473
- }
19474
- };
19475
-
19476
- // Listen to window resize
19477
- window.addEventListener('resize', handleResize);
19478
-
19479
- // Listen to container size changes using ResizeObserver
19480
- const resizeObserver = new ResizeObserver(() => {
19481
- handleResize();
19482
- });
19483
- if (container.current) {
19484
- resizeObserver.observe(container.current);
19485
- }
19486
-
19487
- // Store handlers for cleanup
19488
- instance._resizeHandler = handleResize;
19489
- instance._resizeObserver = resizeObserver;
19490
-
19491
- // Add IntersectionObserver to detect when globe becomes visible (handles sidenav scenarios)
19492
- const intersectionObserver = new IntersectionObserver(entries => {
19493
- entries.forEach(entry => {
19494
- if (entry.isIntersecting && instance && instance.resize) {
19495
- // Globe container is visible, force resize after a delay
19496
- setTimeout(() => {
19497
- instance.resize();
19498
- }, 200);
19499
- }
19500
- });
19501
- });
19502
- if (container.current) {
19503
- intersectionObserver.observe(container.current);
19504
- }
19505
- instance._intersectionObserver = intersectionObserver;
19506
19451
  } else {
19507
19452
  console.log('❌ [GLOBE HOOK] Failed to create map instance');
19508
19453
  }
@@ -19583,33 +19528,6 @@ const useGlobe = ({
19583
19528
  addAllDataToMap();
19584
19529
  }
19585
19530
  }, [data, mapRef, initialMarkerSetIsDone]);
19586
-
19587
- // Add effect to handle layout changes (like sidenav opening/closing)
19588
- React.useEffect(() => {
19589
- if (mapRef) {
19590
- // Force resize when component becomes visible or layout changes
19591
- const handleLayoutChange = () => {
19592
- if (mapRef && mapRef.resize) {
19593
- setTimeout(() => {
19594
- mapRef.resize();
19595
- }, 150);
19596
- }
19597
- };
19598
-
19599
- // Listen for visibility changes
19600
- document.addEventListener('visibilitychange', handleLayoutChange);
19601
-
19602
- // Listen for focus events (when user returns to tab)
19603
- window.addEventListener('focus', handleLayoutChange);
19604
-
19605
- // Store handlers for cleanup
19606
- mapRef._layoutChangeHandler = handleLayoutChange;
19607
- return () => {
19608
- document.removeEventListener('visibilitychange', handleLayoutChange);
19609
- window.removeEventListener('focus', handleLayoutChange);
19610
- };
19611
- }
19612
- }, [mapRef]);
19613
19531
  React.useEffect(() => {
19614
19532
  if (activeMarker && mapRef) {
19615
19533
  const marker = mapMarkers.find(m => m.data === activeMarker);
@@ -19625,21 +19543,6 @@ const useGlobe = ({
19625
19543
  return () => {
19626
19544
  isMounted.current = false;
19627
19545
 
19628
- // Cleanup window resize listener and ResizeObserver for Mapbox GL JS
19629
- if (mapRef && mapRef._resizeHandler) {
19630
- window.removeEventListener('resize', mapRef._resizeHandler);
19631
- }
19632
- if (mapRef && mapRef._resizeObserver) {
19633
- mapRef._resizeObserver.disconnect();
19634
- }
19635
- if (mapRef && mapRef._layoutChangeHandler) {
19636
- document.removeEventListener('visibilitychange', mapRef._layoutChangeHandler);
19637
- window.removeEventListener('focus', mapRef._layoutChangeHandler);
19638
- }
19639
- if (mapRef && mapRef._intersectionObserver) {
19640
- mapRef._intersectionObserver.disconnect();
19641
- }
19642
-
19643
19546
  // Defer unmounting to avoid race conditions
19644
19547
  const rootsToUnmount = [...roots.current];
19645
19548
  roots.current = [];
@@ -19655,7 +19558,7 @@ const useGlobe = ({
19655
19558
  });
19656
19559
  });
19657
19560
  };
19658
- }, [mapRef]);
19561
+ }, []);
19659
19562
 
19660
19563
  // Map control handlers
19661
19564
  const zoomHandler = React.useCallback(() => mapRef?.zoomIn(), [mapRef]);
@@ -19736,22 +19639,12 @@ const useGlobe = ({
19736
19639
  }),
19737
19640
  handler: moveDownHandler
19738
19641
  }], [zoomHandler, zoomOutHandler, recenterMap, moveUpHandler, moveDownHandler]);
19739
-
19740
- // Expose a manual resize method for external triggers
19741
- const forceResize = React.useCallback(() => {
19742
- if (mapRef && mapRef.resize) {
19743
- setTimeout(() => {
19744
- mapRef.resize();
19745
- }, 100);
19746
- }
19747
- }, [mapRef]);
19748
19642
  return {
19749
19643
  container,
19750
19644
  activeMarker,
19751
19645
  mapOptionsButtonsConfig,
19752
19646
  emptyStateIsVisible,
19753
- setEmptyStateIsVisible,
19754
- forceResize
19647
+ setEmptyStateIsVisible
19755
19648
  };
19756
19649
  };
19757
19650
 
@@ -19799,8 +19692,7 @@ function Globe(_ref) {
19799
19692
  const {
19800
19693
  container,
19801
19694
  activeMarker,
19802
- mapOptionsButtonsConfig,
19803
- forceResize
19695
+ mapOptionsButtonsConfig
19804
19696
  } = useGlobe({
19805
19697
  data: mappedData,
19806
19698
  user,
@@ -19827,17 +19719,6 @@ function Globe(_ref) {
19827
19719
  React.useEffect(() => {
19828
19720
  onRender === null || onRender === void 0 || onRender();
19829
19721
  }, [onRender]);
19830
-
19831
- // Force resize when component becomes visible (handles sidenav open/close scenarios)
19832
- React.useEffect(() => {
19833
- if (forceResize) {
19834
- // Trigger resize after component mounts
19835
- const timer = setTimeout(() => {
19836
- forceResize();
19837
- }, 300);
19838
- return () => clearTimeout(timer);
19839
- }
19840
- }, [forceResize]);
19841
19722
  return /*#__PURE__*/jsxRuntime.jsx(ComponentWithFocus, {
19842
19723
  children: /*#__PURE__*/jsxRuntime.jsxs(Style$z, {
19843
19724
  className: formatClassname([showSider && activeMarker && "with-sider"]),
@@ -20231,7 +20112,7 @@ const DetailsSection = _ref => {
20231
20112
  });
20232
20113
  };
20233
20114
 
20234
- const KEYS = {
20115
+ const SDG_KEYS = {
20235
20116
  NO_POVERTY: "noPoverty",
20236
20117
  ZERO_HUNGER: "zeroHunger",
20237
20118
  GOOD_HEALTH_WELL_BEING: "goodHealthWellbeing",
@@ -20250,75 +20131,146 @@ const KEYS = {
20250
20131
  PEACE_JUSTICE_STRONG_INSTITUTIONS: "peaceJusticeStrongInstitutions",
20251
20132
  PARTNERSHIPS_FOR_GOALS: "partnershipsForGoals"
20252
20133
  };
20134
+ const SDG_IMAGES = {
20135
+ [SDG_KEYS.NO_POVERTY]: {
20136
+ img: "/SDGs/SDGs.svg",
20137
+ disabled: "/SDGs/SDGs-17.svg"
20138
+ },
20139
+ [SDG_KEYS.ZERO_HUNGER]: {
20140
+ img: "/SDGs/SDGs-1.svg",
20141
+ disabled: "/SDGs/SDGs-18.svg"
20142
+ },
20143
+ [SDG_KEYS.GOOD_HEALTH_WELL_BEING]: {
20144
+ img: "/SDGs/SDGs-2.svg",
20145
+ disabled: "/SDGs/SDGs-19.svg"
20146
+ },
20147
+ [SDG_KEYS.QUALITY_EDUCATION]: {
20148
+ img: "/SDGs/SDGs-3.svg",
20149
+ disabled: "/SDGs/SDGs-20.svg"
20150
+ },
20151
+ [SDG_KEYS.GENDER_EQUALITY]: {
20152
+ img: "/SDGs/SDGs-4.svg",
20153
+ disabled: "/SDGs/SDGs-21.svg"
20154
+ },
20155
+ [SDG_KEYS.CLEAN_WATER_SANITATION]: {
20156
+ img: "/SDGs/SDGs-5.svg",
20157
+ disabled: "/SDGs/SDGs-22.svg"
20158
+ },
20159
+ [SDG_KEYS.AFFORDABLE_CLEAN_ENERGY]: {
20160
+ img: "/SDGs/SDGs-6.svg",
20161
+ disabled: "/SDGs/SDGs-23.svg"
20162
+ },
20163
+ [SDG_KEYS.DECENT_WORK_ECONOMIC_GROWTH]: {
20164
+ img: "/SDGs/SDGs-7.svg",
20165
+ disabled: "/SDGs/SDGs-24.svg"
20166
+ },
20167
+ [SDG_KEYS.INDUSTRY_INNOVATION_INFRASTRUCTURE]: {
20168
+ img: "/SDGs/SDGs-8.svg",
20169
+ disabled: "/SDGs/SDGs-25.svg"
20170
+ },
20171
+ [SDG_KEYS.REDUCED_INEQUALITIES]: {
20172
+ img: "/SDGs/SDGs-9.svg",
20173
+ disabled: "/SDGs/SDGs-26.svg"
20174
+ },
20175
+ [SDG_KEYS.SUSTAINABLE_CITIES_COMMUNITIES]: {
20176
+ img: "/SDGs/SDGs-10.svg",
20177
+ disabled: "/SDGs/SDGs-27.svg"
20178
+ },
20179
+ [SDG_KEYS.RESPONSIBLE_CONSUMPTION_PRODUCTION]: {
20180
+ img: "/SDGs/SDGs-11.svg",
20181
+ disabled: "/SDGs/SDGs-29.svg"
20182
+ },
20183
+ [SDG_KEYS.CLIMATE_ACTION]: {
20184
+ img: "/SDGs/SDGs-12.svg",
20185
+ disabled: "/SDGs/SDGs-30.svg"
20186
+ },
20187
+ [SDG_KEYS.LIFE_BELOW_WATER]: {
20188
+ img: "/SDGs/SDGs-13.svg",
20189
+ disabled: "/SDGs/SDGs-31.svg"
20190
+ },
20191
+ [SDG_KEYS.LIFE_ON_LAND]: {
20192
+ img: "/SDGs/SDGs-14.svg",
20193
+ disabled: "/SDGs/SDGs-32.svg"
20194
+ },
20195
+ [SDG_KEYS.PEACE_JUSTICE_STRONG_INSTITUTIONS]: {
20196
+ img: "/SDGs/SDGs-15.svg",
20197
+ disabled: "/SDGs/SDGs-33.svg"
20198
+ },
20199
+ [SDG_KEYS.PARTNERSHIPS_FOR_GOALS]: {
20200
+ img: "/SDGs/SDGs-16.svg",
20201
+ disabled: "/SDGs/SDGs-34.svg"
20202
+ }
20203
+ };
20204
+
20253
20205
  const getGoalConfig = () => {
20254
20206
  return [{
20255
20207
  img: "/SDGs/SDGs.svg",
20256
- key: KEYS.NO_POVERTY,
20257
- disabled: "/SDGs/SDGs-17.svg"
20208
+ key: SDG_KEYS.NO_POVERTY,
20209
+ disabled: "./SDGs/SDGs-17.svg"
20258
20210
  }, {
20259
20211
  img: "/SDGs/SDGs-1.svg",
20260
- key: KEYS.ZERO_HUNGER,
20261
- disabled: "/SDGs/SDGs-18.svg"
20212
+ key: SDG_KEYS.ZERO_HUNGER,
20213
+ disabled: "./SDGs/SDGs-18.svg"
20262
20214
  }, {
20263
20215
  img: "/SDGs/SDGs-2.svg",
20264
- key: KEYS.GOOD_HEALTH_WELL_BEING,
20216
+ key: SDG_KEYS.GOOD_HEALTH_WELL_BEING,
20265
20217
  disabled: "/SDGs/SDGs-19.svg"
20266
20218
  }, {
20267
20219
  img: "/SDGs/SDGs-3.svg",
20268
- key: KEYS.QUALITY_EDUCATION,
20220
+ key: SDG_KEYS.QUALITY_EDUCATION,
20269
20221
  disabled: "/SDGs/SDGs-20.svg"
20270
20222
  }, {
20271
20223
  img: "/SDGs/SDGs-4.svg",
20272
- key: KEYS.GENDER_EQUALITY,
20224
+ key: SDG_KEYS.GENDER_EQUALITY,
20273
20225
  disabled: "/SDGs/SDGs-21.svg"
20274
20226
  }, {
20275
20227
  img: "/SDGs/SDGs-5.svg",
20276
- key: KEYS.CLEAN_WATER_SANITATION,
20228
+ key: SDG_KEYS.CLEAN_WATER_SANITATION,
20277
20229
  disabled: "/SDGs/SDGs-22.svg"
20278
20230
  }, {
20279
20231
  img: "/SDGs/SDGs-6.svg",
20280
- key: KEYS.AFFORDABLE_CLEAN_ENERGY,
20232
+ key: SDG_KEYS.AFFORDABLE_CLEAN_ENERGY,
20281
20233
  disabled: "/SDGs/SDGs-23.svg"
20282
20234
  }, {
20283
20235
  img: "/SDGs/SDGs-7.svg",
20284
- key: KEYS.DECENT_WORK_ECONOMIC_GROWTH,
20236
+ key: SDG_KEYS.DECENT_WORK_ECONOMIC_GROWTH,
20285
20237
  disabled: "/SDGs/SDGs-24.svg"
20286
20238
  }, {
20287
20239
  img: "/SDGs/SDGs-8.svg",
20288
- key: KEYS.INDUSTRY_INNOVATION_INFRASTRUCTURE,
20240
+ key: SDG_KEYS.INDUSTRY_INNOVATION_INFRASTRUCTURE,
20289
20241
  disabled: "/SDGs/SDGs-25.svg"
20290
20242
  }, {
20291
20243
  img: "/SDGs/SDGs-9.svg",
20292
- key: KEYS.REDUCED_INEQUALITIES,
20244
+ key: SDG_KEYS.REDUCED_INEQUALITIES,
20293
20245
  disabled: "/SDGs/SDGs-26.svg"
20294
20246
  }, {
20295
20247
  img: "/SDGs/SDGs-10.svg",
20296
- key: KEYS.PARTNERSHIPS_FOR_GOALS,
20248
+ key: SDG_KEYS.PARTNERSHIPS_FOR_GOALS,
20297
20249
  disabled: "/SDGs/SDGs-27.svg"
20298
20250
  }, {
20299
20251
  img: "/SDGs/SDGs-11.svg",
20300
- key: KEYS.SUSTAINABLE_CITIES_COMMUNITIES,
20252
+ key: SDG_KEYS.SUSTAINABLE_CITIES_COMMUNITIES,
20301
20253
  disabled: "/SDGs/SDGs-28.svg"
20302
20254
  }, {
20303
20255
  img: "/SDGs/SDGs-12.svg",
20304
- key: KEYS.RESPONSIBLE_CONSUMPTION_PRODUCTION,
20256
+ key: SDG_KEYS.RESPONSIBLE_CONSUMPTION_PRODUCTION,
20305
20257
  disabled: "/SDGs/SDGs-29.svg"
20306
20258
  }, {
20307
20259
  img: "/SDGs/SDGs-13.svg",
20308
- key: KEYS.CLIMATE_ACTION,
20260
+ key: SDG_KEYS.CLIMATE_ACTION,
20309
20261
  disabled: "/SDGs/SDGs-30.svg"
20310
20262
  }, {
20311
20263
  img: "/SDGs/SDGs-14.svg",
20312
- key: KEYS.LIFE_BELOW_WATER,
20264
+ key: SDG_KEYS.LIFE_BELOW_WATER,
20313
20265
  disabled: "/SDGs/SDGs-31.svg"
20314
20266
  }, {
20315
20267
  img: "/SDGs/SDGs-15.svg",
20316
- key: KEYS.LIFE_ON_LAND,
20268
+ key: SDG_KEYS.LIFE_ON_LAND,
20317
20269
  disabled: "/SDGs/SDGs-32.svg"
20318
20270
  }, {
20319
20271
  img: "/SDGs/SDGs-16.svg",
20320
20272
  disabled: "/SDGs/SDGs-33.svg",
20321
- key: KEYS.PEACE_JUSTICE_STRONG_INSTITUTIONS
20273
+ key: SDG_KEYS.PEACE_JUSTICE_STRONG_INSTITUTIONS
20322
20274
  }];
20323
20275
  };
20324
20276
 
@@ -20348,7 +20300,150 @@ function SDGWidget(_ref) {
20348
20300
  })
20349
20301
  }));
20350
20302
  }
20351
- 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"])));
20303
+ const SDGContainer = dt.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(100px, 1fr));\n\tgap: 8px;\n\n\t.sdg-item {\n\t\theight: 100px;\n\t\twidth: 100px;\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"])));
20304
+
20305
+ const ImageContainer = dt.div`
20306
+ overflow: hidden;
20307
+ position: relative;
20308
+
20309
+ .image {
20310
+ width: 100%;
20311
+ height: 151px;
20312
+ background-size: cover;
20313
+ background-position: center;
20314
+ background-repeat: no-repeat;
20315
+
20316
+ border-bottom-left-radius: 3px;
20317
+ border-bottom-right-radius: 3px;
20318
+ }
20319
+
20320
+ .icon-container {
20321
+ position: absolute;
20322
+ top: 10px;
20323
+ right: 10px;
20324
+ background: white;
20325
+ padding: 10px;
20326
+ border-radius: 6px;
20327
+ cursor: pointer;
20328
+ }
20329
+ `;
20330
+ const ProjectWidgetItems = dt.ul`
20331
+ list-style: none;
20332
+ padding: 0;
20333
+ padding-top: 10px;
20334
+ margin: 0;
20335
+
20336
+ .project-widget-item {
20337
+ display: flex;
20338
+ justify-content: space-between;
20339
+ align-items: center;
20340
+ border-bottom: 1px solid var(--base-gray-30);
20341
+ padding: 10px 0;
20342
+
20343
+ &:last-of-type {
20344
+ border-bottom: 0;
20345
+ }
20346
+ }
20347
+ `;
20348
+ const SDGList = dt.ul`
20349
+ list-style: none;
20350
+ padding: 0;
20351
+ display: flex;
20352
+ flex-wrap: wrap;
20353
+ gap: 4px;
20354
+ margin: 0;
20355
+
20356
+ .sdg-item-image {
20357
+ width: 24px;
20358
+ height: 24px;
20359
+ background-size: cover;
20360
+ background-position: center;
20361
+ background-repeat: no-repeat;
20362
+ }
20363
+ `;
20364
+ const Label = dt.span`
20365
+ font-family: SF UI Display;
20366
+ font-weight: 500;
20367
+ font-style: Medium;
20368
+ font-size: 14px;
20369
+ leading-trim: NONE;
20370
+ line-height: 26px;
20371
+ letter-spacing: 0%;
20372
+ color: #6c737f;
20373
+ `;
20374
+
20375
+ const {
20376
+ Meta
20377
+ } = antd.Card;
20378
+ function ProjectWidget(_ref) {
20379
+ let {
20380
+ title,
20381
+ description,
20382
+ onLinkClick,
20383
+ image,
20384
+ linkIcon = "Link",
20385
+ sdgList,
20386
+ items,
20387
+ hideSDGList = false,
20388
+ t = x => x
20389
+ } = _ref;
20390
+ return /*#__PURE__*/jsxRuntime.jsxs(antd.Card, {
20391
+ style: {
20392
+ flex: 1
20393
+ },
20394
+ cover: /*#__PURE__*/jsxRuntime.jsxs(ImageContainer, {
20395
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
20396
+ className: "image",
20397
+ style: {
20398
+ backgroundImage: "url(".concat(image, ")")
20399
+ }
20400
+ }), onLinkClick && /*#__PURE__*/jsxRuntime.jsx("div", {
20401
+ className: "icon-container",
20402
+ onClick: onLinkClick,
20403
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
20404
+ name: linkIcon,
20405
+ width: 16,
20406
+ height: 16,
20407
+ color: "black"
20408
+ })
20409
+ })]
20410
+ }),
20411
+ children: [/*#__PURE__*/jsxRuntime.jsx(Meta, {
20412
+ title: title || undefined,
20413
+ description: description || undefined
20414
+ }), /*#__PURE__*/jsxRuntime.jsx(ProjectWidgetItems, {
20415
+ children: items.map((item, index) => /*#__PURE__*/jsxRuntime.jsxs("li", {
20416
+ className: "project-widget-item",
20417
+ children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
20418
+ children: item.label
20419
+ }), item.render()]
20420
+ }, index))
20421
+ }), !hideSDGList && /*#__PURE__*/jsxRuntime.jsxs("div", {
20422
+ style: {
20423
+ borderTop: "1px solid var(--base-gray-30)",
20424
+ paddingTop: "10px"
20425
+ },
20426
+ children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
20427
+ children: "SDGs:"
20428
+ }), /*#__PURE__*/jsxRuntime.jsx(SDGList, {
20429
+ children: sdgList.map((sdg, index) => {
20430
+ return /*#__PURE__*/jsxRuntime.jsx("li", {
20431
+ className: "project-widget-item",
20432
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
20433
+ title: t("SDGS::".concat(sdg)),
20434
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
20435
+ style: {
20436
+ backgroundImage: "url(".concat(SDG_IMAGES[sdg].img, ")")
20437
+ },
20438
+ className: "sdg-item-image"
20439
+ })
20440
+ })
20441
+ }, index);
20442
+ })
20443
+ })]
20444
+ })]
20445
+ });
20446
+ }
20352
20447
 
20353
20448
  var Style$w = dt.div`
20354
20449
  border: 1px solid var(--base-gray-40);
@@ -59700,6 +59795,7 @@ exports.ProjectVisualisationAlert = Alert;
59700
59795
  exports.ProjectVisualisationFooter = Footer;
59701
59796
  exports.ProjectVisualisationHeader = Header;
59702
59797
  exports.ProjectVisualisationSelect = CustomSelect;
59798
+ exports.ProjectWidget = ProjectWidget;
59703
59799
  exports.RadarChart = RadarChart;
59704
59800
  exports.RadialBarChart = RadialBarChart;
59705
59801
  exports.SDGWidget = SDGWidget;
@@ -6015,7 +6015,7 @@ const userHasInterface = (user, app, intf) => {
6015
6015
  };
6016
6016
 
6017
6017
  const en = {
6018
- "Description": "Description",
6018
+ Description: "Description",
6019
6019
  "missing-inputs": "Missing Inputs",
6020
6020
  "all-inputs-fullfilled": "All inputs in this section are fullfilled",
6021
6021
  "information-unavailable": "Information unavailable",
@@ -6031,7 +6031,7 @@ const en = {
6031
6031
  "subject-deleted-successfully": "Subject removed successfully",
6032
6032
  "information-submitted-successfully": "Information submitted successfully."
6033
6033
  },
6034
- "noValueIdentified": " {{value}} ",
6034
+ noValueIdentified: " {{value}} ",
6035
6035
  errors: {
6036
6036
  "please-correct-invalid-inputs": "Please correct invalid inputs",
6037
6037
  "field should not include special characters": "Field should not include special characters",
@@ -6603,7 +6603,7 @@ const en = {
6603
6603
  "Invite Participant": "Invite Participant",
6604
6604
  "Invite Information Source": "Invite Information Source",
6605
6605
  "Edit Project": "Edit Project",
6606
- "ProjectType": "Project",
6606
+ ProjectType: "Project",
6607
6607
  Network: "Network",
6608
6608
  "In Progress": "In Progress",
6609
6609
  Villages: "Villages",
@@ -6954,7 +6954,7 @@ const en = {
6954
6954
  lastUpdate: "Last update"
6955
6955
  },
6956
6956
  Position: "Position",
6957
- "Project": "Project",
6957
+ Project: "Project",
6958
6958
  ProjectDetails: {
6959
6959
  "Grievance Mechanism Summary": "Grievance Mechanism Summary",
6960
6960
  "Supply Chain Policy Summary": "Supply Chain Policy Summary"
@@ -6976,7 +6976,24 @@ const en = {
6976
6976
  14: "Life Below Water",
6977
6977
  15: "Life on Land",
6978
6978
  16: "Peace and Justice Strong Institutions",
6979
- 17: "Partnerships to achieve the Goal"
6979
+ 17: "Partnerships to achieve the Goal",
6980
+ noPoverty: "No Poverty",
6981
+ zeroHunger: "Zero Hunger",
6982
+ goodHealthWellbeing: "Good Health and Well-being",
6983
+ qualityEducation: "Quality Education",
6984
+ genderEquality: "Gender Equality",
6985
+ cleanWaterSanitation: "Clean Water and Sanitation",
6986
+ affordableCleanEnergy: "Affordable and Clean Energy",
6987
+ decentWorkEconomicGrowth: "Decent Work and Economic Growth",
6988
+ industryInnovationInfrastructure: "Industry, Innovation and Infrastructure",
6989
+ reducedInequalities: "Reduced Inequality",
6990
+ sustainableCitiesCommunities: "Sustainable Cities and Communities",
6991
+ responsibleConsumptionProduction: "Responsible Consumption and Production",
6992
+ climateAction: "Climate Action",
6993
+ lifeBelowWater: "Life Below Water",
6994
+ lifeOnLand: "Life on Land",
6995
+ peaceJusticeStrongInstitutions: "Peace and Justice Strong Institutions",
6996
+ partnershipsForGoals: "Partnerships to achieve the Goal"
6980
6997
  },
6981
6998
  mmtDesc: "The MMT app is freely accessible to all mining and mineral trade stakeholders. It provides an open, collaborative framework for supply chain due diligence and risk management.",
6982
6999
  tifDesc: "An advanced information management system for the ASM sector, developed by The Impact Facility. Kustawi tracks the improvement of mining operations against ESG standards and facilitates access to equipment financing.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.147",
3
+ "version": "0.6.148",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",