datastake-daf 0.6.795 → 0.6.796
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 +248 -77
- package/dist/pages/index.js +788 -173
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/package.json +1 -1
- package/public/Vegetation/black-default.svg +23 -0
- package/public/Vegetation/black.svg +12 -0
- package/public/Vegetation/damage-from-insects-default.svg +14 -0
- package/public/Vegetation/damage-from-insects.svg +8 -0
- package/public/Vegetation/dry-or-dead-default.svg +16 -0
- package/public/Vegetation/dry-or-dead.svg +7 -0
- package/public/Vegetation/healthy-default.svg +14 -0
- package/public/Vegetation/healthy.svg +34 -0
- package/public/Vegetation/mosaic-default.svg +17 -0
- package/public/Vegetation/mosaic.svg +9 -0
- package/public/Vegetation/no-leaves-default.svg +6 -0
- package/public/Vegetation/no-leaves.svg +5 -0
- package/public/Vegetation/reddish-default.svg +23 -0
- package/public/Vegetation/reddish.svg +79 -0
- package/public/Vegetation/spider-webs-default.svg +10 -0
- package/public/Vegetation/spider-webs.svg +10 -0
- package/public/Vegetation/white-default.svg +25 -0
- package/public/Vegetation/white.svg +12 -0
- package/public/Vegetation/yellowing-default.svg +7 -0
- package/public/Vegetation/yellowing.svg +8 -0
- package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +24 -6
- package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/style.js +2 -6
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/VegetationWidget.stories.jsx +76 -0
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/config.js +31 -0
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/index.jsx +137 -0
- package/src/@daf/core/components/ViewForm/components/Records/config.js +3 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityImagery/index.jsx +12 -10
- package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/helper.js +86 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/index.jsx +65 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/EnvironmentalMetrics/index.jsx +30 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/PlantedSpecies/index.jsx +15 -28
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SeedlingsHeight/index.jsx +17 -30
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SurvivalRate/index.jsx +38 -45
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/index.jsx +87 -8
- package/src/@daf/pages/Summary/Activities/Monitoring/config.js +21 -4
- package/src/@daf/pages/Summary/Activities/Monitoring/helper.js +7 -1
- package/src/@daf/pages/Summary/Activities/Monitoring/index.jsx +31 -8
- package/src/constants/Vegetation.js +15 -0
- package/src/index.js +1 -0
package/dist/components/index.js
CHANGED
|
@@ -4778,7 +4778,7 @@ const config$2 = {
|
|
|
4778
4778
|
Down: config$3
|
|
4779
4779
|
};
|
|
4780
4780
|
|
|
4781
|
-
const _excluded$
|
|
4781
|
+
const _excluded$D = ["width", "height", "size", "name", "fill"];
|
|
4782
4782
|
const CustomIcon = _ref => {
|
|
4783
4783
|
let {
|
|
4784
4784
|
width = 14,
|
|
@@ -4787,7 +4787,7 @@ const CustomIcon = _ref => {
|
|
|
4787
4787
|
name = "",
|
|
4788
4788
|
fill = "none"
|
|
4789
4789
|
} = _ref,
|
|
4790
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4790
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4791
4791
|
const conf = config$2[name];
|
|
4792
4792
|
if (conf) {
|
|
4793
4793
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -5076,7 +5076,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
5076
5076
|
!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])+"]"}}}));
|
|
5077
5077
|
});
|
|
5078
5078
|
|
|
5079
|
-
const _excluded$
|
|
5079
|
+
const _excluded$C = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
|
|
5080
5080
|
dayjs__default["default"].extend(customParseFormat);
|
|
5081
5081
|
dayjs__default["default"].extend(utc);
|
|
5082
5082
|
dayjs__default["default"].extend(utc);
|
|
@@ -5452,7 +5452,7 @@ const filterCreateData = data => {
|
|
|
5452
5452
|
createdAt,
|
|
5453
5453
|
updatedAt
|
|
5454
5454
|
} = data,
|
|
5455
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
5455
|
+
rest = _objectWithoutProperties(data, _excluded$C);
|
|
5456
5456
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
5457
5457
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5458
5458
|
meta: _meta
|
|
@@ -5848,7 +5848,7 @@ SelectFilters.propTypes = {
|
|
|
5848
5848
|
apiUrl: PropTypes__default["default"].string
|
|
5849
5849
|
};
|
|
5850
5850
|
|
|
5851
|
-
const _excluded$
|
|
5851
|
+
const _excluded$B = ["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"];
|
|
5852
5852
|
function DAFTable(_ref) {
|
|
5853
5853
|
let {
|
|
5854
5854
|
columns = [],
|
|
@@ -5879,7 +5879,7 @@ function DAFTable(_ref) {
|
|
|
5879
5879
|
app,
|
|
5880
5880
|
doEmptyRows
|
|
5881
5881
|
} = _ref,
|
|
5882
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5882
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5883
5883
|
const [source, setSource] = React.useState([]);
|
|
5884
5884
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
5885
5885
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -6623,8 +6623,8 @@ Pagination.propTypes = {
|
|
|
6623
6623
|
isMobile: PropTypes__default["default"].bool
|
|
6624
6624
|
};
|
|
6625
6625
|
|
|
6626
|
-
var _templateObject$
|
|
6627
|
-
const Style$T = styled__default["default"].div(_templateObject$
|
|
6626
|
+
var _templateObject$h;
|
|
6627
|
+
const Style$T = styled__default["default"].div(_templateObject$h || (_templateObject$h = _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"])));
|
|
6628
6628
|
|
|
6629
6629
|
/**
|
|
6630
6630
|
* ComponentWithFocus
|
|
@@ -6696,8 +6696,8 @@ function ComponentWithFocus(_ref) {
|
|
|
6696
6696
|
});
|
|
6697
6697
|
}
|
|
6698
6698
|
|
|
6699
|
-
var _templateObject$
|
|
6700
|
-
const _excluded$
|
|
6699
|
+
var _templateObject$g;
|
|
6700
|
+
const _excluded$A = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
6701
6701
|
function StickyTable(_ref) {
|
|
6702
6702
|
let {
|
|
6703
6703
|
size = "small",
|
|
@@ -6708,7 +6708,7 @@ function StickyTable(_ref) {
|
|
|
6708
6708
|
pagination = false,
|
|
6709
6709
|
doEmptyRows = true
|
|
6710
6710
|
} = _ref,
|
|
6711
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6711
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
6712
6712
|
const data = React__default["default"].useMemo(() => {
|
|
6713
6713
|
if (!doEmptyRows) {
|
|
6714
6714
|
return dataSource;
|
|
@@ -6754,7 +6754,7 @@ function StickyTable(_ref) {
|
|
|
6754
6754
|
})
|
|
6755
6755
|
});
|
|
6756
6756
|
}
|
|
6757
|
-
const Style$S = styled__default["default"].div(_templateObject$
|
|
6757
|
+
const Style$S = styled__default["default"].div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n\tmax-width: calc(100% - 48px);\n\tmargin-left: var(--size-lg);\n\toverflow: hidden;\n\n\t.daf-table {\n\t\tpadding: 0px;\n\t\tmargin-top: 0px;\n\n\t\t.ant-tag {\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.daf-select-filters .filters {\n\t\tpadding-top: 16px;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t}\n\n\t.daf-table {\n\t\tpadding-top: 16px;\n\t}\n"])));
|
|
6758
6758
|
StickyTable.propTypes = {
|
|
6759
6759
|
size: PropTypes__default["default"].any,
|
|
6760
6760
|
maxHeight: PropTypes__default["default"].number,
|
|
@@ -7236,7 +7236,7 @@ const BTN_SIZE = {
|
|
|
7236
7236
|
LG: 'large'
|
|
7237
7237
|
};
|
|
7238
7238
|
|
|
7239
|
-
const _excluded$
|
|
7239
|
+
const _excluded$z = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
7240
7240
|
function DafButton(_ref) {
|
|
7241
7241
|
let {
|
|
7242
7242
|
content = '',
|
|
@@ -7250,7 +7250,7 @@ function DafButton(_ref) {
|
|
|
7250
7250
|
style = {},
|
|
7251
7251
|
className = ''
|
|
7252
7252
|
} = _ref,
|
|
7253
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7253
|
+
restProps = _objectWithoutProperties(_ref, _excluded$z);
|
|
7254
7254
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
7255
7255
|
icon: icon,
|
|
7256
7256
|
type: type,
|
|
@@ -7369,12 +7369,12 @@ const Style$R = styled__default["default"].div`
|
|
|
7369
7369
|
}
|
|
7370
7370
|
`;
|
|
7371
7371
|
|
|
7372
|
-
const _excluded$
|
|
7372
|
+
const _excluded$y = ["children"];
|
|
7373
7373
|
const BorderedButton = _ref => {
|
|
7374
7374
|
let {
|
|
7375
7375
|
children
|
|
7376
7376
|
} = _ref,
|
|
7377
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7377
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
7378
7378
|
return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
|
|
7379
7379
|
className: "d-btn-cont",
|
|
7380
7380
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -7383,7 +7383,7 @@ const BorderedButton = _ref => {
|
|
|
7383
7383
|
});
|
|
7384
7384
|
};
|
|
7385
7385
|
|
|
7386
|
-
var _templateObject$
|
|
7386
|
+
var _templateObject$f;
|
|
7387
7387
|
const variantConfig = {
|
|
7388
7388
|
default: {
|
|
7389
7389
|
className: "default-badge",
|
|
@@ -7501,7 +7501,7 @@ function Badge(_ref) {
|
|
|
7501
7501
|
})
|
|
7502
7502
|
});
|
|
7503
7503
|
}
|
|
7504
|
-
const Style$Q = styled__default["default"].div(_templateObject$
|
|
7504
|
+
const Style$Q = styled__default["default"].div(_templateObject$f || (_templateObject$f = _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"])));
|
|
7505
7505
|
Badge.propTypes = {
|
|
7506
7506
|
children: PropTypes__default["default"].node,
|
|
7507
7507
|
className: PropTypes__default["default"].string,
|
|
@@ -7514,12 +7514,12 @@ Badge.propTypes = {
|
|
|
7514
7514
|
props: PropTypes__default["default"].object
|
|
7515
7515
|
};
|
|
7516
7516
|
|
|
7517
|
-
const _excluded$
|
|
7517
|
+
const _excluded$x = ["icon"];
|
|
7518
7518
|
function GetIcon(_ref) {
|
|
7519
7519
|
let {
|
|
7520
7520
|
icon
|
|
7521
7521
|
} = _ref,
|
|
7522
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7522
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
7523
7523
|
let Icon = Icons__namespace.CloseOutlined;
|
|
7524
7524
|
if (Icons__namespace[icon]) {
|
|
7525
7525
|
Icon = Icons__namespace[icon];
|
|
@@ -7849,7 +7849,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
|
|
|
7849
7849
|
}
|
|
7850
7850
|
`;
|
|
7851
7851
|
|
|
7852
|
-
const _excluded$
|
|
7852
|
+
const _excluded$w = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
7853
7853
|
const {
|
|
7854
7854
|
useToken: useToken$n
|
|
7855
7855
|
} = antd.theme;
|
|
@@ -7942,7 +7942,7 @@ function Multiselect(_ref) {
|
|
|
7942
7942
|
isSingle = false,
|
|
7943
7943
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
7944
7944
|
} = _ref,
|
|
7945
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7945
|
+
restProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
7946
7946
|
const {
|
|
7947
7947
|
token
|
|
7948
7948
|
} = useToken$n();
|
|
@@ -8664,7 +8664,7 @@ DAFHeader.propTypes = {
|
|
|
8664
8664
|
filtersConfig: PropTypes__default["default"].any
|
|
8665
8665
|
};
|
|
8666
8666
|
|
|
8667
|
-
const _excluded$
|
|
8667
|
+
const _excluded$v = ["tabs", "onChange", "value", "className"];
|
|
8668
8668
|
function TabsHeader(_ref) {
|
|
8669
8669
|
let {
|
|
8670
8670
|
tabs = [],
|
|
@@ -8672,7 +8672,7 @@ function TabsHeader(_ref) {
|
|
|
8672
8672
|
value = '',
|
|
8673
8673
|
className = 'mt-2'
|
|
8674
8674
|
} = _ref,
|
|
8675
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8675
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
8676
8676
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8677
8677
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
8678
8678
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -8769,7 +8769,7 @@ DrawerHeader.propTypes = {
|
|
|
8769
8769
|
tabsConfig: PropTypes__default["default"].any
|
|
8770
8770
|
};
|
|
8771
8771
|
|
|
8772
|
-
const _excluded$
|
|
8772
|
+
const _excluded$u = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
8773
8773
|
const useFooter = _ref => {
|
|
8774
8774
|
let {
|
|
8775
8775
|
leftContent,
|
|
@@ -8804,7 +8804,7 @@ const useFooter = _ref => {
|
|
|
8804
8804
|
style = {},
|
|
8805
8805
|
className = ""
|
|
8806
8806
|
} = button,
|
|
8807
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
8807
|
+
restProps = _objectWithoutProperties(button, _excluded$u);
|
|
8808
8808
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
8809
8809
|
content: label,
|
|
8810
8810
|
type: type,
|
|
@@ -8831,8 +8831,8 @@ const useFooter = _ref => {
|
|
|
8831
8831
|
};
|
|
8832
8832
|
};
|
|
8833
8833
|
|
|
8834
|
-
var _templateObject$
|
|
8835
|
-
const FooterContainer = styled__default["default"].div(_templateObject$
|
|
8834
|
+
var _templateObject$e;
|
|
8835
|
+
const FooterContainer = styled__default["default"].div(_templateObject$e || (_templateObject$e = _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"])));
|
|
8836
8836
|
|
|
8837
8837
|
function DAFFooter(_ref) {
|
|
8838
8838
|
let {
|
|
@@ -9561,29 +9561,24 @@ const processConditionalTableKeys = (tableKeys, item) => {
|
|
|
9561
9561
|
});
|
|
9562
9562
|
return processedKeys;
|
|
9563
9563
|
};
|
|
9564
|
-
const renderFieldData =
|
|
9565
|
-
let getApiBaseUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => {};
|
|
9566
|
-
let getAppHeader = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : () => {};
|
|
9567
|
-
let app = arguments.length > 6 ? arguments[6] : undefined;
|
|
9568
|
-
let allValues = arguments.length > 7 ? arguments[7] : undefined;
|
|
9569
|
-
let formValues = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : {};
|
|
9564
|
+
const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, getAppHeader = () => {}, app, allValues, formValues = {}) => {
|
|
9570
9565
|
switch (type) {
|
|
9571
9566
|
case 'year':
|
|
9572
9567
|
return value !== '-' ? renderDateFormatted(value, 'YYYY', 'en') : '-';
|
|
9573
9568
|
case 'date':
|
|
9574
9569
|
{
|
|
9575
|
-
const language = user
|
|
9570
|
+
const language = user?.language && user?.language === 'sp' ? 'es' : user?.language;
|
|
9576
9571
|
return value !== '-' ? renderDateFormatted(value, 'DD MMM YYYY', language || 'en') : '-';
|
|
9577
9572
|
}
|
|
9578
9573
|
case 'select':
|
|
9579
9574
|
{
|
|
9580
|
-
const options =
|
|
9575
|
+
const options = config?.options || [];
|
|
9581
9576
|
const option = findOptions(value, options);
|
|
9582
9577
|
return option;
|
|
9583
9578
|
}
|
|
9584
9579
|
case 'multiselect':
|
|
9585
9580
|
{
|
|
9586
|
-
const options =
|
|
9581
|
+
const options = config?.options || [];
|
|
9587
9582
|
const _val = typeof value === 'string' ? value.split(',').map(v => v.trim()) : value;
|
|
9588
9583
|
const option = findOptions(_val, options);
|
|
9589
9584
|
return option.join(', ');
|
|
@@ -9598,7 +9593,7 @@ const renderFieldData = function (type, value, user, config) {
|
|
|
9598
9593
|
formValues: formValues
|
|
9599
9594
|
});
|
|
9600
9595
|
case 'percentage':
|
|
9601
|
-
return value === '-' || value === null || value === undefined ? '-' :
|
|
9596
|
+
return value === '-' || value === null || value === undefined ? '-' : `${value} %`;
|
|
9602
9597
|
case 'geolocation':
|
|
9603
9598
|
{
|
|
9604
9599
|
const val = JSON.parse(value) || {};
|
|
@@ -9612,7 +9607,7 @@ const renderFieldData = function (type, value, user, config) {
|
|
|
9612
9607
|
case 'upload':
|
|
9613
9608
|
case 'videoUpload':
|
|
9614
9609
|
{
|
|
9615
|
-
const documentName = allValues
|
|
9610
|
+
const documentName = allValues?.map(item => item?.name).join(', ');
|
|
9616
9611
|
return documentName;
|
|
9617
9612
|
}
|
|
9618
9613
|
default:
|
|
@@ -11690,7 +11685,7 @@ Widget.propTypes = {
|
|
|
11690
11685
|
};
|
|
11691
11686
|
Widget.displayName = 'Widget';
|
|
11692
11687
|
|
|
11693
|
-
const _excluded$
|
|
11688
|
+
const _excluded$t = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
|
|
11694
11689
|
function ImageWidget(_ref) {
|
|
11695
11690
|
let {
|
|
11696
11691
|
loading = false,
|
|
@@ -11701,7 +11696,7 @@ function ImageWidget(_ref) {
|
|
|
11701
11696
|
noDescriptionText,
|
|
11702
11697
|
isPdf = false
|
|
11703
11698
|
} = _ref,
|
|
11704
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11699
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
11705
11700
|
const expandable = isPdf ? false : props.expandable;
|
|
11706
11701
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
11707
11702
|
loading: loading,
|
|
@@ -11760,8 +11755,8 @@ function ImageWidget(_ref) {
|
|
|
11760
11755
|
}
|
|
11761
11756
|
ImageWidget.displayName = 'ImageWidget';
|
|
11762
11757
|
|
|
11763
|
-
var _templateObject$
|
|
11764
|
-
const _excluded$
|
|
11758
|
+
var _templateObject$d;
|
|
11759
|
+
const _excluded$s = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
11765
11760
|
function FlowWidget(_ref) {
|
|
11766
11761
|
let {
|
|
11767
11762
|
title,
|
|
@@ -11773,7 +11768,7 @@ function FlowWidget(_ref) {
|
|
|
11773
11768
|
className,
|
|
11774
11769
|
direction = "horizontal"
|
|
11775
11770
|
} = _ref,
|
|
11776
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11771
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
11777
11772
|
const [activeTab, setActiveTab] = React.useState();
|
|
11778
11773
|
React.useEffect(() => {
|
|
11779
11774
|
if (defaultActiveTab) {
|
|
@@ -11910,7 +11905,7 @@ function Icon(_ref2) {
|
|
|
11910
11905
|
return icon(status);
|
|
11911
11906
|
}
|
|
11912
11907
|
}
|
|
11913
|
-
const Style$P = styled__default["default"].div(_templateObject$
|
|
11908
|
+
const Style$P = styled__default["default"].div(_templateObject$d || (_templateObject$d = _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"])));
|
|
11914
11909
|
FlowWidget.propTypes = {
|
|
11915
11910
|
title: PropTypes__default["default"].string,
|
|
11916
11911
|
loading: PropTypes__default["default"].bool,
|
|
@@ -12325,12 +12320,8 @@ const Style$N = styled__default["default"].div`
|
|
|
12325
12320
|
border-left: none;
|
|
12326
12321
|
border-bottom: none;
|
|
12327
12322
|
|
|
12328
|
-
/* Add separator line for
|
|
12329
|
-
|
|
12330
|
-
&:nth-child(1),
|
|
12331
|
-
&:nth-child(2),
|
|
12332
|
-
&:nth-child(3),
|
|
12333
|
-
&:nth-child(4) {
|
|
12323
|
+
/* Add separator line for all items except the last two (last items in each column) */
|
|
12324
|
+
&:not(:nth-last-child(-n+2)) {
|
|
12334
12325
|
&::after {
|
|
12335
12326
|
content: '';
|
|
12336
12327
|
position: absolute;
|
|
@@ -12452,7 +12443,7 @@ const NoMinWidth = styled__default["default"].div`
|
|
|
12452
12443
|
}
|
|
12453
12444
|
`;
|
|
12454
12445
|
|
|
12455
|
-
var _templateObject$
|
|
12446
|
+
var _templateObject$c;
|
|
12456
12447
|
function ActivityIndicatorsWidget(_ref) {
|
|
12457
12448
|
let {
|
|
12458
12449
|
t = s => s,
|
|
@@ -12538,12 +12529,18 @@ function Label$1(_ref2) {
|
|
|
12538
12529
|
* @param {string} configItem.type - "empty" | "compliant" | "notCompliant"
|
|
12539
12530
|
* @param {Function} configItem.onClick - Optional callback for empty type
|
|
12540
12531
|
* @param {string} configItem.statusIcon - Optional custom icon name for status badge (overrides default)
|
|
12532
|
+
* @param {string} configItem.statusIconColor - Optional custom color for status icon
|
|
12533
|
+
* @param {string} configItem.statusBadgeBackgroundColor - Optional custom background color for status badge
|
|
12534
|
+
* @param {string} configItem.statusBadgeBorderColor - Optional custom border color for status badge
|
|
12541
12535
|
*/
|
|
12542
12536
|
function renderStatus$1(configItem) {
|
|
12543
12537
|
const {
|
|
12544
12538
|
type,
|
|
12545
12539
|
onClick,
|
|
12546
|
-
statusIcon
|
|
12540
|
+
statusIcon,
|
|
12541
|
+
statusIconColor,
|
|
12542
|
+
statusBadgeBackgroundColor,
|
|
12543
|
+
statusBadgeBorderColor
|
|
12547
12544
|
} = configItem;
|
|
12548
12545
|
switch (type) {
|
|
12549
12546
|
case "empty":
|
|
@@ -12559,21 +12556,29 @@ function renderStatus$1(configItem) {
|
|
|
12559
12556
|
case "compliant":
|
|
12560
12557
|
return /*#__PURE__*/jsxRuntime.jsx(StatusBadge, {
|
|
12561
12558
|
className: "status-badge compliant border",
|
|
12559
|
+
style: {
|
|
12560
|
+
backgroundColor: statusBadgeBackgroundColor || "#ECFDF3",
|
|
12561
|
+
borderColor: statusBadgeBorderColor || "#A7F3D0"
|
|
12562
|
+
},
|
|
12562
12563
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
12563
12564
|
name: statusIcon || "Check",
|
|
12564
12565
|
width: 14,
|
|
12565
12566
|
height: 14,
|
|
12566
|
-
color: "#12B76A"
|
|
12567
|
+
color: statusIconColor || "#12B76A"
|
|
12567
12568
|
})
|
|
12568
12569
|
});
|
|
12569
12570
|
case "notCompliant":
|
|
12570
12571
|
return /*#__PURE__*/jsxRuntime.jsx(StatusBadge, {
|
|
12571
12572
|
className: "status-badge not-compliant border",
|
|
12573
|
+
style: {
|
|
12574
|
+
backgroundColor: statusBadgeBackgroundColor || "#FEF3F2",
|
|
12575
|
+
borderColor: statusBadgeBorderColor || "#FECACA"
|
|
12576
|
+
},
|
|
12572
12577
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
12573
12578
|
name: statusIcon || "Close",
|
|
12574
12579
|
width: 14,
|
|
12575
12580
|
height: 14,
|
|
12576
|
-
color: "#D92D20"
|
|
12581
|
+
color: statusIconColor || "#D92D20"
|
|
12577
12582
|
})
|
|
12578
12583
|
});
|
|
12579
12584
|
default:
|
|
@@ -12587,7 +12592,7 @@ function renderStatus$1(configItem) {
|
|
|
12587
12592
|
});
|
|
12588
12593
|
}
|
|
12589
12594
|
}
|
|
12590
|
-
const StatusBadge = styled__default["default"].div(_templateObject$
|
|
12595
|
+
const StatusBadge = styled__default["default"].div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\twidth: 24px;\n\theight: 24px;\n\tborder-radius: 50%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex-shrink: 0;\n\n\t&.compliant {\n\t\tbackground-color: #ECFDF3;\n\t\tborder: 1px solid #A7F3D0;\n\t}\n\n\t&.not-compliant {\n\t\tbackground-color: #FEF3F2;\n\t\tborder: 1px solid #FECACA;\n\t}\n\n\t&.empty {\n\t\tbackground-color: #F9FAFB;\n\t\tborder: 1px solid #E5E7EB;\n\t}\n"])));
|
|
12591
12596
|
ActivityIndicatorsWidget.displayName = "ActivityIndicatorsWidget";
|
|
12592
12597
|
|
|
12593
12598
|
function TooltipIcon(_ref) {
|
|
@@ -15479,7 +15484,7 @@ Map$3.propTypes = {
|
|
|
15479
15484
|
link: PropTypes__default["default"].any
|
|
15480
15485
|
};
|
|
15481
15486
|
|
|
15482
|
-
const _excluded$
|
|
15487
|
+
const _excluded$r = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
15483
15488
|
function InExpandableWidgetMap(_ref) {
|
|
15484
15489
|
let {
|
|
15485
15490
|
isExpanded,
|
|
@@ -15493,7 +15498,7 @@ function InExpandableWidgetMap(_ref) {
|
|
|
15493
15498
|
height,
|
|
15494
15499
|
widgetConfig
|
|
15495
15500
|
} = _ref,
|
|
15496
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15501
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
15497
15502
|
const [mapKey, setMapKey] = React.useState(0);
|
|
15498
15503
|
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
15499
15504
|
React.useEffect(() => {
|
|
@@ -17693,14 +17698,14 @@ const MapConfig = ({
|
|
|
17693
17698
|
});
|
|
17694
17699
|
};
|
|
17695
17700
|
|
|
17696
|
-
const _excluded$
|
|
17701
|
+
const _excluded$q = ["config", "title", "loading"];
|
|
17697
17702
|
const Details = _ref => {
|
|
17698
17703
|
let {
|
|
17699
17704
|
config = [],
|
|
17700
17705
|
title,
|
|
17701
17706
|
loading = false
|
|
17702
17707
|
} = _ref,
|
|
17703
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17708
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
17704
17709
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17705
17710
|
className: "with-border-header h-w-btn-header card",
|
|
17706
17711
|
loading: loading,
|
|
@@ -17716,14 +17721,14 @@ const Details = _ref => {
|
|
|
17716
17721
|
}));
|
|
17717
17722
|
};
|
|
17718
17723
|
|
|
17719
|
-
const _excluded$
|
|
17724
|
+
const _excluded$p = ["config", "title", "loading"];
|
|
17720
17725
|
const KeyIndicatorsDetails = _ref => {
|
|
17721
17726
|
let {
|
|
17722
17727
|
config,
|
|
17723
17728
|
title,
|
|
17724
17729
|
loading = false
|
|
17725
17730
|
} = _ref,
|
|
17726
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17731
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
17727
17732
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17728
17733
|
className: "with-border-header h-w-btn-header",
|
|
17729
17734
|
title: title,
|
|
@@ -17753,7 +17758,7 @@ const Style$G = styled__default["default"].div`
|
|
|
17753
17758
|
}
|
|
17754
17759
|
`;
|
|
17755
17760
|
|
|
17756
|
-
const _excluded$
|
|
17761
|
+
const _excluded$o = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
17757
17762
|
const DetailsSection = _ref => {
|
|
17758
17763
|
let {
|
|
17759
17764
|
children,
|
|
@@ -17761,7 +17766,7 @@ const DetailsSection = _ref => {
|
|
|
17761
17766
|
detailsTitle,
|
|
17762
17767
|
firstColumnWidth = "250px"
|
|
17763
17768
|
} = _ref,
|
|
17764
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17769
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
17765
17770
|
return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
|
|
17766
17771
|
firstColumnWidth: firstColumnWidth,
|
|
17767
17772
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -17936,15 +17941,15 @@ const getGoalConfig = () => {
|
|
|
17936
17941
|
}];
|
|
17937
17942
|
};
|
|
17938
17943
|
|
|
17939
|
-
var _templateObject$
|
|
17940
|
-
const _excluded$
|
|
17944
|
+
var _templateObject$b;
|
|
17945
|
+
const _excluded$n = ["title", "activeSdgGoals", "t"];
|
|
17941
17946
|
function SDGWidget(_ref) {
|
|
17942
17947
|
let {
|
|
17943
17948
|
title = "Sustainable Development Goals",
|
|
17944
17949
|
activeSdgGoals = [],
|
|
17945
17950
|
t = key => key
|
|
17946
17951
|
} = _ref,
|
|
17947
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17952
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
17948
17953
|
const sdgConfig = getGoalConfig();
|
|
17949
17954
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17950
17955
|
title: title,
|
|
@@ -17965,10 +17970,10 @@ function SDGWidget(_ref) {
|
|
|
17965
17970
|
})
|
|
17966
17971
|
}));
|
|
17967
17972
|
}
|
|
17968
|
-
const SDGContainer = styled__default["default"].div(_templateObject$
|
|
17973
|
+
const SDGContainer = styled__default["default"].div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(53px, 1fr));\n\tgap: 8px;\n\n\t.sdg-item {\n\t\theight: 53px;\n\t\twidth: 53px;\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"])));
|
|
17969
17974
|
|
|
17970
|
-
var _templateObject$
|
|
17971
|
-
const Style$F = styled__default["default"].div(_templateObject$
|
|
17975
|
+
var _templateObject$a;
|
|
17976
|
+
const Style$F = styled__default["default"].div(_templateObject$a || (_templateObject$a = _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\tcursor: default;\n\t}\n"])));
|
|
17972
17977
|
|
|
17973
17978
|
/**
|
|
17974
17979
|
* ComponentWithHoverFocus
|
|
@@ -18242,7 +18247,7 @@ function SdgList({
|
|
|
18242
18247
|
});
|
|
18243
18248
|
}
|
|
18244
18249
|
|
|
18245
|
-
const _excluded$
|
|
18250
|
+
const _excluded$m = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
|
|
18246
18251
|
const {
|
|
18247
18252
|
Meta
|
|
18248
18253
|
} = antd.Card;
|
|
@@ -18262,7 +18267,7 @@ function ProjectWidget(_ref) {
|
|
|
18262
18267
|
hideSDGList = false,
|
|
18263
18268
|
t = x => x
|
|
18264
18269
|
} = _ref,
|
|
18265
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18270
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
18266
18271
|
const [isHovered, setIsHovered] = React__default["default"].useState(false);
|
|
18267
18272
|
const {
|
|
18268
18273
|
token
|
|
@@ -18534,13 +18539,13 @@ const WidgetCard = _ref => {
|
|
|
18534
18539
|
});
|
|
18535
18540
|
};
|
|
18536
18541
|
|
|
18537
|
-
const _excluded$
|
|
18542
|
+
const _excluded$l = ["title", "children"];
|
|
18538
18543
|
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
18539
18544
|
let {
|
|
18540
18545
|
title,
|
|
18541
18546
|
children
|
|
18542
18547
|
} = _ref,
|
|
18543
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18548
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
18544
18549
|
/**
|
|
18545
18550
|
* Handles carousel slide change events
|
|
18546
18551
|
* @param {number} currentSlide - The index of the current slide after change
|
|
@@ -18704,7 +18709,7 @@ const EmptyStateContainer = styled__default["default"].div`
|
|
|
18704
18709
|
}
|
|
18705
18710
|
`;
|
|
18706
18711
|
|
|
18707
|
-
const _excluded$
|
|
18712
|
+
const _excluded$k = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
|
|
18708
18713
|
function ImageCarousel(_ref) {
|
|
18709
18714
|
let {
|
|
18710
18715
|
title,
|
|
@@ -18719,7 +18724,7 @@ function ImageCarousel(_ref) {
|
|
|
18719
18724
|
emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
18720
18725
|
emptyText = "No Image"
|
|
18721
18726
|
} = _ref,
|
|
18722
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18727
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
18723
18728
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
18724
18729
|
const [current, setCurrent] = React.useState(0);
|
|
18725
18730
|
const carouselRef = React.useRef(null);
|
|
@@ -19017,6 +19022,167 @@ const StatCard = _ref => {
|
|
|
19017
19022
|
}));
|
|
19018
19023
|
};
|
|
19019
19024
|
|
|
19025
|
+
const VEGETATION_KEYS = {
|
|
19026
|
+
HEALTHY: "healthy",
|
|
19027
|
+
WHITE_SPOTS: "white",
|
|
19028
|
+
BLACK_SPOTS: "black",
|
|
19029
|
+
REDDISH_SPOTS: "reddish",
|
|
19030
|
+
YELLOWING: "yellowing",
|
|
19031
|
+
MOSAIC: "mosaic",
|
|
19032
|
+
DRY_OR_DEAD: "dryOrDead",
|
|
19033
|
+
NO_LEAVES: "noLeaves",
|
|
19034
|
+
SPIDER_WEBS: "spiderWebs",
|
|
19035
|
+
DAMAGE_FROM_INSECTS: "damageFromInsects"
|
|
19036
|
+
};
|
|
19037
|
+
|
|
19038
|
+
// Mapping from growthObservations keys to VEGETATION_KEYS
|
|
19039
|
+
const GROWTH_OBSERVATIONS_TO_VEGETATION_KEYS = {
|
|
19040
|
+
"white_spots": VEGETATION_KEYS.WHITE_SPOTS,
|
|
19041
|
+
"healthy_leaves": VEGETATION_KEYS.HEALTHY,
|
|
19042
|
+
"yellowing_leaves": VEGETATION_KEYS.YELLOWING,
|
|
19043
|
+
"leaf_mosaic": VEGETATION_KEYS.MOSAIC,
|
|
19044
|
+
"dry_dead_leaves": VEGETATION_KEYS.DRY_OR_DEAD,
|
|
19045
|
+
"no_leaves": VEGETATION_KEYS.NO_LEAVES,
|
|
19046
|
+
"black_spots": VEGETATION_KEYS.BLACK_SPOTS,
|
|
19047
|
+
"reddish_spots": VEGETATION_KEYS.REDDISH_SPOTS,
|
|
19048
|
+
"spider_webs": VEGETATION_KEYS.SPIDER_WEBS,
|
|
19049
|
+
"insect_damage": VEGETATION_KEYS.DAMAGE_FROM_INSECTS
|
|
19050
|
+
};
|
|
19051
|
+
const getVegetationConfig = () => {
|
|
19052
|
+
return [{
|
|
19053
|
+
img: "/Vegetation/healthy.svg",
|
|
19054
|
+
key: VEGETATION_KEYS.HEALTHY,
|
|
19055
|
+
disabled: "/Vegetation/healthy-default.svg"
|
|
19056
|
+
}, {
|
|
19057
|
+
img: "/Vegetation/white.svg",
|
|
19058
|
+
key: VEGETATION_KEYS.WHITE_SPOTS,
|
|
19059
|
+
disabled: "/Vegetation/white-default.svg"
|
|
19060
|
+
}, {
|
|
19061
|
+
img: "/Vegetation/black.svg",
|
|
19062
|
+
key: VEGETATION_KEYS.BLACK_SPOTS,
|
|
19063
|
+
disabled: "/Vegetation/black-default.svg"
|
|
19064
|
+
}, {
|
|
19065
|
+
img: "/Vegetation/reddish.svg",
|
|
19066
|
+
key: VEGETATION_KEYS.REDDISH_SPOTS,
|
|
19067
|
+
disabled: "/Vegetation/reddish-default.svg"
|
|
19068
|
+
}, {
|
|
19069
|
+
img: "/Vegetation/yellowing.svg",
|
|
19070
|
+
key: VEGETATION_KEYS.YELLOWING,
|
|
19071
|
+
disabled: "/Vegetation/yellowing-default.svg"
|
|
19072
|
+
}, {
|
|
19073
|
+
img: "/Vegetation/mosaic.svg",
|
|
19074
|
+
key: VEGETATION_KEYS.MOSAIC,
|
|
19075
|
+
disabled: "/Vegetation/mosaic-default.svg"
|
|
19076
|
+
}, {
|
|
19077
|
+
img: "/Vegetation/dry-or-dead.svg",
|
|
19078
|
+
key: VEGETATION_KEYS.DRY_OR_DEAD,
|
|
19079
|
+
disabled: "/Vegetation/dry-or-dead-default.svg"
|
|
19080
|
+
}, {
|
|
19081
|
+
img: "/Vegetation/no-leaves.svg",
|
|
19082
|
+
key: VEGETATION_KEYS.NO_LEAVES,
|
|
19083
|
+
disabled: "/Vegetation/no-leaves-default.svg"
|
|
19084
|
+
}, {
|
|
19085
|
+
img: "/Vegetation/spider-webs.svg",
|
|
19086
|
+
key: VEGETATION_KEYS.SPIDER_WEBS,
|
|
19087
|
+
disabled: "/Vegetation/spider-webs-default.svg"
|
|
19088
|
+
}, {
|
|
19089
|
+
img: "/Vegetation/damage-from-insects.svg",
|
|
19090
|
+
key: VEGETATION_KEYS.DAMAGE_FROM_INSECTS,
|
|
19091
|
+
disabled: "/Vegetation/damage-from-insects-default.svg"
|
|
19092
|
+
}];
|
|
19093
|
+
};
|
|
19094
|
+
|
|
19095
|
+
var _templateObject$9, _templateObject2$1;
|
|
19096
|
+
const _excluded$j = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
|
|
19097
|
+
function VegetationWidget(_ref) {
|
|
19098
|
+
let {
|
|
19099
|
+
title = "Vegetation Health",
|
|
19100
|
+
activeVegetationConditions = [],
|
|
19101
|
+
filterKeys = null,
|
|
19102
|
+
columnsPerRow = null,
|
|
19103
|
+
itemWidth = 140.33,
|
|
19104
|
+
itemHeight = 140,
|
|
19105
|
+
growthObservations = [],
|
|
19106
|
+
t = key => key
|
|
19107
|
+
} = _ref,
|
|
19108
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
19109
|
+
let vegetationConfig = getVegetationConfig();
|
|
19110
|
+
|
|
19111
|
+
// Get all VEGETATION_KEYS values before filtering (needed for mapping check)
|
|
19112
|
+
const allVegetationKeys = vegetationConfig.map(item => item.key);
|
|
19113
|
+
|
|
19114
|
+
// Filter to show only specific keys if filterKeys is provided
|
|
19115
|
+
if (filterKeys && Array.isArray(filterKeys)) {
|
|
19116
|
+
vegetationConfig = vegetationConfig.filter(item => filterKeys.includes(item.key));
|
|
19117
|
+
}
|
|
19118
|
+
|
|
19119
|
+
// Map growthObservations to VEGETATION_KEYS
|
|
19120
|
+
// Handle both formats: growthObservations keys (e.g., "yellowing_leaves") and VEGETATION_KEYS (e.g., "yellowing")
|
|
19121
|
+
const mappedGrowthObservations = Array.isArray(growthObservations) ? growthObservations.map(obs => {
|
|
19122
|
+
// First try to map from growthObservations format
|
|
19123
|
+
const mapped = GROWTH_OBSERVATIONS_TO_VEGETATION_KEYS[obs];
|
|
19124
|
+
if (mapped) {
|
|
19125
|
+
return mapped;
|
|
19126
|
+
}
|
|
19127
|
+
// If not mapped, check if it's already a VEGETATION_KEY value
|
|
19128
|
+
if (allVegetationKeys.includes(obs)) {
|
|
19129
|
+
return obs;
|
|
19130
|
+
}
|
|
19131
|
+
// Debug: log unmapped observations
|
|
19132
|
+
if (obs) {
|
|
19133
|
+
console.warn("VegetationWidget: Unmapped growthObservation \"".concat(obs, "\""));
|
|
19134
|
+
}
|
|
19135
|
+
return null;
|
|
19136
|
+
}).filter(Boolean) : [];
|
|
19137
|
+
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
19138
|
+
title: title,
|
|
19139
|
+
className: "with-border-header"
|
|
19140
|
+
}, props), {}, {
|
|
19141
|
+
children: /*#__PURE__*/jsxRuntime.jsx(VegetationWrapper, {
|
|
19142
|
+
$columnsPerRow: columnsPerRow,
|
|
19143
|
+
children: /*#__PURE__*/jsxRuntime.jsx(VegetationContainer, {
|
|
19144
|
+
$columnsPerRow: columnsPerRow,
|
|
19145
|
+
$itemWidth: itemWidth,
|
|
19146
|
+
$itemHeight: itemHeight,
|
|
19147
|
+
children: vegetationConfig.map(item => {
|
|
19148
|
+
// Use colored SVG if the item's key exists in growthObservations (mapped)
|
|
19149
|
+
// Otherwise use default SVG
|
|
19150
|
+
// Also check activeVegetationConditions for backward compatibility
|
|
19151
|
+
const isInGrowthObservations = mappedGrowthObservations.includes(item.key);
|
|
19152
|
+
const isInActiveConditions = activeVegetationConditions.includes(item.key);
|
|
19153
|
+
|
|
19154
|
+
// Use colored SVG if it exists in growthObservations OR activeVegetationConditions
|
|
19155
|
+
const shouldUseColored = isInGrowthObservations || isInActiveConditions;
|
|
19156
|
+
|
|
19157
|
+
// Debug logging for yellowing specifically
|
|
19158
|
+
if (item.key === "yellowing") {
|
|
19159
|
+
console.log("Yellowing debug:", {
|
|
19160
|
+
itemKey: item.key,
|
|
19161
|
+
growthObservations,
|
|
19162
|
+
mappedGrowthObservations,
|
|
19163
|
+
isInGrowthObservations,
|
|
19164
|
+
isInActiveConditions,
|
|
19165
|
+
shouldUseColored,
|
|
19166
|
+
img: item.img,
|
|
19167
|
+
disabled: item.disabled
|
|
19168
|
+
});
|
|
19169
|
+
}
|
|
19170
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
19171
|
+
title: t("straatos::".concat(item.key)),
|
|
19172
|
+
children: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
19173
|
+
src: shouldUseColored ? item.img : item.disabled,
|
|
19174
|
+
className: "vegetation-item",
|
|
19175
|
+
alt: item.key
|
|
19176
|
+
}, item.key)
|
|
19177
|
+
}, item.key);
|
|
19178
|
+
})
|
|
19179
|
+
})
|
|
19180
|
+
})
|
|
19181
|
+
}));
|
|
19182
|
+
}
|
|
19183
|
+
const VegetationWrapper = styled__default["default"].div(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral(["\n\t", "\n"])), props => props.$columnsPerRow ? "\n\t\toverflow-x: auto;\n\t\twidth: 100%;\n\t" : '');
|
|
19184
|
+
const VegetationContainer = styled__default["default"].div(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: ", ";\n\tgap: 24px;\n\t", "\n\n\t.vegetation-item {\n\t\twidth: 100%;\n\t\taspect-ratio: ", ";\n\t\tborder-radius: 7px;\n\t\tflex-shrink: 0;\n\t\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t}\n\n\t.vegetation-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"])), props => props.$columnsPerRow ? "repeat(".concat(props.$columnsPerRow, ", 1fr)") : "repeat(auto-fit, minmax(".concat(props.$itemWidth, "px, 1fr))"), props => props.$columnsPerRow ? "\n\t\twidth: 100%;\n\t" : '', props => props.$itemWidth / props.$itemHeight);
|
|
19185
|
+
|
|
19020
19186
|
var Style$C = styled__default["default"].div`
|
|
19021
19187
|
border: 1px solid var(--base-gray-40);
|
|
19022
19188
|
padding: 12px;
|
|
@@ -25185,6 +25351,9 @@ class VersionService extends BaseService {
|
|
|
25185
25351
|
var VersionService$1 = createLazyService(VersionService);
|
|
25186
25352
|
|
|
25187
25353
|
const getSourcesType = subject => {
|
|
25354
|
+
console.log({
|
|
25355
|
+
subject
|
|
25356
|
+
});
|
|
25188
25357
|
const typeMapping = {
|
|
25189
25358
|
locations: "location",
|
|
25190
25359
|
location: "location",
|
|
@@ -25198,7 +25367,8 @@ const getSourcesType = subject => {
|
|
|
25198
25367
|
events: "event",
|
|
25199
25368
|
event: "event",
|
|
25200
25369
|
activities: "event",
|
|
25201
|
-
incidents: "event"
|
|
25370
|
+
incidents: "event",
|
|
25371
|
+
"planting-cycle": "planting-cycle"
|
|
25202
25372
|
};
|
|
25203
25373
|
return typeMapping[subject] ?? null;
|
|
25204
25374
|
};
|
|
@@ -62687,6 +62857,7 @@ exports.TabsHeader = TabsHeader;
|
|
|
62687
62857
|
exports.TooltipIcon = TooltipIcon;
|
|
62688
62858
|
exports.TradeRelationship = index$1;
|
|
62689
62859
|
exports.UserTable = UserTable;
|
|
62860
|
+
exports.VegetationHealth = VegetationWidget;
|
|
62690
62861
|
exports.ViewForm = Content$1;
|
|
62691
62862
|
exports.ViewFormInput = Input;
|
|
62692
62863
|
exports.ViewFormNavigation = Navigation;
|