datastake-daf 0.6.109 → 0.6.110
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/dist/components/index.js +159 -36
- package/package.json +2 -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 +41 -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
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 {
|
|
@@ -15299,7 +15299,7 @@ Widget.propTypes = {
|
|
|
15299
15299
|
onExpandChange: PropTypes__default["default"].func
|
|
15300
15300
|
};
|
|
15301
15301
|
|
|
15302
|
-
const _excluded$
|
|
15302
|
+
const _excluded$g = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText"];
|
|
15303
15303
|
function ImageWidget(_ref) {
|
|
15304
15304
|
let {
|
|
15305
15305
|
loading = false,
|
|
@@ -15309,7 +15309,7 @@ function ImageWidget(_ref) {
|
|
|
15309
15309
|
imgAlt,
|
|
15310
15310
|
noDescriptionText
|
|
15311
15311
|
} = _ref,
|
|
15312
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15312
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
15313
15313
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
15314
15314
|
loading: loading,
|
|
15315
15315
|
title: title,
|
|
@@ -15365,8 +15365,8 @@ function ImageWidget(_ref) {
|
|
|
15365
15365
|
}));
|
|
15366
15366
|
}
|
|
15367
15367
|
|
|
15368
|
-
var _templateObject$
|
|
15369
|
-
const _excluded$
|
|
15368
|
+
var _templateObject$a;
|
|
15369
|
+
const _excluded$f = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
15370
15370
|
function FlowWidget(_ref) {
|
|
15371
15371
|
let {
|
|
15372
15372
|
title,
|
|
@@ -15378,7 +15378,7 @@ function FlowWidget(_ref) {
|
|
|
15378
15378
|
className,
|
|
15379
15379
|
direction = "horizontal"
|
|
15380
15380
|
} = _ref,
|
|
15381
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15381
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
15382
15382
|
const [activeTab, setActiveTab] = React.useState();
|
|
15383
15383
|
React.useEffect(() => {
|
|
15384
15384
|
if (defaultActiveTab) {
|
|
@@ -15515,7 +15515,7 @@ function Icon(_ref2) {
|
|
|
15515
15515
|
return icon(status);
|
|
15516
15516
|
}
|
|
15517
15517
|
}
|
|
15518
|
-
const Style$F = dt.div(_templateObject$
|
|
15518
|
+
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"])));
|
|
15519
15519
|
FlowWidget.propTypes = {
|
|
15520
15520
|
title: PropTypes__default["default"].string,
|
|
15521
15521
|
loading: PropTypes__default["default"].bool,
|
|
@@ -18063,8 +18063,8 @@ const useMap$1 = ({
|
|
|
18063
18063
|
};
|
|
18064
18064
|
};
|
|
18065
18065
|
|
|
18066
|
-
var _templateObject$
|
|
18067
|
-
const Style$B = dt.div(_templateObject$
|
|
18066
|
+
var _templateObject$9;
|
|
18067
|
+
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"])));
|
|
18068
18068
|
|
|
18069
18069
|
/**
|
|
18070
18070
|
* ComponentWithFocus
|
|
@@ -19954,14 +19954,14 @@ const MapConfig = ({
|
|
|
19954
19954
|
});
|
|
19955
19955
|
};
|
|
19956
19956
|
|
|
19957
|
-
const _excluded$
|
|
19957
|
+
const _excluded$e = ["config", "title", "loading"];
|
|
19958
19958
|
const Details = _ref => {
|
|
19959
19959
|
let {
|
|
19960
19960
|
config = [],
|
|
19961
19961
|
title,
|
|
19962
19962
|
loading = false
|
|
19963
19963
|
} = _ref,
|
|
19964
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19964
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
19965
19965
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
19966
19966
|
className: "with-border-header h-w-btn-header card",
|
|
19967
19967
|
loading: loading,
|
|
@@ -19977,14 +19977,14 @@ const Details = _ref => {
|
|
|
19977
19977
|
}));
|
|
19978
19978
|
};
|
|
19979
19979
|
|
|
19980
|
-
const _excluded$
|
|
19980
|
+
const _excluded$d = ["config", "title", "loading"];
|
|
19981
19981
|
const KeyIndicatorsDetails = _ref => {
|
|
19982
19982
|
let {
|
|
19983
19983
|
config,
|
|
19984
19984
|
title,
|
|
19985
19985
|
loading = false
|
|
19986
19986
|
} = _ref,
|
|
19987
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19987
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
19988
19988
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
19989
19989
|
className: "with-border-header h-w-btn-header",
|
|
19990
19990
|
title: title,
|
|
@@ -20014,7 +20014,7 @@ const Style$x = dt.div`
|
|
|
20014
20014
|
}
|
|
20015
20015
|
`;
|
|
20016
20016
|
|
|
20017
|
-
const _excluded$
|
|
20017
|
+
const _excluded$c = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
20018
20018
|
const DetailsSection = _ref => {
|
|
20019
20019
|
let {
|
|
20020
20020
|
children,
|
|
@@ -20022,7 +20022,7 @@ const DetailsSection = _ref => {
|
|
|
20022
20022
|
detailsTitle,
|
|
20023
20023
|
firstColumnWidth = "250px"
|
|
20024
20024
|
} = _ref,
|
|
20025
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
20025
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
20026
20026
|
return /*#__PURE__*/jsxRuntime.jsx(Style$x, {
|
|
20027
20027
|
firstColumnWidth: firstColumnWidth,
|
|
20028
20028
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -20231,6 +20231,128 @@ function WidgetCatalogue(_ref2) {
|
|
|
20231
20231
|
});
|
|
20232
20232
|
}
|
|
20233
20233
|
|
|
20234
|
+
// SVG paths moved to public folder
|
|
20235
|
+
|
|
20236
|
+
const KEYS = {
|
|
20237
|
+
NO_POVERTY: "noPoverty",
|
|
20238
|
+
ZERO_HUNGER: "zeroHunger",
|
|
20239
|
+
GOOD_HEALTH_WELL_BEING: "goodHealthWellbeing",
|
|
20240
|
+
QUALITY_EDUCATION: "qualityEducation",
|
|
20241
|
+
GENDER_EQUALITY: "genderEquality",
|
|
20242
|
+
CLEAN_WATER_SANITATION: "cleanWaterSanitation",
|
|
20243
|
+
AFFORDABLE_CLEAN_ENERGY: "affordableCleanEnergy",
|
|
20244
|
+
DECENT_WORK_ECONOMIC_GROWTH: "decentWorkEconomicGrowth",
|
|
20245
|
+
INDUSTRY_INNOVATION_INFRASTRUCTURE: "industryInnovationInfrastructure",
|
|
20246
|
+
REDUCED_INEQUALITIES: "reducedInequalities",
|
|
20247
|
+
SUSTAINABLE_CITIES_COMMUNITIES: "sustainableCitiesCommunities",
|
|
20248
|
+
RESPONSIBLE_CONSUMPTION_PRODUCTION: "responsibleConsumptionProduction",
|
|
20249
|
+
CLIMATE_ACTION: "climateAction",
|
|
20250
|
+
LIFE_BELOW_WATER: "lifeBelowWater",
|
|
20251
|
+
LIFE_ON_LAND: "lifeOnLand",
|
|
20252
|
+
PEACE_JUSTICE_STRONG_INSTITUTIONS: "peaceJusticeStrongInstitutions",
|
|
20253
|
+
PARTNERSHIPS_FOR_GOALS: "partnershipsForGoals"
|
|
20254
|
+
};
|
|
20255
|
+
const getGoalConfig = () => {
|
|
20256
|
+
return [{
|
|
20257
|
+
img: "/SDGs/SDGs.svg",
|
|
20258
|
+
key: KEYS.NO_POVERTY,
|
|
20259
|
+
disabled: "/SDGs/SDGs-17.svg"
|
|
20260
|
+
}, {
|
|
20261
|
+
img: "/SDGs/SDGs-1.svg",
|
|
20262
|
+
key: KEYS.ZERO_HUNGER,
|
|
20263
|
+
disabled: "/SDGs/SDGs-18.svg"
|
|
20264
|
+
}, {
|
|
20265
|
+
img: "/SDGs/SDGs-2.svg",
|
|
20266
|
+
key: KEYS.GOOD_HEALTH_WELL_BEING,
|
|
20267
|
+
disabled: "/SDGs/SDGs-19.svg"
|
|
20268
|
+
}, {
|
|
20269
|
+
img: "/SDGs/SDGs-3.svg",
|
|
20270
|
+
key: KEYS.QUALITY_EDUCATION,
|
|
20271
|
+
disabled: "/SDGs/SDGs-20.svg"
|
|
20272
|
+
}, {
|
|
20273
|
+
img: "/SDGs/SDGs-4.svg",
|
|
20274
|
+
key: KEYS.GENDER_EQUALITY,
|
|
20275
|
+
disabled: "/SDGs/SDGs-21.svg"
|
|
20276
|
+
}, {
|
|
20277
|
+
img: "/SDGs/SDGs-5.svg",
|
|
20278
|
+
key: KEYS.CLEAN_WATER_SANITATION,
|
|
20279
|
+
disabled: "/SDGs/SDGs-22.svg"
|
|
20280
|
+
}, {
|
|
20281
|
+
img: "/SDGs/SDGs-6.svg",
|
|
20282
|
+
key: KEYS.AFFORDABLE_CLEAN_ENERGY,
|
|
20283
|
+
disabled: "/SDGs/SDGs-23.svg"
|
|
20284
|
+
}, {
|
|
20285
|
+
img: "/SDGs/SDGs-7.svg",
|
|
20286
|
+
key: KEYS.DECENT_WORK_ECONOMIC_GROWTH,
|
|
20287
|
+
disabled: "/SDGs/SDGs-24.svg"
|
|
20288
|
+
}, {
|
|
20289
|
+
img: "/SDGs/SDGs-8.svg",
|
|
20290
|
+
key: KEYS.INDUSTRY_INNOVATION_INFRASTRUCTURE,
|
|
20291
|
+
disabled: "/SDGs/SDGs-25.svg"
|
|
20292
|
+
}, {
|
|
20293
|
+
img: "/SDGs/SDGs-9.svg",
|
|
20294
|
+
key: KEYS.REDUCED_INEQUALITIES,
|
|
20295
|
+
disabled: "/SDGs/SDGs-26.svg"
|
|
20296
|
+
}, {
|
|
20297
|
+
img: "/SDGs/SDGs-10.svg",
|
|
20298
|
+
key: KEYS.PARTNERSHIPS_FOR_GOALS,
|
|
20299
|
+
disabled: "/SDGs/SDGs-27.svg"
|
|
20300
|
+
}, {
|
|
20301
|
+
img: "/SDGs/SDGs-11.svg",
|
|
20302
|
+
key: KEYS.SUSTAINABLE_CITIES_COMMUNITIES,
|
|
20303
|
+
disabled: "/SDGs/SDGs-28.svg"
|
|
20304
|
+
}, {
|
|
20305
|
+
img: "/SDGs/SDGs-12.svg",
|
|
20306
|
+
key: KEYS.RESPONSIBLE_CONSUMPTION_PRODUCTION,
|
|
20307
|
+
disabled: "/SDGs/SDGs-29.svg"
|
|
20308
|
+
}, {
|
|
20309
|
+
img: "/SDGs/SDGs-13.svg",
|
|
20310
|
+
key: KEYS.CLIMATE_ACTION,
|
|
20311
|
+
disabled: "/SDGs/SDGs-30.svg"
|
|
20312
|
+
}, {
|
|
20313
|
+
img: "/SDGs/SDGs-14.svg",
|
|
20314
|
+
key: KEYS.LIFE_BELOW_WATER,
|
|
20315
|
+
disabled: "/SDGs/SDGs-31.svg"
|
|
20316
|
+
}, {
|
|
20317
|
+
img: "/SDGs/SDGs-15.svg",
|
|
20318
|
+
key: KEYS.LIFE_ON_LAND,
|
|
20319
|
+
disabled: "/SDGs/SDGs-32.svg"
|
|
20320
|
+
}, {
|
|
20321
|
+
img: "/SDGs/SDGs-16.svg",
|
|
20322
|
+
disabled: "/SDGs/SDGs-33.svg",
|
|
20323
|
+
key: KEYS.PEACE_JUSTICE_STRONG_INSTITUTIONS
|
|
20324
|
+
}];
|
|
20325
|
+
};
|
|
20326
|
+
|
|
20327
|
+
var _templateObject$8;
|
|
20328
|
+
const _excluded$b = ["title", "activeSdgGoals", "t"];
|
|
20329
|
+
function SDGWidget(_ref) {
|
|
20330
|
+
let {
|
|
20331
|
+
title = "Sustainable Development Goals",
|
|
20332
|
+
activeSdgGoals = [],
|
|
20333
|
+
t = key => key
|
|
20334
|
+
} = _ref,
|
|
20335
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
20336
|
+
const sdgConfig = getGoalConfig();
|
|
20337
|
+
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
20338
|
+
title: title,
|
|
20339
|
+
className: "with-border-header"
|
|
20340
|
+
}, props), {}, {
|
|
20341
|
+
children: /*#__PURE__*/jsxRuntime.jsx(SDGContainer, {
|
|
20342
|
+
children: sdgConfig.map(item => {
|
|
20343
|
+
const isDisabled = !activeSdgGoals.includes(item.key);
|
|
20344
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
20345
|
+
className: "sdg-item",
|
|
20346
|
+
style: {
|
|
20347
|
+
backgroundImage: "url(".concat(isDisabled ? item.disabled : item.img, ")")
|
|
20348
|
+
}
|
|
20349
|
+
}, item.key);
|
|
20350
|
+
})
|
|
20351
|
+
})
|
|
20352
|
+
}));
|
|
20353
|
+
}
|
|
20354
|
+
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"])));
|
|
20355
|
+
|
|
20234
20356
|
var Style$w = dt.div`
|
|
20235
20357
|
border: 1px solid var(--base-gray-40);
|
|
20236
20358
|
padding: 12px;
|
|
@@ -59520,6 +59642,7 @@ exports.ProjectVisualisationHeader = Header;
|
|
|
59520
59642
|
exports.ProjectVisualisationSelect = CustomSelect;
|
|
59521
59643
|
exports.RadarChart = RadarChart;
|
|
59522
59644
|
exports.RadialBarChart = RadialBarChart;
|
|
59645
|
+
exports.SDGWidget = SDGWidget;
|
|
59523
59646
|
exports.SearchFilters = SearchFilters;
|
|
59524
59647
|
exports.Segment = Segment;
|
|
59525
59648
|
exports.SelectFilters = SelectFilters;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datastake-daf",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.110",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@ant-design/icons": "^5.2.5",
|
|
6
6
|
"@antv/g2": "^5.1.1",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"rollup": "^2.79.1",
|
|
95
95
|
"rollup-plugin-babel": "^4.4.0",
|
|
96
96
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
97
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
97
98
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
98
99
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
99
100
|
"sass": "^1.62.0",
|
|
@@ -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
|
];
|
|
@@ -2,55 +2,53 @@ import Widget from "../index.jsx";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { getGoalConfig } from "./config.js";
|
|
4
4
|
export default function SDGWidget({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
title = "Sustainable Development Goals",
|
|
6
|
+
activeSdgGoals = [],
|
|
7
|
+
t = (key) => key,
|
|
8
|
+
...props
|
|
9
9
|
}) {
|
|
10
|
-
|
|
10
|
+
const sdgConfig = getGoalConfig();
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return (
|
|
13
|
+
<Widget title={title} className={`with-border-header`} {...props}>
|
|
14
|
+
<SDGContainer>
|
|
15
|
+
{sdgConfig.map((item) => {
|
|
16
|
+
const isDisabled = !activeSdgGoals.includes(item.key);
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</Widget>
|
|
32
|
-
);
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
key={item.key}
|
|
21
|
+
className={`sdg-item`}
|
|
22
|
+
style={{
|
|
23
|
+
backgroundImage: `url(${isDisabled ? item.disabled : item.img})`,
|
|
24
|
+
}}
|
|
25
|
+
></div>
|
|
26
|
+
);
|
|
27
|
+
})}
|
|
28
|
+
</SDGContainer>
|
|
29
|
+
</Widget>
|
|
30
|
+
);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
const SDGContainer = styled.div`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
|
|
36
|
+
gap: 8px;
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
.sdg-item {
|
|
39
|
+
height: 50px;
|
|
40
|
+
width: 50px;
|
|
41
|
+
border-radius: 8px;
|
|
42
|
+
background-size: cover;
|
|
43
|
+
background-position: center;
|
|
44
|
+
background-repeat: no-repeat;
|
|
45
|
+
}
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
.sdg-item-content {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
height: 100%;
|
|
51
|
+
color: white;
|
|
52
|
+
text-align: center;
|
|
53
|
+
}
|
|
56
54
|
`;
|
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
|