datastake-daf 0.6.111 → 0.6.112
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/.vscode/settings.json +13 -0
- package/dist/components/index.js +159 -36
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Widget/SDGWidget/SDGWidget.stories.jsx +19 -1
- package/src/@daf/core/components/Dashboard/Widget/SDGWidget/config.js +32 -66
- package/src/@daf/core/components/Dashboard/Widget/SDGWidget/index.jsx +42 -43
- package/src/index.js +6 -8
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-1.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-10.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-11.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-12.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-13.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-14.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-15.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-16.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-17.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-18.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-19.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-2.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-20.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-21.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-22.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-23.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-24.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-25.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-26.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-27.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-28.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-29.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-3.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-30.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-31.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-32.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-33.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-4.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-5.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-6.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-7.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-8.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs-9.svg +0 -0
- /package/{src/@daf/core/components/Dashboard/Widget/SDGWidget → public}/SDGs/SDGs.svg +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cSpell.words": ["cukura"],
|
|
3
|
+
"files.autoSave": "afterDelay",
|
|
4
|
+
"editor.wordWrap": "on",
|
|
5
|
+
"editor.autoClosingBrackets": "always",
|
|
6
|
+
"editor.autoClosingComments": "always",
|
|
7
|
+
"editor.autoClosingQuotes": "always",
|
|
8
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
9
|
+
"editor.formatOnPaste": true,
|
|
10
|
+
"editor.formatOnSave": true,
|
|
11
|
+
"notebook.defaultFormatter": "esbenp.prettier-vscode",
|
|
12
|
+
"javascript.format.semicolons": "insert"
|
|
13
|
+
}
|
package/dist/components/index.js
CHANGED
|
@@ -3065,7 +3065,7 @@ const config$3 = {
|
|
|
3065
3065
|
Integration: config$4
|
|
3066
3066
|
};
|
|
3067
3067
|
|
|
3068
|
-
const _excluded$
|
|
3068
|
+
const _excluded$p = ["width", "height", "size", "name", "fill"];
|
|
3069
3069
|
const CustomIcon = _ref => {
|
|
3070
3070
|
let {
|
|
3071
3071
|
width = 14,
|
|
@@ -3074,7 +3074,7 @@ const CustomIcon = _ref => {
|
|
|
3074
3074
|
name = "",
|
|
3075
3075
|
fill = "none"
|
|
3076
3076
|
} = _ref,
|
|
3077
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3077
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
3078
3078
|
const conf = config$3[name];
|
|
3079
3079
|
if (conf) {
|
|
3080
3080
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -9276,7 +9276,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
9276
9276
|
!function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
|
|
9277
9277
|
});
|
|
9278
9278
|
|
|
9279
|
-
const _excluded$
|
|
9279
|
+
const _excluded$o = ["view", "module", "scope", "form", "meta"];
|
|
9280
9280
|
dayjs__default["default"].extend(customParseFormat);
|
|
9281
9281
|
dayjs__default["default"].extend(utc);
|
|
9282
9282
|
dayjs__default["default"].extend(utc);
|
|
@@ -9650,7 +9650,7 @@ const filterCreateData = data => {
|
|
|
9650
9650
|
form,
|
|
9651
9651
|
meta
|
|
9652
9652
|
} = data,
|
|
9653
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
9653
|
+
rest = _objectWithoutProperties(data, _excluded$o);
|
|
9654
9654
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
9655
9655
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
9656
9656
|
meta: _meta
|
|
@@ -10035,7 +10035,7 @@ SelectFilters.propTypes = {
|
|
|
10035
10035
|
apiUrl: PropTypes__default["default"].string
|
|
10036
10036
|
};
|
|
10037
10037
|
|
|
10038
|
-
const _excluded$
|
|
10038
|
+
const _excluded$n = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
|
|
10039
10039
|
function DAFTable(_ref) {
|
|
10040
10040
|
let {
|
|
10041
10041
|
columns = [],
|
|
@@ -10066,7 +10066,7 @@ function DAFTable(_ref) {
|
|
|
10066
10066
|
app,
|
|
10067
10067
|
doEmptyRows
|
|
10068
10068
|
} = _ref,
|
|
10069
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10069
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
10070
10070
|
const [source, setSource] = React.useState([]);
|
|
10071
10071
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
10072
10072
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -10788,7 +10788,7 @@ Pagination.propTypes = {
|
|
|
10788
10788
|
isMobile: PropTypes__default["default"].bool
|
|
10789
10789
|
};
|
|
10790
10790
|
|
|
10791
|
-
const _excluded$
|
|
10791
|
+
const _excluded$m = ["size", "maxHeight", "dataSource", "columns", "pagination"];
|
|
10792
10792
|
function StickyTable(_ref) {
|
|
10793
10793
|
let {
|
|
10794
10794
|
size = null,
|
|
@@ -10797,7 +10797,7 @@ function StickyTable(_ref) {
|
|
|
10797
10797
|
columns = {},
|
|
10798
10798
|
pagination = false
|
|
10799
10799
|
} = _ref,
|
|
10800
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10800
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
10801
10801
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
10802
10802
|
className: "daf-sticky-table",
|
|
10803
10803
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Table, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -11489,12 +11489,12 @@ const Style$H = dt.div`
|
|
|
11489
11489
|
}
|
|
11490
11490
|
`;
|
|
11491
11491
|
|
|
11492
|
-
const _excluded$
|
|
11492
|
+
const _excluded$l = ["children"];
|
|
11493
11493
|
const BorderedButton = _ref => {
|
|
11494
11494
|
let {
|
|
11495
11495
|
children
|
|
11496
11496
|
} = _ref,
|
|
11497
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11497
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
11498
11498
|
return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
|
|
11499
11499
|
className: "d-btn-cont",
|
|
11500
11500
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -11503,7 +11503,7 @@ const BorderedButton = _ref => {
|
|
|
11503
11503
|
});
|
|
11504
11504
|
};
|
|
11505
11505
|
|
|
11506
|
-
var _templateObject$
|
|
11506
|
+
var _templateObject$c;
|
|
11507
11507
|
const variantConfig = {
|
|
11508
11508
|
default: {
|
|
11509
11509
|
className: "default-badge",
|
|
@@ -11621,7 +11621,7 @@ function Badge(_ref) {
|
|
|
11621
11621
|
})
|
|
11622
11622
|
});
|
|
11623
11623
|
}
|
|
11624
|
-
const Style$G = dt.div(_templateObject$
|
|
11624
|
+
const Style$G = dt.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
|
|
11625
11625
|
Badge.propTypes = {
|
|
11626
11626
|
children: PropTypes__default["default"].node,
|
|
11627
11627
|
className: PropTypes__default["default"].string,
|
|
@@ -11634,12 +11634,12 @@ Badge.propTypes = {
|
|
|
11634
11634
|
props: PropTypes__default["default"].object
|
|
11635
11635
|
};
|
|
11636
11636
|
|
|
11637
|
-
const _excluded$
|
|
11637
|
+
const _excluded$k = ["icon"];
|
|
11638
11638
|
function GetIcon(_ref) {
|
|
11639
11639
|
let {
|
|
11640
11640
|
icon
|
|
11641
11641
|
} = _ref,
|
|
11642
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11642
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
11643
11643
|
let Icon = Icons__namespace.CloseOutlined;
|
|
11644
11644
|
if (Icons__namespace[icon]) {
|
|
11645
11645
|
Icon = Icons__namespace[icon];
|
|
@@ -11961,7 +11961,7 @@ GoToSelect.propTypes = {
|
|
|
11961
11961
|
t: PropTypes__default["default"].func
|
|
11962
11962
|
};
|
|
11963
11963
|
|
|
11964
|
-
const _excluded$
|
|
11964
|
+
const _excluded$j = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
11965
11965
|
const {
|
|
11966
11966
|
useToken: useToken$i
|
|
11967
11967
|
} = antd.theme;
|
|
@@ -12054,7 +12054,7 @@ function Multiselect(_ref) {
|
|
|
12054
12054
|
isSingle = false,
|
|
12055
12055
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
12056
12056
|
} = _ref,
|
|
12057
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12057
|
+
restProps = _objectWithoutProperties(_ref, _excluded$j);
|
|
12058
12058
|
const {
|
|
12059
12059
|
token
|
|
12060
12060
|
} = useToken$i();
|
|
@@ -12721,7 +12721,7 @@ DAFHeader.propTypes = {
|
|
|
12721
12721
|
downloadDisabled: PropTypes__default["default"].any
|
|
12722
12722
|
};
|
|
12723
12723
|
|
|
12724
|
-
const _excluded$
|
|
12724
|
+
const _excluded$i = ["tabs", "onChange", "value", "className"];
|
|
12725
12725
|
function TabsHeader(_ref) {
|
|
12726
12726
|
let {
|
|
12727
12727
|
tabs = [],
|
|
@@ -12729,7 +12729,7 @@ function TabsHeader(_ref) {
|
|
|
12729
12729
|
value = '',
|
|
12730
12730
|
className = 'mt-2'
|
|
12731
12731
|
} = _ref,
|
|
12732
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12732
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
12733
12733
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
12734
12734
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
12735
12735
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -12826,7 +12826,7 @@ DrawerHeader.propTypes = {
|
|
|
12826
12826
|
tabsConfig: PropTypes__default["default"].any
|
|
12827
12827
|
};
|
|
12828
12828
|
|
|
12829
|
-
const _excluded$
|
|
12829
|
+
const _excluded$h = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
12830
12830
|
const useFooter = _ref => {
|
|
12831
12831
|
let {
|
|
12832
12832
|
leftContent,
|
|
@@ -12861,7 +12861,7 @@ const useFooter = _ref => {
|
|
|
12861
12861
|
style = {},
|
|
12862
12862
|
className = ""
|
|
12863
12863
|
} = button,
|
|
12864
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
12864
|
+
restProps = _objectWithoutProperties(button, _excluded$h);
|
|
12865
12865
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
12866
12866
|
content: label,
|
|
12867
12867
|
type: type,
|
|
@@ -12888,8 +12888,8 @@ const useFooter = _ref => {
|
|
|
12888
12888
|
};
|
|
12889
12889
|
};
|
|
12890
12890
|
|
|
12891
|
-
var _templateObject$
|
|
12892
|
-
const FooterContainer = dt.div(_templateObject$
|
|
12891
|
+
var _templateObject$b;
|
|
12892
|
+
const FooterContainer = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\t.daf-footer {\n\t\tbackground: #ffffff;\n\t\tborder-top: 1px solid #e8e8e8;\n\t\tborder-left: none;\n\t\tborder-right: none;\n\t\tborder-bottom: none;\n\t\tborder-radius: 0;\n\t\tpadding: 24px;\n\t\tmargin: 0;\n\t\tbox-shadow: none;\n\t\tz-index: 100;\n\t\tposition: relative;\n\t\tmin-height: 80px;\n\n\t\t&.daf-footer-fixed {\n\t\t\tposition: fixed;\n\t\t\tbottom: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tz-index: 1000;\n\t\t}\n\n\t\t.daf-footer-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmin-height: 32px;\n\n\t\t\t.daf-footer-left {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\n\t\t\t.daf-footer-center {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\t.daf-footer-right {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-end;\n\t\t\t\tgap: 12px;\n\n\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t.ant-btn {\n\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\tpadding: 0 24px;\n\t\t\t\t\t\tborder-radius: 6px;\n\t\t\t\t\t\tfont-weight: 500;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\ttransition: all 0.3s ease;\n\t\t\t\t\t\tborder: 1px solid transparent;\n\n\t\t\t\t\t\t&.ant-btn-primary {\n\t\t\t\t\t\t\tbackground-color: var(--color-primary-70);\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-60);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-60);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-default {\n\t\t\t\t\t\t\tbackground: #ffffff;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-ghost {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t\tbackground: rgba(0, 0, 0, 0.02);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Responsive design */\n\t@media (max-width: 768px) {\n\t\t.daf-footer {\n\t\t\tmargin: 0;\n\t\t\tpadding: 16px;\n\n\t\t\t.daf-footer-content {\n\t\t\t\tflex-direction: column;\n\t\t\t\tgap: 16px;\n\t\t\t\talign-items: stretch;\n\n\t\t\t\t.daf-footer-left,\n\t\t\t\t.daf-footer-center,\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\tflex: none;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* App-specific styling */\n\t&.sbg-app {\n\t\t.daf-footer {\n\t\t\tbackground: #f8f9fa;\n\t\t\tborder-color: #e9ecef;\n\t\t}\n\t}\n\n\t&.nashiriki-app {\n\t\t.daf-footer {\n\t\t\tbackground: #fff;\n\t\t\tborder-color: #d9d9d9;\n\t\t}\n\t}\n"])));
|
|
12893
12893
|
|
|
12894
12894
|
function DAFFooter(_ref) {
|
|
12895
12895
|
let {
|
|
@@ -15330,7 +15330,7 @@ Widget.propTypes = {
|
|
|
15330
15330
|
onExpandChange: PropTypes__default["default"].func
|
|
15331
15331
|
};
|
|
15332
15332
|
|
|
15333
|
-
const _excluded$
|
|
15333
|
+
const _excluded$g = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText"];
|
|
15334
15334
|
function ImageWidget(_ref) {
|
|
15335
15335
|
let {
|
|
15336
15336
|
loading = false,
|
|
@@ -15340,7 +15340,7 @@ function ImageWidget(_ref) {
|
|
|
15340
15340
|
imgAlt,
|
|
15341
15341
|
noDescriptionText
|
|
15342
15342
|
} = _ref,
|
|
15343
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15343
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
15344
15344
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
15345
15345
|
loading: loading,
|
|
15346
15346
|
title: title,
|
|
@@ -15396,8 +15396,8 @@ function ImageWidget(_ref) {
|
|
|
15396
15396
|
}));
|
|
15397
15397
|
}
|
|
15398
15398
|
|
|
15399
|
-
var _templateObject$
|
|
15400
|
-
const _excluded$
|
|
15399
|
+
var _templateObject$a;
|
|
15400
|
+
const _excluded$f = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
15401
15401
|
function FlowWidget(_ref) {
|
|
15402
15402
|
let {
|
|
15403
15403
|
title,
|
|
@@ -15409,7 +15409,7 @@ function FlowWidget(_ref) {
|
|
|
15409
15409
|
className,
|
|
15410
15410
|
direction = "horizontal"
|
|
15411
15411
|
} = _ref,
|
|
15412
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15412
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
15413
15413
|
const [activeTab, setActiveTab] = React.useState();
|
|
15414
15414
|
React.useEffect(() => {
|
|
15415
15415
|
if (defaultActiveTab) {
|
|
@@ -15546,7 +15546,7 @@ function Icon(_ref2) {
|
|
|
15546
15546
|
return icon(status);
|
|
15547
15547
|
}
|
|
15548
15548
|
}
|
|
15549
|
-
const Style$F = dt.div(_templateObject$
|
|
15549
|
+
const Style$F = dt.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\n\t::-webkit-scrollbar {\n\t\tdisplay: none;\n\t}\n\n\tscrollbar-width: none;\n\n\t-ms-overflow-style: none;\n\n\t@media (max-width: 532px) {\n\t\toverflow-x: hidden;\n\t}\n\n\t:where(.ant-steps-horizontal):not(.ant-steps-label-vertical) {\n\t\t.ant-steps-item-content {\n\t\t\twidth: 100%;\n\n\t\t\t.ant-steps-item-description {\n\t\t\t\tmin-width: 205px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n"])));
|
|
15550
15550
|
FlowWidget.propTypes = {
|
|
15551
15551
|
title: PropTypes__default["default"].string,
|
|
15552
15552
|
loading: PropTypes__default["default"].bool,
|
|
@@ -18094,8 +18094,8 @@ const useMap$1 = ({
|
|
|
18094
18094
|
};
|
|
18095
18095
|
};
|
|
18096
18096
|
|
|
18097
|
-
var _templateObject$
|
|
18098
|
-
const Style$B = dt.div(_templateObject$
|
|
18097
|
+
var _templateObject$9;
|
|
18098
|
+
const Style$B = dt.div(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral(["\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\n\t.p-placeholder {\n\t\tposition: absolute;\n\t\ttop: 0px;\n\t\tleft: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground: transparent;\n\t\tz-index: 100;\n\t}\n"])));
|
|
18099
18099
|
|
|
18100
18100
|
/**
|
|
18101
18101
|
* ComponentWithFocus
|
|
@@ -19985,14 +19985,14 @@ const MapConfig = ({
|
|
|
19985
19985
|
});
|
|
19986
19986
|
};
|
|
19987
19987
|
|
|
19988
|
-
const _excluded$
|
|
19988
|
+
const _excluded$e = ["config", "title", "loading"];
|
|
19989
19989
|
const Details = _ref => {
|
|
19990
19990
|
let {
|
|
19991
19991
|
config = [],
|
|
19992
19992
|
title,
|
|
19993
19993
|
loading = false
|
|
19994
19994
|
} = _ref,
|
|
19995
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19995
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
19996
19996
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
19997
19997
|
className: "with-border-header h-w-btn-header card",
|
|
19998
19998
|
loading: loading,
|
|
@@ -20008,14 +20008,14 @@ const Details = _ref => {
|
|
|
20008
20008
|
}));
|
|
20009
20009
|
};
|
|
20010
20010
|
|
|
20011
|
-
const _excluded$
|
|
20011
|
+
const _excluded$d = ["config", "title", "loading"];
|
|
20012
20012
|
const KeyIndicatorsDetails = _ref => {
|
|
20013
20013
|
let {
|
|
20014
20014
|
config,
|
|
20015
20015
|
title,
|
|
20016
20016
|
loading = false
|
|
20017
20017
|
} = _ref,
|
|
20018
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
20018
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
20019
20019
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
20020
20020
|
className: "with-border-header h-w-btn-header",
|
|
20021
20021
|
title: title,
|
|
@@ -20045,7 +20045,7 @@ const Style$x = dt.div`
|
|
|
20045
20045
|
}
|
|
20046
20046
|
`;
|
|
20047
20047
|
|
|
20048
|
-
const _excluded$
|
|
20048
|
+
const _excluded$c = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
20049
20049
|
const DetailsSection = _ref => {
|
|
20050
20050
|
let {
|
|
20051
20051
|
children,
|
|
@@ -20053,7 +20053,7 @@ const DetailsSection = _ref => {
|
|
|
20053
20053
|
detailsTitle,
|
|
20054
20054
|
firstColumnWidth = "250px"
|
|
20055
20055
|
} = _ref,
|
|
20056
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
20056
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
20057
20057
|
return /*#__PURE__*/jsxRuntime.jsx(Style$x, {
|
|
20058
20058
|
firstColumnWidth: firstColumnWidth,
|
|
20059
20059
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -20262,6 +20262,128 @@ function WidgetCatalogue(_ref2) {
|
|
|
20262
20262
|
});
|
|
20263
20263
|
}
|
|
20264
20264
|
|
|
20265
|
+
// SVG paths moved to public folder
|
|
20266
|
+
|
|
20267
|
+
const KEYS = {
|
|
20268
|
+
NO_POVERTY: "noPoverty",
|
|
20269
|
+
ZERO_HUNGER: "zeroHunger",
|
|
20270
|
+
GOOD_HEALTH_WELL_BEING: "goodHealthWellbeing",
|
|
20271
|
+
QUALITY_EDUCATION: "qualityEducation",
|
|
20272
|
+
GENDER_EQUALITY: "genderEquality",
|
|
20273
|
+
CLEAN_WATER_SANITATION: "cleanWaterSanitation",
|
|
20274
|
+
AFFORDABLE_CLEAN_ENERGY: "affordableCleanEnergy",
|
|
20275
|
+
DECENT_WORK_ECONOMIC_GROWTH: "decentWorkEconomicGrowth",
|
|
20276
|
+
INDUSTRY_INNOVATION_INFRASTRUCTURE: "industryInnovationInfrastructure",
|
|
20277
|
+
REDUCED_INEQUALITIES: "reducedInequalities",
|
|
20278
|
+
SUSTAINABLE_CITIES_COMMUNITIES: "sustainableCitiesCommunities",
|
|
20279
|
+
RESPONSIBLE_CONSUMPTION_PRODUCTION: "responsibleConsumptionProduction",
|
|
20280
|
+
CLIMATE_ACTION: "climateAction",
|
|
20281
|
+
LIFE_BELOW_WATER: "lifeBelowWater",
|
|
20282
|
+
LIFE_ON_LAND: "lifeOnLand",
|
|
20283
|
+
PEACE_JUSTICE_STRONG_INSTITUTIONS: "peaceJusticeStrongInstitutions",
|
|
20284
|
+
PARTNERSHIPS_FOR_GOALS: "partnershipsForGoals"
|
|
20285
|
+
};
|
|
20286
|
+
const getGoalConfig = () => {
|
|
20287
|
+
return [{
|
|
20288
|
+
img: "/SDGs/SDGs.svg",
|
|
20289
|
+
key: KEYS.NO_POVERTY,
|
|
20290
|
+
disabled: "/SDGs/SDGs-17.svg"
|
|
20291
|
+
}, {
|
|
20292
|
+
img: "/SDGs/SDGs-1.svg",
|
|
20293
|
+
key: KEYS.ZERO_HUNGER,
|
|
20294
|
+
disabled: "/SDGs/SDGs-18.svg"
|
|
20295
|
+
}, {
|
|
20296
|
+
img: "/SDGs/SDGs-2.svg",
|
|
20297
|
+
key: KEYS.GOOD_HEALTH_WELL_BEING,
|
|
20298
|
+
disabled: "/SDGs/SDGs-19.svg"
|
|
20299
|
+
}, {
|
|
20300
|
+
img: "/SDGs/SDGs-3.svg",
|
|
20301
|
+
key: KEYS.QUALITY_EDUCATION,
|
|
20302
|
+
disabled: "/SDGs/SDGs-20.svg"
|
|
20303
|
+
}, {
|
|
20304
|
+
img: "/SDGs/SDGs-4.svg",
|
|
20305
|
+
key: KEYS.GENDER_EQUALITY,
|
|
20306
|
+
disabled: "/SDGs/SDGs-21.svg"
|
|
20307
|
+
}, {
|
|
20308
|
+
img: "/SDGs/SDGs-5.svg",
|
|
20309
|
+
key: KEYS.CLEAN_WATER_SANITATION,
|
|
20310
|
+
disabled: "/SDGs/SDGs-22.svg"
|
|
20311
|
+
}, {
|
|
20312
|
+
img: "/SDGs/SDGs-6.svg",
|
|
20313
|
+
key: KEYS.AFFORDABLE_CLEAN_ENERGY,
|
|
20314
|
+
disabled: "/SDGs/SDGs-23.svg"
|
|
20315
|
+
}, {
|
|
20316
|
+
img: "/SDGs/SDGs-7.svg",
|
|
20317
|
+
key: KEYS.DECENT_WORK_ECONOMIC_GROWTH,
|
|
20318
|
+
disabled: "/SDGs/SDGs-24.svg"
|
|
20319
|
+
}, {
|
|
20320
|
+
img: "/SDGs/SDGs-8.svg",
|
|
20321
|
+
key: KEYS.INDUSTRY_INNOVATION_INFRASTRUCTURE,
|
|
20322
|
+
disabled: "/SDGs/SDGs-25.svg"
|
|
20323
|
+
}, {
|
|
20324
|
+
img: "/SDGs/SDGs-9.svg",
|
|
20325
|
+
key: KEYS.REDUCED_INEQUALITIES,
|
|
20326
|
+
disabled: "/SDGs/SDGs-26.svg"
|
|
20327
|
+
}, {
|
|
20328
|
+
img: "/SDGs/SDGs-10.svg",
|
|
20329
|
+
key: KEYS.PARTNERSHIPS_FOR_GOALS,
|
|
20330
|
+
disabled: "/SDGs/SDGs-27.svg"
|
|
20331
|
+
}, {
|
|
20332
|
+
img: "/SDGs/SDGs-11.svg",
|
|
20333
|
+
key: KEYS.SUSTAINABLE_CITIES_COMMUNITIES,
|
|
20334
|
+
disabled: "/SDGs/SDGs-28.svg"
|
|
20335
|
+
}, {
|
|
20336
|
+
img: "/SDGs/SDGs-12.svg",
|
|
20337
|
+
key: KEYS.RESPONSIBLE_CONSUMPTION_PRODUCTION,
|
|
20338
|
+
disabled: "/SDGs/SDGs-29.svg"
|
|
20339
|
+
}, {
|
|
20340
|
+
img: "/SDGs/SDGs-13.svg",
|
|
20341
|
+
key: KEYS.CLIMATE_ACTION,
|
|
20342
|
+
disabled: "/SDGs/SDGs-30.svg"
|
|
20343
|
+
}, {
|
|
20344
|
+
img: "/SDGs/SDGs-14.svg",
|
|
20345
|
+
key: KEYS.LIFE_BELOW_WATER,
|
|
20346
|
+
disabled: "/SDGs/SDGs-31.svg"
|
|
20347
|
+
}, {
|
|
20348
|
+
img: "/SDGs/SDGs-15.svg",
|
|
20349
|
+
key: KEYS.LIFE_ON_LAND,
|
|
20350
|
+
disabled: "/SDGs/SDGs-32.svg"
|
|
20351
|
+
}, {
|
|
20352
|
+
img: "/SDGs/SDGs-16.svg",
|
|
20353
|
+
disabled: "/SDGs/SDGs-33.svg",
|
|
20354
|
+
key: KEYS.PEACE_JUSTICE_STRONG_INSTITUTIONS
|
|
20355
|
+
}];
|
|
20356
|
+
};
|
|
20357
|
+
|
|
20358
|
+
var _templateObject$8;
|
|
20359
|
+
const _excluded$b = ["title", "activeSdgGoals", "t"];
|
|
20360
|
+
function SDGWidget(_ref) {
|
|
20361
|
+
let {
|
|
20362
|
+
title = "Sustainable Development Goals",
|
|
20363
|
+
activeSdgGoals = [],
|
|
20364
|
+
t = key => key
|
|
20365
|
+
} = _ref,
|
|
20366
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
20367
|
+
const sdgConfig = getGoalConfig();
|
|
20368
|
+
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
20369
|
+
title: title,
|
|
20370
|
+
className: "with-border-header"
|
|
20371
|
+
}, props), {}, {
|
|
20372
|
+
children: /*#__PURE__*/jsxRuntime.jsx(SDGContainer, {
|
|
20373
|
+
children: sdgConfig.map(item => {
|
|
20374
|
+
const isDisabled = !activeSdgGoals.includes(item.key);
|
|
20375
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
20376
|
+
className: "sdg-item",
|
|
20377
|
+
style: {
|
|
20378
|
+
backgroundImage: "url(".concat(isDisabled ? item.disabled : item.img, ")")
|
|
20379
|
+
}
|
|
20380
|
+
}, item.key);
|
|
20381
|
+
})
|
|
20382
|
+
})
|
|
20383
|
+
}));
|
|
20384
|
+
}
|
|
20385
|
+
const SDGContainer = dt.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(50px, 1fr));\n\tgap: 8px;\n\n\t.sdg-item {\n\t\theight: 50px;\n\t\twidth: 50px;\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"])));
|
|
20386
|
+
|
|
20265
20387
|
var Style$w = dt.div`
|
|
20266
20388
|
border: 1px solid var(--base-gray-40);
|
|
20267
20389
|
padding: 12px;
|
|
@@ -59551,6 +59673,7 @@ exports.ProjectVisualisationHeader = Header;
|
|
|
59551
59673
|
exports.ProjectVisualisationSelect = CustomSelect;
|
|
59552
59674
|
exports.RadarChart = RadarChart;
|
|
59553
59675
|
exports.RadialBarChart = RadialBarChart;
|
|
59676
|
+
exports.SDGWidget = SDGWidget;
|
|
59554
59677
|
exports.SearchFilters = SearchFilters;
|
|
59555
59678
|
exports.Segment = Segment;
|
|
59556
59679
|
exports.SelectFilters = SelectFilters;
|
package/package.json
CHANGED
|
@@ -20,6 +20,24 @@ export const Primary = {
|
|
|
20
20
|
name: "SDGWidget",
|
|
21
21
|
args: {
|
|
22
22
|
title: "Sustainable Development Goals",
|
|
23
|
-
activeSdgGoals: [
|
|
23
|
+
activeSdgGoals: [
|
|
24
|
+
"noPoverty",
|
|
25
|
+
"zeroHunger",
|
|
26
|
+
"goodHealthWellbeing",
|
|
27
|
+
|
|
28
|
+
"genderEquality",
|
|
29
|
+
"cleanWaterSanitation",
|
|
30
|
+
"affordableCleanEnergy",
|
|
31
|
+
"decentWorkEconomicGrowth",
|
|
32
|
+
"industryInnovationInfrastructure",
|
|
33
|
+
"reducedInequalities",
|
|
34
|
+
"sustainableCitiesCommunities",
|
|
35
|
+
|
|
36
|
+
"climateAction",
|
|
37
|
+
"lifeBelowWater",
|
|
38
|
+
"lifeOnLand",
|
|
39
|
+
"peaceJusticeStrongInstitutions",
|
|
40
|
+
"partnershipsForGoals",
|
|
41
|
+
],
|
|
24
42
|
},
|
|
25
43
|
};
|
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import ZeroHunger from "./SDGs/SDGs-1.svg";
|
|
3
|
-
import GoodHealth from "./SDGs/SDGs-2.svg";
|
|
4
|
-
import QualityEducation from "./SDGs/SDGs-3.svg";
|
|
5
|
-
import GenderEquality from "./SDGs/SDGs-4.svg";
|
|
6
|
-
import CleanWater from "./SDGs/SDGs-5.svg";
|
|
7
|
-
import AffordableEnergy from "./SDGs/SDGs-6.svg";
|
|
8
|
-
import DecentWork from "./SDGs/SDGs-7.svg";
|
|
9
|
-
import IndustryInnovation from "./SDGs/SDGs-8.svg";
|
|
10
|
-
import ReducedInequality from "./SDGs/SDGs-9.svg";
|
|
11
|
-
import SustainableDevelopment from "./SDGs/SDGs-10.svg";
|
|
12
|
-
import SustainableCities from "./SDGs/SDGs-11.svg";
|
|
13
|
-
import ResponsibleConsumption from "./SDGs/SDGs-12.svg";
|
|
14
|
-
import ClimateAction from "./SDGs/SDGs-13.svg";
|
|
15
|
-
import LifeBelowWater from "./SDGs/SDGs-14.svg";
|
|
16
|
-
import LifeOnLand from "./SDGs/SDGs-15.svg";
|
|
17
|
-
import PeaceJustice from "./SDGs/SDGs-16.svg";
|
|
18
|
-
|
|
19
|
-
import NoPovertyDisabled from "./SDGs/SDGs-17.svg";
|
|
20
|
-
import ZeroHungerDisabled from "./SDGs/SDGs-18.svg";
|
|
21
|
-
import GoodHealthDisabled from "./SDGs/SDGs-19.svg";
|
|
22
|
-
import QualityEducationDisabled from "./SDGs/SDGs-20.svg";
|
|
23
|
-
import GenderEqualityDisabled from "./SDGs/SDGs-21.svg";
|
|
24
|
-
import CleanWaterDisabled from "./SDGs/SDGs-22.svg";
|
|
25
|
-
import AffordableEnergyDisabled from "./SDGs/SDGs-23.svg";
|
|
26
|
-
import DecentWorkDisabled from "./SDGs/SDGs-24.svg";
|
|
27
|
-
import IndustryInnovationDisabled from "./SDGs/SDGs-25.svg";
|
|
28
|
-
import ReducedInequalityDisabled from "./SDGs/SDGs-26.svg";
|
|
29
|
-
import SustainableDevelopmentDisabled from "./SDGs/SDGs-27.svg";
|
|
30
|
-
import SustainableCitiesDisabled from "./SDGs/SDGs-28.svg";
|
|
31
|
-
import ResponsibleConsumptionDisabled from "./SDGs/SDGs-29.svg";
|
|
32
|
-
import ClimateActionDisabled from "./SDGs/SDGs-30.svg";
|
|
33
|
-
import LifeBelowWaterDisabled from "./SDGs/SDGs-31.svg";
|
|
34
|
-
import LifeOnLandDisabled from "./SDGs/SDGs-32.svg";
|
|
35
|
-
import PeaceJusticeDisabled from "./SDGs/SDGs-33.svg";
|
|
1
|
+
// SVG paths moved to public folder
|
|
36
2
|
|
|
37
3
|
const KEYS = {
|
|
38
4
|
NO_POVERTY: "noPoverty",
|
|
@@ -56,77 +22,77 @@ const KEYS = {
|
|
|
56
22
|
|
|
57
23
|
export const getGoalConfig = () => {
|
|
58
24
|
return [
|
|
59
|
-
{ img:
|
|
60
|
-
{ img:
|
|
25
|
+
{ img: "/SDGs/SDGs.svg", key: KEYS.NO_POVERTY, disabled: "/SDGs/SDGs-17.svg" },
|
|
26
|
+
{ img: "/SDGs/SDGs-1.svg", key: KEYS.ZERO_HUNGER, disabled: "/SDGs/SDGs-18.svg" },
|
|
61
27
|
{
|
|
62
|
-
img:
|
|
28
|
+
img: "/SDGs/SDGs-2.svg",
|
|
63
29
|
key: KEYS.GOOD_HEALTH_WELL_BEING,
|
|
64
|
-
disabled:
|
|
30
|
+
disabled: "/SDGs/SDGs-19.svg",
|
|
65
31
|
},
|
|
66
32
|
{
|
|
67
|
-
img:
|
|
33
|
+
img: "/SDGs/SDGs-3.svg",
|
|
68
34
|
key: KEYS.QUALITY_EDUCATION,
|
|
69
|
-
disabled:
|
|
35
|
+
disabled: "/SDGs/SDGs-20.svg",
|
|
70
36
|
},
|
|
71
37
|
{
|
|
72
|
-
img:
|
|
38
|
+
img: "/SDGs/SDGs-4.svg",
|
|
73
39
|
key: KEYS.GENDER_EQUALITY,
|
|
74
|
-
disabled:
|
|
40
|
+
disabled: "/SDGs/SDGs-21.svg",
|
|
75
41
|
},
|
|
76
42
|
{
|
|
77
|
-
img:
|
|
43
|
+
img: "/SDGs/SDGs-5.svg",
|
|
78
44
|
key: KEYS.CLEAN_WATER_SANITATION,
|
|
79
|
-
disabled:
|
|
45
|
+
disabled: "/SDGs/SDGs-22.svg",
|
|
80
46
|
},
|
|
81
47
|
{
|
|
82
|
-
img:
|
|
48
|
+
img: "/SDGs/SDGs-6.svg",
|
|
83
49
|
key: KEYS.AFFORDABLE_CLEAN_ENERGY,
|
|
84
|
-
disabled:
|
|
50
|
+
disabled: "/SDGs/SDGs-23.svg",
|
|
85
51
|
},
|
|
86
52
|
{
|
|
87
|
-
img:
|
|
53
|
+
img: "/SDGs/SDGs-7.svg",
|
|
88
54
|
key: KEYS.DECENT_WORK_ECONOMIC_GROWTH,
|
|
89
|
-
disabled:
|
|
55
|
+
disabled: "/SDGs/SDGs-24.svg",
|
|
90
56
|
},
|
|
91
57
|
{
|
|
92
|
-
img:
|
|
58
|
+
img: "/SDGs/SDGs-8.svg",
|
|
93
59
|
key: KEYS.INDUSTRY_INNOVATION_INFRASTRUCTURE,
|
|
94
|
-
disabled:
|
|
60
|
+
disabled: "/SDGs/SDGs-25.svg",
|
|
95
61
|
},
|
|
96
62
|
{
|
|
97
|
-
img:
|
|
63
|
+
img: "/SDGs/SDGs-9.svg",
|
|
98
64
|
key: KEYS.REDUCED_INEQUALITIES,
|
|
99
|
-
disabled:
|
|
65
|
+
disabled: "/SDGs/SDGs-26.svg",
|
|
100
66
|
},
|
|
101
67
|
{
|
|
102
|
-
img:
|
|
68
|
+
img: "/SDGs/SDGs-10.svg",
|
|
103
69
|
key: KEYS.PARTNERSHIPS_FOR_GOALS,
|
|
104
|
-
disabled:
|
|
70
|
+
disabled: "/SDGs/SDGs-27.svg",
|
|
105
71
|
},
|
|
106
72
|
{
|
|
107
|
-
img:
|
|
73
|
+
img: "/SDGs/SDGs-11.svg",
|
|
108
74
|
key: KEYS.SUSTAINABLE_CITIES_COMMUNITIES,
|
|
109
|
-
disabled:
|
|
75
|
+
disabled: "/SDGs/SDGs-28.svg",
|
|
110
76
|
},
|
|
111
77
|
{
|
|
112
|
-
img:
|
|
78
|
+
img: "/SDGs/SDGs-12.svg",
|
|
113
79
|
key: KEYS.RESPONSIBLE_CONSUMPTION_PRODUCTION,
|
|
114
|
-
disabled:
|
|
80
|
+
disabled: "/SDGs/SDGs-29.svg",
|
|
115
81
|
},
|
|
116
82
|
{
|
|
117
|
-
img:
|
|
83
|
+
img: "/SDGs/SDGs-13.svg",
|
|
118
84
|
key: KEYS.CLIMATE_ACTION,
|
|
119
|
-
disabled:
|
|
85
|
+
disabled: "/SDGs/SDGs-30.svg",
|
|
120
86
|
},
|
|
121
87
|
{
|
|
122
|
-
img:
|
|
88
|
+
img: "/SDGs/SDGs-14.svg",
|
|
123
89
|
key: KEYS.LIFE_BELOW_WATER,
|
|
124
|
-
disabled:
|
|
90
|
+
disabled: "/SDGs/SDGs-31.svg",
|
|
125
91
|
},
|
|
126
|
-
{ img:
|
|
92
|
+
{ img: "/SDGs/SDGs-15.svg", key: KEYS.LIFE_ON_LAND, disabled: "/SDGs/SDGs-32.svg" },
|
|
127
93
|
{
|
|
128
|
-
img:
|
|
129
|
-
disabled:
|
|
94
|
+
img: "/SDGs/SDGs-16.svg",
|
|
95
|
+
disabled: "/SDGs/SDGs-33.svg",
|
|
130
96
|
key: KEYS.PEACE_JUSTICE_STRONG_INSTITUTIONS,
|
|
131
97
|
},
|
|
132
98
|
];
|
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
import Widget from "../index.jsx";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { getGoalConfig } from "./config.js";
|
|
4
|
+
|
|
4
5
|
export default function SDGWidget({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
title = "Sustainable Development Goals",
|
|
7
|
+
activeSdgGoals = [],
|
|
8
|
+
t = (key) => key,
|
|
9
|
+
...props
|
|
9
10
|
}) {
|
|
10
|
-
|
|
11
|
+
const sdgConfig = getGoalConfig();
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
return (
|
|
14
|
+
<Widget title={title} className={`with-border-header`} {...props}>
|
|
15
|
+
<SDGContainer>
|
|
16
|
+
{sdgConfig.map((item) => {
|
|
17
|
+
const isDisabled = !activeSdgGoals.includes(item.key);
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</Widget>
|
|
32
|
-
);
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
key={item.key}
|
|
22
|
+
className={`sdg-item`}
|
|
23
|
+
style={{
|
|
24
|
+
backgroundImage: `url(${isDisabled ? item.disabled : item.img})`,
|
|
25
|
+
}}
|
|
26
|
+
></div>
|
|
27
|
+
);
|
|
28
|
+
})}
|
|
29
|
+
</SDGContainer>
|
|
30
|
+
</Widget>
|
|
31
|
+
);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
const SDGContainer = styled.div`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
|
|
37
|
+
gap: 8px;
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
.sdg-item {
|
|
40
|
+
height: 50px;
|
|
41
|
+
width: 50px;
|
|
42
|
+
border-radius: 8px;
|
|
43
|
+
background-size: cover;
|
|
44
|
+
background-position: center;
|
|
45
|
+
background-repeat: no-repeat;
|
|
46
|
+
}
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
.sdg-item-content {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
height: 100%;
|
|
52
|
+
color: white;
|
|
53
|
+
text-align: center;
|
|
54
|
+
}
|
|
56
55
|
`;
|
package/src/index.js
CHANGED
|
@@ -26,10 +26,10 @@ export { default as CustomIcon } from "./@daf/core/components/Icon/CustomIcon.js
|
|
|
26
26
|
|
|
27
27
|
// Filters
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
default as SelectFilters,
|
|
30
|
+
CustomSelect as SelectFiltersSelect,
|
|
31
|
+
Timeframe as SelectFiltersTimeFrame,
|
|
32
|
+
AjaxSelect as SelectFiltersAjaxSelect,
|
|
33
33
|
} from "./@daf/core/components/Filters/selectFilters/index.jsx";
|
|
34
34
|
export { default as SearchFilters } from "./@daf/core/components/Filters/searchFilters/index.jsx";
|
|
35
35
|
|
|
@@ -70,6 +70,7 @@ export { default as KeyIndicatorsDetails } from "./@daf/core/components/Dashboar
|
|
|
70
70
|
export { default as DetailsSection } from "./@daf/core/components/Dashboard/Widget/DetailsSection/index.jsx";
|
|
71
71
|
export { default as ComponentWithFocus } from "./@daf/core/components/Dashboard/ComponentWithFocus/index.jsx";
|
|
72
72
|
export { default as WidgetCatalogue } from "./@daf/core/components/Dashboard/Widget/WidgetCatalogue/index.jsx";
|
|
73
|
+
export { default as SDGWidget } from "./@daf/core/components/Dashboard/Widget/SDGWidget/index.jsx";
|
|
73
74
|
|
|
74
75
|
// Forms
|
|
75
76
|
export { default as ViewForm } from "./@daf/core/components/ViewForm/content.jsx";
|
|
@@ -99,10 +100,7 @@ export { default as ProjectVisualisationSelect } from "./@daf/core/components/Pr
|
|
|
99
100
|
export { default as ProjectVisualisationAlert } from "./@daf/core/components/ProjectVisualisation/Alert/index.js";
|
|
100
101
|
|
|
101
102
|
// Sidenav
|
|
102
|
-
export {
|
|
103
|
-
default as Sidenav,
|
|
104
|
-
useMenu,
|
|
105
|
-
} from "./@daf/core/components/Sidenav/index.jsx";
|
|
103
|
+
export { default as Sidenav, useMenu } from "./@daf/core/components/Sidenav/index.jsx";
|
|
106
104
|
export { default as SidenavMenu } from "./@daf/core/components/Sidenav/Menu.jsx";
|
|
107
105
|
|
|
108
106
|
// Other
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|